Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gyuricska Milán
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
1069d8d0
authored
Mar 24, 2014
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: fix vm create network list if there is only 1 network
parent
9fa233a4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletions
+6
-1
circle/dashboard/static/dashboard/vm-create.js
+6
-1
No files found.
circle/dashboard/static/dashboard/vm-create.js
View file @
1069d8d0
...
@@ -143,7 +143,6 @@ function vmCustomizeLoaded() {
...
@@ -143,7 +143,6 @@ function vmCustomizeLoaded() {
}
}
var
html
=
'<option data-managed="'
+
(
managed
?
1
:
0
)
+
'" value="'
+
pk
+
'">'
+
text
+
'</option>'
;
var
html
=
'<option data-managed="'
+
(
managed
?
1
:
0
)
+
'" value="'
+
pk
+
'">'
+
text
+
'</option>'
;
if
(
$
(
'#vm-create-network-list span'
).
length
<
1
)
{
if
(
$
(
'#vm-create-network-list span'
).
length
<
1
)
{
$
(
"#vm-create-network-list"
).
html
(
""
);
$
(
"#vm-create-network-list"
).
html
(
""
);
}
}
...
@@ -152,8 +151,14 @@ function vmCustomizeLoaded() {
...
@@ -152,8 +151,14 @@ function vmCustomizeLoaded() {
}
else
{
}
else
{
$
(
'#vm-create-network-add-select'
).
append
(
html
);
$
(
'#vm-create-network-add-select'
).
append
(
html
);
}
}
});
});
// if all networks are added add a dummy and disable the add button
if
(
$
(
"#vm-create-network-add-select option"
).
length
<
1
)
{
$
(
"#vm-create-network-add-select"
).
html
(
'<option value="-1">No more networks!</option>'
);
$
(
'#vm-create-network-add-button'
).
attr
(
'disabled'
,
true
);
}
/* build up network list */
/* build up network list */
$
(
'#vm-create-network-add-vlan option'
).
each
(
function
()
{
$
(
'#vm-create-network-add-vlan option'
).
each
(
function
()
{
...
...
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