From e1396505409a98c6fc80f0737a8db2b9989c4e23 Mon Sep 17 00:00:00 2001 From: Zan Thrash Date: Fri, 3 Feb 2017 13:16:17 -0600 Subject: [PATCH] Add application to Fast Property created pipelines. (#3255) Application name was missing from the FP created ad-hoc pipelines, causing the url for Manual Judgement stage to not property render. --- app/scripts/modules/core/retry/retry.service.ts | 2 +- .../fastProperties/wizard/propertyPipelineBuilder.service.ts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/scripts/modules/core/retry/retry.service.ts b/app/scripts/modules/core/retry/retry.service.ts index 926698a6227..d0741daaeb7 100644 --- a/app/scripts/modules/core/retry/retry.service.ts +++ b/app/scripts/modules/core/retry/retry.service.ts @@ -15,7 +15,7 @@ export class RetryService { interval: number): ng.IPromise { const call: T | ng.IPromise = func(); - const promise: ng.IPromise = call.hasOwnProperty('then') ? call as ng.IPromise: this.$q.resolve(call); + const promise: ng.IPromise = call.hasOwnProperty('then') ? call as ng.IPromise : this.$q.resolve(call); if (limit === 0) { return promise; } else { diff --git a/app/scripts/modules/netflix/fastProperties/wizard/propertyPipelineBuilder.service.ts b/app/scripts/modules/netflix/fastProperties/wizard/propertyPipelineBuilder.service.ts index da86dcbd7fa..89ef032e614 100644 --- a/app/scripts/modules/netflix/fastProperties/wizard/propertyPipelineBuilder.service.ts +++ b/app/scripts/modules/netflix/fastProperties/wizard/propertyPipelineBuilder.service.ts @@ -36,7 +36,7 @@ export class PropertyPipelineBuilderService { return this.getPipelineConfigId(command) .then((pipelineConfigId: string) => { - return this.createPropertyPipeline(stages, pipelineConfigId); + return this.createPropertyPipeline(stages, pipelineConfigId, command.applicationName); }); } @@ -44,13 +44,14 @@ export class PropertyPipelineBuilderService { return new PropertyPipelineStage(user, command); } - private createPropertyPipeline(stages: IStage[], pipelineConfigId: string): PropertyPipeline { + private createPropertyPipeline(stages: IStage[], pipelineConfigId: string, applicationName: string): PropertyPipeline { let pipeline = new PropertyPipeline(pipelineConfigId); pipeline.keepWaitingPipelines = false; pipeline.lastModifiedBy = 'spinnaker'; pipeline.limitConcurrent = false; pipeline.parallel = true; pipeline.stages = stages; + pipeline.application = applicationName; return pipeline; }