Merge pull request #1250 from vincent99/master

Show custom driver again
This commit is contained in:
Vincent Fiduccia 2017-07-05 11:09:55 -07:00 committed by GitHub
commit 1ebe26905d
5 changed files with 12 additions and 21 deletions

View File

@ -2,10 +2,6 @@
<section class="pt-10">
{{#if showPicker}}
<div class="row nav nav-boxes checked-active">
{{#if allowCustom}}
<a {{action "switchDriver" "custom"}} alt="custom" class="col nav-box-item driver machine-driver custom {{if (eq driver 'custom') 'active'}}" href="#"></a>
{{/if}}
{{#each sortedDrivers as |choice|}}
{{#if choice.hasUi}}
<a {{action "switchDriver" choice.name}} alt={{choice.name}} class="col nav-box-item driver machine-driver {{choice.name}} {{if (eq choice.name driver) 'active'}}" href="#"></a>
@ -15,6 +11,10 @@
{{#if (and allowOther hasOther)}}
<a {{action "switchDriver" "other"}} alt="other" class="col nav-box-item driver machine-driver other {{if (eq driver 'other') 'active'}}" href="#"></a>
{{/if}}
{{#if allowCustom}}
<a {{action "switchDriver" "custom"}} alt="custom" class="col nav-box-item driver machine-driver custom {{if (eq driver 'custom') 'active'}}" href="#"></a>
{{/if}}
</div>
{{/if}}
{{#if (and access.admin (not forCatalog))}}

View File

@ -8,7 +8,7 @@ export default Ember.Route.extend({
host : Ember.inject.service(),
backTo : null,
defaultDriver: 'custom',
defaultDriver: '',
lastDriver: null,
queryParams: {

View File

@ -4,4 +4,4 @@
</h1>
</section>
{{add-host allowCustom=false model=model driver=driver hostId=hostId completed=(action 'completed') goBack=(route-action 'goBack') savedHost=(route-action 'savedHost')}}
{{add-host allowCustom=(not app.isCaas) model=model driver=driver hostId=hostId completed=(action 'completed') goBack=(route-action 'goBack') savedHost=(route-action 'savedHost')}}

View File

@ -5,23 +5,13 @@
</section>
<section class="clearfix">
{{!-- <div class="row pt-20 pb-20 mt-10 border-dash">
<div class="col span-6 offset-3 text-center mt-0">
<img style="width: 50%;" src="{{app.baseAssets}}assets/images/resources/container.svg"/>
<hr class="m-10" />
<h2 class="text-muted mb-5">{{t 'hostTemplatesPage.new.title'}}</h2>
<p class="help-block mb-10">{{t 'hostTemplatesPage.new.helpText'}}</p>
{{#link-to "hosts.new" classNames="btn bg-primary"}}{{t 'hostTemplatesPage.new.btn'}}{{/link-to}}
</div>
</div> --}}
{{#each arranged as |host|}}
<div class="catalog-box cloud-host bg-secondary ml-0">
<h2 class="darken p-20 m-0" style="color: white;">{{t 'hostTemplatesPage.new.title'}}</h2>
<div class="itemwrap"><p>{{t 'hostTemplatesPage.new.helpText'}}</p></div>
{{#link-to "hosts.new" classNames="btn bg-info"}}{{t 'hostTemplatesPage.new.btn'}}{{/link-to}}
</div>
<div class="itemwrap"><p>{{t 'hostTemplatesPage.new.helpText'}}</p></div>
{{#link-to "hosts.new" classNames="btn bg-info"}}{{t 'hostTemplatesPage.new.btn'}}{{/link-to}}
</div>
{{#each arranged as |host|}}
{{#catalog-box
model=model
classNames='cloud-host'

View File

@ -20,8 +20,9 @@ export default Ember.Service.extend({
access : Ember.inject.service(),
projects : Ember.inject.service(),
settings : Ember.inject.service(),
machineDrivers: null,
defaultDriver: 'custom',
defaultDriver: '',
loadAllDrivers() {
let us = this.get('userStore');
let drivers = [];