mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Logs: Merge Log Volumes by data source name (#65392)
* Merge log volume by data source name * Fix creating response for multiple fallback volumes * Fix unit tests * Hide title if there's only one log volume visible * Make hide title optional * Remove redundant parentheses * Do not use frame.name, so the visualization can pick displayNameFromDS from the field config * Simplify setting aggregated data frame meta data * Update public/app/features/logs/utils.ts Co-authored-by: Giordano Ricci <me@giordanoricci.com> * Fix legend toggling * Ensure limited graph info is shown * Always show the data source name --------- Co-authored-by: Giordano Ricci <me@giordanoricci.com>
This commit is contained in:
@@ -212,13 +212,12 @@ export const getLogsVolumeAbsoluteRange = (
|
||||
return dataFrames[0].meta?.custom?.absoluteRange || defaultRange;
|
||||
};
|
||||
|
||||
export const getLogsVolumeDataSourceInfo = (dataFrames: DataFrame[]): { name: string; refId: string } | null => {
|
||||
export const getLogsVolumeDataSourceInfo = (dataFrames: DataFrame[]): { name: string } | null => {
|
||||
const customMeta = dataFrames[0]?.meta?.custom;
|
||||
|
||||
if (customMeta && customMeta.datasourceName && customMeta.sourceQuery?.refId) {
|
||||
if (customMeta && customMeta.datasourceName) {
|
||||
return {
|
||||
name: customMeta.datasourceName,
|
||||
refId: customMeta.sourceQuery.refId,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user