Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
sulemanof committed Apr 23, 2020
1 parent 7057063 commit f6b21ad
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 21 deletions.
4 changes: 2 additions & 2 deletions src/plugins/input_control_vis/kibana.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"id": "input_control_vis",
"id": "inputControlVis",
"version": "8.0.0",
"kibanaVersion": "kibana",
"server": false,
"server": true,
"ui": true,
"requiredPlugins": ["data", "expressions", "visualizations"]
}
2 changes: 1 addition & 1 deletion src/plugins/input_control_vis/public/control/control.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import _ from 'lodash';
import { i18n } from '@kbn/i18n';

import { Filter } from '../../../../../plugins/data/public';
import { Filter } from 'src/plugins/data/public';
import { ControlParams, ControlParamsOptions, CONTROL_TYPES } from '../editor_utils';
import { RangeFilterManager } from './filter_manager/range_filter_manager';
import { PhraseFilterManager } from './filter_manager/phrase_filter_manager';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {
IndexPattern,
TimefilterContract,
DataPublicPluginStart,
} from '../../../../../plugins/data/public';
} from 'src/plugins/data/public';

export function createSearchSource(
{ create }: DataPublicPluginStart['search']['searchSource'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@

import _ from 'lodash';
import { i18n } from '@kbn/i18n';
import { Control, noValuesDisableMsg, noIndexPatternMsg } from './control';
import { PhraseFilterManager } from './filter_manager/phrase_filter_manager';
import { createSearchSource } from './create_search_source';
import { ControlParams } from '../editor_utils';
import { InputControlVisDependencies } from '../plugin';
import {
IFieldType,
TimefilterContract,
SearchSourceFields,
DataPublicPluginStart,
} from '../../../../../plugins/data/public';
} from 'src/plugins/data/public';
import { Control, noValuesDisableMsg, noIndexPatternMsg } from './control';
import { PhraseFilterManager } from './filter_manager/phrase_filter_manager';
import { createSearchSource } from './create_search_source';
import { ControlParams } from '../editor_utils';
import { InputControlVisDependencies } from '../plugin';

function getEscapedQuery(query = '') {
// https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-regexp-query.html#_standard_operators
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,12 @@
import _ from 'lodash';
import { i18n } from '@kbn/i18n';

import { IFieldType, TimefilterContract, DataPublicPluginStart } from 'src/plugins/data/public';
import { Control, noValuesDisableMsg, noIndexPatternMsg } from './control';
import { RangeFilterManager } from './filter_manager/range_filter_manager';
import { createSearchSource } from './create_search_source';
import { ControlParams } from '../editor_utils';
import { InputControlVisDependencies } from '../plugin';
import {
IFieldType,
TimefilterContract,
DataPublicPluginStart,
} from '../.../../../../../../plugins/data/public';

const minMaxAgg = (field?: IFieldType) => {
const aggBody: any = {};
Expand Down
2 changes: 0 additions & 2 deletions src/plugins/input_control_vis/public/index.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@import 'src/legacy/ui/public/styles/styling_constants';

// Prefix all styles with "icv" to avoid conflicts.
// Examples
// icvChart
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
*/

import { createInputControlVisFn } from './input_control_fn';

// eslint-disable-next-line
import { functionWrapper } from '../../../../plugins/expressions/common/expression_functions/specs/tests/utils';
import { functionWrapper } from '../../expressions/common/expression_functions/specs/tests/utils';

describe('interpreter/functions#input_control_vis', () => {
const fn = functionWrapper(createInputControlVisFn());
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/input_control_vis/public/vis_controller.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { ControlParams } from './editor_utils';
import { RangeControl } from './control/range_control_factory';
import { ListControl } from './control/list_control_factory';
import { InputControlVisDependencies } from './plugin';
import { FilterManager, Filter, SearchSource } from '../../data/public';
import { FilterManager, Filter } from '../../data/public';
import { VisParams, Vis } from '../../visualizations/public';

export const createInputControlVisController = (deps: InputControlVisDependencies) => {
Expand Down
30 changes: 30 additions & 0 deletions src/plugins/input_control_vis/server/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

import { PluginConfigDescriptor } from 'kibana/server';
import { schema } from '@kbn/config-schema';

export const config: PluginConfigDescriptor = {
schema: schema.object({ enabled: schema.boolean({ defaultValue: true }) }),
};

export const plugin = () => ({
setup() {},
start() {},
});

0 comments on commit f6b21ad

Please sign in to comment.