On Sat, Jan 28, 2017 at 4:22 AM, Gijs <[email protected]> wrote:
> My first question was perhaps not stated completely clearly (the part of
> injecting a REST route using ApiRoutable I had already figured out) but my
> question was meant to be about the Javascript/React side of things, there
> it uses the 'jenkins.main.routes' extension point to concatenate all the
> extensions' Routing tables together in the makeRoutes function. And there
> it seems to not be possible to inject something inside of the hierarchy,
> sure I could add the following:
>
> <Route path="/organizations/:organization/pipeline/:pipeline/my-page"
> componenet={MyComponent}/>
>
> But I'd lose all the components and context that other urls there have,
> and I'd have to build that up manually myself. Maybe this is the wrong way
> to go about this, and as BlueOcean is still pretty new maybe all the ways
> of extending it haven't been worked out yet. I'm just curious to know how
> one would go about adding information/actions/charts/what have you to
> jobs and runs as a lot of plugins do today.
>
Some pieces of extensions are there others still being worked on. Try to
ping kzantow in #jenkins-ux IRC room, he's been working out pretty exciting
stuff in this area.
>
> As for my second question, none of those links I got to work, that's why I
> ended up using the /actions/{index}/ endpoint. And from what I understand
> (and see in the Stapler 404 page) `/blue/rest/organizations/jenkins/
> pipelines/blueocean/branches/PR-752/test/` would take the BranchImpl for
> PR-752 and try to get "test" from it, but BranchImpl or its ancestors do
> not implement any method to dynamically get an action based on its urlName
> as far as I can find it, it also doesn't implement StaplerProxy. Am I
> looking in the wrong place?
>
See AbstractionPipelineImpl.getActions()
<https://github.com/jenkinsci/blueocean-plugin/blob/f6cbe5f9f817c1aa025eae8f22eb37394ec687ea/blueocean-rest-impl/src/main/java/io/jenkins/blueocean/service/embedded/rest/AbstractPipelineImpl.java#L109>,
BranchImpl or PipelineImpl extends from it.
--
You received this message because you are subscribed to the Google Groups
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-dev/CAKT4V1886X2m71EZgCMOS4Lb2sXPrtv9uNGWRcuA1A1iVoaZvQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.