90c9b89b5e
This uses ember-page-title to add dynamic page titles throughout the route hierarchy. When there’s more than one region, the current current region is added before the final entry of “- Nomad”.
41 lines
2.2 KiB
Handlebars
41 lines
2.2 KiB
Handlebars
{{head-layout}}
|
|
{{title (if system.shouldShowRegions (concat system.activeRegion " - ")) "Nomad" separator=" - "}}
|
|
{{partial "svg-patterns"}}
|
|
{{#unless error}}
|
|
{{outlet}}
|
|
{{else}}
|
|
<div class="error-container">
|
|
<div data-test-error class="error-message">
|
|
{{#if isNoLeader}}
|
|
<h1 data-test-error-title class="title is-spaced">No Cluster Leader</h1>
|
|
<p data-test-error-message class="subtitle">
|
|
The cluster has no leader. <a href="https://www.nomadproject.io/guides/outage.html"> Read about Outage Recovery.</a>
|
|
</p>
|
|
{{else if is500}}
|
|
<h1 data-test-error-title class="title is-spaced">Server Error</h1>
|
|
<p data-test-error-message class="subtitle">A server error prevented data from being sent to the client.</p>
|
|
{{else if is404}}
|
|
<h1 data-test-error-title class="title is-spaced">Not Found</h1>
|
|
<p data-test-error-message class="subtitle">What you're looking for couldn't be found. It either doesn't exist or you are not authorized to see it.</p>
|
|
{{else if is403}}
|
|
<h1 data-test-error-title class="title is-spaced">Not Authorized</h1>
|
|
{{#if token.secret}}
|
|
<p data-test-error-message class="subtitle">Your {{#link-to "settings.tokens" data-test-error-acl-link}}ACL token{{/link-to}} does not provide the required permissions. Contact your administrator if this is an error.</p>
|
|
{{else}}
|
|
<p data-test-error-message class="subtitle">Provide an {{#link-to "settings.tokens" data-test-error-acl-link}}ACL token{{/link-to}} with requisite permissions to view this.</p>
|
|
{{/if}}
|
|
{{else}}
|
|
<h1 data-test-error-title class="title is-spaced">Error</h1>
|
|
<p data-test-error-message class="subtitle">Something went wrong.</p>
|
|
{{/if}}
|
|
{{#if (eq config.environment "development")}}
|
|
<pre class="error-stack-trace"><code>{{errorStr}}</code></pre>
|
|
{{/if}}
|
|
</div>
|
|
<div class="error-links">
|
|
{{#link-to "jobs" data-test-error-jobs-link class="button is-white"}}Go to Jobs{{/link-to}}
|
|
{{#link-to "clients" data-test-error-clients-link class="button is-white"}}Go to Clients{{/link-to}}
|
|
</div>
|
|
</div>
|
|
{{/unless}}
|