diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js index 1d62e4cbd20..7541845bbb9 100644 --- a/ui/scripts/instances.js +++ b/ui/scripts/instances.js @@ -1328,23 +1328,7 @@ notification: { poll: pollAsyncJobResult } - }, - - viewConsole: { - label: 'View VM console', - action: { - externalLink: { - url: function(args) { - return clientConsoleUrl + '?cmd=access&vm=' + args.context.instances[0].id; - }, - title: function(args) { - return getVmName(args.context.instances[0].name, args.context.instances[0].displayname) + ' console'; - }, - width: 820, - height: 640 - } - } - }, + }, migrate: { label: 'Migrate instance', @@ -1428,7 +1412,23 @@ notification: { poll: pollAsyncJobResult } - } + }, + + viewConsole: { + label: 'View console', + action: { + externalLink: { + url: function(args) { + return clientConsoleUrl + '?cmd=access&vm=' + args.context.instances[0].id; + }, + title: function(args) { + return getVmName(args.context.instances[0].name, args.context.instances[0].displayname) + ' console'; + }, + width: 820, + height: 640 + } + } + } }, tabs: { // Details tab diff --git a/ui/scripts/system.js b/ui/scripts/system.js index 80b3b5468c5..6abf62e79c3 100644 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -3880,7 +3880,23 @@ notification: { poll: pollAsyncJobResult } - } + }, + + viewConsole: { + label: 'View console', + action: { + externalLink: { + url: function(args) { + return clientConsoleUrl + '?cmd=access&vm=' + args.context.systemvms[0].id; + }, + title: function(args) { + return args.context.systemvms[0].systemvmtype + ' console'; + }, + width: 820, + height: 640 + } + } + } }, tabs: { details: { @@ -8052,6 +8068,7 @@ allowedActions.push("stop"); allowedActions.push("restart"); allowedActions.push("changeService"); + allowedActions.push("viewConsole"); if (isAdmin()) allowedActions.push("migrate"); } @@ -8070,6 +8087,7 @@ allowedActions.push("stop"); allowedActions.push("restart"); allowedActions.push("delete"); //destroy + allowedActions.push("viewConsole"); if (isAdmin()) allowedActions.push("migrate"); }