You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ah...@apache.org on 2013/07/04 00:26:13 UTC
[34/50] [abbrv] git commit: updated refs/heads/vmsync to 78fa5e1
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/5396dfa5
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/5396dfa5
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/5396dfa5
Branch: refs/heads/vmsync
Commit: 5396dfa55c343a146667b7148a66864ef6093cc2
Parents: e63ac55
Author: Pranav Saxena <ps...@gmail.com>
Authored: Wed Jul 3 17:22:35 2013 +0530
Committer: Pranav Saxena <ps...@gmail.com>
Committed: Wed Jul 3 17:22:35 2013 +0530
----------------------------------------------------------------------
ui/scripts/system.js | 37 +++++++++++++++++++++++++++++++++++--
1 file changed, 35 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5396dfa5/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index 496f585..e00cb76 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -7026,7 +7026,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));
@@ -7689,7 +7712,7 @@
},
zonename: { label: 'label.zone' },
state: {
- label: 'label.status',
+ label: 'VM state',
converter: function(str) {
// For localization
return str;
@@ -7700,7 +7723,17 @@
'Error': 'off',
'Destroyed': 'off'
}
+ },
+
+ agentstate:{
+ label:'Agent State',
+ indicator:{
+ 'Up':'on',
+ 'Down':'off'
+ }
}
+
+
},
dataProvider: function(args) {
var array1 = [];