Skip to content

Commit

Permalink
added check for checking available plugins on a datasource
Browse files Browse the repository at this point in the history
  • Loading branch information
RamakrishnaChilaka committed Jul 11, 2024
1 parent dbbaabe commit 9e558de
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion public/pages/Main/Main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,11 @@ export default class Main extends Component<MainProps, MainState> {

dataSourceFilterFn = (dataSource: SavedObject<DataSourceAttributes>) => {
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() {
Expand Down

0 comments on commit 9e558de

Please sign in to comment.