[pve-devel] [PATCH manager v2 2/2] mark node shutdown/reboot buttons as dangerous

Thomas Lamprecht t.lamprecht at proxmox.com
Tue Jun 6 15:40:37 CEST 2017


this has the effect that a warning triangle instead of an "?" symbol
is displayed and that the default focus is on "No"

Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
 www/manager6/node/Config.js | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/www/manager6/node/Config.js b/www/manager6/node/Config.js
index 779b3e9c..8ee9d3b1 100644
--- a/www/manager6/node/Config.js
+++ b/www/manager6/node/Config.js
@@ -83,6 +83,7 @@ Ext.define('PVE.node.Config', {
 	var restartBtn = Ext.create('PVE.button.Button', {
 	    text: gettext('Restart'),
 	    disabled: !caps.nodes['Sys.PowerMgmt'],
+	    dangerous: true,
 	    confirmMsg: gettext('Node') + " '" + nodename + "' - " + gettext('Restart'),
 	    handler: function() {
 		node_command('reboot');
@@ -93,6 +94,7 @@ Ext.define('PVE.node.Config', {
 	var shutdownBtn = Ext.create('PVE.button.Button', {
 	    text: gettext('Shutdown'),
 	    disabled: !caps.nodes['Sys.PowerMgmt'],
+	    dangerous: true,
 	    confirmMsg: gettext('Node') + " '" + nodename + "' - " + gettext('Shutdown'),
 	    handler: function() {
 		node_command('shutdown');
-- 
2.11.0





More information about the pve-devel mailing list