Re: Trouble with dynamically updating Jelly textbox

2023-03-31 Thread Dane Wrye
You were right on the money - I have gotten my code to work after looking 
into the JavaScriptProxy!!!

Thank you very much for taking the time out of your day to help me out. I 
really appreciate it!

On Thursday, March 30, 2023 at 10:57:34 PM UTC-7 db...@cloudbees.com wrote:

> On Fri, Mar 31, 2023 at 5:43 AM Dane Wrye  wrote:
>
>> Hey All,
>>
>> I am a new to Jenkins/Jelly and trying to pick it up as I add 
>> functionality to a new codebase. With that said, I am looking at 
>> dynamically updating a textbox on my form when the selected option of a 
>> select element changes. I think I am 90% of the way there, but need a 
>> little bit of help to push me to 100%. To do this, I am currently
>>
>> a.) Calling a javascript function, updateTextbox(stringToUpdateWith), 
>> that overwrites the textbox in question's current value with 
>> stringToUpdateWith. It is called onChange from the select element.
>> b.) Calling a backend java function, 
>> getStringToUpdateWith(selectedOption), which takes in the current option 
>> from the HTML select element as a parameter and returns the string I want 
>> to update my textbox with
>> c.) Getting the currently selected option in my HTML select element, with 
>> the following code: this.options[this.selectedIndex].text
>>
>> Now, it gets a little messy: all this code is squished together in the 
>> select element's onChange, as I want to update the textbox whenever the 
>> select element is changed.
>>
>> All together, the line of code looks like this:
>> > onChange="updateTextbox('${instance.getStringToUpdateWith(this.options[this.selectedIndex].text)}')"/>
>>
>> The onChange function, which is what I am currently having trouble with, 
>> looks like this: 
>>
>> onChange="updateTextbox('${instance.getStringToUpdateWith(this.options[this.selectedIndex].text)}')"
>>
>> Debugging, it seems that the "this.options[this.selectedIndex].text" 
>> shows up in the getStringToUpdateWith function as an empty string. If I 
>> could get the selected option into this function as a parameter, I will 
>> have solved my problem. Any idea why it could be an empty string instead? I 
>> would appreciate any and all leads! 
>>
>
> You're mixing JS (code evaluated by the browser) and Jelly/JEXL (code 
> evaluated by the server) in a way that doesn't work.
>
> JEXL variables in Jelly get evaluated as the page is rendered the first 
> time (sent from server to browser). They don't update afterwards. I expect 
> you'll notice in a debugger you'll call your instance method once per page 
> load (assuming `instance` is bound to the correct value, another potential 
> source of problems), if at all, with an unexpected parameter, because 
> Jelly/JEXL cannot access JS/DOM variables.
>
> Look into JavaScriptProxy to call Java methods from JS, e.g. 
> https://weekly.ci.jenkins.io/design-library/JavaScriptProxy/ ; or use 
> fetch from JS to call web methods (usually named doWhatever), passing the 
> current value as argument that is received as @QueryParameter annotated 
> parameter of the method.
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/26de8e94-b735-45ed-9de7-264a3658382cn%40googlegroups.com.


ci.jenkins.io: rollout of Maven 3.9.1

2023-03-31 Thread Damien Duportal
Hello dear contributors!

Ths email to let you know that today, the Jenkins infrastructure team 
deployed a new version of Maven to ci.jenkins.io agents (and on the whole 
infrastructure), instead of Maven 3.9.0.

If you see any issue, please comment in 
https://github.com/jenkins-infra/helpdesk/issues/3482.

Thanks!

Damien Duportal, for the Jenkins Infra team

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/b7361d2c-2056-4c18-af5d-38833d30c29fn%40googlegroups.com.


Re: script to configure repository labels

2023-03-31 Thread 'Jesse Glick' via Jenkins Developers
On Fri, Mar 31, 2023 at 10:01 AM Tim Jacomb  wrote:

> It can be setup at the org level as a repository default, Gavin also had
> an app where you could click a button and it would set it all up for your
> repository
>

If there is something that works to at least copy labels from
`jenkinsci/.github` on a one-off basis, that would be very helpful and
ought to be documented at
https://www.jenkins.io/doc/developer/publishing/releasing-cd/ (or perhaps
elsewhere also, since it is useful even for MRP-based plugins).

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr1%3D66gWBrPQB_uFj8%2BnM%2BJg5Zpm7znt0tTYNN%3DKhCu1og%40mail.gmail.com.


Re: script to configure repository labels

2023-03-31 Thread Tim Jacomb
It can be setup at the org level as a repository default, Gavin also had an
app where you could click a button and it would set it all up for your
repository

On Fri, 31 Mar 2023 at 13:23, Ullrich Hafner 
wrote:

> I am using the action
>
>
> https://github.com/jenkinsci/warnings-ng-plugin/blob/master/.github/workflows/sync-labels.yml
>
> With the configuration in
>
>
> https://github.com/jenkinsci/warnings-ng-plugin/blob/master/.github/labels.yml
>
> In all my repositories.
>
> It uses https://github.com/micnncim/action-label-syncer internally.
>
>
> Am 31.03.2023 um 14:13 schrieb 'Herve Le Meur' via Jenkins Developers <
> jenkinsci-dev@googlegroups.com>:
>
> > I was wondering if the infra team or anyone else had already written a
> script to set the labels to the
> https://github.com/jenkinsci/.github/blob/master/.github/release-drafter.yml
> ones
>
> Not that I know but I think it's a good idea! I encountered the same need
> on jenkins-infra repositories.
>
> > Additionally if the standard colours for the labels had been defined
> somewhere to avoid having conflicting label colours.
>
> Same.
>
> Do you mind opening a help desk issue with this request?
>
> On Fri, Mar 31, 2023 at 1:46 PM 'jn...@cloudbees.com' via Jenkins
> Developers  wrote:
>
>> Hi all,
>>
>> When modernising a plugin I find the tedious part is to create all the
>> labels for both CD releases and the release notes.
>>
>> it's time consuming to find a reference repo and then duplicate the
>> labels (and their colours) to the repo I am updating.
>>
>> As this is not an uncommon task I was wondering if the infra team or
>> anyone else had already written a script to set the labels to the
>> https://github.com/jenkinsci/.github/blob/master/.github/release-drafter.yml
>> ones that I was unaware?
>> Additionally if the standard colours for the labels had been defined
>> somewhere to avoid having conflicting label colours.
>>
>> /James
>>
>> --
>> 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+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/jenkinsci-dev/2e3f2933-00be-4bf7-b340-6be50484e0a9n%40googlegroups.com
>> 
>> .
>>
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-dev/CAL-Lwjwm7gOXg9%3DE2e1du2F%2BpRVypWH1zK%3DZE2Zib9CvQop6ew%40mail.gmail.com
> 
> .
>
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-dev/6BEDA057-4C9C-4E9B-BDFD-E6899314F1E9%40gmail.com
> 
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CAH-3Bie2HXebm52EkbBEcBw3%2BL35YkSr6Rw1fxazvm8cdTZwEA%40mail.gmail.com.


Re: script to configure repository labels

2023-03-31 Thread Ullrich Hafner
I am using the action

https://github.com/jenkinsci/warnings-ng-plugin/blob/master/.github/workflows/sync-labels.yml

With the configuration in 

https://github.com/jenkinsci/warnings-ng-plugin/blob/master/.github/labels.yml

In all my repositories.

It uses https://github.com/micnncim/action-label-syncer internally.


> Am 31.03.2023 um 14:13 schrieb 'Herve Le Meur' via Jenkins Developers 
> :
> 
> > I was wondering if the infra team or anyone else had already written a 
> > script to set the labels to the 
> > https://github.com/jenkinsci/.github/blob/master/.github/release-drafter.yml
> >  ones
> 
> Not that I know but I think it's a good idea! I encountered the same need on 
> jenkins-infra repositories.
> 
> > Additionally if the standard colours for the labels had been defined 
> > somewhere to avoid having conflicting label colours.
> 
> Same.
> 
> Do you mind opening a help desk issue with this request?
> 
> On Fri, Mar 31, 2023 at 1:46 PM 'jn...@cloudbees.com 
> ' via Jenkins Developers 
> mailto:jenkinsci-dev@googlegroups.com>> 
> wrote:
>> Hi all,
>> 
>> When modernising a plugin I find the tedious part is to create all the 
>> labels for both CD releases and the release notes.
>> 
>> it's time consuming to find a reference repo and then duplicate the labels 
>> (and their colours) to the repo I am updating.
>> 
>> As this is not an uncommon task I was wondering if the infra team or anyone 
>> else had already written a script to set the labels to the 
>> https://github.com/jenkinsci/.github/blob/master/.github/release-drafter.yml 
>> ones that I was unaware?
>> Additionally if the standard colours for the labels had been defined 
>> somewhere to avoid having conflicting label colours.
>> 
>> /James
>> 
>> -- 
>> 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+unsubscr...@googlegroups.com 
>> .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jenkinsci-dev/2e3f2933-00be-4bf7-b340-6be50484e0a9n%40googlegroups.com
>>  
>> .
> 
> 
> -- 
> 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+unsubscr...@googlegroups.com 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-dev/CAL-Lwjwm7gOXg9%3DE2e1du2F%2BpRVypWH1zK%3DZE2Zib9CvQop6ew%40mail.gmail.com
>  
> .

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/6BEDA057-4C9C-4E9B-BDFD-E6899314F1E9%40gmail.com.


Re: script to configure repository labels

2023-03-31 Thread 'Herve Le Meur' via Jenkins Developers
> I was wondering if the infra team or anyone else had already written a
script to set the labels to the
https://github.com/jenkinsci/.github/blob/master/.github/release-drafter.yml
ones

Not that I know but I think it's a good idea! I encountered the same need
on jenkins-infra repositories.

> Additionally if the standard colours for the labels had been defined
somewhere to avoid having conflicting label colours.

Same.

Do you mind opening a help desk issue with this request?

On Fri, Mar 31, 2023 at 1:46 PM 'jn...@cloudbees.com' via Jenkins
Developers  wrote:

> Hi all,
>
> When modernising a plugin I find the tedious part is to create all the
> labels for both CD releases and the release notes.
>
> it's time consuming to find a reference repo and then duplicate the labels
> (and their colours) to the repo I am updating.
>
> As this is not an uncommon task I was wondering if the infra team or
> anyone else had already written a script to set the labels to the
> https://github.com/jenkinsci/.github/blob/master/.github/release-drafter.yml
> ones that I was unaware?
> Additionally if the standard colours for the labels had been defined
> somewhere to avoid having conflicting label colours.
>
> /James
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-dev/2e3f2933-00be-4bf7-b340-6be50484e0a9n%40googlegroups.com
> 
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CAL-Lwjwm7gOXg9%3DE2e1du2F%2BpRVypWH1zK%3DZE2Zib9CvQop6ew%40mail.gmail.com.


script to configure repository labels

2023-03-31 Thread 'jn...@cloudbees.com' via Jenkins Developers
Hi all,

When modernising a plugin I find the tedious part is to create all the 
labels for both CD releases and the release notes.

it's time consuming to find a reference repo and then duplicate the labels 
(and their colours) to the repo I am updating.

As this is not an uncommon task I was wondering if the infra team or anyone 
else had already written a script to set the labels to the 
https://github.com/jenkinsci/.github/blob/master/.github/release-drafter.yml 
ones that I was unaware?
Additionally if the standard colours for the labels had been defined 
somewhere to avoid having conflicting label colours.

/James

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/2e3f2933-00be-4bf7-b340-6be50484e0a9n%40googlegroups.com.


Adoption Request: global-build-stats

2023-03-31 Thread Victor Balakine
 Hi,

I would like to become a maintainer for global-build-stats plugin. It 
bothers me that there is a security vulnerability message in my Jenkins 
interface.

   - 
   
   Link to a plugin I want to adopt: 
   https://plugins.jenkins.io/global-build-stats/
   - 
   
   The status of the plugin: for adoption
   - 
   
   Link to the pull request I want to deliver: 
   https://github.com/jenkinsci/global-build-stats-plugin/pull/38
   - 
   
   GitHub username/id: balakine
   - 
   
   Jenkins infrastructure account id: victor_yousician
   - 
   
   The link to the "Repository Permission Updater" PR: 
   https://github.com/jenkins-infra/repository-permissions-updater/pull/3226
   

Best regards,

Victor

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/e2e84e2f-2ced-467f-8a2b-9b16419f9898n%40googlegroups.com.