Skip to content

Commit

Permalink
Refactor dependencies.ts to kibana_services.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
kertal committed Oct 21, 2019
1 parent b5aa43c commit 4424545
Show file tree
Hide file tree
Showing 23 changed files with 39 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
i18n,
subscribeWithScope,
npStart,
} from './dependencies';
} from './../kibana_services';

import './context_app';
import contextAppRouteTemplate from './context.html';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import _ from 'lodash';
import { callAfterBindingsWorkaround, uiModules, timefilter } from './dependencies';
import { callAfterBindingsWorkaround, uiModules, timefilter } from './../kibana_services';
import contextAppTemplate from './context_app.html';
import '../context/components/action_bar';
import { getFirstSortableField } from '../context/api/utils/sorting';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ import {
uiRoutes,
vislibSeriesResponseHandlerProvider,
VisProvider,
} from './dependencies';
} from './../kibana_services';

import { getRootBreadcrumbs, getSavedSearchBreadcrumbs } from '../breadcrumbs';
import { extractTimeFilter, changeTimeFilter } from '../../../../data/public';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@
* specific language governing permissions and limitations
* under the License.
*/
import { uiRoutes, uiModules, wrapInI18nContext, timefilter, IndexPatterns } from './dependencies';
import {
uiRoutes,
uiModules,
wrapInI18nContext,
timefilter,
IndexPatterns,
} from './../kibana_services';
// @ts-ignore
import { getRootBreadcrumbs } from '../breadcrumbs';
import html from './doc.html';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@
* specific language governing permissions and limitations
* under the License.
*/

import { uiModules } from 'ui/modules';
import { wrapInI18nContext, uiModules } from '../../../../kibana_services';
import { ToolBarPagerText } from './tool_bar_pager_text';
import { ToolBarPagerButtons } from './tool_bar_pager_buttons';
import { wrapInI18nContext } from 'ui/i18n';

const app = uiModules.get('kibana');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/
import { wrapInI18nContext } from 'ui/i18n';
import { uiModules } from '../../dependencies';
import { uiModules } from '../../../kibana_services';
import { TableHeader } from './table_header/table_header';
const module = uiModules.get('app/discover');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { IndexPattern } from '../../../dependencies';
import { IndexPattern } from '../../../../kibana_services';
// @ts-ignore
import { shortenDottedString } from '../../../../../../common/utils/shorten_dotted_string';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/
import React from 'react';
import { IndexPattern } from '../../../dependencies';
import { IndexPattern } from '../../../../kibana_services';
// @ts-ignore
import { TableHeaderColumn } from './table_header_column';
import { SortOrder, getDisplayedColumns } from './helpers';
Expand Down Expand Up @@ -47,7 +47,7 @@ export function TableHeader({

return (
<tr data-test-subj="docTableHeader" className="kbnDocTableHeader">
<th style={{ width: '24px' }}></th>
<th style={{ width: '24px' }} />
{displayedColumns.map(col => {
return (
<TableHeaderColumn
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { noWhiteSpace } from '../../../../../common/utils/no_white_space';

import openRowHtml from './table_row/open.html';
import detailsHtml from './table_row/details.html';
import { uiModules } from '../../dependencies';
import { uiModules } from '../../../kibana_services';
import { disableFilter } from '@kbn/es-query';
import { dispatchRenderComplete } from '../../../../../../../../plugins/kibana_utils/public';
import cellTemplateHtml from '../components/table_row/cell.html';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import './infinite_scroll';
import './components/table_header';
import './components/table_row';
import { dispatchRenderComplete } from '../../../../../../../plugins/kibana_utils/public';
import { uiModules } from '../dependencies';
import { uiModules } from '../../kibana_services';
import './components/pager';
import './lib/pager';

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

import { i18n } from '../dependencies';
import { i18n } from '../../kibana_services';

/**
* A message letting the user know the results that have been retrieved is limited
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import $ from 'jquery';
import { uiModules } from '../dependencies';
import { uiModules } from '../../kibana_services';
const module = uiModules.get('app/discover');

module.directive('kbnInfiniteScroll', function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import { StaticIndexPattern } from '../../dependencies';
import { StaticIndexPattern } from '../../../kibana_services';
import { SortOrder } from '../components/table_header/helpers';

export function getSort(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { IndexPattern } from '../../dependencies';
import { IndexPattern } from '../../../kibana_services';
import { SortOrder } from '../components/table_header/helpers';
import { getSort } from './get_sort';

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

import { uiModules } from 'ui/modules';
import { uiModules } from '../../../../kibana_services';
import { Pager } from './pager';

const app = uiModules.get('kibana');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

// @ts-ignore
import { uiModules } from './dependencies';
import { uiModules } from './../kibana_services';
import { DocViewer } from '../doc_viewer/doc_viewer';

uiModules.get('apps/discover').directive('docViewer', (reactDirective: any) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
* specific language governing permissions and limitations
* under the License.
*/
import './dependencies';
import './../kibana_services';
import './discover';
import './doc';
import './context';
import './doc_viewer';
import './directives';
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,13 @@

import $ from 'jquery';
import { i18n } from '@kbn/i18n';
import { uiModules, capabilities } from '../../kibana_services';
import html from './discover_field.html';
import _ from 'lodash';
import 'ui/directives/css_truncate';
import 'ui/directives/field_name';
import './string_progress_bar';
import detailsHtml from './lib/detail_views/string.html';
import { capabilities } from 'ui/capabilities';
import { uiModules } from 'ui/modules';
const app = uiModules.get('apps/discover');

app.directive('discoverField', function ($compile) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
* under the License.
*/
// @ts-ignore
import { uiModules } from 'ui/modules';
import { wrapInI18nContext } from 'ui/i18n';
import { wrapInI18nContext, uiModules } from '../../kibana_services';
import { DiscoverFieldSearch } from './discover_field_search';

const app = uiModules.get('apps/discover');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
* under the License.
*/
// @ts-ignore
import { uiModules } from 'ui/modules';
import { wrapInI18nContext } from 'ui/i18n';
import { wrapInI18nContext, uiModules } from '../../kibana_services';
import { DiscoverIndexPattern } from './discover_index_pattern';

const app = uiModules.get('apps/discover');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ import _ from 'lodash';
import $ from 'jquery';
import rison from 'rison-node';
import { fieldCalculator } from './lib/field_calculator';
import { FieldList } from 'ui/index_patterns';
import { uiModules } from 'ui/modules';
import {
uiModules,
FieldList,
} from '../../kibana_services';
import fieldChooserTemplate from './field_chooser.html';
const app = uiModules.get('apps/discover');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/


import { wrapInI18nContext } from 'ui/i18n';
import { uiModules } from 'ui/modules';

import React from 'react';

import { wrapInI18nContext, uiModules } from '../../kibana_services';
import {
EuiFlexGroup,
EuiFlexItem,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,19 @@ import 'ui/state_management/app_state';
import 'ui/capabilities/route_setup';

import uiRoutes from 'ui/routes';
export { uiRoutes };

import angular from 'angular';
export { angular };

import { npStart } from 'ui/new_platform';
const { chrome } = npStart.core;

export { uiRoutes };
export { chrome };
export { npStart } from 'ui/new_platform';
export { angular };

// @ts-ignore
export { uiModules } from 'ui/modules';
export { IndexPattern, IndexPatterns, StaticIndexPattern } from 'ui/index_patterns';
export { IndexPattern, IndexPatterns, StaticIndexPattern, FieldList } from 'ui/index_patterns';
export { wrapInI18nContext } from 'ui/i18n';
export { timefilter } from 'ui/timefilter';
export { FilterBarQueryFilterProvider } from 'ui/filter_manager/query_filter';
Expand Down Expand Up @@ -75,7 +75,6 @@ export {
export { tabifyAggResponse } from 'ui/agg_response/tabify';
export { showSaveModal } from 'ui/saved_objects/show_saved_object_save_modal';
export { SavedObjectSaveModal } from 'ui/saved_objects/components/saved_object_save_modal';
export { getRootBreadcrumbs, getSavedSearchBreadcrumbs } from '../breadcrumbs';
export { getRootBreadcrumbs, getSavedSearchBreadcrumbs } from './breadcrumbs';
export { buildVislibDimensions } from 'ui/visualize/loader/pipeline_helpers/build_pipeline';

import './directives';
export { capabilities } from 'ui/capabilities';

0 comments on commit 4424545

Please sign in to comment.