Merge remote-tracking branch 'remotes/origin/scale-UP'

This commit is contained in:
Pranav Saxena 2013-04-05 15:06:36 +05:30
commit ae4befb0b9
2 changed files with 45 additions and 2 deletions

View File

@ -11796,7 +11796,8 @@ div.ui-dialog div.autoscaler div.field-group div.form-container form div.form-it
background-position: -168px -31px;
}
.reset .icon {
.reset .icon ,
.scaleUp .icon{
background-position: -168px -31px;
}
@ -11805,7 +11806,8 @@ div.ui-dialog div.autoscaler div.field-group div.form-container form div.form-it
background-position: -168px -613px;
}
.reset:hover .icon {
.reset:hover .icon,
.scaleUp:hover .icon {
background-position: -168px -613px;
}

View File

@ -1080,6 +1080,44 @@
}
},
scaleUp:{
label:'scaleUp VM',
action: function(args) {
$.ajax({
url: createURL("scaleVirtualMachine&id=" + args.context.instances[0].id),
dataType: "json",
async: true,
success: function(json) {
var jid = json.scaleupvirtualmachineresponse.jobid;
args.response.success(
{_custom:
{jobId: jid,
getUpdatedItem: function(json) {
return json.queryasyncjobresultresponse.jobresult.virtualmachine;
},
getActionFilter: function() {
return vmActionfilter;
}
}
}
);
}
});
},
messages: {
confirm: function(args) {
return 'Do you really want to scale Up your instance ?';
},
notification: function(args) {
return 'Instance Scaled Up';
}
},
notification: {
poll: pollAsyncJobResult
}
},
viewConsole: {
label: 'label.view.console',
action: {
@ -1337,6 +1375,7 @@
allowedActions.push("destroy");
allowedActions.push("changeService");
allowedActions.push("reset");
allowedActions.push("scaleUp");
if (isAdmin())
allowedActions.push("migrate");
@ -1360,6 +1399,8 @@
allowedActions.push("destroy");
allowedActions.push("reset");
allowedActions.push("snapshot");
allowedActions.push("scaleUp");
if(isAdmin())
allowedActions.push("migrateToAnotherStorage");