mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Change file data visualizer links to point to new location in home application (#101393)
* Link to home file data visualizer * remove unused import * i18n cleanup * remove unused import from EmptyState * use const * remove ml functional test cases checking for ml_file_data_visualizer * more clean-up of ml_file_data_visualizer * jest snapshot and nav to home page in no_ml_access tests * revert change to functional test dual_privileges_all at everything_space * revert another change to security_and_spaces/tests/catalogue.ts * revert changes to x-pack/test/ui_capabilities/security_only/tests/catalogue.ts Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
cd8cf46ad1
commit
d415357f73
29 changed files with 48 additions and 292 deletions
|
@ -19,6 +19,7 @@
|
|||
"lens"
|
||||
],
|
||||
"requiredBundles": [
|
||||
"home",
|
||||
"kibanaReact",
|
||||
"maps",
|
||||
"esUiShared"
|
||||
|
|
|
@ -19,7 +19,7 @@ import type { SecurityPluginSetup } from '../../security/public';
|
|||
import type { LensPublicStart } from '../../lens/public';
|
||||
import { getFileDataVisualizerComponent, getIndexDataVisualizerComponent } from './api';
|
||||
import { getMaxBytesFormatted } from './application/common/util/get_max_bytes';
|
||||
import { registerHomeAddData } from './register_home';
|
||||
import { registerHomeAddData, registerHomeFeatureCatalogue } from './register_home';
|
||||
|
||||
export interface DataVisualizerSetupDependencies {
|
||||
home?: HomePublicPluginSetup;
|
||||
|
@ -48,6 +48,7 @@ export class DataVisualizerPlugin
|
|||
public setup(core: CoreSetup, plugins: DataVisualizerSetupDependencies) {
|
||||
if (plugins.home) {
|
||||
registerHomeAddData(plugins.home);
|
||||
registerHomeFeatureCatalogue(plugins.home);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -7,14 +7,34 @@
|
|||
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import type { HomePublicPluginSetup } from '../../../../src/plugins/home/public';
|
||||
import { FeatureCatalogueCategory } from '../../../../src/plugins/home/public';
|
||||
import { FileDataVisualizerWrapper } from './lazy_load_bundle/component_wrapper';
|
||||
|
||||
const FILE_DATA_VIS_TAB_ID = 'fileDataViz';
|
||||
|
||||
export function registerHomeAddData(home: HomePublicPluginSetup) {
|
||||
home.addData.registerAddDataTab({
|
||||
id: 'fileDataViz',
|
||||
id: FILE_DATA_VIS_TAB_ID,
|
||||
name: i18n.translate('xpack.dataVisualizer.file.embeddedTabTitle', {
|
||||
defaultMessage: 'Upload file',
|
||||
}),
|
||||
component: FileDataVisualizerWrapper,
|
||||
});
|
||||
}
|
||||
|
||||
export function registerHomeFeatureCatalogue(home: HomePublicPluginSetup) {
|
||||
home.featureCatalogue.register({
|
||||
id: `file_data_visualizer`,
|
||||
title: i18n.translate('xpack.dataVisualizer.title', {
|
||||
defaultMessage: 'Upload a file',
|
||||
}),
|
||||
description: i18n.translate('xpack.dataVisualizer.description', {
|
||||
defaultMessage: 'Import your own CSV, NDJSON, or log file.',
|
||||
}),
|
||||
icon: 'document',
|
||||
path: `/app/home#/tutorial_directory/${FILE_DATA_VIS_TAB_ID}`,
|
||||
showOnHomePage: true,
|
||||
category: FeatureCatalogueCategory.DATA,
|
||||
order: 520,
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue