Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pve-manager
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
pve-manager
Commits
2f9ca384
Commit
2f9ca384
authored
May 27, 2014
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use correct url for IPSetSelector
parent
a37afc49
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
2 deletions
+35
-2
SecurityGroups.js
www/manager/dc/SecurityGroups.js
+1
-0
IPSetSelector.js
www/manager/form/IPSetSelector.js
+7
-1
FirewallRules.js
www/manager/grid/FirewallRules.js
+25
-1
Firewall.js
www/manager/panel/Firewall.js
+2
-0
No files found.
www/manager/dc/SecurityGroups.js
View file @
2f9ca384
...
...
@@ -200,6 +200,7 @@ Ext.define('PVE.SecurityGroups', {
var
rule_panel
=
Ext
.
createWidget
(
'
pveFirewallRules
'
,
{
region
:
'
center
'
,
allow_groups
:
false
,
ipset_base_url
:
'
/cluster/firewall/ipset
'
,
tbar_prefix
:
'
<b>
'
+
gettext
(
'
Rules
'
)
+
'
:</b>
'
,
flex
:
0.75
,
border
:
false
...
...
www/manager/form/IPSetSelector.js
View file @
2f9ca384
...
...
@@ -2,9 +2,15 @@ Ext.define('PVE.form.IPSetSelector', {
extend
:
'
PVE.form.ComboGrid
'
,
alias
:
[
'
widget.pveIPSetSelector
'
],
base_url
:
undefined
,
initComponent
:
function
()
{
var
me
=
this
;
if
(
!
me
.
base_url
)
{
throw
"
no base_url specified
"
;
}
var
store
=
Ext
.
create
(
'
Ext.data.Store
'
,
{
autoLoad
:
true
,
fields
:
[
{
name
:
'
name
'
,
...
...
@@ -13,7 +19,7 @@ Ext.define('PVE.form.IPSetSelector', {
idProperty
:
'
name
'
,
proxy
:
{
type
:
'
pve
'
,
url
:
"
/api2/json
/cluster/firewall/ipset
"
url
:
"
/api2/json
"
+
me
.
base_url
},
sorters
:
{
property
:
'
name
'
,
...
...
www/manager/grid/FirewallRules.js
View file @
2f9ca384
...
...
@@ -51,6 +51,8 @@ Ext.define('PVE.FirewallRulePanel', {
allow_iface
:
false
,
ipset_base_url
:
undefined
,
onGetValues
:
function
(
values
)
{
var
me
=
this
;
...
...
@@ -71,6 +73,10 @@ Ext.define('PVE.FirewallRulePanel', {
initComponent
:
function
()
{
var
me
=
this
;
if
(
!
me
.
ipset_base_url
)
{
throw
"
no ipset_base_url specified
"
;
}
me
.
column1
=
[
{
// hack: we use this field to mark the form 'dirty' when the
...
...
@@ -127,6 +133,7 @@ Ext.define('PVE.FirewallRulePanel', {
name
:
'
source
'
,
autoSelect
:
false
,
editable
:
true
,
base_url
:
me
.
ipset_base_url
,
queryDelay
:
900000000
,
// disable query
value
:
''
,
preferredValue
:
''
,
// hack: else Form sets dirty flag?
...
...
@@ -138,6 +145,7 @@ Ext.define('PVE.FirewallRulePanel', {
autoSelect
:
false
,
queryDelay
:
900000000
,
// disable query
editable
:
true
,
base_url
:
me
.
ipset_base_url
,
value
:
''
,
preferredValue
:
''
,
// hack: else Form sets dirty flag?
fieldLabel
:
gettext
(
'
Destination
'
)
...
...
@@ -224,6 +232,7 @@ Ext.define('PVE.FirewallRuleEdit', {
extend
:
'
PVE.window.Edit
'
,
base_url
:
undefined
,
ipset_base_url
:
undefined
,
allow_iface
:
false
,
...
...
@@ -231,6 +240,13 @@ Ext.define('PVE.FirewallRuleEdit', {
/*jslint confusion: true */
var
me
=
this
;
if
(
!
me
.
base_url
)
{
throw
"
no base_url specified
"
;
}
if
(
!
me
.
ipset_base_url
)
{
throw
"
no ipset_base_url specified
"
;
}
me
.
create
=
(
me
.
rule_pos
===
undefined
);
if
(
me
.
create
)
{
...
...
@@ -243,6 +259,7 @@ Ext.define('PVE.FirewallRuleEdit', {
var
ipanel
=
Ext
.
create
(
'
PVE.FirewallRulePanel
'
,
{
create
:
me
.
create
,
ipset_base_url
:
me
.
ipset_base_url
,
allow_iface
:
me
.
allow_iface
,
rule_pos
:
me
.
rule_pos
});
...
...
@@ -367,6 +384,7 @@ Ext.define('PVE.FirewallRules', {
alias
:
'
widget.pveFirewallRules
'
,
base_url
:
undefined
,
ipset_base_url
:
undefined
,
addBtn
:
undefined
,
removeBtn
:
undefined
,
...
...
@@ -476,6 +494,10 @@ Ext.define('PVE.FirewallRules', {
/*jslint confusion: true */
var
me
=
this
;
if
(
!
me
.
ipset_base_url
)
{
throw
"
no ipset_base_url specified
"
;
}
var
store
=
new
Ext
.
data
.
Store
({
model
:
'
pve-fw-rule
'
});
...
...
@@ -506,6 +528,7 @@ Ext.define('PVE.FirewallRules', {
digest
:
rec
.
data
.
digest
,
allow_iface
:
me
.
allow_iface
,
base_url
:
me
.
base_url
,
ipset_base_url
:
me
.
ipset_base_url
,
rule_pos
:
rec
.
data
.
pos
});
...
...
@@ -526,7 +549,8 @@ Ext.define('PVE.FirewallRules', {
handler
:
function
()
{
var
win
=
Ext
.
create
(
'
PVE.FirewallRuleEdit
'
,
{
allow_iface
:
me
.
allow_iface
,
base_url
:
me
.
base_url
base_url
:
me
.
base_url
,
ipset_base_url
:
me
.
ipset_base_url
});
win
.
on
(
'
destroy
'
,
reload
);
win
.
show
();
...
...
www/manager/panel/Firewall.js
View file @
2f9ca384
...
...
@@ -26,6 +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
'
,
itemId
:
'
rules
'
}
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment