Re: Configuration Slicing plugin adoption

2020-05-21 Thread Richard Bywater
(I sent a reply to 5 hours ago but for some reason it hasn't made the list so not sure what's happening - apologies in advance for any future duplication :/) Your current pom.xml file has a non-SNAPSHOT version in it. When doing a release the process expects (as far as I know) to find a SNAPSHO

Re: Configuration Slicing plugin adoption

2020-05-21 Thread Guy Sheffer
Ran that and got this: [INFO] [INFO] BUILD FAILURE [INFO] [INFO] Total time: 25.037 s [INFO] Finished at: 2020-05-22T03:17:54+03:00 [INFO] -

Re: [Question] How to add value to a field dynamically in the UI?

2020-05-21 Thread 'Gavin Mogan' via Jenkins Developers
Thats probably fine you can also use like element.parentNode and classlist ( https://stackoverflow.com/questions/31608928/event-target-classlist-doesnt-have-indexof-method) to find the right node, but depending on your dom structure your way is probably easier) buttons[i].addEventListener('click'

Re: Configuration Slicing plugin adoption

2020-05-21 Thread Guy Sheffer
Ok, looks like it finally builds successfully in the CI. Should I tag it and release? Or do we need to do more testing first? On Tuesday, May 19, 2020 at 1:11:51 PM UTC+3, Oleg Nenashev wrote: > > So you get static analysis errors from SpotBugs. > It is important to review and clean up them event

Re: [Question] How to add value to a field dynamically in the UI?

2020-05-21 Thread Parichay Barpanda
I made a hacky solution for this by padding a random 4 digit number to secret-textbox and gen-button with RandomStringUtils.randomNumeric(4). The possibility of conflicts is less as number of properties added is usually 1-2 (max 5). What do you think? On Friday, May 22, 2020 at 4:36:36 AM UTC+5

Re: [Question] How to add value to a field dynamically in the UI?

2020-05-21 Thread Parichay Barpanda
I am kinda confused bcz this doesn't solve my problem. If I click on a button then the secret-text of that particular property should change but if all buttons have same listener then all secret-text fields will change. I want some ability to set different id to buttons in different properties(

Re: [Question] How to add value to a field dynamically in the UI?

2020-05-21 Thread 'Gavin Mogan' via Jenkins Developers
So it looks like forEach doesn't work in ie11 - https://caniuse.com/#feat=mdn-api_nodelist_foreach, so you'll have to use a normal loop, something like var buttons = document.getElementByClassName("gen-secret") for (var i = 0; i < buttons.length; i++) { buttons[i].addEventListener('click', func

Re: [Question] How to add value to a field dynamically in the UI?

2020-05-21 Thread Parichay Barpanda
Yes having adding an Id to the element instead of class solves the problem. But this config is inside a repeatableHeteroProperty which means there could be multiple buttons with the same ids which will change multiple fields so it is an issue. Can I some way get the index of individual properti

Re: [Question] How to add value to a field dynamically in the UI?

2020-05-21 Thread 'Gavin Mogan' via Jenkins Developers
Get element by class name returns an array. It should have spit out an error in your browser console. Id = one Class = sharable = many I'm guessing the button is inside a form or something? A button by itself won't do any page navigation, and it should need to be a submit button to submit a form,

Re: [Question] How to add value to a field dynamically in the UI?

2020-05-21 Thread Parichay Barpanda
Np. I am trying to create a button element: f.entry() { raw(""" Generate Secret Token """) } then the listener: raw(""" document.getElementByClassName("gen-secret").addEventListener('click', function(e) { e.preventDefault();

Re: [Question] How to add value to a field dynamically in the UI?

2020-05-21 Thread 'Gavin Mogan' via Jenkins Developers
Sorry, I got distracted when i hit enter. you want a click event for the button document.getElementById("buttonid").addEventListener('click', function(e) { document.getElementById("idname").value = "foo"; }); On Thu, May 21, 2020 at 3:11 PM Parichay Barpanda < parichay.barpa...@gmail.co

Re: [Question] How to add value to a field dynamically in the UI?

2020-05-21 Thread Parichay Barpanda
Thanks Gavin. That was helpful. :) On Fri 22 May, 2020, 03:10 'Gavin Mogan' via Jenkins Developers, < jenkinsci-dev@googlegroups.com> wrote: > document.getElementById("buttonid").addEventListener(function(e) { >document.getElementById("idname").value = "foo"; > }); > > On Thu, May 21, 202

Re: [Question] How to add value to a field dynamically in the UI?

2020-05-21 Thread 'Gavin Mogan' via Jenkins Developers
document.getElementById("buttonid").addEventListener(function(e) { document.getElementById("idname").value = "foo"; }); On Thu, May 21, 2020 at 2:27 PM Parichay Barpanda < parichay.barpa...@gmail.com> wrote: > Hi, > > I want to set value of a Describable field using an UI button. There is

[Question] How to add value to a field dynamically in the UI?

2020-05-21 Thread Parichay Barpanda
Hi, I want to set value of a Describable field using an UI button. There is a text box Token and there is a button Generate, if Generate Button is clicked then Token text box should be filled with a desired value. Thanks and Regards, Parichay -- You received this message because you are subs

Re: Adding Javascript to config.groovy

2020-05-21 Thread Parichay Barpanda
Thanks. I first saw groovy style config in GitHub Plugin and feel it more convenient over jelly because lack of IDE support make tags unreadable. On Fri, May 22, 2020 at 1:54 AM 'Gavin Mogan' via Jenkins Developers < jenkinsci-dev@googlegroups.com> wrote: > Oh wow, I didn't know that was a thing.

Re: Adding Javascript to config.groovy

2020-05-21 Thread 'Gavin Mogan' via Jenkins Developers
Oh wow, I didn't know that was a thing. Apparently you can use raw() https://github.com/jenkinsci/embeddable-build-status-plugin/blob/master/src/main/resources/org/jenkinsci/plugins/badge/actions/RunBadgeAction/index.groovy#L11-L40 My grepping didn't turn up any other options. I'd be concerned t

Re: Adding Javascript to config.groovy

2020-05-21 Thread Parichay Barpanda
Yes. See https://github.com/jenkinsci/gitlab-branch-source-plugin/blob/master/src/main/resources/io/jenkins/plugins/gitlabserverconfig/servers/GitLabServer/config.groovy On Friday, May 22, 2020 at 1:26:09 AM UTC+5:30, Gavin Mogan wrote: > > Whats a config.groovy compared to config.jelly? Are you

Re: Adding Javascript to config.groovy

2020-05-21 Thread 'Gavin Mogan' via Jenkins Developers
Whats a config.groovy compared to config.jelly? Are you writing a plugin using groovy? On Thu, May 21, 2020 at 12:54 PM Parichay Barpanda < parichay.barpa...@gmail.com> wrote: > Hi, > > I am looking for a way to add Javascript to config.groovy files in my > resources. It is possible to do so in j

Adding Javascript to config.groovy

2020-05-21 Thread Parichay Barpanda
Hi, I am looking for a way to add Javascript to config.groovy files in my resources. It is possible to do so in jelly with

Re: Jenkins 2.222.4 LTS RC testing started

2020-05-21 Thread Jesse Glick
So is 2.222.4 getting built? It was supposed to be released yesterday but https://github.com/jenkinsci/jenkins/tree/stable-2.222 has no recent activity. -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and sto

Re: Remote access API

2020-05-21 Thread Matt Sicker
You need to create an API token in your user account to authenticate. On Thu, May 21, 2020 at 6:20 AM Jayalakshmi Nair wrote: > > Hello all, > > I was looking for a lightweight method to get the build details. (As we have > a lot of builds and noticed that getBuilds method consumes a lot of time

Remote access API

2020-05-21 Thread Jayalakshmi Nair
Hello all, I was looking for a lightweight method to get the build details. (As we have a lot of builds and noticed that getBuilds method consumes a lot of time). I figured out that there is no other approach from the Jenkins methods to get the builds. Now I am trying to get the build details