[Canvas] Expression tagcloud (#108036) (#109627)

* Added `expression_tagcloud` plugin.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
# Conflicts:
#	.github/CODEOWNERS
#	packages/kbn-optimizer/limits.yml
This commit is contained in:
Yaroslav Kuznietsov 2021-08-23 16:58:32 +03:00 committed by GitHub
parent 418e449f30
commit 94bdff6e8a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
51 changed files with 610 additions and 275 deletions

View file

@ -25,6 +25,7 @@
"expressionRepeatImage": "src/plugins/expression_repeat_image",
"expressionRevealImage": "src/plugins/expression_reveal_image",
"expressionShape": "src/plugins/expression_shape",
"expressionTagcloud": "src/plugins/chart_expressions/expression_tagcloud",
"inputControl": "src/plugins/input_control_vis",
"inspector": "src/plugins/inspector",
"inspectorViews": "src/legacy/core_plugins/inspector_views",

View file

@ -113,6 +113,10 @@ for use in their own application.
|Expression Shape plugin adds a shape function to the expression plugin and an associated renderer. The renderer will display the given shape with selected decorations.
|{kib-repo}blob/{branch}/src/plugins/chart_expressions/expression_tagcloud/README.md[expressionTagcloud]
|Expression Tagcloud plugin adds a tagcloud renderer and function to the expression plugin. The renderer will display the Wordcloud chart.
|{kib-repo}blob/{branch}/src/plugins/field_formats/README.md[fieldFormats]
|Index pattern fields formatters

View file

@ -13,6 +13,7 @@ module.exports = {
'<rootDir>/packages/*/jest.config.js',
'<rootDir>/src/*/jest.config.js',
'<rootDir>/src/plugins/*/jest.config.js',
'<rootDir>/src/plugins/chart_expressions/*/jest.config.js',
'<rootDir>/src/plugins/vis_types/*/jest.config.js',
'<rootDir>/test/*/jest.config.js',
'<rootDir>/x-pack/plugins/*/jest.config.js',

View file

@ -119,4 +119,4 @@ pageLoadAssetSize:
expressionImage: 19288
expressionMetric: 22238
expressionShape: 34008
expressionTagcloud: 27505

View file

@ -70,6 +70,7 @@ export const PROJECTS = [
...findProjects('packages/*/tsconfig.json'),
...findProjects('src/plugins/*/tsconfig.json'),
...findProjects('src/plugins/chart_expressions/*/tsconfig.json'),
...findProjects('src/plugins/vis_types/*/tsconfig.json'),
...findProjects('x-pack/plugins/*/tsconfig.json'),
...findProjects('examples/*/tsconfig.json'),

View file

@ -0,0 +1,6 @@
{
"prefix": "expressionTagcloud",
"paths": {
"expressionTagcloud": "."
}
}

View file

@ -0,0 +1,9 @@
# expressionTagcloud
Expression Tagcloud plugin adds a `tagcloud` renderer and function to the expression plugin. The renderer will display the `Wordcloud` chart.
---
## Development
See the [kibana contributing guide](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md) for instructions setting up your development environment.

View file

@ -6,9 +6,7 @@
* Side Public License, v 1.
*/
import { createGetterSetter } from '../../kibana_utils/public';
import { DataPublicPluginStart } from '../../data/public';
export const PLUGIN_ID = 'expressionTagcloud';
export const PLUGIN_NAME = 'expressionTagcloud';
export const [getFormatService, setFormatService] = createGetterSetter<
DataPublicPluginStart['fieldFormats']
>('data.fieldFormats');
export const EXPRESSION_NAME = 'tagcloud';

View file

@ -22,7 +22,7 @@ Object {
exports[`interpreter/functions#tagcloud returns an object with the correct structure 1`] = `
Object {
"as": "tagloud_vis",
"as": "tagcloud",
"type": "render",
"value": Object {
"syncColors": false,

View file

@ -0,0 +1,13 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import { tagcloudFunction } from './tagcloud_function';
export const functions = [tagcloudFunction];
export { tagcloudFunction };

View file

@ -6,13 +6,13 @@
* Side Public License, v 1.
*/
import { createTagCloudFn } from './tag_cloud_fn';
import { tagcloudFunction } from './tagcloud_function';
import { functionWrapper } from '../../expressions/common/expression_functions/specs/tests/utils';
import { Datatable } from '../../expressions/common/expression_types/specs';
import { functionWrapper } from '../../../../expressions/common/expression_functions/specs/tests/utils';
import { Datatable } from '../../../../expressions/common/expression_types/specs';
describe('interpreter/functions#tagcloud', () => {
const fn = functionWrapper(createTagCloudFn());
const fn = functionWrapper(tagcloudFunction());
const context = {
type: 'datatable',
rows: [{ 'col-0-1': 0 }],

View file

@ -0,0 +1,164 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import { i18n } from '@kbn/i18n';
import { prepareLogTable, Dimension } from '../../../../visualizations/common/prepare_log_table';
import { TagCloudVisParams } from '../types';
import { ExpressionTagcloudFunction } from '../types';
import { EXPRESSION_NAME } from '../constants';
const strings = {
help: i18n.translate('expressionTagcloud.functions.tagcloudHelpText', {
defaultMessage: 'Tagcloud visualization.',
}),
args: {
scale: i18n.translate('expressionTagcloud.functions.tagcloud.args.scaleHelpText', {
defaultMessage: 'Scale to determine font size of a word',
}),
orientation: i18n.translate('expressionTagcloud.functions.tagcloud.args.orientationHelpText', {
defaultMessage: 'Orientation of words inside tagcloud',
}),
minFontSize: i18n.translate('expressionTagcloud.functions.tagcloud.args.minFontSizeHelpText', {
defaultMessage: 'Min font size',
}),
maxFontSize: i18n.translate('expressionTagcloud.functions.tagcloud.args.maxFontSizeHelpText', {
defaultMessage: 'Max font size',
}),
showLabel: i18n.translate('expressionTagcloud.functions.tagcloud.args.showLabelHelpText', {
defaultMessage: 'Show chart label',
}),
palette: i18n.translate('expressionTagcloud.functions.tagcloud.args.paletteHelpText', {
defaultMessage: 'Defines the chart palette name',
}),
metric: i18n.translate('expressionTagcloud.functions.tagcloud.args.metricHelpText', {
defaultMessage: 'metric dimension configuration',
}),
bucket: i18n.translate('expressionTagcloud.functions.tagcloud.args.bucketHelpText', {
defaultMessage: 'bucket dimension configuration',
}),
},
dimension: {
tags: i18n.translate('expressionTagcloud.functions.tagcloud.dimension.tags', {
defaultMessage: 'Tags',
}),
tagSize: i18n.translate('expressionTagcloud.functions.tagcloud.dimension.tagSize', {
defaultMessage: 'Tag size',
}),
},
};
export const errors = {
invalidPercent: (percent: number) =>
new Error(
i18n.translate('expressionTagcloud.functions.tagcloud.invalidPercentErrorMessage', {
defaultMessage: "Invalid value: '{percent}'. Percentage must be between 0 and 1",
values: {
percent,
},
})
),
invalidImageUrl: (imageUrl: string) =>
new Error(
i18n.translate('expressionTagcloud.functions.tagcloud.invalidImageUrl', {
defaultMessage: "Invalid image url: '{imageUrl}'.",
values: {
imageUrl,
},
})
),
};
export const tagcloudFunction: ExpressionTagcloudFunction = () => {
const { help, args: argHelp, dimension } = strings;
return {
name: EXPRESSION_NAME,
type: 'render',
inputTypes: ['datatable'],
help,
args: {
scale: {
types: ['string'],
default: 'linear',
options: ['linear', 'log', 'square root'],
help: argHelp.scale,
},
orientation: {
types: ['string'],
default: 'single',
options: ['single', 'right angled', 'multiple'],
help: argHelp.orientation,
},
minFontSize: {
types: ['number'],
default: 18,
help: argHelp.minFontSize,
},
maxFontSize: {
types: ['number'],
default: 72,
help: argHelp.maxFontSize,
},
showLabel: {
types: ['boolean'],
default: true,
help: argHelp.showLabel,
},
palette: {
types: ['string'],
help: argHelp.palette,
default: 'default',
},
metric: {
types: ['vis_dimension'],
help: argHelp.metric,
required: true,
},
bucket: {
types: ['vis_dimension'],
help: argHelp.bucket,
},
},
fn(input, args, handlers) {
const visParams = {
scale: args.scale,
orientation: args.orientation,
minFontSize: args.minFontSize,
maxFontSize: args.maxFontSize,
showLabel: args.showLabel,
metric: args.metric,
...(args.bucket && {
bucket: args.bucket,
}),
palette: {
type: 'palette',
name: args.palette,
},
} as TagCloudVisParams;
if (handlers?.inspectorAdapters?.tables) {
const argsTable: Dimension[] = [[[args.metric], dimension.tagSize]];
if (args.bucket) {
argsTable.push([[args.bucket], dimension.tags]);
}
const logTable = prepareLogTable(input, argsTable);
handlers.inspectorAdapters.tables.logDatatable('default', logTable);
}
return {
type: 'render',
as: EXPRESSION_NAME,
value: {
visData: input,
visType: EXPRESSION_NAME,
visParams,
syncColors: handlers?.isSyncColorsEnabled?.() ?? false,
},
};
},
};
};

View file

@ -0,0 +1,9 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
export * from './constants';

View file

@ -0,0 +1,61 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import { PaletteOutput } from '../../../../charts/common';
import {
Datatable,
ExpressionFunctionDefinition,
ExpressionValueRender,
SerializedFieldFormat,
} from '../../../../expressions';
import { ExpressionValueVisDimension } from '../../../../visualizations/common';
import { EXPRESSION_NAME } from '../constants';
interface Dimension {
accessor: number;
format: {
id?: string;
params?: SerializedFieldFormat<object>;
};
}
interface TagCloudCommonParams {
scale: 'linear' | 'log' | 'square root';
orientation: 'single' | 'right angled' | 'multiple';
minFontSize: number;
maxFontSize: number;
showLabel: boolean;
}
export interface TagCloudVisConfig extends TagCloudCommonParams {
metric: ExpressionValueVisDimension;
bucket?: ExpressionValueVisDimension;
}
export interface TagCloudVisParams extends TagCloudCommonParams {
palette: PaletteOutput;
metric: Dimension;
bucket?: Dimension;
}
export interface TagcloudRendererConfig {
visType: typeof EXPRESSION_NAME;
visData: Datatable;
visParams: TagCloudVisParams;
syncColors: boolean;
}
interface Arguments extends TagCloudVisConfig {
palette: string;
}
export type ExpressionTagcloudFunction = () => ExpressionFunctionDefinition<
'tagcloud',
Datatable,
Arguments,
ExpressionValueRender<TagcloudRendererConfig>
>;

View file

@ -0,0 +1,13 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import { ChartsPluginSetup } from '../../../../charts/public';
export interface TagCloudTypeProps {
palettes: ChartsPluginSetup['palettes'];
}

View file

@ -0,0 +1,9 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
export * from './expression_functions';
export * from './expression_renderers';

View file

@ -0,0 +1,13 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
module.exports = {
preset: '@kbn/test',
rootDir: '../../../../',
roots: ['<rootDir>/src/plugins/chart_expressions/expression_tagcloud'],
};

View file

@ -0,0 +1,15 @@
{
"id": "expressionTagcloud",
"version": "1.0.0",
"kibanaVersion": "kibana",
"server": true,
"ui": true,
"requiredPlugins": ["expressions", "visualizations", "charts", "presentationUtil", "fieldFormats"],
"requiredBundles": ["kibanaUtils"],
"optionalPlugins": [],
"owner": {
"name": "Kibana App",
"githubTeam": "kibana-app"
},
"description": "Expression Tagcloud plugin adds a `tagcloud` renderer and function to the expression plugin. The renderer will display the `Wordcloud` chart."
}

View file

@ -0,0 +1,9 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
export * from './tagcloud_component';

View file

@ -7,12 +7,12 @@
*/
import React from 'react';
import { Wordcloud, Settings } from '@elastic/charts';
import { chartPluginMock } from '../../../charts/public/mocks';
import type { Datatable } from '../../../expressions/public';
import { chartPluginMock } from '../../../../charts/public/mocks';
import type { Datatable } from '../../../../expressions/public';
import { mount } from 'enzyme';
import { findTestSubject } from '@elastic/eui/lib/test';
import TagCloudChart, { TagCloudChartProps } from './tag_cloud_chart';
import { TagCloudVisParams } from '../types';
import TagCloudChart, { TagCloudChartProps } from './tagcloud_component';
import { TagCloudVisParams } from '../../common/types';
jest.mock('../services', () => ({
getFormatService: jest.fn(() => {

View file

@ -11,16 +11,16 @@ import { FormattedMessage } from '@kbn/i18n/react';
import { throttle } from 'lodash';
import { EuiIconTip, EuiResizeObserver } from '@elastic/eui';
import { Chart, Settings, Wordcloud, RenderChangeListener } from '@elastic/charts';
import type { PaletteRegistry } from '../../../charts/public';
import type { IInterpreterRenderHandlers } from '../../../expressions/public';
import type { PaletteRegistry } from '../../../../charts/public';
import type { IInterpreterRenderHandlers } from '../../../../expressions/public';
import { getFormatService } from '../services';
import { TagCloudVisRenderValue } from '../tag_cloud_fn';
import { TagcloudRendererConfig } from '../../common/types';
import './tag_cloud.scss';
const MAX_TAG_COUNT = 200;
export type TagCloudChartProps = TagCloudVisRenderValue & {
export type TagCloudChartProps = TagcloudRendererConfig & {
fireEvent: IInterpreterRenderHandlers['event'];
renderComplete: IInterpreterRenderHandlers['done'];
palettesRegistry: PaletteRegistry;
@ -204,7 +204,7 @@ export const TagCloudChart = ({
color="warning"
content={
<FormattedMessage
id="visTypeTagCloud.feedbackMessage.tooSmallContainerDescription"
id="expressionTagcloud.feedbackMessage.tooSmallContainerDescription"
defaultMessage="The container is too small to display the entire cloud. Tags might be cropped or omitted."
/>
}
@ -218,7 +218,7 @@ export const TagCloudChart = ({
color="warning"
content={
<FormattedMessage
id="visTypeTagCloud.feedbackMessage.truncatedTagsDescription"
id="expressionTagcloud.feedbackMessage.truncatedTagsDescription"
defaultMessage="The number of tags has been truncated to avoid long draw times."
/>
}
@ -231,6 +231,5 @@ export const TagCloudChart = ({
);
};
// default export required for React.Lazy
// eslint-disable-next-line import/no-default-export
export { TagCloudChart as default };

View file

@ -0,0 +1,9 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
export { tagcloudRenderer } from './tagcloud_renderer';

View file

@ -0,0 +1,61 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import React, { lazy } from 'react';
import { render, unmountComponentAtNode } from 'react-dom';
import { I18nProvider } from '@kbn/i18n/react';
import { i18n } from '@kbn/i18n';
import { ExpressionRenderDefinition } from '../../../../expressions/common';
import { VisualizationContainer } from '../../../../visualizations/public';
import { withSuspense } from '../../../../presentation_util/public';
import { TagcloudRendererConfig } from '../../common/types';
import { ExpressioTagcloudRendererDependencies } from '../plugin';
import { EXPRESSION_NAME } from '../../common';
export const strings = {
getDisplayName: () =>
i18n.translate('expressionTagcloud.renderer.tagcloud.displayName', {
defaultMessage: 'Tag Cloud visualization',
}),
getHelpDescription: () =>
i18n.translate('expressionTagcloud.renderer.tagcloud.helpDescription', {
defaultMessage: 'Render a tag cloud',
}),
};
const LazyTagcloudComponent = lazy(() => import('../components/tagcloud_component'));
const TagcloudComponent = withSuspense(LazyTagcloudComponent);
export const tagcloudRenderer: (
deps: ExpressioTagcloudRendererDependencies
) => ExpressionRenderDefinition<TagcloudRendererConfig> = ({ palettes }) => ({
name: EXPRESSION_NAME,
displayName: strings.getDisplayName(),
help: strings.getHelpDescription(),
reuseDomNode: true,
render: async (domNode, config, handlers) => {
handlers.onDestroy(() => {
unmountComponentAtNode(domNode);
});
const palettesRegistry = await palettes.getPalettes();
render(
<I18nProvider>
<VisualizationContainer handlers={handlers}>
<TagcloudComponent
{...config}
palettesRegistry={palettesRegistry}
renderComplete={handlers.done}
fireEvent={handlers.event}
syncColors={config.syncColors}
/>
</VisualizationContainer>
</I18nProvider>,
domNode
);
},
});

View file

@ -0,0 +1,15 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import { ExpressionTagcloudPlugin } from './plugin';
export type { ExpressionTagcloudPluginSetup, ExpressionTagcloudPluginStart } from './plugin';
export function plugin() {
return new ExpressionTagcloudPlugin();
}

View file

@ -0,0 +1,51 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import { CoreSetup, CoreStart, Plugin } from '../../../../core/public';
import { ExpressionsStart, ExpressionsSetup } from '../../../expressions/public';
import { ChartsPluginSetup } from '../../../charts/public';
import { tagcloudRenderer } from './expression_renderers';
import { tagcloudFunction } from '../common/expression_functions';
import { FieldFormatsStart } from '../../../field_formats/public';
import { setFormatService } from './services';
interface SetupDeps {
expressions: ExpressionsSetup;
charts: ChartsPluginSetup;
}
/** @internal */
export interface ExpressioTagcloudRendererDependencies {
palettes: ChartsPluginSetup['palettes'];
}
interface StartDeps {
expression: ExpressionsStart;
fieldFormats: FieldFormatsStart;
}
export type ExpressionTagcloudPluginSetup = void;
export type ExpressionTagcloudPluginStart = void;
export class ExpressionTagcloudPlugin
implements
Plugin<ExpressionTagcloudPluginSetup, ExpressionTagcloudPluginStart, SetupDeps, StartDeps> {
public setup(core: CoreSetup, { expressions, charts }: SetupDeps): ExpressionTagcloudPluginSetup {
const rendererDependencies: ExpressioTagcloudRendererDependencies = {
palettes: charts.palettes,
};
expressions.registerFunction(tagcloudFunction);
expressions.registerRenderer(tagcloudRenderer(rendererDependencies));
}
public start(core: CoreStart, { fieldFormats }: StartDeps): ExpressionTagcloudPluginStart {
setFormatService(fieldFormats);
}
public stop() {}
}

View file

@ -0,0 +1,22 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import { createGetterSetter } from '../../../kibana_utils/public';
import { FieldFormatsStart } from '../../../field_formats/public';
export const [getFormatService, setFormatService] = createGetterSetter<FieldFormatsStart>(
'fieldFormats'
);

View file

@ -0,0 +1,13 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import { ExpressionTagcloudPlugin } from './plugin';
export function plugin() {
return new ExpressionTagcloudPlugin();
}

View file

@ -0,0 +1,34 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import { CoreSetup, CoreStart, Plugin } from '../../../../core/public';
import { ExpressionsServerStart, ExpressionsServerSetup } from '../../../expressions/server';
import { tagcloudFunction } from '../common/expression_functions';
interface SetupDeps {
expressions: ExpressionsServerSetup;
}
interface StartDeps {
expression: ExpressionsServerStart;
}
export type ExpressionTagcloudPluginSetup = void;
export type ExpressionTagcloudPluginStart = void;
export class ExpressionTagcloudPlugin
implements
Plugin<ExpressionTagcloudPluginSetup, ExpressionTagcloudPluginStart, SetupDeps, StartDeps> {
public setup(core: CoreSetup, { expressions }: SetupDeps): ExpressionTagcloudPluginSetup {
expressions.registerFunction(tagcloudFunction);
}
public start(core: CoreStart): ExpressionTagcloudPluginStart {}
public stop() {}
}

View file

@ -0,0 +1,24 @@
{
"extends": "../../../../tsconfig.base.json",
"compilerOptions": {
"outDir": "./target/types",
"emitDeclarationOnly": true,
"declaration": true,
"declarationMap": true,
"isolatedModules": true
},
"include": [
"common/**/*",
"public/**/*",
"server/**/*",
],
"references": [
{ "path": "../../../core/tsconfig.json" },
{ "path": "../../presentation_util/tsconfig.json" },
{ "path": "../../expressions/tsconfig.json" },
{ "path": "../../visualizations/tsconfig.json" },
{ "path": "../../charts/tsconfig.json" },
{ "path": "../../field_formats/tsconfig.json" },
{ "path": "../../kibana_utils/tsconfig.json" },
]
}

View file

@ -4,7 +4,7 @@
"ui": true,
"server": true,
"requiredPlugins": ["data", "expressions", "visualizations", "charts"],
"requiredBundles": ["kibanaUtils", "kibanaReact", "visDefaultEditor"],
"requiredBundles": ["kibanaReact", "visDefaultEditor"],
"owner": {
"name": "Kibana App",
"githubTeam": "kibana-app"

View file

@ -7,20 +7,14 @@
*/
import { PluginInitializerContext, CoreSetup, CoreStart, Plugin } from 'kibana/public';
import { Plugin as ExpressionsPublicPlugin } from '../../expressions/public';
import { VisualizationsSetup } from '../../visualizations/public';
import { ChartsPluginSetup } from '../../charts/public';
import { createTagCloudFn } from './tag_cloud_fn';
import { getTagCloudVisTypeDefinition } from './tag_cloud_type';
import { DataPublicPluginStart } from '../../data/public';
import { setFormatService } from './services';
import { ConfigSchema } from '../config';
import { getTagCloudVisRenderer } from './tag_cloud_vis_renderer';
/** @internal */
export interface TagCloudPluginSetupDependencies {
expressions: ReturnType<ExpressionsPublicPlugin['setup']>;
visualizations: VisualizationsSetup;
charts: ChartsPluginSetup;
}
@ -30,11 +24,6 @@ export interface TagCloudVisDependencies {
palettes: ChartsPluginSetup['palettes'];
}
/** @internal */
export interface TagCloudVisPluginStartDependencies {
data: DataPublicPluginStart;
}
/** @internal */
export class TagCloudPlugin implements Plugin<void, void> {
initializerContext: PluginInitializerContext<ConfigSchema>;
@ -43,23 +32,13 @@ export class TagCloudPlugin implements Plugin<void, void> {
this.initializerContext = initializerContext;
}
public setup(
core: CoreSetup,
{ expressions, visualizations, charts }: TagCloudPluginSetupDependencies
) {
public setup(core: CoreSetup, { visualizations, charts }: TagCloudPluginSetupDependencies) {
const visualizationDependencies: TagCloudVisDependencies = {
palettes: charts.palettes,
};
expressions.registerFunction(createTagCloudFn);
expressions.registerRenderer(getTagCloudVisRenderer(visualizationDependencies));
visualizations.createBaseVisualization(
getTagCloudVisTypeDefinition({
palettes: charts.palettes,
})
);
visualizations.createBaseVisualization(getTagCloudVisTypeDefinition(visualizationDependencies));
}
public start(core: CoreStart, { data }: TagCloudVisPluginStartDependencies) {
setFormatService(data.fieldFormats);
}
public start(core: CoreStart) {}
}

View file

@ -1,143 +0,0 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import { i18n } from '@kbn/i18n';
import { ExpressionFunctionDefinition, Datatable, Render } from '../../expressions/public';
import { prepareLogTable, Dimension } from '../../visualizations/public';
import { TagCloudVisParams, TagCloudVisConfig } from './types';
const name = 'tagcloud';
interface Arguments extends TagCloudVisConfig {
palette: string;
}
export interface TagCloudVisRenderValue {
visType: typeof name;
visData: Datatable;
visParams: TagCloudVisParams;
syncColors: boolean;
}
export type TagcloudExpressionFunctionDefinition = ExpressionFunctionDefinition<
typeof name,
Datatable,
Arguments,
Render<TagCloudVisRenderValue>
>;
export const createTagCloudFn = (): TagcloudExpressionFunctionDefinition => ({
name,
type: 'render',
inputTypes: ['datatable'],
help: i18n.translate('visTypeTagCloud.function.help', {
defaultMessage: 'Tagcloud visualization',
}),
args: {
scale: {
types: ['string'],
default: 'linear',
options: ['linear', 'log', 'square root'],
help: i18n.translate('visTypeTagCloud.function.scale.help', {
defaultMessage: 'Scale to determine font size of a word',
}),
},
orientation: {
types: ['string'],
default: 'single',
options: ['single', 'right angled', 'multiple'],
help: i18n.translate('visTypeTagCloud.function.orientation.help', {
defaultMessage: 'Orientation of words inside tagcloud',
}),
},
minFontSize: {
types: ['number'],
default: 18,
help: '',
},
maxFontSize: {
types: ['number'],
default: 72,
help: '',
},
showLabel: {
types: ['boolean'],
default: true,
help: '',
},
palette: {
types: ['string'],
help: i18n.translate('visTypeTagCloud.function.paletteHelpText', {
defaultMessage: 'Defines the chart palette name',
}),
default: 'default',
},
metric: {
types: ['vis_dimension'],
help: i18n.translate('visTypeTagCloud.function.metric.help', {
defaultMessage: 'metric dimension configuration',
}),
required: true,
},
bucket: {
types: ['vis_dimension'],
help: i18n.translate('visTypeTagCloud.function.bucket.help', {
defaultMessage: 'bucket dimension configuration',
}),
},
},
fn(input, args, handlers) {
const visParams = {
scale: args.scale,
orientation: args.orientation,
minFontSize: args.minFontSize,
maxFontSize: args.maxFontSize,
showLabel: args.showLabel,
metric: args.metric,
...(args.bucket && {
bucket: args.bucket,
}),
palette: {
type: 'palette',
name: args.palette,
},
} as TagCloudVisParams;
if (handlers?.inspectorAdapters?.tables) {
const argsTable: Dimension[] = [
[
[args.metric],
i18n.translate('visTypeTagCloud.function.dimension.tagSize', {
defaultMessage: 'Tag size',
}),
],
];
if (args.bucket) {
argsTable.push([
[args.bucket],
i18n.translate('visTypeTagCloud.function.adimension.tags', {
defaultMessage: 'Tags',
}),
]);
}
const logTable = prepareLogTable(input, argsTable);
handlers.inspectorAdapters.tables.logDatatable('default', logTable);
}
return {
type: 'render',
as: 'tagloud_vis',
value: {
visData: input,
visType: name,
visParams,
syncColors: handlers?.isSyncColorsEnabled?.() ?? false,
},
};
},
});

View file

@ -1,47 +0,0 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import React, { lazy } from 'react';
import { render, unmountComponentAtNode } from 'react-dom';
import { I18nProvider } from '@kbn/i18n/react';
import { VisualizationContainer } from '../../visualizations/public';
import { ExpressionRenderDefinition } from '../../expressions/common/expression_renderers';
import { TagCloudVisDependencies } from './plugin';
import { TagCloudVisRenderValue } from './tag_cloud_fn';
const TagCloudChart = lazy(() => import('./components/tag_cloud_chart'));
export const getTagCloudVisRenderer: (
deps: TagCloudVisDependencies
) => ExpressionRenderDefinition<TagCloudVisRenderValue> = ({ palettes }) => ({
name: 'tagloud_vis',
displayName: 'Tag Cloud visualization',
reuseDomNode: true,
render: async (domNode, config, handlers) => {
handlers.onDestroy(() => {
unmountComponentAtNode(domNode);
});
const palettesRegistry = await palettes.getPalettes();
render(
<I18nProvider>
<VisualizationContainer handlers={handlers}>
<TagCloudChart
{...config}
palettesRegistry={palettesRegistry}
renderComplete={handlers.done}
fireEvent={handlers.event}
syncColors={config.syncColors}
/>
</VisualizationContainer>
</I18nProvider>,
domNode
);
},
});

View file

@ -12,7 +12,6 @@ import {
} from '../../data/public';
import { buildExpression, buildExpressionFunction } from '../../expressions/public';
import { getVisSchemas, SchemaConfig, VisToExpressionAst } from '../../visualizations/public';
import { TagcloudExpressionFunctionDefinition } from './tag_cloud_fn';
import { TagCloudVisParams } from './types';
const prepareDimension = (params: SchemaConfig) => {
@ -41,7 +40,7 @@ export const toExpressionAst: VisToExpressionAst<TagCloudVisParams> = (vis, para
const schemas = getVisSchemas(vis, params);
const { scale, orientation, minFontSize, maxFontSize, showLabel, palette } = vis.params;
const tagcloud = buildExpressionFunction<TagcloudExpressionFunctionDefinition>('tagcloud', {
const tagcloud = buildExpressionFunction('tagcloud', {
scale,
orientation,
minFontSize,

View file

@ -7,7 +7,6 @@
*/
import type { ChartsPluginSetup, PaletteOutput } from '../../charts/public';
import type { SerializedFieldFormat } from '../../expressions/public';
import { ExpressionValueVisDimension } from '../../visualizations/public';
interface Dimension {
accessor: number;
@ -25,11 +24,6 @@ interface TagCloudCommonParams {
showLabel: boolean;
}
export interface TagCloudVisConfig extends TagCloudCommonParams {
metric: ExpressionValueVisDimension;
bucket?: ExpressionValueVisDimension;
}
export interface TagCloudVisParams extends TagCloudCommonParams {
palette: PaletteOutput;
metric: Dimension;

View file

@ -17,7 +17,6 @@
{ "path": "../expressions/tsconfig.json" },
{ "path": "../visualizations/tsconfig.json" },
{ "path": "../charts/tsconfig.json" },
{ "path": "../kibana_utils/tsconfig.json" },
{ "path": "../kibana_react/tsconfig.json" },
{ "path": "../vis_default_editor/tsconfig.json" },
]

View file

@ -1 +1 @@
{"as":"tagloud_vis","type":"render","value":{"syncColors":false,"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visParams":{"bucket":{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"},"maxFontSize":72,"metric":{"accessor":1,"format":{"id":"number","params":{}},"type":"vis_dimension"},"minFontSize":18,"orientation":"single","palette":{"name":"default","type":"palette"},"scale":"linear","showLabel":true},"visType":"tagcloud"}}
{"as":"tagcloud","type":"render","value":{"syncColors":false,"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visParams":{"bucket":{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"},"maxFontSize":72,"metric":{"accessor":1,"format":{"id":"number","params":{}},"type":"vis_dimension"},"minFontSize":18,"orientation":"single","palette":{"name":"default","type":"palette"},"scale":"linear","showLabel":true},"visType":"tagcloud"}}

View file

@ -1 +1 @@
{"as":"tagloud_vis","type":"render","value":{"syncColors":false,"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visParams":{"bucket":{"accessor":1,"format":{"id":"string","params":{}},"type":"vis_dimension"},"maxFontSize":72,"metric":{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"},"minFontSize":18,"orientation":"single","palette":{"name":"default","type":"palette"},"scale":"linear","showLabel":true},"visType":"tagcloud"}}
{"as":"tagcloud","type":"render","value":{"syncColors":false,"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visParams":{"bucket":{"accessor":1,"format":{"id":"string","params":{}},"type":"vis_dimension"},"maxFontSize":72,"metric":{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"},"minFontSize":18,"orientation":"single","palette":{"name":"default","type":"palette"},"scale":"linear","showLabel":true},"visType":"tagcloud"}}

View file

@ -1 +1 @@
{"as":"tagloud_vis","type":"render","value":{"syncColors":false,"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visParams":{"bucket":{"accessor":1,"format":{"id":"string","params":{}},"type":"vis_dimension"},"maxFontSize":40,"metric":{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"},"minFontSize":20,"orientation":"single","palette":{"name":"default","type":"palette"},"scale":"linear","showLabel":true},"visType":"tagcloud"}}
{"as":"tagcloud","type":"render","value":{"syncColors":false,"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visParams":{"bucket":{"accessor":1,"format":{"id":"string","params":{}},"type":"vis_dimension"},"maxFontSize":40,"metric":{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"},"minFontSize":20,"orientation":"single","palette":{"name":"default","type":"palette"},"scale":"linear","showLabel":true},"visType":"tagcloud"}}

View file

@ -1 +1 @@
{"as":"tagloud_vis","type":"render","value":{"syncColors":false,"visData":{"columns":[],"meta":{},"rows":[],"type":"datatable"},"visParams":{"maxFontSize":72,"metric":{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"},"minFontSize":18,"orientation":"single","palette":{"name":"default","type":"palette"},"scale":"linear","showLabel":true},"visType":"tagcloud"}}
{"as":"tagcloud","type":"render","value":{"syncColors":false,"visData":{"columns":[],"meta":{},"rows":[],"type":"datatable"},"visParams":{"maxFontSize":72,"metric":{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"},"minFontSize":18,"orientation":"single","palette":{"name":"default","type":"palette"},"scale":"linear","showLabel":true},"visType":"tagcloud"}}

View file

@ -1 +1 @@
{"as":"tagloud_vis","type":"render","value":{"syncColors":false,"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visParams":{"maxFontSize":72,"metric":{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"},"minFontSize":18,"orientation":"single","palette":{"name":"default","type":"palette"},"scale":"linear","showLabel":true},"visType":"tagcloud"}}
{"as":"tagcloud","type":"render","value":{"syncColors":false,"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visParams":{"maxFontSize":72,"metric":{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"},"minFontSize":18,"orientation":"single","palette":{"name":"default","type":"palette"},"scale":"linear","showLabel":true},"visType":"tagcloud"}}

View file

@ -1 +1 @@
{"as":"tagloud_vis","type":"render","value":{"syncColors":false,"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visParams":{"bucket":{"accessor":1,"format":{"id":"string","params":{}},"type":"vis_dimension"},"maxFontSize":72,"metric":{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"},"minFontSize":18,"orientation":"multiple","palette":{"name":"default","type":"palette"},"scale":"log","showLabel":true},"visType":"tagcloud"}}
{"as":"tagcloud","type":"render","value":{"syncColors":false,"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visParams":{"bucket":{"accessor":1,"format":{"id":"string","params":{}},"type":"vis_dimension"},"maxFontSize":72,"metric":{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"},"minFontSize":18,"orientation":"multiple","palette":{"name":"default","type":"palette"},"scale":"log","showLabel":true},"visType":"tagcloud"}}

View file

@ -1 +1 @@
{"as":"tagloud_vis","type":"render","value":{"syncColors":false,"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visParams":{"bucket":{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"},"maxFontSize":72,"metric":{"accessor":1,"format":{"id":"number","params":{}},"type":"vis_dimension"},"minFontSize":18,"orientation":"single","palette":{"name":"default","type":"palette"},"scale":"linear","showLabel":true},"visType":"tagcloud"}}
{"as":"tagcloud","type":"render","value":{"syncColors":false,"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visParams":{"bucket":{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"},"maxFontSize":72,"metric":{"accessor":1,"format":{"id":"number","params":{}},"type":"vis_dimension"},"minFontSize":18,"orientation":"single","palette":{"name":"default","type":"palette"},"scale":"linear","showLabel":true},"visType":"tagcloud"}}

View file

@ -1 +1 @@
{"as":"tagloud_vis","type":"render","value":{"syncColors":false,"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visParams":{"bucket":{"accessor":1,"format":{"id":"string","params":{}},"type":"vis_dimension"},"maxFontSize":72,"metric":{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"},"minFontSize":18,"orientation":"single","palette":{"name":"default","type":"palette"},"scale":"linear","showLabel":true},"visType":"tagcloud"}}
{"as":"tagcloud","type":"render","value":{"syncColors":false,"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visParams":{"bucket":{"accessor":1,"format":{"id":"string","params":{}},"type":"vis_dimension"},"maxFontSize":72,"metric":{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"},"minFontSize":18,"orientation":"single","palette":{"name":"default","type":"palette"},"scale":"linear","showLabel":true},"visType":"tagcloud"}}

View file

@ -1 +1 @@
{"as":"tagloud_vis","type":"render","value":{"syncColors":false,"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visParams":{"bucket":{"accessor":1,"format":{"id":"string","params":{}},"type":"vis_dimension"},"maxFontSize":40,"metric":{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"},"minFontSize":20,"orientation":"single","palette":{"name":"default","type":"palette"},"scale":"linear","showLabel":true},"visType":"tagcloud"}}
{"as":"tagcloud","type":"render","value":{"syncColors":false,"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visParams":{"bucket":{"accessor":1,"format":{"id":"string","params":{}},"type":"vis_dimension"},"maxFontSize":40,"metric":{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"},"minFontSize":20,"orientation":"single","palette":{"name":"default","type":"palette"},"scale":"linear","showLabel":true},"visType":"tagcloud"}}

View file

@ -1 +1 @@
{"as":"tagloud_vis","type":"render","value":{"syncColors":false,"visData":{"columns":[],"meta":{},"rows":[],"type":"datatable"},"visParams":{"maxFontSize":72,"metric":{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"},"minFontSize":18,"orientation":"single","palette":{"name":"default","type":"palette"},"scale":"linear","showLabel":true},"visType":"tagcloud"}}
{"as":"tagcloud","type":"render","value":{"syncColors":false,"visData":{"columns":[],"meta":{},"rows":[],"type":"datatable"},"visParams":{"maxFontSize":72,"metric":{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"},"minFontSize":18,"orientation":"single","palette":{"name":"default","type":"palette"},"scale":"linear","showLabel":true},"visType":"tagcloud"}}

View file

@ -1 +1 @@
{"as":"tagloud_vis","type":"render","value":{"syncColors":false,"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visParams":{"maxFontSize":72,"metric":{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"},"minFontSize":18,"orientation":"single","palette":{"name":"default","type":"palette"},"scale":"linear","showLabel":true},"visType":"tagcloud"}}
{"as":"tagcloud","type":"render","value":{"syncColors":false,"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visParams":{"maxFontSize":72,"metric":{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"},"minFontSize":18,"orientation":"single","palette":{"name":"default","type":"palette"},"scale":"linear","showLabel":true},"visType":"tagcloud"}}

View file

@ -1 +1 @@
{"as":"tagloud_vis","type":"render","value":{"syncColors":false,"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visParams":{"bucket":{"accessor":1,"format":{"id":"string","params":{}},"type":"vis_dimension"},"maxFontSize":72,"metric":{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"},"minFontSize":18,"orientation":"multiple","palette":{"name":"default","type":"palette"},"scale":"log","showLabel":true},"visType":"tagcloud"}}
{"as":"tagcloud","type":"render","value":{"syncColors":false,"visData":{"columns":[{"id":"col-0-2","meta":{"field":"response.raw","index":"logstash-*","params":{"id":"terms","params":{"id":"string","missingBucketLabel":"Missing","otherBucketLabel":"Other"}},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"2","indexPatternId":"logstash-*","params":{"field":"response.raw","missingBucket":false,"missingBucketLabel":"Missing","order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","size":4},"schema":"segment","type":"terms"},"type":"string"},"name":"response.raw: Descending"},{"id":"col-1-1","meta":{"field":null,"index":"logstash-*","params":{"id":"number"},"source":"esaggs","sourceParams":{"appliedTimeRange":null,"enabled":true,"id":"1","indexPatternId":"logstash-*","params":{},"schema":"metric","type":"count"},"type":"number"},"name":"Count"}],"rows":[{"col-0-2":"200","col-1-1":12891},{"col-0-2":"404","col-1-1":696},{"col-0-2":"503","col-1-1":417}],"type":"datatable"},"visParams":{"bucket":{"accessor":1,"format":{"id":"string","params":{}},"type":"vis_dimension"},"maxFontSize":72,"metric":{"accessor":0,"format":{"id":"string","params":{}},"type":"vis_dimension"},"minFontSize":18,"orientation":"multiple","palette":{"name":"default","type":"palette"},"scale":"log","showLabel":true},"visType":"tagcloud"}}

View file

@ -4230,14 +4230,14 @@
"visTypeTable.vis.controls.formattedCSVButtonLabel": "フォーマット済み",
"visTypeTable.vis.controls.rawCSVButtonLabel": "未加工",
"visTypeTable.vis.noResultsFoundTitle": "結果が見つかりませんでした",
"visTypeTagCloud.feedbackMessage.tooSmallContainerDescription": "コンテナーが小さすぎてクラウド全体を表示できません。タグが切り取られたか省略されている可能性があります。",
"visTypeTagCloud.feedbackMessage.truncatedTagsDescription": "描写時間が長くなるのを防ぐため、タグの数が切り捨てられています。",
"visTypeTagCloud.function.bucket.help": "バケットディメンションの構成です。",
"visTypeTagCloud.function.help": "タグクラウドのビジュアライゼーションです。",
"visTypeTagCloud.function.metric.help": "メトリックディメンションの構成です。",
"visTypeTagCloud.function.orientation.help": "タグクラウド内の単語の方向です。",
"visTypeTagCloud.function.paletteHelpText": "グラフパレット名を定義します",
"visTypeTagCloud.function.scale.help": "単語のフォントサイズを決定するスケールです",
"expressionTagcloud.feedbackMessage.tooSmallContainerDescription": "コンテナーが小さすぎてクラウド全体を表示できません。タグが切り取られたか省略されている可能性があります。",
"expressionTagcloud.feedbackMessage.truncatedTagsDescription": "描写時間が長くなるのを防ぐため、タグの数が切り捨てられています。",
"expressionTagcloud.functions.tagcloud.args.bucketHelpText": "バケットディメンションの構成です。",
"expressionTagcloud.functions.tagcloudHelpText": "タグクラウドのビジュアライゼーションです。",
"expressionTagcloud.functions.tagcloud.args.metricHelpText": "メトリックディメンションの構成です。",
"expressionTagcloud.functions.tagcloud.args.orientationHelpText": "タグクラウド内の単語の方向です。",
"expressionTagcloud.functions.tagcloud.args.paletteHelpText": "グラフパレット名を定義します",
"expressionTagcloud.functions.tagcloud.args.scaleHelpText": "単語のフォントサイズを決定するスケールです",
"visTypeTagCloud.orientations.multipleText": "複数",
"visTypeTagCloud.orientations.rightAngledText": "直角",
"visTypeTagCloud.orientations.singleText": "単一",

View file

@ -4250,14 +4250,14 @@
"visTypeTable.vis.controls.formattedCSVButtonLabel": "格式化",
"visTypeTable.vis.controls.rawCSVButtonLabel": "原始",
"visTypeTable.vis.noResultsFoundTitle": "找不到结果",
"visTypeTagCloud.feedbackMessage.tooSmallContainerDescription": "容器太小,无法显示整个云。标签可能被裁剪或省略。",
"visTypeTagCloud.feedbackMessage.truncatedTagsDescription": "标签数量已截断,以避免绘制时间过长。",
"visTypeTagCloud.function.bucket.help": "存储桶维度配置",
"visTypeTagCloud.function.help": "标签云图可视化",
"visTypeTagCloud.function.metric.help": "指标维度配置",
"visTypeTagCloud.function.orientation.help": "标签云图内的字方向",
"visTypeTagCloud.function.paletteHelpText": "定义图表调色板名称",
"visTypeTagCloud.function.scale.help": "缩放以确定字体大小",
"expressionTagcloud.feedbackMessage.tooSmallContainerDescription": "容器太小,无法显示整个云。标签可能被裁剪或省略。",
"expressionTagcloud.feedbackMessage.truncatedTagsDescription": "标签数量已截断,以避免绘制时间过长。",
"expressionTagcloud.functions.tagcloud.args.bucketHelpText": "存储桶维度配置",
"expressionTagcloud.functions.tagcloudHelpText": "标签云图可视化",
"expressionTagcloud.functions.tagcloud.args.metricHelpText": "指标维度配置",
"expressionTagcloud.functions.tagcloud.args.orientationHelpText": "标签云图内的字方向",
"expressionTagcloud.functions.tagcloud.args.paletteHelpText": "定义图表调色板名称",
"expressionTagcloud.functions.tagcloud.args.scaleHelpText": "缩放以确定字体大小",
"visTypeTagCloud.orientations.multipleText": "多个",
"visTypeTagCloud.orientations.rightAngledText": "直角",
"visTypeTagCloud.orientations.singleText": "单个",