File tree Expand file tree Collapse file tree 4 files changed +28
-0
lines changed
utils/config/__fixtures__ Expand file tree Collapse file tree 4 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import cronListEnabled from './resolvers/cron-list-enabled';
1515import extendedDomainInfoEnabled from './resolvers/extended-domain-info-enabled' ;
1616import { type ExtendedDomainInfoEnabledConfig } from './resolvers/extended-domain-info-enabled.types' ;
1717import failoverHistoryEnabled from './resolvers/failover-history-enabled' ;
18+ import historyPageV2Enabled from './resolvers/history-page-v2-enabled' ;
1819import workflowActionsEnabled from './resolvers/workflow-actions-enabled' ;
1920import {
2021 type WorkflowActionsEnabledResolverParams ,
@@ -72,6 +73,12 @@ const dynamicConfigs: {
7273 'request' ,
7374 true
7475 > ;
76+ HISTORY_PAGE_V2_ENABLED : ConfigAsyncResolverDefinition <
77+ undefined ,
78+ boolean ,
79+ 'request' ,
80+ true
81+ > ;
7582} = {
7683 CADENCE_WEB_PORT : {
7784 env : 'CADENCE_WEB_PORT' ,
@@ -121,6 +128,11 @@ const dynamicConfigs: {
121128 evaluateOn : 'request' ,
122129 isPublic : true ,
123130 } ,
131+ HISTORY_PAGE_V2_ENABLED : {
132+ resolver : historyPageV2Enabled ,
133+ evaluateOn : 'request' ,
134+ isPublic : true ,
135+ } ,
124136} as const ;
125137
126138export default dynamicConfigs ;
Original file line number Diff line number Diff line change 1+ /**
2+ * WIP: Returns whether the new Workflow History (V2) page is enabled
3+ *
4+ * To enable the new Workflow History (V2) page, set the CADENCE_HISTORY_PAGE_V2_ENABLED env variable to true.
5+ * For further customization, override the implementation of this resolver.
6+ *
7+ * @returns {Promise<boolean> } Whether Workflow History (V2) page is enabled.
8+ */
9+ export default async function historyPageV2Enabled ( ) : Promise < boolean > {
10+ return process . env . CADENCE_HISTORY_PAGE_V2_ENABLED === 'true' ;
11+ }
Original file line number Diff line number Diff line change @@ -67,6 +67,10 @@ const resolverSchemas: ResolverSchemas = {
6767 args : z . undefined ( ) ,
6868 returnType : z . boolean ( ) ,
6969 } ,
70+ HISTORY_PAGE_V2_ENABLED : {
71+ args : z . undefined ( ) ,
72+ returnType : z . boolean ( ) ,
73+ } ,
7074} ;
7175
7276export default resolverSchemas ;
Original file line number Diff line number Diff line change @@ -43,5 +43,6 @@ const mockResolvedConfigValues: LoadedConfigResolvedValues = {
4343 WORKFLOW_DIAGNOSTICS_ENABLED : false ,
4444 ARCHIVAL_DEFAULT_SEARCH_ENABLED : false ,
4545 FAILOVER_HISTORY_ENABLED : false ,
46+ HISTORY_PAGE_V2_ENABLED : false ,
4647} ;
4748export default mockResolvedConfigValues ;
You can’t perform that action at this time.
0 commit comments