From f69daaf3faced891ac260f30d2beb732e471dabc Mon Sep 17 00:00:00 2001 From: Aindriu Lavelle Date: Thu, 21 Sep 2023 13:02:15 +0100 Subject: [PATCH] Updates to coral to use envStatus Signed-off-by: Aindriu Lavelle --- .../environments/Kafka/KafkaEnvironments.test.tsx | 4 ++++ .../KafkaConnect/KafkaConnectEnvironments.test.tsx | 4 ++++ .../SchemaRegistry/SchemaRegistryEnvironments.test.tsx | 2 ++ .../environments/components/EnvironmentStatus.test.tsx | 3 +++ coral/types/api.d.ts | 8 +++++++- 5 files changed, 20 insertions(+), 1 deletion(-) diff --git a/coral/src/app/features/configuration/environments/Kafka/KafkaEnvironments.test.tsx b/coral/src/app/features/configuration/environments/Kafka/KafkaEnvironments.test.tsx index bcf149558b..c8dd831484 100644 --- a/coral/src/app/features/configuration/environments/Kafka/KafkaEnvironments.test.tsx +++ b/coral/src/app/features/configuration/environments/Kafka/KafkaEnvironments.test.tsx @@ -38,6 +38,7 @@ const mockedEnvironmentsResponse: EnvironmentPaginatedApiResponse = tenantName: "default", clusterName: "DEV", envStatus: "OFFLINE", + envStatusTime: '2023-09-21T11:47:15.664615239', otherParams: "", showDeleteEnv: false, totalNoPages: "1", @@ -66,6 +67,7 @@ const mockedEnvironmentsResponse: EnvironmentPaginatedApiResponse = tenantName: "default", clusterName: "DEV_CLS", envStatus: "ONLINE", + envStatusTime: '2023-09-21T11:47:15.664615239', otherParams: "", showDeleteEnv: false, totalNoPages: "1", @@ -98,6 +100,7 @@ const mockedEnvironmentsResponse: EnvironmentPaginatedApiResponse = tenantName: "default", clusterName: "TST", envStatus: "ONLINE", + envStatusTime: '2023-09-21T11:47:15.664615239', otherParams: "default.partitions=2,max.partitions=2,default.replication.factor=1,max.replication.factor=1,topic.prefix=,topic.suffix=", showDeleteEnv: false, @@ -131,6 +134,7 @@ const mockedEnvironmentsResponse: EnvironmentPaginatedApiResponse = tenantName: "default", clusterName: "DEV", envStatus: "OFFLINE", + envStatusTime: '2023-09-21T11:47:15.664615239', otherParams: "", showDeleteEnv: false, totalNoPages: "1", diff --git a/coral/src/app/features/configuration/environments/KafkaConnect/KafkaConnectEnvironments.test.tsx b/coral/src/app/features/configuration/environments/KafkaConnect/KafkaConnectEnvironments.test.tsx index 14e0113ec8..9ecd1108a7 100644 --- a/coral/src/app/features/configuration/environments/KafkaConnect/KafkaConnectEnvironments.test.tsx +++ b/coral/src/app/features/configuration/environments/KafkaConnect/KafkaConnectEnvironments.test.tsx @@ -38,6 +38,7 @@ const mockedEnvironmentsResponse: EnvironmentPaginatedApiResponse = tenantName: "default", clusterName: "TST_CONNCT", envStatus: "ONLINE", + envStatusTime: '2023-09-21T11:47:15.664615239', showDeleteEnv: false, totalNoPages: "1", currentPage: "1", @@ -55,6 +56,7 @@ const mockedEnvironmentsResponse: EnvironmentPaginatedApiResponse = tenantName: "default", clusterName: "DEV", envStatus: "OFFLINE", + envStatusTime: '2023-09-21T11:47:15.664615239', showDeleteEnv: false, totalNoPages: "1", currentPage: "1", @@ -72,6 +74,7 @@ const mockedEnvironmentsResponse: EnvironmentPaginatedApiResponse = tenantName: "default", clusterName: "UIKLAW", envStatus: "ONLINE", + envStatusTime: '2023-09-21T11:47:15.664615239', showDeleteEnv: false, totalNoPages: "1", currentPage: "1", @@ -89,6 +92,7 @@ const mockedEnvironmentsResponse: EnvironmentPaginatedApiResponse = tenantName: "default", clusterName: "UIKLAW", envStatus: "ONLINE", + envStatusTime: '2023-09-21T11:47:15.664615239', showDeleteEnv: false, totalNoPages: "1", currentPage: "1", diff --git a/coral/src/app/features/configuration/environments/SchemaRegistry/SchemaRegistryEnvironments.test.tsx b/coral/src/app/features/configuration/environments/SchemaRegistry/SchemaRegistryEnvironments.test.tsx index 3c52adcb2f..c43f862b55 100644 --- a/coral/src/app/features/configuration/environments/SchemaRegistry/SchemaRegistryEnvironments.test.tsx +++ b/coral/src/app/features/configuration/environments/SchemaRegistry/SchemaRegistryEnvironments.test.tsx @@ -38,6 +38,7 @@ const mockedEnvironmentsResponse: EnvironmentPaginatedApiResponse = tenantName: "default", clusterName: "TST_SCHEMA", envStatus: "ONLINE", + envStatusTime: '2023-09-21T11:47:15.664615239', showDeleteEnv: false, totalNoPages: "1", currentPage: "1", @@ -59,6 +60,7 @@ const mockedEnvironmentsResponse: EnvironmentPaginatedApiResponse = tenantName: "default", clusterName: "DEV_CLS", envStatus: "ONLINE", + envStatusTime: '2023-09-21T11:47:15.664615239', showDeleteEnv: false, totalNoPages: "1", currentPage: "1", diff --git a/coral/src/app/features/configuration/environments/components/EnvironmentStatus.test.tsx b/coral/src/app/features/configuration/environments/components/EnvironmentStatus.test.tsx index a77bc71544..2d97bdf8f3 100644 --- a/coral/src/app/features/configuration/environments/components/EnvironmentStatus.test.tsx +++ b/coral/src/app/features/configuration/environments/components/EnvironmentStatus.test.tsx @@ -89,6 +89,7 @@ describe("EnvironmentStatus", () => { mockGetUpdateEnvStatus.mockResolvedValue({ result: "success", envStatus: "ONLINE", + envStatusTime: '2023-09-21T11:47:15.664615239', }); expect(screen.getByText("Working")).toBeVisible(); @@ -108,6 +109,7 @@ describe("EnvironmentStatus", () => { mockGetUpdateEnvStatus.mockResolvedValue({ result: "success", envStatus: "OFFLINE", + envStatusTime: '2023-09-21T11:47:15.664615239', }); expect(screen.getByText("Working")).toBeVisible(); @@ -152,6 +154,7 @@ describe("EnvironmentStatus", () => { mockGetUpdateEnvStatus.mockResolvedValue({ result: "success", envStatus: "OFFLINE", + envStatusTime: '2023-09-21T11:47:15.664615239', }); expect(screen.getByText("Working")).toBeVisible(); diff --git a/coral/types/api.d.ts b/coral/types/api.d.ts index fdc55128ee..de02512bc8 100644 --- a/coral/types/api.d.ts +++ b/coral/types/api.d.ts @@ -216,7 +216,7 @@ export type paths = { "/chPwd": { post: operations["changePwd"]; }; - "/cache/environment/tenant/{tenantId}/id/{id}": { + "/cache/tenant/{tenantId}/entityType/environment/id/{id}": { post: operations["addEnvToCache"]; delete: operations["removeEnvFromCache"]; }; @@ -2861,6 +2861,9 @@ export type operations = { }; addEnvToCache: { parameters: { + header: { + Authorization: string; + }; path: { tenantId: number; id: number; @@ -2882,6 +2885,9 @@ export type operations = { }; removeEnvFromCache: { parameters: { + header: { + Authorization: string; + }; path: { tenantId: number; id: number;