@axiom-lattice/gateway 2.1.36 → 2.1.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +8 -8
- package/CHANGELOG.md +10 -0
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/src/controllers/metrics-configs.ts +8 -2
package/dist/index.mjs
CHANGED
|
@@ -3383,12 +3383,14 @@ async function getDataSources(request, reply) {
|
|
|
3383
3383
|
}
|
|
3384
3384
|
const semanticConfig = config.config;
|
|
3385
3385
|
const client = new SemanticMetricsClient(semanticConfig);
|
|
3386
|
-
const
|
|
3386
|
+
const allDatasources = await client.getDataSources();
|
|
3387
|
+
const selectedIds = semanticConfig.selectedDataSources || [];
|
|
3388
|
+
const filteredDatasources = selectedIds.length > 0 ? allDatasources.filter((ds) => selectedIds.includes(String(ds.id))) : allDatasources;
|
|
3387
3389
|
return {
|
|
3388
3390
|
success: true,
|
|
3389
3391
|
message: "Data sources retrieved successfully",
|
|
3390
3392
|
data: {
|
|
3391
|
-
datasources
|
|
3393
|
+
datasources: filteredDatasources
|
|
3392
3394
|
}
|
|
3393
3395
|
};
|
|
3394
3396
|
} catch (error) {
|