+ {field.count > 0 && (
+
+
+
+
+
+
+
+
+
+
+
- {field.top_hits && (
+ {field.median_value && (
-
-
-
-
+
+
+
+
+
- {field.top_hits.map(({ count, value }) => {
- const pcnt = Math.round((count / field.count) * 100 * 100) / 100;
- return (
-
- );
- })}
+
+
+
+
+
)}
-
- )}
- {field.count === 0 && (
-
- )}
-
+
+ {field.top_hits && (
+
+
+
+
+
+
+
+ {field.top_hits.map(({ count, value }) => {
+ const pcnt = Math.round((count / field.count) * 100 * 100) / 100;
+ return (
+
+
+
+ {value}
+
+
+
+
+
+
+
+ {pcnt}%
+
+
+
+ );
+ })}
+
+
+ )}
+
+ )}
+ {field.count === 0 && (
+
+ )}
-
+
);
}
diff --git a/x-pack/legacy/plugins/ml/public/application/datavisualizer/file_based/components/fields_stats/fields_stats.js b/x-pack/legacy/plugins/ml/public/application/datavisualizer/file_based/components/fields_stats/fields_stats.js
index 8dcbc3be89ca0..29051a45d719f 100644
--- a/x-pack/legacy/plugins/ml/public/application/datavisualizer/file_based/components/fields_stats/fields_stats.js
+++ b/x-pack/legacy/plugins/ml/public/application/datavisualizer/file_based/components/fields_stats/fields_stats.js
@@ -6,6 +6,7 @@
import React, { Component } from 'react';
+import { EuiFlexGrid, EuiFlexItem } from '@elastic/eui';
import { FieldStatsCard } from './field_stats_card';
import { getFieldNames } from './get_field_names';
import { ML_JOB_FIELD_TYPES } from '../../../../../../common/constants/field_types';
@@ -29,9 +30,13 @@ export class FieldsStats extends Component {
render() {
return (
- {this.state.fields.map(f => (
-
- ))}
+
+ {this.state.fields.map(f => (
+
+
+
+ ))}
+
);
}
diff --git a/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/actions_panel/actions_panel.tsx b/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/actions_panel/actions_panel.tsx
index f291118140b9a..57c96064a8b97 100644
--- a/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/actions_panel/actions_panel.tsx
+++ b/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/actions_panel/actions_panel.tsx
@@ -8,7 +8,7 @@ import React, { FC, useState } from 'react';
import { FormattedMessage } from '@kbn/i18n/react';
import { i18n } from '@kbn/i18n';
-import { EuiPanel, EuiSpacer, EuiText, EuiTitle, EuiFlexGroup } from '@elastic/eui';
+import { EuiSpacer, EuiText, EuiTitle, EuiFlexGroup } from '@elastic/eui';
import { IndexPattern } from '../../../../../../../../../../src/plugins/data/public';
import { CreateJobLinkCard } from '../../../../components/create_job_link_card';
@@ -38,8 +38,8 @@ export const ActionsPanel: FC
= ({ indexPattern }) => {
// passed the recognizerResults object, and then run the recognizer check which
// controls whether the recognizer section is ultimately displayed.
return (
-
-
+
+
= ({ indexPattern }) => {
-
+
= ({ indexPattern }) => {
-
+
= ({ indexPattern }) => {
onClick={openAdvancedJobWizard}
href={`#/jobs/new_job/advanced?index=${indexPattern}`}
/>
-
+
);
};
diff --git a/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/field_data_card/_field_data_card.scss b/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/field_data_card/_field_data_card.scss
index b4fd521f21bec..d517be0a9358d 100644
--- a/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/field_data_card/_field_data_card.scss
+++ b/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/field_data_card/_field_data_card.scss
@@ -1,52 +1,94 @@
.mlFieldDataCard {
height: 420px;
- width: 360px;
+ box-shadow: none;
+ border-color: $euiBorderColor;
// Note the names of these styles need to match the type of the field they are displaying.
.boolean {
- background-color: $euiColorVis5;
+ color: $euiColorVis5;
+ border-color: $euiColorVis5;
+
+ .field-type-icon-container {
+ background-color: rgba($euiColorVis5, 0.5);
+ }
}
.date {
- background-color: $euiColorVis7;
+ color: $euiColorVis7;
+ border-color: $euiColorVis7;
+
+ .field-type-icon-container {
+ background-color: rgba($euiColorVis7, 0.5);
+ }
}
.document_count {
- background-color: $euiColorVis2;
+ color: $euiColorVis2;
+ border-color: $euiColorVis2;
+
+ .field-type-icon-container {
+ background-color: rgba($euiColorVis2, 0.5);
+ }
}
.geo_point {
- background-color: $euiColorVis8;
+ color: $euiColorVis8;
+ border-color: $euiColorVis8;
+
+ .field-type-icon-container {
+ background-color: rgba($euiColorVis8, 0.5);
+ }
}
.ip {
- background-color: $euiColorVis3;
+ color: $euiColorVis3;
+ border-color: $euiColorVis3;
+
+ .field-type-icon-container {
+ background-color: rgba($euiColorVis3, 0.5);
+ }
}
.keyword {
- background-color: $euiColorVis0;
+ color: $euiColorVis0;
+ border-color: $euiColorVis0;
+
+ .field-type-icon-container {
+ background-color: rgba($euiColorVis0, 0.5);
+ }
}
.number {
- background-color: $euiColorVis1;
+ color: $euiColorVis1;
+ border-color: $euiColorVis1;
+
+ .field-type-icon-container {
+ background-color: rgba($euiColorVis1, 0.5);
+ }
}
.text {
- background-color: $euiColorVis9;
+ color: $euiColorVis9;
+ border-color: $euiColorVis9;
+
+ .field-type-icon-container {
+ background-color: rgba($euiColorVis9, 0.5);
+ }
}
.type-other,
.unknown {
- background-color: $euiColorVis6;
- }
+ color: $euiColorVis6;
+ border-color: $euiColorVis6;
- // Use euiPanel styling
- @include euiPanel($selector: '.mlFieldDataCard__content');
+ .field-type-icon-container {
+ background-color: rgba($euiColorVis6, 0.5);
+ }
+ }
.mlFieldDataCard__content {
@include euiFontSizeS;
height: 385px;
- border-radius: 0px 0px $euiBorderRadius $euiBorderRadius;
overflow: hidden;
}
diff --git a/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/field_data_card/content_types/boolean_content.tsx b/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/field_data_card/content_types/boolean_content.tsx
index ac93813df64b5..a85419015fa9b 100644
--- a/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/field_data_card/content_types/boolean_content.tsx
+++ b/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/field_data_card/content_types/boolean_content.tsx
@@ -5,21 +5,20 @@
*/
import React, { FC } from 'react';
-import { EuiFlexGroup, EuiFlexItem, EuiIcon, EuiProgress, EuiSpacer, EuiText } from '@elastic/eui';
+import { EuiIcon, EuiSpacer, EuiText } from '@elastic/eui';
+import { Axis, BarSeries, Chart, Settings } from '@elastic/charts';
import { FormattedMessage } from '@kbn/i18n/react';
import { FieldDataCardProps } from '../field_data_card';
import { roundToDecimalPlace } from '../../../../../formatters/round_to_decimal_place';
-function getPercentLabel(valueCount: number, totalCount: number): string {
- if (valueCount === 0) {
+function getPercentLabel(value: number): string {
+ if (value === 0) {
return '0%';
}
-
- const percent = (100 * valueCount) / totalCount;
- if (percent >= 0.1) {
- return `${roundToDecimalPlace(percent, 1)}%`;
+ if (value >= 0.1) {
+ return `${value}%`;
} else {
return '< 0.1%';
}
@@ -31,64 +30,74 @@ export const BooleanContent: FC = ({ config }) => {
const { count, sampleCount, trueCount, falseCount } = stats;
const docsPercent = roundToDecimalPlace((count / sampleCount) * 100);
- // TODO - display counts of true / false in an Elastic Charts bar chart (or Pie chart if available).
-
return (
-
-
-
+
+
+
+
+
-
-
-
-
-
- true
-
-
-
-
-
-
-
- {getPercentLabel(trueCount, count)}
-
-
-
-
-
-
-
-
-
- false
-
-
-
-
-
-
-
- {getPercentLabel(falseCount, count)}
-
-
-
+
+
+
+
+
+
+
+
+
+
+
);
diff --git a/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/field_data_card/content_types/date_content.tsx b/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/field_data_card/content_types/date_content.tsx
index 654379052a72b..76d05539c0c82 100644
--- a/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/field_data_card/content_types/date_content.tsx
+++ b/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/field_data_card/content_types/date_content.tsx
@@ -5,7 +5,7 @@
*/
import React, { FC } from 'react';
-import { EuiIcon, EuiSpacer } from '@elastic/eui';
+import { EuiIcon, EuiSpacer, EuiText } from '@elastic/eui';
// @ts-ignore
import { formatDate } from '@elastic/eui/lib/services/format';
@@ -25,19 +25,21 @@ export const DateContent: FC = ({ config }) => {
return (
-
-
-
+
+
+
+
+
-
+
= ({ config }) => {
return (
-
-
-
+
+
+
+
+
-
-
-
+
+
+
+
+
-
+
diff --git a/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/field_data_card/content_types/ip_content.tsx b/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/field_data_card/content_types/ip_content.tsx
index b6b77ce590f9f..eff20520c46e9 100644
--- a/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/field_data_card/content_types/ip_content.tsx
+++ b/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/field_data_card/content_types/ip_content.tsx
@@ -5,7 +5,7 @@
*/
import React, { FC } from 'react';
-import { EuiIcon, EuiSpacer } from '@elastic/eui';
+import { EuiIcon, EuiSpacer, EuiText } from '@elastic/eui';
// @ts-ignore
import { formatDate } from '@elastic/eui/lib/services/format';
@@ -24,30 +24,34 @@ export const IpContent: FC = ({ config }) => {
return (
-
-
-
+
+
+
+
+
-
-
-
+
+
+
+
+
diff --git a/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/field_data_card/content_types/keyword_content.tsx b/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/field_data_card/content_types/keyword_content.tsx
index 0d4bb2331e199..1d679df05d5af 100644
--- a/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/field_data_card/content_types/keyword_content.tsx
+++ b/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/field_data_card/content_types/keyword_content.tsx
@@ -5,7 +5,7 @@
*/
import React, { FC } from 'react';
-import { EuiIcon, EuiSpacer } from '@elastic/eui';
+import { EuiIcon, EuiSpacer, EuiText } from '@elastic/eui';
// @ts-ignore
import { formatDate } from '@elastic/eui/lib/services/format';
@@ -24,40 +24,49 @@ export const KeywordContent: FC
= ({ config }) => {
return (
-
-
-
+
+
+
+
+
-
-
-
+
+
+
+
+
-
-
+
+
+
+
+
+
+
diff --git a/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/field_data_card/content_types/not_in_docs_content.tsx b/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/field_data_card/content_types/not_in_docs_content.tsx
index 34acf3b6c388f..f5e3919d3e099 100644
--- a/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/field_data_card/content_types/not_in_docs_content.tsx
+++ b/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/field_data_card/content_types/not_in_docs_content.tsx
@@ -5,29 +5,23 @@
*/
import React, { FC, Fragment } from 'react';
-import { EuiFlexGroup, EuiFlexItem, EuiIcon, EuiSpacer } from '@elastic/eui';
+import { EuiIcon, EuiSpacer, EuiText } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
export const NotInDocsContent: FC = () => (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
);
diff --git a/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/field_data_card/content_types/number_content.tsx b/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/field_data_card/content_types/number_content.tsx
index 8f415fbc475b3..29be9d2e1e2a4 100644
--- a/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/field_data_card/content_types/number_content.tsx
+++ b/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/field_data_card/content_types/number_content.tsx
@@ -5,7 +5,14 @@
*/
import React, { FC, Fragment, useEffect, useState } from 'react';
-import { EuiFlexGroup, EuiFlexItem, EuiIcon, EuiSelect, EuiSpacer, EuiText } from '@elastic/eui';
+import {
+ EuiButtonGroup,
+ EuiFlexGroup,
+ EuiFlexItem,
+ EuiIcon,
+ EuiSpacer,
+ EuiText,
+} from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
import { i18n } from '@kbn/i18n';
@@ -53,15 +60,15 @@ export const NumberContent: FC = ({ config }) => {
const detailsOptions = [
{
- value: DETAILS_MODE.DISTRIBUTION,
- text: i18n.translate('xpack.ml.fieldDataCard.cardNumber.details.distributionOfValuesLabel', {
- defaultMessage: 'distribution of values',
+ id: DETAILS_MODE.TOP_VALUES,
+ label: i18n.translate('xpack.ml.fieldDataCard.cardNumber.details.topValuesLabel', {
+ defaultMessage: 'Top values',
}),
},
{
- value: DETAILS_MODE.TOP_VALUES,
- text: i18n.translate('xpack.ml.fieldDataCard.cardNumber.details.topValuesLabel', {
- defaultMessage: 'top values',
+ id: DETAILS_MODE.DISTRIBUTION,
+ label: i18n.translate('xpack.ml.fieldDataCard.cardNumber.details.distributionOfValuesLabel', {
+ defaultMessage: 'Distribution',
}),
},
];
@@ -69,49 +76,60 @@ export const NumberContent: FC = ({ config }) => {
return (
-
-
-
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
+
-
+
+
+
-
+
+
+
-
+
+
+
-
@@ -123,30 +141,22 @@ export const NumberContent: FC = ({ config }) => {
-
-
-
-
- setDetailsMode(e.target.value as DETAILS_MODE)}
- style={{ width: '200px' }}
- aria-label={i18n.translate(
- 'xpack.ml.fieldDataCard.cardNumber.selectMetricDetailsDisplayAriaLabel',
- {
- defaultMessage: 'Select display option for metric details',
- }
- )}
- data-test-subj="mlFieldDataCardNumberDetailsSelect"
- />
-
-
-
-
-
+
setDetailsMode(optionId as DETAILS_MODE)}
+ aria-label={i18n.translate(
+ 'xpack.ml.fieldDataCard.cardNumber.selectMetricDetailsDisplayAriaLabel',
+ {
+ defaultMessage: 'Select display option for metric details',
+ }
+ )}
+ data-test-subj="mlFieldDataCardNumberDetailsSelect"
+ isFullWidth={true}
+ buttonSize="compressed"
+ />
+
{detailsMode === DETAILS_MODE.DISTRIBUTION && (
@@ -175,7 +185,6 @@ export const NumberContent: FC = ({ config }) => {
)}
-
{detailsMode === DETAILS_MODE.TOP_VALUES && (
diff --git a/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/field_data_card/content_types/other_content.tsx b/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/field_data_card/content_types/other_content.tsx
index 79f2ec9509d3f..a7b48325b9651 100644
--- a/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/field_data_card/content_types/other_content.tsx
+++ b/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/field_data_card/content_types/other_content.tsx
@@ -36,30 +36,34 @@ export const OtherContent: FC = ({ config }) => {
-
-
-
+
+
+
+
+
-
-
-
+
+
+
+
+
)}
diff --git a/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/field_data_card/examples_list/examples_list.tsx b/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/field_data_card/examples_list/examples_list.tsx
index d4a662a3a6dab..0bf911c1edf86 100644
--- a/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/field_data_card/examples_list/examples_list.tsx
+++ b/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/field_data_card/examples_list/examples_list.tsx
@@ -27,14 +27,16 @@ export const ExamplesList: FC = ({ examples }) => {
return (
-
-
+
+
+
+
{examplesContent}
diff --git a/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/field_data_card/field_data_card.tsx b/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/field_data_card/field_data_card.tsx
index a86640d0fb9b9..0973bf1476f38 100644
--- a/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/field_data_card/field_data_card.tsx
+++ b/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/field_data_card/field_data_card.tsx
@@ -4,6 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
+import { EuiPanel } from '@elastic/eui';
import React, { FC } from 'react';
import { ML_JOB_FIELD_TYPES } from '../../../../../../common/constants/field_types';
@@ -30,11 +31,7 @@ export interface FieldDataCardProps {
}
export const FieldDataCard: FC = ({ config }) => {
- const { fieldName, loading, type, existsInDocs, stats } = config;
-
- if (stats === undefined) {
- return null;
- }
+ const { fieldName, loading, type, existsInDocs } = config;
function getCardContent() {
if (existsInDocs === false) {
@@ -73,13 +70,15 @@ export const FieldDataCard: FC = ({ config }) => {
}
return (
-
-
-
-
- {loading === true ? : getCardContent()}
-
+
+
+
+ {loading === true ? : getCardContent()}
-
+
);
};
diff --git a/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/field_data_card/top_values/top_values.tsx b/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/field_data_card/top_values/top_values.tsx
index fdd64bc725ec0..6ba3322f54c1a 100644
--- a/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/field_data_card/top_values/top_values.tsx
+++ b/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/field_data_card/top_values/top_values.tsx
@@ -50,16 +50,16 @@ export const TopValues: FC
= ({ stats, fieldFormat, barColor }) => {
-
+
{kibanaFieldFormat(value.key, fieldFormat)}
-
+
-
+
{getPercentLabel(value.doc_count, progressBarMax)}
diff --git a/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/fields_panel/fields_panel.tsx b/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/fields_panel/fields_panel.tsx
index 8b060ec9f551b..5036a7d44aa8c 100644
--- a/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/fields_panel/fields_panel.tsx
+++ b/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/fields_panel/fields_panel.tsx
@@ -7,15 +7,17 @@
import React, { FC } from 'react';
import {
- EuiCheckbox,
+ EuiBadge,
EuiFlexGrid,
EuiFlexGroup,
EuiFlexItem,
- EuiPanel,
// @ts-ignore
EuiSearchBar,
EuiSpacer,
+ EuiSwitch,
+ EuiText,
EuiTitle,
+ EuiToolTip,
} from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
@@ -78,51 +80,62 @@ export const FieldsPanel: FC = ({
}
return (
-
-
- {title}
-
-
-
-
-
- {showAllFields === true ? (
- {fieldVisConfigs.length},
- populatedFieldCount,
- wrappedPopulatedFieldCount: {populatedFieldCount},
- }}
- />
- ) : (
- {fieldVisConfigs.length},
- wrappedTotalFieldCount: {totalFieldCount},
- }}
- />
+
+
+
+
+
+
+ {title}
+
+
+
+
+ }
+ >
+
+ {populatedFieldCount}
+
+
+
+
+
+ {totalFieldCount},
+ }}
+ />
+
+
+ {populatedFieldCount < totalFieldCount && (
+
+
+
)}
-
+
- {populatedFieldCount < totalFieldCount && (
-
-
-
- )}
+
= ({
box={{
placeholder: i18n.translate(
'xpack.ml.datavisualizer.fieldsPanel.filterFieldsPlaceholder',
- {
- defaultMessage: 'filter',
- }
+ { defaultMessage: 'Filter {type}', values: { type: title } }
),
}}
onChange={onSearchBarChange}
@@ -156,14 +167,19 @@ export const FieldsPanel: FC = ({
-
+
- {fieldVisConfigs.map((visConfig, i) => (
-
-
-
- ))}
+ {fieldVisConfigs
+ .filter(({ stats }) => stats !== undefined)
+ .map((visConfig, i) => (
+
+
+
+ ))}
-
+
);
};
diff --git a/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/search_panel/search_panel.tsx b/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/search_panel/search_panel.tsx
index 180fd2f103f2c..53125f00c590e 100644
--- a/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/search_panel/search_panel.tsx
+++ b/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/components/search_panel/search_panel.tsx
@@ -13,9 +13,8 @@ import {
EuiForm,
EuiFormRow,
EuiIconTip,
- EuiPanel,
- EuiSelect,
- EuiSpacer,
+ EuiSuperSelect,
+ EuiText,
} from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
@@ -41,6 +40,25 @@ interface Props {
totalCount: number;
}
+const searchSizeOptions = [1000, 5000, 10000, 100000, -1].map(v => {
+ return {
+ value: String(v),
+ inputDisplay:
+ v > 0 ? (
+ {v} }}
+ />
+ ) : (
+
+ ),
+ };
+});
+
export const SearchPanel: FC = ({
indexPattern,
searchString,
@@ -52,94 +70,81 @@ export const SearchPanel: FC = ({
setSamplerShardSize,
totalCount,
}) => {
- const searchAllOptionText = i18n.translate('xpack.ml.datavisualizer.searchPanel.allOptionLabel', {
- defaultMessage: 'all',
- });
-
- const searchSizeOptions = [
- { value: '1000', text: '1000' },
- { value: '5000', text: '5000' },
- { value: '10000', text: '10000' },
- { value: '100000', text: '100000' },
- { value: '-1', text: searchAllOptionText },
- ];
-
const searchHandler = (d: Record) => {
setSearchQuery(d.filterQuery);
};
return (
-
- {searchQueryLanguage === SEARCH_QUERY_LANGUAGE.KUERY ? (
-
- ) : (
-
-
-
-
-
- )}
-
-
-
-
-
-
- setSamplerShardSize(+e.target.value)}
- aria-label={i18n.translate('xpack.ml.datavisualizer.searchPanel.sampleSizeAriaLabel', {
- defaultMessage: 'Select number of documents to sample',
- })}
- data-test-subj="mlDataVisualizerShardSizeSelect"
+
+
+ {searchQueryLanguage === SEARCH_QUERY_LANGUAGE.KUERY ? (
+
-
-
-
- {totalCount}
- ),
- totalCount,
- }}
+ ) : (
+
+
+
+
+
+ )}
+
+
+
+
+
+ setSamplerShardSize(+value)}
+ aria-label={i18n.translate(
+ 'xpack.ml.datavisualizer.searchPanel.sampleSizeAriaLabel',
+ {
+ defaultMessage: 'Select number of documents to sample',
+ }
+ )}
+ data-test-subj="mlDataVisualizerShardSizeSelect"
+ />
+
+
+
-
-
-
-
+
+
+
+
+ {totalCount},
+ }}
/>
-
-
-
+
+
+
+
);
};
diff --git a/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/page.tsx b/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/page.tsx
index 99df9fcdb60a2..68856eb42973b 100644
--- a/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/page.tsx
+++ b/x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based/page.tsx
@@ -13,11 +13,13 @@ import { timefilter } from 'ui/timefilter';
import {
EuiFlexGroup,
EuiFlexItem,
+ EuiHorizontalRule,
EuiPage,
EuiPageBody,
EuiPageContentBody,
EuiPageContentHeader,
EuiPageContentHeaderSection,
+ EuiPanel,
EuiSpacer,
EuiTitle,
} from '@elastic/eui';
@@ -585,84 +587,96 @@ export const Page: FC = () => {
setNonMetricConfigs(configs);
}
+ const wizardPanelWidth = '280px';
+
return (
-
-
-
- {currentIndexPattern.title}
-
-
- {currentIndexPattern.timeFieldName !== undefined && (
-
-
-
- )}
-
+
+
+
+
+
+ {currentIndexPattern.title}
+
+
+ {currentIndexPattern.timeFieldName !== undefined && (
+
+
+
+ )}
+
+
+
+
-
-
-
-
- {totalMetricFieldCount > 0 && (
-
-
-
-
- )}
-
-
-
+
+
+
+
+
+ {totalMetricFieldCount > 0 && (
+
+
+
+
+ )}
+
+
+
+
{showActionsPanel === true && (
-
+
)}
diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json
index 36c3d4a6c1805..ca60119a826f2 100644
--- a/x-pack/plugins/translations/translations/ja-JP.json
+++ b/x-pack/plugins/translations/translations/ja-JP.json
@@ -7782,10 +7782,7 @@
"xpack.ml.datavisualizer.actionsPanel.createJobTitle": "ジョブの作成",
"xpack.ml.datavisualizer.actionsPanel.selectKnownConfigurationDescription": "認識されたデータの既知の構成を選択します:",
"xpack.ml.datavisualizer.dataLoader.internalServerErrorMessage": "インデックス {index} のデータの読み込み中にエラーが発生。{message}。リクエストがタイムアウトした可能性があります。小さなサンプルサイズを使うか、時間範囲を狭めてみてください。",
- "xpack.ml.datavisualizer.fieldsPanel.fieldsCountDescription": "ドキュメントに {wrappedCardsCount} {cardsCount, plural, one {個のフィールドが存在します} other {個のフィールドが存在します}} (合計 {wrappedTotalFieldCount} 個)",
- "xpack.ml.datavisualizer.fieldsPanel.filterFieldsPlaceholder": "フィルター",
"xpack.ml.datavisualizer.fieldsPanel.searchBarError": "検索の実行中にエラーが発生。{message}。",
- "xpack.ml.datavisualizer.fieldsPanel.showAllCountDescription": "{wrappedCardsCount} {cardsCount, plural, one {field} other {fields}} ({wrappedPopulatedFieldCount} {populatedFieldCount, plural, one {exists} other {exist}}ドキュメントに)",
"xpack.ml.datavisualizer.fieldsPanel.showEmptyFieldsLabel": "空のフィールドを表示",
"xpack.ml.datavisualizer.fieldTypesSelect.allFieldsTypeOptionLabel": "すべてのフィールドタイプ",
"xpack.ml.datavisualizer.fieldTypesSelect.selectAriaLabel": "表示するフィールドタイプを選択してください",
@@ -7795,11 +7792,9 @@
"xpack.ml.datavisualizer.page.fieldsPanelTitle": "フィールド",
"xpack.ml.datavisualizer.page.metricsPanelTitle": "メトリック",
"xpack.ml.datavisualizer.searchPanel.allOptionLabel": "すべて",
- "xpack.ml.datavisualizer.searchPanel.documentsPerShardLabel": "合計 {wrappedTotalCount} {totalCount, plural, one {document} other {documents}}からのシャードごとのドキュメント数",
"xpack.ml.datavisualizer.searchPanel.kqlEditOnlyLabel": "現在 KQAL で保存された検索のみ編集できます。",
"xpack.ml.datavisualizer.searchPanel.queryBarPlaceholder": "小さいサンプルサイズを選択することで、クエリの実行時間を短縮しクラスターへの負荷を軽減できます。",
"xpack.ml.datavisualizer.searchPanel.queryBarPlaceholderText": "検索… (例: status:200 AND extension:\"PHP\")",
- "xpack.ml.datavisualizer.searchPanel.sampleLabel": "サンプル",
"xpack.ml.datavisualizer.searchPanel.sampleSizeAriaLabel": "サンプリングするドキュメント数を選択してください",
"xpack.ml.datavisualizer.selector.dataVisualizerDescription": "機械学習データビジュアライザーツールは、ログファイルのメトリックとフィールド、または既存の Elasticsearch インデックスを分析し、データの理解を助けます。",
"xpack.ml.datavisualizer.selector.dataVisualizerTitle": "データビジュアライザー",
diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json
index a0c514a89feb0..06c8dcbc16c7b 100644
--- a/x-pack/plugins/translations/translations/zh-CN.json
+++ b/x-pack/plugins/translations/translations/zh-CN.json
@@ -7781,10 +7781,7 @@
"xpack.ml.datavisualizer.actionsPanel.createJobTitle": "创建作业",
"xpack.ml.datavisualizer.actionsPanel.selectKnownConfigurationDescription": "选择已识别数据的已知配置:",
"xpack.ml.datavisualizer.dataLoader.internalServerErrorMessage": "加载索引 {index} 中的数据时出错。{message}。请求可能已超时。请尝试使用较小的样例大小或缩小时间范围。",
- "xpack.ml.datavisualizer.fieldsPanel.fieldsCountDescription": "{wrappedCardsCount} {cardsCount, plural, one { 个字段存在} other { 个字段存在}}于文档中(共 {wrappedTotalFieldCount} 个)",
- "xpack.ml.datavisualizer.fieldsPanel.filterFieldsPlaceholder": "筛选",
"xpack.ml.datavisualizer.fieldsPanel.searchBarError": "运行搜索时发生错误。{message}。",
- "xpack.ml.datavisualizer.fieldsPanel.showAllCountDescription": "{wrappedCardsCount} {cardsCount, plural, one { 个字段} other { 个字段}}({wrappedPopulatedFieldCount} {populatedFieldCount, plural, one { 存在} other { 存在}}于文档中)",
"xpack.ml.datavisualizer.fieldsPanel.showEmptyFieldsLabel": "显示空字段",
"xpack.ml.datavisualizer.fieldTypesSelect.allFieldsTypeOptionLabel": "所有字段类型",
"xpack.ml.datavisualizer.fieldTypesSelect.selectAriaLabel": "选择要显示的字段类型",
@@ -7794,11 +7791,9 @@
"xpack.ml.datavisualizer.page.fieldsPanelTitle": "字段",
"xpack.ml.datavisualizer.page.metricsPanelTitle": "指标",
"xpack.ml.datavisualizer.searchPanel.allOptionLabel": "全部",
- "xpack.ml.datavisualizer.searchPanel.documentsPerShardLabel": "每个分片的文档,共 {wrappedTotalCount} {totalCount, plural, one { 个文档 } other { 个文档}}",
"xpack.ml.datavisualizer.searchPanel.kqlEditOnlyLabel": "当前仅可以编辑 KQL 已保存搜索",
"xpack.ml.datavisualizer.searchPanel.queryBarPlaceholder": "选择较小的样例大小将减少查询运行时间和集群上的负载。",
"xpack.ml.datavisualizer.searchPanel.queryBarPlaceholderText": "搜索……(例如,status:200 AND extension:\"PHP\")",
- "xpack.ml.datavisualizer.searchPanel.sampleLabel": "采样",
"xpack.ml.datavisualizer.searchPanel.sampleSizeAriaLabel": "选择要采样的文档数目",
"xpack.ml.datavisualizer.selector.dataVisualizerDescription": "Machine Learning Data Visualizer 工具通过分析日志文件或现有 Elasticsearch 索引中的指标和字段,帮助您理解数据。",
"xpack.ml.datavisualizer.selector.dataVisualizerTitle": "数据可视化工具",