Explore: Use compact mode only when targeting Tempo (#113037)

* Explore: Use compact mode only when targeting Tempo

* Fix checking ds type when data source is not in the query object
This commit is contained in:
Piotr Jamróz
2025-10-30 12:55:06 +01:00
committed by GitHub
parent bbfb8268d1
commit 5f2074e84c
+7 -3
View File
@@ -312,16 +312,20 @@ export class Explore extends PureComponent<Props, ExploreState> {
*/
onSplitOpen = (panelType: string) => {
return async (options?: SplitOpenOptions) => {
let compact = true;
let compact = false;
/**
* Temporary fix grafana-clickhouse-datasource as it requires the query editor to be fully rendered to update the query
* Proposed fixes:
* - https://github.com/grafana/clickhouse-datasource/issues/1363 - handle query update in data source
* - https://github.com/grafana/grafana/issues/110868 - allow data links to provide meta info if the link can be handled in compact mode (default to false)
* Update:
* More data source may struggle with this setting: https://github.com/grafana/grafana/issues/112075
* We're making it enabled for tempo only and will try to make it optional for other data sources in the future.
*/
if (options?.queries?.some((q) => q.datasource?.type === 'grafana-clickhouse-datasource')) {
compact = false;
const dsType = getDataSourceSrv().getInstanceSettings({ uid: options?.datasourceUid })?.type;
if (dsType === 'tempo' || options?.queries?.every((q) => q.datasource?.type === 'tempo')) {
compact = true;
}
this.props.splitOpen(options ? { ...options, compact } : options);