Skip to content

The open alternative to Salesforce, designed for AI.

[Admin Panel] fix invalid uuid issue on health status (#13619)

nitinca9464e19d3a
diff --git a/packages/twenty-front/src/generated-metadata/graphql.ts b/packages/twenty-front/src/generated-metadata/graphql.ts
index fbd714a05a2..52dac12f1ae 100644
--- a/packages/twenty-front/src/generated-metadata/graphql.ts
+++ b/packages/twenty-front/src/generated-metadata/graphql.ts
@@ -31,7 +31,7 @@ export type AdminPanelHealthServiceData = {
description: Scalars['String'];
details?: Maybe<Scalars['String']>;
errorMessage?: Maybe<Scalars['String']>;
- id: Scalars['UUID'];
+ id: HealthIndicatorId;
label: Scalars['String'];
queues?: Maybe<Array<AdminPanelWorkerQueueHealth>>;
status: AdminPanelHealthServiceStatus;
@@ -3840,7 +3840,7 @@ export type GetIndicatorHealthStatusQueryVariables = Exact<{
}>;
-export type GetIndicatorHealthStatusQuery = { __typename?: 'Query', getIndicatorHealthStatus: { __typename?: 'AdminPanelHealthServiceData', id: string, label: string, description: string, status: AdminPanelHealthServiceStatus, errorMessage?: string | null, details?: string | null, queues?: Array<{ __typename?: 'AdminPanelWorkerQueueHealth', id: string, queueName: string, status: AdminPanelHealthServiceStatus }> | null } };
+export type GetIndicatorHealthStatusQuery = { __typename?: 'Query', getIndicatorHealthStatus: { __typename?: 'AdminPanelHealthServiceData', id: HealthIndicatorId, label: string, description: string, status: AdminPanelHealthServiceStatus, errorMessage?: string | null, details?: string | null, queues?: Array<{ __typename?: 'AdminPanelWorkerQueueHealth', id: string, queueName: string, status: AdminPanelHealthServiceStatus }> | null } };
export type GetQueueMetricsQueryVariables = Exact<{
queueName: Scalars['String'];
diff --git a/packages/twenty-front/src/generated/graphql.ts b/packages/twenty-front/src/generated/graphql.ts
index a85f6cf7f5d..b15029b6dcb 100644
--- a/packages/twenty-front/src/generated/graphql.ts
+++ b/packages/twenty-front/src/generated/graphql.ts
@@ -31,7 +31,7 @@ export type AdminPanelHealthServiceData = {
description: Scalars['String'];
details?: Maybe<Scalars['String']>;
errorMessage?: Maybe<Scalars['String']>;
- id: Scalars['UUID'];
+ id: HealthIndicatorId;
label: Scalars['String'];
queues?: Maybe<Array<AdminPanelWorkerQueueHealth>>;
status: AdminPanelHealthServiceStatus;
diff --git a/packages/twenty-front/src/modules/settings/admin-panel/health-status/contexts/SettingsAdminIndicatorHealthContext.tsx b/packages/twenty-front/src/modules/settings/admin-panel/health-status/contexts/SettingsAdminIndicatorHealthContext.tsx
index 77873fc8141..2f83cb06a64 100644
--- a/packages/twenty-front/src/modules/settings/admin-panel/health-status/contexts/SettingsAdminIndicatorHealthContext.tsx
+++ b/packages/twenty-front/src/modules/settings/admin-panel/health-status/contexts/SettingsAdminIndicatorHealthContext.tsx
@@ -2,6 +2,7 @@ import { createContext } from 'react';
import {
AdminPanelHealthServiceData,
AdminPanelHealthServiceStatus,
+ HealthIndicatorId,
} from '~/generated/graphql';
type SettingsAdminIndicatorHealthContextType = {
@@ -11,7 +12,7 @@ type SettingsAdminIndicatorHealthContextType = {
export const SettingsAdminIndicatorHealthContext =
createContext<SettingsAdminIndicatorHealthContextType>({
indicatorHealth: {
- id: '',
+ id: HealthIndicatorId.app,
label: '',
description: '',
errorMessage: '',
diff --git a/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminIndicatorHealthStatus.tsx b/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminIndicatorHealthStatus.tsx
index 7640af04d3a..1508d1bd8fb 100644
--- a/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminIndicatorHealthStatus.tsx
+++ b/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminIndicatorHealthStatus.tsx
@@ -61,7 +61,7 @@ export const SettingsAdminIndicatorHealthStatus = () => {
<SettingsAdminIndicatorHealthContext.Provider
value={{
indicatorHealth: {
- id: data?.getIndicatorHealthStatus?.id ?? '',
+ id: data?.getIndicatorHealthStatus?.id ?? HealthIndicatorId.app,
label: data?.getIndicatorHealthStatus?.label ?? '',
description: data?.getIndicatorHealthStatus?.description ?? '',
errorMessage: data?.getIndicatorHealthStatus?.errorMessage,
diff --git a/packages/twenty-server/src/engine/core-modules/admin-panel/dtos/admin-panel-health-service-data.dto.ts b/packages/twenty-server/src/engine/core-modules/admin-panel/dtos/admin-panel-health-service-data.dto.ts
index fdec6c754c8..f4ff7669fab 100644
--- a/packages/twenty-server/src/engine/core-modules/admin-panel/dtos/admin-panel-health-service-data.dto.ts
+++ b/packages/twenty-server/src/engine/core-modules/admin-panel/dtos/admin-panel-health-service-data.dto.ts
@@ -1,13 +1,13 @@
import { Field, ObjectType } from '@nestjs/graphql';
-import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars';
import { AdminPanelWorkerQueueHealth } from 'src/engine/core-modules/admin-panel/dtos/admin-panel-worker-queue-health.dto';
import { AdminPanelHealthServiceStatus } from 'src/engine/core-modules/admin-panel/enums/admin-panel-health-service-status.enum';
+import { HealthIndicatorId } from 'src/engine/core-modules/health/enums/health-indicator-id.enum';
@ObjectType()
export class AdminPanelHealthServiceData {
- @Field(() => UUIDScalarType)
- id: string;
+ @Field(() => HealthIndicatorId)
+ id: HealthIndicatorId;
@Field(() => String)
label: string;