qmsuspend: [ 'VM', gettext('Suspend') ],
qmresume: [ 'VM', gettext('Resume') ],
qmconfig: [ 'VM', gettext('Configure') ],
+ vzsnapshot: [ 'CT', gettext('Snapshot') ],
+ vzrollback: [ 'CT', gettext('Rollback') ],
+ vzdelsnapshot: [ 'CT', gettext('Delete Snapshot') ],
vzcreate: ['CT', gettext('Create') ],
vzrestore: ['CT', gettext('Restore') ],
vzdestroy: ['CT', gettext('Destroy') ],
},
{
text: gettext('Shutdown'),
- handler: function() {
- var msg = Ext.String.format(gettext("Do you really want to shutdown VM {0}?"), me.vmid);
+ handler: function() {
+ var msg = PVE.Utils.format_task_description('qmshutdown', me.vmid);
Ext.Msg.confirm(gettext('Confirm'), msg, function(btn) {
if (btn !== 'yes') {
return;
{
text: gettext('Stop'),
handler: function() {
- var msg = Ext.String.format(gettext("Do you really want to stop VM {0}?"), me.vmid);
+ var msg = PVE.Utils.format_task_description('qmstop', me.vmid);
Ext.Msg.confirm(gettext('Confirm'), msg, function(btn) {
if (btn !== 'yes') {
return;
{
text: gettext('Reset'),
handler: function() {
- var msg = Ext.String.format(gettext("Do you really want to reset VM {0}?"), me.vmid);
+ var msg = PVE.Utils.format_task_description('qmreset', me.vmid);
Ext.Msg.confirm(gettext('Confirm'), msg, function(btn) {
if (btn !== 'yes') {
return;
{
text: gettext('Suspend'),
handler: function() {
- var msg = Ext.String.format(gettext("Do you really want to suspend VM {0}?"), me.vmid);
+ var msg = PVE.Utils.format_task_description('qmsuspend', me.vmid);
Ext.Msg.confirm(gettext('Confirm'), msg, function(btn) {
if (btn !== 'yes') {
return;
{
text: gettext('Shutdown'),
handler: function() {
- var msg = Ext.String.format(gettext("Do you really want to shutdown VM {0}?"), me.vmid);
+ var msg = PVE.Utils.format_task_description('vzshutdown', me.vmid);
Ext.Msg.confirm(gettext('Confirm'), msg, function(btn) {
if (btn !== 'yes') {
return;
{
text: gettext('Stop'),
handler: function() {
- var msg = Ext.String.format(gettext("Do you really want to stop VM {0}?"), me.vmid);
+ var msg = PVE.Utils.format_task_description('vzstop', me.vmid);
Ext.Msg.confirm(gettext('Confirm'), msg, function(btn) {
if (btn !== 'yes') {
return;
confirmMsg: function(rec) {
var msg = Ext.String.format(gettext('Are you sure you want to remove entry {0}'),
"'" + rec.data.pool_name + "'");
- msg += " " + gettext('This will permanently erase all image data.');
+ msg += " " + gettext('This will permanently erase all data.');
return msg;
},
confirmMsg: function(rec) {
var msg = Ext.String.format(gettext('Are you sure you want to remove entry {0}'),
"'" + rec.data.volid + "'");
- msg += " " + gettext('This will permanently erase all image data.');
+ msg += " " + gettext('This will permanently erase all data.');
return msg;
},
text: gettext('Suspend'),
icon: '/pve2/images/forward.png',
handler: function() {
- var msg = Ext.String.format(gettext("Do you really want to suspend {0}?"), 'CT ' + vmid);
+ var msg = PVE.Utils.format_task_description('vzsuspend', vmid);
Ext.Msg.confirm(gettext('Confirm'), msg, function(btn) {
if (btn !== 'yes') {
return;
text: gettext('Shutdown'),
icon: '/pve2/images/stop.png',
handler: function() {
- var msg = Ext.String.format(gettext("Do you really want to shutdown {0}?"), 'CT ' + vmid);
+ var msg = PVE.Utils.format_task_description('vzshutdown', vmid);
Ext.Msg.confirm(gettext('Confirm'), msg, function(btn) {
if (btn !== 'yes') {
return;
text: gettext('Stop'),
icon: '/pve2/images/gtk-stop.png',
handler: function() {
- var msg = Ext.String.format(gettext("Do you really want to stop {0}?"), 'CT ' + vmid);
+ var msg = PVE.Utils.format_task_description('vzstop', vmid);
Ext.Msg.confirm(gettext('Confirm'), msg, function(btn) {
if (btn !== 'yes') {
return;
// text: gettext('Convert to template'),
// icon: '/pve2/images/forward.png',
// handler: function() {
-// var msg = Ext.String.format(gettext("Do you really want to convert {0} into a template?"), 'CT ' + vmid);
+// var msg = PVE.Utils.format_task_description('vztemplate', vmid);
// Ext.Msg.confirm(gettext('Confirm'), msg, function(btn) {
// if (btn !== 'yes') {
// return;
var stopBtn = Ext.create('PVE.button.Button', {
text: gettext('Stop'),
disabled: !caps.vms['VM.PowerMgmt'],
- confirmMsg: Ext.String.format(gettext("Do you really want to stop VM {0}?"), vmid),
+ confirmMsg: PVE.Utils.format_task_description('vzstop', vmid),
handler: function() {
vm_command("stop");
}
var shutdownBtn = Ext.create('PVE.button.Button', {
text: gettext('Shutdown'),
disabled: !caps.vms['VM.PowerMgmt'],
- confirmMsg: Ext.String.format(gettext("Do you really want to shutdown VM {0}?"), vmid),
+ confirmMsg: PVE.Utils.format_task_description('vzshutdown', vmid),
handler: function() {
vm_command('shutdown');
}
} : undefined
},
protection: {
- header: gettext('CT protection'),
+ header: gettext('Protection'),
defaultValue: false,
renderer: PVE.Utils.format_boolean,
editor: caps.vms['VM.Config.Options'] ? {
xtype: 'pveWindowEdit',
- subject: gettext('CT protection'),
+ subject: gettext('Protection'),
items: {
xtype: 'pvecheckbox',
name: 'protection',
var msg = Ext.String.format(gettext('Are you sure you want to remove entry {0}'),
"'" + me.renderKey(rec.data.key, {}, rec) + "'");
if (rec.data.key.match(/^unused\d+$/)) {
- msg += " " + gettext('This will permanently erase all image data.');
+ msg += " " + gettext('This will permanently erase all data.');
}
return msg;
selModel: sm,
enableFn: valid_snapshot_rollback,
confirmMsg: function(rec) {
- var msg = Ext.String.format(gettext('Are you sure you want to rollback to snapshot {0}'),
- "'" + rec.data.name + "'");
+ return PVE.Utils.format_task_description('vzrollback', me.vmid) +
+ " '" + rec.data.name + "'";
return msg;
},
handler: function(btn, event) {
menu: new Ext.menu.Menu({
items: [
{
- text: gettext('Start All VMs'),
+ text: gettext('Start all VMs and Containers'),
icon: '/pve2/images/start.png',
handler: function() {
- var msg = Ext.String.format(gettext("Do you really want to start all Vms on node {0}?"), nodename);
+ var msg = gettext('Start all VMs and Containers') + ' (' + gettext('Node') + " '" + nodename + "')";
Ext.Msg.confirm(gettext('Confirm'), msg, function(btn) {
if (btn !== 'yes') {
return;
}
},
{
- text: gettext('Stop All VMs'),
+ text: gettext('Stop all VMs and Containers'),
icon: '/pve2/images/gtk-stop.png',
handler: function() {
- var msg = Ext.String.format(gettext("Do you really want to stop all Vms on node {0}?"), nodename);
+ var msg = gettext('Stop all VMs and Containers') + ' (' + gettext('Node') + " '" + nodename + "')";
Ext.Msg.confirm(gettext('Confirm'), msg, function(btn) {
if (btn !== 'yes') {
return;
}
},
{
- text: gettext('Migrate All VMs'),
+ text: gettext('Migrate all VMs and Containers'),
icon: '/pve2/images/forward.png',
handler: function() {
var win = Ext.create('PVE.window.MigrateAll', {
var restartBtn = Ext.create('PVE.button.Button', {
text: gettext('Restart'),
disabled: !caps.nodes['Sys.PowerMgmt'],
- confirmMsg: Ext.String.format(gettext("Do you really want to restart node {0}?"), nodename),
+ confirmMsg: gettext('Node') + " '" + nodename + "' - " + gettext('Restart'),
handler: function() {
node_command('reboot');
}
var shutdownBtn = Ext.create('PVE.button.Button', {
text: gettext('Shutdown'),
disabled: !caps.nodes['Sys.PowerMgmt'],
- confirmMsg: Ext.String.format(gettext("Do you really want to shutdown node {0}?"), nodename),
+ confirmMsg: gettext('Node') + " '" + nodename + "' - " + gettext('Shutdown'),
handler: function() {
node_command('shutdown');
}
text: gettext('Suspend'),
icon: '/pve2/images/forward.png',
handler: function() {
- var msg = Ext.String.format(gettext("Do you really want to suspend {0}?"), 'VM ' + vmid);
+ var msg = PVE.Utils.format_task_description('qmsuspend', vmid);
Ext.Msg.confirm(gettext('Confirm'), msg, function(btn) {
if (btn !== 'yes') {
return;
text: gettext('Shutdown'),
icon: '/pve2/images/stop.png',
handler: function() {
- var msg = Ext.String.format(gettext("Do you really want to shutdown {0}?"), 'VM ' + vmid);
+ var msg = PVE.Utils.format_task_description('qmshutdown', vmid);
Ext.Msg.confirm(gettext('Confirm'), msg, function(btn) {
if (btn !== 'yes') {
return;
text: gettext('Stop'),
icon: '/pve2/images/gtk-stop.png',
handler: function() {
- var msg = Ext.String.format(gettext("Do you really want to stop {0}?"), 'VM ' + vmid);
+ var msg = PVE.Utils.format_task_description('qmstop', vmid);
Ext.Msg.confirm(gettext('Confirm'), msg, function(btn) {
if (btn !== 'yes') {
return;
text: gettext('Convert to template'),
icon: '/pve2/images/forward.png',
handler: function() {
- var msg = Ext.String.format(gettext("Do you really want to convert {0} into a template?"), 'VM ' + vmid);
+ var msg = PVE.Utils.format_task_description('qmtemplate', vmid);
Ext.Msg.confirm(gettext('Confirm'), msg, function(btn) {
if (btn !== 'yes') {
return;
var stopBtn = Ext.create('PVE.button.Button', {
text: gettext('Stop'),
disabled: !caps.vms['VM.PowerMgmt'],
- confirmMsg: Ext.String.format(gettext("Do you really want to stop VM {0}?"), vmid),
+ confirmMsg: PVE.Utils.format_task_description('qmstop', vmid),
handler: function() {
vm_command("stop", { timeout: 30 });
}
var resetBtn = Ext.create('PVE.button.Button', {
text: gettext('Reset'),
disabled: !caps.vms['VM.PowerMgmt'],
- confirmMsg: Ext.String.format(gettext("Do you really want to reset VM {0}?"), vmid),
+ confirmMsg: PVE.Utils.format_task_description('qmreset', vmid),
handler: function() {
vm_command("reset");
}
var shutdownBtn = Ext.create('PVE.button.Button', {
text: gettext('Shutdown'),
disabled: !caps.vms['VM.PowerMgmt'],
- confirmMsg: Ext.String.format(gettext("Do you really want to shutdown VM {0}?"), vmid),
+ confirmMsg: PVE.Utils.format_task_description('qmshutdown', vmid),
handler: function() {
vm_command('shutdown');
}
var msg = Ext.String.format(gettext('Are you sure you want to remove entry {0}'),
"'" + me.renderKey(rec.data.key, {}, rec) + "'");
if (rec.data.key.match(/^unused\d+$/)) {
- msg += " " + gettext('This will permanently erase all image data.');
+ msg += " " + gettext('This will permanently erase all data.');
}
return msg;
} : undefined
},
protection: {
- header: gettext('VM protection'),
+ header: gettext('Protection'),
defaultValue: false,
renderer: PVE.Utils.format_boolean,
editor: caps.vms['VM.Config.Options'] ? {
xtype: 'pveWindowEdit',
- subject: gettext('VM protection'),
+ subject: gettext('Protection'),
items: {
xtype: 'pvecheckbox',
name: 'protection',
selModel: sm,
enableFn: valid_snapshot_rollback,
confirmMsg: function(rec) {
- var msg = Ext.String.format(gettext('Are you sure you want to rollback to snapshot {0}'),
- "'" + rec.data.name + "'");
- return msg;
+ return PVE.Utils.format_task_description('qmrollback', me.vmid) +
+ " '" + rec.data.name + "'";
},
handler: function(btn, event) {
var rec = sm.getSelection()[0];
me.column1.push({
xtype: 'pveBaseVGSelector',
name: 'vgname',
- fieldLabel: gettext('Volume Group'),
+ fieldLabel: gettext('Volume group'),
listeners: {
change: function(f, value) {
if (me.create) {
};
var url;
+ var msg;
if (me.vmtype === 'lxc') {
url = '/nodes/' + me.nodename + '/lxc';
params.ostemplate = me.volid;
params.restore = 1;
+ msg = PVE.Utils.format_task_description('vzrestore', params.vmid);
} else if (me.vmtype === 'qemu') {
url = '/nodes/' + me.nodename + '/qemu';
params.archive = me.volid;
+ msg = PVE.Utils.format_task_description('qmrestore', params.vmid);
} else {
throw 'unknown VM type';
}
if (me.vmid) {
- var msg = gettext('Are you sure you want to restore this VM?') + ' ' +
- gettext('This will permanently erase current VM data.');
+ msg += '. ' + gettext('This will permanently erase current VM data.');
Ext.Msg.confirm(gettext('Confirm'), msg, function(btn) {
if (btn !== 'yes') {
return;
extend: 'Ext.window.Window',
alias: 'widget.pveSafeDestroy',
- title: gettext('Are you sure?'),
+ title: gettext('Confirm'),
modal: true,
buttonAlign: 'center',
bodyPadding: 10,
items: [
{
xtype: 'component',
- bind: gettext('Are you sure you want to remove {item.type} {item.id}? This will permanently erase all data.')
+ bind: gettext('Are you sure you want to remove {item.type} {item.id}?') + ' ' +
+ gettext('This will permanently erase all data.')
},
{
reference: 'confirmField',