mirror of
https://github.com/kemko/nomad.git
synced 2026-01-04 17:35:43 +03:00
Remove all references to breadcrumbs outside of routes
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
import Component from '@ember/component';
|
||||
import { computed } from '@ember/object';
|
||||
import { inject as service } from '@ember/service';
|
||||
import { qpBuilder } from 'nomad-ui/utils/classes/query-params';
|
||||
|
||||
export default Component.extend({
|
||||
system: service(),
|
||||
@@ -20,23 +18,6 @@ export default Component.extend({
|
||||
// Set to a { title, description } to surface an error
|
||||
errorMessage: null,
|
||||
|
||||
breadcrumbs: computed('job.{name,id}', function() {
|
||||
const job = this.get('job');
|
||||
return [
|
||||
{ label: 'Jobs', args: ['jobs'] },
|
||||
{
|
||||
label: job.get('name'),
|
||||
args: [
|
||||
'jobs.job',
|
||||
job,
|
||||
qpBuilder({
|
||||
jobNamespace: job.get('namespace.name') || 'default',
|
||||
}),
|
||||
],
|
||||
},
|
||||
];
|
||||
}),
|
||||
|
||||
actions: {
|
||||
clearErrorMessage() {
|
||||
this.set('errorMessage', null);
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
import Controller from '@ember/controller';
|
||||
import { computed } from '@ember/object';
|
||||
import { qpBuilder } from 'nomad-ui/utils/classes/query-params';
|
||||
|
||||
export default Controller.extend({
|
||||
breadcrumbs: computed('model.job', function() {
|
||||
return [
|
||||
{ label: 'Jobs', args: ['jobs'] },
|
||||
{
|
||||
label: this.get('model.job.name'),
|
||||
args: [
|
||||
'jobs.job',
|
||||
this.get('model.job.plainId'),
|
||||
qpBuilder({
|
||||
jobNamespace: this.get('model.job.namespace.name') || 'default',
|
||||
}),
|
||||
],
|
||||
},
|
||||
{
|
||||
label: this.get('model.taskGroupName'),
|
||||
args: [
|
||||
'jobs.job.task-group',
|
||||
this.get('model.job'),
|
||||
this.get('model.taskGroupName'),
|
||||
qpBuilder({
|
||||
jobNamespace: this.get('model.namespace.name') || 'default',
|
||||
}),
|
||||
],
|
||||
},
|
||||
{
|
||||
label: this.get('model.shortId'),
|
||||
args: ['allocations.allocation', this.get('model')],
|
||||
},
|
||||
];
|
||||
}),
|
||||
});
|
||||
@@ -1,11 +1,9 @@
|
||||
import { alias } from '@ember/object/computed';
|
||||
import Controller, { inject as controller } from '@ember/controller';
|
||||
import Controller from '@ember/controller';
|
||||
import Sortable from 'nomad-ui/mixins/sortable';
|
||||
import { lazyClick } from 'nomad-ui/helpers/lazy-click';
|
||||
|
||||
export default Controller.extend(Sortable, {
|
||||
allocationController: controller('allocations.allocation'),
|
||||
|
||||
queryParams: {
|
||||
sortProperty: 'sort',
|
||||
sortDescending: 'desc',
|
||||
@@ -14,8 +12,6 @@ export default Controller.extend(Sortable, {
|
||||
sortProperty: 'name',
|
||||
sortDescending: false,
|
||||
|
||||
breadcrumbs: alias('allocationController.breadcrumbs'),
|
||||
|
||||
listToSort: alias('model.states'),
|
||||
sortedStates: alias('listSorted'),
|
||||
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
import Controller, { inject as controller } from '@ember/controller';
|
||||
import { computed } from '@ember/object';
|
||||
|
||||
export default Controller.extend({
|
||||
allocationController: controller('allocations.allocation'),
|
||||
|
||||
breadcrumbs: computed('allocationController.breadcrumbs.[]', 'model.name', function() {
|
||||
return this.get('allocationController.breadcrumbs').concat([
|
||||
{
|
||||
label: this.get('model.name'),
|
||||
args: ['allocations.allocation.task', this.get('model.allocation'), this.get('model')],
|
||||
},
|
||||
]);
|
||||
}),
|
||||
});
|
||||
@@ -1,12 +1,8 @@
|
||||
import Controller, { inject as controller } from '@ember/controller';
|
||||
import Controller from '@ember/controller';
|
||||
import { computed } from '@ember/object';
|
||||
import { alias } from '@ember/object/computed';
|
||||
|
||||
export default Controller.extend({
|
||||
taskController: controller('allocations.allocation.task'),
|
||||
|
||||
breadcrumbs: alias('taskController.breadcrumbs'),
|
||||
|
||||
network: alias('model.resources.networks.firstObject'),
|
||||
ports: computed('network.reservedPorts.[]', 'network.dynamicPorts.[]', function() {
|
||||
return (this.get('network.reservedPorts') || [])
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
import Controller, { inject as controller } from '@ember/controller';
|
||||
import { alias } from '@ember/object/computed';
|
||||
|
||||
export default Controller.extend({
|
||||
taskController: controller('allocations.allocation.task'),
|
||||
breadcrumbs: alias('taskController.breadcrumbs'),
|
||||
});
|
||||
@@ -1,21 +0,0 @@
|
||||
import Controller from '@ember/controller';
|
||||
import { computed } from '@ember/object';
|
||||
import { qpBuilder } from 'nomad-ui/utils/classes/query-params';
|
||||
|
||||
export default Controller.extend({
|
||||
breadcrumbs: computed('model.{name,id}', function() {
|
||||
return [
|
||||
{ label: 'Jobs', args: ['jobs'] },
|
||||
{
|
||||
label: this.get('model.name'),
|
||||
args: [
|
||||
'jobs.job',
|
||||
this.get('model.plainId'),
|
||||
qpBuilder({
|
||||
jobNamespace: this.get('model.namespace.name') || 'default',
|
||||
}),
|
||||
],
|
||||
},
|
||||
];
|
||||
}),
|
||||
});
|
||||
@@ -1,11 +1,4 @@
|
||||
import { alias } from '@ember/object/computed';
|
||||
import Controller, { inject as controller } from '@ember/controller';
|
||||
import Controller from '@ember/controller';
|
||||
import WithNamespaceResetting from 'nomad-ui/mixins/with-namespace-resetting';
|
||||
|
||||
export default Controller.extend(WithNamespaceResetting, {
|
||||
jobController: controller('jobs.job'),
|
||||
|
||||
job: alias('model.job'),
|
||||
|
||||
breadcrumbs: alias('jobController.breadcrumbs'),
|
||||
});
|
||||
export default Controller.extend(WithNamespaceResetting);
|
||||
|
||||
@@ -1,12 +1,4 @@
|
||||
import { alias } from '@ember/object/computed';
|
||||
import Controller, { inject as controller } from '@ember/controller';
|
||||
import Controller from '@ember/controller';
|
||||
import WithNamespaceResetting from 'nomad-ui/mixins/with-namespace-resetting';
|
||||
|
||||
export default Controller.extend(WithNamespaceResetting, {
|
||||
jobController: controller('jobs.job'),
|
||||
|
||||
job: alias('model'),
|
||||
deployments: alias('model.deployments'),
|
||||
|
||||
breadcrumbs: alias('jobController.breadcrumbs'),
|
||||
});
|
||||
export default Controller.extend(WithNamespaceResetting);
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
import { inject as service } from '@ember/service';
|
||||
import { alias } from '@ember/object/computed';
|
||||
import Controller, { inject as controller } from '@ember/controller';
|
||||
import Controller from '@ember/controller';
|
||||
import WithNamespaceResetting from 'nomad-ui/mixins/with-namespace-resetting';
|
||||
|
||||
export default Controller.extend(WithNamespaceResetting, {
|
||||
system: service(),
|
||||
|
||||
jobController: controller('jobs.job'),
|
||||
|
||||
queryParams: {
|
||||
currentPage: 'page',
|
||||
sortProperty: 'sort',
|
||||
@@ -19,9 +16,6 @@ export default Controller.extend(WithNamespaceResetting, {
|
||||
sortProperty: 'name',
|
||||
sortDescending: false,
|
||||
|
||||
breadcrumbs: alias('jobController.breadcrumbs'),
|
||||
job: alias('model'),
|
||||
|
||||
actions: {
|
||||
gotoTaskGroup(taskGroup) {
|
||||
this.transitionToRoute('jobs.job.task-group', taskGroup.get('job'), taskGroup);
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
import { alias } from '@ember/object/computed';
|
||||
import Controller, { inject as controller } from '@ember/controller';
|
||||
|
||||
export default Controller.extend({
|
||||
jobController: controller('jobs.job'),
|
||||
breadcrumbs: alias('jobController.breadcrumbs'),
|
||||
});
|
||||
@@ -1,14 +1,11 @@
|
||||
import { alias } from '@ember/object/computed';
|
||||
import Controller, { inject as controller } from '@ember/controller';
|
||||
import Controller from '@ember/controller';
|
||||
import { computed } from '@ember/object';
|
||||
import Sortable from 'nomad-ui/mixins/sortable';
|
||||
import Searchable from 'nomad-ui/mixins/searchable';
|
||||
import WithNamespaceResetting from 'nomad-ui/mixins/with-namespace-resetting';
|
||||
import { qpBuilder } from 'nomad-ui/utils/classes/query-params';
|
||||
|
||||
export default Controller.extend(Sortable, Searchable, WithNamespaceResetting, {
|
||||
jobController: controller('jobs.job'),
|
||||
|
||||
queryParams: {
|
||||
currentPage: 'page',
|
||||
searchTerm: 'search',
|
||||
@@ -32,19 +29,6 @@ export default Controller.extend(Sortable, Searchable, WithNamespaceResetting, {
|
||||
listToSearch: alias('listSorted'),
|
||||
sortedAllocations: alias('listSearched'),
|
||||
|
||||
breadcrumbs: computed('jobController.breadcrumbs.[]', 'model.{name}', function() {
|
||||
return this.get('jobController.breadcrumbs').concat([
|
||||
{
|
||||
label: this.get('model.name'),
|
||||
args: [
|
||||
'jobs.job.task-group',
|
||||
this.get('model.name'),
|
||||
qpBuilder({ jobNamespace: this.get('model.job.namespace.name') || 'default' }),
|
||||
],
|
||||
},
|
||||
]);
|
||||
}),
|
||||
|
||||
actions: {
|
||||
gotoAllocation(allocation) {
|
||||
this.transitionToRoute('allocations.allocation', allocation);
|
||||
|
||||
@@ -1,12 +1,4 @@
|
||||
import { alias } from '@ember/object/computed';
|
||||
import Controller, { inject as controller } from '@ember/controller';
|
||||
import Controller from '@ember/controller';
|
||||
import WithNamespaceResetting from 'nomad-ui/mixins/with-namespace-resetting';
|
||||
|
||||
export default Controller.extend(WithNamespaceResetting, {
|
||||
jobController: controller('jobs.job'),
|
||||
|
||||
job: alias('model'),
|
||||
versions: alias('model.versions'),
|
||||
|
||||
breadcrumbs: alias('jobController.breadcrumbs'),
|
||||
});
|
||||
export default Controller.extend(WithNamespaceResetting);
|
||||
|
||||
@@ -4,6 +4,6 @@
|
||||
{{#gutter-menu class="page-body" onNamespaceChange=(action "gotoJobs")}}
|
||||
{{partial "jobs/job/subnav"}}
|
||||
<section class="section">
|
||||
{{job-deployments-stream deployments=deployments}}
|
||||
{{job-deployments-stream deployments=model.deployments}}
|
||||
</section>
|
||||
{{/gutter-menu}}
|
||||
|
||||
@@ -4,6 +4,6 @@
|
||||
{{#gutter-menu class="page-body" onNamespaceChange=(action "gotoJobs")}}
|
||||
{{partial "jobs/job/subnav"}}
|
||||
<section class="section">
|
||||
{{job-versions-stream versions=versions verbose=true}}
|
||||
{{job-versions-stream versions=model.versions verbose=true}}
|
||||
</section>
|
||||
{{/gutter-menu}}
|
||||
|
||||
Reference in New Issue
Block a user