Merge pull request #296 from hashicorp/chore-more-docs

chore: 🤖 add additional documentation links throughout
This commit is contained in:
Randall Morey authored and GitHub committed 2020-10-07 12:10:19 -04:00
commit 0ae1aab097
37 files changed
+97 -54

No files matched your search

+1 -2
View File
@@ -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
@@ -1,6 +1,6 @@
<h2>
{{t "resources.auth-method.title"}}
<DocLink @doc="topics.auth-method" @iconSize="large" />
<DocLink @doc="auth-method" @iconSize="large" />
</h2>
<p>{{t "resources.auth-method.description"}}</p>
<Copyable
@@ -1,6 +1,6 @@
<h2>
{{t "resources.account.title"}}
<DocLink @doc="topics.account" @iconSize="large" />
<DocLink @doc="account" @iconSize="large" />
</h2>
<Copyable
@text={{@model.id}}
@@ -1 +1,4 @@
<h2>{{t "titles.new"}}</h2>
<h2>
{{t "titles.new"}}
<DocLink @doc="account.new" @iconSize="large" />
</h2>
@@ -2,7 +2,7 @@
<page.header>
<h2>
{{t "resources.auth-method.title_plural"}}
<DocLink @doc="topics.auth-method" @iconSize="large" />
<DocLink @doc="auth-method" @iconSize="large" />
</h2>
<p>{{t "resources.auth-method.description"}}</p>
</page.header>
@@ -1,6 +1,6 @@
<h2>
{{t "resources.group.title"}}
<DocLink @doc="topics.group" @iconSize="large" />
<DocLink @doc="group" @iconSize="large" />
</h2>
<p>{{t "resources.group.description"}}</p>
<Copyable
@@ -1,2 +1,5 @@
<h2>{{t "resources.group.messages.add-members.title"}}</h2>
<h2>
{{t "resources.group.messages.add-members.title"}}
<DocLink @doc="group.add-members" @iconSize="large" />
</h2>
<p>{{t "resources.group.messages.add-members.description"}}</p>
@@ -7,7 +7,7 @@
<page.header>
<h2>
{{t "resources.group.title_plural"}}
<DocLink @doc="topics.group" @iconSize="large" />
<DocLink @doc="group" @iconSize="large" />
</h2>
<p>{{t "resources.group.description"}}</p>
</page.header>
@@ -7,7 +7,7 @@
<page.header>
<h2>
{{t "resources.org.title_plural"}}
<DocLink @doc="topics.org" @iconSize="large" />
<DocLink @doc="org" @iconSize="large" />
</h2>
{{#if @model}}
<p>{{t "resources.org.description"}}</p>
@@ -7,7 +7,10 @@
</page.breadcrumbs>
<page.header>
<h2>{{t "titles.new"}}</h2>
<h2>
{{t "titles.new"}}
<DocLink @doc="org.new" @iconSize="large" />
</h2>
</page.header>
<page.body>
@@ -7,7 +7,7 @@
<page.header>
<h2>
{{t "resources.project.title_plural"}}
<DocLink @doc="topics.project" @iconSize="large" />
<DocLink @doc="project" @iconSize="large" />
</h2>
{{#if @model}}
<p>{{t "resources.project.description"}}</p>
@@ -7,7 +7,10 @@
</page.breadcrumbs>
<page.header>
<h2>{{t "titles.new"}}</h2>
<h2>
{{t "titles.new"}}
<DocLink @doc="project.new" @iconSize="large" />
</h2>
</page.header>
<page.body>
@@ -1,6 +1,6 @@
<h2>
{{t "resources.host-catalog.title"}}
<DocLink @doc="topics.host-catalog" @iconSize="large" />
<DocLink @doc="host-catalog" @iconSize="large" />
</h2>
<p>{{t "resources.host-catalog.description"}}</p>
<Copyable
@@ -1,6 +1,6 @@
<h2>
{{t "resources.host-set.title"}}
<DocLink @doc="topics.host-set" @iconSize="large" />
<DocLink @doc="host-set" @iconSize="large" />
</h2>
<p>{{t "resources.host-set.description"}}</p>
<Copyable
@@ -1,2 +1,5 @@
<h2>{{t "resources.host-set.host.messages.add.title"}}</h2>
<p>{{t "resources.host-set.host.messages.add.description"}}</p>
<h2>
{{t "resources.host-set.host.messages.add.title"}}
<DocLink @doc="host-set.add-hosts" @iconSize="large" />
</h2>
<p>{{t "resources.host-set.host.messages.add.description"}}</p>
@@ -1 +1,4 @@
<h2>{{t "titles.new"}}</h2>
<h2>
{{t "titles.new"}}
<DocLink @doc="host-set.new" @iconSize="large" />
</h2>
@@ -1,6 +1,6 @@
<h2>
{{t "resources.host.title"}}
<DocLink @doc="topics.host" @iconSize="large" />
<DocLink @doc="host" @iconSize="large" />
</h2>
<p>{{t "resources.host.description"}}</p>
<Copyable
@@ -1 +1,4 @@
<h2>{{t "titles.new"}}</h2>
<h2>
{{t "titles.new"}}
<DocLink @doc="host.new" @iconSize="large" />
</h2>
@@ -7,7 +7,7 @@
<page.header>
<h2>
{{t "resources.host-catalog.title_plural"}}
<DocLink @doc="topics.host-catalog" @iconSize="large" />
<DocLink @doc="host-catalog" @iconSize="large" />
</h2>
<p>{{t "resources.host-catalog.description"}}</p>
</page.header>
@@ -7,7 +7,10 @@
</page.breadcrumbs>
<page.header>
<h2>{{t "titles.new"}}</h2>
<h2>
{{t "titles.new"}}
<DocLink @doc="host-catalog.new" @iconSize="large" />
</h2>
</page.header>
<page.body>
@@ -7,7 +7,7 @@
<page.header>
<h2>
{{t "resources.project.title"}}
<DocLink @doc="topics.project" @iconSize="large" />
<DocLink @doc="project" @iconSize="large" />
</h2>
<p>{{t "resources.project.description"}}</p>
<Copyable
@@ -7,7 +7,7 @@
<page.header>
<h2>
{{t "resources.session.title_plural"}}
<DocLink @doc="topics.session" @iconSize="large" />
<DocLink @doc="session" @iconSize="large" />
</h2>
<p>{{t "resources.session.description"}}</p>
</page.header>
@@ -7,7 +7,7 @@
<page.header>
<h2>
{{t "resources.target.title_plural"}}
<DocLink @doc="topics.target" @iconSize="large" />
<DocLink @doc="target" @iconSize="large" />
</h2>
{{#if @model}}
<p>{{t "resources.target.description"}}</p>
@@ -7,7 +7,10 @@
</page.breadcrumbs>
<page.header>
<h2>{{t "titles.new"}}</h2>
<h2>
{{t "titles.new"}}
<DocLink @doc="target.new" @iconSize="large" />
</h2>
</page.header>
<page.body>
@@ -1,6 +1,6 @@
<h2>
{{t "resources.target.title"}}
<DocLink @doc="topics.target" @iconSize="large" />
<DocLink @doc="target" @iconSize="large" />
</h2>
<p>{{t "resources.target.description"}}</p>
<Copyable
@@ -1,2 +1,5 @@
<h2>{{t "resources.target.host-set.messages.add.title"}}</h2>
<p>{{t "resources.target.host-set.messages.add.description"}}</p>
<h2>
{{t "resources.target.host-set.messages.add.title"}}
<DocLink @doc="target.add-host-sets" @iconSize="large" />
</h2>
<p>{{t "resources.target.host-set.messages.add.description"}}</p>
@@ -7,7 +7,7 @@
<page.header>
<h2>
{{t "resources.role.title_plural"}}
<DocLink @doc="topics.role" @iconSize="large" />
<DocLink @doc="role" @iconSize="large" />
</h2>
{{#if @model}}
<p>{{t "resources.role.description"}}</p>
@@ -1,6 +1,6 @@
<h2>
{{t "resources.role.title"}}
<DocLink @doc="topics.role" @iconSize="large" />
<DocLink @doc="role" @iconSize="large" />
</h2>
<p>{{t "resources.role.description"}}</p>
<Copyable
@@ -1,2 +1,5 @@
<h2>{{t "resources.role.principal.messages.add-principals.title"}}</h2>
<p>{{t "resources.role.principal.messages.add-principals.description"}}</p>
<h2>
{{t "resources.role.principal.messages.add-principals.title"}}
<DocLink @doc="role.add-principals" @iconSize="large" />
</h2>
<p>{{t "resources.role.principal.messages.add-principals.description"}}</p>
@@ -1,6 +1,6 @@
<h2>
{{t "resources.role.title"}}
<DocLink @doc="topics.role" @iconSize="large" />
<DocLink @doc="role" @iconSize="large" />
</h2>
<p>{{t "resources.role.grant.description"}}</p>
<Copyable
@@ -1,6 +1,6 @@
<h2>
{{t "resources.role.title"}}
<DocLink @doc="topics.role" @iconSize="large" />
<DocLink @doc="role" @iconSize="large" />
</h2>
<p>{{t "resources.role.principal.description"}}</p>
<Copyable
@@ -7,7 +7,7 @@
<page.header>
<h2>
{{t "resources.user.title_plural"}}
<DocLink @doc="topics.user" @iconSize="large" />
<DocLink @doc="user" @iconSize="large" />
</h2>
{{#if @model}}
<p>{{t "resources.user.description"}}</p>
@@ -1,6 +1,6 @@
<h2>
{{t "resources.user.title"}}
<DocLink @doc="topics.user" @iconSize="large" />
<DocLink @doc="user" @iconSize="large" />
</h2>
<p>{{t "resources.user.description"}}</p>
<Copyable
+23 -12
View File
@@ -41,18 +41,29 @@ module.exports = function (environment) {
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'
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'
}
},
@@ -8,7 +8,7 @@ module('Integration | Component | doc-link', function(hooks) {
test('it renders', async function(assert) {
assert.expect(1);
await render(hbs`<DocLink @doc="topics.account" @iconSize="large" />`);
await render(hbs`<DocLink @doc="account" @iconSize="large" />`);
assert.ok(find('.doc-link .rose-icon.large'));
});
});
@@ -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.');
+2 -2
View File
@@ -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