Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
synnefo
Commits
c161784e
Commit
c161784e
authored
May 28, 2013
by
Kostas Papadimitriou
Browse files
cyclades ui: Always send network type in create request
type parameter is mandatory in private network creation requests.
parent
43b2d1dd
Changes
2
Hide whitespace changes
Inline
Side-by-side
snf-cyclades-app/synnefo/ui/static/snf/js/models.js
View file @
c161784e
...
...
@@ -1680,9 +1680,10 @@
}
};
if
(
type
)
{
params
.
n
etwork
.
type
=
type
;
if
(
!
type
)
{
throw
"
N
etwork
type
cannot be empty
"
;
}
params
.
network
.
type
=
type
;
if
(
cidr
)
{
params
.
network
.
cidr
=
cidr
;
}
...
...
snf-cyclades-app/synnefo/ui/static/snf/js/ui/web/ui_networks_view.js
View file @
c161784e
...
...
@@ -219,9 +219,7 @@
this
.
type_select
.
append
(
$
(
'
<option value=
'
+
value
+
'
class="subnet">
'
+
name
+
'
</option>
'
));
},
this
);
this
.
disable_network_type
=
false
;
if
(
_
.
keys
(
synnefo
.
config
.
network_available_types
).
length
<=
1
)
{
this
.
disable_network_type
=
true
;
this
.
type_select
.
closest
(
"
.form-field
"
).
hide
();
}
...
...
@@ -339,8 +337,6 @@
var
subnet
=
null
;
var
type
=
this
.
type_select
.
val
();
if
(
this
.
disable_network_type
)
{
type
=
null
};
if
(
dhcp
)
{
if
(
this
.
subnet_select
.
val
()
==
"
custom
"
)
{
subnet
=
this
.
subnet_custom
.
val
();
...
...
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