Merge branch 'develop' into feature-hosts-api
This commit is contained in:
31 files changed
+527
-46
No files matched your search
@@ -0,0 +1,49 @@
|
||||
<Rose::Form
|
||||
@onSubmit={{@submit}}
|
||||
@cancel={{@cancel}}
|
||||
@disabled={{@model.isSaving}}
|
||||
@error={{@model.errors.base}}
|
||||
as |form|
|
||||
>
|
||||
|
||||
<form.input
|
||||
@name="name"
|
||||
@type="name"
|
||||
@value={{@model.name}}
|
||||
@label={{t "form.label.name"}}
|
||||
@error={{@model.errors.name}}
|
||||
readonly={{false}}
|
||||
as |field|>
|
||||
{{#if @model.errors.name}}
|
||||
<field.errors as |errors|>
|
||||
{{#each @model.errors.name as |error|}}
|
||||
<errors.message>{{error.message}}</errors.message>
|
||||
{{/each}}
|
||||
</field.errors>
|
||||
{{/if}}
|
||||
</form.input>
|
||||
|
||||
<form.textarea
|
||||
@name="description"
|
||||
@type="description"
|
||||
@value={{@model.description}}
|
||||
@label={{t "form.label.description"}}
|
||||
@error={{@model.errors.description}}
|
||||
disabled={{@model.isSaving}}
|
||||
readonly={{false}}
|
||||
as |field|>
|
||||
{{#if @model.errors.description}}
|
||||
<field.errors as |errors|>
|
||||
{{#each @model.errors.description as |error|}}
|
||||
<errors.message>{{error.message}}</errors.message>
|
||||
{{/each}}
|
||||
</field.errors>
|
||||
{{/if}}
|
||||
</form.textarea>
|
||||
|
||||
<form.actions
|
||||
@disabled={{if @model.cannotSave @model.cannotSave}}
|
||||
@submitText={{t "actions.save"}}
|
||||
@cancelText={{t "actions.cancel"}} />
|
||||
|
||||
</Rose::Form>
|
||||
@@ -50,7 +50,11 @@ Router.map(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('host-catalog', { path: ':host_catalog_id' }, function() {
|
||||
this.route('host-sets', function() {
|
||||
this.route('host-set', { path: ':host_set_id' }, function() {});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
this.route('new');
|
||||
|
||||
@@ -58,4 +58,21 @@ export default class ScopesScopeAuthMethodsRoute extends Route {
|
||||
this.notify.error(error.message, { closeAfter: null });
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete an auth method in current scope and redirect to index
|
||||
* @param {AuthMethodModel} authMethod
|
||||
*/
|
||||
@action
|
||||
async delete(authMethod) {
|
||||
try {
|
||||
await authMethod.destroyRecord();
|
||||
this.refresh();
|
||||
this.notify.success(this.intl.t('notify.delete-success'));
|
||||
this.transitionTo('scopes.scope.auth-methods');
|
||||
} catch (error) {
|
||||
//TODO: replace with translated strings
|
||||
this.notify.error(error.message, { closeAfter: null });
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,7 @@ export default class ScopesScopeProjectsProjectHostCatalogsRoute extends Route {
|
||||
|
||||
// =services
|
||||
|
||||
@service intl;
|
||||
@service notify;
|
||||
|
||||
// =methods
|
||||
@@ -40,11 +41,13 @@ export default class ScopesScopeProjectsProjectHostCatalogsRoute extends Route {
|
||||
*/
|
||||
@action
|
||||
async save(hostCatalog) {
|
||||
const { isNew } = hostCatalog;
|
||||
try {
|
||||
await hostCatalog.save();
|
||||
this.refresh();
|
||||
// TODO: replace with translated strings
|
||||
this.notify.success('Save succeeded.');
|
||||
this.notify.success(
|
||||
this.intl.t(isNew ? 'notify.create-success' : 'notify.save-success')
|
||||
);
|
||||
this.transitionTo('scopes.scope.projects.project.host-catalogs.host-catalog', hostCatalog);
|
||||
} catch (error) {
|
||||
// TODO: replace with translated strings
|
||||
@@ -61,9 +64,8 @@ export default class ScopesScopeProjectsProjectHostCatalogsRoute extends Route {
|
||||
try {
|
||||
await project.destroyRecord();
|
||||
this.refresh();
|
||||
this.notify.success(this.intl.t('notify.delete-success'));
|
||||
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 });
|
||||
|
||||
@@ -17,4 +17,31 @@ export default class ScopesScopeProjectsProjectHostCatalogsHostCatalogRoute exte
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders the host-catalog specific templates for header, navigation, and actions page sections.
|
||||
* @override
|
||||
* @param {object} controller
|
||||
* @param {object} model
|
||||
*/
|
||||
renderTemplate(controller, model) {
|
||||
this.render('scopes/scope/projects/project/host-catalogs/host-catalog');
|
||||
|
||||
this.render('scopes/scope/projects/project/host-catalogs/host-catalog/-header', {
|
||||
into: 'scopes/scope/projects/project/host-catalogs/host-catalog',
|
||||
outlet: 'header',
|
||||
model: model
|
||||
});
|
||||
|
||||
this.render('scopes/scope/projects/project/host-catalogs/host-catalog/-navigation', {
|
||||
into: 'scopes/scope/projects/project/host-catalogs/host-catalog',
|
||||
outlet: 'navigation',
|
||||
model: model
|
||||
});
|
||||
|
||||
this.render('scopes/scope/projects/project/host-catalogs/host-catalog/-actions', {
|
||||
into: 'scopes/scope/projects/project/host-catalogs/host-catalog',
|
||||
outlet: 'actions',
|
||||
model: model
|
||||
});
|
||||
}
|
||||
}
|
||||
+78
@@ -0,0 +1,78 @@
|
||||
import Route from '@ember/routing/route';
|
||||
import { inject as service } from '@ember/service';
|
||||
import { action } from '@ember/object';
|
||||
|
||||
export default class ScopesScopeProjectsProjectHostCatalogsHostCatalogHostSetsRoute extends Route {
|
||||
// =services
|
||||
|
||||
@service intl;
|
||||
@service notify;
|
||||
|
||||
// =methods
|
||||
|
||||
/**
|
||||
* Loads all host-sets under the current host catalog and it's parent scope.
|
||||
* @return {Promise{[HostSetModel]}}
|
||||
*/
|
||||
async model() {
|
||||
const scopeID = this.modelFor('scopes.scope.projects.project').id;
|
||||
const hostCatalogID = this.modelFor('scopes.scope.projects.project.host-catalogs.host-catalog').id;
|
||||
return this.store.findAll('host-set', { adapterOptions: { scopeID, hostCatalogID } });
|
||||
}
|
||||
|
||||
// =actions
|
||||
|
||||
/**
|
||||
* Rollback changes on a host set.
|
||||
* @param {HostSetModel} hostSet
|
||||
*/
|
||||
@action
|
||||
cancel(hostSet) {
|
||||
hostSet.rollbackAttributes();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle save of a host set.
|
||||
* @param {HostSetModel} hostSet
|
||||
* @param {Event} e
|
||||
*/
|
||||
@action
|
||||
async save(hostSet) {
|
||||
try {
|
||||
await hostSet.save(this.adapterOptions());
|
||||
this.refresh();
|
||||
this.notify.success(this.intl.t('notify.save-success'));
|
||||
this.transitionTo('scopes.scope.projects.project.host-catalogs.host-catalog.host-sets.host-set', hostSet);
|
||||
} catch (error) {
|
||||
// TODO: replace with translated strings
|
||||
this.notify.error(error.message, { closeAfter: null });
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete host set in current scope and redirect to index.
|
||||
* @param {HostSetModel} hostSet
|
||||
*/
|
||||
@action
|
||||
async delete(hostSet) {
|
||||
try {
|
||||
await hostSet.destroyRecord(this.adapterOptions());
|
||||
this.refresh();
|
||||
this.notify.success(this.intl.t('notify.delete-success'));
|
||||
this.transitionTo('scopes.scope.projects.project.host-catalogs.host-catalog.host-sets');
|
||||
} catch (error) {
|
||||
// TODO: replace with translated strings
|
||||
this.notify.error(error.message, { closeAfter: null });
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure adapter options using current host catalog scope and it's parent project scope.
|
||||
* @return {object}
|
||||
*/
|
||||
adapterOptions() {
|
||||
const scopeID = this.modelFor('scopes.scope.projects.project').id;
|
||||
const hostCatalogID = this.modelFor('scopes.scope.projects.project.host-catalogs.host-catalog').id;
|
||||
return { adapterOptions : { scopeID, hostCatalogID } };
|
||||
}
|
||||
}
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
import Route from '@ember/routing/route';
|
||||
|
||||
export default class ScopesScopeProjectsProjectHostCatalogsHostCatalogHostSetsHostSetRoute extends Route {
|
||||
// =methods
|
||||
|
||||
/**
|
||||
* Load a host-set using current host-catalog and it's parent project scope.
|
||||
* @param {object} params
|
||||
* @param {string} params.host_set_id
|
||||
* @return {HostSetModel}
|
||||
*/
|
||||
async model({ host_set_id }) {
|
||||
const { id: scopeID } = this.modelFor('scopes.scope.projects.project');
|
||||
const hostCatalogID = this.modelFor('scopes.scope.projects.project.host-catalogs.host-catalog').id;
|
||||
return this.store.findRecord('host-set', host_set_id, {
|
||||
adapterOptions: { scopeID, hostCatalogID }
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders the host-set specific templates for header, navigation, and action page sections.
|
||||
* @override
|
||||
* @param {object} controller
|
||||
* @param {object} model
|
||||
*/
|
||||
renderTemplate(controller, model) {
|
||||
this.render('scopes/scope/projects/project/host-catalogs/host-catalog/host-sets');
|
||||
|
||||
this.render('scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/-header', {
|
||||
into: 'scopes/scope/projects/project/host-catalogs/host-catalog',
|
||||
outlet: 'header',
|
||||
model: model
|
||||
});
|
||||
|
||||
this.render('scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/-navigation', {
|
||||
into: 'scopes/scope/projects/project/host-catalogs/host-catalog',
|
||||
outlet: 'navigation',
|
||||
model: model
|
||||
});
|
||||
|
||||
this.render('scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/-actions', {
|
||||
into: 'scopes/scope/projects/project/host-catalogs/host-catalog',
|
||||
outlet: 'actions',
|
||||
model: model
|
||||
});
|
||||
}
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
import Route from '@ember/routing/route';
|
||||
|
||||
export default class ScopesScopeProjectsProjectHostCatalogsHostCatalogHostSetsHostSetIndexRoute extends Route {
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
import Route from '@ember/routing/route';
|
||||
|
||||
export default class ScopesScopeProjectsProjectHostCatalogsHostCatalogHostSetsIndexRoute extends Route {
|
||||
}
|
||||
@@ -18,6 +18,18 @@
|
||||
</Rose::Nav::Tabs>
|
||||
</page.navigation>
|
||||
|
||||
<page.actions>
|
||||
<Rose::Dropdown @text="{{t 'form.label.manage'}}" @dropdownRight={{true}} as |dropdown|>
|
||||
<dropdown.button
|
||||
@style="danger"
|
||||
@disabled={{@model.canSave}}
|
||||
{{on "click" (route-action "delete" @model)}}
|
||||
>
|
||||
{{t 'actions.delete-auth-method'}}
|
||||
</dropdown.button>
|
||||
</Rose::Dropdown>
|
||||
</page.actions>
|
||||
|
||||
<page.body>
|
||||
<Form::AuthMethod
|
||||
@model={{@model}}
|
||||
|
||||
@@ -1,3 +1,23 @@
|
||||
{{title @model.displayName}}
|
||||
<Rose::Layout::Page as |page|>
|
||||
|
||||
{{outlet}}
|
||||
<page.breadcrumbs>
|
||||
<BreadCrumbs />
|
||||
</page.breadcrumbs>
|
||||
|
||||
<page.header>
|
||||
{{outlet "header"}}
|
||||
</page.header>
|
||||
|
||||
<page.actions>
|
||||
{{outlet "actions"}}
|
||||
</page.actions>
|
||||
|
||||
<page.navigation>
|
||||
{{outlet "navigation"}}
|
||||
</page.navigation>
|
||||
|
||||
<page.body>
|
||||
{{outlet}}
|
||||
</page.body>
|
||||
|
||||
</Rose::Layout::Page>
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
<Rose::Dropdown @text="{{t 'form.label.manage'}}" @dropdownRight={{true}} as |dropdown|>
|
||||
<dropdown.button
|
||||
@style="danger"
|
||||
@disabled={{@model.canSave}}
|
||||
{{on "click" (route-action "delete" @model)}}
|
||||
>
|
||||
{{t 'actions.delete-host-catalog'}}
|
||||
</dropdown.button>
|
||||
</Rose::Dropdown>
|
||||
+1
@@ -0,0 +1 @@
|
||||
<h2>{{t "resources.host-catalog"}}</h2>
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
<Rose::Nav::Tabs as |nav|>
|
||||
<nav.link @route='scopes.scope.projects.project.host-catalogs.host-catalog.index'>
|
||||
{{t 'titles.details'}}
|
||||
</nav.link>
|
||||
<nav.link @route='scopes.scope.projects.project.host-catalogs.host-catalog.host-sets'>
|
||||
{{t 'titles.host-sets'}}
|
||||
</nav.link>
|
||||
</Rose::Nav::Tabs>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
{{title (t "resources.host-sets")}}
|
||||
|
||||
{{outlet}}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
<Rose::Dropdown @text="{{t 'form.label.manage'}}" @dropdownRight={{true}} as |dropdown|>
|
||||
<dropdown.button
|
||||
@style="danger"
|
||||
@disabled={{@model.canSave}}
|
||||
{{on "click" (route-action "delete" @model)}}
|
||||
>
|
||||
{{t 'actions.delete-host-set'}}
|
||||
</dropdown.button>
|
||||
</Rose::Dropdown>
|
||||
+1
@@ -0,0 +1 @@
|
||||
<h2>{{t "resources.host-set"}}</h2>
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
<Rose::Nav::Tabs as |nav|>
|
||||
<nav.link @route='scopes.scope.projects.project.host-catalogs.host-catalog.host-sets.host-set.index'>
|
||||
{{t 'titles.details'}}
|
||||
</nav.link>
|
||||
</Rose::Nav::Tabs>
|
||||
+1
@@ -0,0 +1 @@
|
||||
{{outlet}}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
<Form::HostSet
|
||||
@model={{@model}}
|
||||
@submit={{route-action "save" @model}}
|
||||
@cancel={{route-action "cancel" @model}}
|
||||
/>
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
<Rose::Table as |table|>
|
||||
<table.header as |header|>
|
||||
<header.row as |row|>
|
||||
<row.cell>{{t "form.label.name"}}</row.cell>
|
||||
<row.cell>{{t "form.label.type"}}</row.cell>
|
||||
<row.cell>{{t "form.label.id"}}</row.cell>
|
||||
</header.row>
|
||||
</table.header>
|
||||
<table.body as |body|>
|
||||
{{#each @model as |hostSet|}}
|
||||
<body.row as |row|>
|
||||
<row.cell>
|
||||
<LinkTo
|
||||
@route="scopes.scope.projects.project.host-catalogs.host-catalog.host-sets.host-set"
|
||||
@model={{hostSet}}
|
||||
>
|
||||
{{hostSet.displayName}}
|
||||
</LinkTo>
|
||||
<p>{{hostSet.description}}</p>
|
||||
</row.cell>
|
||||
<row.cell>
|
||||
<Rose::Badge @style="outline">{{hostSet.type}}</Rose::Badge>
|
||||
</row.cell>
|
||||
<row.cell>
|
||||
<code>{{hostSet.id}}</code>
|
||||
</row.cell>
|
||||
</body.row>
|
||||
{{/each}}
|
||||
</table.body>
|
||||
</Rose::Table>
|
||||
+5
-39
@@ -1,39 +1,5 @@
|
||||
<Rose::Layout::Page as |page|>
|
||||
|
||||
<page.breadcrumbs>
|
||||
<BreadCrumbs />
|
||||
</page.breadcrumbs>
|
||||
|
||||
<page.header>
|
||||
<h2>{{t "resources.host-catalog"}}</h2>
|
||||
</page.header>
|
||||
|
||||
<page.navigation>
|
||||
<Rose::Nav::Tabs as |nav|>
|
||||
<nav.link @route='scopes.scope.projects.project.host-catalogs.host-catalog'>
|
||||
{{t 'titles.details'}}
|
||||
</nav.link>
|
||||
</Rose::Nav::Tabs>
|
||||
</page.navigation>
|
||||
|
||||
<page.actions>
|
||||
<Rose::Dropdown @text="{{t 'form.label.manage'}}" @dropdownRight={{true}} as |dropdown|>
|
||||
<dropdown.button
|
||||
@style="danger"
|
||||
@disabled={{@model.canSave}}
|
||||
{{on "click" (route-action "delete" @model)}}
|
||||
>
|
||||
{{t 'actions.delete-host-catalog'}}
|
||||
</dropdown.button>
|
||||
</Rose::Dropdown>
|
||||
</page.actions>
|
||||
|
||||
<page.body>
|
||||
<Form::HostCatalog
|
||||
@model={{@model}}
|
||||
@submit={{route-action "save" @model}}
|
||||
@cancel={{route-action "cancel" @model}}
|
||||
/>
|
||||
</page.body>
|
||||
|
||||
</Rose::Layout::Page>
|
||||
<Form::HostCatalog
|
||||
@model={{@model}}
|
||||
@submit={{route-action "save" @model}}
|
||||
@cancel={{route-action "cancel" @model}}
|
||||
/>
|
||||
@@ -15,4 +15,5 @@ export default ApplicationSerializer.extend({
|
||||
json.host_ids = model.hostIds;
|
||||
return json;
|
||||
}
|
||||
|
||||
});
|
||||
@@ -72,6 +72,10 @@ module('Acceptance | auth methods', function (hooks) {
|
||||
assert.expect(0);
|
||||
});
|
||||
|
||||
test('can delete an auth method', async function (assert) {
|
||||
assert.expect(0);
|
||||
});
|
||||
|
||||
test('saving a new auth method with invalid fields displays error messages', async function (assert) {
|
||||
assert.expect(0);
|
||||
});
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { visit, currentURL } 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 {
|
||||
authenticateSession,
|
||||
// These are left here intentionally for future reference.
|
||||
//currentSession,
|
||||
//invalidateSession,
|
||||
} from 'ember-simple-auth/test-support';
|
||||
|
||||
module('Acceptance | host sets', function (hooks) {
|
||||
setupApplicationTest(hooks);
|
||||
setupMirage(hooks);
|
||||
|
||||
const instances = {
|
||||
scopes: {
|
||||
global: null,
|
||||
org: null,
|
||||
project: null,
|
||||
hostCatalog: null
|
||||
},
|
||||
hostSet: null
|
||||
};
|
||||
const urls = {
|
||||
orgScope: null,
|
||||
projects: null,
|
||||
project: null,
|
||||
hostCatalogs: null,
|
||||
hostCatalog: null,
|
||||
hostSets: null
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
// 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.scopes.hostCatalog = this.server.create('host-catalog', {
|
||||
scope: {
|
||||
id: instances.scopes.project.id,
|
||||
type: instances.scopes.project.type
|
||||
}
|
||||
});
|
||||
|
||||
instances.hostSet = this.server.create('host-set', {
|
||||
scope: {
|
||||
id: instances.scopes.project.id,
|
||||
type: instances.scopes.project.type
|
||||
},
|
||||
hostCatalog: {
|
||||
id: instances.scopes.hostCatalog.id,
|
||||
type: instances.scopes.hostCatalog.type
|
||||
}
|
||||
});
|
||||
|
||||
// Generate route URLs for resources
|
||||
urls.orgScope = `/scopes/${instances.scopes.org.id}`;
|
||||
urls.projects = `${urls.orgScope}/projects`;
|
||||
urls.project = `${urls.projects}/${instances.scopes.hostCatalog.scope.id}`;
|
||||
urls.hostCatalogs = `${urls.project}/host-catalogs`;
|
||||
urls.hostCatalog = `${urls.hostCatalogs}/${instances.scopes.hostCatalog.id}`;
|
||||
urls.hostSets = `${urls.hostCatalog}/host-sets`;
|
||||
});
|
||||
|
||||
test('visiting host sets', async function (assert) {
|
||||
assert.expect(1);
|
||||
authenticateSession();
|
||||
await visit(urls.hostSets);
|
||||
await a11yAudit();
|
||||
assert.equal(currentURL(), urls.hostSets);
|
||||
});
|
||||
|
||||
test('can navigate to a host set form', async function (assert) {
|
||||
assert.expect(0);
|
||||
});
|
||||
|
||||
test('can update a host set and save changes', async function (assert) {
|
||||
assert.expect(0);
|
||||
});
|
||||
|
||||
test('can update a host set and cancel changes', async function (assert) {
|
||||
assert.expect(0);
|
||||
});
|
||||
|
||||
test('errors are displayed when save on auth method fails', async function (assert) {
|
||||
assert.expect(0);
|
||||
});
|
||||
|
||||
test('errors are displayed when delete on a host set fails', async function (assert) {
|
||||
assert.expect(0);
|
||||
});
|
||||
|
||||
test('saving an existing auth method with invalid fields displays error messages', async function (assert) {
|
||||
assert.expect(0);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,23 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { setupRenderingTest } from 'ember-qunit';
|
||||
import { render, find } from '@ember/test-helpers';
|
||||
import { hbs } from 'ember-cli-htmlbars';
|
||||
|
||||
module('Integration | Component | form/host-set', function(hooks) {
|
||||
setupRenderingTest(hooks);
|
||||
|
||||
test('it renders', async function (assert) {
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.set('myAction', function(val) { ... });
|
||||
this.submit = () => {};
|
||||
this.cancel = () => {};
|
||||
|
||||
await render(hbs`
|
||||
<Form::HostSet
|
||||
@submit={{this.submit}}
|
||||
@cancel={{this.cancel}}
|
||||
/>`);
|
||||
|
||||
assert.ok(find('form'));
|
||||
});
|
||||
});
|
||||
+11
@@ -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/host-sets', function(hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
test('it exists', function(assert) {
|
||||
let route = this.owner.lookup('route:scopes/scope/projects/project/host-catalogs/host-catalog/host-sets');
|
||||
assert.ok(route);
|
||||
});
|
||||
});
|
||||
+11
@@ -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/host-sets/host-set', function(hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
test('it exists', function(assert) {
|
||||
let route = this.owner.lookup('route:scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set');
|
||||
assert.ok(route);
|
||||
});
|
||||
});
|
||||
+11
@@ -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/host-sets/host-set/index', function(hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
test('it exists', function(assert) {
|
||||
let route = this.owner.lookup('route:scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/index');
|
||||
assert.ok(route);
|
||||
});
|
||||
});
|
||||
+11
@@ -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/host-sets/index', function(hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
test('it exists', function(assert) {
|
||||
let route = this.owner.lookup('route:scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/index');
|
||||
assert.ok(route);
|
||||
});
|
||||
});
|
||||
@@ -14,6 +14,8 @@ actions:
|
||||
delete-role: Delete role
|
||||
delete-project: Delete project
|
||||
delete-host-catalog: Delete host catalog
|
||||
delete-auth-method: Delete auth method
|
||||
delete-host-set: Delete host set
|
||||
auth:
|
||||
titles:
|
||||
no-scopes: No Scopes Available
|
||||
@@ -40,6 +42,8 @@ resources:
|
||||
host-catalogs: Host Catalogs
|
||||
auth-method: Auth Method
|
||||
auth-methods: Auth Methods
|
||||
host-set: Host Set
|
||||
host-sets: Host Sets
|
||||
titles:
|
||||
iam: IAM
|
||||
new: New
|
||||
@@ -58,6 +62,7 @@ titles:
|
||||
grants: Permissions
|
||||
new-grant: New Grant
|
||||
principals: Principals
|
||||
host-sets: Host Sets
|
||||
global: Global
|
||||
descriptions:
|
||||
host-catalogs: Overview of collections of hosts and host sets.
|
||||
|
||||
Reference in new issue
Block a user