Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions web/src/components/dashboards/perses/datasource-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ export class OcpDatasourceApi implements DatasourceApi {
name,
)}`;
if (dashboard) {
url = `dashboards/${encodeURIComponent(dashboard)}/${url}`;
throw new Error(
'Dashboard level datasources are not supported in OpenShift, please use a project or global level datasource',
);
}
if (project) {
url = `projects/${encodeURIComponent(project)}/${url}`;
Expand Down Expand Up @@ -77,7 +79,7 @@ export class OcpDatasourceApi implements DatasourceApi {
).then((list) => {
if (!Array.isArray(list) || list.length === 0) {
// eslint-disable-next-line no-console
console.warn('No matching local datasource found');
console.warn('No matching global datasource found');
return undefined;
}
const datasource = list[0];
Expand Down