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
a3aa27b4
Commit
a3aa27b4
authored
Apr 20, 2015
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use new PVE.lxc.NetworkInputPanel inside CreateWizard
parent
b542888d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
36 deletions
+31
-36
CreateWizard.js
www/manager/lxc/CreateWizard.js
+7
-32
Network.js
www/manager/lxc/Network.js
+24
-4
No files found.
www/manager/lxc/CreateWizard.js
View file @
a3aa27b4
...
...
@@ -43,12 +43,11 @@ Ext.define('PVE.lxc.CreateWizard', {
}
});
var
bridgesel
=
Ext
.
create
(
'
PVE.form.BridgeSelector
'
,
{
name
:
'
bridge
'
,
fieldLabel
:
gettext
(
'
Bridge
'
),
labelAlign
:
'
right
'
,
autoSelect
:
true
,
allowBlank
:
false
var
networkpanel
=
Ext
.
create
(
'
PVE.lxc.NetworkInputPanel
'
,
{
title
:
gettext
(
'
Network
'
),
insideWizard
:
true
,
dataCache
:
{},
create
:
true
,
});
Ext
.
applyIf
(
me
,
{
...
...
@@ -68,7 +67,7 @@ Ext.define('PVE.lxc.CreateWizard', {
change
:
function
(
f
,
value
)
{
tmplstoragesel
.
setNodename
(
value
);
tmplsel
.
setStorage
(
undefined
,
value
);
bridges
el
.
setNodename
(
value
);
networkpan
el
.
setNodename
(
value
);
storagesel
.
setNodename
(
value
);
}
}
...
...
@@ -143,31 +142,7 @@ Ext.define('PVE.lxc.CreateWizard', {
title
:
gettext
(
'
Template
'
),
column1
:
[
tmplstoragesel
,
tmplsel
]
},
// {
// xtype: 'pveLxcResourceInputPanel',
// title: gettext('Resources')
// },
{
xtype
:
'
inputpanel
'
,
title
:
gettext
(
'
Network
'
),
column1
:
[
bridgesel
,
{
xtype
:
'
pvecheckbox
'
,
fieldLabel
:
gettext
(
'
Firewall
'
),
name
:
'
firewall
'
,
checked
:
false
,
disabled
:
true
}
],
onGetValues
:
function
(
values
)
{
var
netif
=
PVE
.
Parser
.
printLxcNetwork
({
link
:
values
.
bridge
,
firewall
:
values
.
firewall
});
return
{
net0
:
netif
};
}
},
networkpanel
,
{
title
:
gettext
(
'
Confirm
'
),
layout
:
'
fit
'
,
...
...
www/manager/lxc/Network.js
View file @
a3aa27b4
...
...
@@ -4,6 +4,19 @@ Ext.define('PVE.lxc.NetworkInputPanel', {
insideWizard
:
false
,
setNodename
:
function
(
nodename
)
{
var
me
=
this
;
if
(
!
nodename
||
(
me
.
nodename
===
nodename
))
{
return
;
}
me
.
nodename
=
nodename
;
var
bridgesel
=
me
.
query
(
"
[isFormField][name=link]
"
)[
0
];
bridgesel
.
setNodename
(
nodename
);
},
onGetValues
:
function
(
values
)
{
var
me
=
this
;
...
...
@@ -15,7 +28,12 @@ Ext.define('PVE.lxc.NetworkInputPanel', {
id
=
me
.
ifname
;
}
if
(
!
id
)
{
return
{};
}
var
newdata
=
{};
newdata
[
id
]
=
PVE
.
Parser
.
printLxcNetwork
(
values
);
return
newdata
;
},
...
...
@@ -26,13 +44,14 @@ Ext.define('PVE.lxc.NetworkInputPanel', {
if
(
!
me
.
dataCache
)
{
throw
"
no dataCache specified
"
;
}
if
(
!
me
.
nodename
)
{
throw
"
no node name specified
"
;
}
var
cdata
=
{};
if
(
me
.
insideWizard
)
{
me
.
ifname
=
'
net0
'
;
cdata
.
name
=
'
eth0
'
;
}
if
(
!
me
.
create
)
{
if
(
!
me
.
ifname
)
{
throw
"
no interface name specified
"
;
...
...
@@ -58,6 +77,7 @@ Ext.define('PVE.lxc.NetworkInputPanel', {
xtype
:
'
combobox
'
,
fieldLabel
:
gettext
(
'
ID
'
),
store
:
netliststore
,
editable
:
false
,
name
:
'
id
'
,
value
:
me
.
ifname
,
disabled
:
!
me
.
create
,
...
...
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