cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sate...@apache.org
Subject [08/11] git commit: updated refs/heads/vmware-datamodel to 3201dbf
Date Sun, 05 May 2013 02:49:00 GMT
CLOUDSTACK-2160:Refresh button functionality for security groups and statistics tab


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/63f3ccd4
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/63f3ccd4
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/63f3ccd4

Branch: refs/heads/vmware-datamodel
Commit: 63f3ccd4dfc835581305bb57c0878861106dcfe6
Parents: 870d21c
Author: Isaac Chiang <isaacchiang@gmail.com>
Authored: Sat May 4 13:41:02 2013 +0530
Committer: Pranav Saxena <pranav.saxena@citrix.com>
Committed: Sat May 4 13:41:02 2013 +0530

----------------------------------------------------------------------
 ui/scripts/instances.js |   26 +++++++++++++++++++++-----
 1 files changed, 21 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/63f3ccd4/ui/scripts/instances.js
----------------------------------------------------------------------
diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js
index ab9d606..1b89d4f 100644
--- a/ui/scripts/instances.js
+++ b/ui/scripts/instances.js
@@ -1618,7 +1618,16 @@
               }
             ],
             dataProvider: function(args) {
-              args.response.success({data: args.context.instances[0].securitygroup});
+             // args.response.success({data: args.context.instances[0].securitygroup});
+                  $.ajax({
+                   url:createURL("listVirtualMachines&details=secgrp&id=" + args.context.instances[0].id),
+                   dataType: "json",
+                   async:true,	
+                   success:function(json) {
+                     args.response.success({data: json.listvirtualmachinesresponse.virtualmachine[0].securitygroup});

+                }
+	
+              });
             }
           },
 					
@@ -1634,15 +1643,22 @@
               networkkbswrite: { label: 'label.network.write' }
             },
             dataProvider: function(args) {
-              var jsonObj = args.context.instances[0];
-              args.response.success({
+              $.ajax({
+                url:createURL("listVirtualMachines&details=stats&id=" + args.context.instances[0].id),
+                dataType: "json",	
+                async:true,
+                success:function(json) {
+                var jsonObj = json.listvirtualmachinesresponse.virtualmachine[0];
+               args.response.success({
                 data: {
                   totalCPU: jsonObj.cpunumber + " x " + cloudStack.converters.convertHz(jsonObj.cpuspeed),
                   cpuused: jsonObj.cpuused,
                   networkkbsread: (jsonObj.networkkbsread == null)? "N/A": cloudStack.converters.convertBytes(jsonObj.networkkbsread
* 1024),
                   networkkbswrite: (jsonObj.networkkbswrite == null)? "N/A": cloudStack.converters.convertBytes(jsonObj.networkkbswrite
* 1024)
-                }
-              });
+                  }
+                });
+              }
+             });
             }
           }
         }


Mime
View raw message