Commit 71df1573 by Ivana Huckova Committed by GitHub

sort alphabetically unique labels, labels and parsed fields (#29030)

parent e503188b
...@@ -112,7 +112,9 @@ class UnThemedLogDetails extends PureComponent<Props> { ...@@ -112,7 +112,9 @@ class UnThemedLogDetails extends PureComponent<Props> {
</td> </td>
</tr> </tr>
)} )}
{Object.keys(labels).map(key => { {Object.keys(labels)
.sort()
.map(key => {
const value = labels[key]; const value = labels[key];
return ( return (
<LogDetailsRow <LogDetailsRow
...@@ -134,7 +136,7 @@ class UnThemedLogDetails extends PureComponent<Props> { ...@@ -134,7 +136,7 @@ class UnThemedLogDetails extends PureComponent<Props> {
</td> </td>
</tr> </tr>
)} )}
{fields.map(field => { {fields.sort().map(field => {
const { key, value, links, fieldIndex } = field; const { key, value, links, fieldIndex } = field;
return ( return (
<LogDetailsRow <LogDetailsRow
......
...@@ -57,7 +57,7 @@ export const UnThemedLogLabels: FunctionComponent<Props> = ({ labels, theme }) = ...@@ -57,7 +57,7 @@ export const UnThemedLogLabels: FunctionComponent<Props> = ({ labels, theme }) =
return ( return (
<span className={cx([styles.logsLabels])}> <span className={cx([styles.logsLabels])}>
{displayLabels.map(label => { {displayLabels.sort().map(label => {
const value = labels[label]; const value = labels[label];
const tooltip = `${label}: ${value}`; const tooltip = `${label}: ${value}`;
return ( return (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment