mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Tempo: Metrics summary update sorting no values (#74818)
* Update sorting when there is no value * Update test
This commit is contained in:
parent
729f9a01a0
commit
a8a8c9849d
@ -66,6 +66,7 @@ describe('MetricsSummary', () => {
|
|||||||
"url": "",
|
"url": "",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
"noValue": "<no value>",
|
||||||
},
|
},
|
||||||
"name": "span.http.status_code",
|
"name": "span.http.status_code",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@ -90,6 +91,7 @@ describe('MetricsSummary', () => {
|
|||||||
"url": "",
|
"url": "",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
"noValue": "<no value>",
|
||||||
},
|
},
|
||||||
"name": "temperature",
|
"name": "temperature",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -101,7 +101,7 @@ export function createTableFrameFromMetricsSummaryQuery(
|
|||||||
field.values.push(trace[field.name]);
|
field.values.push(trace[field.name]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
frame = sortDataFrame(frame, 0, true);
|
frame = sortDataFrame(frame, 0);
|
||||||
|
|
||||||
return [frame];
|
return [frame];
|
||||||
}
|
}
|
||||||
@ -158,6 +158,7 @@ export const getConfigQuery = (series: Series[], targetQuery: string) => {
|
|||||||
const getConfig = (series: Series, query: string, instanceSettings: DataSourceInstanceSettings) => {
|
const getConfig = (series: Series, query: string, instanceSettings: DataSourceInstanceSettings) => {
|
||||||
const commonConfig = {
|
const commonConfig = {
|
||||||
displayNameFromDS: series.key,
|
displayNameFromDS: series.key,
|
||||||
|
noValue: '<no value>',
|
||||||
links: [
|
links: [
|
||||||
{
|
{
|
||||||
title: 'Query in explore',
|
title: 'Query in explore',
|
||||||
@ -183,7 +184,7 @@ const getConfig = (series: Series, query: string, instanceSettings: DataSourceIn
|
|||||||
return { ...commonConfig };
|
return { ...commonConfig };
|
||||||
};
|
};
|
||||||
|
|
||||||
const NO_VALUE = '<no value>';
|
const NO_VALUE = '';
|
||||||
|
|
||||||
const getMetricValue = (series: Series) => {
|
const getMetricValue = (series: Series) => {
|
||||||
if (!series.value.type) {
|
if (!series.value.type) {
|
||||||
|
Loading…
Reference in New Issue
Block a user