From 3ef1ee2d11e84c402222750e69f932cb3a942789 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Tue, 6 Oct 2020 17:24:30 -0400 Subject: [PATCH 1/2] =?UTF-8?q?chore:=20=F0=9F=A4=96=20add=20additional=20?= =?UTF-8?q?documentation=20links=20throughout?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/core/app/helpers/doc-url.js | 3 +-- .../scopes/scope/auth-methods/auth-method/-header.hbs | 2 +- .../auth-method/accounts/account/-header.hbs | 2 +- .../auth-methods/auth-method/accounts/new/-header.hbs | 5 ++++- .../app/templates/scopes/scope/auth-methods/index.hbs | 2 +- .../templates/scopes/scope/groups/group/-header.hbs | 2 +- .../scopes/scope/groups/group/add-members/-header.hbs | 5 ++++- ui/core/app/templates/scopes/scope/groups/index.hbs | 2 +- ui/core/app/templates/scopes/scope/orgs/index.hbs | 2 +- ui/core/app/templates/scopes/scope/orgs/new.hbs | 5 ++++- ui/core/app/templates/scopes/scope/projects/index.hbs | 2 +- ui/core/app/templates/scopes/scope/projects/new.hbs | 5 ++++- .../project/host-catalogs/host-catalog/-header.hbs | 2 +- .../host-catalog/host-sets/host-set/-header.hbs | 2 +- .../host-sets/host-set/add-hosts/-header.hbs | 7 +++++-- .../host-catalog/host-sets/new/-header.hbs | 5 ++++- .../host-catalogs/host-catalog/hosts/host/-header.hbs | 2 +- .../host-catalogs/host-catalog/hosts/new/-header.hbs | 5 ++++- .../scope/projects/project/host-catalogs/index.hbs | 2 +- .../scope/projects/project/host-catalogs/new.hbs | 5 ++++- .../templates/scopes/scope/projects/project/index.hbs | 2 +- .../scopes/scope/projects/project/sessions/index.hbs | 2 +- .../scopes/scope/projects/project/targets/index.hbs | 2 +- .../scopes/scope/projects/project/targets/new.hbs | 5 ++++- .../scope/projects/project/targets/target/-header.hbs | 2 +- .../project/targets/target/add-host-sets/-header.hbs | 7 +++++-- ui/core/app/templates/scopes/scope/roles/index.hbs | 2 +- .../app/templates/scopes/scope/roles/role/-header.hbs | 2 +- .../scope/roles/role/add-principals/-header.hbs | 7 +++++-- .../scopes/scope/roles/role/grants/-header.hbs | 2 +- .../scopes/scope/roles/role/principals/-header.hbs | 2 +- ui/core/app/templates/scopes/scope/users/index.hbs | 2 +- .../app/templates/scopes/scope/users/user/-header.hbs | 2 +- ui/core/config/environment.js | 11 +++++++++++ ui/core/tests/integration/components/doc-link-test.js | 2 +- ui/core/tests/integration/helpers/doc-url-test.js | 4 ++-- ui/core/translations/resources/en-us.yaml | 4 ++-- 37 files changed, 85 insertions(+), 42 deletions(-) diff --git a/ui/core/app/helpers/doc-url.js b/ui/core/app/helpers/doc-url.js index e31e4932a..bff751918 100644 --- a/ui/core/app/helpers/doc-url.js +++ b/ui/core/app/helpers/doc-url.js @@ -1,12 +1,11 @@ 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); + const configuredPath = config.documentation.topics[docKey]; if (docKey) { assert(` Documentation for "${docKey}" could not be found. Please ensure that 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 98ab86788..080012f3b 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,6 +1,6 @@

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

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

{{t "resources.account.title"}} - + {{t "titles.new"}} \ No newline at end of file +

+ {{t "titles.new"}} + +

diff --git a/ui/core/app/templates/scopes/scope/auth-methods/index.hbs b/ui/core/app/templates/scopes/scope/auth-methods/index.hbs index 5d3f270d2..a796c66f5 100644 --- a/ui/core/app/templates/scopes/scope/auth-methods/index.hbs +++ b/ui/core/app/templates/scopes/scope/auth-methods/index.hbs @@ -2,7 +2,7 @@

{{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 ad843f83a..6dab6766a 100644 --- a/ui/core/app/templates/scopes/scope/groups/group/-header.hbs +++ b/ui/core/app/templates/scopes/scope/groups/group/-header.hbs @@ -1,6 +1,6 @@

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

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

{{t "resources.group.messages.add-members.title"}} +

+ {{t "resources.group.messages.add-members.title"}} + +

{{t "resources.group.messages.add-members.description"}}

diff --git a/ui/core/app/templates/scopes/scope/groups/index.hbs b/ui/core/app/templates/scopes/scope/groups/index.hbs index 197782427..7dbf66358 100644 --- a/ui/core/app/templates/scopes/scope/groups/index.hbs +++ b/ui/core/app/templates/scopes/scope/groups/index.hbs @@ -7,7 +7,7 @@

{{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 efe5f0a59..e0dcfd1ac 100644 --- a/ui/core/app/templates/scopes/scope/orgs/index.hbs +++ b/ui/core/app/templates/scopes/scope/orgs/index.hbs @@ -7,7 +7,7 @@

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

{{#if @model}}

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

diff --git a/ui/core/app/templates/scopes/scope/orgs/new.hbs b/ui/core/app/templates/scopes/scope/orgs/new.hbs index d9fe8b361..390f0f04b 100644 --- a/ui/core/app/templates/scopes/scope/orgs/new.hbs +++ b/ui/core/app/templates/scopes/scope/orgs/new.hbs @@ -7,7 +7,10 @@ -

{{t "titles.new"}}

+

+ {{t "titles.new"}} + +

diff --git a/ui/core/app/templates/scopes/scope/projects/index.hbs b/ui/core/app/templates/scopes/scope/projects/index.hbs index fca7f0fae..725d3973f 100644 --- a/ui/core/app/templates/scopes/scope/projects/index.hbs +++ b/ui/core/app/templates/scopes/scope/projects/index.hbs @@ -7,7 +7,7 @@

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

{{#if @model}}

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

diff --git a/ui/core/app/templates/scopes/scope/projects/new.hbs b/ui/core/app/templates/scopes/scope/projects/new.hbs index a8758e3c0..0e9dedf59 100644 --- a/ui/core/app/templates/scopes/scope/projects/new.hbs +++ b/ui/core/app/templates/scopes/scope/projects/new.hbs @@ -7,7 +7,10 @@ -

{{t "titles.new"}}

+

+ {{t "titles.new"}} + +

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 f4d885fae..58e6f4b02 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,6 +1,6 @@

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

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

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

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

{{t "resources.host-set.host.messages.add.title"}} -

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

\ No newline at end of file +

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

+

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

diff --git a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/new/-header.hbs b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/new/-header.hbs index ace8ccb08..38ae01334 100644 --- a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/new/-header.hbs +++ b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/new/-header.hbs @@ -1 +1,4 @@ -

{{t "titles.new"}}

\ No newline at end of file +

+ {{t "titles.new"}} + +

diff --git a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host/-header.hbs b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host/-header.hbs index 3c28edc80..7b15e6f0f 100644 --- a/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host/-header.hbs +++ b/ui/core/app/templates/scopes/scope/projects/project/host-catalogs/host-catalog/hosts/host/-header.hbs @@ -1,6 +1,6 @@

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

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

{{t "titles.new"}} \ No newline at end of file +

+ {{t "titles.new"}} + +

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 index 120ae0e48..91a17f32d 100644 --- 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 @@ -7,7 +7,7 @@

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

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

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 index 0d969f874..641fd3ff9 100644 --- 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 @@ -7,7 +7,10 @@ -

{{t "titles.new"}}

+

+ {{t "titles.new"}} + +

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 4cb31e30a..02f7a667b 100644 --- a/ui/core/app/templates/scopes/scope/projects/project/index.hbs +++ b/ui/core/app/templates/scopes/scope/projects/project/index.hbs @@ -7,7 +7,7 @@

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

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

{{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 9615a7c2d..6efba5727 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 @@ -7,7 +7,7 @@

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

{{#if @model}}

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

diff --git a/ui/core/app/templates/scopes/scope/projects/project/targets/new.hbs b/ui/core/app/templates/scopes/scope/projects/project/targets/new.hbs index 4ac91435b..f161f252b 100644 --- a/ui/core/app/templates/scopes/scope/projects/project/targets/new.hbs +++ b/ui/core/app/templates/scopes/scope/projects/project/targets/new.hbs @@ -7,7 +7,10 @@ -

{{t "titles.new"}}

+

+ {{t "titles.new"}} + +

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 b94a925a8..14e01c1de 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,6 +1,6 @@

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

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

{{t "resources.target.host-set.messages.add.title"}} -

{{t "resources.target.host-set.messages.add.description"}}

\ No newline at end of file +

+ {{t "resources.target.host-set.messages.add.title"}} + +

+

{{t "resources.target.host-set.messages.add.description"}}

diff --git a/ui/core/app/templates/scopes/scope/roles/index.hbs b/ui/core/app/templates/scopes/scope/roles/index.hbs index 2175ad1a9..8acc8ee3a 100644 --- a/ui/core/app/templates/scopes/scope/roles/index.hbs +++ b/ui/core/app/templates/scopes/scope/roles/index.hbs @@ -7,7 +7,7 @@

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

{{#if @model}}

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

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 a04e5edc1..142af2e8d 100644 --- a/ui/core/app/templates/scopes/scope/roles/role/-header.hbs +++ b/ui/core/app/templates/scopes/scope/roles/role/-header.hbs @@ -1,6 +1,6 @@

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

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

{{t "resources.role.principal.messages.add-principals.title"}} -

{{t "resources.role.principal.messages.add-principals.description"}}

\ No newline at end of file +

+ {{t "resources.role.principal.messages.add-principals.title"}} + +

+

{{t "resources.role.principal.messages.add-principals.description"}}

diff --git a/ui/core/app/templates/scopes/scope/roles/role/grants/-header.hbs b/ui/core/app/templates/scopes/scope/roles/role/grants/-header.hbs index 84395fb77..4aea69c7e 100644 --- a/ui/core/app/templates/scopes/scope/roles/role/grants/-header.hbs +++ b/ui/core/app/templates/scopes/scope/roles/role/grants/-header.hbs @@ -1,6 +1,6 @@

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

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

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

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

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

{{#if @model}}

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

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 1f80dcfc5..d6208892e 100644 --- a/ui/core/app/templates/scopes/scope/users/user/-header.hbs +++ b/ui/core/app/templates/scopes/scope/users/user/-header.hbs @@ -1,6 +1,6 @@

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

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

`); + 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 index d91c9eeed..d4263c1eb 100644 --- a/ui/core/tests/integration/helpers/doc-url-test.js +++ b/ui/core/tests/integration/helpers/doc-url-test.js @@ -11,7 +11,7 @@ module('Integration | Helper | doc-url', function(hooks) { assert.expect(3); const baseURL = config.documentation.baseURL; const path = config.documentation.topics.account; - await render(hbs`{{doc-url 'topics.account'}}`); + await render(hbs`{{doc-url 'account'}}`); assert.ok(baseURL); assert.ok(path); assert.equal(this.element.textContent.trim(), `${baseURL}${path}`); @@ -20,7 +20,7 @@ module('Integration | Helper | doc-url', function(hooks) { 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.ok(helper.compute(['account']), 'Specified document exists.') assert.throws(() => { helper.compute(['no.such.doc']); }, 'Specified documentation was not found, so the helper threw an error.'); diff --git a/ui/core/translations/resources/en-us.yaml b/ui/core/translations/resources/en-us.yaml index fccc4b485..bdb87f84a 100644 --- a/ui/core/translations/resources/en-us.yaml +++ b/ui/core/translations/resources/en-us.yaml @@ -107,14 +107,14 @@ session: org: title: Organization title_plural: Organizations - description: An organization is a type of scope used to organize projects and IAM resources. Organizations contain projects and is a child scope of global. + description: An organization is a type of scope used to organize projects and IAM resources. Organizations are child scopes of the global scope. messages: welcome: title: Welcome to Organizations project: title: Project title_plural: Projects - description: A project is a type of scope used to organize resources such as by targets and host catalogs. + description: A project is a type of scope used to organize resources such as targets and host catalogs. messages: welcome: title: Welcome to Projects From eb2604d2d54980fdcd8e54d1f5b2ed28686a06d8 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Tue, 6 Oct 2020 17:55:19 -0400 Subject: [PATCH 2/2] =?UTF-8?q?chore:=20=F0=9F=A4=96=20updated=20doc=20pat?= =?UTF-8?q?hs=20to=20be=20plural?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/core/config/environment.js | 46 +++++++++++++++++------------------ 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/ui/core/config/environment.js b/ui/core/config/environment.js index ce67eb35d..35a77d0f3 100644 --- a/ui/core/config/environment.js +++ b/ui/core/config/environment.js @@ -41,29 +41,29 @@ module.exports = function (environment) { documentation: { baseURL: 'https://boundaryproject.io/help/admin-ui', topics: { - org: '/org', - 'org.new': '/org/new', - project: '/project', - 'project.new': '/project/new', - account: '/account', - 'account.new': '/account/new', - 'auth-method': '/auth-method', - group: '/group', - 'group.add-members': '/group/add-members', - 'host-catalog': '/host-catalog', - 'host-catalog.new': '/host-catalog/new', - 'host-set': '/host-set', - 'host-set.new': '/host-set/new', - 'host-set.add-hosts': '/host-set/add-hosts', - host: '/host', - 'host.new': '/host/new', - role: '/role', - 'role.add-principals': '/role/add-principals', - session: '/session', - target: '/target', - 'target.new': '/target/new', - 'target.add-host-sets': '/target/add-host-sets', - user: '/user' + org: '/orgs', + 'org.new': '/orgs/new', + project: '/projects', + 'project.new': '/projects/new', + account: '/accounts', + 'account.new': '/accounts/new', + 'auth-method': '/auth-methods', + group: '/groups', + 'group.add-members': '/groups/add-members', + 'host-catalog': '/host-catalogs', + 'host-catalog.new': '/host-catalogs/new', + 'host-set': '/host-sets', + 'host-set.new': '/host-sets/new', + 'host-set.add-hosts': '/host-sets/add-hosts', + host: '/hosts', + 'host.new': '/hosts/new', + role: '/roles', + 'role.add-principals': '/roles/add-principals', + session: '/sessions', + target: '/targets', + 'target.new': '/targets/new', + 'target.add-host-sets': '/targets/add-host-sets', + user: '/users' } },