mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-08-04 05:00:43 +00:00
network selector: allow to select IP too
not only CIDR.. maybe it could make sense to add a small child class which overwrites just the displayField and valueField to address Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
227159eca2
commit
1dd799589b
@ -18,6 +18,8 @@ Ext.define('Proxmox.data.NetworkSelector', {
|
||||
{name: 'active'},
|
||||
{name: 'cidr'},
|
||||
{name: 'cidr6'},
|
||||
{name: 'address'},
|
||||
{name: 'address6'},
|
||||
{name: 'comments'},
|
||||
{name: 'iface'},
|
||||
{name: 'slaves'},
|
||||
@ -29,8 +31,9 @@ Ext.define('Proxmox.form.NetworkSelector', {
|
||||
extend: 'Proxmox.form.ComboGrid',
|
||||
alias: 'widget.proxmoxNetworkSelector',
|
||||
|
||||
nodename: 'localhost',
|
||||
controller: 'proxmoxNetworkSelectorController',
|
||||
|
||||
nodename: 'localhost',
|
||||
setNodename: function(nodename) {
|
||||
this.nodename = nodename;
|
||||
var networkSelectorStore = this.getStore();
|
||||
@ -73,6 +76,7 @@ Ext.define('Proxmox.form.NetworkSelector', {
|
||||
if (record.data.cidr6) {
|
||||
let dest = (record.data.cidr) ? record.copy(null) : record;
|
||||
dest.data.cidr = record.data.cidr6;
|
||||
dest.data.address = record.data.address6;
|
||||
delete record.data.cidr6;
|
||||
dest.data.comments = record.data.comments6;
|
||||
delete record.data.comments6;
|
||||
@ -93,6 +97,12 @@ Ext.define('Proxmox.form.NetworkSelector', {
|
||||
hideable: false,
|
||||
flex: 1
|
||||
},
|
||||
{
|
||||
|
||||
header: gettext('IP'),
|
||||
dataIndex: 'address',
|
||||
hidden: true,
|
||||
},
|
||||
{
|
||||
header: gettext('Interface'),
|
||||
width: 90,
|
||||
|
Loading…
Reference in New Issue
Block a user