How do I associate an index.jelly file with a given Action class?

15 views
Skip to first unread message

Moshe Cohen

unread,
Aug 2, 2016, 4:41:51 PM8/2/16
to Jenkins Developers
I began with posting Displaying HTML only in the main-panel  yesterday, but came to realize
that my question is more basic:

How do I associate an index.jelly file with a given Action class.  I have tried putting the file in all sorts of places but with no success.

A pointer to a plugin Github repo that does it will be very helpful.

TIA

Daniel Beck

unread,
Aug 2, 2016, 4:53:00 PM8/2/16
to jenkin...@googlegroups.com

> On 02.08.2016, at 22:41, Moshe Cohen <mos...@gmail.com> wrote:
>
> How do I associate an index.jelly file with a given Action class. I have tried putting the file in all sorts of places but with no success.

While our developer documentation is lacking in some advanced topics, the basics are all there.

The documentation:
https://wiki.jenkins-ci.org/display/JENKINS/Basic+guide+to+Jelly+usage+in+Jenkins#BasicguidetoJellyusageinJenkins-UISamples

You can also see this pattern in basically ALL plugins. There's a good chance that the first plugin repo you pick follows this pattern.

The class (not an Action, but the pattern is the same):
https://github.com/jenkinsci/ui-samples-plugin/blob/master/src/main/java/jenkins/plugins/ui_samples/AutoCompleteTextBox.java

The resources folder where you place the views, corresponding to the class name:
https://github.com/jenkinsci/ui-samples-plugin/tree/master/src/main/resources/jenkins/plugins/ui_samples/AutoCompleteTextBox


Moshe Cohen

unread,
Aug 2, 2016, 6:33:17 PM8/2/16
to jenkin...@googlegroups.com
Thank you.
This is very helpful.
It is very confusing to go by the docs alone.



--
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/FBFB861A-9CF2-4016-B609-04A9173E8D3F%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.

Daniel Beck

unread,
Aug 2, 2016, 7:33:13 PM8/2/16
to jenkin...@googlegroups.com

> On 03.08.2016, at 00:32, Moshe Cohen <mos...@gmail.com> wrote:
>
> It is very confusing to go by the docs alone.

I'd appreciate if you could be more specific as to what's confusing. That'll help us make the documentation better.

Moshe Cohen

unread,
Aug 2, 2016, 7:50:17 PM8/2/16
to jenkin...@googlegroups.com
Sure.
Information is spread out in many different docs.
After you know what to do, you realize that it was really written somewhere, but for a beginner trying to learn, it is not very useful.

I think the best way forward with docs is to enhance the tutorial and have many more examples.
The tutorial was very helpful for me to create my own build step, I started with the tutorial code and modified it to my needs.
So, if for example there tutorial (or maybe a 2nd advanced tutorial) took the reader through building a more advanced GUI, with Actions and several screens, it would have really helped.

BTW, I am now trying to figure out, and not managing using the docs I see (nor UI samples) how to replace only the main-panel part of a page, while leaving the rest of the stuff, especially the side-panel with the usual links, as they are.
I saw such a plugin in action once, but I can't find one now for reference.

--
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.
Reply all
Reply to author
Forward
0 new messages