mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-03 01:20:38 +08:00
fix: remove duplicate severityText in raw logs
This commit is contained in:
parent
a7e02af8b0
commit
7ddfadfb18
@ -62,8 +62,6 @@ function RawLogView({
|
|||||||
const isDarkMode = useIsDarkMode();
|
const isDarkMode = useIsDarkMode();
|
||||||
const isReadOnlyLog = !isLogsExplorerPage || isReadOnly;
|
const isReadOnlyLog = !isLogsExplorerPage || isReadOnly;
|
||||||
|
|
||||||
const severityText = data.severity_text ? `${data.severity_text} |` : '';
|
|
||||||
|
|
||||||
const logType = getLogIndicatorType(data);
|
const logType = getLogIndicatorType(data);
|
||||||
|
|
||||||
const updatedSelecedFields = useMemo(
|
const updatedSelecedFields = useMemo(
|
||||||
@ -88,17 +86,16 @@ function RawLogView({
|
|||||||
attributesText += ' | ';
|
attributesText += ' | ';
|
||||||
}
|
}
|
||||||
|
|
||||||
const text = useMemo(
|
const text = useMemo(() => {
|
||||||
() =>
|
const date =
|
||||||
typeof data.timestamp === 'string'
|
typeof data.timestamp === 'string'
|
||||||
? `${dayjs(data.timestamp).format(
|
? dayjs(data.timestamp)
|
||||||
'YYYY-MM-DD HH:mm:ss.SSS',
|
: dayjs(data.timestamp / 1e6);
|
||||||
)} | ${attributesText} ${severityText} ${data.body}`
|
|
||||||
: `${dayjs(data.timestamp / 1e6).format(
|
return `${date.format('YYYY-MM-DD HH:mm:ss.SSS')} | ${attributesText} ${
|
||||||
'YYYY-MM-DD HH:mm:ss.SSS',
|
data.body
|
||||||
)} | ${attributesText} ${severityText} ${data.body}`,
|
}`;
|
||||||
[data.timestamp, data.body, severityText, attributesText],
|
}, [data.timestamp, data.body, attributesText]);
|
||||||
);
|
|
||||||
|
|
||||||
const handleClickExpand = useCallback(() => {
|
const handleClickExpand = useCallback(() => {
|
||||||
if (activeContextLog || isReadOnly) return;
|
if (activeContextLog || isReadOnly) return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user