diff --git a/__tests__/mocks.ts b/__tests__/mocks.ts index bc53e2cd28e..39b87a2d67e 100644 --- a/__tests__/mocks.ts +++ b/__tests__/mocks.ts @@ -24,4 +24,12 @@ jest.mock('@uidotdev/usehooks', () => ({ // Params are implicitly `any` and needed for the tests // eslint-disable-next-line @typescript-eslint/no-explicit-any useLocalStorage: (_: any, intialValue: any) => [intialValue, jest.fn()], + useNetworkState: () => ({ + effectiveType: '4g', + downlink: 10, + rtt: 50, + saveData: false, + online: true, + type: 'wifi', + }), })) diff --git a/libs/domains/service-logs/feature/src/lib/list-service-logs/list-service-logs.tsx b/libs/domains/service-logs/feature/src/lib/list-service-logs/list-service-logs.tsx index 6c212f7e06a..98c4d519229 100644 --- a/libs/domains/service-logs/feature/src/lib/list-service-logs/list-service-logs.tsx +++ b/libs/domains/service-logs/feature/src/lib/list-service-logs/list-service-logs.tsx @@ -175,16 +175,49 @@ export function ListServiceLogs({ environment, clusterId, serviceStatus, environ .with('RUNNING', 'WARNING', () => true) .otherwise(() => false) + function HeaderLogsComponent() { + return ( + + + {match(service) + .with({ serviceType: 'DATABASE' }, (db) => db.mode === 'CONTAINER') + .otherwise(() => true) ? ( + + ) : null} + Go to latest deployment + + + + ) + } + // Temporary solution with `includes` to handle the case where only one log with the message 'No pods found' is received. if (!logs || logs.length === 0 || logs[0].message.includes('No pods found')) { return (
-
- +
+ +
+ +
) @@ -199,36 +232,7 @@ export function ListServiceLogs({ environment, clusterId, serviceStatus, environ >
- - - {match(service) - .with({ serviceType: 'DATABASE' }, (db) => db.mode === 'CONTAINER') - .otherwise(() => true) ? ( - - ) : null} - Go to latest deployment - - - +