fix: removed timestamp and id from being passed to query from log details drawer

This commit is contained in:
sawhil 2025-04-07 17:50:51 +05:30 committed by Sahil Khan
parent f11b9644cf
commit 073d42c416
3 changed files with 6 additions and 4 deletions

View File

@ -30,13 +30,11 @@ import { ILog } from 'types/api/logs/log';
import { DataTypes } from 'types/api/queryBuilder/queryAutocompleteResponse';
import { ActionItemProps } from './ActionItem';
import { RESTRICTED_FIELDS } from './constant';
import FieldRenderer from './FieldRenderer';
import { TableViewActions } from './TableView/TableViewActions';
import { filterKeyForField, findKeyPath, flattenObject } from './utils';
// Fields which should be restricted from adding it to query
const RESTRICTED_FIELDS = ['timestamp'];
interface TableViewProps {
logData: ILog;
fieldSearchInput: string;

View File

@ -18,6 +18,7 @@ import { useLocation } from 'react-router-dom';
import { DataTypes } from 'types/api/queryBuilder/queryAutocompleteResponse';
import { FORBID_DOM_PURIFY_TAGS } from 'utils/app';
import { RESTRICTED_FIELDS } from '../constant';
import { DataType } from '../TableView';
import {
filterKeyForField,
@ -142,7 +143,7 @@ export function TableViewActions(
<CopyClipboardHOC entityKey={fieldFilterKey} textToCopy={textToCopy}>
{renderFieldContent()}
</CopyClipboardHOC>
{!isListViewPanel && (
{!isListViewPanel && !RESTRICTED_FIELDS.includes(fieldFilterKey) && (
<span className="action-btn">
<Tooltip title="Filter for value">
<Button

View File

@ -2,3 +2,6 @@ export const DROPDOWN_KEY = {
FILTER_IN: 'filterIn',
FILTER_OUT: 'filterOut',
};
// Fields which should be restricted from adding it to query
export const RESTRICTED_FIELDS = ['timestamp', 'id'];