mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-10-12 18:01:30 +08:00
fix: fixed tables view not honouring order by in traces explorer (#6769)
* fix: fixed tables view not honouring order by in traces explorer * fix: fixed order by count not being honoured in table view - trace
This commit is contained in:
parent
5708079c3c
commit
efc8c95d59
@ -572,29 +572,6 @@ export const createTableColumnsFromQuery: CreateTableDataFromQuery = ({
|
||||
a.queryName < b.queryName ? -1 : 1,
|
||||
);
|
||||
|
||||
// the reason we need this is because the filling of values in rows doesn't account for mismatch enteries
|
||||
// in the response. Example : Series A -> [label1, label2] and Series B -> [label2,label1] this isn't accounted for
|
||||
sortedQueryTableData.forEach((q) => {
|
||||
q.series?.forEach((s) => {
|
||||
s.labelsArray?.sort((a, b) =>
|
||||
Object.keys(a)[0] < Object.keys(b)[0] ? -1 : 1,
|
||||
);
|
||||
});
|
||||
q.series?.sort((a, b) => {
|
||||
let labelA = '';
|
||||
let labelB = '';
|
||||
a.labelsArray?.forEach((lab) => {
|
||||
labelA += Object.values(lab)[0];
|
||||
});
|
||||
|
||||
b.labelsArray?.forEach((lab) => {
|
||||
labelB += Object.values(lab)[0];
|
||||
});
|
||||
|
||||
return labelA < labelB ? -1 : 1;
|
||||
});
|
||||
});
|
||||
|
||||
const dynamicColumns = getDynamicColumns(sortedQueryTableData, query);
|
||||
|
||||
const { filledDynamicColumns, rowsLength } = fillColumnsData(
|
||||
|
Loading…
x
Reference in New Issue
Block a user