Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): Child pipeline should route back correctly #6586

Merged
merged 2 commits into from
Feb 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@ <h5>Pipeline Stage Configuration</h5>
</div>
<div class="col-md-12">
<div class="well alert alert-info">
<a ng-if="stage.context.executionId"
ui-sref="home.applications.application.pipelines.executionDetails.execution({ application: stage.context.application, executionId: stage.context.executionId })"
ui-sref-opts="{inherit: false, reload: 'home.applications.application.pipelines.executionDetails'}">View Pipeline Execution</a>
<a
ng-if="stage.context.executionId"
ui-sref="home.applications.application.pipelines.executionDetails.execution({ application: stage.context.application, executionId: stage.context.executionId, executionParams: { application: application.name, executionId: execution.id } })"
ui-sref-opts="{inherit: false, reload: 'home.applications.application.pipelines.executionDetails'}"
>View Pipeline Execution</a
>
</div>
</div>
</div>
Expand All @@ -41,6 +44,4 @@ <h5>Parameters</h5>
<execution-step-details item="stage"></execution-step-details>
</div>
</div>


</div>
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ export class SingleExecutionDetails extends React.Component<
const { app } = this.props;
const { execution, sortFilter, stateNotFound } = this.state;

const defaultExecutionParams = { application: app.name, executionId: execution ? execution.id : '' };
const executionParams = ReactInjector.$state.params.executionParams || defaultExecutionParams;

return (
<div style={{ width: '100%', paddingTop: 0 }}>
{execution && (
Expand All @@ -138,7 +141,7 @@ export class SingleExecutionDetails extends React.Component<
<div className="flex-container-h baseline">
<h3>
<Tooltip value="Back to Executions">
<UISref to="^.executions.execution" params={{ application: app.name, executionId: execution.id }}>
<UISref to="^.executions.execution" params={executionParams}>
<a className="btn btn-configure">
<span className="glyphicon glyphicon glyphicon-circle-arrow-left" />
</a>
Expand Down
3 changes: 3 additions & 0 deletions app/scripts/modules/core/src/pipeline/pipeline.states.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ module(PIPELINE_STATES, [APPLICATION_STATE_PROVIDER]).config([
views: {
pipelines: { component: SingleExecutionDetails, $type: 'react' },
},
params: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can pass a complex object as a single parameter, i.e,

params: {
  sender: null
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like that. I will update it.

executionParams: null,
},
abstract: true,
children: [executionDetails],
};
Expand Down