mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-07-26 04:31:08 +00:00
Close #1161: add hint when disabling a ha resource
Disabling a HA resource/service means that this ressource will always be turned off. However some users though this disabling HA management for this VM, see http://pve.proxmox.com/pipermail/pve-user/2016-October/011024.html so we had a hint after clicking on the 'disable' checkbox, that the checkbox is meant for shutdown
This commit is contained in:
parent
aeae272a86
commit
390b85553a
@ -1,7 +1,6 @@
|
|||||||
Ext.define('PVE.ha.VMResourceInputPanel', {
|
Ext.define('PVE.ha.VMResourceInputPanel', {
|
||||||
extend: 'PVE.panel.InputPanel',
|
extend: 'PVE.panel.InputPanel',
|
||||||
|
|
||||||
|
|
||||||
vmid: undefined,
|
vmid: undefined,
|
||||||
|
|
||||||
onGetValues: function(values) {
|
onGetValues: function(values) {
|
||||||
@ -33,6 +32,14 @@ Ext.define('PVE.ha.VMResourceInputPanel', {
|
|||||||
initComponent : function() {
|
initComponent : function() {
|
||||||
var me = this;
|
var me = this;
|
||||||
|
|
||||||
|
var disabledHint = Ext.createWidget({
|
||||||
|
xtype: 'displayfield', //submitValue is false, so we don't get submitted
|
||||||
|
userCls: 'pve-hint',
|
||||||
|
value: gettext('Disabling the resource will stop the guest system. ' +
|
||||||
|
'See the online help for details.'),
|
||||||
|
hidden: true
|
||||||
|
});
|
||||||
|
|
||||||
me.column1 = [
|
me.column1 = [
|
||||||
{
|
{
|
||||||
xtype: me.vmid ? 'displayfield' : 'pveVMIDSelector',
|
xtype: me.vmid ? 'displayfield' : 'pveVMIDSelector',
|
||||||
@ -56,8 +63,21 @@ Ext.define('PVE.ha.VMResourceInputPanel', {
|
|||||||
name: 'enable',
|
name: 'enable',
|
||||||
checked: true,
|
checked: true,
|
||||||
uncheckedValue: 0,
|
uncheckedValue: 0,
|
||||||
fieldLabel: gettext('enable')
|
fieldLabel: gettext('enable'),
|
||||||
}
|
listeners: {
|
||||||
|
'change': function(field, newValue) {
|
||||||
|
if (newValue === false) {
|
||||||
|
disabledHint.setVisible(true);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (disabledHint.isVisible()) {
|
||||||
|
disabledHint.setVisible(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
disabledHint
|
||||||
];
|
];
|
||||||
|
|
||||||
me.columnB = [
|
me.columnB = [
|
||||||
|
Loading…
Reference in New Issue
Block a user