Skip to content

Commit 0714e25

Browse files
Merge pull request #815 from jgbernalp/fix-global-datasource-fallback-0.5
OU-1261: [release-coo-0.5] fix: allow to fallback to global datasource if no local datasource is found
2 parents 230afc3 + 1fa3976 commit 0714e25

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

web/src/components/dashboards/perses/datasource-api.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ export class OcpDatasourceApi implements DatasourceApi {
5555
selector.name,
5656
).then((list) => {
5757
if (!Array.isArray(list) || list.length === 0) {
58-
throw new Error(this.t('No matching datasource found'));
58+
// eslint-disable-next-line no-console
59+
console.warn('No matching local datasource found');
60+
return undefined;
5961
}
6062
const datasource = list[0];
6163
return datasource;

0 commit comments

Comments
 (0)