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
8f69e381
Commit
8f69e381
authored
Jun 03, 2014
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
white space cleanup
parent
f2f1a82d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
14 deletions
+11
-14
Parser.js
www/manager/Parser.js
+11
-14
No files found.
www/manager/Parser.js
View file @
8f69e381
// Some configuration values are complex strings -
// Some configuration values are complex strings -
// so we need parsers/generators for them.
// so we need parsers/generators for them.
Ext
.
define
(
'
PVE.Parser
'
,
{
statics
:
{
Ext
.
define
(
'
PVE.Parser
'
,
{
statics
:
{
...
@@ -106,7 +106,7 @@ Ext.define('PVE.Parser', { statics: {
...
@@ -106,7 +106,7 @@ Ext.define('PVE.Parser', { statics: {
}
}
var
v
=
match_res
[
2
];
var
v
=
match_res
[
2
];
if
(
k
===
'
cache
'
&&
v
===
'
off
'
)
{
if
(
k
===
'
cache
'
&&
v
===
'
off
'
)
{
v
=
'
none
'
;
v
=
'
none
'
;
}
}
...
@@ -126,7 +126,7 @@ Ext.define('PVE.Parser', { statics: {
...
@@ -126,7 +126,7 @@ Ext.define('PVE.Parser', { statics: {
var
drivestr
=
drive
.
file
;
var
drivestr
=
drive
.
file
;
Ext
.
Object
.
each
(
drive
,
function
(
key
,
value
)
{
Ext
.
Object
.
each
(
drive
,
function
(
key
,
value
)
{
if
(
!
Ext
.
isDefined
(
value
)
||
key
===
'
file
'
||
if
(
!
Ext
.
isDefined
(
value
)
||
key
===
'
file
'
||
key
===
'
index
'
||
key
===
'
interface
'
)
{
key
===
'
index
'
||
key
===
'
interface
'
)
{
return
;
// continue
return
;
// continue
}
}
...
@@ -159,19 +159,17 @@ Ext.define('PVE.Parser', { statics: {
...
@@ -159,19 +159,17 @@ Ext.define('PVE.Parser', { statics: {
errors
=
true
;
errors
=
true
;
return
false
;
// break
return
false
;
// break
}
}
if
(
match_res
[
1
]
===
'
bridge
'
){
if
(
match_res
[
1
]
===
'
bridge
'
){
var
bridgevlanf
=
match_res
[
2
];
var
bridgevlanf
=
match_res
[
2
];
var
bridge_res
=
bridgevlanf
.
match
(
/^
(
vmbr
(\d
+
))(
v
(\d
+
))?(
f
)?
$/
);
var
bridge_res
=
bridgevlanf
.
match
(
/^
(
vmbr
(\d
+
))(
v
(\d
+
))?(
f
)?
$/
);
if
(
!
bridge_res
)
{
if
(
!
bridge_res
)
{
errors
=
true
;
errors
=
true
;
return
false
;
// break
return
false
;
// break
}
}
data
[
'
bridge
'
]
=
bridge_res
[
1
];
data
[
'
bridge
'
]
=
bridge_res
[
1
];
data
[
'
tag
'
]
=
bridge_res
[
4
];
data
[
'
tag
'
]
=
bridge_res
[
4
];
if
(
bridge_res
[
5
]){
data
[
'
firewall
'
]
=
bridge_res
[
5
]
?
1
:
0
;
data
[
'
firewall
'
]
=
1
;
}
else
{
}
}
else
{
data
[
match_res
[
1
]]
=
match_res
[
2
];
data
[
match_res
[
1
]]
=
match_res
[
2
];
}
}
});
});
...
@@ -196,14 +194,13 @@ Ext.define('PVE.Parser', { statics: {
...
@@ -196,14 +194,13 @@ Ext.define('PVE.Parser', { statics: {
var
tmparray
=
[];
var
tmparray
=
[];
Ext
.
Array
.
each
([
'
ifname
'
,
'
mac
'
,
'
bridge
'
,
'
host_ifname
'
,
'
host_mac
'
,
'
mac_filter
'
,
'
tag
'
,
'
firewall
'
],
function
(
key
)
{
Ext
.
Array
.
each
([
'
ifname
'
,
'
mac
'
,
'
bridge
'
,
'
host_ifname
'
,
'
host_mac
'
,
'
mac_filter
'
,
'
tag
'
,
'
firewall
'
],
function
(
key
)
{
var
value
=
data
[
key
];
var
value
=
data
[
key
];
if
(
key
===
'
bridge
'
){
if
(
key
===
'
bridge
'
){
if
(
data
[
'
tag
'
]){
if
(
data
[
'
tag
'
]){
value
=
value
+
'
v
'
+
data
[
'
tag
'
];
value
=
value
+
'
v
'
+
data
[
'
tag
'
];
}
}
if
(
data
[
'
firewall
'
]){
if
(
data
[
'
firewall
'
]){
value
=
value
+
'
f
'
;
value
=
value
+
'
f
'
;
}
}
}
}
if
(
value
)
{
if
(
value
)
{
tmparray
.
push
(
key
+
'
=
'
+
value
);
tmparray
.
push
(
key
+
'
=
'
+
value
);
...
@@ -249,7 +246,7 @@ Ext.define('PVE.Parser', { statics: {
...
@@ -249,7 +246,7 @@ Ext.define('PVE.Parser', { statics: {
return
res
;
return
res
;
},
},
printStartup
:
function
(
startup
)
{
printStartup
:
function
(
startup
)
{
var
arr
=
[];
var
arr
=
[];
if
(
startup
.
order
!==
undefined
&&
startup
.
order
!==
''
)
{
if
(
startup
.
order
!==
undefined
&&
startup
.
order
!==
''
)
{
...
...
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