Skip to content

Commit

Permalink
refactor(core/pipeline): Rename StageDetails to StepExecutionDetails
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Reynolds committed Nov 20, 2017
1 parent bb0c80b commit a7d5617
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { IExecutionDetailsComponentProps, IExecutionDetailsComponentState } from
import { ExecutionDetailsSectionNav } from 'core/pipeline/details';
import { ReactInjector } from 'core/reactShims';

export class StageExecutionDetails extends React.Component<IExecutionDetailsComponentProps, IExecutionDetailsComponentState> {
export class StepExecutionDetails extends React.Component<IExecutionDetailsComponentProps, IExecutionDetailsComponentState> {
constructor(props: IExecutionDetailsComponentProps) {
super(props);
this.state = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { BindAll } from 'lodash-decorators';
import { Application } from 'core/application';
import { IExecution, IExecutionDetailsSection, IExecutionStage, IStageTypeConfig } from 'core/domain';
import { NgReact } from 'core/reactShims';
import { StageExecutionDetails } from 'core/pipeline/config/stages/core/StageExecutionDetails';
import { StepExecutionDetails } from 'core/pipeline/config/stages/core/StepExecutionDetails';
import { StatusGlyph } from 'core/task/StatusGlyph';
import { robotToHuman } from 'core/presentation/robotToHumanFilter/robotToHuman.filter';

Expand Down Expand Up @@ -59,7 +59,7 @@ export class StageDetails extends React.Component<IStageDetailsProps, IStageDeta
public render(): React.ReactElement<StageDetails> {
const { application, execution, stage } = this.props;
const { executionDetailsSections, provider, sourceUrl, configSections } = this.state;
const { StageDetailsWrapper } = NgReact;
const { StepExecutionDetailsWrapper } = NgReact;
const detailsProps = { application, execution, provider, stage };

return (
Expand All @@ -70,8 +70,8 @@ export class StageDetails extends React.Component<IStageDetailsProps, IStageDeta
{robotToHuman(stage.name || stage.type)}
</h5>
</div>
{sourceUrl && <StageDetailsWrapper {...detailsProps} sourceUrl={sourceUrl} configSections={configSections} />}
{executionDetailsSections && <StageExecutionDetails {...detailsProps} detailsSections={executionDetailsSections} />}
{sourceUrl && <StepExecutionDetailsWrapper {...detailsProps} sourceUrl={sourceUrl} configSections={configSections} />}
{executionDetailsSections && <StepExecutionDetails {...detailsProps} detailsSections={executionDetailsSections} />}
</div>
);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Application } from 'core/application';
import { IExecution, IExecutionStage } from 'core/domain';

export interface IStageDetailsWrapperProps {
export interface IStepExecutionDetailsWrapperProps {
application: Application;
configSections: string[];
execution: IExecution;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { module, IController, IComponentOptions, IScope } from 'angular';
import { Application } from 'core/application';
import { IExecution, IExecutionStage } from 'core/domain';

export class StageDetailsController implements IController {
export class StepExecutionDetailsController implements IController {
public application: Application;
public configSections: string[];
public execution: IExecution;
Expand Down Expand Up @@ -32,18 +32,18 @@ export class StageDetailsController implements IController {
}
}

export class StageDetailsComponent implements IComponentOptions {
export class StepExecutionDetailsComponent implements IComponentOptions {
public bindings: any = {
application: '<',
configSections: '<',
execution: '<',
sourceUrl: '<',
stage: '<',
};
public controller: any = StageDetailsController;
public controller: any = StepExecutionDetailsController;
public template = '<div ng-include="$ctrl.sourceUrl"></div>';
}

export const STAGE_DETAILS_COMPONENT = 'spinnaker.core.pipeline.stageDetails.component';
module(STAGE_DETAILS_COMPONENT, [])
.component('stageDetails', new StageDetailsComponent());
export const STEP_EXECUTION_DETAILS_COMPONENT = 'spinnaker.core.pipeline.stepExecutionDetails.component';
module(STEP_EXECUTION_DETAILS_COMPONENT, [])
.component('stepExecutionDetails', new StepExecutionDetailsComponent());
4 changes: 2 additions & 2 deletions app/scripts/modules/core/src/pipeline/pipeline.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { EXECUTION_DETAILS_SECTION_NAV } from './details/executionDetailsSection
import { EXECUTION_FILTER_SERVICE } from 'core/pipeline/filter/executionFilter.service';
import { STAGE_FAILURE_MESSAGE_COMPONENT } from './details/stageFailureMessage.component';
import { CORE_DELIVERY_DETAILS_SINGLEEXECUTIONDETAILS } from './details/singleExecutionDetails.component';
import { STAGE_DETAILS_COMPONENT } from './details/stageDetails.component';
import { STEP_EXECUTION_DETAILS_COMPONENT } from './details/stepExecutionDetails.component';
import { STAGE_SUMMARY_COMPONENT } from './details/stageSummary.component';

import './pipeline.less';
Expand All @@ -49,7 +49,7 @@ module(PIPELINE_MODULE, [
require('./manualExecution/manualPipelineExecution.controller.js').name,

STAGE_FAILURE_MESSAGE_COMPONENT,
STAGE_DETAILS_COMPONENT,
STEP_EXECUTION_DETAILS_COMPONENT,
STAGE_SUMMARY_COMPONENT,

require('../utils/appendTransform.js').name,
Expand Down
40 changes: 20 additions & 20 deletions app/scripts/modules/core/src/reactShims/ngReact.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,33 +25,33 @@ import { ReactInject } from './react.injector';
import { TaskMonitorWrapperComponent } from 'core/task/monitor/taskMonitor.directive';
import { diffViewComponent } from '../pipeline/config/actions/history/diffView.component';
import { IStageSummaryWrapperProps } from 'core/pipeline/details/StageSummaryWrapper';
import { IStageDetailsWrapperProps } from 'core/pipeline/details/StageDetailsWrapper';
import { IStepExecutionDetailsWrapperProps } from 'core/pipeline/details/StepExecutionDetailsWrapper';
import { StageSummaryComponent } from 'core/pipeline/details/stageSummary.component';
import { StageDetailsComponent } from 'core/pipeline/details/stageDetails.component';
import { StepExecutionDetailsComponent } from 'core/pipeline/details/stepExecutionDetails.component';

export class NgReactInjector extends ReactInject {

public $injectorProxy = {} as IInjectorService;

// Reactified components
public AccountTag: React.ComponentClass<IAccountTagProps> = angular2react('accountTag', new AccountTagComponent(), this.$injectorProxy) as any;
public ApplicationNav: React.ComponentClass<IApplicationNavProps> = angular2react('applicationNav', new ApplicationNavComponent(), this.$injectorProxy) as any;
public ApplicationNavSecondary: React.ComponentClass<IApplicationNavSecondaryProps> = angular2react('applicationNavSecondary', new ApplicationNavSecondaryComponent(), this.$injectorProxy) as any;
public Applications: React.ComponentClass<{}> = angular2react('applications', new ApplicationsComponent(), this.$injectorProxy) as any;
public ButtonBusyIndicator: React.ComponentClass<IButtonBusyIndicatorProps> = angular2react('buttonBusyIndicator', new ButtonBusyIndicatorComponent(), this.$injectorProxy) as any;
public CopyToClipboard: React.ComponentClass<ICopyToClipboardProps> = angular2react('copyToClipboard', new CopyToClipboardComponent(), this.$injectorProxy) as any;
public DiffView: React.ComponentClass<DiffViewProps> = angular2react('diffView', diffViewComponent, this.$injectorProxy) as any;
public HelpField: React.ComponentClass<IHelpFieldProps> = angular2react('helpFieldWrapper', new HelpFieldWrapperComponent(), this.$injectorProxy) as any;
public InsightLayout: React.ComponentClass<IInsightLayoutProps> = angular2react('insightLayout', new InsightLayoutComponent(), this.$injectorProxy) as any;
public InstanceList: React.ComponentClass<IInstanceListProps> = angular2react('instanceList', { bindings: instanceListBindings }, this.$injectorProxy) as any;
public RunningTasksTag: React.ComponentClass<IRunningTasksTagProps> = angular2react('runningTasksTag', { bindings: runningTasksTagBindings }, this.$injectorProxy) as any;
public LegacySpinner: React.ComponentClass<ILegacySpinnerProps> = angular2react('spinnerWrapper', new SpinnerWrapperComponent(), this.$injectorProxy) as any;
public TaskMonitorWrapper: React.ComponentClass<ITaskMonitorProps> = angular2react('taskMonitorWrapper', new TaskMonitorWrapperComponent(), this.$injectorProxy) as any;
public UserMenu: React.ComponentClass<{}> = angular2react('userMenu', {}, this.$injectorProxy) as any;
public GlobalSearch: React.ComponentClass<{}> = angular2react('globalSearch', {}, this.$injectorProxy) as any;
public WhatsNew: React.ComponentClass<{}> = angular2react('whatsNew', {}, this.$injectorProxy) as any;
public StageSummaryWrapper: React.ComponentClass<IStageSummaryWrapperProps> = angular2react('stageSummary', new StageSummaryComponent(), this.$injectorProxy) as any;
public StageDetailsWrapper: React.ComponentClass<IStageDetailsWrapperProps> = angular2react('stageDetails', new StageDetailsComponent(), this.$injectorProxy) as any;
public AccountTag: React.ComponentClass<IAccountTagProps> = angular2react('accountTag', new AccountTagComponent(), this.$injectorProxy) as any;
public ApplicationNav: React.ComponentClass<IApplicationNavProps> = angular2react('applicationNav', new ApplicationNavComponent(), this.$injectorProxy) as any;
public ApplicationNavSecondary: React.ComponentClass<IApplicationNavSecondaryProps> = angular2react('applicationNavSecondary', new ApplicationNavSecondaryComponent(), this.$injectorProxy) as any;
public Applications: React.ComponentClass<{}> = angular2react('applications', new ApplicationsComponent(), this.$injectorProxy) as any;
public ButtonBusyIndicator: React.ComponentClass<IButtonBusyIndicatorProps> = angular2react('buttonBusyIndicator', new ButtonBusyIndicatorComponent(), this.$injectorProxy) as any;
public CopyToClipboard: React.ComponentClass<ICopyToClipboardProps> = angular2react('copyToClipboard', new CopyToClipboardComponent(), this.$injectorProxy) as any;
public DiffView: React.ComponentClass<DiffViewProps> = angular2react('diffView', diffViewComponent, this.$injectorProxy) as any;
public HelpField: React.ComponentClass<IHelpFieldProps> = angular2react('helpFieldWrapper', new HelpFieldWrapperComponent(), this.$injectorProxy) as any;
public InsightLayout: React.ComponentClass<IInsightLayoutProps> = angular2react('insightLayout', new InsightLayoutComponent(), this.$injectorProxy) as any;
public InstanceList: React.ComponentClass<IInstanceListProps> = angular2react('instanceList', { bindings: instanceListBindings }, this.$injectorProxy) as any;
public RunningTasksTag: React.ComponentClass<IRunningTasksTagProps> = angular2react('runningTasksTag', { bindings: runningTasksTagBindings }, this.$injectorProxy) as any;
public LegacySpinner: React.ComponentClass<ILegacySpinnerProps> = angular2react('spinnerWrapper', new SpinnerWrapperComponent(), this.$injectorProxy) as any;
public TaskMonitorWrapper: React.ComponentClass<ITaskMonitorProps> = angular2react('taskMonitorWrapper', new TaskMonitorWrapperComponent(), this.$injectorProxy) as any;
public UserMenu: React.ComponentClass<{}> = angular2react('userMenu', {}, this.$injectorProxy) as any;
public GlobalSearch: React.ComponentClass<{}> = angular2react('globalSearch', {}, this.$injectorProxy) as any;
public WhatsNew: React.ComponentClass<{}> = angular2react('whatsNew', {}, this.$injectorProxy) as any;
public StageSummaryWrapper: React.ComponentClass<IStageSummaryWrapperProps> = angular2react('stageSummary', new StageSummaryComponent(), this.$injectorProxy) as any;
public StepExecutionDetailsWrapper: React.ComponentClass<IStepExecutionDetailsWrapperProps> = angular2react('stepExecutionDetails', new StepExecutionDetailsComponent(), this.$injectorProxy) as any;

public initialize($injector: IInjectorService) {
const realInjector: { [key: string]: Function } = $injector as any;
Expand Down

0 comments on commit a7d5617

Please sign in to comment.