From 43c78e42f76f0468382e252d38e541a771e59c96 Mon Sep 17 00:00:00 2001 From: Ramakrishna Chilaka Date: Thu, 11 Jul 2024 10:53:15 +0530 Subject: [PATCH] added check for checking available plugins on a datasource Signed-off-by: Ramakrishna Chilaka --- public/pages/Main/Main.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/pages/Main/Main.tsx b/public/pages/Main/Main.tsx index afa421113..73498d603 100644 --- a/public/pages/Main/Main.tsx +++ b/public/pages/Main/Main.tsx @@ -262,7 +262,11 @@ export default class Main extends Component { dataSourceFilterFn = (dataSource: SavedObject) => { const engineVersion = dataSource?.attributes?.dataSourceVersion || ""; - return semver.satisfies(engineVersion, pluginManifest.supportedOSDataSourceVersions); + const availablePlugins = dataSource?.attributes?.installedPlugins || []; + return ( + semver.satisfies(engineVersion, pluginManifest.supportedOSDataSourceVersions) && + pluginManifest.requiredOSDataSourcePlugins.every((plugin) => availablePlugins.includes(plugin)) + ); }; render() {