From dc20d6ef02e0302d3272ce5e362017e0b8ab195e Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Wed, 17 Jun 2020 12:12:32 -0400 Subject: [PATCH 1/7] =?UTF-8?q?chore:=20=F0=9F=A4=96=20add=20convenience?= =?UTF-8?q?=20identifiers=20to=20error=20objects?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/api/addon/adapters/application.js | 49 +++++++++++++++++++ .../tests/unit/adapters/application-test.js | 24 +++++++-- 2 files changed, 68 insertions(+), 5 deletions(-) diff --git a/addons/api/addon/adapters/application.js b/addons/api/addon/adapters/application.js index ace0b9669..cef50d39e 100644 --- a/addons/api/addon/adapters/application.js +++ b/addons/api/addon/adapters/application.js @@ -4,6 +4,7 @@ import { get } from '@ember/object'; import { InvalidError } from '@ember-data/adapter/error'; import { dasherize } from '@ember/string'; import { pluralize } from 'ember-inflector'; +import { isArray } from '@ember/array'; export default class ApplicationAdapter extends RESTAdapter { // =attributes @@ -91,6 +92,53 @@ export default class ApplicationAdapter extends RESTAdapter { return super.handleResponse(status, headers, payload, requestData); } + /** + * Add convenience booleans to each error within the errors list indicating + * the type of error that occurred. This is useful in downstream templates, + * e.g. `{{if error.isForbidden}}`. + * + * Error booleans are attached based on the error status code: + * + * - `401 isUnauthenticated`: the session isn't authenticated + * - `403 isForbidden`: the session is authenticated but does not have + * permission to perform the requested action + * - `404 isNotFound`: the requested resource could not be found + * - `500 isServer`: an internal server error occurred + * - `isUnknown`: an error occurred, but we don't know which or + * we don't distinguish it yet + * + * @override + * @method normalizeErrorResponse + * @param {Number} status + * @param {Object} headers + * @param {Object} payload + * @return {Array} errors payload + */ + normalizeErrorResponse(/*status, headers, payload*/) { + const errors = super.normalizeErrorResponse(...arguments); + if (isArray(errors)) { + errors.forEach(error => { + switch (Number(error.status)) { + case 401: + error.isUnauthenticated = true; + break; + case 403: + error.isForbidden = true; + break; + case 404: + error.isNotFound = true; + break; + case 500: + error.isServer = true; + break; + default: + error.isUnknown = true; + } + }); + } + return errors; + } + /** * Normalizes the errors found in a payload from our API into JSON API * error format. @@ -103,6 +151,7 @@ export default class ApplicationAdapter extends RESTAdapter { // Normalize the primary error message into "base", which is an error // that applies to the whole model instance const baseError = { + isInvalid: true, status: payload.source, code: payload.code, detail: payload.message, diff --git a/addons/api/tests/unit/adapters/application-test.js b/addons/api/tests/unit/adapters/application-test.js index 8464a7513..8c58bafec 100644 --- a/addons/api/tests/unit/adapters/application-test.js +++ b/addons/api/tests/unit/adapters/application-test.js @@ -38,23 +38,37 @@ module('Unit | Adapter | application', function (hooks) { }); test('it returns an proper InvalidError from handleResponse', function (assert) { - assert.expect(3); + assert.expect(4); const adapter = this.owner.lookup('adapter:application'); - let payload = { + const payload = { status: 400, code: 'invalid_argument', message: 'The request was invalid.', }; - let handledResponse = adapter.handleResponse(400, {}, payload); + const handledResponse = adapter.handleResponse(400, {}, payload); assert.ok(handledResponse instanceof InvalidError); assert.equal(handledResponse.errors.length, 1); assert.equal(handledResponse.message, 'The request was invalid.'); + assert.ok(handledResponse.errors[0].isInvalid); + }); + + test('it assigns convenience booleans for error types', function (assert) { + assert.expect(6); + const adapter = this.owner.lookup('adapter:application'); + const getResponse = (status) => + adapter.handleResponse(status, {}, { status }); + assert.ok(getResponse(401).errors[0].isUnauthenticated); + assert.ok(getResponse(403).errors[0].isForbidden); + assert.ok(getResponse(404).errors[0].isNotFound); + assert.ok(getResponse(500).errors[0].isServer); + assert.ok(getResponse(0).errors[0].isUnknown); + assert.ok(getResponse(false).errors[0].isUnknown); }); test('it returns field-level errors in InvalidError from handleResponse', function (assert) { assert.expect(1); const adapter = this.owner.lookup('adapter:application'); - let payload = { + const payload = { status: 400, code: 'invalid_argument', message: 'The request was invalid.', @@ -62,7 +76,7 @@ module('Unit | Adapter | application', function (hooks) { fields: [{ name: 'name', message: 'Name is wrong.' }], }, }; - let handledResponse = adapter.handleResponse(400, {}, payload); + const handledResponse = adapter.handleResponse(400, {}, payload); assert.equal( handledResponse.errors.length, 2, From 0114d6f3d2393a528a581f22e77eb2e6c4d1541e Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Wed, 17 Jun 2020 13:20:57 -0400 Subject: [PATCH 2/7] =?UTF-8?q?chore:=20=F0=9F=A4=96=20add=20placeholder?= =?UTF-8?q?=20template=20for=20errors?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/core/app/routes/orgs/org/projects.js | 8 ++--- ui/core/app/templates/orgs/org/error.hbs | 39 +++++++++++++++++++++++ ui/core/mirage/config.js | 4 +++ ui/core/mirage/serializers/application.js | 3 +- 4 files changed, 47 insertions(+), 7 deletions(-) create mode 100644 ui/core/app/templates/orgs/org/error.hbs diff --git a/ui/core/app/routes/orgs/org/projects.js b/ui/core/app/routes/orgs/org/projects.js index 11beb0531..ee50e8f8a 100644 --- a/ui/core/app/routes/orgs/org/projects.js +++ b/ui/core/app/routes/orgs/org/projects.js @@ -7,11 +7,7 @@ export default class OrgsOrgProjectsRoute extends Route { * Returns all projects from the store. * @return {Promise[ProjectModel]} */ - async model() { - try { - return await this.store.findAll('project'); - } catch (e) { - return []; - } + model() { + return this.store.findAll('project'); } } diff --git a/ui/core/app/templates/orgs/org/error.hbs b/ui/core/app/templates/orgs/org/error.hbs new file mode 100644 index 000000000..be87afd4d --- /dev/null +++ b/ui/core/app/templates/orgs/org/error.hbs @@ -0,0 +1,39 @@ +{{!-- + In an error route, the error instance is `@model`. Error instances contain + a list of errors, each of which has one convenience boolean set on it: + + * Error booleans are attached based on the error status code: + * + * - `error.isUnauthenticated`: the session isn't authenticated + * - `error.isForbidden`: the session is authenticated but does not have + * permission to perform the requested action + * - `error.isNotFound`: the requested resource could not be found + * - `error.isServer`: an internal server error occurred + * - `error.isUnknown`: an error occurred, but we don't know which or + * we don't distinguish it yet + +--}} + +{{#each @model.errors as |error|}} + + {{#if error.isUnauthenticated}} + {{!-- error.status === 401 --}} + {{/if}} + + {{#if error.isForbidden}} + {{!-- error.status === 403 --}} + {{/if}} + + {{#if error.isNotFound}} + {{!-- error.status === 404 --}} + {{/if}} + + {{#if error.isServer}} + {{!-- error.status === 500 --}} + {{/if}} + + {{#if error.isUnknown}} + {{!-- error.status === 🤷 --}} + {{/if}} + +{{/each}} diff --git a/ui/core/mirage/config.js b/ui/core/mirage/config.js index 7ff10e439..c98942919 100644 --- a/ui/core/mirage/config.js +++ b/ui/core/mirage/config.js @@ -28,4 +28,8 @@ export default function() { this.get('/orgs/:org_id/projects/:project_id/host-catalogs/:id'); this.patch('/orgs/:org_id/projects/:project_id/host-catalogs/:id'); this.del('/orgs/:org_id/projects/:project_id/host-catalogs/:id'); + + // Uncomment the following line and the Response import above + // Then change the response code to simulate error responses + //this.get('/orgs/:org_id/projects', () => new Response(401)); } diff --git a/ui/core/mirage/serializers/application.js b/ui/core/mirage/serializers/application.js index bed25389e..1c3821b4b 100644 --- a/ui/core/mirage/serializers/application.js +++ b/ui/core/mirage/serializers/application.js @@ -1,5 +1,6 @@ import { RestSerializer } from 'ember-cli-mirage'; import { underscore } from '@ember/string'; +import { isArray } from '@ember/array'; /** * Manages serialization/normalization of data into and out of the mock API. @@ -38,7 +39,7 @@ export default RestSerializer.extend({ serialize() { let json = RestSerializer.prototype.serialize.apply(this, arguments); // If array, root it under a standard `items` key - if (json.length) json = {items: json}; + if (isArray(json)) json = {items: json}; return json; }, From fd9c8401f8701ce3176eaa372c8bed3611d5ba80 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Wed, 17 Jun 2020 15:35:51 -0400 Subject: [PATCH 3/7] =?UTF-8?q?chore:=20=F0=9F=A4=96=20add=20"no=20items"?= =?UTF-8?q?=20messaging=20when=20sets=20are=20empty?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rose/components/layout/_centered.scss | 1 + .../app/templates/orgs/org/projects/index.hbs | 42 ++++++++--- .../projects/project/host-catalogs/index.hbs | 71 ++++++++++++------- ui/core/translations/en-us.yaml | 2 + 4 files changed, 79 insertions(+), 37 deletions(-) diff --git a/addons/rose/addon/styles/rose/components/layout/_centered.scss b/addons/rose/addon/styles/rose/components/layout/_centered.scss index 10844c8ae..71d058f1e 100644 --- a/addons/rose/addon/styles/rose/components/layout/_centered.scss +++ b/addons/rose/addon/styles/rose/components/layout/_centered.scss @@ -3,4 +3,5 @@ .rose-layout-centered { display: flex; justify-content: center; + padding: sizing.rems(xl) 0; } diff --git a/ui/core/app/templates/orgs/org/projects/index.hbs b/ui/core/app/templates/orgs/org/projects/index.hbs index 0ddef022c..1723da8a6 100644 --- a/ui/core/app/templates/orgs/org/projects/index.hbs +++ b/ui/core/app/templates/orgs/org/projects/index.hbs @@ -13,17 +13,37 @@ - - {{#each @model as |project|}} - - {{/each}} - + + {{#if @model}} + + + {{#each @model as |project|}} + + {{/each}} + + + {{else}} + + + + + {{t 'descriptions.empty-set'}} + + + + {{t 'titles.new'}} + + + + + {{/if}} + diff --git a/ui/core/app/templates/orgs/org/projects/project/host-catalogs/index.hbs b/ui/core/app/templates/orgs/org/projects/project/host-catalogs/index.hbs index d164728eb..898c4159c 100644 --- a/ui/core/app/templates/orgs/org/projects/project/host-catalogs/index.hbs +++ b/ui/core/app/templates/orgs/org/projects/project/host-catalogs/index.hbs @@ -6,6 +6,7 @@

{{t 'resources.host-catalogs'}}

+

{{t 'descriptions.host-catalogs'}}

@@ -17,33 +18,51 @@ -

{{t 'descriptions.host-catalogs'}}

- - - - {{t 'form.label.name'}} - {{t 'form.label.type'}} - {{t 'form.label.description'}} - - - - {{#each @model as |hostCatalog|}} - - - - {{hostCatalog.name}} - - - {{hostCatalog.type}} - {{hostCatalog.description}} - - {{/each}} - - + {{#if @model}} + + + + + {{t 'form.label.name'}} + {{t 'form.label.type'}} + {{t 'form.label.description'}} + + + + {{#each @model as |hostCatalog|}} + + + + {{hostCatalog.name}} + + + {{hostCatalog.type}} + {{hostCatalog.description}} + + {{/each}} + + + + {{else}} + + + + + {{t 'descriptions.empty-set'}} + + + + {{t 'titles.new'}} + + + + + {{/if}} +
diff --git a/ui/core/translations/en-us.yaml b/ui/core/translations/en-us.yaml index 4b51a1dc2..fa0873322 100644 --- a/ui/core/translations/en-us.yaml +++ b/ui/core/translations/en-us.yaml @@ -12,8 +12,10 @@ titles: new: New overview: Overview settings: Settings + empty-set: No Items Yet descriptions: host-catalogs: Overview of collections of hosts and host sets. + empty-set: There are no items to display yet. You may be able to add items or try back later. states: info: Info success: Success From a78c5018e161629630045db0e66b7131641866f1 Mon Sep 17 00:00:00 2001 From: Susmitha Girumala Date: Thu, 18 Jun 2020 14:03:52 -0400 Subject: [PATCH 4/7] =?UTF-8?q?chore:=20=F0=9F=A4=96=20Add=20ui/core=20err?= =?UTF-8?q?or=20message=20template?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add error messages to be displayed for unauthorized 401, forbidden 403, not found 404, server issue 500, and catchall error in ui/core. Also update 'nothing to display' on projects and host catalogs overview pages to 'welcome' messages. --- ui/core/app/templates/orgs/org/error.hbs | 24 ++++++++++++++++--- .../app/templates/orgs/org/projects/index.hbs | 8 ++++--- .../projects/project/host-catalogs/index.hbs | 14 ++++++----- ui/core/mirage/config.js | 14 ++++++++--- ui/core/translations/en-us.yaml | 15 ++++++++++++ 5 files changed, 60 insertions(+), 15 deletions(-) diff --git a/ui/core/app/templates/orgs/org/error.hbs b/ui/core/app/templates/orgs/org/error.hbs index be87afd4d..d3241d609 100644 --- a/ui/core/app/templates/orgs/org/error.hbs +++ b/ui/core/app/templates/orgs/org/error.hbs @@ -13,27 +13,45 @@ * we don't distinguish it yet --}} - {{#each @model.errors as |error|}} - {{#if error.isUnauthenticated}} {{!-- error.status === 401 --}} + + {{error.message}} {{t 'descriptions.unauthenticated-error'}} + {{t 'actions.help'}} + {{/if}} {{#if error.isForbidden}} {{!-- error.status === 403 --}} + + {{error.message}} {{t 'descriptions.forbidden-error'}} + {{t 'actions.help'}} + {{/if}} {{#if error.isNotFound}} {{!-- error.status === 404 --}} + + {{error.message}} {{t 'descriptions.notfound-error'}} + {{t 'actions.help'}} + {{/if}} {{#if error.isServer}} {{!-- error.status === 500 --}} + + {{error.message}} {{t 'descriptions.server-error'}} + {{t 'actions.help'}} + {{/if}} {{#if error.isUnknown}} - {{!-- error.status === 🤷 --}} + {{!-- error.status === 🤷 everything else --}} + + {{error.message}} {{t 'descriptions.unknown-error'}} + {{t 'actions.help'}} + {{/if}} {{/each}} diff --git a/ui/core/app/templates/orgs/org/projects/index.hbs b/ui/core/app/templates/orgs/org/projects/index.hbs index e95b565bd..b6cac496b 100644 --- a/ui/core/app/templates/orgs/org/projects/index.hbs +++ b/ui/core/app/templates/orgs/org/projects/index.hbs @@ -9,7 +9,9 @@ - {{t 'titles.new'}} + {{#if @model}} + {{t 'titles.new'}} + {{/if}} @@ -31,9 +33,9 @@ {{else}} - + - {{t 'descriptions.empty-set'}} + {{t 'descriptions.projects-welcome'}} diff --git a/ui/core/app/templates/orgs/org/projects/project/host-catalogs/index.hbs b/ui/core/app/templates/orgs/org/projects/project/host-catalogs/index.hbs index cf53d7117..6e712fb11 100644 --- a/ui/core/app/templates/orgs/org/projects/project/host-catalogs/index.hbs +++ b/ui/core/app/templates/orgs/org/projects/project/host-catalogs/index.hbs @@ -10,9 +10,11 @@ - - {{t 'titles.new'}} - + {{#if @model}} + + {{t 'titles.new'}} + + {{/if}} @@ -48,9 +50,9 @@ {{else}} - + - {{t 'descriptions.empty-set'}} + {{t 'descriptions.host-catalogs-welcome'}} @@ -58,7 +60,7 @@ - + {{/if}} diff --git a/ui/core/mirage/config.js b/ui/core/mirage/config.js index c98942919..2f3584887 100644 --- a/ui/core/mirage/config.js +++ b/ui/core/mirage/config.js @@ -1,5 +1,5 @@ import config from '../config/environment'; -//import { Response } from 'miragejs'; +// import { Response } from 'miragejs'; export default function() { @@ -30,6 +30,14 @@ export default function() { this.del('/orgs/:org_id/projects/:project_id/host-catalogs/:id'); // Uncomment the following line and the Response import above - // Then change the response code to simulate error responses - //this.get('/orgs/:org_id/projects', () => new Response(401)); + // Then change the response code to simulate error responses. + // this.get('/orgs/:org_id/projects', () => new Response(505)); + + // Update error payload to simulate specific error responses. + // this.get('/orgs/:org_id/projects', () => new Response(505, {}, { + // errors: [{ + // status: 505, + // message: 'HTTP version not supported.', + // }] + // })); } diff --git a/ui/core/translations/en-us.yaml b/ui/core/translations/en-us.yaml index fa0873322..817fc90c9 100644 --- a/ui/core/translations/en-us.yaml +++ b/ui/core/translations/en-us.yaml @@ -3,6 +3,7 @@ actions: delete: Delete dismiss: Dismiss save: Save + help: Need help? resources: projects: Projects project: Project @@ -13,9 +14,23 @@ titles: overview: Overview settings: Settings empty-set: No Items Yet + projects-welcome: Welcome to Projects + host-catalogs-welcome: Welcome to Host Catalogs + unauthenticated-error: You are not authorized + forbidden-error: You are not authorized + notfound-error: Resource not found + server-error: Server error + unknown-error: Something went wrong descriptions: host-catalogs: Overview of collections of hosts and host sets. empty-set: There are no items to display yet. You may be able to add items or try back later. + projects-welcome: Projects allow you to create and manage host catalogs. To start, create a project. + host-catalogs-welcome: Host catalogs allow you to configure to collect and create hosts and host sets. To start, create a host catalog. + unauthenticated-error: You are not authorized to view this data. Ask your administrator if you think you should have access. + forbidden-error: You must be granted permissions to view this data. Ask your administrator if you think you should have access. + notfound-error: We could not find the requested resource. You can ask your administrator or try again later. + server-error: We ran into a problem and could not continue. You can ask your administrator or try again later. + unknown-error: Please contact your administrator or try again later. states: info: Info success: Success From 83ea5ab72d2f891f682b56ff033418cd811d13b2 Mon Sep 17 00:00:00 2001 From: Susmitha Girumala Date: Thu, 18 Jun 2020 14:22:44 -0400 Subject: [PATCH 5/7] =?UTF-8?q?chore:=20=F0=9F=A4=96=20Add=20centered=20la?= =?UTF-8?q?yout=20to=20ui/core=20error=20template?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/core/app/templates/orgs/org/error.hbs | 67 ++++++++++++------------ 1 file changed, 34 insertions(+), 33 deletions(-) diff --git a/ui/core/app/templates/orgs/org/error.hbs b/ui/core/app/templates/orgs/org/error.hbs index d3241d609..ac2abe9e9 100644 --- a/ui/core/app/templates/orgs/org/error.hbs +++ b/ui/core/app/templates/orgs/org/error.hbs @@ -13,45 +13,46 @@ * we don't distinguish it yet --}} -{{#each @model.errors as |error|}} - {{#if error.isUnauthenticated}} + + {{#each @model.errors as |error|}} {{!-- error.status === 401 --}} - - {{error.message}} {{t 'descriptions.unauthenticated-error'}} - {{t 'actions.help'}} - - {{/if}} + {{#if error.isUnauthenticated}} + + {{error.message}} {{t 'descriptions.unauthenticated-error'}} + {{t 'actions.help'}} + + {{/if}} - {{#if error.isForbidden}} {{!-- error.status === 403 --}} - - {{error.message}} {{t 'descriptions.forbidden-error'}} - {{t 'actions.help'}} - - {{/if}} + {{#if error.isForbidden}} + + {{error.message}} {{t 'descriptions.forbidden-error'}} + {{t 'actions.help'}} + + {{/if}} - {{#if error.isNotFound}} {{!-- error.status === 404 --}} - - {{error.message}} {{t 'descriptions.notfound-error'}} - {{t 'actions.help'}} - - {{/if}} + {{#if error.isNotFound}} + + {{error.message}} {{t 'descriptions.notfound-error'}} + {{t 'actions.help'}} + + {{/if}} - {{#if error.isServer}} {{!-- error.status === 500 --}} - - {{error.message}} {{t 'descriptions.server-error'}} - {{t 'actions.help'}} - - {{/if}} + {{#if error.isServer}} + + {{error.message}} {{t 'descriptions.server-error'}} + {{t 'actions.help'}} + + {{/if}} - {{#if error.isUnknown}} {{!-- error.status === 🤷 everything else --}} - - {{error.message}} {{t 'descriptions.unknown-error'}} - {{t 'actions.help'}} - - {{/if}} - -{{/each}} + {{#if error.isUnknown}} + + {{error.message}} {{t 'descriptions.unknown-error'}} + {{t 'actions.help'}} + + {{/if}} + {{/each}} + From 06b1c0fc80190e0729b44ee4c5690f62f550fab2 Mon Sep 17 00:00:00 2001 From: Susmitha Girumala Date: Thu, 18 Jun 2020 16:39:11 -0400 Subject: [PATCH 6/7] =?UTF-8?q?refactor:=20=F0=9F=92=A1=20Update=20401=20e?= =?UTF-8?q?rror=20message=20in=20ui/core?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/core/app/templates/orgs/org/error.hbs | 20 ++++++++++---------- ui/core/translations/en-us.yaml | 18 +++++++++++++----- 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/ui/core/app/templates/orgs/org/error.hbs b/ui/core/app/templates/orgs/org/error.hbs index ac2abe9e9..b903c31ad 100644 --- a/ui/core/app/templates/orgs/org/error.hbs +++ b/ui/core/app/templates/orgs/org/error.hbs @@ -17,40 +17,40 @@ {{#each @model.errors as |error|}} {{!-- error.status === 401 --}} {{#if error.isUnauthenticated}} - - {{error.message}} {{t 'descriptions.unauthenticated-error'}} + + {{t 'errors.descriptions.unauthenticated-error'}} {{t 'actions.help'}} {{/if}} {{!-- error.status === 403 --}} {{#if error.isForbidden}} - - {{error.message}} {{t 'descriptions.forbidden-error'}} + + {{t 'errors.descriptions.forbidden-error'}} {{t 'actions.help'}} {{/if}} {{!-- error.status === 404 --}} {{#if error.isNotFound}} - - {{error.message}} {{t 'descriptions.notfound-error'}} + + {{t 'errors.descriptions.notfound-error'}} {{t 'actions.help'}} {{/if}} {{!-- error.status === 500 --}} {{#if error.isServer}} - - {{error.message}} {{t 'descriptions.server-error'}} + + {{t 'errors.descriptions.server-error'}} {{t 'actions.help'}} {{/if}} {{!-- error.status === 🤷 everything else --}} {{#if error.isUnknown}} - - {{error.message}} {{t 'descriptions.unknown-error'}} + + {{t 'errors.descriptions.unknown-error'}} {{t 'actions.help'}} {{/if}} diff --git a/ui/core/translations/en-us.yaml b/ui/core/translations/en-us.yaml index 817fc90c9..43c4e0b41 100644 --- a/ui/core/translations/en-us.yaml +++ b/ui/core/translations/en-us.yaml @@ -16,11 +16,6 @@ titles: empty-set: No Items Yet projects-welcome: Welcome to Projects host-catalogs-welcome: Welcome to Host Catalogs - unauthenticated-error: You are not authorized - forbidden-error: You are not authorized - notfound-error: Resource not found - server-error: Server error - unknown-error: Something went wrong descriptions: host-catalogs: Overview of collections of hosts and host sets. empty-set: There are no items to display yet. You may be able to add items or try back later. @@ -41,6 +36,19 @@ form: name: Name description: Description type: Type +errors: + titles: + unauthenticated-error: You are not signed in + forbidden-error: You are not authorized + notfound-error: Resource not found + server-error: Server error + unknown-error: Something went wrong + descriptions: + unauthenticated-error: You are not authenticated. Please authenticate and try again later. + forbidden-error: You must be granted permissions to view this data. Ask your administrator if you think you should have access. + notfound-error: We could not find the requested resource. You can ask your administrator or try again later. + server-error: We ran into a problem and could not continue. You can ask your administrator or try again later. + unknown-error: Please contact your administrator or try again later. dev: default-org: Default Org menu-item: Menu item From 38e759bacdfb2ea11a4c50262fa35716fb458fd3 Mon Sep 17 00:00:00 2001 From: Susmitha Girumala Date: Thu, 18 Jun 2020 17:09:37 -0400 Subject: [PATCH 7/7] =?UTF-8?q?chore:=20=F0=9F=A4=96=20Remove=20unused=20e?= =?UTF-8?q?rror=20translations=20in=20ui/core?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/core/translations/en-us.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ui/core/translations/en-us.yaml b/ui/core/translations/en-us.yaml index 43c4e0b41..29ba0c47f 100644 --- a/ui/core/translations/en-us.yaml +++ b/ui/core/translations/en-us.yaml @@ -21,11 +21,6 @@ descriptions: empty-set: There are no items to display yet. You may be able to add items or try back later. projects-welcome: Projects allow you to create and manage host catalogs. To start, create a project. host-catalogs-welcome: Host catalogs allow you to configure to collect and create hosts and host sets. To start, create a host catalog. - unauthenticated-error: You are not authorized to view this data. Ask your administrator if you think you should have access. - forbidden-error: You must be granted permissions to view this data. Ask your administrator if you think you should have access. - notfound-error: We could not find the requested resource. You can ask your administrator or try again later. - server-error: We ran into a problem and could not continue. You can ask your administrator or try again later. - unknown-error: Please contact your administrator or try again later. states: info: Info success: Success