File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 16181618 }
16191619 ] ,
16201620 dataProvider : function ( args ) {
1621- args . response . success ( { data : args . context . instances [ 0 ] . securitygroup } ) ;
1621+ // args.response.success({data: args.context.instances[0].securitygroup});
1622+ $ . ajax ( {
1623+ url :createURL ( "listVirtualMachines&details=secgrp&id=" + args . context . instances [ 0 ] . id ) ,
1624+ dataType : "json" ,
1625+ async :true ,
1626+ success :function ( json ) {
1627+ args . response . success ( { data : json . listvirtualmachinesresponse . virtualmachine [ 0 ] . securitygroup } ) ;
1628+ }
1629+
1630+ } ) ;
16221631 }
16231632 } ,
16241633
16341643 networkkbswrite : { label : 'label.network.write' }
16351644 } ,
16361645 dataProvider : function ( args ) {
1637- var jsonObj = args . context . instances [ 0 ] ;
1638- args . response . success ( {
1646+ $ . ajax ( {
1647+ url :createURL ( "listVirtualMachines&details=stats&id=" + args . context . instances [ 0 ] . id ) ,
1648+ dataType : "json" ,
1649+ async :true ,
1650+ success :function ( json ) {
1651+ var jsonObj = json . listvirtualmachinesresponse . virtualmachine [ 0 ] ;
1652+ args . response . success ( {
16391653 data : {
16401654 totalCPU : jsonObj . cpunumber + " x " + cloudStack . converters . convertHz ( jsonObj . cpuspeed ) ,
16411655 cpuused : jsonObj . cpuused ,
16421656 networkkbsread : ( jsonObj . networkkbsread == null ) ? "N/A" : cloudStack . converters . convertBytes ( jsonObj . networkkbsread * 1024 ) ,
16431657 networkkbswrite : ( jsonObj . networkkbswrite == null ) ? "N/A" : cloudStack . converters . convertBytes ( jsonObj . networkkbswrite * 1024 )
1644- }
1645- } ) ;
1658+ }
1659+ } ) ;
1660+ }
1661+ } ) ;
16461662 }
16471663 }
16481664 }
You can’t perform that action at this time.
0 commit comments