use new api for enum
Summary: Also fixed time column Reviewed By: aigoncharov Differential Revision: D51255567 fbshipit-source-id: 70a708a0e502eeaf1e51b8ace41dc588b9c0543d
This commit is contained in:
committed by
Facebook GitHub Bot
parent
437e67cd7f
commit
9dea899701
@@ -71,23 +71,27 @@ function createColumnConfig(
|
||||
);
|
||||
},
|
||||
powerSearchConfig: {
|
||||
operators: [
|
||||
dataTablePowerSearchOperators.enum_set_is_any_of(logLevelEnumLabels),
|
||||
dataTablePowerSearchOperators.enum_set_is_none_of(logLevelEnumLabels),
|
||||
],
|
||||
type: 'enum',
|
||||
inferEnumOptionsFromData: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
key: 'date',
|
||||
title: 'Time',
|
||||
width: 120,
|
||||
powerSearchConfig: {
|
||||
type: 'dateTime',
|
||||
},
|
||||
},
|
||||
{
|
||||
key: 'pidStr',
|
||||
title: 'PID',
|
||||
width: 60,
|
||||
visible: true,
|
||||
powerSearchConfig: enumPowerSearchConfig,
|
||||
powerSearchConfig: {
|
||||
type: 'enum',
|
||||
inferEnumOptionsFromData: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
key: 'tid',
|
||||
@@ -99,7 +103,10 @@ function createColumnConfig(
|
||||
key: 'tag',
|
||||
title: 'Tag',
|
||||
width: 160,
|
||||
powerSearchConfig: enumPowerSearchConfig,
|
||||
powerSearchConfig: {
|
||||
type: 'enum',
|
||||
inferEnumOptionsFromData: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
key: 'app',
|
||||
@@ -120,15 +127,6 @@ function createColumnConfig(
|
||||
];
|
||||
}
|
||||
|
||||
const enumPowerSearchConfig = {
|
||||
inferEnumOptionsFromData: true,
|
||||
|
||||
operators: [
|
||||
dataTablePowerSearchOperators.enum_set_is_any_of({}),
|
||||
dataTablePowerSearchOperators.enum_set_is_none_of({}),
|
||||
],
|
||||
};
|
||||
|
||||
function getRowStyle(entry: DeviceLogEntry): CSSProperties | undefined {
|
||||
return (logTypes[entry.type]?.style as any) ?? baseRowStyle;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user