]> git.proxmox.com Git - pve-manager.git/blobdiff - www/manager6/form/IPRefSelector.js
ui: backup job: avoid row wrapping due to overly long label
[pve-manager.git] / www / manager6 / form / IPRefSelector.js
index bb7cb5b8b9ff58710a08126eae6bb9a19917a0eb..1c3bb649d8a24e75744a605c956be96e5aa1aaa7 100644 (file)
@@ -10,6 +10,7 @@ Ext.define('PVE.form.IPRefSelector', {
 
     valueField: 'ref',
     displayField: 'ref',
+    notFoundIsValid: true,
 
     initComponent: function() {
        var me = this;
@@ -25,22 +26,22 @@ Ext.define('PVE.form.IPRefSelector', {
 
        var store = Ext.create('Ext.data.Store', {
            autoLoad: true,
-           fields: [ 'type', 'name', 'ref', 'comment' ],
+           fields: ['type', 'name', 'ref', 'comment'],
            idProperty: 'ref',
            proxy: {
-               type: 'pve',
-               url: url
+               type: 'proxmox',
+               url: url,
            },
            sorters: {
                property: 'ref',
-               order: 'DESC'
-           }
+               order: 'DESC',
+           },
        });
 
        var disable_query_for_ips = function(f, value) {
-           if (value === null || 
+           if (value === null ||
                value.match(/^\d/)) { // IP address starts with \d
-               f.queryDelay = 9999999999; // hack: disbale with long delay
+               f.queryDelay = 9999999999; // hack: disable with long delay
            } else {
                f.queryDelay = 10;
            }
@@ -53,7 +54,7 @@ Ext.define('PVE.form.IPRefSelector', {
                header: gettext('Type'),
                dataIndex: 'type',
                hideable: false,
-               width: 60
+               width: 60,
            });
        }
 
@@ -62,24 +63,24 @@ Ext.define('PVE.form.IPRefSelector', {
                header: gettext('Name'),
                dataIndex: 'ref',
                hideable: false,
-               width: 140
+               width: 140,
            },
            {
-               header: gettext('Comment'),  
+               header: gettext('Comment'),
                dataIndex: 'comment',
                renderer: Ext.String.htmlEncode,
-               flex: 1
-           }
+               flex: 1,
+           },
        );
 
        Ext.apply(me, {
            store: store,
-            listConfig: { columns: columns }
+            listConfig: { columns: columns },
        });
 
        me.on('change', disable_query_for_ips);
 
         me.callParent();
-    }
+    },
 });