mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
Signed-off-by: Frederick Ernesto Borges Noronha <fborges@opennebula.io>
This commit is contained in:
parent
6a65b9bff0
commit
b4a78b27ba
@ -124,7 +124,20 @@ define(function(require) {
|
||||
error_msg: this.element.USER_TEMPLATE.ERROR,
|
||||
error_title: Locale.tr("Driver Error"),
|
||||
canDismiss: true,
|
||||
dismisId: "close_vm_async_error"
|
||||
dismissId: "close_vm_async_error"
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
if (this.element &&
|
||||
this.element.USER_TEMPLATE &&
|
||||
this.element.USER_TEMPLATE.SCHED_MESSAGE){
|
||||
errorMessageHTML += TemplateInfoError(
|
||||
{
|
||||
error_msg: this.element.USER_TEMPLATE.SCHED_MESSAGE,
|
||||
error_title: Locale.tr("Scheduler Error"),
|
||||
canDismiss: true,
|
||||
dismissId: "close_vm_scheduler_async_error"
|
||||
}
|
||||
);
|
||||
}
|
||||
@ -142,7 +155,7 @@ define(function(require) {
|
||||
error_msg: lastErrorAndId.error,
|
||||
error_title: Locale.tr("Scheduled Action Error") + " (ID: #" + lastErrorAndId.id + ")",
|
||||
canDismiss: false,
|
||||
dismisId: ""
|
||||
dismissId: ""
|
||||
}
|
||||
);
|
||||
}
|
||||
@ -219,6 +232,16 @@ define(function(require) {
|
||||
Sunstone.runAction(RESOURCE + ".update_template", resourceId, template_str);
|
||||
});
|
||||
|
||||
context.off("click", "#close_vm_scheduler_async_error");
|
||||
context.on("click", "#close_vm_scheduler_async_error", function() {
|
||||
var resourceId = that.element.ID;
|
||||
var templateJSON = $.extend({}, that.element.USER_TEMPLATE);
|
||||
delete templateJSON.SCHED_MESSAGE;
|
||||
template_str = TemplateUtils.templateToString(templateJSON);
|
||||
|
||||
Sunstone.runAction(RESOURCE + ".update_template", resourceId, template_str);
|
||||
});
|
||||
|
||||
if (OpenNebula.VM.isvCenterVM(this.element)) {
|
||||
$("button[href=\"VM.upload_marketplace_dialog\"]").attr("disabled","disabled");
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user