-
Improvement
-
Resolution: Unresolved
-
Minor
ATM in the dashBoard we are doing:
export default ( <Route path="/" component={Dashboard} onChange={persistBackgroundOnNavigationChange}> ... <Route path="/pipelines" component={Pipelines} /> <Route path="/create-pipeline" component={CreatePipeline} /> <IndexRedirect to="pipelines" /> </Route>
The problem here is that <IndexRedirect to="pipelines" /> is always redirects to pipelines. However that needs to be override-able.
There has been some discussion about enhancing the router API to give us a lot more flexibility overall. But that will probably not happen within a reasonable timeframe, so let's move to discussion of a stop-gap that works but maybe isn't as nice.
We could perhaps have an extension point like "jenkins.main.routes.default.redirect" which requires a single <IndexRedirect /> element to be supplied. We could provide a default that which points to "/pipelines" but let a custom one be supplied to point elsewhere.
If multiple plugins try to contribute we need to determine who "wins". kzantow has used an "ordinal" property on extensions to allow them to be sorted, and we could use that to pick the right one from an array of default redirects.
I don't expect this to be too difficult, could whip up a PR tomorrow probably if that works for you tscherler ?