]> git.proxmox.com Git - pmg-gui.git/blobdiff - js/SystemConfiguration.js
fix #5251: login: set autocomplete on password and user
[pmg-gui.git] / js / SystemConfiguration.js
index 741d54b9db75b021852ebc6df6dd1c610bdae53d..a2d1cef72c7c5f4a7dd7aac6a20f909f9e1c5b73 100644 (file)
@@ -1,42 +1,3 @@
-/*global Proxmox*/
-Ext.define('PMG.RestoreSystemConfiguration', {
-    extend: 'Ext.Panel',
-    xtype: 'pmgRestoreSystemConfiguration',
-
-    title: gettext('Restore'),
-
-    controller: {
-       xclass: 'Ext.app.ViewController',
-
-       onFactoryDefaults: function() {
-           var me = this.getView();
-
-           Ext.Msg.confirm(
-               gettext('Confirm'),
-               gettext('Reset rule database to factory defaults?'),
-               function(button) {
-                   if (button !== 'yes') return;
-                   var url = '/config/ruledb';
-                   Proxmox.Utils.API2Request({
-                       url: '/config/ruledb',
-                       method: 'POST',
-                       waitMsgTarget: me,
-                       failure: function (response, opts) {
-                           Ext.Msg.alert(gettext('Error'), response.htmlStatus);
-                       }
-                   });
-               }
-           );
-       }
-    },
-
-    tbar: [
-       {
-           text: gettext('Factory Defaults'),
-           handler: 'onFactoryDefaults'
-       }
-    ]
-});
 
 Ext.define('PMG.SystemConfiguration', {
     extend: 'Ext.tab.Panel',
@@ -50,53 +11,59 @@ Ext.define('PMG.SystemConfiguration', {
        {
            title: gettext('Network/Time'),
            itemId: 'network',
+           iconCls: 'fa fa-exchange',
            xtype: 'panel',
            layout: {
                type: 'vbox',
                align: 'stretch',
-               multi: true
+               multi: true,
            },
            bodyPadding: '0 0 10 0',
            defaults: {
                collapsible: true,
                animCollapse: false,
-               margin: '10 10 0 10'
+               margin: '10 10 0 10',
            },
            items: [
                {
-                   flex: 1,
-                   minHeight: 200,
-                   title: gettext('Interfaces'),
-                   xtype: 'proxmoxNodeNetworkView',
-                   nodename: Proxmox.NodeName
+                   title: gettext('Time'),
+                   xtype: 'proxmoxNodeTimeView',
+                   nodename: Proxmox.NodeName,
                },
                {
                    title: gettext('DNS'),
                    xtype: 'proxmoxNodeDNSView',
-                   nodename: Proxmox.NodeName
+                   nodename: Proxmox.NodeName,
                },
                {
-                   title: gettext('Time'),
-                   xtype: 'proxmoxNodeTimeView',
-                   nodename: Proxmox.NodeName
-               }
-           ]
-       },
-       {
-           itemId: 'backup',
-            title: gettext('Backup'),
-           html: "Backup"
-       },
-       {
-           itemId: 'restore',
-           xtype: 'pmgRestoreSystemConfiguration'
+                   flex: 1,
+                   minHeight: 200,
+                   title: gettext('Interfaces'),
+                   xtype: 'proxmoxNodeNetworkView',
+                   types: ['bond'],
+                   nodename: Proxmox.NodeName,
+                   showApplyBtn: true,
+               },
+           ],
        },
        {
+           xtype: 'pmgSystemOptions',
            itemId: 'options',
             title: gettext('Options'),
-           xtype: 'pmgSystemOptions'
-       }
-    ]
+           iconCls: 'fa fa-cogs',
+       },
+    ],
+
+    initComponent: function() {
+       var me = this;
+
+       me.callParent();
+
+       var networktime = me.getComponent('network');
+       Ext.Array.forEach(networktime.query(), function(item) {
+           item.relayEvents(networktime, ['activate', 'deactivate', 'destroy']);
+       });
+    },
 });