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
43df6199
Commit
43df6199
authored
Oct 12, 2011
by
Kostas Papadimitriou
Browse files
Create vm view fixes
- Improved handling of empty images/flavor lists - Improved name field empty error styles
parent
99e0d766
Changes
2
Hide whitespace changes
Inline
Side-by-side
ui/static/snf/css/main.css
View file @
43df6199
...
...
@@ -5141,6 +5141,11 @@ table.list-machines .wave {
margin-right
:
10px
;
}
.form-field.error
label
{
color
:
#ff0000
;
text-decoration
:
underline
;
}
.form-field
input
{
border
:
1px
solid
#aaa
;
width
:
200px
;
...
...
ui/static/snf/js/ui/web/ui_create_view.js
View file @
43df6199
...
...
@@ -236,6 +236,8 @@
}
else
{
this
.
image_details
.
hide
();
}
this
.
validate
();
},
reset_images
:
function
()
{
...
...
@@ -284,6 +286,14 @@
get
:
function
()
{
return
{
'
image
'
:
this
.
selected_image
};
},
validate
:
function
()
{
if
(
!
this
.
selected_image
)
{
this
.
parent
.
$
(
"
.form-action.next
"
).
hide
();
}
else
{
this
.
parent
.
$
(
"
.form-action.next
"
).
show
();
}
}
});
...
...
@@ -441,8 +451,12 @@
this
.
current_flavor
=
flv
;
this
.
trigger
(
"
change
"
);
this
.
update_selected_flavor
();
this
.
update_selected_predefined
();
if
(
this
.
current_flavor
)
{
this
.
update_selected_flavor
();
this
.
update_selected_predefined
();
}
this
.
validate
();
},
select_default_flavor
:
function
()
{
...
...
@@ -503,6 +517,7 @@
update_selected_flavor
:
function
()
{
var
flv
=
this
.
current_flavor
;
if
(
!
flv
)
{
return
}
this
.
$
(
"
.option
"
).
removeClass
(
"
selected
"
);
this
.
$
(
"
.option.cpu.value-
"
+
flv
.
get
(
"
cpu
"
)).
addClass
(
"
selected
"
);
...
...
@@ -554,6 +569,7 @@
update_layout
:
function
()
{
this
.
update_selected_flavor
();
this
.
update_disabled_flavors
();
this
.
validate
();
},
reset
:
function
()
{
...
...
@@ -563,6 +579,14 @@
this
.
update_flavors_data
();
},
validate
:
function
()
{
if
(
!
this
.
current_flavor
)
{
this
.
parent
.
$
(
"
.form-action.next
"
).
hide
();
}
else
{
this
.
parent
.
$
(
"
.form-action.next
"
).
show
();
}
},
get
:
function
()
{
return
{
'
flavor
'
:
this
.
current_flavor
}
}
...
...
@@ -648,6 +672,7 @@
update_layout
:
function
()
{
var
params
=
this
.
parent
.
get_params
();
if
(
!
params
.
image
||
!
params
.
flavor
)
{
return
}
if
(
!
params
.
image
)
{
return
}
var
vm_name
=
"
My {0} server
"
.
format
(
params
.
image
.
get
(
"
name
"
));
...
...
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