Skip to content

Commit

Permalink
[Enhancement] Deregister dashboards, applications, logs in MDS (#2097)
Browse files Browse the repository at this point in the history
* Deregister plugins in NEO

Signed-off-by: sumukhswamy <[email protected]>

* updated the comment

Signed-off-by: sumukhswamy <[email protected]>

* Deregister plugins in NEO

Signed-off-by: sumukhswamy <[email protected]>

---------

Signed-off-by: sumukhswamy <[email protected]>
Signed-off-by: Sumukh Swamy <[email protected]>
(cherry picked from commit 428cc98)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] committed Aug 28, 2024
1 parent 465661f commit 178113b
Showing 1 changed file with 30 additions and 29 deletions.
59 changes: 30 additions & 29 deletions public/plugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ import {
observabilityNotebookID,
observabilityNotebookPluginOrder,
observabilityNotebookTitle,
observabilityOverviewID,
observabilityOverviewPluginOrder,
observabilityOverviewTitle,
observabilityPanelsID,
observabilityPanelsPluginOrder,
observabilityPanelsTitle,
Expand All @@ -53,12 +56,6 @@ import {
observabilityTracesID,
observabilityTracesPluginOrder,
observabilityTracesTitle,
observabilityGettingStartedID,
observabilityGettingStartedTitle,
observabilityGettingStartedPluginOrder,
observabilityOverviewID,
observabilityOverviewTitle,
observabilityOverviewPluginOrder,
} from '../common/constants/shared';
import { QueryManager } from '../common/query_manager';
import {
Expand Down Expand Up @@ -101,6 +98,7 @@ import { coreRefs } from './framework/core_refs';
import { DataSourcePluggable } from './framework/datasource_pluggables/datasource_pluggable';
import { S3DataSource } from './framework/datasources/s3_datasource';
import './index.scss';
import { registerAllPluginNavGroups } from './plugin_nav';
import DSLService from './services/requests/dsl';
import PPLService from './services/requests/ppl';
import SavedObjects from './services/saved_objects/event_analytics/saved_objects';
Expand All @@ -111,7 +109,6 @@ import {
ObservabilityStart,
SetupDependencies,
} from './types';
import { registerAllPluginNavGroups } from './plugin_nav';

interface PublicConfig {
query_assist: {
Expand Down Expand Up @@ -297,13 +294,15 @@ export class ObservabilityPlugin
mount: appMountWithStartPage('metrics'),
});

core.application.register({
id: observabilityApplicationsID,
title: observabilityApplicationsTitle,
category: OBSERVABILITY_APP_CATEGORIES.observability,
order: observabilityApplicationsPluginOrder,
mount: appMountWithStartPage('applications'),
});
if (!setupDeps.dataSource) {
core.application.register({
id: observabilityApplicationsID,
title: observabilityApplicationsTitle,
category: OBSERVABILITY_APP_CATEGORIES.observability,
order: observabilityApplicationsPluginOrder,
mount: appMountWithStartPage('applications'),
});
}

core.application.register({
id: observabilityIntegrationsID,
Expand Down Expand Up @@ -353,21 +352,23 @@ export class ObservabilityPlugin
order: observabilityTracesPluginOrder,
mount: appMountWithStartPage('traces'),
});
// deprecated in new Nav Groups.
core.application.register({
id: observabilityPanelsID,
title: observabilityPanelsTitle,
category: OBSERVABILITY_APP_CATEGORIES.observability,
order: observabilityPanelsPluginOrder,
mount: appMountWithStartPage('dashboards'),
});
core.application.register({
id: observabilityLogsID,
title: observabilityLogsTitle,
category: OBSERVABILITY_APP_CATEGORIES.observability,
order: observabilityLogsPluginOrder,
mount: appMountWithStartPage('logs'),
});
// deprecated in new Nav Groups and when MDS is enabled.
if (!setupDeps.dataSource) {
core.application.register({
id: observabilityPanelsID,
title: observabilityPanelsTitle,
category: OBSERVABILITY_APP_CATEGORIES.observability,
order: observabilityPanelsPluginOrder,
mount: appMountWithStartPage('dashboards'),
});
core.application.register({
id: observabilityLogsID,
title: observabilityLogsTitle,
category: OBSERVABILITY_APP_CATEGORIES.observability,
order: observabilityLogsPluginOrder,
mount: appMountWithStartPage('logs'),
});
}
}

core.application.register({
Expand Down

0 comments on commit 178113b

Please sign in to comment.