cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pran...@apache.org
Subject git commit: updated refs/heads/master-6-17-stable to 4207d8c
Date Wed, 03 Jul 2013 12:15:38 GMT
Updated Branches:
  refs/heads/master-6-17-stable f9270304e -> 4207d8c3f


CLOUDSTACK-2760: Agent status for SSVM and CPVM


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

Branch: refs/heads/master-6-17-stable
Commit: 4207d8c3fdfe1d7e9f1937583f3cc74eae3785a6
Parents: f927030
Author: Pranav Saxena <psbits@gmail.com>
Authored: Wed Jul 3 17:22:35 2013 +0530
Committer: Pranav Saxena <psbits@gmail.com>
Committed: Wed Jul 3 17:24:08 2013 +0530

----------------------------------------------------------------------
 ui/scripts/system.js | 37 +++++++++++++++++++++++++++++++++++--
 1 file changed, 35 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4207d8c3/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index 8d8a8af..6f301f5 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -6663,7 +6663,30 @@
                     url: createURL('listSystemVms' + searchByArgs),
                     data: { page: args.page, pageSize: pageSize, listAll: true },
                     success: function (json) {
-                      args.response.success({ data: json.listsystemvmsresponse.systemvm });
+                       var items = json.listsystemvmsresponse.systemvm;
+                         if(items != null){
+                                  $.ajax({
+                                     url:createURL("listHosts&listAll=true" ),
+                                     async:false,
+                                     success:function(json){
+
+                                        var hostObj = json.listhostsresponse.host;
+
+                                        $(hostObj).each(function(index){
+
+                                           $.extend(items[index],{agentstate:hostObj[index].state});
+
+                                        });
+                                        args.response.success({ data:items});
+                                     },
+                                     error:function(json){
+                                         args.response.error(parseXMLHttpResponse(json));
+
+                                     }
+                                 });
+                             }
+
+                     // args.response.success({ data: json.listsystemvmsresponse.systemvm
});
                     },
                     error: function (json) {
                       args.response.error(parseXMLHttpResponse(json));
@@ -7326,7 +7349,7 @@
             },
             zonename: { label: 'label.zone' },
             state: {
-              label: 'label.status',
+              label: 'VM state',
               converter: function(str) {
                 // For localization
                 return str;
@@ -7337,7 +7360,17 @@
                 'Error': 'off',
                 'Destroyed': 'off'
               }
+            },
+             
+            agentstate:{
+              label:'Agent State',
+              indicator:{
+               'Up':'on',
+               'Down':'off'
+              }
             }
+
+            
           },
           dataProvider: function(args) {
             var array1 = [];


Mime
View raw message