diff --git a/halconfig/settings.js b/halconfig/settings.js index bf64cee85b8..c91a282f308 100644 --- a/halconfig/settings.js +++ b/halconfig/settings.js @@ -13,6 +13,7 @@ var defaultMetricsStore = '{%canary.defaultMetricsStore%}'; var defaultMetricsAccountName = '{%canary.defaultMetricsAccount%}'; var defaultStorageAccountName = '{%canary.defaultStorageAccount%}'; var fiatEnabled = '{%features.fiat%}' === 'true'; +var manualJudgmentParentPipelineEnabled = '{%features.manualJudgmentParentPipeline%}' === 'true'; var mineCanaryEnabled = '{%features.mineCanary%}' === 'true'; var pipelineTemplatesEnabled = '{%features.pipelineTemplates%}' === 'true'; var reduxLoggerEnabled = '{%canary.reduxLogger%}' === 'true'; diff --git a/packages/app/src/settings.js b/packages/app/src/settings.js index 11e09a39688..dddcda51fb4 100644 --- a/packages/app/src/settings.js +++ b/packages/app/src/settings.js @@ -50,6 +50,7 @@ const managedServiceAccountsEnabled = process.env.MANAGED_SERVICE_ACCOUNTS_ENABLED === 'true'; const managedResourcesEnabled = import.meta.env.VITE_MANAGED_RESOURCES_ENABLED === 'true' || process.env.MANAGED_RESOURCES_ENABLED === 'true'; +const manualJudgmentParentPipelineEnabled = import.meta.env.MJ_PARENTPIPELINE_ENABLED === 'true' || false; const onDemandClusterThreshold = import.meta.env.VITE_ON_DEMAND_CLUSTER_THRESHOLD || process.env.ON_DEMAND_CLUSTER_THRESHOLD || '350'; const reduxLoggerEnabled = import.meta.env.VITE_REDUX_LOGGER === 'true' || process.env.REDUX_LOGGER === 'true'; @@ -117,6 +118,7 @@ window.spinnakerSettings = { mdGitIntegration: mdGitIntegrationEnabled, managedServiceAccounts: managedServiceAccountsEnabled, managedResources: managedResourcesEnabled, + manualJudgmentParentPipeline: manualJudgmentParentPipelineEnabled, notifications: false, pagerDuty: false, pipelineTemplates: false, diff --git a/packages/core/src/pipeline/executions/execution/ExecutionMarker.tsx b/packages/core/src/pipeline/executions/execution/ExecutionMarker.tsx index ce1518e935c..43ae80f6541 100644 --- a/packages/core/src/pipeline/executions/execution/ExecutionMarker.tsx +++ b/packages/core/src/pipeline/executions/execution/ExecutionMarker.tsx @@ -95,18 +95,24 @@ export class ExecutionMarker extends React.Component { - if (childStage.type == 'pipeline') { - const childPipeline = application.executions.data.find((p: any) => p.id === childStage.context.executionId); - if (childPipeline != undefined) { - childPipeline.stages.forEach((stageToCheck: IStage) => { - if (stageToCheck.type == 'manualJudgment' && stageToCheck.status == 'RUNNING') { - stageType = 'manualjudgment'; - } - }); + if (SETTINGS.feature.manualJudgmentParentPipeline) { + stage.stages.forEach((childStage: IStage) => { + if ( + childStage.type == 'pipeline' && + application.executions != undefined && + application.executions.data != undefined + ) { + const childPipeline = application.executions.data.find((p: any) => p.id === childStage.context.executionId); + if (childPipeline != undefined) { + childPipeline.stages.forEach((stageToCheck: IStage) => { + if (stageToCheck.type == 'manualJudgment' && stageToCheck.status == 'RUNNING') { + stageType = 'manualjudgment'; + } + }); + } } - } - }); + }); + } const pipelineStatus = this.stageStatus(stage.status.toLowerCase()); const markerClassName = [ stage.type !== 'group' ? 'clickable' : '',