Commit 1f325061 authored by Dietmar Maurer's avatar Dietmar Maurer

use new API for IPSetSelector

We now list all available IPSets and Aliases.
parent 2f9ca384
......@@ -200,7 +200,7 @@ Ext.define('PVE.SecurityGroups', {
var rule_panel = Ext.createWidget('pveFirewallRules', {
region: 'center',
allow_groups: false,
ipset_base_url: '/cluster/firewall/ipset',
ipset_base_url: '/cluster/firewall/refs',
tbar_prefix: '<b>' + gettext('Rules') + ':</b>',
flex: 0.75,
border: false
......
......@@ -13,29 +13,33 @@ Ext.define('PVE.form.IPSetSelector', {
var store = Ext.create('Ext.data.Store', {
autoLoad: true,
fields: [ { name: 'name',
convert: function(v) { return '+' + v; }},
'comment' ],
idProperty: 'name',
fields: [ 'type', 'name', 'ref', 'comment' ],
idProperty: 'ref',
proxy: {
type: 'pve',
url: "/api2/json" + me.base_url
},
sorters: {
property: 'name',
property: 'ref',
order: 'DESC'
}
});
Ext.apply(me, {
store: store,
valueField: 'name',
displayField: 'name',
valueField: 'ref',
displayField: 'ref',
listConfig: {
columns: [
{
header: gettext('IPSet'),
dataIndex: 'name',
header: gettext('Type'),
dataIndex: 'type',
hideable: false,
width: 60
},
{
header: gettext('Name'),
dataIndex: 'ref',
hideable: false,
width: 100
},
......
......@@ -26,8 +26,8 @@ Ext.define('PVE.panel.Firewall', {
title: 'Rules',
allow_iface: true,
base_url: me.base_url + '/rules',
ipset_base_url: me.fwtype === 'vm' ? (me.base_url + '/ipset') :
'/cluster/firewall/ipset',
ipset_base_url: me.fwtype === 'vm' ? (me.base_url + '/refs') :
'/cluster/firewall/refs',
itemId: 'rules'
}
];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment