Skip to content

Commit e8dd2e8

Browse files
fix: timestamp not adding to result grid for user defined schema (#4207)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Enhanced flexibility in search data handling by dynamically checking for the presence of a timestamp field in user-defined schemas. This improvement allows the system to accurately reflect available data fields, improving overall functionality. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 969c283 commit e8dd2e8

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

web/src/composables/useLogs.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2864,8 +2864,20 @@ const useLogs = () => {
28642864
commonSchemaFields.unshift("dummylabel");
28652865
// searchObj.data.stream.expandGroupRowsFieldCount["common"] = searchObj.data.stream.expandGroupRowsFieldCount["common"] + 1;
28662866
}
2867+
//here we check whether timestamp field is present or not
2868+
//as we append timestamp dynamically for userDefined schema we need to check this
2869+
if(userDefineSchemaSettings.includes(
2870+
store.state.zoConfig?.timestamp_column,
2871+
)){
2872+
searchObj.data.hasSearchDataTimestampField = true;
2873+
2874+
}
2875+
else{
2876+
searchObj.data.hasSearchDataTimestampField = false;
2877+
2878+
}
2879+
28672880

2868-
searchObj.data.hasSearchDataTimestampField = false;
28692881
// check for user defined schema is false then only consider checking new fields from result set
28702882
if (
28712883
searchObj.data.queryResults.hasOwnProperty("hits") &&

0 commit comments

Comments
 (0)