mirror of
https://github.com/SigNoz/signoz.git
synced 2025-12-19 00:17:00 +00:00
12 lines
340 B
TypeScript
12 lines
340 B
TypeScript
|
|
import { IField } from 'types/api/logs/fields';
|
||
|
|
import { BaseAutocompleteData } from 'types/api/queryBuilder/queryAutocompleteResponse';
|
||
|
|
|
||
|
|
export const convertKeysToColumnFields = (
|
||
|
|
keys: BaseAutocompleteData[],
|
||
|
|
): IField[] =>
|
||
|
|
keys.map((item) => ({
|
||
|
|
dataType: item.dataType as string,
|
||
|
|
name: item.key,
|
||
|
|
type: item.type as string,
|
||
|
|
}));
|