Skip to content

Commit

Permalink
Add selector dropdown to pick openstack flavor to install.
Browse files Browse the repository at this point in the history
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
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
6 changes: 5 additions & 1 deletion crowbar.yml
Expand Up @@ -67,4 +67,8 @@ locale_additions:
state: Status
proposal: Proposal
description: Description
instructions: Apply proposals in order from top to bottom. Allow each proposal to complete to ready before applying the next one.
instructions: Apply proposals in order from top to bottom. Allow each proposal to complete to ready before applying the next one.
select: Select Deployment Type
hybrid: Hybrid/All
compute: Compute IaaS
storage: Object STaaS
28 changes: 28 additions & 0 deletions crowbar_framework/app/views/barclamp/openstack/_index.html.haml
@@ -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'

0 comments on commit b580a1e

Please sign in to comment.