-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auth and Error View Updates #19749
Auth and Error View Updates #19749
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,3 +60,11 @@ | |
.icon-blue { | ||
color: $blue; | ||
} | ||
|
||
.brand-icon-large { | ||
width: 62px; | ||
} | ||
|
||
.error-icon { | ||
width: 48px; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,45 @@ | ||
<section class="section"> | ||
<div class="container"> | ||
{{#if (eq this.model.httpStatus 404)}} | ||
<NotFound @model={{this.model}} /> | ||
{{else}} | ||
<PageHeader as |p|> | ||
<p.levelLeft> | ||
<h1 class="title is-3 has-text-grey"> | ||
{{#if (eq this.model.httpStatus 403)}} | ||
Not authorized | ||
{{else}} | ||
Error | ||
{{/if}} | ||
</h1> | ||
</p.levelLeft> | ||
</PageHeader> | ||
<BlockError> | ||
{{#if this.model.message}} | ||
<p>{{this.model.message}}</p> | ||
{{/if}} | ||
{{#each this.model.errors as |error|}} | ||
<p>{{error}}</p> | ||
{{/each}} | ||
</BlockError> | ||
{{/if}} | ||
<div class="is-flex-1 is-flex-v-centered"> | ||
<div class="empty-state-content"> | ||
<div class="is-flex-v-centered has-bottom-margin-xxl"> | ||
<div class="brand-icon-large"> | ||
<Icon @name="vault" @size="24" @stretched={{true}} /> | ||
</div> | ||
</div> | ||
<div class="is-flex-center"> | ||
<div class="error-icon"> | ||
<Icon @name="help" @size="24" class="has-text-grey" @stretched={{true}} /> | ||
</div> | ||
<div class="has-left-margin-s"> | ||
<h1 class="is-size-4 has-text-semibold has-text-grey has-line-height-1"> | ||
{{#if (eq this.model.httpStatus 403)}} | ||
Not authorized | ||
{{else if (eq this.model.httpStatus 404)}} | ||
Page not found | ||
{{else}} | ||
Error | ||
{{/if}} | ||
</h1> | ||
<p class="has-text-grey is-size-8">Error {{this.model.httpStatus}}</p> | ||
</div> | ||
</div> | ||
|
||
<p class="has-text-grey has-top-margin-m has-bottom-padding-l has-border-bottom-light"> | ||
{{#if (eq this.model.httpStatus 404)}} | ||
Sorry, we were unable to find any content at that URL. Double check it or go back home. | ||
{{else}} | ||
{{this.model.message}} | ||
{{join ". " this.model.errors}} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I know sometimes we see the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think that's a good suggestion @hashishaw and we should have a common way to handle API errors. We do have the return reject({ httpStatus: 404, message: 'not found', path: params.cluster_name }); Do you think I should get rid of the other status handling and simplify the template or leave it just in case? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm going to merge this but happy to make further changes as part of the primary PR. |
||
{{/if}} | ||
</p> | ||
|
||
<div class="is-flex-between has-top-margin-s"> | ||
<ExternalLink @href="/" @sameTab={{true}} class="is-no-underline is-flex-center has-text-semibold"> | ||
<Chevron @direction="left" /> | ||
Go home | ||
</ExternalLink> | ||
<DocLink @path="/vault/api-docs#http-status-codes"> | ||
Learn more | ||
</DocLink> | ||
</div> | ||
</div> | ||
</section> | ||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Want to make sure @Monkeychip is aware of these additions for the upcoming css organization!