Skip to content

Commit

Permalink
Move doc, doc_viewer, context to discover folder (#47436)
Browse files Browse the repository at this point in the history
* Move doc folder to discover folder

* Move doc_viewer folder to discover folder

* Move context folder to discover folder

* Move context scss import to discover folder

* Introduce angular folder, start migration
  • Loading branch information
kertal authored Oct 16, 2019
1 parent df53c80 commit 53e1c95
Show file tree
Hide file tree
Showing 79 changed files with 28 additions and 25 deletions.

This file was deleted.

8 changes: 7 additions & 1 deletion src/legacy/core_plugins/kibana/public/discover/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,17 @@

@import 'components/fetch_error/index';
@import 'components/field_chooser/index';
@import 'directives/index';
@import 'angular/directives/index';
@import 'doc_table/index';

@import 'hacks';

@import 'discover';

@import 'embeddable/index';

// Doc Viewer
@import 'doc_viewer/index';

// Context styles
@import 'context/index';
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import 'ngreact';
import { wrapInI18nContext } from 'ui/i18n';
import { uiModules } from 'ui/modules';
import '../../../../../ui/public/render_complete/directive';
import '../../../../../../ui/public/render_complete/directive';

import { DiscoverNoResults } from './no_results';
import { DiscoverUninitialized } from './uninitialized';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ employed in some cases, e.g. when dealing with the isolate scope bindings in
**Loose Coupling**: An attempt was made to couple the parts that make up this
app as loosely as possible. This means using pure functions whenever possible
and isolating the angular directives diligently. To that end, the app has been
implemented as the independent `ContextApp` directive in [app.js](./app.js). It
implemented as the independent `ContextApp` directive in [app.js](app.js). It
does not access the Kibana `AppState` directly but communicates only via its
directive properties. The binding of these attributes to the state and thereby
to the route is performed by the `CreateAppRouteController`in
[index.js](./index.js). Similarly, the `SizePicker` directive only communicates
[index.js](index.js). Similarly, the `SizePicker` directive only communicates
with its parent via the passed properties.


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

// @ts-ignore
import { SearchSourceProvider, SearchSource } from 'ui/courier';
import { SearchSourceProvider } from 'ui/courier';
import { IPrivate } from 'ui/private';
import { Filter } from '@kbn/es-query';
import { IndexPatterns, IndexPattern } from 'ui/index_patterns';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import {
import { timefilter } from 'ui/timefilter';

// load directives
import '../../../data/public/legacy';
import '../../../../data/public/legacy';

const module = uiModules.get('apps/context', [
'elasticsearch',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import 'action_bar';
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { i18n } from '@kbn/i18n';

import './app';
import contextAppRouteTemplate from './index.html';
import { getRootBreadcrumbs } from '../discover/breadcrumbs';
import { getRootBreadcrumbs } from '../breadcrumbs';
import { npStart } from 'ui/new_platform';
import { subscribeWithScope } from 'ui/utils/subscribe_with_scope';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { fetchAnchorProvider } from '../api/anchor';
import { fetchContextProvider } from '../api/context';
import { QueryParameterActionsProvider } from '../query_parameters';
import { FAILURE_REASONS, LOADING_STATUS } from './constants';
import { MarkdownSimple } from '../../../../kibana_react/public';
import { MarkdownSimple } from '../../../../../kibana_react/public';

export function QueryActionsProvider(Private, Promise) {
const fetchAnchor = Private(fetchAnchorProvider);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { EuiCallOut, EuiLink, EuiLoadingSpinner, EuiPageContent } from '@elastic
import { IndexPatterns } from 'ui/index_patterns';
import { metadata } from 'ui/metadata';
import { ElasticSearchHit } from 'ui/registry/doc_views_types';
import { DocViewer } from '../doc_viewer/doc_viewer';
import { DocViewer } from '../doc_viewer';
import { ElasticRequestState, useEsDocSearch } from './use_es_doc_search';

export interface ElasticSearchResult {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import { useEffect, useState } from 'react';
import { ElasticSearchHit } from 'ui/registry/doc_views_types';
import { DocProps } from './doc';
import { IndexPattern } from '../../../data/public/index_patterns';
import { IndexPattern } from '../../../../data/public/index_patterns';

export enum ElasticRequestState {
Loading,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import _ from 'lodash';
import $ from 'jquery';
import rison from 'rison-node';
import 'plugins/kibana/doc_viewer';
import '../../doc_viewer';
import { noWhiteSpace } from '../../../../common/utils/no_white_space';
import openRowHtml from './table_row/open.html';
import detailsHtml from './table_row/details.html';
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import 'doc_viewer';
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import React from 'react';
import { EuiCallOut, EuiCodeBlock } from '@elastic/eui';
// @ts-ignore
import { formatMsg, formatStack } from '../../../../ui/public/notify/lib';
import { formatMsg, formatStack } from 'ui/notify/lib/index';

interface Props {
error: Error | string | null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@
*/

import './doc_viewer_directive';

export * from './doc_viewer';
7 changes: 5 additions & 2 deletions src/legacy/core_plugins/kibana/public/discover/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,15 @@

import './saved_searches/saved_searches';
import { i18n } from '@kbn/i18n';
import './directives';

import './angular/directives';
import 'ui/collapsible_sidebar';
import './components/field_chooser/field_chooser';
import './controllers/discover';
import './angular/discover';
import './doc_table/components/table_row';
import { FeatureCatalogueRegistryProvider, FeatureCatalogueCategory } from 'ui/registry/feature_catalogue';
import './doc';
import './context';

FeatureCatalogueRegistryProvider.register(() => {
return {
Expand Down

This file was deleted.

6 changes: 0 additions & 6 deletions src/legacy/core_plugins/kibana/public/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
// Public UI styles
@import 'src/legacy/ui/public/index';

// Context styles
@import './context/index';

// Dev tools styles
@import './dev_tools/index';

Expand All @@ -30,9 +27,6 @@
// Management styles
@import './management/index';

// Doc Viewer
@import './doc_viewer/index';

// Dashboard styles
// MUST STAY AT THE BOTTOM BECAUSE OF DARK THEME IMPORTS
@import './dashboard/index';
2 changes: 0 additions & 2 deletions src/legacy/core_plugins/kibana/public/kibana.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@ import './discover';
import './visualize';
import './dashboard';
import './management';
import './doc';
import './dev_tools';
import './context';
import 'ui/vislib';
import 'ui/agg_response';
import 'ui/agg_types';
Expand Down
2 changes: 1 addition & 1 deletion src/legacy/ui/public/registry/doc_views_helpers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
AngularController,
AngularDirective,
} from './doc_views_types';
import { DocViewerError } from '../../../core_plugins/kibana/public/doc_viewer/doc_viewer_render_error';
import { DocViewerError } from '../../../core_plugins/kibana/public/discover/doc_viewer/doc_viewer_render_error';

/**
* Compiles and injects the give angular template into the given dom node
Expand Down

0 comments on commit 53e1c95

Please sign in to comment.