]> git.proxmox.com Git - pve-manager.git/blobdiff - www/manager6/sdn/VnetEdit.js
sdn: add subnet/ipam/sdn management
[pve-manager.git] / www / manager6 / sdn / VnetEdit.js
index a54b3d7d741736527df69650cd96b76204d69152..1ed2099427722b9cb70a6d956c62f2521f116b7b 100644 (file)
@@ -9,12 +9,10 @@ Ext.define('PVE.sdn.VnetInputPanel', {
            values.type = 'vnet';
        }
 
-       if (!values.ipv6) {
-           delete values.ipv6;
-       }
-       if (!values.ipv4) {
-           delete values.ipv4;
+       if (!values.vlanaware) {
+           delete values.vlanaware;
        }
+
        if (!values.mac) {
            delete values.mac;
        }
@@ -29,7 +27,8 @@ Ext.define('PVE.sdn.VnetInputPanel', {
            cbind: {
                editable: '{isCreate}',
            },
-           maxLength: 10,
+           maxLength: 8,
+           flex: 1,
            allowBlank: false,
            fieldLabel: gettext('Name'),
        },
@@ -50,34 +49,26 @@ Ext.define('PVE.sdn.VnetInputPanel', {
            xtype: 'proxmoxintegerfield',
            name: 'tag',
            minValue: 1,
-           maxValue: 16000000,
+           maxValue: 16777216,
            fieldLabel: gettext('Tag'),
-           allowBlank: false,
-       },
-       {
-           xtype: 'textfield',
-           name: 'ipv4',
-           vtype: 'IPCIDRAddress',
-           fieldLabel: 'IPv4/CIDR', // do not localize
-           skipEmptyText: true,
            allowBlank: true,
        },
        {
-           xtype: 'textfield',
-           name: 'ipv6',
-           vtype: 'IP6CIDRAddress',
-           fieldLabel: 'IPv6/CIDR', // do not localize
-           skipEmptyText: true,
-           allowBlank: true,
-       },
+           xtype: 'proxmoxcheckbox',
+           name: 'vlanaware',
+           uncheckedValue: 0,
+           checked: false,
+           fieldLabel: gettext('VLAN Aware'),
+       }
+    ],
+    advancedItems: [
        {
            xtype: 'textfield',
            name: 'mac',
-           fieldLabel: gettext('MAC Address'),
+           fieldLabel: gettext('MAC address'),
            vtype: 'MacAddress',
-           skipEmptyText: true,
            allowBlank: true,
-           emptyText: 'auto',
+           emptyText: 'auto'
        },
     ],
 });
@@ -89,6 +80,8 @@ Ext.define('PVE.sdn.VnetEdit', {
 
     vnet: undefined,
 
+    width: 350,
+
     initComponent: function() {
        var me = this;