[Tag Cloud] (Step 2) Shim new platform - renaming tagcloud-> vis_type_tagcloud (#42589)

This commit is contained in:
Alexey Antonov 2019-08-06 11:29:10 +03:00 committed by GitHub
parent 872b56d61e
commit b7f980a3fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 51 additions and 47 deletions

View file

@ -22,7 +22,7 @@
"statusPage": "src/legacy/core_plugins/status_page",
"tileMap": "src/legacy/core_plugins/tile_map",
"timelion": "src/legacy/core_plugins/timelion",
"tagCloud": "src/legacy/core_plugins/tagcloud",
"visTypeTagCloud": "src/legacy/core_plugins/vis_type_tagcloud",
"tsvb": "src/legacy/core_plugins/metrics",
"kbnESQuery": "packages/kbn-es-query",
"inspector": "src/plugins/inspector"

View file

@ -42,7 +42,7 @@ export class FeedbackMessage extends Component {
{this.state.shouldShowTruncate &&
<p>
<FormattedMessage
id="tagCloud.feedbackMessage.truncatedTagsDescription"
id="visTypeTagCloud.feedbackMessage.truncatedTagsDescription"
defaultMessage="The number of tags has been truncated to avoid long draw times."
/>
</p>
@ -50,7 +50,7 @@ export class FeedbackMessage extends Component {
{this.state.shouldShowIncomplete &&
<p>
<FormattedMessage
id="tagCloud.feedbackMessage.tooSmallContainerDescription"
id="visTypeTagCloud.feedbackMessage.tooSmallContainerDescription"
defaultMessage="The container is too small to display the entire cloud. Tags might be cropped or omitted."
/>
</p>

View file

@ -31,14 +31,14 @@ function TagCloudOptions({ stateParams, setValue, vis }: VisOptionsProps) {
setValue('minFontSize', minFontSize);
setValue('maxFontSize', maxFontSize);
};
const fontSizeRangeLabel = i18n.translate('tagCloud.visParams.fontSizeLabel', {
const fontSizeRangeLabel = i18n.translate('visTypeTagCloud.visParams.fontSizeLabel', {
defaultMessage: 'Font size range in pixels',
});
return (
<EuiPanel paddingSize="s">
<SelectOption
label={i18n.translate('tagCloud.visParams.textScaleLabel', {
label={i18n.translate('visTypeTagCloud.visParams.textScaleLabel', {
defaultMessage: 'Text scale',
})}
options={vis.type.editorConfig.collections.scales}
@ -48,7 +48,7 @@ function TagCloudOptions({ stateParams, setValue, vis }: VisOptionsProps) {
/>
<SelectOption
label={i18n.translate('tagCloud.visParams.orientationsLabel', {
label={i18n.translate('visTypeTagCloud.visParams.orientationsLabel', {
defaultMessage: 'Orientations',
})}
options={vis.type.editorConfig.collections.orientations}
@ -71,7 +71,7 @@ function TagCloudOptions({ stateParams, setValue, vis }: VisOptionsProps) {
/>
<SwitchOption
label={i18n.translate('tagCloud.visParams.showLabelToggleLabel', {
label={i18n.translate('visTypeTagCloud.visParams.showLabelToggleLabel', {
defaultMessage: 'Show label',
})}
paramName="showLabel"

View file

@ -57,7 +57,7 @@ export const createTagCloudFn = (): ExpressionFunction<
context: {
types: ['kibana_datatable'],
},
help: i18n.translate('tagCloud.function.help', {
help: i18n.translate('visTypeTagCloud.function.help', {
defaultMessage: 'Tagcloud visualization',
}),
args: {
@ -65,7 +65,7 @@ export const createTagCloudFn = (): ExpressionFunction<
types: ['string'],
default: 'linear',
options: ['linear', 'log', 'square root'],
help: i18n.translate('tagCloud.function.scale.help', {
help: i18n.translate('visTypeTagCloud.function.scale.help', {
defaultMessage: 'Scale to determine font size of a word',
}),
},
@ -73,7 +73,7 @@ export const createTagCloudFn = (): ExpressionFunction<
types: ['string'],
default: 'single',
options: ['single', 'right angled', 'multiple'],
help: i18n.translate('tagCloud.function.orientation.help', {
help: i18n.translate('visTypeTagCloud.function.orientation.help', {
defaultMessage: 'Orientation of words inside tagcloud',
}),
},
@ -94,19 +94,19 @@ export const createTagCloudFn = (): ExpressionFunction<
},
metric: {
types: ['vis_dimension'],
help: i18n.translate('tagCloud.function.metric.help', {
help: i18n.translate('visTypeTagCloud.function.metric.help', {
defaultMessage: 'metric dimension configuration',
}),
required: true,
},
bucket: {
types: ['vis_dimension'],
help: i18n.translate('tagCloud.function.bucket.help', {
help: i18n.translate('visTypeTagCloud.function.bucket.help', {
defaultMessage: 'bucket dimension configuration',
}),
},
},
fn(context: Context, args: Arguments) {
fn(context, args) {
const visConfig = {
scale: args.scale,
orientation: args.orientation,

View file

@ -31,9 +31,9 @@ import { TagCloudVisualization } from './components/tag_cloud_visualization';
export const createTagCloudTypeDefinition = () => {
return visFactory.createBaseVisualization({
name: 'tagcloud',
title: i18n.translate('tagCloud.vis.tagCloudTitle', { defaultMessage: 'Tag Cloud' }),
title: i18n.translate('visTypeTagCloud.vis.tagCloudTitle', { defaultMessage: 'Tag Cloud' }),
icon: 'visTagCloud',
description: i18n.translate('tagCloud.vis.tagCloudDescription', {
description: i18n.translate('visTypeTagCloud.vis.tagCloudDescription', {
defaultMessage: 'A group of words, sized according to their importance',
}),
visConfig: {
@ -51,19 +51,19 @@ export const createTagCloudTypeDefinition = () => {
collections: {
scales: [
{
text: i18n.translate('tagCloud.vis.editorConfig.scales.linearText', {
text: i18n.translate('visTypeTagCloud.vis.editorConfig.scales.linearText', {
defaultMessage: 'Linear',
}),
value: 'linear',
},
{
text: i18n.translate('tagCloud.vis.editorConfig.scales.logText', {
text: i18n.translate('visTypeTagCloud.vis.editorConfig.scales.logText', {
defaultMessage: 'Log',
}),
value: 'log',
},
{
text: i18n.translate('tagCloud.vis.editorConfig.scales.squareRootText', {
text: i18n.translate('visTypeTagCloud.vis.editorConfig.scales.squareRootText', {
defaultMessage: 'Square root',
}),
value: 'square root',
@ -71,19 +71,19 @@ export const createTagCloudTypeDefinition = () => {
],
orientations: [
{
text: i18n.translate('tagCloud.vis.editorConfig.orientations.singleText', {
text: i18n.translate('visTypeTagCloud.vis.editorConfig.orientations.singleText', {
defaultMessage: 'Single',
}),
value: 'single',
},
{
text: i18n.translate('tagCloud.vis.editorConfig.orientations.rightAngledText', {
text: i18n.translate('visTypeTagCloud.vis.editorConfig.orientations.rightAngledText', {
defaultMessage: 'Right angled',
}),
value: 'right angled',
},
{
text: i18n.translate('tagCloud.vis.editorConfig.orientations.multipleText', {
text: i18n.translate('visTypeTagCloud.vis.editorConfig.orientations.multipleText', {
defaultMessage: 'Multiple',
}),
value: 'multiple',
@ -95,7 +95,9 @@ export const createTagCloudTypeDefinition = () => {
{
group: 'metrics',
name: 'metric',
title: i18n.translate('tagCloud.vis.schemas.metricTitle', { defaultMessage: 'Tag size' }),
title: i18n.translate('visTypeTagCloud.vis.schemas.metricTitle', {
defaultMessage: 'Tag size',
}),
min: 1,
max: 1,
aggFilter: [
@ -111,7 +113,9 @@ export const createTagCloudTypeDefinition = () => {
{
group: 'buckets',
name: 'segment',
title: i18n.translate('tagCloud.vis.schemas.segmentTitle', { defaultMessage: 'Tags' }),
title: i18n.translate('visTypeTagCloud.vis.schemas.segmentTitle', {
defaultMessage: 'Tags',
}),
min: 1,
max: 1,
aggFilter: ['terms', 'significant_terms'],

View file

@ -2752,18 +2752,18 @@
"visTypeTable.tableVisEditorConfig.schemas.splitTitle": "テーブルを分割",
"visTypeTable.tableVisTitle": "データテーブル",
"visTypeTable.vis.noResultsFoundTitle": "結果が見つかりませんでした",
"tagCloud.feedbackMessage.tooSmallContainerDescription": "コンテナーが小さすぎてクラウド全体を表示できません。タグが切り取られたか省略されている可能性があります。",
"tagCloud.feedbackMessage.truncatedTagsDescription": "描写時間が長くなるのを防ぐため、タグの数が切り捨てられています。",
"tagCloud.function.bucket.help": "バケットディメンションの構成です。",
"tagCloud.function.help": "タグクラウドのビジュアライゼーションです。",
"tagCloud.function.metric.help": "メトリックディメンションの構成です。",
"tagCloud.function.orientation.help": "タグクラウド内の単語の方向です。",
"tagCloud.function.scale.help": "単語のフォントサイズを決定するスケールです",
"tagCloud.vis.schemas.metricTitle": "タグサイズ",
"tagCloud.vis.schemas.segmentTitle": "タグ",
"tagCloud.vis.tagCloudDescription": "重要度に基づき大きさを変えた単語のグループ表示です。",
"tagCloud.vis.tagCloudTitle": "タグクラウド",
"tagCloud.visParams.orientationsLabel": "方向",
"visTypeTagCloud.feedbackMessage.tooSmallContainerDescription": "コンテナーが小さすぎてクラウド全体を表示できません。タグが切り取られたか省略されている可能性があります。",
"visTypeTagCloud.feedbackMessage.truncatedTagsDescription": "描写時間が長くなるのを防ぐため、タグの数が切り捨てられています。",
"visTypeTagCloud.function.bucket.help": "バケットディメンションの構成です。",
"visTypeTagCloud.function.help": "タグクラウドのビジュアライゼーションです。",
"visTypeTagCloud.function.metric.help": "メトリックディメンションの構成です。",
"visTypeTagCloud.function.orientation.help": "タグクラウド内の単語の方向です。",
"visTypeTagCloud.function.scale.help": "単語のフォントサイズを決定するスケールです",
"visTypeTagCloud.vis.schemas.metricTitle": "タグサイズ",
"visTypeTagCloud.vis.schemas.segmentTitle": "タグ",
"visTypeTagCloud.vis.tagCloudDescription": "重要度に基づき大きさを変えた単語のグループ表示です。",
"visTypeTagCloud.vis.tagCloudTitle": "タグクラウド",
"visTypeTagCloud.visParams.orientationsLabel": "方向",
"tileMap.baseMapsVisualization.childShouldImplementMethodErrorMessage": "子は data-update に対応できるようこのメソドを導入する必要があります",
"tileMap.function.help": "タイルマップのビジュアライゼーションです",
"tileMap.geohashLayer.mapTitle": "{mapType} マップタイプが認識されません",

View file

@ -2752,18 +2752,18 @@
"visTypeTable.tableVisEditorConfig.schemas.splitTitle": "拆分表",
"visTypeTable.tableVisTitle": "数据表",
"visTypeTable.vis.noResultsFoundTitle": "找不到结果",
"tagCloud.feedbackMessage.tooSmallContainerDescription": "容器太小,无法显示整个云。标记可能被裁剪或省略。",
"tagCloud.feedbackMessage.truncatedTagsDescription": "标记数量已截断,以避免绘制时间过长。",
"tagCloud.function.bucket.help": "存储桶维度配置",
"tagCloud.function.help": "标签云图可视化",
"tagCloud.function.metric.help": "指标维度配置",
"tagCloud.function.orientation.help": "标签云图内的字方向",
"tagCloud.function.scale.help": "缩放以确定字体大小",
"tagCloud.vis.schemas.metricTitle": "标记大小",
"tagCloud.vis.schemas.segmentTitle": "标记",
"tagCloud.vis.tagCloudDescription": "一组字词,可根据其重要性调整大小",
"tagCloud.vis.tagCloudTitle": "标签云图",
"tagCloud.visParams.orientationsLabel": "方向",
"visTypeTagCloud.feedbackMessage.tooSmallContainerDescription": "容器太小,无法显示整个云。标记可能被裁剪或省略。",
"visTypeTagCloud.feedbackMessage.truncatedTagsDescription": "标记数量已截断,以避免绘制时间过长。",
"visTypeTagCloud.function.bucket.help": "存储桶维度配置",
"visTypeTagCloud.function.help": "标签云图可视化",
"visTypeTagCloud.function.metric.help": "指标维度配置",
"visTypeTagCloud.function.orientation.help": "标签云图内的字方向",
"visTypeTagCloud.function.scale.help": "缩放以确定字体大小",
"visTypeTagCloud.vis.schemas.metricTitle": "标记大小",
"visTypeTagCloud.vis.schemas.segmentTitle": "标记",
"visTypeTagCloud.vis.tagCloudDescription": "一组字词,可根据其重要性调整大小",
"visTypeTagCloud.vis.tagCloudTitle": "标签云图",
"visTypeTagCloud.visParams.orientationsLabel": "方向",
"tileMap.baseMapsVisualization.childShouldImplementMethodErrorMessage": "子函数应实现此方法以响应数据更新",
"tileMap.function.help": "磁贴地图可视化",
"tileMap.geohashLayer.mapTitle": "{mapType} 地图类型无法识别",