]> git.proxmox.com Git - pmg-gui.git/blob - js/SystemConfiguration.js
normalize the dashboard graph to per minute
[pmg-gui.git] / js / SystemConfiguration.js
1 Ext.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
40 Ext.define('PMG.SystemConfiguration', {
41 extend: 'Ext.tab.Panel',
42 xtype: 'pmgSystemConfiguration',
43
44 title: gettext('Configuration') + ': ' + gettext('System'),
45 border: false,
46 scrollable: true,
47 defaults: { border: false },
48 items: [
49 {
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,
67 minHeight: 200,
68 title: gettext('Interfaces'),
69 xtype: 'proxmoxNodeNetworkView',
70 nodename: Proxmox.NodeName,
71 },
72 {
73 title: gettext('DNS'),
74 xtype: 'proxmoxNodeDNSView',
75 nodename: Proxmox.NodeName
76 },
77 {
78 title: gettext('Time'),
79 xtype: 'proxmoxNodeTimeView',
80 nodename: Proxmox.NodeName
81 },
82 ]
83 },
84 {
85 itemId: 'backup',
86 title: gettext('Backup'),
87 html: "Backup"
88 },
89 {
90 itemId: 'restore',
91 xtype: 'pmgRestoreSystemConfiguration'
92 },
93 {
94 itemId: 'options',
95 title: gettext('Options'),
96 xtype: 'pmgSystemOptions',
97 }
98 ]
99 });
100
101