Skip to content

Commit

Permalink
Merge branch 'master' into trigger-proces
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine authored Jul 21, 2020
2 parents d8e051c + 3f2913b commit 6bc94cd
Show file tree
Hide file tree
Showing 69 changed files with 514 additions and 402 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
*/

import { functions as commonFunctions } from '../common';
import { functions as externalFunctions } from '../external';
import { location } from './location';
import { markdown } from './markdown';
import { urlparam } from './urlparam';

export const functions = [location, markdown, urlparam, ...commonFunctions];
export const functions = [location, markdown, urlparam, ...commonFunctions, ...externalFunctions];
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ import { rounddate } from './rounddate';
import { rowCount } from './rowCount';
import { repeatImage } from './repeatImage';
import { revealImage } from './revealImage';
import { savedLens } from './saved_lens';
import { savedMap } from './saved_map';
import { savedSearch } from './saved_search';
import { savedVisualization } from './saved_visualization';
import { seriesStyle } from './seriesStyle';
import { shape } from './shape';
import { sort } from './sort';
Expand Down Expand Up @@ -110,10 +106,6 @@ export const functions = [
revealImage,
rounddate,
rowCount,
savedLens,
savedMap,
savedSearch,
savedVisualization,
seriesStyle,
shape,
sort,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

import { savedLens } from './saved_lens';
import { savedMap } from './saved_map';
import { savedSearch } from './saved_search';
import { savedVisualization } from './saved_visualization';

export const functions = [savedLens, savedMap, savedSearch, savedVisualization];
37 changes: 37 additions & 0 deletions x-pack/plugins/canvas/canvas_plugin_src/renderers/core.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

import { debug } from './debug';
import { error } from './error';
import { image } from './image';
import { markdown } from './markdown';
import { metric } from './metric';
import { pie } from './pie';
import { plot } from './plot';
import { progress } from './progress';
import { repeatImage } from './repeat_image';
import { revealImage } from './reveal_image';
import { shape } from './shape';
import { table } from './table';
import { text } from './text';

export const renderFunctions = [
debug,
error,
image,
markdown,
metric,
pie,
plot,
progress,
repeatImage,
revealImage,
shape,
table,
text,
];

export const renderFunctionFactories = [];
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import { embeddableRendererFactory } from './embeddable';

import { DomPreview as Component } from './dom_preview';

export const DomPreview = Component;
export const renderFunctions = [];
export const renderFunctionFactories = [embeddableRendererFactory];
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

import { toExpression } from './lens';
import { SavedLensInput } from '../../../functions/common/saved_lens';
import { SavedLensInput } from '../../../functions/external/saved_lens';
import { fromExpression, Ast } from '@kbn/interpreter/common';

const baseEmbeddableInput = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { SavedLensInput } from '../../../functions/common/saved_lens';
import { SavedLensInput } from '../../../functions/external/saved_lens';

export function toExpression(input: SavedLensInput): string {
const expressionParts = [] as string[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui';
import PropTypes from 'prop-types';
import React, { FunctionComponent } from 'react';
import { ComponentStrings } from '../../../../i18n';
import { ComponentStrings } from '../../../../../i18n';

const { AdvancedFilter: strings } = ComponentStrings;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

import React from 'react';
import ReactDOM from 'react-dom';
import { RendererFactory } from '../../../types';
import { RendererFactory } from '../../../../types';
import { AdvancedFilter } from './component';
import { RendererStrings } from '../../../i18n';
import { RendererStrings } from '../../../../i18n';

const { advancedFilter: strings } = RendererStrings;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import { EuiIcon } from '@elastic/eui';
import PropTypes from 'prop-types';
import React, { ChangeEvent, FocusEvent, FunctionComponent } from 'react';
import { ComponentStrings } from '../../../../i18n';
import { ComponentStrings } from '../../../../../i18n';

const { DropdownFilter: strings } = ComponentStrings;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import { fromExpression, toExpression, Ast } from '@kbn/interpreter/common';
import { get } from 'lodash';
import React from 'react';
import ReactDOM from 'react-dom';
import { syncFilterExpression } from '../../../public/lib/sync_filter_expression';
import { RendererFactory } from '../../../types';
import { syncFilterExpression } from '../../../../public/lib/sync_filter_expression';
import { RendererFactory } from '../../../../types';
import { DropdownFilter } from './component';
import { RendererStrings } from '../../../i18n';
import { RendererStrings } from '../../../../i18n';

const { dropdownFilter: strings } = RendererStrings;

Expand Down
12 changes: 12 additions & 0 deletions x-pack/plugins/canvas/canvas_plugin_src/renderers/filters/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

import { advancedFilter } from './advanced_filter';
import { dropdownFilter } from './dropdown_filter';
import { timeFilterFactory } from './time_filter';

export const renderFunctions = [advancedFilter, dropdownFilter];
export const renderFunctionFactories = [timeFilterFactory];
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
* you may not use this file except in compliance with the Elastic License.
*/

export { PagePreview } from './page_preview';
export { TimeFilter } from './time_filter';
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import { get } from 'lodash';
import { fromExpression } from '@kbn/interpreter/common';
import { UnitStrings } from '../../../../i18n/units';
import { UnitStrings } from '../../../../../i18n/units';

const { quickRanges: strings } = UnitStrings;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
import ReactDOM from 'react-dom';
import React from 'react';
import { toExpression } from '@kbn/interpreter/common';
import { UI_SETTINGS } from '../../../../../../src/plugins/data/public';
import { syncFilterExpression } from '../../../public/lib/sync_filter_expression';
import { RendererStrings } from '../../../i18n';
import { UI_SETTINGS } from '../../../../../../../src/plugins/data/public';
import { syncFilterExpression } from '../../../../public/lib/sync_filter_expression';
import { RendererStrings } from '../../../../i18n';
import { TimeFilter } from './components';
import { StartInitializer } from '../../plugin';
import { RendererHandlers } from '../../../types';
import { Arguments } from '../../functions/common/timefilterControl';
import { RendererFactory } from '../../../types';
import { StartInitializer } from '../../../plugin';
import { RendererHandlers } from '../../../../types';
import { Arguments } from '../../../functions/common/timefilterControl';
import { RendererFactory } from '../../../../types';

const { timeFilter: strings } = RendererStrings;

Expand Down
51 changes: 16 additions & 35 deletions x-pack/plugins/canvas/canvas_plugin_src/renderers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,21 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { advancedFilter } from './advanced_filter';
import { debug } from './debug';
import { dropdownFilter } from './dropdown_filter';
import { embeddableRendererFactory } from './embeddable/embeddable';
import { error } from './error';
import { image } from './image';
import { markdown } from './markdown';
import { metric } from './metric';
import { pie } from './pie';
import { plot } from './plot';
import { progress } from './progress';
import { repeatImage } from './repeat_image';
import { revealImage } from './reveal_image';
import { shape } from './shape';
import { table } from './table';
import { text } from './text';
import { timeFilterFactory } from './time_filter';
import {
renderFunctions as embeddableFunctions,
renderFunctionFactories as embeddableFactories,
} from './embeddable';

export const renderFunctions = [
advancedFilter,
debug,
dropdownFilter,
error,
image,
markdown,
metric,
pie,
plot,
progress,
repeatImage,
revealImage,
shape,
table,
text,
];
import {
renderFunctions as filterFunctions,
renderFunctionFactories as filterFactories,
} from './filters';

import { renderFunctions as coreFunctions, renderFunctionFactories as coreFactories } from './core';

export const renderFunctionFactories = [embeddableRendererFactory, timeFilterFactory];
export const renderFunctions = [...coreFunctions, ...filterFunctions, ...embeddableFunctions];
export const renderFunctionFactories = [
...coreFactories,
...embeddableFactories,
...filterFactories,
];
16 changes: 16 additions & 0 deletions x-pack/plugins/canvas/i18n/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,22 @@ export const ComponentStrings = {
pageNumber,
},
}),
getAddPageTooltip: () =>
i18n.translate('xpack.canvas.pageManager.addPageTooltip', {
defaultMessage: 'Add a new page to this workpad',
}),
getConfirmRemoveTitle: () =>
i18n.translate('xpack.canvas.pageManager.confirmRemoveTitle', {
defaultMessage: 'Remove Page',
}),
getConfirmRemoveDescription: () =>
i18n.translate('xpack.canvas.pageManager.confirmRemoveDescription', {
defaultMessage: 'Are you sure you want to remove this page?',
}),
getConfirmRemoveButtonLabel: () =>
i18n.translate('xpack.canvas.pageManager.removeButtonLabel', {
defaultMessage: 'Remove',
}),
},
PagePreviewPageControls: {
getClonePageAriaLabel: () =>
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/canvas/i18n/functions/dict/saved_lens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

import { i18n } from '@kbn/i18n';
import { savedLens } from '../../../canvas_plugin_src/functions/common/saved_lens';
import { savedLens } from '../../../canvas_plugin_src/functions/external/saved_lens';
import { FunctionHelp } from '../function_help';
import { FunctionFactory } from '../../../types';

Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/canvas/i18n/functions/dict/saved_map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

import { i18n } from '@kbn/i18n';
import { savedMap } from '../../../canvas_plugin_src/functions/common/saved_map';
import { savedMap } from '../../../canvas_plugin_src/functions/external/saved_map';
import { FunctionHelp } from '../function_help';
import { FunctionFactory } from '../../../types';

Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/canvas/i18n/functions/dict/saved_search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

import { i18n } from '@kbn/i18n';
import { savedSearch } from '../../../canvas_plugin_src/functions/common/saved_search';
import { savedSearch } from '../../../canvas_plugin_src/functions/external/saved_search';
import { FunctionHelp } from '../function_help';
import { FunctionFactory } from '../../../types';

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

import { i18n } from '@kbn/i18n';
import { savedVisualization } from '../../../canvas_plugin_src/functions/common/saved_visualization';
import { savedVisualization } from '../../../canvas_plugin_src/functions/external/saved_visualization';
import { FunctionHelp } from '../function_help';
import { FunctionFactory } from '../../../types';

Expand Down
Loading

0 comments on commit 6bc94cd

Please sign in to comment.