Ghost/ghost/admin/app/components
Kevin Ansfield b4cdc85a59 "400 Version Mismatch" error handling
refs https://github.com/TryGhost/Ghost/issues/6949

Handle version mismatch errors by:
- displaying an alert asking the user to copy any data and refresh
- disabling navigation so that unsaved data is not accidentally lost

Detailed changes:
- add `error` action to application route for global route-based error handling
- remove 404-handler mixin, move logic into app route error handler
- update `.catch` in validation-engine so that promises are rejected with the
  original error objects
- add `VersionMismatchError` and `isVersionMismatchError` to ajax service
- add `upgrade-status` service
  - has a method to trigger the alert and toggle the "upgrade required" mode
  - is injected into all routes by default so that it can be checked before
    transitioning
- add `Route` override
  - updates the `willTransition` hook to check the `upgrade-status` service
    and abort the transition if we're in "upgrade required" mode
- update notifications `showAPIError` method to handle version mismatch errors
- update any areas where we were catching ajax errors manually so that the
  version mismatch error handling is obeyed
- fix redirect tests in editor acceptance test
- fix mirage's handling of 404s for unknown posts in get post requests
- adjust alert z-index to to appear above modal backgrounds
2016-07-08 14:56:26 +01:00
..
gh-search-input convert ember imports to ember-cli-shim imports where possible (#95) 2016-06-30 11:21:47 +01:00
modals "400 Version Mismatch" error handling 2016-07-08 14:56:26 +01:00
gh-activating-list-item.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00
gh-alert.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00
gh-alerts.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00
gh-app.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00
gh-blog-url.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00
gh-cm-editor.js lazy-load codemirror on code injection screen (#99) 2016-07-05 17:30:14 +01:00
gh-content-cover.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00
gh-content-preview-content.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00
gh-content-view-container.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00
gh-datetime-input.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00
gh-dropdown-button.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00
gh-dropdown.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00
gh-ed-editor.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00
gh-ed-preview.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00
gh-editor-save-button.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00
gh-editor.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00
gh-error-message.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00
gh-feature-flag.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00
gh-file-input.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00
gh-file-upload.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00
gh-file-uploader.js "400 Version Mismatch" error handling 2016-07-08 14:56:26 +01:00
gh-form-group.js Update package.json details, rename module to ghost-admin 2016-06-03 16:12:54 +01:00
gh-fullscreen-modal.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00
gh-image-uploader-with-preview.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00
gh-image-uploader.js "400 Version Mismatch" error handling 2016-07-08 14:56:26 +01:00
gh-infinite-scroll.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00
gh-input.js convert inputs to one-way inputs 2016-06-18 07:44:23 -04:00
gh-light-table.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00
gh-main.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00
gh-menu-toggle.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00
gh-nav-menu.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00
gh-navigation.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00
gh-navitem-url-input.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00
gh-navitem.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00
gh-notification.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00
gh-notifications.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00
gh-popover-button.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00
gh-popover.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00
gh-posts-list-item.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00
gh-profile-image.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00
gh-search-input.js "400 Version Mismatch" error handling 2016-07-08 14:56:26 +01:00
gh-select-native.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00
gh-selectize.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00
gh-skip-link.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00
gh-spin-button.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00
gh-subscribers-table.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00
gh-tab-pane.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00
gh-tab.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00
gh-tabs-manager.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00
gh-tag-settings-form.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00
gh-tag.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00
gh-tags-management-container.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00
gh-textarea.js convert inputs to one-way inputs 2016-06-18 07:44:23 -04:00
gh-trim-focus-input.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00
gh-url-preview.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00
gh-user-active.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00
gh-user-invited.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00
gh-validation-status-container.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00
gh-view-title.js convert remainder of components to use ember-cli-shims (#101) 2016-06-30 19:14:25 +01:00