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
2c3a6b25
Commit
2c3a6b25
authored
Oct 06, 2011
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use extra tab for openvz DNS settings
parent
4836f5b1
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
145 additions
and
61 deletions
+145
-61
Makefile
www/manager/Makefile
+1
-0
Config.js
www/manager/openvz/Config.js
+5
-0
DNS.js
www/manager/openvz/DNS.js
+132
-0
Options.js
www/manager/openvz/Options.js
+7
-61
No files found.
www/manager/Makefile
View file @
2c3a6b25
...
...
@@ -86,6 +86,7 @@ JSSRC= \
openvz/RessourceView.js
\
openvz/Options.js
\
openvz/Network.js
\
openvz/DNS.js
\
openvz/Config.js
\
openvz/CreateWizard.js
\
storage/ContentView.js
\
...
...
www/manager/openvz/Config.js
View file @
2c3a6b25
...
...
@@ -37,6 +37,11 @@ Ext.define('PVE.openvz.Config', {
itemId
:
'
network
'
,
xtype
:
'
pveOpenVZNetworkView
'
},
{
title
:
'
DNS
'
,
itemId
:
'
dns
'
,
xtype
:
'
pveOpenVZDNS
'
},
{
title
:
'
Options
'
,
itemId
:
'
options
'
,
...
...
www/manager/openvz/DNS.js
0 → 100644
View file @
2c3a6b25
/*jslint confusion: true */
Ext
.
define
(
'
PVE.openvz.DNS
'
,
{
extend
:
'
PVE.grid.ObjectGrid
'
,
alias
:
[
'
widget.pveOpenVZDNS
'
],
initComponent
:
function
()
{
var
me
=
this
;
var
i
;
var
nodename
=
me
.
pveSelNode
.
data
.
node
;
if
(
!
nodename
)
{
throw
"
no node name specified
"
;
}
var
vmid
=
me
.
pveSelNode
.
data
.
vmid
;
if
(
!
vmid
)
{
throw
"
no VM ID specified
"
;
}
var
rows
=
{
hostname
:
{
required
:
true
,
defaultValue
:
me
.
pveSelNode
.
data
.
name
,
header
:
'
Hostname
'
,
editor
:
{
xtype
:
'
pveWindowEdit
'
,
title
:
'
Container Hostname
'
,
items
:
{
xtype
:
'
textfield
'
,
name
:
'
hostname
'
,
value
:
''
,
fieldLabel
:
'
Hostname
'
,
allowBlank
:
true
,
emptyText
:
me
.
pveSelNode
.
data
.
name
}
}
},
searchdomain
:
{
header
:
'
DNS domain
'
,
defaultValue
:
''
,
editor
:
{
xtype
:
'
pveWindowEdit
'
,
title
:
'
DNS domain
'
,
items
:
{
xtype
:
'
pvetextfield
'
,
name
:
'
searchdomain
'
,
fieldLabel
:
'
DNS domain
'
,
allowBlank
:
false
}
}
},
nameserver
:
{
header
:
'
DNS servers
'
,
defaultValue
:
''
,
editor
:
{
xtype
:
'
pveWindowEdit
'
,
title
:
'
DNS servers
'
,
items
:
{
xtype
:
'
pvetextfield
'
,
name
:
'
nameserver
'
,
fieldLabel
:
'
DNS servers
'
,
allowBlank
:
false
}
}
}
};
var
baseurl
=
'
nodes/
'
+
nodename
+
'
/openvz/
'
+
vmid
+
'
/config
'
;
var
reload
=
function
()
{
me
.
rstore
.
load
();
};
var
run_editor
=
function
()
{
var
sm
=
me
.
getSelectionModel
();
var
rec
=
sm
.
getSelection
()[
0
];
if
(
!
rec
)
{
return
;
}
var
rowdef
=
rows
[
rec
.
data
.
key
];
if
(
!
rowdef
.
editor
)
{
return
;
}
var
config
=
Ext
.
apply
({
pveSelNode
:
me
.
pveSelNode
,
confid
:
rec
.
data
.
key
,
url
:
'
/api2/extjs/
'
+
baseurl
},
rowdef
.
editor
);
var
win
=
Ext
.
createWidget
(
rowdef
.
editor
.
xtype
,
config
);
win
.
load
();
win
.
show
();
win
.
on
(
'
destroy
'
,
reload
);
};
var
edit_btn
=
new
Ext
.
Button
({
text
:
'
Edit
'
,
disabled
:
true
,
handler
:
run_editor
});
var
set_button_status
=
function
()
{
var
sm
=
me
.
getSelectionModel
();
var
rec
=
sm
.
getSelection
()[
0
];
if
(
!
rec
)
{
edit_btn
.
disable
();
return
;
}
var
rowdef
=
rows
[
rec
.
data
.
key
];
edit_btn
.
setDisabled
(
!
rowdef
.
editor
);
};
Ext
.
applyIf
(
me
,
{
url
:
"
/api2/json/nodes/
"
+
nodename
+
"
/openvz/
"
+
vmid
+
"
/config
"
,
cwidth1
:
150
,
tbar
:
[
edit_btn
],
rows
:
rows
,
listeners
:
{
itemdblclick
:
run_editor
,
selectionchange
:
set_button_status
}
});
me
.
callParent
();
me
.
on
(
'
show
'
,
reload
);
}
});
www/manager/openvz/Options.js
View file @
2c3a6b25
...
...
@@ -18,23 +18,6 @@ Ext.define('PVE.openvz.Options', {
}
var
rows
=
{
hostname
:
{
required
:
true
,
defaultValue
:
me
.
pveSelNode
.
data
.
name
,
header
:
'
Hostname
'
,
editor
:
{
xtype
:
'
pveWindowEdit
'
,
title
:
'
Container Hostname
'
,
items
:
{
xtype
:
'
textfield
'
,
name
:
'
hostname
'
,
value
:
''
,
fieldLabel
:
'
Hostname
'
,
allowBlank
:
true
,
emptyText
:
me
.
pveSelNode
.
data
.
name
}
}
},
onboot
:
{
header
:
'
Start at boot
'
,
defaultValue
:
''
,
...
...
@@ -51,34 +34,6 @@ Ext.define('PVE.openvz.Options', {
}
}
},
searchdomain
:
{
header
:
'
DNS domain
'
,
defaultValue
:
''
,
editor
:
{
xtype
:
'
pveWindowEdit
'
,
title
:
'
DNS domain
'
,
items
:
{
xtype
:
'
pvetextfield
'
,
name
:
'
searchdomain
'
,
fieldLabel
:
'
DNS domain
'
,
allowBlank
:
false
}
}
},
nameserver
:
{
header
:
'
DNS servers
'
,
defaultValue
:
''
,
editor
:
{
xtype
:
'
pveWindowEdit
'
,
title
:
'
DNS servers
'
,
items
:
{
xtype
:
'
pvetextfield
'
,
name
:
'
nameserver
'
,
fieldLabel
:
'
DNS servers
'
,
allowBlank
:
false
}
}
},
ostemplate
:
{
header
:
'
Template
'
,
defaultValue
:
'
no set
'
...
...
@@ -155,22 +110,13 @@ Ext.define('PVE.openvz.Options', {
return
;
}
var
win
;
if
(
Ext
.
isString
(
rowdef
.
editor
))
{
win
=
Ext
.
create
(
rowdef
.
editor
,
{
pveSelNode
:
me
.
pveSelNode
,
confid
:
rec
.
data
.
key
,
url
:
'
/api2/extjs/
'
+
baseurl
});
}
else
{
var
config
=
Ext
.
apply
({
pveSelNode
:
me
.
pveSelNode
,
confid
:
rec
.
data
.
key
,
url
:
'
/api2/extjs/
'
+
baseurl
},
rowdef
.
editor
);
win
=
Ext
.
createWidget
(
rowdef
.
editor
.
xtype
,
config
);
var
win
=
Ext
.
createWidget
(
rowdef
.
editor
.
xtype
,
config
);
win
.
load
();
}
win
.
show
();
win
.
on
(
'
destroy
'
,
reload
);
...
...
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