Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
0ffb032
[ML] File datavisualizer initial commit (#22828)
jgowdyelastic Sep 11, 2018
a265611
[ML] Adding file datavisualizer overrides (#23194)
jgowdyelastic Sep 20, 2018
393c76a
[ML] Refactoring override option lists (#23424)
jgowdyelastic Sep 24, 2018
817a0b9
Merge branch 'master' into feature/file-datavisualizer
jgowdyelastic Sep 25, 2018
f0b4de2
Merge branch 'master' into feature/file-datavisualizer
jgowdyelastic Sep 25, 2018
a19e5e9
[ML] Fixing field editing (#23500)
jgowdyelastic Sep 26, 2018
d3f93b3
[ML] Changes to timestamp formats (#23498)
jgowdyelastic Sep 26, 2018
a5228a0
Merge branch 'master' into feature/file-datavisualizer
jgowdyelastic Sep 26, 2018
1f80193
Merge branch 'master' into feature/file-datavisualizer
jgowdyelastic Oct 2, 2018
9ffe1fa
[ML] Allow Datavisualizer use on basic license (#23748)
jgowdyelastic Oct 3, 2018
f3274ba
[ML] Adds new page for choosing file or index based data visualizer (…
peteharverson Oct 4, 2018
66af6be
[ML] Adding license check to datavisualizer landing page (#23809)
jgowdyelastic Oct 4, 2018
df4517d
[ML] Adding ability to upload data to elasticsearch from datavisualiz…
jgowdyelastic Oct 16, 2018
804b801
Merge branch 'master' into feature/file-datavisualizer
jgowdyelastic Oct 17, 2018
dcab861
Merge branch 'master' into feature/file-datavisualizer
jgowdyelastic Oct 17, 2018
965c291
Merge branch 'master' into feature/file-datavisualizer
jgowdyelastic Oct 18, 2018
4b3ac1d
[ML] Adding basic license check when loading privileges (#24173)
jgowdyelastic Oct 18, 2018
890608d
[ML] Adds an About panel to the file data visualizer landing page (#2…
peteharverson Oct 22, 2018
4df3ee8
[ML] Adding better error reporting for reading and importing data (#2…
jgowdyelastic Oct 22, 2018
6a60afd
Merge branch 'master' into feature/file-datavisualizer
jgowdyelastic Oct 22, 2018
43145c5
[ML] Set new index pattern as default one if no default index pattern…
walterra Oct 22, 2018
d15bf73
[ML] Switch file data visualizer to use Papa Parse for CSV parsing (#…
peteharverson Oct 22, 2018
b03faa6
[ML] Fix comment typo.
walterra Oct 23, 2018
5155db2
Merge branch 'master' into feature/file-datavisualizer
jgowdyelastic Oct 23, 2018
7171c02
[ML] Fixes layout of Data Visualizer selector page for IE (#24387)
peteharverson Oct 23, 2018
63a909b
[ML] Adding ability to override various settings when importing data …
jgowdyelastic Oct 23, 2018
5c9fe96
Merge branch 'master' into feature/file-datavisualizer
jgowdyelastic Oct 23, 2018
52f9c35
Merge remote-tracking branch 'upstream/feature/file-datavisualizer' i…
walterra Oct 23, 2018
abcc849
Merge remote-tracking branch 'upstream/master' into ml-file-visualize…
walterra Oct 23, 2018
02e2d7a
Merge remote-tracking branch 'upstream/master' into ml-file-visualize…
walterra Oct 30, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ export class FileDataVisualizerView extends Component {
fileContents={fileContents}
fileSize={fileSize}
indexPatterns={this.props.indexPatterns}
kibanaConfig={this.props.kibanaConfig}
showBottomBar={this.showBottomBar}
hideBottomBar={this.hideBottomBar}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,11 @@ export class ImportView extends Component {
if (success && createIndexPattern) {
const indexPatternName = (indexPattern === '') ? index : indexPattern;

const indexPatternResp = await createKibanaIndexPattern(indexPatternName, this.props.indexPatterns);
const indexPatternResp = await createKibanaIndexPattern(
indexPatternName,
this.props.indexPatterns,
this.props.kibanaConfig,
);
success = indexPatternResp.success;
this.setState({
indexPatternCreatedStatus: indexPatternResp.success ? IMPORT_STATUS.COMPLETE : IMPORT_STATUS.FAILED,
Expand Down Expand Up @@ -429,7 +433,7 @@ export class ImportView extends Component {
}
}

async function createKibanaIndexPattern(indexPatternName, indexPatterns, timeFieldName = DEFAULT_TIME_FIELD) {
async function createKibanaIndexPattern(indexPatternName, indexPatterns, kibanaConfig, timeFieldName = DEFAULT_TIME_FIELD) {
try {
const emptyPattern = await indexPatterns.get();

Expand All @@ -440,6 +444,13 @@ async function createKibanaIndexPattern(indexPatternName, indexPatterns, timeFie
});

const id = await emptyPattern.create();

// check if there's a default index pattern, if not,
// set the newly created one as the default index pattern.
if (!kibanaConfig.get('defaultIndex')) {
await kibanaConfig.set('defaultIndex', id);
}

return {
success: true,
id,
Expand Down Expand Up @@ -505,5 +516,3 @@ function isIndexPatternNameValid(name, indexPatternNames, index) {

return '';
}


Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import { FileDataVisualizerView } from './components/file_datavisualizer_view';

import React from 'react';

export function FileDataVisualizerPage({ indexPatterns }) {
export function FileDataVisualizerPage({ indexPatterns, kibanaConfig }) {
return (
<div className="file-datavisualizer-container">
<FileDataVisualizerView indexPatterns={indexPatterns} />
<FileDataVisualizerView indexPatterns={indexPatterns} kibanaConfig={kibanaConfig} />
</div>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import { FileDataVisualizerPage } from './file_datavisualizer';
module.directive('fileDatavisualizerPage', function ($injector) {
const reactDirective = $injector.get('reactDirective');
const indexPatterns = $injector.get('indexPatterns');
const kibanaConfig = $injector.get('config');

return reactDirective(FileDataVisualizerPage, undefined, { restrict: 'E' }, { indexPatterns });
return reactDirective(FileDataVisualizerPage, undefined, { restrict: 'E' }, { indexPatterns, kibanaConfig });
});