Skip to content
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

New platform move error services #34556

Closed
5 changes: 2 additions & 3 deletions src/legacy/ui/public/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@
@import './accessibility/index';
@import './chrome/index';
@import './collapsible_sidebar/index';
@import './courier/index';
@import './directives/index';
@import './error_allow_explicit_index/index';
@import './error_auto_create_index/index';
@import './error_url_overflow/index';
@import './saved_objects/error_auto_create_index/index';
@import './exit_full_screen/index';
@import './field_editor/index';
@import './inspector/index';
Expand Down
1 change: 1 addition & 0 deletions src/legacy/ui/public/chrome/_index.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@import './variables';

@import './directives/index';
@import './services/error_url_overflow/index';
1 change: 0 additions & 1 deletion src/legacy/ui/public/chrome/api/angular.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
*/

import { uiModules } from '../../modules';

import { directivesProvider } from '../directives';
import { registerSubUrlHooks } from './sub_url_hooks';
import { configureAppAngularModule } from 'ui/legacy_compat';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
*/

import { i18n } from '@kbn/i18n';
import uiRoutes from '../routes';
import { KbnUrlProvider } from '../url';
import uiRoutes from '../../../routes';
import { KbnUrlProvider } from '../../../url';

import template from './error_url_overflow.html';
import { UrlOverflowServiceProvider } from './url_overflow_service';
Expand Down
1 change: 1 addition & 0 deletions src/legacy/ui/public/courier/_index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import './error_allow_explicit_index/index';
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
import { i18n } from '@kbn/i18n';
import { get } from 'lodash';

import uiRoutes from '../routes';
import { KbnUrlProvider } from '../url';
import uiRoutes from '../../routes';
import { KbnUrlProvider } from '../../url';

import template from './error_allow_explicit_index.html';

Expand Down
2 changes: 1 addition & 1 deletion src/legacy/ui/public/courier/fetch/call_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import { ErrorAllowExplicitIndexProvider } from '../../error_allow_explicit_index';
import { ErrorAllowExplicitIndexProvider } from '../error_allow_explicit_index';
import { assignSearchRequestsToSearchStrategies } from '../search_strategy';
import { IsRequestProvider } from './is_request';
import { RequestStatus } from './req_status';
Expand Down
3 changes: 1 addition & 2 deletions src/legacy/ui/public/kfetch/kfetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@
*/

import { merge } from 'lodash';
// @ts-ignore not really worth typing
import { metadata } from 'ui/metadata';
import url from 'url';
import chrome from '../chrome';
import { metadata } from '../metadata';
import { KFetchError } from './kfetch_error';

export interface KFetchQuery {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@
* under the License.
*/

jest.mock('../chrome', () => ({
jest.mock('../../chrome', () => ({
addBasePath: path => `myBase/${path}`,
}));
jest.mock('../metadata', () => ({
jest.mock('../../metadata', () => ({
metadata: {
version: 'my-version',
},
}));

import fetchMock from 'fetch-mock/es5/client';
import { kfetch } from 'ui/kfetch';
import { kfetch } from '../../kfetch';
import { isAutoCreateIndexError } from './error_auto_create_index';

describe('isAutoCreateIndexError correctly handles KFetchError thrown by kfetch', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import { i18n } from '@kbn/i18n';
import { get } from 'lodash';

import uiRoutes from '../routes';
import uiRoutes from '../../routes';

import template from './error_auto_create_index.html';

Expand Down
2 changes: 1 addition & 1 deletion src/legacy/ui/public/saved_objects/saved_objects_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ import {
SavedObjectsClient as SavedObjectsApi,
} from '../../../server/saved_objects';
import { CreateResponse, FindOptions, UpdateResponse } from '../../../server/saved_objects/service';
import { isAutoCreateIndexError, showAutoCreateIndexErrorPage } from '../error_auto_create_index';
import { kfetch, KFetchQuery } from '../kfetch';
import { keysToCamelCaseShallow, keysToSnakeCaseShallow } from '../utils/case_conversion';
import { isAutoCreateIndexError, showAutoCreateIndexErrorPage } from './error_auto_create_index';
import { SimpleSavedObject } from './simple_saved_object';

interface RequestParams {
Expand Down