Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UXE-6335] feat: sort default by timestamp #2204

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/helpers/convert-date.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const convertValueToDate = (value) => {
day: 'numeric',
hour: '2-digit',
minute: '2-digit',
second: '2-digit',
hour12: true
}
return date.toLocaleString('en-US', options)
Expand Down
2 changes: 1 addition & 1 deletion src/tests/helpers/convert-date.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { localeMock } from '../utils/localeMock'
describe('convertDate', () => {
it('should convert a given value to a date string in a specific format', () => {
const value = '2022-01-01T00:00:00'
const expectedDate = 'January 1, 2022 at 12:00 AM'
const expectedDate = 'January 1, 2022 at 12:00:00 AM'

expect(convertValueToDate(value)).toBe(expectedDate)
})
Expand Down
26 changes: 13 additions & 13 deletions src/tests/modules/real-time-events/constants/tabs-events.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,48 +61,48 @@ describe('RealTimeEventsModule', () => {
it('should have the correct columns for each tab', () => {
const expectedColumns = {
httpRequests: [
'tsFormat',
'configurationId',
'host',
'requestUri',
'requestMethod',
'status',
'tsFormat'
'requestUri'
],
edgeFunctions: [
'tsFormat',
'configurationId',
'functionLanguage',
'edgeFunctionsInitiatorTypeList',
'edgeFunctionsList',
'edgeFunctionsTime',
'tsFormat'
'edgeFunctionsTime'
],
edgeFunctionsConsole: [
'tsFormat',
'configurationId',
'functionId',
'lineSource',
'level',
'line',
'tsFormat'
'line'
],
imageProcessor: [
'tsFormat',
'configurationId',
'host',
'requestUri',
'status',
'bytesSent',
'tsFormat'
'requestUri'
],
tieredCache: [
'tsFormat',
'configurationId',
'host',
'requestUri',
'requestMethod',
'upstreamCacheStatus',
'tsFormat'
'requestUri'
],
edgeDNS: ['level', 'zoneId', 'qtype', 'resolutionType', 'solutionId', 'tsFormat'],
dataStream: ['configurationId', 'jobName', 'endpointType', 'url', 'statusCode', 'tsFormat'],
activityHistory: ['userIp', 'authorName', 'title', 'resourceType', 'resourceId', 'tsFormat']
edgeDNS: ['tsFormat', 'level', 'zoneId', 'qtype', 'resolutionType', 'solutionId'],
dataStream: ['tsFormat', 'configurationId', 'jobName', 'endpointType', 'url', 'statusCode'],
activityHistory: ['tsFormat', 'userIp', 'authorName', 'title', 'resourceType', 'resourceId']
}

Object.entries(TABS_EVENTS).forEach(([tabName, tabData]) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ describe('ActivityHistoryServices', () => {
resourceId: fixtures.activityHistory.resourceId,
userId: fixtures.activityHistory.userId,
ts: fixtures.activityHistory.ts,
tsFormat: 'February 23, 2024 at 06:07 PM'
tsFormat: 'February 23, 2024 at 06:07:25 PM'
}
],
recordsFound: '1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ describe('ActivityHistoryServices', () => {
userId: fixtures.activityHistory.userId,
title: fixtures.activityHistory.title,
comment: fixtures.activityHistory.comment,
ts: 'February 23, 2024 at 06:07 PM'
ts: 'February 23, 2024 at 06:07:25 PM'
})
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ describe('DataStreamingServices', () => {
dataStreamed: fixtures.dataStreaming.dataStreamed,
source: fixtures.dataStreaming.source,
streamedLines: fixtures.dataStreaming.streamedLines,
tsFormat: 'February 23, 2024 at 06:07 PM'
tsFormat: 'February 23, 2024 at 06:07:25 PM'
}
],
recordsFound: '1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ describe('DataStreamingServices', () => {
source: fixtures.dataStreaming.source,
statusCode: fixtures.dataStreaming.statusCode,
streamedLines: fixtures.dataStreaming.streamedLines,
ts: 'February 23, 2024 at 06:07 PM'
ts: 'February 23, 2024 at 06:07:25 PM'
})
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ describe('edgeDns', () => {
source: fixtures.edgeDns.source,
solutionId: fixtures.edgeDns.solutionId,
ts: fixtures.edgeDns.ts,
tsFormat: 'February 23, 2024 at 06:07 PM',
tsFormat: 'February 23, 2024 at 06:07:25 PM',
uuid: fixtures.edgeDns.uuid,
zoneId: fixtures.edgeDns.zoneId
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ describe('EdgeFunctionsConsoleServices', () => {
lineSource: { content: fixtures.edgeFunctionConsole.lineSource, severity: 'info' },
source: fixtures.edgeFunctionConsole.source,
ts: fixtures.edgeFunctionConsole.ts,
tsFormat: 'February 23, 2024 at 06:07 PM'
tsFormat: 'February 23, 2024 at 06:07:25 PM'
}
],
recordsFound: '1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ describe('EdgeFunctionsConsoleServices', () => {
lineSource: fixtures.edgeFunctionConsole.lineSource,
solutionId: fixtures.edgeFunctionConsole.solutionId,
source: fixtures.edgeFunctionConsole.source,
ts: 'February 23, 2024 at 06:07 PM'
ts: 'February 23, 2024 at 06:07:25 PM'
})
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ describe('EdgeFunctionsServices', () => {
edgeFunctionsList: ['function-1', ' function-2', ' function-3'],
edgeFunctionsTime: `${fixtures.edgeFunction.edgeFunctionsTime}ms`,
ts: fixtures.edgeFunction.ts,
tsFormat: 'February 23, 2024 at 06:07 PM'
tsFormat: 'February 23, 2024 at 06:07:25 PM'
}
],
recordsFound: '1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ describe('DataStreamingServices', () => {
functionLanguage: fixtures.edgeFunction.functionLanguage,
source: fixtures.edgeFunction.source,
virtualHostId: fixtures.edgeFunction.virtualhostid,
ts: 'February 23, 2024 at 06:07 PM'
ts: 'February 23, 2024 at 06:07:25 PM'
})
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ describe('HttpRequestServices', () => {
host: fixtures.httpRequest.host,
requestId: fixtures.httpRequest.requestId,
ts: fixtures.httpRequest.ts,
tsFormat: 'February 23, 2024 at 06:07 PM'
tsFormat: 'February 23, 2024 at 06:07:25 PM'
}
],
recordsFound: '1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ describe('HttpRequestServices', () => {
serverProtocol: undefined,
upstreamCacheStatus: undefined,
tcpinfoRtt: fixtures.httpRequest.tcpinfoRtt,
ts: 'February 23, 2024 at 06:07 PM',
ts: 'February 23, 2024 at 06:07:25 PM',
upstreamAddr: fixtures.httpRequest.upstreamAddr,
upstreamBytesReceived: fixtures.httpRequest.upstreamBytesReceived,
upstreamBytesSent: fixtures.httpRequest.upstreamBytesSent,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ describe('ImageProcessorServices', () => {
httpReferer: fixtures.imageProcessor.httpReferer,
httpUserAgent: fixtures.imageProcessor.httpUserAgent,
ts: fixtures.imageProcessor.ts,
tsFormat: 'February 23, 2024 at 06:07 PM'
tsFormat: 'February 23, 2024 at 06:07:25 PM'
}
],
recordsFound: '1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ describe('ImageProcessorServices', () => {
sslSessionReused: fixtures.imageProcessor.sslSessionReused,
status: fixtures.imageProcessor.status,
tcpinfoRtt: fixtures.imageProcessor.tcpinfoRtt,
ts: 'February 23, 2024 at 06:07 PM',
ts: 'February 23, 2024 at 06:07:25 PM',
upstreamCacheStatus: fixtures.imageProcessor.upstreamCacheStatus,
upstreamResponseTime: fixtures.imageProcessor.upstreamResponseTime,
upstreamResponseTimeStr: fixtures.imageProcessor.upstreamResponseTimeStr,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ describe('tieredCacheServices', () => {
proxyHost: fixtures.tieredCache.proxyHost,
source: fixtures.tieredCache.source,
ts: fixtures.tieredCache.ts,
tsFormat: 'February 23, 2024 at 06:07 PM'
tsFormat: 'February 23, 2024 at 06:07:25 PM'
}
],
recordsFound: '1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ describe('tieredCacheServices', () => {
solution: fixtures.tieredCache.solution,
status: fixtures.tieredCache.status,
tcpinfoRtt: fixtures.tieredCache.tcpinfoRtt,
ts: 'February 23, 2024 at 06:07 PM',
ts: 'February 23, 2024 at 06:07:25 PM',
upstreamBytesReceived: fixtures.tieredCache.upstreamBytesReceived,
upstreamBytesReceivedStr: fixtures.tieredCache.upstreamBytesReceivedStr,
upstreamCacheStatus: fixtures.tieredCache.upstreamCacheStatus,
Expand Down
Loading
Loading