Skip to content

Commit

Permalink
Revert "[TSVB] Rename Index pattern to Data view (#110253)" (#114278)
Browse files Browse the repository at this point in the history
This reverts commit 51df1e5.
  • Loading branch information
DianaDerevyankina authored Oct 7, 2021
1 parent 0b14195 commit 2e6ce13
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,28 +33,22 @@ export interface IndexPatternSelectProps {
| null;
}

const queryAllIndicesHelpText = (
<FormattedMessage
id="visTypeTimeseries.indexPatternSelect.queryAllIndicesText"
defaultMessage="To query all indices, use {asterisk}."
values={{
asterisk: <strong>*</strong>,
}}
/>
const defaultIndexPatternHelpText = i18n.translate(
'visTypeTimeseries.indexPatternSelect.defaultIndexPatternText',
{
defaultMessage: 'Default index pattern is used.',
}
);

const getIndexPatternHelpText = (useKibanaIndices: boolean) => (
<FormattedMessage
id="visTypeTimeseries.indexPatternSelect.defaultDataViewText"
defaultMessage="Using the default data view. {queryAllIndicesHelpText}"
values={{
queryAllIndicesHelpText: useKibanaIndices ? '' : queryAllIndicesHelpText,
}}
/>
const queryAllIndexesHelpText = i18n.translate(
'visTypeTimeseries.indexPatternSelect.queryAllIndexesText',
{
defaultMessage: 'To query all indexes use *',
}
);

const indexPatternLabel = i18n.translate('visTypeTimeseries.indexPatternSelect.label', {
defaultMessage: 'Data view',
defaultMessage: 'Index pattern',
});

export const IndexPatternSelect = ({
Expand Down Expand Up @@ -109,14 +103,17 @@ export const IndexPatternSelect = ({
<EuiFormRow
id={htmlId('indexPattern')}
label={indexPatternLabel}
helpText={fetchedIndex.defaultIndex && getIndexPatternHelpText(useKibanaIndices)}
helpText={
fetchedIndex.defaultIndex &&
defaultIndexPatternHelpText + (!useKibanaIndices ? queryAllIndexesHelpText : '')
}
labelAppend={
fetchedIndex.indexPatternString && !fetchedIndex.indexPattern ? (
<EuiLink onClick={navigateToCreateIndexPatternPage}>
<EuiText size="xs">
<FormattedMessage
id="visTypeTimeseries.indexPatternSelect.createDataViewText"
defaultMessage="Create data view"
id="visTypeTimeseries.indexPatternSelect.createIndexPatternText"
defaultMessage="Create index pattern"
/>
</EuiText>
</EuiLink>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export const SwitchModePopover = ({ onModeChange, useKibanaIndices }: PopoverPro
aria-label={i18n.translate(
'visTypeTimeseries.indexPatternSelect.switchModePopover.areaLabel',
{
defaultMessage: 'Configure data view selection mode',
defaultMessage: 'Configure index pattern selection mode',
}
)}
onClick={onButtonClick}
Expand All @@ -97,13 +97,14 @@ export const SwitchModePopover = ({ onModeChange, useKibanaIndices }: PopoverPro
>
<EuiPopoverTitle>
{i18n.translate('visTypeTimeseries.indexPatternSelect.switchModePopover.title', {
defaultMessage: 'Data view mode',
defaultMessage: 'Index pattern selection mode',
})}
</EuiPopoverTitle>
<EuiText>
<FormattedMessage
id="visTypeTimeseries.indexPatternSelect.switchModePopover.text"
defaultMessage="A data view groups and retrieves data from Elasticsearch. Disable this mode to directly query Elasticsearch indices instead. {allowStringIndicesLabel}"
defaultMessage="An index pattern identifies one or more Elasticsearch indices that you want to explore.
Kibana index patterns are used by default. {allowStringIndicesLabel}"
values={{
allowStringIndicesLabel,
}}
Expand All @@ -115,7 +116,7 @@ export const SwitchModePopover = ({ onModeChange, useKibanaIndices }: PopoverPro
label={i18n.translate(
'visTypeTimeseries.indexPatternSelect.switchModePopover.useKibanaIndices',
{
defaultMessage: 'Use Kibana data views',
defaultMessage: 'Use only index patterns',
}
)}
onChange={switchMode}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ export const SeriesConfig = (props) => {
<EuiFlexGroup gutterSize="s" responsive={false} wrap={true}>
<EuiFlexItem grow={false}>
<EuiFormRow
label={i18n.translate('visTypeTimeseries.seriesConfig.overrideDataViewLabel', {
defaultMessage: 'Override data view?',
label={i18n.translate('visTypeTimeseries.seriesConfig.overrideIndexPatternLabel', {
defaultMessage: 'Override Index Pattern?',
})}
>
<YesNo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,22 @@ export const UseIndexPatternModeCallout = () => {
<EuiCallOut
title={
<FormattedMessage
id="visTypeTimeseries.visEditorVisualization.dataViewMode.notificationTitle"
defaultMessage="TSVB supports data views"
id="visTypeTimeseries.visEditorVisualization.indexPatternMode.notificationTitle"
defaultMessage="TSVB now supports index patterns"
/>
}
iconType="cheer"
size="s"
>
<p>
<FormattedMessage
id="visTypeTimeseries.visEditorVisualization.dataViewMode.notificationMessage"
defaultMessage="Great news! You can visualize the data from Kibana data views (recommended) or Elasticsearch indices. {indexPatternModeLink}."
id="visTypeTimeseries.visEditorVisualization.indexPatternMode.notificationMessage"
defaultMessage="Great news! You can now visualize the data from Kibana index patterns (recommended) or Elasticsearch indices. {indexPatternModeLink}."
values={{
indexPatternModeLink: (
<EuiLink href={indexPatternModeLink} target="_blank" external>
<FormattedMessage
id="visTypeTimeseries.visEditorVisualization.dataViewMode.link"
id="visTypeTimeseries.visEditorVisualization.indexPatternMode.link"
defaultMessage="Check it out."
/>
</EuiLink>
Expand All @@ -59,7 +59,7 @@ export const UseIndexPatternModeCallout = () => {
<EuiFlexGroup gutterSize="none">
<EuiButton size="s" onClick={dismissNotice}>
<FormattedMessage
id="visTypeTimeseries.visEditorVisualization.dataViewMode.dismissNoticeButtonText"
id="visTypeTimeseries.visEditorVisualization.indexPatternMode.dismissNoticeButtonText"
defaultMessage="Dismiss"
/>
</EuiButton>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -538,8 +538,8 @@ export const TimeseriesConfig = injectI18n(function (props) {
<EuiFlexGroup gutterSize="s" responsive={false} wrap={true}>
<EuiFlexItem grow={false}>
<EuiFormRow
label={i18n.translate('visTypeTimeseries.timeSeries.overrideDataViewLabel', {
defaultMessage: 'Override data view?',
label={i18n.translate('visTypeTimeseries.timeSeries.overrideIndexPatternLabel', {
defaultMessage: 'Override Index Pattern?',
})}
>
<YesNo
Expand Down
13 changes: 11 additions & 2 deletions x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -5193,6 +5193,12 @@
"visTypeTimeseries.indexPattern.timeRange.lastValue": "最終値",
"visTypeTimeseries.indexPattern.timeRange.selectTimeRange": "選択してください",
"visTypeTimeseries.indexPattern.сoarse": "粗い",
"visTypeTimeseries.indexPatternSelect.createIndexPatternText": "インデックスパターンを作成",
"visTypeTimeseries.indexPatternSelect.defaultIndexPatternText": "デフォルトのインデックスパターンが使用されています。",
"visTypeTimeseries.indexPatternSelect.label": "インデックスパターン",
"visTypeTimeseries.indexPatternSelect.queryAllIndexesText": "すべてのインデックスにクエリを実行するには * を使用します",
"visTypeTimeseries.indexPatternSelect.switchModePopover.areaLabel": "インデックスパターン選択モードを構成",
"visTypeTimeseries.indexPatternSelect.switchModePopover.title": "インデックスパターン選択モード",
"visTypeTimeseries.kbnVisTypes.metricsDescription": "時系列データの高度な分析を実行します。",
"visTypeTimeseries.kbnVisTypes.metricsTitle": "TSVB",
"visTypeTimeseries.lastValueModeIndicator.lastBucketDate": "バケット:{lastBucketDate}",
Expand Down Expand Up @@ -5321,6 +5327,7 @@
"visTypeTimeseries.seriesConfig.ignoreGlobalFilterLabel": "グローバルフィルターを無視しますか?",
"visTypeTimeseries.seriesConfig.missingSeriesComponentDescription": "パネルタイプ {panelType} の数列コンポーネントが欠けています",
"visTypeTimeseries.seriesConfig.offsetSeriesTimeLabel": "数列の時間を(1m, 1h, 1w, 1d)でオフセット",
"visTypeTimeseries.seriesConfig.overrideIndexPatternLabel": "インデックスパターンを上書きしますか?",
"visTypeTimeseries.seriesConfig.templateHelpText": "eg. {templateExample}",
"visTypeTimeseries.seriesConfig.templateLabel": "テンプレート",
"visTypeTimeseries.sort.dragToSortAriaLabel": "ドラッグして並べ替えます",
Expand Down Expand Up @@ -5451,6 +5458,7 @@
"visTypeTimeseries.timeseries.optionsTab.styleLabel": "スタイル",
"visTypeTimeseries.timeseries.optionsTab.tooltipMode": "ツールチップ",
"visTypeTimeseries.timeseries.optionsTab.truncateLegendLabel": "凡例を切り捨てますか?",
"visTypeTimeseries.timeSeries.overrideIndexPatternLabel": "インデックスパターンを上書きしますか?",
"visTypeTimeseries.timeSeries.percentLabel": "パーセント",
"visTypeTimeseries.timeseries.positionOptions.leftLabel": "左",
"visTypeTimeseries.timeseries.positionOptions.rightLabel": "右",
Expand Down Expand Up @@ -5515,8 +5523,9 @@
"visTypeTimeseries.visEditorVisualization.changesHaveNotBeenAppliedMessage": "ビジュアライゼーションへの変更が適用されました。",
"visTypeTimeseries.visEditorVisualization.changesSuccessfullyAppliedMessage": "最新の変更が適用されました。",
"visTypeTimeseries.visEditorVisualization.changesWillBeAutomaticallyAppliedMessage": "変更が自動的に適用されます。",
"visTypeTimeseries.visEditorVisualization.dataViewMode.dismissNoticeButtonText": "閉じる",
"visTypeTimeseries.visEditorVisualization.dataViewMode.link": "確認してください。",
"visTypeTimeseries.visEditorVisualization.indexPatternMode.dismissNoticeButtonText": "閉じる",
"visTypeTimeseries.visEditorVisualization.indexPatternMode.link": "確認してください。",
"visTypeTimeseries.visEditorVisualization.indexPatternMode.notificationTitle": "TSVBはインデックスパターンをサポートします",
"visTypeTimeseries.visPicker.gaugeLabel": "ゲージ",
"visTypeTimeseries.visPicker.metricLabel": "メトリック",
"visTypeTimeseries.visPicker.tableLabel": "表",
Expand Down
13 changes: 11 additions & 2 deletions x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -5236,6 +5236,12 @@
"visTypeTimeseries.indexPattern.timeRange.lastValue": "最后值",
"visTypeTimeseries.indexPattern.timeRange.selectTimeRange": "选择",
"visTypeTimeseries.indexPattern.сoarse": "粗糙",
"visTypeTimeseries.indexPatternSelect.createIndexPatternText": "创建索引模式",
"visTypeTimeseries.indexPatternSelect.defaultIndexPatternText": "将使用默认索引模式。",
"visTypeTimeseries.indexPatternSelect.label": "索引模式",
"visTypeTimeseries.indexPatternSelect.queryAllIndexesText": "要查询所有索引,请使用 *",
"visTypeTimeseries.indexPatternSelect.switchModePopover.areaLabel": "配置索引模式选择模式",
"visTypeTimeseries.indexPatternSelect.switchModePopover.title": "索引模式选择模式",
"visTypeTimeseries.kbnVisTypes.metricsDescription": "对时间序列数据执行高级分析。",
"visTypeTimeseries.kbnVisTypes.metricsTitle": "TSVB",
"visTypeTimeseries.lastValueModeIndicator.lastBucketDate": "存储桶:{lastBucketDate}",
Expand Down Expand Up @@ -5365,6 +5371,7 @@
"visTypeTimeseries.seriesConfig.ignoreGlobalFilterLabel": "忽略全局筛选?",
"visTypeTimeseries.seriesConfig.missingSeriesComponentDescription": "以下面板类型缺失序列组件:{panelType}",
"visTypeTimeseries.seriesConfig.offsetSeriesTimeLabel": "将序列时间偏移(1m、1h、1w、1d)",
"visTypeTimeseries.seriesConfig.overrideIndexPatternLabel": "覆盖索引模式?",
"visTypeTimeseries.seriesConfig.templateHelpText": "例如 {templateExample}",
"visTypeTimeseries.seriesConfig.templateLabel": "模板",
"visTypeTimeseries.sort.dragToSortAriaLabel": "拖动以排序",
Expand Down Expand Up @@ -5495,6 +5502,7 @@
"visTypeTimeseries.timeseries.optionsTab.styleLabel": "样式",
"visTypeTimeseries.timeseries.optionsTab.tooltipMode": "工具提示",
"visTypeTimeseries.timeseries.optionsTab.truncateLegendLabel": "截断图例?",
"visTypeTimeseries.timeSeries.overrideIndexPatternLabel": "覆盖索引模式?",
"visTypeTimeseries.timeSeries.percentLabel": "百分比",
"visTypeTimeseries.timeseries.positionOptions.leftLabel": "左",
"visTypeTimeseries.timeseries.positionOptions.rightLabel": "右",
Expand Down Expand Up @@ -5559,8 +5567,9 @@
"visTypeTimeseries.visEditorVisualization.changesHaveNotBeenAppliedMessage": "尚未应用对此可视化的更改。",
"visTypeTimeseries.visEditorVisualization.changesSuccessfullyAppliedMessage": "已应用最新更改。",
"visTypeTimeseries.visEditorVisualization.changesWillBeAutomaticallyAppliedMessage": "将自动应用更改。",
"visTypeTimeseries.visEditorVisualization.dataViewMode.dismissNoticeButtonText": "关闭",
"visTypeTimeseries.visEditorVisualization.dataViewMode.link": "请查看。",
"visTypeTimeseries.visEditorVisualization.indexPatternMode.dismissNoticeButtonText": "关闭",
"visTypeTimeseries.visEditorVisualization.indexPatternMode.link": "请查看。",
"visTypeTimeseries.visEditorVisualization.indexPatternMode.notificationTitle": "TSVB 现在支持索引模式",
"visTypeTimeseries.visPicker.gaugeLabel": "仪表盘",
"visTypeTimeseries.visPicker.metricLabel": "指标",
"visTypeTimeseries.visPicker.tableLabel": "表",
Expand Down

0 comments on commit 2e6ce13

Please sign in to comment.