mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Tempo: Tempo/Prometheus links select ds in new tab (cmd + click) (#52319)
* Set tempo/prom ds name when clicking trace links * Updated tests * Removed vars
This commit is contained in:
@@ -578,6 +578,14 @@ const backendSrvWithPrometheus = {
|
||||
}
|
||||
throw new Error('unexpected uid');
|
||||
},
|
||||
getDataSourceSettingsByUid(uid: string) {
|
||||
if (uid === 'prom') {
|
||||
return { name: 'Prometheus' };
|
||||
} else if (uid === 'gdev-tempo') {
|
||||
return { name: 'Tempo' };
|
||||
}
|
||||
return '';
|
||||
},
|
||||
};
|
||||
|
||||
function setupBackendSrv(frame: DataFrame) {
|
||||
@@ -598,7 +606,7 @@ function setupBackendSrv(frame: DataFrame) {
|
||||
|
||||
const defaultSettings: DataSourceInstanceSettings<TempoJsonData> = {
|
||||
id: 0,
|
||||
uid: '0',
|
||||
uid: 'gdev-tempo',
|
||||
type: 'tracing',
|
||||
name: 'tempo',
|
||||
access: 'proxy',
|
||||
@@ -777,7 +785,7 @@ const serviceGraphLinks = [
|
||||
queryType: 'nativeSearch',
|
||||
serviceName: '${__data.fields[0]}',
|
||||
} as TempoQuery,
|
||||
datasourceUid: 'tempo',
|
||||
datasourceUid: 'gdev-tempo',
|
||||
datasourceName: 'Tempo',
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user