[pve-devel] [PATCH v2 manager 2/2] add lxc restart warning to bulk migration screen
Oguz Bektas
o.bektas at proxmox.com
Mon Feb 18 13:30:04 CET 2019
only show warning when running lxc is chosen
Signed-off-by: Oguz Bektas <o.bektas at proxmox.com>
Co-Authored by: Dominik Csapak <d.csapak at proxmox.com>
---
www/manager6/window/BulkAction.js | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/www/manager6/window/BulkAction.js b/www/manager6/window/BulkAction.js
index 2ec9b9c9..5dc7d119 100644
--- a/www/manager6/window/BulkAction.js
+++ b/www/manager6/window/BulkAction.js
@@ -80,6 +80,13 @@ Ext.define('PVE.window.BulkAction', {
value: 1,
fieldLabel: gettext('Parallel jobs'),
allowBlank: false
+ },
+ {
+ itemId: 'lxcwarning',
+ xtype: 'displayfield',
+ userCls: 'pve-hint',
+ value: 'Warning: Running CTs will be migrated in Restart Mode.',
+ hidden: true // only visible if running container chosen
}
);
} else if (me.action === 'startall') {
@@ -99,7 +106,16 @@ Ext.define('PVE.window.BulkAction', {
selectAll: true,
allowBlank: false,
nodename: me.nodename,
- action: me.action
+ action: me.action,
+ listeners: {
+ selectionchange: function(vmselector, records) {
+ let showWarning = records.some(function(item) {
+ return (item.data.type == 'lxc' &&
+ item.data.status == 'running');
+ });
+ me.down('#lxcwarning').setVisible(showWarning);
+ }
+ }
});
me.formPanel = Ext.create('Ext.form.Panel', {
--
2.11.0
More information about the pve-devel
mailing list