mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-08 10:32:50 +00:00
add a warning message if the EFI disk is missing fix #1112
do not display an obstrusive popup on top of a modal window, but display a hint under the combo box
This commit is contained in:
parent
2c0e2890e0
commit
d6dfc45b8e
@ -1,22 +1,57 @@
|
|||||||
Ext.define('PVE.qemu.BiosEdit', {
|
Ext.define('PVE.qemu.BiosEdit', {
|
||||||
extend: 'PVE.window.Edit',
|
extend: 'PVE.window.Edit',
|
||||||
|
alias: 'widget.pveQemuBiosEdit',
|
||||||
|
|
||||||
initComponent : function() {
|
initComponent : function() {
|
||||||
var me = this;
|
var me = this;
|
||||||
|
|
||||||
|
var EFIHint = Ext.createWidget({
|
||||||
|
xtype: 'displayfield', //submitValue is false, so we don't get submitted
|
||||||
|
fieldStyle: 'background-color: LightYellow;',
|
||||||
|
value: gettext('You need to add an EFI disk for storing the ' +
|
||||||
|
'EFI settings. See the online help for details.'),
|
||||||
|
hidden: true,
|
||||||
|
});
|
||||||
|
|
||||||
Ext.applyIf(me, {
|
Ext.applyIf(me, {
|
||||||
subject: 'BIOS',
|
subject: 'BIOS',
|
||||||
items: {
|
items: [ {
|
||||||
xtype: 'pveQemuBiosSelector',
|
xtype: 'pveQemuBiosSelector',
|
||||||
onlineHelp: 'chapter-qm.html#_bios_and_uefi',
|
onlineHelp: 'chapter-qm.html#_bios_and_uefi',
|
||||||
name: 'bios',
|
name: 'bios',
|
||||||
value: '__default__',
|
value: '__default__',
|
||||||
fieldLabel: 'BIOS'
|
fieldLabel: 'BIOS',
|
||||||
|
listeners: {
|
||||||
|
'change' : function(field, newValue) {
|
||||||
|
if (newValue == 'ovmf') {
|
||||||
|
PVE.Utils.API2Request({
|
||||||
|
url : me.url,
|
||||||
|
method : 'GET',
|
||||||
|
failure : function(response, opts) {
|
||||||
|
Ext.Msg.alert(gettext('Error'), response.htmlStatus);
|
||||||
|
},
|
||||||
|
success : function(response, opts) {
|
||||||
|
var vmConfig = response.result.data;
|
||||||
|
// there can be only one
|
||||||
|
if (!vmConfig.efidisk0) {
|
||||||
|
EFIHint.setVisible(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
if (EFIHint.isVisible()) {
|
||||||
|
EFIHint.setVisible(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
EFIHint
|
||||||
|
] });
|
||||||
|
|
||||||
me.callParent();
|
me.callParent();
|
||||||
|
|
||||||
me.load();
|
me.load();
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user