@@ -9,21 +9,20 @@ import {
9
9
createDeleteFieldHeader ,
10
10
createDeleteFieldMessage ,
11
11
createTooltipContent ,
12
- formatTimestamp ,
13
12
formattingBuffer ,
14
13
stringToBuffer
15
14
} from 'uiSrc/utils'
16
15
import { streamDataSelector , deleteStreamEntry } from 'uiSrc/slices/browser/stream'
17
16
import { ITableColumn } from 'uiSrc/components/virtual-table/interfaces'
18
17
import PopoverDelete from 'uiSrc/pages/browser/components/popover-delete/PopoverDelete'
19
- import { DATETIME_FORMATTER_DEFAULT , KeyTypes , TableCellTextAlignment , TEXT_FAILED_CONVENT_FORMATTER , TimezoneOption } from 'uiSrc/constants'
18
+ import { KeyTypes , TableCellTextAlignment , TEXT_FAILED_CONVENT_FORMATTER } from 'uiSrc/constants'
20
19
import { getBasedOnViewTypeEvent , sendEventTelemetry , TelemetryEvent } from 'uiSrc/telemetry'
21
20
import { connectedInstanceSelector } from 'uiSrc/slices/instances/instances'
22
21
import { keysSelector , selectedKeySelector , updateSelectedKeyRefreshTime } from 'uiSrc/slices/browser/keys'
23
22
import { decompressingBuffer } from 'uiSrc/utils/decompressors'
24
23
25
- import { userSettingsConfigSelector } from 'uiSrc/slices/user/user-settings'
26
24
import { FormattedValue } from 'uiSrc/pages/browser/modules/key-details/shared'
25
+ import { FormatedDate } from 'uiSrc/components'
27
26
import { StreamEntryDto } from 'apiSrc/modules/browser/stream/dto'
28
27
import StreamDataView from './StreamDataView'
29
28
import styles from './StreamDataView/styles.module.scss'
@@ -48,7 +47,6 @@ const StreamDataViewWrapper = (props: Props) => {
48
47
const { id : instanceId , compressor = null } = useSelector ( connectedInstanceSelector )
49
48
const { viewType : browserViewType } = useSelector ( keysSelector )
50
49
const { viewFormat : viewFormatProp } = useSelector ( selectedKeySelector )
51
- const config = useSelector ( userSettingsConfigSelector )
52
50
53
51
const dispatch = useDispatch ( )
54
52
@@ -249,18 +247,15 @@ const StreamDataViewWrapper = (props: Props) => {
249
247
render : function Id ( { id } : StreamEntryDto ) {
250
248
const idStr = bufferToString ( id , viewFormat )
251
249
const timestamp = idStr . split ( '-' ) ?. [ 0 ]
252
- const formattedTimestamp = timestamp . length > MAX_FORMAT_LENGTH_STREAM_TIMESTAMP ? '-' : formatTimestamp (
253
- timestamp ,
254
- config ?. dateFormat || DATETIME_FORMATTER_DEFAULT ,
255
- config ?. timezone || TimezoneOption . Local
256
- )
257
250
258
251
return (
259
252
< div >
260
253
{ id . length < MAX_VISIBLE_LENGTH_STREAM_TIMESTAMP && (
261
254
< EuiText color = "subdued" size = "s" style = { { maxWidth : '100%' } } >
262
255
< div className = "streamItem truncateText" style = { { display : 'flex' } } data-testid = { `stream-entry-${ id } -date` } >
263
- { formattedTimestamp }
256
+ { timestamp . length > MAX_FORMAT_LENGTH_STREAM_TIMESTAMP ? '-' : (
257
+ < FormatedDate date = { timestamp } />
258
+ ) }
264
259
</ div >
265
260
</ EuiText >
266
261
) }
0 commit comments