forked from crowbar/barclamp-openstack
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add selector dropdown to pick openstack flavor to install.
Signed-off-by: Rob @zehicle Hirschfeld <rob_hirschfeld@dell.com>
- Loading branch information
Rob @Zehicle Hirschfeld
committed
Nov 20, 2011
1 parent
b0fa14f
commit b580a1e
Showing
2 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
crowbar_framework/app/views/barclamp/openstack/_index.html.haml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,36 @@ | ||
%section.box70#banner | ||
%div#instructions | ||
= t('.instructions') | ||
%dl#options | ||
%dt= t('.select') | ||
%dd= select 'flavor', 'pick', { t('.hybrid')=>'*', t('.storage')=>'s', t('.compute')=>'c'}, :selected => "*" | ||
|
||
:javascript | ||
$('#graphic').attr('src','/images/powered-by-openstack.png'); | ||
$('#banner').attr('visibility','show'); | ||
$('#flavor_pick').change(function (obj) { | ||
flavor = $(this).val(); | ||
$('.barclamp').each(function(index, obj) { | ||
show = true; | ||
if (flavor!='*') { | ||
switch(obj.id) | ||
{ | ||
case 'nova': | ||
show = flavor=='c'; | ||
break; | ||
case 'swift': | ||
show = flavor=='s'; | ||
break; | ||
case 'glance': | ||
show = flavor=='c'; | ||
break; | ||
default: | ||
show = true; | ||
} | ||
} | ||
obj.style.display = (show ? '' : 'none'); | ||
}); | ||
}) | ||
|
||
|
||
= render :partial => 'barclamp/index' |