mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-06-14 14:40:24 +00:00

Add the subentry "Options" in the "System" menu to expose some options in the GUI which were not exposed before. Added a new file for displaying and editing the node config options which were not exposed through the GUI yet. Namely those are the settings for wakeonlan and startall-on-boot-delay. Edited the Makefile to include the newly created file. Signed-off-by: Daniel Tschlatscher <d.tschlatscher@proxmox.com>
68 lines
1.5 KiB
JavaScript
68 lines
1.5 KiB
JavaScript
Ext.define('Proxmox.node.NodeOptionsView', {
|
|
extend: 'Proxmox.grid.ObjectGrid',
|
|
alias: ['widget.proxmoxNodeOptionsView'],
|
|
mixins: ['Proxmox.Mixin.CBind'],
|
|
|
|
cbindData: function(_initialconfig) {
|
|
let me = this;
|
|
|
|
let baseUrl = `/nodes/${me.nodename}/config`;
|
|
me.url = `/api2/json${baseUrl}`;
|
|
me.editorConfig = {
|
|
url: `/api2/extjs/${baseUrl}`,
|
|
};
|
|
|
|
return {};
|
|
},
|
|
|
|
listeners: {
|
|
itemdblclick: function() { this.run_editor(); },
|
|
activate: function() { this.rstore.startUpdate(); },
|
|
destroy: function() { this.rstore.stopUpdate(); },
|
|
deactivate: function() { this.rstore.stopUpdate(); },
|
|
},
|
|
|
|
tbar: [
|
|
{
|
|
text: gettext('Edit'),
|
|
xtype: 'proxmoxButton',
|
|
disabled: true,
|
|
handler: btn => btn.up('grid').run_editor(),
|
|
},
|
|
],
|
|
|
|
gridRows: [
|
|
{
|
|
xtype: 'integer',
|
|
name: 'startall-onboot-delay',
|
|
text: gettext('Start on boot delay'),
|
|
minValue: 0,
|
|
maxValue: 300,
|
|
labelWidth: 130,
|
|
deleteEmpty: true,
|
|
renderer: function(value) {
|
|
if (value === undefined) {
|
|
return Proxmox.Utils.defaultText;
|
|
}
|
|
|
|
let secString = value === '1' ? gettext('Second') : gettext('Seconds');
|
|
return `${value} ${secString}`;
|
|
},
|
|
},
|
|
{
|
|
xtype: 'text',
|
|
name: 'wakeonlan',
|
|
text: gettext('Wake on LAN'),
|
|
vtype: 'MacAddress',
|
|
deleteEmpty: true,
|
|
renderer: function(value) {
|
|
if (value === undefined) {
|
|
return Proxmox.Utils.NoneText;
|
|
}
|
|
|
|
return value;
|
|
},
|
|
},
|
|
],
|
|
});
|