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
906ba60c
Commit
906ba60c
authored
May 06, 2014
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable firewall GUI
parent
270067a0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
61 additions
and
13 deletions
+61
-13
Config.js
www/manager/dc/Config.js
+8
-0
Config.js
www/manager/node/Config.js
+16
-6
Config.js
www/manager/openvz/Config.js
+19
-4
Config.js
www/manager/qemu/Config.js
+18
-3
No files found.
www/manager/dc/Config.js
View file @
906ba60c
...
@@ -82,6 +82,14 @@ Ext.define('PVE.dc.Config', {
...
@@ -82,6 +82,14 @@ Ext.define('PVE.dc.Config', {
xtype
:
'
pveDcHAConfig
'
,
xtype
:
'
pveDcHAConfig
'
,
title
:
'
HA
'
,
title
:
'
HA
'
,
itemId
:
'
ha
'
itemId
:
'
ha
'
},
{
xtype
:
'
pveFirewallPanel
'
,
title
:
gettext
(
'
Firewall
'
),
base_url
:
'
/cluster/firewall
'
,
fwtype
:
'
dc
'
,
phstateid
:
me
.
hstateid
,
itemId
:
'
firewall
'
}
}
]);
]);
...
...
www/manager/node/Config.js
View file @
906ba60c
...
@@ -141,12 +141,22 @@ Ext.define('PVE.node.Config', {
...
@@ -141,12 +141,22 @@ Ext.define('PVE.node.Config', {
]);
]);
if
(
caps
.
nodes
[
'
Sys.Console
'
])
{
if
(
caps
.
nodes
[
'
Sys.Console
'
])
{
me
.
items
.
push
([{
me
.
items
.
push
([
title
:
gettext
(
'
Updates
'
),
{
itemId
:
'
apt
'
,
xtype
:
'
pveFirewallPanel
'
,
xtype
:
'
pveNodeAPT
'
,
title
:
gettext
(
'
Firewall
'
),
nodename
:
nodename
base_url
:
'
/nodes/
'
+
nodename
+
'
/firewall
'
,
}]);
fwtype
:
'
node
'
,
phstateid
:
me
.
hstateid
,
itemId
:
'
firewall
'
},
{
title
:
gettext
(
'
Updates
'
),
itemId
:
'
apt
'
,
xtype
:
'
pveNodeAPT
'
,
nodename
:
nodename
}
]);
me
.
items
.
push
([{
me
.
items
.
push
([{
title
:
'
Ceph
'
,
title
:
'
Ceph
'
,
itemId
:
'
ceph
'
,
itemId
:
'
ceph
'
,
...
...
www/manager/openvz/Config.js
View file @
906ba60c
...
@@ -17,15 +17,17 @@ Ext.define('PVE.openvz.Config', {
...
@@ -17,15 +17,17 @@ Ext.define('PVE.openvz.Config', {
var
caps
=
Ext
.
state
.
Manager
.
get
(
'
GuiCap
'
);
var
caps
=
Ext
.
state
.
Manager
.
get
(
'
GuiCap
'
);
var
base_url
=
'
/nodes/
'
+
nodename
+
'
/openvz/
'
+
vmid
;
me
.
statusStore
=
Ext
.
create
(
'
PVE.data.ObjectStore
'
,
{
me
.
statusStore
=
Ext
.
create
(
'
PVE.data.ObjectStore
'
,
{
url
:
"
/api2/json/nodes/
"
+
nodename
+
"
/openvz/
"
+
vmid
+
"
/status/current
"
,
url
:
'
/api2/json
'
+
base_url
+
'
/status/current
'
,
interval
:
1000
interval
:
1000
});
});
var
vm_command
=
function
(
cmd
,
params
)
{
var
vm_command
=
function
(
cmd
,
params
)
{
PVE
.
Utils
.
API2Request
({
PVE
.
Utils
.
API2Request
({
params
:
params
,
params
:
params
,
url
:
'
/nodes/
'
+
nodename
+
'
/openvz/
'
+
vmid
+
"
/status/
"
+
cmd
,
url
:
base_url
+
"
/status/
"
+
cmd
,
waitMsgTarget
:
me
,
waitMsgTarget
:
me
,
method
:
'
POST
'
,
method
:
'
POST
'
,
failure
:
function
(
response
,
opts
)
{
failure
:
function
(
response
,
opts
)
{
...
@@ -89,7 +91,7 @@ Ext.define('PVE.openvz.Config', {
...
@@ -89,7 +91,7 @@ Ext.define('PVE.openvz.Config', {
confirmMsg
:
Ext
.
String
.
format
(
gettext
(
'
Are you sure you want to remove VM {0}? This will permanently erase all VM data.
'
),
vmid
),
confirmMsg
:
Ext
.
String
.
format
(
gettext
(
'
Are you sure you want to remove VM {0}? This will permanently erase all VM data.
'
),
vmid
),
handler
:
function
()
{
handler
:
function
()
{
PVE
.
Utils
.
API2Request
({
PVE
.
Utils
.
API2Request
({
url
:
'
/nodes/
'
+
nodename
+
'
/openvz/
'
+
vmid
,
url
:
base_url
,
method
:
'
DELETE
'
,
method
:
'
DELETE
'
,
waitMsgTarget
:
me
,
waitMsgTarget
:
me
,
failure
:
function
(
response
,
opts
)
{
failure
:
function
(
response
,
opts
)
{
...
@@ -153,7 +155,7 @@ Ext.define('PVE.openvz.Config', {
...
@@ -153,7 +155,7 @@ Ext.define('PVE.openvz.Config', {
title
:
'
UBC
'
,
title
:
'
UBC
'
,
itemId
:
'
ubc
'
,
itemId
:
'
ubc
'
,
xtype
:
'
pveBeanCounterGrid
'
,
xtype
:
'
pveBeanCounterGrid
'
,
url
:
'
/api2/json
/nodes/
'
+
nodename
+
'
/openvz/
'
+
vmid
+
'
/status/ubc
'
url
:
'
/api2/json
'
+
base_url
+
'
/status/ubc
'
}
}
]
]
});
});
...
@@ -166,6 +168,19 @@ Ext.define('PVE.openvz.Config', {
...
@@ -166,6 +168,19 @@ Ext.define('PVE.openvz.Config', {
});
});
}
}
if
(
caps
.
vms
[
'
VM.Console
'
])
{
me
.
items
.
push
([
{
xtype
:
'
pveFirewallPanel
'
,
title
:
gettext
(
'
Firewall
'
),
base_url
:
base_url
+
'
/firewall
'
,
fwtype
:
'
vm
'
,
phstateid
:
me
.
hstateid
,
itemId
:
'
firewall
'
}
]);
}
if
(
caps
.
vms
[
'
Permissions.Modify
'
])
{
if
(
caps
.
vms
[
'
Permissions.Modify
'
])
{
me
.
items
.
push
({
me
.
items
.
push
({
xtype
:
'
pveACLView
'
,
xtype
:
'
pveACLView
'
,
...
...
www/manager/qemu/Config.js
View file @
906ba60c
...
@@ -17,15 +17,17 @@ Ext.define('PVE.qemu.Config', {
...
@@ -17,15 +17,17 @@ Ext.define('PVE.qemu.Config', {
var
caps
=
Ext
.
state
.
Manager
.
get
(
'
GuiCap
'
);
var
caps
=
Ext
.
state
.
Manager
.
get
(
'
GuiCap
'
);
var
base_url
=
'
/nodes/
'
+
nodename
+
"
/qemu/
"
+
vmid
;
me
.
statusStore
=
Ext
.
create
(
'
PVE.data.ObjectStore
'
,
{
me
.
statusStore
=
Ext
.
create
(
'
PVE.data.ObjectStore
'
,
{
url
:
"
/api2/json/nodes/
"
+
nodename
+
"
/qemu/
"
+
vmid
+
"
/status/current
"
,
url
:
'
/api2/json
'
+
base_url
+
'
/status/current
'
,
interval
:
1000
interval
:
1000
});
});
var
vm_command
=
function
(
cmd
,
params
)
{
var
vm_command
=
function
(
cmd
,
params
)
{
PVE
.
Utils
.
API2Request
({
PVE
.
Utils
.
API2Request
({
params
:
params
,
params
:
params
,
url
:
'
/nodes/
'
+
nodename
+
'
/qemu/
'
+
vmid
+
"
/status/
"
+
cmd
,
url
:
base_url
+
'
/status/
'
+
cmd
,
waitMsgTarget
:
me
,
waitMsgTarget
:
me
,
method
:
'
POST
'
,
method
:
'
POST
'
,
failure
:
function
(
response
,
opts
)
{
failure
:
function
(
response
,
opts
)
{
...
@@ -98,7 +100,7 @@ Ext.define('PVE.qemu.Config', {
...
@@ -98,7 +100,7 @@ Ext.define('PVE.qemu.Config', {
confirmMsg
:
Ext
.
String
.
format
(
gettext
(
'
Are you sure you want to remove VM {0}? This will permanently erase all VM data.
'
),
vmid
),
confirmMsg
:
Ext
.
String
.
format
(
gettext
(
'
Are you sure you want to remove VM {0}? This will permanently erase all VM data.
'
),
vmid
),
handler
:
function
()
{
handler
:
function
()
{
PVE
.
Utils
.
API2Request
({
PVE
.
Utils
.
API2Request
({
url
:
'
/nodes/
'
+
nodename
+
'
/qemu/
'
+
vmid
,
url
:
base_url
,
method
:
'
DELETE
'
,
method
:
'
DELETE
'
,
waitMsgTarget
:
me
,
waitMsgTarget
:
me
,
failure
:
function
(
response
,
opts
)
{
failure
:
function
(
response
,
opts
)
{
...
@@ -175,6 +177,19 @@ Ext.define('PVE.qemu.Config', {
...
@@ -175,6 +177,19 @@ Ext.define('PVE.qemu.Config', {
});
});
}
}
if
(
caps
.
vms
[
'
VM.Console
'
])
{
me
.
items
.
push
([
{
xtype
:
'
pveFirewallPanel
'
,
title
:
gettext
(
'
Firewall
'
),
base_url
:
base_url
+
'
/firewall
'
,
fwtype
:
'
vm
'
,
phstateid
:
me
.
hstateid
,
itemId
:
'
firewall
'
}
]);
}
if
(
caps
.
vms
[
'
Permissions.Modify
'
])
{
if
(
caps
.
vms
[
'
Permissions.Modify
'
])
{
me
.
items
.
push
({
me
.
items
.
push
({
xtype
:
'
pveACLView
'
,
xtype
:
'
pveACLView
'
,
...
...
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