9481cc26b4
While PVE and PMG use a rather brittle "replace whole config" style on their DNS entry CRUD API, the PBS one was made with a per-entry level granularity, so that single entries can modified, or deleted, without touching the others. But the UI from the widget-toolkit was made for the older PVE/PMG behavior and did not sent along the delete-array of to-be-deleted keys. Since widget-toolkit commit 8d161ac ("dns: update comment to avoid coupling to downstream dependency") the DNS edit window supports opting into that by setting the new `deleteEmpty` config parameter. Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> [ TL: expand commit message ] Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
98 lines
2.1 KiB
JavaScript
98 lines
2.1 KiB
JavaScript
Ext.define('PBS.SystemConfiguration', {
|
|
extend: 'Ext.tab.Panel',
|
|
xtype: 'pbsSystemConfiguration',
|
|
|
|
title: gettext('Configuration') + ': ' + gettext('System'),
|
|
border: true,
|
|
defaults: { border: false },
|
|
tools: [PBS.Utils.get_help_tool("sysadmin-network-configuration")],
|
|
items: [
|
|
{
|
|
xtype: 'panel',
|
|
title: gettext('Network/Time'),
|
|
itemId: 'network',
|
|
iconCls: 'fa fa-exchange',
|
|
layout: {
|
|
type: 'vbox',
|
|
align: 'stretch',
|
|
multi: true,
|
|
},
|
|
scrollable: true,
|
|
defaults: {
|
|
collapsible: true,
|
|
animCollapse: false,
|
|
margin: '7 10 3 10',
|
|
},
|
|
items: [
|
|
{
|
|
xtype: 'proxmoxNodeTimeView',
|
|
title: gettext('Time'),
|
|
nodename: 'localhost',
|
|
},
|
|
{
|
|
xtype: 'proxmoxNodeDNSView',
|
|
deleteEmpty: true,
|
|
title: gettext('DNS'),
|
|
nodename: 'localhost',
|
|
},
|
|
{
|
|
xtype: 'proxmoxNodeNetworkView',
|
|
title: gettext('Network Interfaces'),
|
|
flex: 1,
|
|
minHeight: 200,
|
|
showApplyBtn: true,
|
|
types: ['bond', 'bridge'],
|
|
nodename: 'localhost',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
title: gettext('Metric Server'),
|
|
iconCls: 'fa fa-bar-chart',
|
|
xtype: 'pbsMetricServerView',
|
|
itemId: 'metrics',
|
|
},
|
|
{
|
|
xtype: 'panel',
|
|
title: gettext('Other'),
|
|
itemId: 'other-options',
|
|
iconCls: 'fa fa-sliders',
|
|
layout: {
|
|
type: 'vbox',
|
|
align: 'stretch',
|
|
multi: true,
|
|
},
|
|
scrollable: true,
|
|
defaults: {
|
|
collapsible: true,
|
|
animCollapse: false,
|
|
margin: '7 10 3 10',
|
|
},
|
|
items: [
|
|
{
|
|
title: gettext('General'),
|
|
xtype: 'pbsNodeOptionView',
|
|
},
|
|
{
|
|
title: gettext('WebAuthn TFA'),
|
|
xtype: 'pbsWebauthnConfigView',
|
|
},
|
|
],
|
|
},
|
|
],
|
|
|
|
initComponent: function() {
|
|
let me = this;
|
|
|
|
me.callParent();
|
|
|
|
let networktime = me.getComponent('network');
|
|
networktime.query()?.forEach(el => el.relayEvents(networktime, ['activate', 'deactivate', 'destroy']));
|
|
|
|
let options = me.getComponent('other-options');
|
|
options.query()?.forEach(el => el.relayEvents(options, ['activate', 'deactivate', 'destroy']));
|
|
},
|
|
});
|
|
|
|
|