From c4e52cb2e7d296e24522c7805a67360ec924ffc6 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Mon, 5 Oct 2020 16:49:35 -0400 Subject: [PATCH 1/4] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20add=20doc-url=20help?= =?UTF-8?q?er=20and=20doc-link=20component?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/core/app/components/doc-link/index.hbs | 8 +++++ ui/core/app/helpers/doc-url.js | 18 ++++++++++++ .../integration/components/doc-link-test.js | 14 +++++++++ .../tests/integration/helpers/doc-url-test.js | 29 +++++++++++++++++++ 4 files changed, 69 insertions(+) create mode 100644 ui/core/app/components/doc-link/index.hbs create mode 100644 ui/core/app/helpers/doc-url.js create mode 100644 ui/core/tests/integration/components/doc-link-test.js create mode 100644 ui/core/tests/integration/helpers/doc-url-test.js diff --git a/ui/core/app/components/doc-link/index.hbs b/ui/core/app/components/doc-link/index.hbs new file mode 100644 index 000000000..e654aac4a --- /dev/null +++ b/ui/core/app/components/doc-link/index.hbs @@ -0,0 +1,8 @@ + + + diff --git a/ui/core/app/helpers/doc-url.js b/ui/core/app/helpers/doc-url.js new file mode 100644 index 000000000..ae10962ce --- /dev/null +++ b/ui/core/app/helpers/doc-url.js @@ -0,0 +1,18 @@ +import { helper } from '@ember/component/helper'; +import { get } from '@ember/object'; +import { assert } from '@ember/debug'; +import config from '../config/environment'; + +export default helper(function docUrl(params/*, hash*/) { + const baseURL = config.documentation.baseURL; + const docKey = params[0]; + const configuredPath = get(config.documentation, docKey); + if (docKey) { + assert(` + Documentation for "${docKey}" could not be found. Please ensure that + this key exists under "documentation" in your app config. + `, configuredPath); + } + const path = configuredPath || ''; + return `${baseURL}${path}`; +}); diff --git a/ui/core/tests/integration/components/doc-link-test.js b/ui/core/tests/integration/components/doc-link-test.js new file mode 100644 index 000000000..36947afcc --- /dev/null +++ b/ui/core/tests/integration/components/doc-link-test.js @@ -0,0 +1,14 @@ +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 | doc-link', function(hooks) { + setupRenderingTest(hooks); + + test('it renders', async function(assert) { + assert.expect(1); + await render(hbs``); + assert.ok(find('.doc-link .rose-icon.large')); + }); +}); diff --git a/ui/core/tests/integration/helpers/doc-url-test.js b/ui/core/tests/integration/helpers/doc-url-test.js new file mode 100644 index 000000000..d91c9eeed --- /dev/null +++ b/ui/core/tests/integration/helpers/doc-url-test.js @@ -0,0 +1,29 @@ +import { module, test } from 'qunit'; +import { setupRenderingTest } from 'ember-qunit'; +import { render } from '@ember/test-helpers'; +import { hbs } from 'ember-cli-htmlbars'; +import config from 'ember-get-config'; + +module('Integration | Helper | doc-url', function(hooks) { + setupRenderingTest(hooks); + + test('it renders a URL generated from the documentation config', async function(assert) { + assert.expect(3); + const baseURL = config.documentation.baseURL; + const path = config.documentation.topics.account; + await render(hbs`{{doc-url 'topics.account'}}`); + assert.ok(baseURL); + assert.ok(path); + assert.equal(this.element.textContent.trim(), `${baseURL}${path}`); + }); + + test('it throws an error if the specified documentation path cannot be found', async function(assert) { + assert.expect(2); + const helper = this.owner.lookup('helper:doc-url'); + assert.ok(helper.compute(['topics.account']), 'Specified document exists.') + assert.throws(() => { + helper.compute(['no.such.doc']); + }, 'Specified documentation was not found, so the helper threw an error.'); + }); + +}); From 9d8efb24302178218440e03b029c0dd1e33142bd Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Mon, 5 Oct 2020 16:53:11 -0400 Subject: [PATCH 2/4] =?UTF-8?q?chore:=20=F0=9F=A4=96=20apply=20doc=20links?= =?UTF-8?q?=20to=20resource=20pages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../host-catalog/host-sets/host-set.js | 6 +++--- .../host-catalogs/host-catalog/hosts/host.js | 6 +++--- .../scope/auth-methods/auth-method/-header.hbs | 5 ++++- .../auth-method/accounts/account/-header.hbs | 5 ++++- .../scopes/scope/auth-methods/index.hbs | 5 ++++- .../scopes/scope/groups/group/-header.hbs | 5 ++++- .../templates/scopes/scope/groups/index.hbs | 5 ++++- .../app/templates/scopes/scope/orgs/index.hbs | 5 ++++- .../templates/scopes/scope/projects/index.hbs | 5 ++++- .../host-catalogs/host-catalog/-header.hbs | 5 ++++- .../host-sets/{ => host-set}/-actions.hbs | 0 .../host-sets/{ => host-set}/-header.hbs | 5 ++++- .../host-sets/{ => host-set}/-navigation.hbs | 0 .../host-catalog/hosts/{ => host}/-actions.hbs | 0 .../host-catalog/hosts/{ => host}/-header.hbs | 5 ++++- .../hosts/{ => host}/-navigation.hbs | 0 .../projects/project/host-catalogs/index.hbs | 5 ++++- .../scopes/scope/projects/project/index.hbs | 5 ++++- .../scope/projects/project/sessions/index.hbs | 5 ++++- .../scope/projects/project/targets/index.hbs | 5 ++++- .../project/targets/target/-header.hbs | 5 ++++- .../app/templates/scopes/scope/roles/index.hbs | 5 ++++- .../scopes/scope/roles/role/-header.hbs | 5 ++++- .../scopes/scope/roles/role/grants/-header.hbs | 7 +++++-- .../scope/roles/role/principals/-header.hbs | 5 ++++- .../app/templates/scopes/scope/users/index.hbs | 5 ++++- .../scopes/scope/users/user/-header.hbs | 5 ++++- ui/core/config/environment.js | 18 ++++++++++++++++++ ui/core/translations/actions/en-us.yaml | 1 + 29 files changed, 110 insertions(+), 28 deletions(-) rename ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/{ => host-set}/-actions.hbs (100%) rename ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/{ => host-set}/-header.hbs (67%) rename ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/{ => host-set}/-navigation.hbs (100%) rename ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/{ => host}/-actions.hbs (100%) rename ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/{ => host}/-header.hbs (68%) rename ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/{ => host}/-navigation.hbs (100%) diff --git a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set.js b/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set.js index 91a502f82..4d88c52b1 100644 --- a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set.js +++ b/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set.js @@ -23,7 +23,7 @@ export default class ScopesScopeProjectsProjectHostCatalogsHostCatalogHostSetsHo super.renderTemplate(...arguments); this.render( - 'scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/-header', + 'scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/-header', { into: 'scopes/scope/projects/project/host-catalogs/host-catalog', outlet: 'header', @@ -32,7 +32,7 @@ export default class ScopesScopeProjectsProjectHostCatalogsHostCatalogHostSetsHo ); this.render( - 'scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/-navigation', + 'scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/-navigation', { into: 'scopes/scope/projects/project/host-catalogs/host-catalog', outlet: 'navigation', @@ -41,7 +41,7 @@ export default class ScopesScopeProjectsProjectHostCatalogsHostCatalogHostSetsHo ); this.render( - 'scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/-actions', + 'scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/host-set/-actions', { into: 'scopes/scope/projects/project/host-catalogs/host-catalog', outlet: 'actions', diff --git a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host.js b/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host.js index 1cfa23223..da1ca0685 100644 --- a/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host.js +++ b/ui/core/app/routes/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host.js @@ -23,7 +23,7 @@ export default class ScopesScopeProjectsProjectHostCatalogsHostCatalogHostsHostR super.renderTemplate(...arguments); this.render( - 'scopes/scope/projects/project/host-catalogs/host-catalog/hosts/-header', + 'scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host/-header', { into: 'scopes/scope/projects/project/host-catalogs/host-catalog', outlet: 'header', @@ -32,7 +32,7 @@ export default class ScopesScopeProjectsProjectHostCatalogsHostCatalogHostsHostR ); this.render( - 'scopes/scope/projects/project/host-catalogs/host-catalog/hosts/-navigation', + 'scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host/-navigation', { into: 'scopes/scope/projects/project/host-catalogs/host-catalog', outlet: 'navigation', @@ -41,7 +41,7 @@ export default class ScopesScopeProjectsProjectHostCatalogsHostCatalogHostsHostR ); this.render( - 'scopes/scope/projects/project/host-catalogs/host-catalog/hosts/-actions', + 'scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host/-actions', { into: 'scopes/scope/projects/project/host-catalogs/host-catalog', outlet: 'actions', diff --git a/ui/core/app/templates/scopes/scope/auth-methods/auth-method/-header.hbs b/ui/core/app/templates/scopes/scope/auth-methods/auth-method/-header.hbs index bd1bc825e..98ab86788 100644 --- a/ui/core/app/templates/scopes/scope/auth-methods/auth-method/-header.hbs +++ b/ui/core/app/templates/scopes/scope/auth-methods/auth-method/-header.hbs @@ -1,4 +1,7 @@ -

{{t "resources.auth-method.title"}}

+

+ {{t "resources.auth-method.title"}} + +

{{t "resources.auth-method.description"}}

{{t "resources.account.title"}} +

+ {{t "resources.account.title"}} + +

-

{{t "resources.auth-method.title_plural"}}

+

+ {{t "resources.auth-method.title_plural"}} + +

{{t "resources.auth-method.description"}}

diff --git a/ui/core/app/templates/scopes/scope/groups/group/-header.hbs b/ui/core/app/templates/scopes/scope/groups/group/-header.hbs index ae241529b..ad843f83a 100644 --- a/ui/core/app/templates/scopes/scope/groups/group/-header.hbs +++ b/ui/core/app/templates/scopes/scope/groups/group/-header.hbs @@ -1,4 +1,7 @@ -

{{t "resources.group.title"}}

+

+ {{t "resources.group.title"}} + +

{{t "resources.group.description"}}

-

{{t "resources.group.title_plural"}}

+

+ {{t "resources.group.title_plural"}} + +

{{t "resources.group.description"}}

diff --git a/ui/core/app/templates/scopes/scope/orgs/index.hbs b/ui/core/app/templates/scopes/scope/orgs/index.hbs index 30c211450..efe5f0a59 100644 --- a/ui/core/app/templates/scopes/scope/orgs/index.hbs +++ b/ui/core/app/templates/scopes/scope/orgs/index.hbs @@ -5,7 +5,10 @@ -

{{t "resources.org.title_plural"}}

+

+ {{t "resources.org.title_plural"}} + +

{{#if @model}}

{{t "resources.org.description"}}

{{/if}} diff --git a/ui/core/app/templates/scopes/scope/projects/index.hbs b/ui/core/app/templates/scopes/scope/projects/index.hbs index 6173aeffb..fca7f0fae 100644 --- a/ui/core/app/templates/scopes/scope/projects/index.hbs +++ b/ui/core/app/templates/scopes/scope/projects/index.hbs @@ -5,7 +5,10 @@ -

{{t "resources.project.title_plural"}}

+

+ {{t "resources.project.title_plural"}} + +

{{#if @model}}

{{t "resources.project.description"}}

{{/if}} diff --git a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/-header.hbs b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/-header.hbs index 647741ad9..f4d885fae 100644 --- a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/-header.hbs +++ b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/-header.hbs @@ -1,4 +1,7 @@ -

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

+

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

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

{{t "resources.host-set.title"}} +

+ {{t "resources.host-set.title"}} + +

{{t "resources.host-set.description"}}

{{t "resources.host.title"}} +

+ {{t "resources.host.title"}} + +

{{t "resources.host.description"}}

-

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

+

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

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

diff --git a/ui/core/app/templates/scopes/scope/projects/project/index.hbs b/ui/core/app/templates/scopes/scope/projects/project/index.hbs index 0de5bb65c..4cb31e30a 100644 --- a/ui/core/app/templates/scopes/scope/projects/project/index.hbs +++ b/ui/core/app/templates/scopes/scope/projects/project/index.hbs @@ -5,7 +5,10 @@ -

{{t "resources.project.title"}}

+

+ {{t "resources.project.title"}} + +

{{t "resources.project.description"}}

-

{{t "resources.session.title_plural"}}

+

+ {{t "resources.session.title_plural"}} + +

{{t "resources.session.description"}}

diff --git a/ui/core/app/templates/scopes/scope/projects/project/targets/index.hbs b/ui/core/app/templates/scopes/scope/projects/project/targets/index.hbs index 2cb938f29..9615a7c2d 100644 --- a/ui/core/app/templates/scopes/scope/projects/project/targets/index.hbs +++ b/ui/core/app/templates/scopes/scope/projects/project/targets/index.hbs @@ -5,7 +5,10 @@ -

{{t "resources.target.title_plural"}}

+

+ {{t "resources.target.title_plural"}} + +

{{#if @model}}

{{t "resources.target.description"}}

{{/if}} diff --git a/ui/core/app/templates/scopes/scope/projects/project/targets/target/-header.hbs b/ui/core/app/templates/scopes/scope/projects/project/targets/target/-header.hbs index b6f507ea4..b94a925a8 100644 --- a/ui/core/app/templates/scopes/scope/projects/project/targets/target/-header.hbs +++ b/ui/core/app/templates/scopes/scope/projects/project/targets/target/-header.hbs @@ -1,4 +1,7 @@ -

{{t "resources.target.title"}}

+

+ {{t "resources.target.title"}} + +

{{t "resources.target.description"}}

-

{{t "resources.role.title_plural"}}

+

+ {{t "resources.role.title_plural"}} + +

{{#if @model}}

{{t "resources.role.description"}}

{{/if}} diff --git a/ui/core/app/templates/scopes/scope/roles/role/-header.hbs b/ui/core/app/templates/scopes/scope/roles/role/-header.hbs index 03164c9b2..a04e5edc1 100644 --- a/ui/core/app/templates/scopes/scope/roles/role/-header.hbs +++ b/ui/core/app/templates/scopes/scope/roles/role/-header.hbs @@ -1,4 +1,7 @@ -

{{t "resources.role.title"}}

+

+ {{t "resources.role.title"}} + +

{{t "resources.role.description"}}

{{t "resources.role.title"}} +

+ {{t "resources.role.title"}} + +

{{t "resources.role.grant.description"}}

{{@model.id}} - \ No newline at end of file +
diff --git a/ui/core/app/templates/scopes/scope/roles/role/principals/-header.hbs b/ui/core/app/templates/scopes/scope/roles/role/principals/-header.hbs index 499d7ff96..63c44f53c 100644 --- a/ui/core/app/templates/scopes/scope/roles/role/principals/-header.hbs +++ b/ui/core/app/templates/scopes/scope/roles/role/principals/-header.hbs @@ -1,4 +1,7 @@ -

{{t "resources.role.title"}}

+

+ {{t "resources.role.title"}} + +

{{t "resources.role.principal.description"}}

-

{{t "resources.user.title_plural"}}

+

+ {{t "resources.user.title_plural"}} + +

{{#if @model}}

{{t "resources.user.description"}}

{{/if}} diff --git a/ui/core/app/templates/scopes/scope/users/user/-header.hbs b/ui/core/app/templates/scopes/scope/users/user/-header.hbs index d67b6c679..1f80dcfc5 100644 --- a/ui/core/app/templates/scopes/scope/users/user/-header.hbs +++ b/ui/core/app/templates/scopes/scope/users/user/-header.hbs @@ -1,4 +1,7 @@ -

{{t "resources.user.title"}}

+

+ {{t "resources.user.title"}} + +

{{t "resources.user.description"}}

Date: Mon, 5 Oct 2020 17:20:04 -0400 Subject: [PATCH 3/4] =?UTF-8?q?refactor:=20=F0=9F=92=A1=20apply=20doc-url?= =?UTF-8?q?=20helper=20to=20footer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit and refactor to use company-name and company-copyright helpers, rather than translations --- ui/core/.template-lintrc.js | 4 ++-- ui/core/app/helpers/company-copyright.js | 7 +++++++ ui/core/app/helpers/company-name.js | 6 ++++++ ui/core/app/helpers/doc-url.js | 2 +- ui/core/app/templates/application.hbs | 10 ++++++---- ui/core/config/environment.js | 1 + .../tests/integration/helpers/app-name-test.js | 1 + .../integration/helpers/company-copyright-test.js | 15 +++++++++++++++ .../integration/helpers/company-name-test.js | 14 ++++++++++++++ ui/core/translations/en-us.yaml | 8 +------- 10 files changed, 54 insertions(+), 14 deletions(-) create mode 100644 ui/core/app/helpers/company-copyright.js create mode 100644 ui/core/app/helpers/company-name.js create mode 100644 ui/core/tests/integration/helpers/company-copyright-test.js create mode 100644 ui/core/tests/integration/helpers/company-name-test.js diff --git a/ui/core/.template-lintrc.js b/ui/core/.template-lintrc.js index 61df6a727..4db5af2b0 100644 --- a/ui/core/.template-lintrc.js +++ b/ui/core/.template-lintrc.js @@ -4,7 +4,7 @@ module.exports = { extends: 'octane', rules: { 'no-bare-strings': true, - 'no-curly-component-invocation': { allow: ['app-name'] }, - 'no-implicit-this': { allow: ['app-name'] } + 'no-curly-component-invocation': { allow: ['app-name', 'company-name', 'company-copyright'] }, + 'no-implicit-this': { allow: ['app-name', 'company-name', 'company-copyright', 'doc-url'] } } }; diff --git a/ui/core/app/helpers/company-copyright.js b/ui/core/app/helpers/company-copyright.js new file mode 100644 index 000000000..f4e799954 --- /dev/null +++ b/ui/core/app/helpers/company-copyright.js @@ -0,0 +1,7 @@ +import { helper } from '@ember/component/helper'; +import config from '../config/environment'; + +export default helper(function companyCopyright() { + const currentYear = new Date().getFullYear(); + return `© ${currentYear} ${config.companyName}`; +}); diff --git a/ui/core/app/helpers/company-name.js b/ui/core/app/helpers/company-name.js new file mode 100644 index 000000000..78d99f2e7 --- /dev/null +++ b/ui/core/app/helpers/company-name.js @@ -0,0 +1,6 @@ +import { helper } from '@ember/component/helper'; +import config from '../config/environment'; + +export default helper(function companyName() { + return config.companyName; +}); diff --git a/ui/core/app/helpers/doc-url.js b/ui/core/app/helpers/doc-url.js index ae10962ce..e31e4932a 100644 --- a/ui/core/app/helpers/doc-url.js +++ b/ui/core/app/helpers/doc-url.js @@ -5,7 +5,7 @@ import config from '../config/environment'; export default helper(function docUrl(params/*, hash*/) { const baseURL = config.documentation.baseURL; - const docKey = params[0]; + const docKey = params[0] || ''; const configuredPath = get(config.documentation, docKey); if (docKey) { assert(` diff --git a/ui/core/app/templates/application.hbs b/ui/core/app/templates/application.hbs index fa96053b4..ac4f0eac3 100644 --- a/ui/core/app/templates/application.hbs +++ b/ui/core/app/templates/application.hbs @@ -59,11 +59,13 @@ - - {{t "hashicorp.copyright"}} - {{t "hashicorp.product"}} + + {{company-copyright}} + {{app-name}} - {{t "hashicorp.documentation.title"}} + + {{t "titles.documentation"}} + diff --git a/ui/core/config/environment.js b/ui/core/config/environment.js index 93bb0495c..0eb7294af 100644 --- a/ui/core/config/environment.js +++ b/ui/core/config/environment.js @@ -32,6 +32,7 @@ module.exports = function (environment) { }, appName: APP_NAME, + companyName: 'HashiCorp', notifyTimeout: 4000, sessionPollingTimeoutSeconds: 2.5, diff --git a/ui/core/tests/integration/helpers/app-name-test.js b/ui/core/tests/integration/helpers/app-name-test.js index 0dc7fbb09..cd86480cf 100644 --- a/ui/core/tests/integration/helpers/app-name-test.js +++ b/ui/core/tests/integration/helpers/app-name-test.js @@ -7,6 +7,7 @@ module('Integration | Helper | app-name', function (hooks) { setupRenderingTest(hooks); test('it renders', async function (assert) { + assert.expect(1); await render(hbs`{{app-name}}`); assert.equal(this.element.textContent.trim(), 'Boundary'); }); diff --git a/ui/core/tests/integration/helpers/company-copyright-test.js b/ui/core/tests/integration/helpers/company-copyright-test.js new file mode 100644 index 000000000..87b468e2f --- /dev/null +++ b/ui/core/tests/integration/helpers/company-copyright-test.js @@ -0,0 +1,15 @@ +import { module, test } from 'qunit'; +import { setupRenderingTest } from 'ember-qunit'; +import { render } from '@ember/test-helpers'; +import { hbs } from 'ember-cli-htmlbars'; + +module('Integration | Helper | company-copyright', function (hooks) { + setupRenderingTest(hooks); + + test('it renders', async function (assert) { + assert.expect(1); + const currentYear = new Date().getFullYear(); + await render(hbs`{{company-copyright}}`); + assert.equal(this.element.textContent.trim(), `© ${currentYear} HashiCorp`); + }); +}); diff --git a/ui/core/tests/integration/helpers/company-name-test.js b/ui/core/tests/integration/helpers/company-name-test.js new file mode 100644 index 000000000..0599a936e --- /dev/null +++ b/ui/core/tests/integration/helpers/company-name-test.js @@ -0,0 +1,14 @@ +import { module, test } from 'qunit'; +import { setupRenderingTest } from 'ember-qunit'; +import { render } from '@ember/test-helpers'; +import { hbs } from 'ember-cli-htmlbars'; + +module('Integration | Helper | company-name', function (hooks) { + setupRenderingTest(hooks); + + test('it renders', async function (assert) { + assert.expect(1); + await render(hbs`{{company-name}}`); + assert.equal(this.element.textContent.trim(), 'HashiCorp'); + }); +}); diff --git a/ui/core/translations/en-us.yaml b/ui/core/translations/en-us.yaml index 84b842579..4441f333c 100644 --- a/ui/core/translations/en-us.yaml +++ b/ui/core/translations/en-us.yaml @@ -16,15 +16,9 @@ titles: empty-set: No Items Yet global: Global actions: Actions + documentation: Documentation descriptions: empty-set: There are no items to display yet. You may be able to add items or try back later. questions: delete-confirm: Are you sure you want to delete this resource? remove-confirm: Are you sure you want to remove this association? -hashicorp: - title: HashiCorp - copyright: © 2020 HashiCorp - product: Boundary v0.1 - documentation: - title: Documentation - link: https://boundaryproject.io From 3b259ea70c7df8c8a27405a34f19a3a1457dae85 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Mon, 5 Oct 2020 18:27:51 -0400 Subject: [PATCH 4/4] =?UTF-8?q?fix:=20=F0=9F=90=9B=20add=20missing=20confi?= =?UTF-8?q?g?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/core/config/environment.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/ui/core/config/environment.js b/ui/core/config/environment.js index ffb4c36bf..93bb0495c 100644 --- a/ui/core/config/environment.js +++ b/ui/core/config/environment.js @@ -37,6 +37,24 @@ module.exports = function (environment) { sessionPollingTimeoutSeconds: 2.5, enableConfirmService: true, + documentation: { + baseURL: 'https://boundaryproject.io/help/admin-ui', + topics: { + org: '/org', + project: '/project', + account: '/account', + 'auth-method': '/auth-method', + group: '/group', + 'host-catalog': '/host-catalog', + 'host-set': '/host-set', + host: '/host', + role: '/role', + session: '/session', + target: '/target', + user: '/user' + } + }, + contentSecurityPolicyHeader: 'Content-Security-Policy', contentSecurityPolicyMeta: true, contentSecurityPolicy: {