refactor: remove double each in app breadcrumbs

This commit is contained in:
Jai Bhagat 2021-12-14 14:15:19 -05:00
parent 63d096a56a
commit 5cc0fc20cc
17 changed files with 70 additions and 31 deletions

View File

@ -1 +1,4 @@
{{outlet}}<Breadcrumb @bucket="navigation" @crumb={{this.breadcrumbs}} />
{{#each this.breadcrumbs as |crumb|}}
<Breadcrumb @crumb={{crumb}} />
{{/each}}
{{outlet}}

View File

@ -1 +1,4 @@
{{outlet}}<Breadcrumb @bucket="navigation" @crumb={{this.breadcrumbs}} />
{{#each this.breadcrumbs as |crumb|}}
<Breadcrumb @crumb={{crumb}} />
{{/each}}
{{outlet}}

View File

@ -1,4 +1,6 @@
{{#each this.breadcrumbs as |crumb|}}
<Breadcrumb @crumb={{crumb}} />
{{/each}}
<PageLayout>
{{outlet}}
</PageLayout>
<Breadcrumb @bucket="navigation" @crumb={{this.breadcrumbs}} />
</PageLayout>

View File

@ -1 +1,4 @@
{{outlet}}<Breadcrumb @bucket="navigation" @crumb={{this.breadcrumbs}} />
{{#each this.breadcrumbs as |crumb|}}
<Breadcrumb @crumb={{crumb}} />
{{/each}}
{{outlet}}

View File

@ -1,7 +1,7 @@
<Breadcrumbs as |bb|>
{{#each bb as |breadcrumb|}}
{{#each breadcrumb.args.crumb as |b|}}
{{component (concat "breadcrumbs/" (or b.type "default")) crumb=b}}
{{/each}}
<Breadcrumbs as |breadcrumbs|>
{{#each breadcrumbs as |crumb|}}
{{#let crumb.args.crumb as |c|}}
{{component (concat "breadcrumbs/" (or c.type "default")) crumb=c}}
{{/let}}
{{/each}}
</Breadcrumbs>

View File

@ -1 +1,4 @@
{{outlet}}<Breadcrumb @bucket="navigation" @crumb={{this.breadcrumbs}} />
{{#each this.breadcrumbs as |crumb|}}
<Breadcrumb @crumb={{crumb}} />
{{/each}}
{{outlet}}

View File

@ -1 +1,4 @@
{{outlet}}<Breadcrumb @bucket="navigation" @crumb={{this.breadcrumbs}} />
{{#each this.breadcrumbs as |crumb|}}
<Breadcrumb @crumb={{crumb}} />
{{/each}}
{{outlet}}

View File

@ -1 +1,4 @@
{{outlet}}<Breadcrumb @bucket="navigation" @crumb={{this.breadcrumbs}} />
{{#each this.breadcrumbs as |crumb|}}
<Breadcrumb @crumb={{crumb}} />
{{/each}}
{{outlet}}

View File

@ -1,3 +1,6 @@
{{#each this.breadcrumbs as |crumb|}}
<Breadcrumb @crumb={{crumb}} />
{{/each}}
{{page-title "CSI Volume " this.model.name}}
<section class="section with-headspace">
<h1 class="title" data-test-title>
@ -187,5 +190,4 @@
</table>
</div>
</div>
</section>
<Breadcrumb @bucket="navigation" @crumb={{this.breadcrumbs}} />
</section>

View File

@ -1,4 +1,6 @@
<Breadcrumb @bucket="navigation" @crumb={{this.breadcrumbs}} />
{{#each this.breadcrumbs as |crumb|}}
<Breadcrumb @crumb={{crumb}} />
{{/each}}
<PageLayout>
{{outlet}}
</PageLayout>

View File

@ -1 +1,4 @@
{{outlet}}<Breadcrumb @bucket="navigation" @crumb={{this.breadcrumbs}} />
{{#each this.breadcrumbs as |crumb|}}
<Breadcrumb @crumb={{crumb}} />
{{/each}}
{{outlet}}

View File

@ -1,6 +1,8 @@
{{#each this.breadcrumbs as |crumb|}}
<Breadcrumb @crumb={{crumb}} />
{{/each}}
{{page-title "Dispatch new " this.model.name}}
<JobSubnav @job={{this.model}} />
<section class="section">
<JobDispatch @job={{this.model}} />
</section>
<Breadcrumb @bucket="navigation" @crumb={{this.breadcrumbs}} />
</section>

View File

@ -1,3 +1,6 @@
{{#each this.breadcrumbs as |crumb|}}
<Breadcrumb @crumb={{crumb}} />
{{/each}}
{{page-title "Task group " this.model.name " - Job " this.model.job.name}}
<div class="tabs is-subnav">
<ul>
@ -318,5 +321,4 @@
</div>
</div>
{{/if}}
</section>
<Breadcrumb @bucket="navigation" @crumb={{this.breadcrumbs}} />
</section>

View File

@ -1,5 +1,7 @@
{{#each this.breadcrumbs as |crumb|}}
<Breadcrumb @crumb={{crumb}} />
{{/each}}
{{page-title "Run a job"}}
<section class="section">
<JobEditor @job={{this.model}} @context="new" @onSubmit={{action this.onSubmit}} />
</section>
<Breadcrumb @bucket="navigation" @crumb={{this.breadcrumbs}} />
</section>

View File

@ -1,3 +1,6 @@
{{#each this.breadcrumbs as |crumb|}}
<Breadcrumb @crumb={{crumb}} />
{{/each}}
<PageLayout>
<section class="section">
{{#if this.summaries}}
@ -12,7 +15,7 @@
{{this.summaries.length}}
{{pluralize "recommendation" this.summaries.length}}
..."
..."
/>
{{/if}}
</div>
@ -122,5 +125,4 @@
</div>
{{/if}}
</section>
</PageLayout>
<Breadcrumb @bucket="navigation" @crumb={{this.breadcrumbs}} />
</PageLayout>

View File

@ -1,4 +1,6 @@
{{#each this.breadcrumbs as |crumb|}}
<Breadcrumb @crumb={{crumb}} />
{{/each}}
<PageLayout>
{{outlet}}
</PageLayout>
<Breadcrumb @bucket="navigation" @crumb={{this.breadcrumbs}} />
</PageLayout>

View File

@ -1,3 +1,6 @@
{{#each this.breadcrumbs as |crumb|}}
<Breadcrumb @crumb={{crumb}} />
{{/each}}
{{page-title "Cluster Topology"}}
<PageLayout>
<section class="section is-full-width">
@ -16,7 +19,7 @@
{{if (eq this.filteredNodes.length 1) "client was" "clients were"}}
filtered from the topology visualization. This is most likely due to the
{{pluralize "client" this.filteredNodes.length}}
running a version of Nomad <0.9.0.
running a version of Nomad
</p>
</div>
<div class="column is-centered is-minimum">
@ -473,5 +476,4 @@
</div>
{{/if}}
</section>
</PageLayout>
<Breadcrumb @bucket="navigation" @crumb={{this.breadcrumbs}} />
</PageLayout>