[ML] Change file data visualizer JSON format label to NDJSON (#24643) (#24714)

* [ML] Change file datavisualizer JSON format label to NDJSON
* [ML] Update edit flyout overrides snapshot
This commit is contained in:
Walter Rafelsberger 2018-10-29 13:42:25 +01:00 committed by GitHub
parent 697235ea2e
commit 31d30f814e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 16 additions and 16 deletions

View file

@ -832,7 +832,7 @@ exports[`mlEnabled 1`] = `
type="button"
>
<FormattedMessage
defaultMessage="Import a JSON, CSV, or log file"
defaultMessage="Import a CSV, NDJSON, or log file"
id="kbn.home.addData.uploadFileLink"
values={Object {}}
/>

View file

@ -229,7 +229,7 @@ const AddDataUi = ({ apmUiEnabled, isNewKibanaInstance, intl, mlEnabled }) => {
>
<FormattedMessage
id="kbn.home.addData.uploadFileLink"
defaultMessage="Import a JSON, CSV, or log file"
defaultMessage="Import a CSV, NDJSON, or log file"
/>
</EuiLink>
</EuiText>

View file

@ -53,7 +53,7 @@ export function WelcomeContent() {
<EuiFlexItem>
<EuiText>
<p>
JSON
Delimited text files, such as CSV and TSV
</p>
</EuiText>
</EuiFlexItem>
@ -66,7 +66,7 @@ export function WelcomeContent() {
<EuiFlexItem>
<EuiText>
<p>
Delimited text files, such as CSV and TSV
Newline-delimited JSON
</p>
</EuiText>
</EuiFlexItem>

View file

@ -12,18 +12,18 @@ exports[`Overrides render overrides 1`] = `
onChange={[Function]}
options={
Array [
Object {
"inputDisplay": <span>
json
</span>,
"value": "json",
},
Object {
"inputDisplay": <span>
delimited
</span>,
"value": "delimited",
},
Object {
"inputDisplay": <span>
ndjson
</span>,
"value": "ndjson",
},
Object {
"inputDisplay": <span>
semi_structured_text

View file

@ -6,8 +6,8 @@
export const FORMAT_OPTIONS = [
'json',
'delimited',
'ndjson',
'semi_structured_text',
'xml',
];

View file

@ -65,7 +65,7 @@ export function createUrlOverrides(overrides, originalSettings) {
}
}
if (formattedOverrides.format === 'json' || originalSettings.format === 'json') {
if (formattedOverrides.format === 'ndjson' || originalSettings.format === 'ndjson') {
formattedOverrides.should_trim_fields = '';
formattedOverrides.has_header_row = '';
formattedOverrides.delimiter = '';

View file

@ -7,7 +7,7 @@
import { CsvImporter } from './csv_importer';
import { SstImporter } from './sst_importer';
import { JsonImporter } from './json_importer';
import { NdjsonImporter } from './ndjson_importer';
export function importerFactory(format, results, settings) {
@ -16,8 +16,8 @@ export function importerFactory(format, results, settings) {
return new CsvImporter(results, settings);
case 'semi_structured_text':
return new SstImporter(results, settings);
case 'json':
return new JsonImporter(results, settings);
case 'ndjson':
return new NdjsonImporter(results, settings);
default:
return;
}

View file

@ -7,7 +7,7 @@
import { Importer } from './importer';
export class JsonImporter extends Importer {
export class NdjsonImporter extends Importer {
constructor(results, settings) {
super(settings);
}