From c824975a164922e7dc5b8695d9d72d1305b34787 Mon Sep 17 00:00:00 2001 From: Ryan Liang Date: Fri, 6 Sep 2024 16:26:05 -0700 Subject: [PATCH 1/2] Add support for rigister plugin during the absence of local cluster Signed-off-by: Ryan Liang --- public/plugin.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/plugin.tsx b/public/plugin.tsx index 5c56bc5f7..4dabd09b6 100644 --- a/public/plugin.tsx +++ b/public/plugin.tsx @@ -169,6 +169,7 @@ export class ObservabilityPlugin constructor(initializerContext: PluginInitializerContext) { this.config = initializerContext.config.get(); } + private mdsFlagStatus: boolean = false; public setup( core: CoreSetup, @@ -184,6 +185,7 @@ export class ObservabilityPlugin }); setupOverviewPage(setupDeps.contentManagement!); + this.mdsFlagStatus = !!setupDeps.dataSource; // redirect legacy notebooks URL to current URL under observability if (window.location.pathname.includes('notebooks-dashboards')) { @@ -459,7 +461,8 @@ export class ObservabilityPlugin return `${type.charAt(0).toUpperCase()}${type.slice(1)}`; }; - // register all s3 datasources + // register all s3 datasources only if mds feature flag is disabled + if (!this.mdsFlagStatus) { const registerDataSources = () => { try { core.http.get(`${DATACONNECTIONS_BASE}`).then((s3DataSources) => { @@ -509,6 +512,7 @@ export class ObservabilityPlugin } else { registerDataSources(); } + } core.http.intercept({ request: catalogRequestIntercept(), From 0f8bf3793e80771cb5b4a9fa098a036f0b154c6e Mon Sep 17 00:00:00 2001 From: Ryan Liang Date: Fri, 6 Sep 2024 16:30:51 -0700 Subject: [PATCH 2/2] Update release note Signed-off-by: Ryan Liang --- release-notes/opensearch-observability.release-notes-2.17.0.0.md | 1 + 1 file changed, 1 insertion(+) diff --git a/release-notes/opensearch-observability.release-notes-2.17.0.0.md b/release-notes/opensearch-observability.release-notes-2.17.0.0.md index 4c2ad031b..4c44dbcfe 100644 --- a/release-notes/opensearch-observability.release-notes-2.17.0.0.md +++ b/release-notes/opensearch-observability.release-notes-2.17.0.0.md @@ -24,6 +24,7 @@ Compatible with OpenSearch and OpenSearch Dashboards version 2.17.0 * [query assist] update api handler to accommodate new ml-commons config response ([#2111](https://github.com/opensearch-project/dashboards-observability/pull/2111)) * Update trace analytics landing page ([#2125](https://github.com/opensearch-project/dashboards-observability/pull/2125)) * [query assist] update ml-commons response schema ([#2124](https://github.com/opensearch-project/dashboards-observability/pull/2124)) +* [MDS] Add support for register data sources during the absence of local cluster ([#2140](https://github.com/opensearch-project/dashboards-observability/pull/2140)) ### Bug Fixes * [Bug] Trace Analytics bug fix for local cluster being rendered ([#2006](https://github.com/opensearch-project/dashboards-observability/pull/2006))