]> git.proxmox.com Git - pmg-gui.git/commitdiff
SystemOptions.js - add http_proxy option
authorDietmar Maurer <dietmar@proxmox.com>
Fri, 22 Sep 2017 09:08:37 +0000 (11:08 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 22 Sep 2017 09:08:37 +0000 (11:08 +0200)
js/SystemOptions.js

index 1d6b09ff7c3e6d8f8c0dde79eed025fee3dffaf0..d308244f64b48bc62ad515af08219d2258bd8d7e 100644 (file)
@@ -31,6 +31,33 @@ Ext.define('PMG.SystemOptions', {
        itemdblclick: 'onEdit',
     },
 
+    add_proxy_row: function(name, text, opts) {
+       var me = this;
+
+       opts = opts || {};
+       me.rows = me.rows || {};
+
+       me.rows[name] = {
+           required: true,
+           defaultValue: Proxmox.Utils.noneText,
+           header: text,
+           editor: {
+               xtype: 'proxmoxWindowEdit',
+               subject: text,
+               items: {
+                   xtype: 'proxmoxtextfield',
+                   vtype: 'HttpProxy',
+                   name: name,
+                   deleteEmpty: true,
+                   emptyText: Proxmox.Utils.noneText,
+                   labelWidth: Proxmox.Utils.compute_min_label_width(
+                       text, opts.labelWidth),
+                   fieldLabel: text
+               }
+           }
+       };
+    },
+
     initComponent : function() {
        var me = this;
 
@@ -46,6 +73,8 @@ Ext.define('PMG.SystemOptions', {
        me.add_text_row('email', gettext("Administrator EMail"),
                        { deleteEmpty: true, defaultValue: Proxmox.Utils.noneText });
 
+       me.add_proxy_row('http_proxy', gettext("HTTP proxy"));
+
        me.callParent();
 
        me.on('activate', me.rstore.startUpdate);