Skip to content

Commit 0ea3428

Browse files
[ML] Moving file data vizualizer to its own plugin (#96408)
* [ML] Moving file data vizualizer to file upload plugin * removing maps plug dependency * fixing imports * small refactor * adding missing endpoints * fixing translations * fxing table controls * fixing types and disabling geo point test * actually disabling geo point test * making endpoints internal * moving UI code to separate plugin * enabling maps integration * cleaning up dependencies * fixing translation ids * moving analyze file endpoint out of file upload plugin * fixing transtations issues * refactor for lazy loading of component * updating limits * updating plugin asciidoc * code clean up * further clean up * adding comment * fixing really obvious CI error * removing commented out include * reenabling geo point test * fixing incorrectly changed import * removing ml from labels and identifiers * renaming function * moving analyse file endpoint to file upload plugin * reverting import path changes * adding esUiShared back in * fixing navigation tabs alignment in basic license * adding key to tab wrapper * reverting test label * further removal of ml references * removing ml label from more identifiers * fixing tests Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
1 parent 12fd623 commit 0ea3428

File tree

219 files changed

+5249
-969
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

219 files changed

+5249
-969
lines changed

docs/developer/plugin-list.asciidoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,10 @@ actitivies.
392392
|The features plugin enhance Kibana with a per-feature privilege system.
393393
394394
395+
|{kib-repo}blob/{branch}/x-pack/plugins/file_data_visualizer[fileDataVisualizer]
396+
|WARNING: Missing README.
397+
398+
395399
|{kib-repo}blob/{branch}/x-pack/plugins/file_upload[fileUpload]
396400
|WARNING: Missing README.
397401

packages/kbn-optimizer/limits.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ pageLoadAssetSize:
106106
indexPatternFieldEditor: 90489
107107
osquery: 107090
108108
fileUpload: 25664
109+
fileDataVisualizer: 27530
109110
banners: 17946
110111
mapsEms: 26072
111112
timelines: 28613

x-pack/.i18nrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"xpack.endpoint": "plugins/endpoint",
2121
"xpack.enterpriseSearch": "plugins/enterprise_search",
2222
"xpack.features": "plugins/features",
23+
"xpack.fileDataVisualizer": "plugins/file_data_visualizer",
2324
"xpack.fileUpload": "plugins/file_upload",
2425
"xpack.globalSearch": ["plugins/global_search"],
2526
"xpack.globalSearchBar": ["plugins/global_search_bar"],
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the Elastic License
4+
* 2.0; you may not use this file except in compliance with the Elastic License
5+
* 2.0.
6+
*/
7+
8+
export const UI_SETTING_MAX_FILE_SIZE = 'fileUpload:maxFileSize';
9+
10+
export const MB = Math.pow(2, 20);
11+
export const MAX_FILE_SIZE = '100MB';
12+
export const MAX_FILE_SIZE_BYTES = 104857600; // 100MB
13+
14+
export const ABSOLUTE_MAX_FILE_SIZE_BYTES = 1073741274; // 1GB
15+
export const FILE_SIZE_DISPLAY_FORMAT = '0,0.[0] b';
16+
17+
// Value to use in the Elasticsearch index mapping meta data to identify the
18+
// index as having been created by the File Data Visualizer.
19+
export const INDEX_META_DATA_CREATED_BY = 'file-data-visualizer';
20+
21+
export const JOB_FIELD_TYPES = {
22+
BOOLEAN: 'boolean',
23+
DATE: 'date',
24+
GEO_POINT: 'geo_point',
25+
GEO_SHAPE: 'geo_shape',
26+
IP: 'ip',
27+
KEYWORD: 'keyword',
28+
NUMBER: 'number',
29+
TEXT: 'text',
30+
UNKNOWN: 'unknown',
31+
} as const;
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@
55
* 2.0.
66
*/
77

8-
export { createUrlOverrides, processResults, readFile, DEFAULT_LINES_TO_SAMPLE } from './utils';
8+
export * from './constants';
9+
export * from './types';
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the Elastic License
4+
* 2.0; you may not use this file except in compliance with the Elastic License
5+
* 2.0.
6+
*/
7+
8+
import { JOB_FIELD_TYPES } from './constants';
9+
10+
export type InputData = any[];
11+
12+
export type JobFieldType = typeof JOB_FIELD_TYPES[keyof typeof JOB_FIELD_TYPES];
13+
14+
export interface DataVisualizerTableState {
15+
pageSize: number;
16+
pageIndex: number;
17+
sortField: string;
18+
sortDirection: string;
19+
visibleFieldTypes: string[];
20+
visibleFieldNames: string[];
21+
showDistributions: boolean;
22+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the Elastic License
4+
* 2.0; you may not use this file except in compliance with the Elastic License
5+
* 2.0.
6+
*/
7+
8+
module.exports = {
9+
preset: '@kbn/test',
10+
rootDir: '../../..',
11+
roots: ['<rootDir>/x-pack/plugins/file_data_visualizer'],
12+
};
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"id": "fileDataVisualizer",
3+
"version": "8.0.0",
4+
"kibanaVersion": "kibana",
5+
"server": true,
6+
"ui": true,
7+
"requiredPlugins": [
8+
"data",
9+
"usageCollection",
10+
"embeddable",
11+
"share",
12+
"discover",
13+
"fileUpload"
14+
],
15+
"optionalPlugins": [
16+
"security",
17+
"maps"
18+
],
19+
"requiredBundles": [
20+
"kibanaReact",
21+
"maps",
22+
"esUiShared"
23+
],
24+
"extraPublicDirs": [
25+
"common"
26+
]
27+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the Elastic License
4+
* 2.0; you may not use this file except in compliance with the Elastic License
5+
* 2.0.
6+
*/
7+
8+
import { lazyLoadModules } from '../lazy_load_bundle';
9+
import { FileDataVisualizer } from '../application';
10+
11+
export async function getFileDataVisualizerComponent(): Promise<typeof FileDataVisualizer> {
12+
const modules = await lazyLoadModules();
13+
return modules.FileDataVisualizer;
14+
}

0 commit comments

Comments
 (0)