Is there a way to hide default actions?

65 views
Skip to first unread message

Ivo Bellin Salarin

unread,
Jun 18, 2015, 3:23:56 PM6/18/15
to jenkin...@googlegroups.com

Hi all,

Apart from a specially crafted CSS, is there any way to hide default Jenkins action?

For example, the Build Now action.. I have developed a custom action, which basically does a BuildWithParams with a variable set of default parameters. I would like to hide the Build Now action, in order to avoid user confusion.

Is there any way to change icons visibility?

Have a good day,
Ivo

Ivo Bellin Salarin

unread,
Jun 19, 2015, 12:11:57 AM6/19/15
to jenkin...@googlegroups.com
I have had a look at the greenballs plugin, it seems a good place to start.

There's even a smaller example, in the filter_sample repository
(https://github.com/kiy0taka/filter_sample/blob/master/src/main/java/com/kanjava/jenkins/plugins/filtersample/SampleFilter.java)

This should address the described need.

If somebody known a more efficient way, thanks to reply! :-)
--
http://www.nilleb.com

ogondza

unread,
Jun 19, 2015, 4:37:09 AM6/19/15
to jenkin...@googlegroups.com
There already is a plugin that injects parameters via URL already[1]. In that particular case it is the _plugin's_ URL that was hidden as it was causing confusion to users and was accessed by pre-generated URLs most of the time.


--
oliver

Ivo Bellin Salarin

unread,
Jun 19, 2015, 8:07:03 AM6/19/15
to jenkin...@googlegroups.com
I have seen the plugin, thanks Oliver.

I would like to do the opposite: replace the old action with the new
one that I've implemented.
My contractors are confused by the presence of two similar icons, and
they would like to preserve the one nearest to their reality.
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-dev/da306393-1def-4246-b346-19b3c069f48f%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
http://www.nilleb.com

ogondza

unread,
Jun 19, 2015, 9:13:45 AM6/19/15
to jenkin...@googlegroups.com
I am not familiar with the plugin implementation enough, though I see no reason why such behaviour should not be in core as well. Anyway, having 2 plugins that does to same with slightly different defaults sounds odd to me.

How about adding an option to the existing plugin that would register servlet filter to replace core's own `build` action by plugin's implementation?

--
oliver

Daniel Beck

unread,
Jun 19, 2015, 9:24:03 AM6/19/15
to jenkin...@googlegroups.com

On 19.06.2015, at 15:13, ogondza <ogo...@gmail.com> wrote:

> I see no reason why such behaviour should not be in core as well.

I started working on something like this a while back.

https://github.com/daniel-beck/jenkins/commit/d9f140904b7850c77f68829b2161d8d2ee39e85c

Maybe it's time to finish this.

Unfortunately my approach required adding specific support in the parameter types.

Ivo Bellin Salarin

unread,
Jun 19, 2015, 3:28:53 PM6/19/15
to jenkin...@googlegroups.com


Il 19/giu/2015 03:13 PM, "ogondza" <ogo...@gmail.com> ha scritto:

> How about adding an option to the existing plugin that would register servlet filter to replace core's own `build` action by plugin's implementation?

That would be great. I'll explore this opportunity in my customer implementation, and bring back some bits if possible.

Have a good weekend everyone!

Reply all
Reply to author
Forward
0 new messages