Adding a link next to Activity in Blue Ocean

31 views
Skip to first unread message

Eric Bartusch

unread,
May 16, 2018, 1:14:04 PM5/16/18
to Jenkins Developers

Hi,

 

I’m developing a plugin that adds a page providing additional information about pipeline runs.  I’ve gotten everything working well enough so far and the page is accessible, but I’d like to create a link to the page that users can click on.  Since it’s related to pipelines and each pipeline has their own version of the page, it’d make sense to put it right next to the Activity/Branches/Pull Requests links.  Is there an easy way for me to achieve that completely within the plugin I’m writing?  I tried looking at how the existing links work, but it all seems to be contained in the blueocean-dashboard plugin with no way to change it outside of that.

 

I watched the Extending Blue Ocean talk at Jenkins World 2017, and it sounds like using extension points is the way to go.  I have a basic understanding of extension points, but I can’t find one that is appropriate for what I’m trying to do.  Any tips?


 

Thanks,

Eric

Untitled.png

Keith Zantow

unread,
May 16, 2018, 1:16:59 PM5/16/18
to jenkin...@googlegroups.com
There's a longstanding PR for doing this. I'm sorry I don't have time at the moment to wrap it up, if you wanted to take it over that might expedite this?


Cheers,
-Keith

--
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 jenkinsci-dev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/4e8fff3d-235e-45fc-82a6-32e2ab10b7d7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Keith Zantow
Senior Software Engineer
CloudBees, Inc.

CloudBees-Logo.png


E: kza...@cloudbees.com

Eric Bartusch

unread,
May 16, 2018, 1:28:01 PM5/16/18
to Jenkins Developers
Thanks for the quick reply Keith.  I'll take a look, but I doubt I have the expertise to get it done the right way.  Regardless, at least I have a PR I can keep an eye on!

-Eric 


On Wednesday, May 16, 2018 at 12:16:59 PM UTC-5, Keith Zantow wrote:
There's a longstanding PR for doing this. I'm sorry I don't have time at the moment to wrap it up, if you wanted to take it over that might expedite this?


Cheers,
-Keith
On Wed, May 16, 2018 at 1:11 PM, Eric Bartusch <ericba...@gmail.com> wrote:

Hi,

 

I’m developing a plugin that adds a page providing additional information about pipeline runs.  I’ve gotten everything working well enough so far and the page is accessible, but I’d like to create a link to the page that users can click on.  Since it’s related to pipelines and each pipeline has their own version of the page, it’d make sense to put it right next to the Activity/Branches/Pull Requests links.  Is there an easy way for me to achieve that completely within the plugin I’m writing?  I tried looking at how the existing links work, but it all seems to be contained in the blueocean-dashboard plugin with no way to change it outside of that.

 

I watched the Extending Blue Ocean talk at Jenkins World 2017, and it sounds like using extension points is the way to go.  I have a basic understanding of extension points, but I can’t find one that is appropriate for what I’m trying to do.  Any tips?


 

Thanks,

Eric

--
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 jenkinsci-de...@googlegroups.com.

Thorsten Scherler

unread,
May 17, 2018, 12:08:04 PM5/17/18
to Jenkins Developers
You are trying to extend the tabs that currently do not have extensionpoints. However you could use https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-dashboard/src/main/js/components/PipelinePage.jsx#L111 and simply provide the component for that.

then in your jenkins-js-extension.yaml you implement jenkins.pipeline.detail.header.action and point to your component.
    
If you are bound to the location then you would need to create a new Extension-point in the tabs and then implement your component.

HTH

salu2

Keith Zantow

unread,
May 17, 2018, 2:16:05 PM5/17/18
to jenkin...@googlegroups.com
Yes, you could definitely do that for a top-level page but be aware you wouldn't have a pipeline run context, which I gathered that you need for the functionality you're looking to provide.

-Keith

To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/723965bd-0294-4a6d-85f6-8b92810304a7%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Eric Bartusch

unread,
May 17, 2018, 2:19:47 PM5/17/18
to Jenkins Developers
Hey Thorsten,

Thanks for the tip, it's a really nice workaround for the time being!  I'm not beholden to the right side, but would prefer it.  This gets me most of the way there.

-Eric

Eric Bartusch

unread,
May 17, 2018, 2:20:58 PM5/17/18
to Jenkins Developers
Keith,

For the link itself, I only need the organization/pipeline name.  All the run information I process I get through the rest API.

-Eric
Reply all
Reply to author
Forward
0 new messages