From 5e9136e69b858a4f45e60b3a3452e47e6bbb12c4 Mon Sep 17 00:00:00 2001 From: "niraj.kumar" Date: Wed, 20 Nov 2024 16:20:07 +0530 Subject: [PATCH] make group count enable/disable configurable --- server/config/development.yaml | 1 + server/docker/config-template.yaml | 1 + server/server/config/config.go | 3 +++ src/lib/services/settings-service.ts | 2 ++ src/lib/types/index.ts | 1 + 5 files changed, 8 insertions(+) diff --git a/server/config/development.yaml b/server/config/development.yaml index 0b9cedfcc..f63be55f9 100644 --- a/server/config/development.yaml +++ b/server/config/development.yaml @@ -20,6 +20,7 @@ batchActionsDisabled: false startWorkflowDisabled: false hideWorkflowQueryErrors: false refreshWorkflowCountsDisabled: false +WorkflowCountGroupByExecutionStatusEnabled: true auth: enabled: false providers: diff --git a/server/docker/config-template.yaml b/server/docker/config-template.yaml index 9b7f1a582..170275603 100644 --- a/server/docker/config-template.yaml +++ b/server/docker/config-template.yaml @@ -19,6 +19,7 @@ batchActionsDisabled: {{ default .Env.TEMPORAL_BATCH_ACTIONS_DISABLED "false" }} startWorkflowDisabled: {{ default .Env.TEMPORAL_START_WORKFLOW_DISABLED "false" }} hideWorkflowQueryErrors: {{ default .Env.TEMPORAL_HIDE_WORKFLOW_QUERY_ERRORS "false" }} refreshWorkflowCountsDisabled: {{ default .Env.TEMPORAL_REFRESH_WORKFLOW_COUNTS_DISABLED "false" }} +WorkflowCountGroupByExecutionStatusEnabled: {{ default .Env.TEMPORAL_WORKFLOW_COUNT_GROUP_BY_EXECUTION_STATUS_ENABLED "true" }} cors: cookieInsecure: {{ default .Env.TEMPORAL_CSRF_COOKIE_INSECURE "false" }} allowOrigins: diff --git a/server/server/config/config.go b/server/server/config/config.go index e99c0cdac..74c73fb74 100644 --- a/server/server/config/config.go +++ b/server/server/config/config.go @@ -65,6 +65,9 @@ type ( HideWorkflowQueryErrors bool `yaml:"hideWorkflowQueryErrors"` // Whether to disable refreshing workflow counts in UI RefreshWorkflowCountsDisabled bool `yaml:"refreshWorkflowCountsDisabled"` + // Whether to enable the count group by execution status in UI + WorkflowCountGroupByExecutionStatusEnabled bool `yaml:"WorkflowCountGroupByExecutionStatusEnabled"` + // Forward specified HTTP headers from HTTP API requests to Temporal gRPC backend ForwardHeaders []string `yaml:"forwardHeaders"` HideLogs bool `yaml:"hideLogs"` diff --git a/src/lib/services/settings-service.ts b/src/lib/services/settings-service.ts index 1f08f1dcf..208cc2bfc 100644 --- a/src/lib/services/settings-service.ts +++ b/src/lib/services/settings-service.ts @@ -40,6 +40,8 @@ export const fetchSettings = async (request = fetch): Promise => { hideWorkflowQueryErrors: !!settingsResponse?.HideWorkflowQueryErrors, refreshWorkflowCountsDisabled: !!settingsResponse?.RefreshWorkflowCountsDisabled, + countGroupByExecutionStatus: + !!settingsResponse?.WorkflowCountGroupByExecutionStatusEnabled, showTemporalSystemNamespace: settingsResponse?.ShowTemporalSystemNamespace, notifyOnNewVersion: settingsResponse?.NotifyOnNewVersion, diff --git a/src/lib/types/index.ts b/src/lib/types/index.ts index 9f75bc24c..b5c9c1ac0 100644 --- a/src/lib/types/index.ts +++ b/src/lib/types/index.ts @@ -254,6 +254,7 @@ export type SettingsResponse = { StartWorkflowDisabled: boolean; HideWorkflowQueryErrors: boolean; RefreshWorkflowCountsDisabled: boolean; + WorkflowCountGroupByExecutionStatusEnabled: boolean; ShowTemporalSystemNamespace: boolean; NotifyOnNewVersion: boolean; FeedbackURL: string;