diff --git a/ui/core/app/controllers/scopes/scope/projects/project/host-catalogs.js b/ui/core/app/controllers/scopes/scope/projects/project/host-catalogs.js new file mode 100644 index 000000000..854de55e2 --- /dev/null +++ b/ui/core/app/controllers/scopes/scope/projects/project/host-catalogs.js @@ -0,0 +1,19 @@ +import Controller from '@ember/controller'; +import { inject as service } from '@ember/service'; + +export default class ScopesScopeProjectsProjectHostCatalogsController extends Controller { + + // =services + + @service intl; + + // =attributes + + /** + * @type {string} + */ + get breadCrumb() { + return this.intl.t('resources.host-catalogs'); + } + +} diff --git a/ui/core/app/controllers/scopes/scope/projects/project/host-catalogs/host-catalog.js b/ui/core/app/controllers/scopes/scope/projects/project/host-catalogs/host-catalog.js new file mode 100644 index 000000000..97fa6533b --- /dev/null +++ b/ui/core/app/controllers/scopes/scope/projects/project/host-catalogs/host-catalog.js @@ -0,0 +1,14 @@ +import Controller from '@ember/controller'; + +export default class ScopesScopeProjectsProjectHostCatalogsHostCatalogController extends Controller { + + // =attributes + + /** + * @type {string} + */ + get breadCrumb() { + return this.model.displayName; + } + +} diff --git a/ui/core/app/router.js b/ui/core/app/router.js index ef3536c60..4385741d0 100644 --- a/ui/core/app/router.js +++ b/ui/core/app/router.js @@ -14,7 +14,12 @@ Router.map(function () { this.route('method', { path: ':auth_method_id'}); }); this.route('projects', function() { - this.route('project', { path: ':project_id' }, function() {}); + this.route('project', { path: ':project_id' }, function() { + this.route('host-catalogs', function() { + this.route('new'); + this.route('host-catalog', { path: ':host_catalog_id' }, function() {}); + }); + }); this.route('new'); }); }); diff --git a/ui/core/app/routes/scopes/scope/projects/project.js b/ui/core/app/routes/scopes/scope/projects/project.js index c2aee8ed3..e5d96124b 100644 --- a/ui/core/app/routes/scopes/scope/projects/project.js +++ b/ui/core/app/routes/scopes/scope/projects/project.js @@ -14,4 +14,19 @@ export default class ScopesScopeProjectsProjectRoute extends Route { return this.store.findRecord('scope', project_id); } + /** + * Renders the project-specific sidebar template. + * @override + * @param {object} controller + * @param {object} model + */ + renderTemplate(controller, model) { + this.render('scopes/scope/projects/project/_sidebar', { + into: 'scopes/scope', + outlet: 'sidebar', + model: model + }); + super.renderTemplate(...arguments); + } + } diff --git a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs.js b/ui/core/app/routes/scopes/scope/projects/project/host-catalogs.js new file mode 100644 index 000000000..de945f71c --- /dev/null +++ b/ui/core/app/routes/scopes/scope/projects/project/host-catalogs.js @@ -0,0 +1,73 @@ +import Route from '@ember/routing/route'; +import { inject as service } from '@ember/service'; +import { action } from '@ember/object'; + +export default class ScopesScopeProjectsProjectHostCatalogsRoute extends Route { + + // =services + + @service notify; + + // =methods + + + /** + * Loads all scopes under the current scope. + * @return {Promise{[HostCatalogModel]}} + */ + async model() { + const scopeID = this.modelFor('scopes.scope.projects.project').id; + return this.store.findAll('host-catalog', { adapterOptions: { scopeID } }); + } + + // =actions + + /** + * Rollback changes on project. + * @param {HostCatalogModel} hostCatalog + */ + @action + cancel(hostCatalog) { + const { isNew } = hostCatalog; + hostCatalog.rollbackAttributes(); + if (isNew) this.transitionTo('scopes.scope.projects.project.host-catalogs'); + } + + /** + * Handle save. + * @param {HostCatalogModel} hostCatalog + * @param {Event} e + */ + @action + async save(hostCatalog) { + try { + await hostCatalog.save(); + this.refresh(); + // TODO: replace with translated strings + this.notify.success('Save succeeded.'); + this.transitionTo('scopes.scope.projects.project.host-catalogs.host-catalog', hostCatalog); + } catch (error) { + // TODO: replace with translated strings + this.notify.error(error.message, { closeAfter: null }); + } + } + + /** + * Deletes the host catalog and redirects to index. + * @param {ProjectModel} project + */ + @action + async delete(project) { + try { + await project.destroyRecord(); + this.refresh(); + this.transitionTo('scopes.scope.projects.project.host-catalogs'); + // TODO: replace with translated strings + this.notify.success('Deleted host catalog succesfully.'); + } catch (error) { + // TODO: replace with translated strings + this.notify.error(error.message, { closeAfter: null }); + } + } + +} diff --git a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog.js b/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog.js new file mode 100644 index 000000000..f54947470 --- /dev/null +++ b/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog.js @@ -0,0 +1,4 @@ +import Route from '@ember/routing/route'; + +export default class ScopesScopeProjectsProjectHostCatalogsHostCatalogRoute extends Route { +} diff --git a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/index.js b/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/index.js new file mode 100644 index 000000000..34bccc035 --- /dev/null +++ b/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/index.js @@ -0,0 +1,4 @@ +import Route from '@ember/routing/route'; + +export default class ScopesScopeProjectsProjectHostCatalogsHostCatalogIndexRoute extends Route { +} diff --git a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/index.js b/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/index.js new file mode 100644 index 000000000..b01277c47 --- /dev/null +++ b/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/index.js @@ -0,0 +1,4 @@ +import Route from '@ember/routing/route'; + +export default class ScopesScopeProjectsProjectHostCatalogsIndexRoute extends Route { +} diff --git a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/new.js b/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/new.js new file mode 100644 index 000000000..22097c23d --- /dev/null +++ b/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/new.js @@ -0,0 +1,19 @@ +import Route from '@ember/routing/route'; + +export default class ScopesScopeProjectsProjectHostCatalogsNewRoute extends Route { + + // =methods + + /** + * Creates a new unsaved host catalog belonging to the current project scope. + * @return {HostCatalogModel} + */ + model() { + const scopeModel = this.modelFor('scopes.scope.projects.project'); + return this.store.createRecord('host-catalog', { + type: 'static', + scopeModel + }); + } + +} diff --git a/ui/core/app/templates/scopes/scope/projects/project/_sidebar.hbs b/ui/core/app/templates/scopes/scope/projects/project/_sidebar.hbs new file mode 100644 index 000000000..8f46f6113 --- /dev/null +++ b/ui/core/app/templates/scopes/scope/projects/project/_sidebar.hbs @@ -0,0 +1,5 @@ + + + {{t "resources.host-catalogs"}} + + diff --git a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs.hbs b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs.hbs new file mode 100644 index 000000000..6ad0035fb --- /dev/null +++ b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs.hbs @@ -0,0 +1,3 @@ +{{title (t "resources.host-catalogs")}} + +{{outlet}} diff --git a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog.hbs b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog.hbs new file mode 100644 index 000000000..d66e83390 --- /dev/null +++ b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog.hbs @@ -0,0 +1,3 @@ +{{title @model.displayName}} + +{{outlet}} diff --git a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/index.hbs b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/index.hbs new file mode 100644 index 000000000..cb0a4a0cf --- /dev/null +++ b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/index.hbs @@ -0,0 +1,35 @@ + + + + + + + +

{{t "resources.host-catalog"}}

+
+ + + + + {{t 'titles.details'}} + + + + + + + + + {{t 'actions.delete'}} + + + +
diff --git a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/index.hbs b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/index.hbs new file mode 100644 index 000000000..8cc81e3db --- /dev/null +++ b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/index.hbs @@ -0,0 +1,71 @@ + + + + + + + +

{{t "resources.host-catalogs"}}

+

{{t "descriptions.host-catalogs"}}

+
+ + + {{#if @model}} + + {{t "titles.new"}} + + {{/if}} + + + + + {{#if @model}} + + + + + {{t "form.label.id"}} + {{t "form.label.name"}} + {{t "form.label.type"}} + + + + {{#each @model as |hostCatalog|}} + + + {{hostCatalog.id}} + + + + {{hostCatalog.displayName}} + +

{{hostCatalog.description}}

+
+ {{hostCatalog.type}} +
+ {{/each}} +
+
+ + {{else}} + + + + + {{t "descriptions.host-catalogs-welcome"}} + + + + {{t "titles.new"}} + + + + + {{/if}} + +
+ +
diff --git a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/new.hbs b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/new.hbs new file mode 100644 index 000000000..0d969f874 --- /dev/null +++ b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/new.hbs @@ -0,0 +1,21 @@ +{{title (t 'titles.new')}} + + + + + + + + +

{{t "titles.new"}}

+
+ + + + + +
diff --git a/ui/core/mirage/scenarios/default.js b/ui/core/mirage/scenarios/default.js index 1bbae80d5..7bc409465 100644 --- a/ui/core/mirage/scenarios/default.js +++ b/ui/core/mirage/scenarios/default.js @@ -3,24 +3,12 @@ export default function(server) { // Scope resources const globalScope = server.create('scope', { id: 'global' }); // creates a global scope - const orgScope = server.create('scope', { + const orgScope = server.createList('scope', 3, { type: 'org', scope: { id: globalScope.id, type: globalScope.type } - }, 'withChildren'); - + }, 'withChildren')[0]; const scope = { id: orgScope.id, type: orgScope.type }; - // Create additional scopes for authentication organization selection - server.create('scope', { - type: 'org', - scope: { id: globalScope.id, type: globalScope.type } - }, 'withChildren'); - - server.create('scope', { - type: 'org', - scope: { id: globalScope.id, type: globalScope.type } - }, 'withChildren'); - // Auth // Auth methods exist both at the global scope and the org scope. @@ -38,6 +26,9 @@ export default function(server) { // Other resources - server.createList('host-catalog', 6); + server.db.scopes.where({type: 'project'}).forEach(projectScope => { + const scope = { id: projectScope.id, type: projectScope.type }; + server.createList('host-catalog', 2, { scope }); + }); } diff --git a/ui/core/tests/acceptance/host-catalogs-test.js b/ui/core/tests/acceptance/host-catalogs-test.js index 4be43309f..96b49cd8c 100644 --- a/ui/core/tests/acceptance/host-catalogs-test.js +++ b/ui/core/tests/acceptance/host-catalogs-test.js @@ -1,52 +1,93 @@ import { module, test } from 'qunit'; -import { visit, currentURL, click, fillIn, find } from '@ember/test-helpers'; +import { visit, currentURL, fillIn, click, find } from '@ember/test-helpers'; import { setupApplicationTest } from 'ember-qunit'; import setupMirage from 'ember-cli-mirage/test-support/setup-mirage'; import a11yAudit from 'ember-a11y-testing/test-support/audit'; import { Response } from 'miragejs'; +import { + authenticateSession, + // These are left here intentionally for future reference. + //currentSession, + //invalidateSession, +} from 'ember-simple-auth/test-support'; module('Acceptance | host catalogs', function(hooks) { setupApplicationTest(hooks); setupMirage(hooks); + const instances = { + scopes: { + global: null, + org: null, + project: null + }, + hostCatalog: null + }; + const urls = { + orgScope: null, + projects: null, + project: null, + hostCatalogs: null, + newHostCatalog: null, + hostCatalog: null + }; + hooks.beforeEach(function () { - this.server.create('org'); + // Setup Mirage mock resources for this test + instances.scopes.global = this.server.create('scope', { id: 'global' }); + instances.scopes.org = this.server.create('scope', { type: 'org', + scope: { id: instances.scopes.global.id, type: instances.scopes.global.type } + }); + instances.scopes.project = this.server.create('scope', { type: 'project', + scope: { id: instances.scopes.org.id, type: instances.scopes.org.type } + }); + instances.hostCatalog = this.server.create('host-catalog', { + scope: { + id: instances.scopes.project.id, + type: instances.scopes.project.type + } + }); + + // Generate route URLs for resources + urls.orgScope = `/scopes/${instances.scopes.org.id}`; + urls.projects = `${urls.orgScope}/projects`; + urls.project = `${urls.projects}/${instances.hostCatalog.scope.id}`; + urls.hostCatalogs = `${urls.project}/host-catalogs`; + urls.newHostCatalog = `${urls.hostCatalogs}/new`; + urls.hostCatalog = `${urls.hostCatalogs}/${instances.hostCatalog.id}`; }); test('visiting host catalogs', async function (assert) { assert.expect(1); - this.server.createList('project', 1); - this.server.createList('host-catalog', 1); - await visit('/orgs/1/projects/1/host-catalogs'); + authenticateSession(); + await visit(urls.hostCatalogs); await a11yAudit(); - assert.equal(currentURL(), '/orgs/1/projects/1/host-catalogs'); + assert.equal(currentURL(), urls.hostCatalogs); }); test('can navigate to host catalog form', async function(assert) { assert.expect(1); - this.server.createList('project', 1); - this.server.createList('host-catalog', 1); - await visit('/orgs/1/projects/1/host-catalogs'); - await click('main .rose-table-cell:first-child a'); + authenticateSession({}); + await visit(urls.hostCatalogs); + await click('main tbody .rose-table-cell:nth-child(2) a'); await a11yAudit(); - assert.equal(currentURL(), '/orgs/1/projects/1/host-catalogs/1'); + assert.equal(currentURL(), urls.hostCatalog); }); test('can delete host catalog', async function(assert) { assert.expect(2); - this.server.createList('project', 1); - this.server.createList('host-catalog', 1); - assert.equal(this.server.db.hostCatalogs.length, 1); - await visit('/orgs/1/projects/1/host-catalogs/1'); + const hostCatalogsCount = this.server.db.hostCatalogs.length; + authenticateSession({}); + await visit(urls.hostCatalog); + assert.equal(currentURL(), urls.hostCatalog); await click('.rose-button-warning'); - assert.equal(this.server.db.hostCatalogs.length, 0); + assert.equal(this.server.db.hostCatalogs.length, hostCatalogsCount - 1); }); test('can update host catalog and save changes', async function(assert) { assert.expect(1); - this.server.createList('project', 1); - this.server.createList('host-catalog', 1); - await visit('/orgs/1/projects/1/host-catalogs/1'); + authenticateSession({}); + await visit(urls.hostCatalog); await fillIn('[name="name"]', 'Test Name'); await click('form [type="submit"]:not(:disabled)'); assert.equal(this.server.db.hostCatalogs[0].name, 'Test Name'); @@ -54,39 +95,36 @@ module('Acceptance | host catalogs', function(hooks) { test('can update host catalog and cancel changes', async function(assert) { assert.expect(1); - this.server.createList('project', 1); - this.server.createList('host-catalog', 1); - await visit('/orgs/1/projects/1/host-catalogs/1'); + authenticateSession({}); + await visit(urls.hostCatalog); await fillIn('[name="name"]', 'Test Name'); await click('form button:not([type="submit"])'); assert.notEqual(this.server.db.hostCatalogs[0].name, 'Test Name'); }); test('can create host catalog and save changes', async function(assert) { - assert.expect(2); - this.server.createList('project', 1); - await visit('/orgs/1/projects/1/host-catalogs/new'); + assert.expect(1); + const hostCatalogsCount = this.server.db.hostCatalogs.length; + authenticateSession({}); + await visit(urls.newHostCatalog); await fillIn('[name="name"]', 'Test Name'); await click('form [type="submit"]:not(:disabled)'); - assert.equal(this.server.db.hostCatalogs.length, 1); - assert.equal(currentURL(), '/orgs/1/projects/1/host-catalogs/1'); + assert.equal(this.server.db.hostCatalogs.length, hostCatalogsCount + 1); }); test('can create host catalog and cancel changes', async function(assert) { - assert.expect(2); - this.server.createList('project', 1); - await visit('/orgs/1/projects/1/host-catalogs/new'); + assert.expect(1); + const hostCatalogsCount = this.server.db.hostCatalogs.length; + authenticateSession({}); + await visit(urls.newHostCatalog); await fillIn('[name="name"]', 'Test Name'); await click('form button:not([type="submit"])'); - assert.equal(this.server.db.hostCatalogs.length, 0); - assert.equal(currentURL(), '/orgs/1/projects/1/host-catalogs'); + assert.equal(this.server.db.hostCatalogs.length, hostCatalogsCount); }); test('errors are displayed when save host catalog fails', async function (assert) { assert.expect(1); - this.server.createList('project', 1); - this.server.createList('host-catalog', 1); - this.server.patch('/orgs/:org_id/projects/:project_id/host-catalogs/:id', () => { + this.server.patch('/scopes/:scope_id/host-catalogs/:id', () => { return new Response( 490, {}, @@ -97,7 +135,8 @@ module('Acceptance | host catalogs', function(hooks) { } ); }); - await visit('/orgs/1/projects/1/host-catalogs/1'); + authenticateSession({}); + await visit(urls.hostCatalog); await fillIn('[name="name"]', 'random string'); await click('form [type="submit"]'); await a11yAudit(); @@ -110,9 +149,7 @@ module('Acceptance | host catalogs', function(hooks) { test('errors are displayed when delete host catalog fails', async function (assert) { assert.expect(1); - this.server.createList('project', 1); - this.server.createList('host-catalog', 1); - this.server.del('/orgs/:org_id/projects/:project_id/host-catalogs/:id', () => { + this.server.del('/scopes/:scope_id/host-catalogs/:id', () => { return new Response( 490, {}, @@ -123,7 +160,8 @@ module('Acceptance | host catalogs', function(hooks) { } ); }); - await visit('/orgs/1/projects/1/host-catalogs/1'); + authenticateSession({}); + await visit(urls.hostCatalog); await click('.rose-button-warning'); await a11yAudit(); assert.ok( @@ -135,7 +173,7 @@ module('Acceptance | host catalogs', function(hooks) { test('saving a new host catalog with invalid fields displays error messages', async function (assert) { assert.expect(2); - this.server.post('/orgs/:org_id/projects/:project_id/host-catalogs', () => { + this.server.post('/scopes/:scope_id/host-catalogs', () => { return new Response( 400, {}, @@ -154,8 +192,8 @@ module('Acceptance | host catalogs', function(hooks) { } ); }); - this.server.createList('project', 1); - await visit('/orgs/1/projects/1/host-catalogs/new'); + authenticateSession({}); + await visit(urls.newHostCatalog); await fillIn('[name="name"]', 'random string'); await click('form [type="submit"]'); await a11yAudit(); @@ -173,9 +211,7 @@ module('Acceptance | host catalogs', function(hooks) { test('saving an existing host catalog with invalid fields displays error messages', async function (assert) { assert.expect(2); - this.server.createList('project', 1); - this.server.createList('host-catalog', 1); - this.server.patch('/orgs/:org_id/projects/:project_id/host-catalogs/:id', () => { + this.server.patch('/scopes/:scope_id/host-catalogs/:id', () => { return new Response( 400, {}, @@ -194,7 +230,8 @@ module('Acceptance | host catalogs', function(hooks) { } ); }); - await visit('/orgs/1/projects/1/host-catalogs/1'); + authenticateSession({}); + await visit(urls.hostCatalog); await fillIn('[name="name"]', 'random string'); await click('form [type="submit"]'); await a11yAudit(); diff --git a/ui/core/tests/unit/controllers/scopes/scope/projects/project/host-catalogs-test.js b/ui/core/tests/unit/controllers/scopes/scope/projects/project/host-catalogs-test.js new file mode 100644 index 000000000..ce6e91cd3 --- /dev/null +++ b/ui/core/tests/unit/controllers/scopes/scope/projects/project/host-catalogs-test.js @@ -0,0 +1,12 @@ +import { module, test } from 'qunit'; +import { setupTest } from 'ember-qunit'; + +module('Unit | Controller | scopes/scope/projects/project/host-catalogs', 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'); + assert.ok(controller); + }); +}); diff --git a/ui/core/tests/unit/controllers/scopes/scope/projects/project/host-catalogs/host-catalog-test.js b/ui/core/tests/unit/controllers/scopes/scope/projects/project/host-catalogs/host-catalog-test.js new file mode 100644 index 000000000..b93e2d1ce --- /dev/null +++ b/ui/core/tests/unit/controllers/scopes/scope/projects/project/host-catalogs/host-catalog-test.js @@ -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', 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'); + assert.ok(controller); + }); +}); diff --git a/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs-test.js b/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs-test.js new file mode 100644 index 000000000..dde4328e4 --- /dev/null +++ b/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs-test.js @@ -0,0 +1,11 @@ +import { module, test } from 'qunit'; +import { setupTest } from 'ember-qunit'; + +module('Unit | Route | scopes/scope/projects/project/host-catalogs', function(hooks) { + setupTest(hooks); + + test('it exists', function(assert) { + let route = this.owner.lookup('route:scopes/scope/projects/project/host-catalogs'); + assert.ok(route); + }); +}); diff --git a/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog-test.js b/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog-test.js new file mode 100644 index 000000000..9cdc47735 --- /dev/null +++ b/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog-test.js @@ -0,0 +1,11 @@ +import { module, test } from 'qunit'; +import { setupTest } from 'ember-qunit'; + +module('Unit | Route | scopes/scope/projects/project/host-catalogs/host-catalog', function(hooks) { + setupTest(hooks); + + test('it exists', function(assert) { + let route = this.owner.lookup('route:scopes/scope/projects/project/host-catalogs/host-catalog'); + assert.ok(route); + }); +}); diff --git a/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/index-test.js b/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/index-test.js new file mode 100644 index 000000000..92f1aa677 --- /dev/null +++ b/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/host-catalog/index-test.js @@ -0,0 +1,11 @@ +import { module, test } from 'qunit'; +import { setupTest } from 'ember-qunit'; + +module('Unit | Route | scopes/scope/projects/project/host-catalogs/host-catalog/index', function(hooks) { + setupTest(hooks); + + test('it exists', function(assert) { + let route = this.owner.lookup('route:scopes/scope/projects/project/host-catalogs/host-catalog/index'); + assert.ok(route); + }); +}); diff --git a/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/index-test.js b/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/index-test.js new file mode 100644 index 000000000..5cc1d842c --- /dev/null +++ b/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/index-test.js @@ -0,0 +1,11 @@ +import { module, test } from 'qunit'; +import { setupTest } from 'ember-qunit'; + +module('Unit | Route | scopes/scope/projects/project/host-catalogs/index', function(hooks) { + setupTest(hooks); + + test('it exists', function(assert) { + let route = this.owner.lookup('route:scopes/scope/projects/project/host-catalogs/index'); + assert.ok(route); + }); +}); diff --git a/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/new-test.js b/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/new-test.js new file mode 100644 index 000000000..96ccdff8b --- /dev/null +++ b/ui/core/tests/unit/routes/scopes/scope/projects/project/host-catalogs/new-test.js @@ -0,0 +1,11 @@ +import { module, test } from 'qunit'; +import { setupTest } from 'ember-qunit'; + +module('Unit | Route | scopes/scope/projects/project/host-catalogs/new', function(hooks) { + setupTest(hooks); + + test('it exists', function(assert) { + let route = this.owner.lookup('route:scopes/scope/projects/project/host-catalogs/new'); + assert.ok(route); + }); +}); diff --git a/ui/core/translations/en-us.yaml b/ui/core/translations/en-us.yaml index e4af341c7..af1322a87 100644 --- a/ui/core/translations/en-us.yaml +++ b/ui/core/translations/en-us.yaml @@ -33,6 +33,7 @@ resources: titles: iam: IAM new: New + resources: Resources details: Details general: General overview: Overview @@ -58,6 +59,7 @@ states: error: Error form: label: + id: ID name: Name description: Description type: Type