Tempo: Metrics summary update sorting no values (#74818)

* Update sorting when there is no value

* Update test
This commit is contained in:
Joey 2023-09-13 14:23:17 +01:00 committed by GitHub
parent 729f9a01a0
commit a8a8c9849d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -66,6 +66,7 @@ describe('MetricsSummary', () => {
"url": "",
},
],
"noValue": "<no value>",
},
"name": "span.http.status_code",
"type": "string",
@ -90,6 +91,7 @@ describe('MetricsSummary', () => {
"url": "",
},
],
"noValue": "<no value>",
},
"name": "temperature",
"type": "string",

View File

@ -101,7 +101,7 @@ export function createTableFrameFromMetricsSummaryQuery(
field.values.push(trace[field.name]);
}
}
frame = sortDataFrame(frame, 0, true);
frame = sortDataFrame(frame, 0);
return [frame];
}
@ -158,6 +158,7 @@ export const getConfigQuery = (series: Series[], targetQuery: string) => {
const getConfig = (series: Series, query: string, instanceSettings: DataSourceInstanceSettings) => {
const commonConfig = {
displayNameFromDS: series.key,
noValue: '<no value>',
links: [
{
title: 'Query in explore',
@ -183,7 +184,7 @@ const getConfig = (series: Series, query: string, instanceSettings: DataSourceIn
return { ...commonConfig };
};
const NO_VALUE = '<no value>';
const NO_VALUE = '';
const getMetricValue = (series: Series) => {
if (!series.value.type) {