container grouping

This commit is contained in:
Vincent Fiduccia 2017-08-29 10:31:43 -07:00
parent 0cd45ec46c
commit a468afe506
No known key found for this signature in database
GPG Key ID: 2B29AD6BB2BB2582
5 changed files with 14 additions and 7 deletions

View File

@ -1,7 +1,7 @@
{{#if projectController.showClusterWelcome}}
{{cluster-welcome}}
{{else}}
{{#containers-header tags=tags}}
{{#containers-header tags=tags simpleMode=simpleMode}}
{{#link-to "new-stack" classNames="btn btn-sm bg-default mr-10"}}{{t 'nav.containers.importCompose'}}{{/link-to}}
{{#link-to "balancers.run" projects.current.id class="btn btn-sm bg-primary"}}{{t 'nav.containers.addBalancer'}}{{/link-to}}
{{/containers-header}}

View File

@ -6,6 +6,8 @@ export default Ember.Component.extend({
projects: Ember.inject.service(),
tags: null,
simpleMode: false,
showGroup: true,
tagName: '',

View File

@ -36,13 +36,18 @@
</div>
{{/if}}
{{#unless simpleMode}}
{{#if showGroup}}
<div class="btn-group p-0 mr-10">
{{#link-to (query-params group="none") classNames="btn btn-sm bg-default" tooltip=(t 'nav.containers.groupNone')}}<i class="icon icon-container"></i>{{/link-to}}
{{#link-to (query-params group="service") classNames="btn btn-sm bg-default" tooltip=(t 'nav.containers.groupService')}}<i class="icon icon-service"></i>{{/link-to}}
{{#link-to (query-params group="stack") classNames="btn btn-sm bg-default" tooltip=(t 'nav.containers.groupStack')}}<i class="icon icon-list-nested"></i>{{/link-to}}
{{#if simpleMode}}
{{!-- In simple the stack one isn't shown, but pretend it's the default --}}
{{#link-to (query-params group="stack") classNames="btn btn-sm bg-default" tooltip=(t 'nav.containers.groupService')}}<i class="icon icon-service"></i>{{/link-to}}
{{else}}
{{#link-to (query-params group="service") classNames="btn btn-sm bg-default" tooltip=(t 'nav.containers.groupService')}}<i class="icon icon-service"></i>{{/link-to}}
{{#link-to (query-params group="stack") classNames="btn btn-sm bg-default" tooltip=(t 'nav.containers.groupStack')}}<i class="icon icon-list-nested"></i>{{/link-to}}
{{/if}}
</div>
{{/unless}}
{{/if}}
{{yield}}
</div>

View File

@ -1,7 +1,7 @@
{{#if projectController.showClusterWelcome}}
{{cluster-welcome}}
{{else}}
{{#containers-header tags=tags}}
{{#containers-header simpleMode=simpleMode tags=tags showGroup=false}}
{{#link-to "new-stack" classNames="btn btn-sm bg-default mr-10"}}{{t 'nav.containers.importCompose'}}{{/link-to}}
{{#link-to "dns.new" projects.current.id class="btn btn-sm bg-primary"}}{{t 'nav.containers.addDns'}}{{/link-to}}
{{/containers-header}}

View File

@ -1,7 +1,7 @@
{{#if projectController.showClusterWelcome}}
{{cluster-welcome}}
{{else}}
{{#containers-header tags=tags}}
{{#containers-header simpleMode=simpleMode tags=tags showGroup=false}}
{{#link-to "new-stack" classNames="btn btn-sm bg-default mr-10"}}{{t 'nav.containers.importCompose'}}{{/link-to}}
{{#link-to "volumes.new" projects.current.id class="btn btn-sm bg-primary"}}{{t 'nav.containers.addVolume'}}{{/link-to}}
{{/containers-header}}