Skip to content

Commit

Permalink
refactor(*/pipeline): Convert clone server group execution details to…
Browse files Browse the repository at this point in the history
… react (#4359)
  • Loading branch information
Justin Reynolds authored and anotherchrisberry committed Nov 3, 2017
1 parent 95fae04 commit 25ff3a1
Show file tree
Hide file tree
Showing 19 changed files with 136 additions and 427 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@ import { ACCOUNT_SERVICE, LIST_EXTRACTOR_SERVICE, StageConstants } from '@spinna
module.exports = angular.module('spinnaker.amazon.pipeline.stage.cloneServerGroupStage', [
ACCOUNT_SERVICE,
LIST_EXTRACTOR_SERVICE,
require('./cloneServerGroupExecutionDetails.controller.js').name,
])
.config(function(pipelineConfigProvider) {
pipelineConfigProvider.registerStage({
provides: 'cloneServerGroup',
cloudProvider: 'aws',
templateUrl: require('./cloneServerGroupStage.html'),
executionDetailsUrl: require('./cloneServerGroupExecutionDetails.html'),
executionStepLabelUrl: require('./cloneServerGroupStepLabel.html'),
accountExtractor: (stage) => stage.context.credentials,
validators: [
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@ import { ACCOUNT_SERVICE, NAMING_SERVICE, StageConstants } from '@spinnaker/core
module.exports = angular.module('spinnaker.cf.pipeline.stage.cloneServerGroupStage', [
ACCOUNT_SERVICE,
NAMING_SERVICE,
require('./cloneServerGroupExecutionDetails.controller.js').name,
])
.config(function(pipelineConfigProvider) {
pipelineConfigProvider.registerStage({
provides: 'cloneServerGroup',
cloudProvider: 'cf',
templateUrl: require('./cloneServerGroupStage.html'),
executionDetailsUrl: require('./cloneServerGroupExecutionDetails.html'),
executionStepLabelUrl: require('./cloneServerGroupStepLabel.html'),
validators: [
{ type: 'requiredField', fieldName: 'targetCluster', fieldLabel: 'cluster' },
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export interface IStageDetailsProps {
export interface IStageDetailsState {
configSections?: string[];
executionDetailsSections?: IExecutionDetailsSection[];
provider: string;
sourceUrl?: string;
}

Expand Down Expand Up @@ -46,7 +47,7 @@ export class StageDetails extends React.Component<IStageDetailsProps, IStageDeta
sourceUrl = stageConfig.executionDetailsUrl || require('./defaultExecutionDetails.html');
}
}
return { configSections, executionDetailsSections, sourceUrl };
return { configSections, executionDetailsSections, provider: stageConfig.cloudProvider, sourceUrl };
}

public componentWillReceiveProps() {
Expand All @@ -55,9 +56,9 @@ export class StageDetails extends React.Component<IStageDetailsProps, IStageDeta

public render(): React.ReactElement<StageDetails> {
const { application, execution, stage } = this.props;
const { executionDetailsSections, sourceUrl, configSections } = this.state;
const { executionDetailsSections, provider, sourceUrl, configSections } = this.state;
const { StageDetailsWrapper } = NgReact;
const detailsProps = { application, execution, stage };
const detailsProps = { application, execution, provider, stage };

return (
<div className="stage-details">
Expand Down
1 change: 1 addition & 0 deletions app/scripts/modules/core/src/domain/IExecutionStage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export interface IExecutionDetailsComponentProps {
application: Application;
detailsSections: IExecutionDetailsSection[];
execution: IExecution;
provider: string;
stage: IExecutionStage;
}

Expand Down
Loading

0 comments on commit 25ff3a1

Please sign in to comment.