open-nomad/ui/app/templates/application.hbs
Buck Doyle e9e52e0dfe
Update Ember/Ember CLI to 3.20 (#9641)
This doesn’t include Ember Data, as we are still back on 3.12.

Most changes are deprecation updates, linting fixes, and dependencies. It can
be read commit-by-commit, though many of them are mechanical and skimmable.
For the new linting exclusions, I’ve added them to the Tech Debt list.

The decrease in test count is because linting is no longer included in ember test.

There’s a new deprecation warning in the logs that can be fixed by updating Ember
Power Select but when I tried that it caused it to render incorrectly, so I decided to
ignore it for now and address it separately.
2021-02-17 15:01:44 -06:00

40 lines
2.2 KiB
Handlebars

{{page-title (if this.system.shouldShowRegions (concat this.system.activeRegion " - ")) "Nomad" separator=" - "}}
<SvgPatterns />
{{#unless this.error}}
{{outlet}}
{{else}}
<div class="error-container">
<div data-test-error class="error-message">
{{#if this.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 this.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 this.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 this.is403}}
<h1 data-test-error-title class="title is-spaced">Not Authorized</h1>
{{#if this.token.secret}}
<p data-test-error-message class="subtitle">Your <LinkTo @route="settings.tokens" data-test-error-acl-link>ACL token</LinkTo> 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 <LinkTo @route="settings.tokens" data-test-error-acl-link>ACL token</LinkTo> 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 this.config.environment "development")}}
<pre class="error-stack-trace"><code>{{this.errorStr}}</code></pre>
{{/if}}
</div>
<div class="error-links">
<LinkTo @route="jobs" data-test-error-jobs-link class="button is-white">Go to Jobs</LinkTo>
<LinkTo @route="clients" data-test-error-clients-link class="button is-white">Go to Clients</LinkTo>
</div>
</div>
{{/unless}}