You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by pr...@apache.org on 2013/07/03 14:16:46 UTC
git commit: updated refs/heads/4.2 to 5f32725
Updated Branches:
refs/heads/4.2 0c7cfc266 -> 5f32725df
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/5f32725d
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/5f32725d
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/5f32725d
Branch: refs/heads/4.2
Commit: 5f32725dfad9478b4cd2da178dd680f7cc54c584
Parents: 0c7cfc2
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:24:59 2013 +0530
----------------------------------------------------------------------
ui/scripts/system.js | 37 +++++++++++++++++++++++++++++++++++--
1 file changed, 35 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5f32725d/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index 75a8e28..189eb56 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -6938,7 +6938,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));
@@ -7601,7 +7624,7 @@
},
zonename: { label: 'label.zone' },
state: {
- label: 'label.status',
+ label: 'VM state',
converter: function(str) {
// For localization
return str;
@@ -7612,7 +7635,17 @@
'Error': 'off',
'Destroyed': 'off'
}
+ },
+
+ agentstate:{
+ label:'Agent State',
+ indicator:{
+ 'Up':'on',
+ 'Down':'off'
+ }
}
+
+
},
dataProvider: function(args) {
var array1 = [];