mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-08-05 22:47:30 +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: 'active'},
|
||||||
{name: 'cidr'},
|
{name: 'cidr'},
|
||||||
{name: 'cidr6'},
|
{name: 'cidr6'},
|
||||||
|
{name: 'address'},
|
||||||
|
{name: 'address6'},
|
||||||
{name: 'comments'},
|
{name: 'comments'},
|
||||||
{name: 'iface'},
|
{name: 'iface'},
|
||||||
{name: 'slaves'},
|
{name: 'slaves'},
|
||||||
@ -29,8 +31,9 @@ Ext.define('Proxmox.form.NetworkSelector', {
|
|||||||
extend: 'Proxmox.form.ComboGrid',
|
extend: 'Proxmox.form.ComboGrid',
|
||||||
alias: 'widget.proxmoxNetworkSelector',
|
alias: 'widget.proxmoxNetworkSelector',
|
||||||
|
|
||||||
nodename: 'localhost',
|
|
||||||
controller: 'proxmoxNetworkSelectorController',
|
controller: 'proxmoxNetworkSelectorController',
|
||||||
|
|
||||||
|
nodename: 'localhost',
|
||||||
setNodename: function(nodename) {
|
setNodename: function(nodename) {
|
||||||
this.nodename = nodename;
|
this.nodename = nodename;
|
||||||
var networkSelectorStore = this.getStore();
|
var networkSelectorStore = this.getStore();
|
||||||
@ -73,6 +76,7 @@ Ext.define('Proxmox.form.NetworkSelector', {
|
|||||||
if (record.data.cidr6) {
|
if (record.data.cidr6) {
|
||||||
let dest = (record.data.cidr) ? record.copy(null) : record;
|
let dest = (record.data.cidr) ? record.copy(null) : record;
|
||||||
dest.data.cidr = record.data.cidr6;
|
dest.data.cidr = record.data.cidr6;
|
||||||
|
dest.data.address = record.data.address6;
|
||||||
delete record.data.cidr6;
|
delete record.data.cidr6;
|
||||||
dest.data.comments = record.data.comments6;
|
dest.data.comments = record.data.comments6;
|
||||||
delete record.data.comments6;
|
delete record.data.comments6;
|
||||||
@ -93,6 +97,12 @@ Ext.define('Proxmox.form.NetworkSelector', {
|
|||||||
hideable: false,
|
hideable: false,
|
||||||
flex: 1
|
flex: 1
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
|
||||||
|
header: gettext('IP'),
|
||||||
|
dataIndex: 'address',
|
||||||
|
hidden: true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
header: gettext('Interface'),
|
header: gettext('Interface'),
|
||||||
width: 90,
|
width: 90,
|
||||||
|
Loading…
Reference in New Issue
Block a user