]> git.proxmox.com Git - pmg-gui.git/blame - js/SystemConfiguration.js
add minigraph component
[pmg-gui.git] / js / SystemConfiguration.js
CommitLineData
ec922854
DM
1Ext.define('PMG.RestoreSystemConfiguration', {
2 extend: 'Ext.Panel',
3 xtype: 'pmgRestoreSystemConfiguration',
4
5 title: gettext('Restore'),
6
7 controller: {
8 xclass: 'Ext.app.ViewController',
9
10 onFactoryDefaults: function() {
11 var me = this.getView();
12
13 Ext.Msg.confirm(
14 gettext('Confirm'),
15 gettext('Reset rule database to factory defaults?'),
16 function(button) {
17 if (button !== 'yes') return;
18 var url = '/config/ruledb';
19 Proxmox.Utils.API2Request({
20 url: '/config/ruledb',
21 method: 'POST',
22 waitMsgTarget: me,
23 failure: function (response, opts) {
24 Ext.Msg.alert(gettext('Error'), response.htmlStatus);
25 }
26 });
27 }
28 );
29 }
30 },
31
32 tbar: [
33 {
34 text: gettext('Factory Defaults'),
35 handler: 'onFactoryDefaults'
36 }
37 ]
38});
39
e119071c
DM
40Ext.define('PMG.SystemConfiguration', {
41 extend: 'Ext.tab.Panel',
bca16cae 42 xtype: 'pmgSystemConfiguration',
e119071c 43
d9e1af94 44 title: gettext('Configuration') + ': ' + gettext('System'),
830e5827 45 border: false,
1a51a8dc 46 scrollable: true,
830e5827 47 defaults: { border: false },
e119071c
DM
48 items: [
49 {
1a51a8dc
DC
50 title: gettext('Network/Time'),
51 itemId: 'network',
52 xtype: 'panel',
53 layout: {
54 type: 'vbox',
55 align: 'stretch',
56 multi: true,
57 },
58 bodyPadding: '0 0 10 0',
59 defaults: {
60 collapsible: true,
61 animCollapse: false,
62 margin: '10 10 0 10'
63 },
64 items: [
65 {
66 flex: 1,
3960dd97 67 minHeight: 200,
1a51a8dc
DC
68 title: gettext('Interfaces'),
69 xtype: 'proxmoxNodeNetworkView',
70 nodename: Proxmox.NodeName,
71 },
72 {
1a51a8dc
DC
73 title: gettext('DNS'),
74 xtype: 'proxmoxNodeDNSView',
75 nodename: Proxmox.NodeName
76 },
77 {
1a51a8dc
DC
78 title: gettext('Time'),
79 xtype: 'proxmoxNodeTimeView',
80 nodename: Proxmox.NodeName
81 },
82 ]
e119071c
DM
83 },
84 {
a4504500 85 itemId: 'backup',
e119071c 86 title: gettext('Backup'),
1a51a8dc 87 html: "Backup"
e119071c
DM
88 },
89 {
a4504500 90 itemId: 'restore',
ec922854 91 xtype: 'pmgRestoreSystemConfiguration'
e119071c
DM
92 },
93 {
fc7de588
DM
94 itemId: 'options',
95 title: gettext('Options'),
96 xtype: 'pmgSystemOptions',
e119071c
DM
97 }
98 ]
99});
100
101