Commit e8929d9b authored by Dietmar Maurer's avatar Dietmar Maurer

improve task descriptions

parent aeacfe40
...@@ -366,40 +366,34 @@ Ext.define('PVE.Utils', { statics: { ...@@ -366,40 +366,34 @@ Ext.define('PVE.Utils', { statics: {
} }
}, },
format_task_description: function(type, id) { task_desc_table: {
vncproxy: 'VNC connection to VM/CT {0}',
if (type == 'vncproxy') { vncshell: 'VNC shell',
return "VNC connection to VM/CT " + id; qmigrate: 'Migrate VM {0}',
} qmstart: 'Start VM {0}',
qmstop: 'Stop VM {0}',
if (type == 'vncshell') { qmreset: 'Reset VM {0}',
return "VNC shell"; qmshutdown: 'Shutdown VM {0}',
} qmsuspend: 'Suspend VM {0}',
qmresume: 'Resume VM {0}',
if (type == 'qmigrate') { vzcreate: 'Create CT {0}',
return "Migrate VM " + id; vzdestroy: 'Destroy CT {0}',
} vzstart: 'Start CT {0}',
vzstop: 'Stop CT {0}',
if (type == 'vzcreate') { srvstart: 'Start service {0}',
return "Create CT " + id; srvstop: 'Stop service {0}',
} srvrestart: 'Restart service {0}',
srvreload: 'Reload service {0}'
if (type == 'vzdestroy') { },
return "Destroy CT " + id;
}
if (type == 'vzstart') {
return "Start CT " + id;
}
if (type == 'vzstop') { format_task_description: function(type, id) {
return "Stop CT " + id; var format = PVE.Utils.task_desc_table[type];
if (format) {
return Ext.String.format(format, id);
} }
return type; return type;
}, },
parse_task_upid: function(upid) { parse_task_upid: function(upid) {
var task = {}; var task = {};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment