Skip to content

Commit

Permalink
ui: add some additional env level URLs for easier linking (#6145)
Browse files Browse the repository at this point in the history
Right now we only use CONSUL_DOCS_URL, the others are for future usage
  • Loading branch information
johncowen authored and John Cowen committed Sep 4, 2019
1 parent 5debc74 commit 44c2da3
Show file tree
Hide file tree
Showing 13 changed files with 18 additions and 15 deletions.
4 changes: 2 additions & 2 deletions ui-v2/app/templates/components/hashicorp-consul.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<nav>
<ul>
<li data-test-main-nav-docs>
<a href="{{ env 'CONSUL_DOCUMENTATION_URL'}}" rel="help noopener noreferrer" target="_blank">Documentation</a>
<a href="{{ env 'CONSUL_DOCS_URL'}}" rel="help noopener noreferrer" target="_blank">Documentation</a>
</li>
<li data-test-main-nav-settings class={{if (is-href 'settings') 'is-active'}}>
<a href={{href-to 'settings'}}>Settings</a>
Expand All @@ -57,7 +57,7 @@
<footer role="contentinfo" data-test-footer>
<a data-test-footer-copyright href="{{env 'CONSUL_COPYRIGHT_URL'}}/" rel="noopener noreferrer" target="_blank">&copy; {{env 'CONSUL_COPYRIGHT_YEAR'}} HashiCorp</a>
<p data-test-footer-version>Consul {{env 'CONSUL_VERSION'}}</p>
<a data-test-footer-docs href="{{env 'CONSUL_DOCUMENTATION_URL'}}" rel="help noopener noreferrer" target="_blank">Documentation</a>
<a data-test-footer-docs href="{{env 'CONSUL_DOCS_URL'}}" rel="help noopener noreferrer" target="_blank">Documentation</a>
{{{concat '<!-- ' (env 'CONSUL_GIT_SHA') '-->'}}}
</footer>
{{modal-layer}}
2 changes: 1 addition & 1 deletion ui-v2/app/templates/components/policy-form.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
{{/if}}
</label>
<label class="type-text" data-test-rules>
<span>Rules <a href="{{env 'CONSUL_DOCUMENTATION_URL'}}/guides/acl.html#rule-specification" rel="help noopener noreferrer" target="_blank">(HCL Format)</a></span>
<span>Rules <a href="{{env 'CONSUL_DOCS_URL'}}/guides/acl.html#rule-specification" rel="help noopener noreferrer" target="_blank">(HCL Format)</a></span>
{{#if (eq item.template '') }}
{{code-editor syntax='hcl' class=(if item.error.Rules 'error') name=(concat name '[Rules]') value=item.Rules onkeyup=(action 'change' (concat name '[Rules]'))}}
{{#if item.error.Rules}}
Expand Down
2 changes: 1 addition & 1 deletion ui-v2/app/templates/components/policy-selector.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
{{/block-slot}}
{{#block-slot 'details'}}
<label class="type-text">
<span>Rules <a href="{{env 'CONSUL_DOCUMENTATION_URL'}}/guides/acl.html#rule-specification" rel="help noopener noreferrer" target="_blank">(HCL Format)</a></span>
<span>Rules <a href="{{env 'CONSUL_DOCS_URL'}}/guides/acl.html#rule-specification" rel="help noopener noreferrer" target="_blank">(HCL Format)</a></span>
{{#if (eq item.template '')}}
{{code-editor syntax='hcl' readonly=true value=item.Rules}}
{{else}}
Expand Down
2 changes: 1 addition & 1 deletion ui-v2/app/templates/dc/acls/-disabled.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
ACLs are disabled in this Consul cluster. This is the default behavior, as you have to explicitly enable them.
</p>
<p>
Learn more in the <a href="{{ env 'CONSUL_DOCUMENTATION_URL'}}/guides/acl.html" rel="noopener noreferrer" target="_blank">ACL documentation</a>
Learn more in the <a href="{{ env 'CONSUL_DOCS_URL'}}/guides/acl.html" rel="noopener noreferrer" target="_blank">ACL documentation</a>
</p>
2 changes: 1 addition & 1 deletion ui-v2/app/templates/dc/acls/-form.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
{{/each}}
</div>
<label class="type-text">
<span>Policy <a href="{{env 'CONSUL_DOCUMENTATION_URL'}}/guides/acl.html#rule-specification" rel="help noopener noreferrer" target="_blank">(HCL Format)</a></span>
<span>Policy <a href="{{env 'CONSUL_DOCS_URL'}}/guides/acl.html#rule-specification" rel="help noopener noreferrer" target="_blank">(HCL Format)</a></span>
{{code-editor class=(if item.error.Rules 'error') name='Rules' value=item.Rules syntax="hcl" onkeyup=(action 'change' 'Rules')}}
</label>
{{#if create }}
Expand Down
2 changes: 1 addition & 1 deletion ui-v2/app/templates/dc/acls/policies/-view.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<p class="notice policy-management"><strong>Management</strong> This global-management token is built into Consul's policy system. You can apply this special policy to tokens for full access. This policy is not editable or removeable, but can be ignored by not applying it to any tokens. Learn more in our <a href="{{env 'CONSUL_DOCUMENTATION_URL'}}/guides/acl.html#builtin-policies" target="_blank" rel="noopener noreferrer">documentation</a>.</p>
<p class="notice policy-management"><strong>Management</strong> This global-management token is built into Consul's policy system. You can apply this special policy to tokens for full access. This policy is not editable or removeable, but can be ignored by not applying it to any tokens. Learn more in our <a href="{{env 'CONSUL_DOCS_URL'}}/guides/acl.html#builtin-policies" target="_blank" rel="noopener noreferrer">documentation</a>.</p>
<div>
<dl>
<dt>Name</dt>
Expand Down
2 changes: 1 addition & 1 deletion ui-v2/app/templates/dc/acls/tokens/-fieldsets-legacy.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</div>
{{/if}}
<label class="type-text">
<span>Rules <a href="{{env 'CONSUL_DOCUMENTATION_URL'}}/guides/acl.html#rule-specification" rel="help noopener noreferrer" target="_blank">(HCL Format)</a></span>
<span>Rules <a href="{{env 'CONSUL_DOCS_URL'}}/guides/acl.html#rule-specification" rel="help noopener noreferrer" target="_blank">(HCL Format)</a></span>
{{code-editor class=(if item.error.Rules 'error') name='Rules' syntax='hcl' value=item.Rules onkeyup=(action 'change' 'Rules')}}
</label>
{{#if create }}
Expand Down
2 changes: 1 addition & 1 deletion ui-v2/app/templates/dc/acls/tokens/edit.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
{{/block-slot}}
{{#block-slot 'content'}}
{{#if (token/is-legacy item)}}
<p class="notice info"><strong>Update.</strong> We have upgraded our ACL system by allowing you to create reusable policies which you can then apply to tokens. Don't worry, even though this token was written in the old style, it is still valid. However, we do recommend upgrading your old tokens to the new style. Learn how in our <a href="{{env 'CONSUL_DOCUMENTATION_URL'}}/guides/acl-migrate-tokens.html" target="_blank" rel="noopener noreferrer">documentation</a>.</p>
<p class="notice info"><strong>Update.</strong> We have upgraded our ACL system by allowing you to create reusable policies which you can then apply to tokens. Don't worry, even though this token was written in the old style, it is still valid. However, we do recommend upgrading your old tokens to the new style. Learn how in our <a href="{{env 'CONSUL_DOCS_URL'}}/guides/acl-migrate-tokens.html" target="_blank" rel="noopener noreferrer">documentation</a>.</p>
{{/if}}
{{#if (not create) }}
<div>
Expand Down
2 changes: 1 addition & 1 deletion ui-v2/app/templates/dc/acls/tokens/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</form>
{{/if}}
{{#if (token/is-legacy items)}}
<p data-test-notification-update class="notice info"><strong>Update.</strong> We have upgraded our ACL System to allow the creation of reusable policies that can be applied to tokens. Read more about the changes and how to upgrade legacy tokens in our <a href="{{env 'CONSUL_DOCUMENTATION_URL'}}/guides/acl-migrate-tokens.html" target="_blank" rel="noopener noreferrer">documentation</a>.</p>
<p data-test-notification-update class="notice info"><strong>Update.</strong> We have upgraded our ACL System to allow the creation of reusable policies that can be applied to tokens. Read more about the changes and how to upgrade legacy tokens in our <a href="{{env 'CONSUL_DOCS_URL'}}/guides/acl-migrate-tokens.html" target="_blank" rel="noopener noreferrer">documentation</a>.</p>
{{/if}}
{{#changeable-set dispatcher=searchable}}
{{#block-slot 'set' as |filtered|}}
Expand Down
4 changes: 2 additions & 2 deletions ui-v2/app/templates/dc/kv/edit.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
{{#block-slot 'content'}}
{{#if session}}
<p class="notice warning">
<strong>Warning.</strong> This KV has a lock session. You can edit KV's with lock sessions, but we recommend doing so with care, or not doing so at all. It may negatively impact the active node it's associated with. See below for more details on the Lock Session and see <a href="{{env 'CONSUL_DOCUMENTATION_URL'}}/internals/sessions.html" target="_blank" rel="noopener noreferrer">our documentation</a> for more information.
<strong>Warning.</strong> This KV has a lock session. You can edit KV's with lock sessions, but we recommend doing so with care, or not doing so at all. It may negatively impact the active node it's associated with. See below for more details on the Lock Session and see <a href="{{env 'CONSUL_DOCS_URL'}}/internals/sessions.html" target="_blank" rel="noopener noreferrer">our documentation</a> for more information.
</p>
{{/if}}
{{partial 'dc/kv/form'}}
{{#if session}}
<div data-test-session={{session.ID}}>
<h2>
<a href="{{env 'CONSUL_DOCUMENTATION_URL'}}/internals/sessions.html#session-design" rel="help noopener noreferrer" target="_blank">Lock Session</a>
<a href="{{env 'CONSUL_DOCS_URL'}}/internals/sessions.html#session-design" rel="help noopener noreferrer" target="_blank">Lock Session</a>
</h2>
<dl>
<dt>Name</dt>
Expand Down
2 changes: 1 addition & 1 deletion ui-v2/app/templates/dc/nodes/-sessions.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
{{/tabular-collection}}
{{else}}
<p>
There are no Lock Sessions for this Node. For more information, view <a href="{{ env 'CONSUL_DOCUMENTATION_URL'}}/internals/sessions.html" rel="help noopener noreferrer" target="_blank">our documentation</a>
There are no Lock Sessions for this Node. For more information, view <a href="{{ env 'CONSUL_DOCS_URL'}}/internals/sessions.html" rel="help noopener noreferrer" target="_blank">our documentation</a>
</p>
{{/if}}

2 changes: 1 addition & 1 deletion ui-v2/app/templates/error.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<p>
Consul returned an error.
You may have visited a URL that is loading an unknown resource, so you can try going back to the root or try re-submitting your ACL Token/SecretID by going back to ACLs.<br />
Try looking in our <a href="{{env 'CONSUL_DOCUMENTATION_URL'}}" target="_blank">documentation</a>
Try looking in our <a href="{{env 'CONSUL_DOCS_URL'}}" target="_blank">documentation</a>
</p>
<a rel="home" href={{href-to 'index'}}>Go back to root</a>
{{/block-slot}}
Expand Down
5 changes: 4 additions & 1 deletion ui-v2/config/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ module.exports = function(environment) {
}
return 'oss';
})(),
CONSUL_DOCUMENTATION_URL: 'https://www.consul.io/docs',
CONSUL_HOME_URL: 'https://www.consul.io',
CONSUL_DOCS_URL: 'https://www.consul.io/docs',
CONSUL_DOCS_LEARN_URL: 'https://learn.hashicorp.com/consul',
CONSUL_DOCS_API_URL: 'https://www.consul.io/api',
CONSUL_COPYRIGHT_URL: 'https://www.hashicorp.com',
CONSUL_COPYRIGHT_YEAR: '2019',
});
Expand Down

0 comments on commit 44c2da3

Please sign in to comment.