diff --git a/x-pack/plugins/ml/public/file_datavisualizer/components/about_panel/about_panel.js b/x-pack/plugins/ml/public/file_datavisualizer/components/about_panel/about_panel.js
index 261584bb1534b..3eaf51965554a 100644
--- a/x-pack/plugins/ml/public/file_datavisualizer/components/about_panel/about_panel.js
+++ b/x-pack/plugins/ml/public/file_datavisualizer/components/about_panel/about_panel.js
@@ -5,6 +5,7 @@
*/
+import { FormattedMessage } from '@kbn/i18n/react';
import React from 'react';
import {
@@ -36,7 +37,12 @@ export function AboutPanel({ onFilePickerChange }) {
+ }
onChange={files => onFilePickerChange(files)}
className="file-datavisualizer-file-picker"
/>
@@ -58,7 +64,12 @@ export function LoadingPanel() {
- Analyzing data
+
+
+
diff --git a/x-pack/plugins/ml/public/file_datavisualizer/components/about_panel/welcome_content.js b/x-pack/plugins/ml/public/file_datavisualizer/components/about_panel/welcome_content.js
index 59245ac6c8df2..28c616d3e74a6 100644
--- a/x-pack/plugins/ml/public/file_datavisualizer/components/about_panel/welcome_content.js
+++ b/x-pack/plugins/ml/public/file_datavisualizer/components/about_panel/welcome_content.js
@@ -5,6 +5,7 @@
*/
+import { FormattedMessage } from '@kbn/i18n/react';
import React from 'react';
import {
@@ -29,23 +30,41 @@ export function WelcomeContent() {
- Visualize data from a log file
-
+ }
+ />
+ ),
+ }}
/>
- The File Data Visualizer helps you understand the fields and metrics in a log file.
- Upload your file, analyze its data, and then choose whether to import the data into an Elasticsearch index.
+
- The File Data Visualizer supports these file formats:
+
@@ -56,7 +75,10 @@ export function WelcomeContent() {
- Delimited text files, such as CSV and TSV
+
@@ -69,7 +91,10 @@ export function WelcomeContent() {
- Newline-delimited JSON
+
@@ -82,7 +107,10 @@ export function WelcomeContent() {
- Log files with a common format for the timestamp
+
@@ -90,19 +118,29 @@ export function WelcomeContent() {
- You can upload files up to 100 MB.
+
- This feature is experimental. Got feedback? Please create an issue in
-
- GitHub
- .
+
+ GitHub
+
+ )
+ }}
+ />
diff --git a/x-pack/plugins/ml/public/file_datavisualizer/components/analysis_summary/analysis_summary.js b/x-pack/plugins/ml/public/file_datavisualizer/components/analysis_summary/analysis_summary.js
index 4fae23add8d43..47d95775b519d 100644
--- a/x-pack/plugins/ml/public/file_datavisualizer/components/analysis_summary/analysis_summary.js
+++ b/x-pack/plugins/ml/public/file_datavisualizer/components/analysis_summary/analysis_summary.js
@@ -5,6 +5,7 @@
*/
+import { FormattedMessage } from '@kbn/i18n/react';
import React from 'react';
import {
@@ -19,7 +20,12 @@ export function AnalysisSummary({ results }) {
return (
- Summary
+
+
+
@@ -36,7 +42,12 @@ export function AnalysisSummary({ results }) {
function createDisplayItems(results) {
const items = [
{
- title: 'Number of lines analyzed',
+ title: (
+
+ ),
description: results.num_lines_analyzed,
},
// {
@@ -47,18 +58,33 @@ function createDisplayItems(results) {
if (results.format !== undefined) {
items.push({
- title: 'Format',
+ title: (
+
+ ),
description: results.format,
});
if (results.format === 'delimited') {
items.push({
- title: 'Delimiter',
+ title: (
+
+ ),
description: results.delimiter,
});
items.push({
- title: 'Has header row',
+ title: (
+
+ ),
description: `${results.has_header_row}`,
});
@@ -67,22 +93,39 @@ function createDisplayItems(results) {
if (results.grok_pattern !== undefined) {
items.push({
- title: 'Grok pattern',
+ title: (
+
+ ),
description: results.grok_pattern,
});
}
if (results.timestamp_field !== undefined) {
items.push({
- title: 'Time field',
+ title: (
+
+ ),
description: results.timestamp_field,
});
}
if (results.joda_timestamp_formats !== undefined) {
- const s = (results.joda_timestamp_formats.length > 1) ? 's' : '';
items.push({
- title: `Time format${s}`,
+ title: (
+
+ ),
description: results.joda_timestamp_formats.join(', '),
});
}
diff --git a/x-pack/plugins/ml/public/file_datavisualizer/components/bottom_bar/bottom_bar.js b/x-pack/plugins/ml/public/file_datavisualizer/components/bottom_bar/bottom_bar.js
index 744f55dad36b7..2c134ac7b0934 100644
--- a/x-pack/plugins/ml/public/file_datavisualizer/components/bottom_bar/bottom_bar.js
+++ b/x-pack/plugins/ml/public/file_datavisualizer/components/bottom_bar/bottom_bar.js
@@ -5,6 +5,7 @@
*/
+import { FormattedMessage } from '@kbn/i18n/react';
import React from 'react';
import {
@@ -28,7 +29,10 @@ export function BottomBar({ showBar, mode, changeMode, onCancel }) {
fill
onClick={() => changeMode(DATAVISUALIZER_MODE.IMPORT)}
>
- Import
+
@@ -36,7 +40,10 @@ export function BottomBar({ showBar, mode, changeMode, onCancel }) {
color="ghost"
onClick={() => onCancel()}
>
- Cancel
+
@@ -52,7 +59,10 @@ export function BottomBar({ showBar, mode, changeMode, onCancel }) {
color="ghost"
onClick={() => changeMode(DATAVISUALIZER_MODE.READ)}
>
- Back
+
@@ -60,7 +70,10 @@ export function BottomBar({ showBar, mode, changeMode, onCancel }) {
color="ghost"
onClick={() => onCancel()}
>
- Cancel
+
diff --git a/x-pack/plugins/ml/public/file_datavisualizer/components/edit_flyout/__snapshots__/overrides.test.js.snap b/x-pack/plugins/ml/public/file_datavisualizer/components/edit_flyout/__snapshots__/overrides.test.js.snap
index c11317ccad9eb..62b50d9fdbf5b 100644
--- a/x-pack/plugins/ml/public/file_datavisualizer/components/edit_flyout/__snapshots__/overrides.test.js.snap
+++ b/x-pack/plugins/ml/public/file_datavisualizer/components/edit_flyout/__snapshots__/overrides.test.js.snap
@@ -6,7 +6,13 @@ exports[`Overrides render overrides 1`] = `
describedByIds={Array []}
fullWidth={false}
hasEmptyLabelSpace={false}
- label="Data format"
+ label={
+
+ }
>
+ }
>
+ }
>
- Override settings
+
@@ -92,7 +96,10 @@ export class EditFlyout extends Component {
onClick={closeEditFlyout}
flush="left"
>
- Close
+
@@ -101,7 +108,10 @@ export class EditFlyout extends Component {
fill
// isDisabled={(isValidJobDetails === false) || (isValidJobCustomUrls === false)}
>
- Apply
+
diff --git a/x-pack/plugins/ml/public/file_datavisualizer/components/edit_flyout/overrides.js b/x-pack/plugins/ml/public/file_datavisualizer/components/edit_flyout/overrides.js
index 25f60a37cc103..2a1e7b30d8fc0 100644
--- a/x-pack/plugins/ml/public/file_datavisualizer/components/edit_flyout/overrides.js
+++ b/x-pack/plugins/ml/public/file_datavisualizer/components/edit_flyout/overrides.js
@@ -5,6 +5,7 @@
*/
+import { FormattedMessage } from '@kbn/i18n/react';
import React, {
Component,
} from 'react';
@@ -176,7 +177,12 @@ export class Overrides extends Component {
+ }
>
+ }
>
+ }
>
+ }
>
+ }
checked={hasHeaderRow}
onChange={this.onHasHeaderRowChange}
/>
@@ -231,7 +257,12 @@ export class Overrides extends Component {
+ }
checked={shouldTrimFields}
onChange={this.onShouldTrimFieldsChange}
/>
@@ -243,7 +274,12 @@ export class Overrides extends Component {
(this.state.format === 'semi_structured_text') &&
+ }
>
}
+ }
>
+ }
>
- Edit field names
+
+
+
{
diff --git a/x-pack/plugins/ml/public/file_datavisualizer/components/experimental_badge/experimental_badge.js b/x-pack/plugins/ml/public/file_datavisualizer/components/experimental_badge/experimental_badge.js
index 1d45ccd8881fc..3c03d60a13c6e 100644
--- a/x-pack/plugins/ml/public/file_datavisualizer/components/experimental_badge/experimental_badge.js
+++ b/x-pack/plugins/ml/public/file_datavisualizer/components/experimental_badge/experimental_badge.js
@@ -4,6 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
+import { FormattedMessage } from '@kbn/i18n/react';
import React from 'react';
import {
@@ -13,7 +14,16 @@ import {
export function ExperimentalBadge({ tooltipContent }) {
return (
-
+
+ }
+ tooltipContent={tooltipContent}
+ />
);
}
diff --git a/x-pack/plugins/ml/public/file_datavisualizer/components/fields_stats/field_stats_card.js b/x-pack/plugins/ml/public/file_datavisualizer/components/fields_stats/field_stats_card.js
index 3986685d09c3e..570052752d5bb 100644
--- a/x-pack/plugins/ml/public/file_datavisualizer/components/fields_stats/field_stats_card.js
+++ b/x-pack/plugins/ml/public/file_datavisualizer/components/fields_stats/field_stats_card.js
@@ -5,6 +5,7 @@
*/
+import { FormattedMessage } from '@kbn/i18n/react';
import React from 'react';
import {
@@ -38,19 +39,49 @@ export function FieldStatsCard({ field }) {
- {field.count} document{(field.count > 1) ? 's' : ''} ({percent}%)
+
+
- {field.cardinality} distinct value{(field.cardinality > 1) ? 's' : ''}
+
+
{
(field.mean_value) &&
-
min
-
median
-
max
+
+
+
+
+
+
+
+
+
{field.min_value}
@@ -68,7 +99,12 @@ export function FieldStatsCard({ field }) {
-
top values
+
+
+
{field.top_hits.map(({ count, value }) => {
const pcnt = Math.round(((count / field.count) * 100) * 100) / 100;
return (
@@ -93,7 +129,10 @@ export function FieldStatsCard({ field }) {
{(field.count === 0) &&
- No field information available
+
}
diff --git a/x-pack/plugins/ml/public/file_datavisualizer/components/file_contents/file_contents.js b/x-pack/plugins/ml/public/file_datavisualizer/components/file_contents/file_contents.js
index 3df3ac0805df1..916d90ae54a05 100644
--- a/x-pack/plugins/ml/public/file_datavisualizer/components/file_contents/file_contents.js
+++ b/x-pack/plugins/ml/public/file_datavisualizer/components/file_contents/file_contents.js
@@ -5,6 +5,7 @@
*/
+import { FormattedMessage } from '@kbn/i18n/react';
import React from 'react';
import {
@@ -25,10 +26,23 @@ export function FileContents({ data, format, numberOfLines }) {
return (
- File contents
+
+
+
- First {numberOfLines} line{(numberOfLines > 1) ? 's' : ''}
+
+
+
diff --git a/x-pack/plugins/ml/public/file_datavisualizer/file_datavisualizer.js b/x-pack/plugins/ml/public/file_datavisualizer/file_datavisualizer.js
index f59788329da34..8b18e00aef534 100644
--- a/x-pack/plugins/ml/public/file_datavisualizer/file_datavisualizer.js
+++ b/x-pack/plugins/ml/public/file_datavisualizer/file_datavisualizer.js
@@ -4,7 +4,6 @@
* you may not use this file except in compliance with the Elastic License.
*/
-
import { FileDataVisualizerView } from './components/file_datavisualizer_view';
import React from 'react';
diff --git a/x-pack/plugins/ml/public/file_datavisualizer/file_datavisualizer_directive.js b/x-pack/plugins/ml/public/file_datavisualizer/file_datavisualizer_directive.js
index 5ccce13309927..efd4cad7ab488 100644
--- a/x-pack/plugins/ml/public/file_datavisualizer/file_datavisualizer_directive.js
+++ b/x-pack/plugins/ml/public/file_datavisualizer/file_datavisualizer_directive.js
@@ -8,6 +8,8 @@
import 'ngreact';
import { uiModules } from 'ui/modules';
+
+import { injectI18nProvider } from '@kbn/i18n/react';
const module = uiModules.get('apps/ml', ['react']);
import { checkBasicLicense } from 'plugins/ml/license/check_license';
@@ -43,5 +45,5 @@ module.directive('fileDatavisualizerPage', function ($injector) {
const indexPatterns = $injector.get('indexPatterns');
const kibanaConfig = $injector.get('config');
- return reactDirective(FileDataVisualizerPage, undefined, { restrict: 'E' }, { indexPatterns, kibanaConfig });
+ return reactDirective(injectI18nProvider(FileDataVisualizerPage), undefined, { restrict: 'E' }, { indexPatterns, kibanaConfig });
});