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:
Piotr Jamróz
2023-03-29 13:43:56 +02:00
committed by GitHub
parent 383148bcd1
commit 5c138e16d7
7 changed files with 227 additions and 16 deletions

View File

@@ -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,
};
}