-
Bug
-
Resolution: Not A Defect
-
Major
-
None
-
jenkins master installed on linux dist.
version: 1.645
client browsers: firefox/chrome
Hi jenkins experts,
I used the following groovy code to add a button with some javascript ajax actions for triggering other jobs.
job.builds .findAll { build -> build.number == buildNumber } .each { build -> build.setDescription(""" <button type='button' onclick='javascript: console.log("OnClick Action triggered!"); var another_job = function() { new Ajax.Request("http://jenkins.alalala/hudson/job/AA_dummy_job_AUTO/build", { method: "post", parameters: {json: Object.toJSON({parameter: [{name: "SOME_JOB_PARA", value: "MY_VALUE"}]})} }); }; another_job(); location.reload();'>Do Something!</button>""") }
The button is visible in the description after the build has finished, but the onClick action is simply not created. Filtered out?
Do i have to install additional jenkins plugins to allow javascript or ajax actions? Thanks for your support!