chore: Add host(s) breadcrumbs

This commit is contained in:
Susmitha Girumala committed 2020-08-20 15:38:49 -04:00
1 parent a1ab9580c1
commit fc75b1df9e
8 files changed
+93 -2

No files matched your search

@@ -0,0 +1,20 @@
import Controller from '@ember/controller';
import { inject as service } from '@ember/service';
export default class ScopesScopeProjectsProjectHostCatalogsHostCatalogHostsController extends Controller {
// =services
@service intl;
// =attributes
/**
* Hosts breadcrumb
* @type {string}
*/
get breadCrumb() {
return this.intl.t('resources.hosts');
}
}
@@ -0,0 +1,15 @@
import Controller from '@ember/controller';
export default class ScopesScopeProjectsProjectHostCatalogsHostCatalogHostsHostController extends Controller {
// =attributes
/**
* Host breadcrumb
* @type {string}
*/
get breadCrumb() {
return this.model.displayName;
}
}
@@ -0,0 +1,20 @@
import Controller from '@ember/controller';
import { inject as service } from '@ember/service';
export default class ScopesScopeProjectsProjectHostCatalogsHostCatalogHostsNewController extends Controller {
// =services
@service intl;
// =attributes
/**
* Translated new host breadcrumb
* @type {string}
*/
get breadCrumb() {
return this.intl.t('titles.new');
}
}
@@ -24,7 +24,7 @@ export default class ScopesScopeProjectsProjectHostCatalogsHostCatalogHostSetsHo
* @param {object} model
*/
renderTemplate(controller, model) {
this.render('scopes/scope/projects/project/host-catalogs/host-catalog/host-sets');
super.renderTemplate(...arguments);
this.render('scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/-header', {
into: 'scopes/scope/projects/project/host-catalogs/host-catalog',
@@ -24,7 +24,7 @@ export default class ScopesScopeProjectsProjectHostCatalogsHostCatalogHostsHostR
* @param {object} model
*/
renderTemplate(controller, model) {
this.render('scopes/scope/projects/project/host-catalogs/host-catalog/hosts');
super.renderTemplate(...arguments);
this.render('scopes/scope/projects/project/host-catalogs/host-catalog/hosts/-header', {
into: 'scopes/scope/projects/project/host-catalogs/host-catalog',
@@ -0,0 +1,12 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
module('Unit | Controller | scopes/scope/projects/project/host-catalogs/host-catalog/hosts', function(hooks) {
setupTest(hooks);
// Replace this with your real tests.
test('it exists', function(assert) {
let controller = this.owner.lookup('controller:scopes/scope/projects/project/host-catalogs/host-catalog/hosts');
assert.ok(controller);
});
});
@@ -0,0 +1,12 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
module('Unit | Controller | scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host', function(hooks) {
setupTest(hooks);
// Replace this with your real tests.
test('it exists', function(assert) {
let controller = this.owner.lookup('controller:scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host');
assert.ok(controller);
});
});
@@ -0,0 +1,12 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
module('Unit | Controller | scopes/scope/projects/project/host-catalogs/host-catalog/hosts/new', function(hooks) {
setupTest(hooks);
// Replace this with your real tests.
test('it exists', function(assert) {
let controller = this.owner.lookup('controller:scopes/scope/projects/project/host-catalogs/host-catalog/hosts/new');
assert.ok(controller);
});
});