-
Notifications
You must be signed in to change notification settings - Fork 903
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(pipeline_template): Better support for templated pipelines with…
… dynamic sources - Take 2 (#4365) * feat(pipeline_template): Better support for templated pipelines with dynamic sources * Add "Rendered pipeline" tab to "Edit as JSON" modal for templated pipelines * Don't display error message when editing templated pipelines with dynamic source - real fix in Orca * Render execution graph when editing templated pipelines with dynamic source - real fix in Orca * Display warning in Deck if configuration can't be rendered because no executions have been run * Display information about which execution used for rendering * Let the user select which configuration that's used for rendering Depends on spinnaker/orca#1718 and spinnaker/gate#471 * fix(pipeline_template): Build execution title/numbers was rendered twice * fix(pipeline_template): PR feedback == --> === * PR feedback: don't swallow template exceptions
- Loading branch information
1 parent
b04f25f
commit 6c6ea94
Showing
18 changed files
with
177 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
app/scripts/modules/core/src/delivery/executionBuild/ExecutionBuildTitle.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import * as React from 'react'; | ||
import { BindAll } from 'lodash-decorators'; | ||
|
||
import { module } from 'angular'; | ||
import { react2angular } from 'react2angular'; | ||
|
||
import { IExecutionBuildLinkProps } from './ExecutionBuildLink'; | ||
import { timestamp } from 'core/utils' | ||
|
||
export interface IExecutionBuildTitleProps extends IExecutionBuildLinkProps { | ||
defaultToTimestamp?: boolean; | ||
} | ||
|
||
@BindAll() | ||
export class ExecutionBuildTitle extends React.Component<IExecutionBuildTitleProps, {}> { | ||
|
||
public static defaultProps: Partial<IExecutionBuildTitleProps> = { | ||
defaultToTimestamp: false | ||
}; | ||
|
||
private hasParentPipeline: boolean; | ||
private hasBuildNumber: boolean; | ||
|
||
constructor(props: IExecutionBuildTitleProps) { | ||
super(props); | ||
this.hasParentPipeline = !!props.execution.trigger.parentPipelineName; | ||
this.hasBuildNumber = !!(props.execution.buildInfo && props.execution.buildInfo.number); | ||
} | ||
|
||
public render() { | ||
return ( | ||
<span> | ||
{ this.hasParentPipeline && ( | ||
<span>{this.props.execution.trigger.parentPipelineName}</span> | ||
)} | ||
{ this.hasBuildNumber && !this.hasParentPipeline && ( | ||
<span><span className="build-label">Build</span> #{this.props.execution.buildInfo.number}</span> | ||
)} | ||
{ this.props.defaultToTimestamp && !this.hasParentPipeline && !this.hasBuildNumber && ( | ||
<span>{timestamp(this.props.execution.startTime)}</span> | ||
)} | ||
</span> | ||
); | ||
} | ||
} | ||
|
||
export const EXECUTION_BUILD_TITLE = 'spinnaker.core.delivery.executionbuild.executionbuildtitle'; | ||
const ngmodule = module(EXECUTION_BUILD_TITLE, []); | ||
|
||
ngmodule.component('executionBuildTitle', react2angular(ExecutionBuildTitle, ['execution', 'defaultToTimestamp'])); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.