mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 11:52:28 +01:00
CLOUDSTACK-2615: Remove 'change service' from VM actions
Now that scaleVirtualMachine is being used to change compute offerings, the old 'change service' action can be removed, as it will be deprecated in the future.
This commit is contained in:
parent
59e65e8406
commit
05ff190314
@ -926,65 +926,6 @@
|
||||
}
|
||||
},
|
||||
|
||||
changeService: {
|
||||
label: 'label.action.change.service',
|
||||
messages: {
|
||||
notification: function(args) {
|
||||
return 'label.action.change.service';
|
||||
}
|
||||
},
|
||||
createForm: {
|
||||
title: 'label.action.change.service',
|
||||
desc: '',
|
||||
fields: {
|
||||
serviceOffering: {
|
||||
label: 'label.compute.offering',
|
||||
select: function(args) {
|
||||
$.ajax({
|
||||
url: createURL("listServiceOfferings&VirtualMachineId=" + args.context.instances[0].id),
|
||||
dataType: "json",
|
||||
async: true,
|
||||
success: function(json) {
|
||||
var serviceofferings = json.listserviceofferingsresponse.serviceoffering;
|
||||
var items = [];
|
||||
$(serviceofferings).each(function() {
|
||||
items.push({id: this.id, description: this.name});
|
||||
});
|
||||
args.response.success({data: items});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
preAction: function(args) {
|
||||
var jsonObj = args.context.instances[0];
|
||||
if (jsonObj.state != 'Stopped') {
|
||||
cloudStack.dialog.notice({ message: 'message.action.change.service.warning.for.instance' });
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
|
||||
action: function(args) {
|
||||
$.ajax({
|
||||
url: createURL("changeServiceForVirtualMachine&id=" + args.context.instances[0].id + "&serviceOfferingId=" + args.data.serviceOffering),
|
||||
dataType: "json",
|
||||
async: true,
|
||||
success: function(json) {
|
||||
var jsonObj = json.changeserviceforvirtualmachineresponse.virtualmachine;
|
||||
args.response.success({data: jsonObj});
|
||||
}
|
||||
});
|
||||
},
|
||||
notification: {
|
||||
poll: function(args) {
|
||||
args.complete();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
createTemplate: {
|
||||
label: 'label.create.template',
|
||||
messages: {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user