File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 238238 return {
239239 zoneID : capacity . zoneid , // Temporary fix for dashboard
240240 zoneName : capacity . zonename ,
241- type : cloudStack . converters . toAlertType ( capacity . type ) ,
241+ type : cloudStack . converters . toCapacityCountType ( capacity . type ) ,
242242 percent : parseInt ( capacity . percentused ) ,
243243 used : cloudStack . converters . convertByType ( capacity . type , capacity . capacityused ) ,
244244 total : cloudStack . converters . convertByType ( capacity . type , capacity . capacitytotal )
Original file line number Diff line number Diff line change @@ -425,6 +425,31 @@ cloudStack.converters = {
425425 case 26 : return "Resource Limit Exceeded" ;
426426 }
427427 } ,
428+
429+ toCapacityCountType :function ( capacityCode ) {
430+ switch ( capacityCode ) {
431+ case 0 : return _l ( 'label.memory' ) ;
432+ case 1 : return _l ( 'label.cpu' ) ;
433+ case 2 : return _l ( 'label.storage' ) ;
434+ case 3 : return _l ( 'label.primary.storage' ) ;
435+ case 4 : return _l ( 'label.public.ips' ) ;
436+ case 5 : return _l ( 'label.management.ips' ) ;
437+ case 6 : return _l ( 'label.secondary.storage' ) ;
438+ case 7 : return _l ( 'label.vlan' ) ;
439+ case 8 : return _l ( 'label.direct.ips' ) ;
440+ case 9 : return _l ( 'label.local.storage' ) ;
441+ case 10 : return "Routing Host" ;
442+ case 11 : return "Storage" ;
443+ case 12 : return "Usage Server" ;
444+ case 13 : return "Management Server" ;
445+ case 14 : return "Domain Router" ;
446+ case 15 : return "Console Proxy" ;
447+ case 16 : return "User VM" ;
448+ case 17 : return "VLAN" ;
449+ case 18 : return "Secondary Storage VM" ;
450+ }
451+ } ,
452+
428453 convertByType : function ( alertCode , value ) {
429454 switch ( alertCode ) {
430455 case 0 : return cloudStack . converters . convertBytes ( value ) ;
You can’t perform that action at this time.
0 commit comments