mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
cloudstack 3.0 UI - autoscale -fix a bug that action bar was not refreshed after action was complete.
This commit is contained in:
parent
f348fcfb0e
commit
08a73d1134
@ -86,11 +86,19 @@
|
||||
if(args.context.originalAutoscaleData == null) { //new LB rule
|
||||
//no actions for new LB rule
|
||||
}
|
||||
else { //existing LB rule
|
||||
if(args.context.originalAutoscaleData[0].context.autoscaleVmGroup.state == 'disabled')
|
||||
allowedActions.push('enable');
|
||||
else if(args.context.originalAutoscaleData[0].context.autoscaleVmGroup.state == 'enabled')
|
||||
allowedActions.push('disable');
|
||||
else { //existing LB rule
|
||||
if(args.context.originalAutoscaleData[0].afterActionIsComplete == null) {
|
||||
if(args.context.originalAutoscaleData[0].context.autoscaleVmGroup.state == 'disabled')
|
||||
allowedActions.push('enable');
|
||||
else if(args.context.originalAutoscaleData[0].context.autoscaleVmGroup.state == 'enabled')
|
||||
allowedActions.push('disable');
|
||||
}
|
||||
else {
|
||||
if(args.context.originalAutoscaleData[0].afterActionIsComplete.state == 'disabled')
|
||||
allowedActions.push('enable');
|
||||
else if(args.context.originalAutoscaleData[0].afterActionIsComplete.state == 'enabled')
|
||||
allowedActions.push('disable');
|
||||
}
|
||||
}
|
||||
return allowedActions;
|
||||
},
|
||||
|
||||
@ -101,8 +101,13 @@
|
||||
});
|
||||
|
||||
// Reload actions
|
||||
if(data != null) { //data is originalAutoscaleData in \ui\scripts\autoscaler.js
|
||||
data['afterActionIsComplete'] = args.data;
|
||||
}
|
||||
|
||||
var $newActions = renderActions({
|
||||
data: data ? $.extend(data, args.data) : args.data,
|
||||
data: data ? data: args.data,
|
||||
actionFilter: args.actionFilter,
|
||||
context: context
|
||||
});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user