diff --git a/frontend/src/component/application/ApplicationChart.tsx b/frontend/src/component/application/ApplicationChart.tsx index 3223951dfc..6a88e16c2e 100644 --- a/frontend/src/component/application/ApplicationChart.tsx +++ b/frontend/src/component/application/ApplicationChart.tsx @@ -292,14 +292,16 @@ export const ApplicationChart = ({ data }: IApplicationChartProps) => { Last seen: - + {environment.lastSeen && ( + + )} diff --git a/frontend/src/component/application/ApplicationIssues/ApplicationIssues.test.tsx b/frontend/src/component/application/ApplicationIssues/ApplicationIssues.test.tsx index 1a185de7af..debcede200 100644 --- a/frontend/src/component/application/ApplicationIssues/ApplicationIssues.test.tsx +++ b/frontend/src/component/application/ApplicationIssues/ApplicationIssues.test.tsx @@ -13,6 +13,10 @@ test('Display all application issues', async () => { type: 'missingStrategies', items: ['defaultStrategy', 'mainStrategy'], }, + { + type: 'outdatedSdks', + items: ['unleash-client-php:1.13.0'], + }, ]; render(); @@ -24,4 +28,6 @@ test('Display all application issues', async () => { await screen.findByText( `We detected 2 strategy types defined in the SDK that do not exist in Unleash`, ); + await screen.findByText(`We detected the following outdated SDKs`); + await screen.findByText(`unleash-client-php:1.13.0`); }); diff --git a/frontend/src/component/application/ApplicationIssues/ApplicationIssues.tsx b/frontend/src/component/application/ApplicationIssues/ApplicationIssues.tsx index 0292c641be..ec81bd69ec 100644 --- a/frontend/src/component/application/ApplicationIssues/ApplicationIssues.tsx +++ b/frontend/src/component/application/ApplicationIssues/ApplicationIssues.tsx @@ -87,6 +87,10 @@ const resolveIssueText = (issue: ApplicationOverviewIssuesSchema) => { const issueCount = issue.items.length; let issueText = ''; + if (issue.type === 'outdatedSdks') { + return 'We detected the following outdated SDKs'; + } + switch (issue.type) { case 'missingFeatures': issueText = `feature flag${issueCount !== 1 ? 's' : ''}`; @@ -111,8 +115,8 @@ export const ApplicationIssues = ({ issues }: IApplicationIssuesProps) => { - We detected {issues.length} issues in this - application + We detected {issues.length} issue + {issues.length !== 1 ? 's' : ''} in this application diff --git a/frontend/src/openapi/models/applicationOverviewEnvironmentSchema.ts b/frontend/src/openapi/models/applicationOverviewEnvironmentSchema.ts index bf9128eca8..ea1483e32e 100644 --- a/frontend/src/openapi/models/applicationOverviewEnvironmentSchema.ts +++ b/frontend/src/openapi/models/applicationOverviewEnvironmentSchema.ts @@ -11,7 +11,7 @@ export interface ApplicationOverviewEnvironmentSchema { /** The number of instances of the application environment */ instanceCount: number; /** The last time the application environment was seen */ - lastSeen: string; + lastSeen: string | null; /** Name of the application environment */ name: string; /** SDKs used in the application environment */ diff --git a/frontend/src/openapi/models/applicationOverviewIssuesSchemaType.ts b/frontend/src/openapi/models/applicationOverviewIssuesSchemaType.ts index 60dd7739d7..53e233f491 100644 --- a/frontend/src/openapi/models/applicationOverviewIssuesSchemaType.ts +++ b/frontend/src/openapi/models/applicationOverviewIssuesSchemaType.ts @@ -14,4 +14,5 @@ export type ApplicationOverviewIssuesSchemaType = export const ApplicationOverviewIssuesSchemaType = { missingFeatures: 'missingFeatures', missingStrategies: 'missingStrategies', + outdatedSdks: 'outdatedSdks', } as const; diff --git a/src/lib/features/metrics/instance/findOutdatedSdks.ts b/src/lib/features/metrics/instance/findOutdatedSdks.ts index ec75b9b235..93a7b2e961 100644 --- a/src/lib/features/metrics/instance/findOutdatedSdks.ts +++ b/src/lib/features/metrics/instance/findOutdatedSdks.ts @@ -11,7 +11,7 @@ const config: SDKConfig = { 'unleash-client-python': '5.9.2', 'unleash-client-ruby': '5.0.0', 'unleash-client-dotnet': '4.1.3', - 'unleash-client-php': '1.13.1', + 'unleash-client-php': '1.13.0', }; export function findOutdatedSDKs(sdkVersions: string[]): string[] {