logs: removed unused code (#70758)

This commit is contained in:
Gábor Farkas 2023-06-28 08:35:51 +02:00 committed by GitHub
parent c0b64612f8
commit ebe5e9c2e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -40,7 +40,7 @@ import { BarAlignment, GraphDrawStyle, StackingMode } from '@grafana/schema';
import { ansicolor, colors } from '@grafana/ui';
import { getThemeColor } from 'app/core/utils/colors';
import { Attributes, LogsFrame, parseLogsFrame } from '../features/logs/logsFrame';
import { LogsFrame, parseLogsFrame } from '../features/logs/logsFrame';
import { getLogLevel, getLogLevelFromKey, sortInAscendingOrder } from '../features/logs/utils';
export const LIMIT_LABEL = 'Line limit';
@ -316,16 +316,6 @@ interface LogInfo {
frameLabels?: Labels[];
}
export function attributesToLabels(attributes: Attributes): Labels {
const result: Labels = {};
Object.entries(attributes).forEach(([k, v]) => {
result[k] = typeof v === 'string' ? v : JSON.stringify(v);
});
return result;
}
/**
* Converts dataFrames into LogsModel. This involves merging them into one list, sorting them and computing metadata
* like common labels.