-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refact: clean-up breadcrumb invocations
- Loading branch information
1 parent
b25f5ff
commit 3bdf661
Showing
32 changed files
with
87 additions
and
176 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
import Controller from '@ember/controller'; | ||
|
||
export default class AllocationsAllocationTaskController extends Controller { | ||
get breadcrumbs() { | ||
const model = this.model; | ||
if (!model) return []; | ||
return [ | ||
{ | ||
title: 'Task', | ||
label: model.get('name'), | ||
args: ['allocations.allocation.task', model.get('allocation'), model], | ||
}, | ||
]; | ||
get task() { | ||
return this.model; | ||
} | ||
|
||
get breadcrumb() { | ||
return { | ||
title: 'Task', | ||
label: this.task.get('name'), | ||
args: ['allocations.allocation.task', this.task.get('allocation'), this.task], | ||
}; | ||
} | ||
} |
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
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,15 +1,15 @@ | ||
import Controller from '@ember/controller'; | ||
|
||
export default class ClientsClientController extends Controller { | ||
get breadcrumbs() { | ||
const model = this.model; | ||
if (!model) return []; | ||
return [ | ||
{ | ||
title: 'Client', | ||
label: model.get('shortId'), | ||
args: ['clients.client', model.get('id')], | ||
}, | ||
]; | ||
get client() { | ||
return this.model; | ||
} | ||
|
||
get breadcrumb() { | ||
return { | ||
title: 'Client', | ||
label: this.client.get('shortId'), | ||
args: ['clients.client', this.client.get('id')], | ||
}; | ||
} | ||
} |
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
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
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
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
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,10 +1,4 @@ | ||
import Controller from '@ember/controller'; | ||
|
||
export default class JobsController extends Controller { | ||
breadcrumbs = [ | ||
{ | ||
label: 'Jobs', | ||
args: ['jobs.index'], | ||
}, | ||
]; | ||
} | ||
// The WithNamespaceResetting Mixin uses Controller Injection and requires us to keep this controller around | ||
export default class JobsController extends Controller {} |
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
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,10 +1,4 @@ | ||
import Controller from '@ember/controller'; | ||
|
||
export default class JobsJobDispatchController extends Controller { | ||
breadcrumbs = [ | ||
{ | ||
label: 'Dispatch', | ||
args: ['jobs.job.dispatch'], | ||
}, | ||
]; | ||
} | ||
// This may be safe to remove but we can't be sure, some route may try access this directly using this.controllerFor | ||
export default class JobsJobDispatchController extends Controller {} |
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
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
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
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
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
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
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
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,4 +1 @@ | ||
{{#each this.breadcrumbs as |crumb|}} | ||
<Breadcrumb @crumb={{crumb}} /> | ||
{{/each}} | ||
{{outlet}} | ||
<Breadcrumb @crumb={{this.breadcrumb}} />{{outlet}} |
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,6 +1,4 @@ | ||
{{#each this.breadcrumbs as |crumb|}} | ||
<Breadcrumb @crumb={{crumb}} /> | ||
{{/each}} | ||
<Breadcrumb @crumb={{hash label="Clients" args=(array "clients.index")}} /> | ||
<PageLayout> | ||
{{outlet}} | ||
</PageLayout> |
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,4 +1 @@ | ||
{{#each this.breadcrumbs as |crumb|}} | ||
<Breadcrumb @crumb={{crumb}} /> | ||
{{/each}} | ||
{{outlet}} | ||
<Breadcrumb @crumb={{this.breadcrumb}} />{{outlet}} |
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,4 +1 @@ | ||
{{#each this.breadcrumbs as |crumb|}} | ||
<Breadcrumb @crumb={{crumb}} /> | ||
{{/each}} | ||
{{outlet}} | ||
<Breadcrumb @crumb={{hash label="Storage" args=(array "csi.index")}} />{{outlet}} |
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,4 +1 @@ | ||
{{#each this.breadcrumbs as |crumb|}} | ||
<Breadcrumb @crumb={{crumb}} /> | ||
{{/each}} | ||
{{outlet}} | ||
<Breadcrumb @crumb={{hash label="Storage" args=(array "csi.index")}} />{{outlet}} |
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,6 +1,4 @@ | ||
{{#each this.breadcrumbs as |crumb|}} | ||
<Breadcrumb @crumb={{crumb}} /> | ||
{{/each}} | ||
<Breadcrumb @crumb={{hash label="Jobs" args=(array "jobs.index")}} /> | ||
<PageLayout> | ||
{{outlet}} | ||
</PageLayout> |
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,4 +1 @@ | ||
{{#each this.breadcrumbs as |crumb|}} | ||
<Breadcrumb @crumb={{crumb}} /> | ||
{{/each}} | ||
{{outlet}} | ||
<Breadcrumb @crumb={{hash type="job" job=this.job}} />{{outlet}} |
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
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
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
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
Oops, something went wrong.