Skip to content

Commit d0b1e5d

Browse files
committed
refine OS queries
1 parent 3b3ebb8 commit d0b1e5d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/lib/client/opensearch/opensearch.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ def make_log_result(hit)
236236
source = hit.fetch('_source', {})
237237
cwlogs = source.fetch('cwlogs', {})
238238
merritt = source.fetch('merritt', {})
239-
res['timestamp'] = source.fetch('@timestamp', '')
239+
res['timestamp'] = date_format(source.fetch('@timestamp', ''))
240240
res['record_type'] = merritt.fetch('record_type', '')
241241
res['level'] = merritt.fetch('log_level', '')
242242
res['level'] = source.fetch('event', {}).fetch('json', {}).fetch('log.level', '') if res['level'].empty?
@@ -256,7 +256,7 @@ def make_log_result(hit)
256256
res
257257
end
258258

259-
def log_query_listing(osres, table: log_table)
259+
def log_query_listing(osres, table: UC3OpenSearch::OSClient.log_table)
260260
results = osres.fetch('hits', {}).fetch('hits', []).map do |hit|
261261
make_log_result(hit)
262262
end

0 commit comments

Comments
 (0)