You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by gi...@git.apache.org on 2017/05/16 05:31:33 UTC
[GitHub] karuturi commented on a change in pull request #1848: CLOUDSTACK-9693 Cluster View - Status symbol does not change based on Cluster state
karuturi commented on a change in pull request #1848: CLOUDSTACK-9693 Cluster View - Status symbol does not change based on Cluster state
URL: https://github.com/apache/cloudstack/pull/1848#discussion_r116657626
##########
File path: ui/scripts/system.js
##########
@@ -9099,8 +9102,25 @@
url: createURL('listClusters'),
data: data,
success: function (json) {
+ var clustersDetail = json.listclustersresponse.cluster;
+ if(clustersDetail instanceof Array){
+ for(var idx=0;idx< clustersDetail.length;idx++){
+ if (clustersDetail[idx].managedstate == 'Unmanaged') {
+ clustersDetail[idx].allocationstate = 'Unmanaged';
+ continue;
+ }
+ if (clustersDetail[idx].managedstate == 'Managed' && clustersDetail[idx].allocationstate == 'Enabled') {
+ clustersDetail[idx].allocationstate = 'Enabled';
+ continue;
+ }
+ if (clustersDetail[idx].managedstate == 'Managed' && clustersDetail[idx].allocationstate == 'Disabled') {
+ clustersDetail[idx].allocationstate = 'Disabled';
Review comment:
Her we are checking if `clustersDetail[idx].allocationstate == 'Disabled'` and assigning the same value. Is it required?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services