Revision fa15635e

View differences:

src/sunstone/public/app/tabs/datastores-tab/panels/info.js
1 1
define(function(require) {
2 2
  var TemplateInfo = require('hbs!./info/html');
3 3
  var Locale = require('utils/locale');
4
  var Humanize = require('utils/humanize');
4 5
  var RenameTr = require('utils/panel/rename-tr');
5 6
  var TemplateTable = require('utils/panel/template-table');
6 7
  var PermissionsTable = require('utils/panel/permissions-table');
......
23 24
    var capacityBar = DatastoreCapacityBar.html(element);
24 25
    var stateStr = Locale.tr(OpenNebulaDatastore.stateStr(element.STATE));
25 26

  
27
    var limitStr = '-';
28
    if (element.TEMPLATE.SHARED == "NO" || element.TEMPLATE.LIMIT_MB != undefined) {
29
      limitStr = Humanize.sizeFromMB(element.TEMPLATE.LIMIT_MB)
30
    }
31

  
26 32
    return TemplateInfo({
27 33
      'element': element,
28 34
      'renameTrHTML': renameTrHTML,
......
30 36
      'templateTableHTML': templateTableHTML,
31 37
      'permissionsTableHTML': permissionsTableHTML,
32 38
      'capacityBar': capacityBar,
33
      'stateStr': stateStr
39
      'stateStr': stateStr,
40
      'limitStr': limitStr
34 41
    });
35 42
  }
36 43

  
src/sunstone/public/app/tabs/datastores-tab/panels/info/html.hbs
29 29
        </tr>
30 30
        <tr>
31 31
          <td class="key_td">{{tr "Limit"}}</td>
32
          <td class="value_td" colspan="2">-</td>
32
          <td class="value_td" colspan="2">{{limitStr}}</td>
33 33
        </tr>
34 34
      </tbody>
35 35
    </table>

Also available in: Unified diff