1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

M #~: fix document id (#4536)

Signed-off-by: Jorge Lobo <jlobo@opennebula.systems>
This commit is contained in:
Jorge Lobo 2020-04-16 10:45:31 +02:00 committed by GitHub
parent 86eccdb1ae
commit fcc6018667
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -352,8 +352,9 @@ define(function(require) {
:
resource.toLowerCase()+"/"+id+"/action",
type: "POST",
dataType: "text",
contentType: "application/json; charset=utf-8",
data: JSON.stringify({action: action}),
data: JSON.stringify({"action": action}),
success: function(response) {
_clearCache(cacheName);
return callback ? callback(response) : null;

View File

@ -46,7 +46,7 @@ define(function(require) {
function Panel(info) {
this.icon = "fa-calendar-alt";
this.title = Locale.tr("Actions");
this.id = (info && info.ID) || 0;
this.id = (info && info.DOCUMENT && info.DOCUMENT.ID) || "0";
this.data = (info && info.DOCUMENT && info.DOCUMENT.TEMPLATE && info.DOCUMENT.TEMPLATE.BODY && info.DOCUMENT.TEMPLATE.BODY.roles) || [];
this.actions = [
"terminate",