File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 140140 } ,
141141 {
142142 id : { label : 'ID' } ,
143- accounts : { label : 'Accounts' } ,
143+ accountTotal : { label : 'Accounts' } ,
144144 instances : { label : 'Instances' } ,
145145 volumes : { label : 'Volumes' }
146146 }
147147 ] ,
148- dataProvider : function ( args ) {
148+ dataProvider : function ( args ) {
149+ var domainObj = args . context . domains [ 0 ] ;
150+ $ . ajax ( {
151+ url : createURL ( "listAccounts&domainid=" + domainObj . id ) ,
152+ async : false ,
153+ dataType : "json" ,
154+ success : function ( json ) {
155+ var accounts = json . listaccountsresponse . account ;
156+ var accountTotal ;
157+ if ( accounts != null )
158+ accountTotal = accounts . length ;
159+ else
160+ accountTotal = 0 ;
161+ domainObj [ "accountTotal" ] = accountTotal ;
162+ }
163+ } ) ;
164+
149165 args . response . success ( {
150- data : args . context . domains [ 0 ]
166+ data : domainObj
151167 } ) ;
152168 }
153169 } ,
You can’t perform that action at this time.
0 commit comments