]> git.proxmox.com Git - proxmox-backup.git/blame - www/SystemConfiguration.js
ui: sys config: code cleanup/refactoring
[proxmox-backup.git] / www / SystemConfiguration.js
CommitLineData
b0ee976f
DM
1Ext.define('PBS.SystemConfiguration', {
2 extend: 'Ext.tab.Panel',
3 xtype: 'pbsSystemConfiguration',
4
5 title: gettext('Configuration') + ': ' + gettext('System'),
63bd6a9f 6 border: true,
b0ee976f
DM
7 scrollable: true,
8 defaults: { border: false },
f4f9a503 9 tools: [PBS.Utils.get_help_tool("sysadmin-network-configuration")],
b0ee976f
DM
10 items: [
11 {
b0ee976f 12 xtype: 'panel',
5dfe3b66
TL
13 title: gettext(' Network/Time'),
14 itemId: 'network',
b0ee976f
DM
15 layout: {
16 type: 'vbox',
17 align: 'stretch',
6ab77df3 18 multi: true,
b0ee976f 19 },
b0ee976f
DM
20 defaults: {
21 collapsible: true,
22 animCollapse: false,
6ab77df3 23 margin: '10 10 0 10',
b0ee976f
DM
24 },
25 items: [
26 {
7cebe5a1 27 xtype: 'proxmoxNodeTimeView',
5dfe3b66 28 title: gettext('Time'),
6ab77df3 29 nodename: 'localhost',
b0ee976f
DM
30 },
31 {
b0ee976f 32 xtype: 'proxmoxNodeDNSView',
5dfe3b66 33 title: gettext('DNS'),
6ab77df3 34 nodename: 'localhost',
b0ee976f
DM
35 },
36 {
5dfe3b66
TL
37 xtype: 'proxmoxNodeNetworkView',
38 title: gettext('Network Interfaces'),
7cebe5a1
TL
39 flex: 1,
40 minHeight: 200,
7cebe5a1 41 showApplyBtn: true,
0c80f4fa 42 types: ['bond', 'bridge'],
6ab77df3 43 nodename: 'localhost',
7cebe5a1 44 },
6ab77df3
TL
45 ],
46 },
3fffcb5d 47 {
c772a4a6 48 xtype: 'panel',
50c08401
TL
49 title: gettext('Other'),
50 itemId: 'other-options',
c772a4a6
HL
51 layout: {
52 type: 'vbox',
53 align: 'stretch',
54 multi: true,
55 },
56 defaults: {
57 collapsible: true,
58 animCollapse: false,
59 margin: '10 10 0 10',
60 },
61 items: [
2a9a3d63 62 {
c772a4a6 63 title: gettext('General'),
2a9a3d63
TL
64 xtype: 'pbsNodeOptionView',
65 },
50c08401
TL
66 {
67 title: gettext('WebAuthn TFA'),
68 xtype: 'pbsWebauthnConfigView',
69 },
3fffcb5d
WB
70 ],
71 },
b0ee976f
DM
72 ],
73
74 initComponent: function() {
6ab77df3 75 let me = this;
b0ee976f
DM
76
77 me.callParent();
78
6ab77df3 79 let networktime = me.getComponent('network');
5dfe3b66 80 networktime.query()?.forEach(el => el.relayEvents(networktime, ['activate', 'deactivate', 'destroy']));
3fffcb5d 81
50c08401 82 let options = me.getComponent('other-options');
5dfe3b66 83 options.query()?.forEach(el => el.relayEvents(options, ['activate', 'deactivate', 'destroy']));
6ab77df3 84 },
b0ee976f
DM
85});
86
87