Plugin Development - Ajax Example

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Plugin Development - Ajax Example

Aytunc Beken
Hi,

I am trying to implement Ajax call in UI page. I could only find this page (https://wiki.jenkins.io/display/JENKINS/AJAX+with+JavaScript+proxy) however it did not worked.

I will be glad if anyone can point some help.

- Documentation
- Plugin implemented Ajax
- Plugin implemented Jquery


Thanks a lot.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/282cb068-a394-40aa-a15c-4eb1bd5d6c8b%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Plugin Development - Ajax Example

Oleg Nenashev
Jenkins Build History widget is probably the best example of AJAX usage in Jenkins: 
BR, Oleg

On Tuesday, May 19, 2020 at 3:35:15 PM UTC+2, Aytunc Beken wrote:
Hi,

I am trying to implement Ajax call in UI page. I could only find this page (<a href="https://wiki.jenkins.io/display/JENKINS/AJAX+with+JavaScript+proxy" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwiki.jenkins.io%2Fdisplay%2FJENKINS%2FAJAX%2Bwith%2BJavaScript%2Bproxy\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGi37xi-XwVeY8V0Ll3g3A3lEiqWA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwiki.jenkins.io%2Fdisplay%2FJENKINS%2FAJAX%2Bwith%2BJavaScript%2Bproxy\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGi37xi-XwVeY8V0Ll3g3A3lEiqWA&#39;;return true;">https://wiki.jenkins.io/display/JENKINS/AJAX+with+JavaScript+proxy) however it did not worked.

I will be glad if anyone can point some help.

- Documentation
- Plugin implemented Ajax
- Plugin implemented Jquery


Thanks a lot.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/d36ea803-bdb6-4553-be1c-ddeeb74c2c37%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Plugin Development - Ajax Example

Aytunc Beken
I will check. Thanks!

On Tuesday, May 19, 2020 at 3:57:27 PM UTC+2, Oleg Nenashev wrote:
Jenkins Build History widget is probably the best example of AJAX usage in Jenkins: 
  • JAVA: <a href="https://github.com/jenkinsci/jenkins/blob/449c5aced523a6e66fe3d6a804e5dbfd5c5c67c6/core/src/main/java/hudson/widgets/HistoryWidget.java#L210-L256" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjenkinsci%2Fjenkins%2Fblob%2F449c5aced523a6e66fe3d6a804e5dbfd5c5c67c6%2Fcore%2Fsrc%2Fmain%2Fjava%2Fhudson%2Fwidgets%2FHistoryWidget.java%23L210-L256\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFz1KdXZvAHelTdPA2yFeA-4WNOKA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjenkinsci%2Fjenkins%2Fblob%2F449c5aced523a6e66fe3d6a804e5dbfd5c5c67c6%2Fcore%2Fsrc%2Fmain%2Fjava%2Fhudson%2Fwidgets%2FHistoryWidget.java%23L210-L256\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFz1KdXZvAHelTdPA2yFeA-4WNOKA&#39;;return true;">https://github.com/jenkinsci/jenkins/blob/449c5aced523a6e66fe3d6a804e5dbfd5c5c67c6/core/src/main/java/hudson/widgets/HistoryWidget.java#L210-L256
  • Jelly with embedded JavaScriptL <a href="https://github.com/jenkinsci/jenkins/blob/master/core/src/main/resources/hudson/widgets/HistoryWidget/index.jelly#L79-L115" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjenkinsci%2Fjenkins%2Fblob%2Fmaster%2Fcore%2Fsrc%2Fmain%2Fresources%2Fhudson%2Fwidgets%2FHistoryWidget%2Findex.jelly%23L79-L115\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFoNxcj1_u-r4TBp7QSpEbFiPMcLg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjenkinsci%2Fjenkins%2Fblob%2Fmaster%2Fcore%2Fsrc%2Fmain%2Fresources%2Fhudson%2Fwidgets%2FHistoryWidget%2Findex.jelly%23L79-L115\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFoNxcj1_u-r4TBp7QSpEbFiPMcLg&#39;;return true;">https://github.com/jenkinsci/jenkins/blob/master/core/src/main/resources/hudson/widgets/HistoryWidget/index.jelly#L79-L115
BR, Oleg

On Tuesday, May 19, 2020 at 3:35:15 PM UTC+2, Aytunc Beken wrote:
Hi,

I am trying to implement Ajax call in UI page. I could only find this page (<a href="https://wiki.jenkins.io/display/JENKINS/AJAX+with+JavaScript+proxy" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwiki.jenkins.io%2Fdisplay%2FJENKINS%2FAJAX%2Bwith%2BJavaScript%2Bproxy\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGi37xi-XwVeY8V0Ll3g3A3lEiqWA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwiki.jenkins.io%2Fdisplay%2FJENKINS%2FAJAX%2Bwith%2BJavaScript%2Bproxy\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGi37xi-XwVeY8V0Ll3g3A3lEiqWA&#39;;return true;">https://wiki.jenkins.io/display/JENKINS/AJAX+with+JavaScript+proxy) however it did not worked.

I will be glad if anyone can point some help.

- Documentation
- Plugin implemented Ajax
- Plugin implemented Jquery


Thanks a lot.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/15189aee-5005-46a0-9569-36e24a70e02c%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Plugin Development - Ajax Example

Ulli Hafner
You can also have a look at some plugins that use the new JS UI components (bootstrap, charts, datatables). All of these plugins use Ajax to populate charts and tables: they also use the techniques described in the wiki and I can confirm that it works! What exactly is not working in your plugin?

The plugins that use these JA Ajax elements are 
- warnings plugin 
- forensics plugin
- autograding plugin


Am 19.05.2020 um 15:58 schrieb Aytunc Beken <[hidden email]>:

I will check. Thanks!

On Tuesday, May 19, 2020 at 3:57:27 PM UTC+2, Oleg Nenashev wrote:
Jenkins Build History widget is probably the best example of AJAX usage in Jenkins: 
BR, Oleg

On Tuesday, May 19, 2020 at 3:35:15 PM UTC+2, Aytunc Beken wrote:
Hi,

I am trying to implement Ajax call in UI page. I could only find this page (https://wiki.jenkins.io/display/JENKINS/AJAX+with+JavaScript+proxy) however it did not worked.

I will be glad if anyone can point some help.

- Documentation
- Plugin implemented Ajax
- Plugin implemented Jquery


Thanks a lot.


-- 
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/15189aee-5005-46a0-9569-36e24a70e02c%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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/2483942C-E728-4FF7-9D0C-23C983E64453%40gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Plugin Development - Ajax Example

Gavin Mogan
Ajax.Request is actually prototype, and I strongly recommend not using it, as its incredibly old and has messed with a lot of standard apis.

I recommend using jquery, or the native alternatives (XMLHttpRequest/fetch)

http://youmightnotneedjquery.com/ (search for ajax) has some good examples

On Tue, May 19, 2020 at 11:49 AM Ullrich Hafner <[hidden email]> wrote:
You can also have a look at some plugins that use the new JS UI components (bootstrap, charts, datatables). All of these plugins use Ajax to populate charts and tables: they also use the techniques described in the wiki and I can confirm that it works! What exactly is not working in your plugin?

The plugins that use these JA Ajax elements are 
- warnings plugin 
- forensics plugin
- autograding plugin


Am 19.05.2020 um 15:58 schrieb Aytunc Beken <[hidden email]>:

I will check. Thanks!

On Tuesday, May 19, 2020 at 3:57:27 PM UTC+2, Oleg Nenashev wrote:
Jenkins Build History widget is probably the best example of AJAX usage in Jenkins: 
BR, Oleg

On Tuesday, May 19, 2020 at 3:35:15 PM UTC+2, Aytunc Beken wrote:
Hi,

I am trying to implement Ajax call in UI page. I could only find this page (https://wiki.jenkins.io/display/JENKINS/AJAX+with+JavaScript+proxy) however it did not worked.

I will be glad if anyone can point some help.

- Documentation
- Plugin implemented Ajax
- Plugin implemented Jquery


Thanks a lot.


-- 
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/15189aee-5005-46a0-9569-36e24a70e02c%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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/2483942C-E728-4FF7-9D0C-23C983E64453%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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CAG%3D_Dus1HAE1dFi8EDp9UxCV645faY05fNz0Jjhhore%3DZBM4RA%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Plugin Development - Ajax Example

Ulli Hafner
The problem with the alternatives is that they have no server counterpart. Or how do you route the requests to the Java model when using jQuery directly?

Am 19.05.2020 um 20:52 schrieb 'Gavin Mogan' via Jenkins Developers <[hidden email]>:

Ajax.Request is actually prototype, and I strongly recommend not using it, as its incredibly old and has messed with a lot of standard apis.

I recommend using jquery, or the native alternatives (XMLHttpRequest/fetch)

http://youmightnotneedjquery.com/ (search for ajax) has some good examples

On Tue, May 19, 2020 at 11:49 AM Ullrich Hafner <[hidden email]> wrote:
You can also have a look at some plugins that use the new JS UI components (bootstrap, charts, datatables). All of these plugins use Ajax to populate charts and tables: they also use the techniques described in the wiki and I can confirm that it works! What exactly is not working in your plugin?

The plugins that use these JA Ajax elements are 
- warnings plugin 
- forensics plugin
- autograding plugin


Am 19.05.2020 um 15:58 schrieb Aytunc Beken <[hidden email]>:

I will check. Thanks!

On Tuesday, May 19, 2020 at 3:57:27 PM UTC+2, Oleg Nenashev wrote:
Jenkins Build History widget is probably the best example of AJAX usage in Jenkins: 
BR, Oleg

On Tuesday, May 19, 2020 at 3:35:15 PM UTC+2, Aytunc Beken wrote:
Hi,

I am trying to implement Ajax call in UI page. I could only find this page (https://wiki.jenkins.io/display/JENKINS/AJAX+with+JavaScript+proxy) however it did not worked.

I will be glad if anyone can point some help.

- Documentation
- Plugin implemented Ajax
- Plugin implemented Jquery


Thanks a lot.


-- 
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/15189aee-5005-46a0-9569-36e24a70e02c%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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/2483942C-E728-4FF7-9D0C-23C983E64453%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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CAG%3D_Dus1HAE1dFi8EDp9UxCV645faY05fNz0Jjhhore%3DZBM4RA%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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/8FFD60D6-E404-4F7A-A6D8-5D2FA973AFBA%40gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Plugin Development - Ajax Example

Gavin Mogan
Uh, prototype is a frontend library, it doesn't actually expose things. I think any of the doName (like doAjax) expose as web GETters

var request = new XMLHttpRequest();
request.open('GET', "${it.baseUrl}/buildHistory/all", true);

request.onload = function() {
  if (this.status >= 200 && this.status < 400) {
    // Success!
    var hist = $$("buildHistory");

    var newhist = document.createElement('div');
    newhist.innerHTML = this.response.text;
    newhist.headers = hist.headers

    relace(hist, newhist);
    fireBuildHistoryChanged();
  } else {
    // We reached our target server, but it returned an error
  }
};

request.onerror = function() {
  // There was a connection error of some sort
};

request.send();

```


```
              new Ajax.Request("${it.baseUrl}/buildHistory/all",{
                method: "get",
                onComplete: function(rsp,_) {
                  <!-- neither outerHTML nor responseXML works in Firefox 2.0 -->
                  var hist = $$("buildHistory");

                  var newhist = document.createElement('div');
                  newhist.innerHTML = rsp.responseText;
                  newhist.headers = hist.headers

                  replace(hist, newhist);
                  fireBuildHistoryChanged();
                }
            });
            }
```
becomes
```


On Tue, May 19, 2020 at 12:27 PM Ullrich Hafner <[hidden email]> wrote:
The problem with the alternatives is that they have no server counterpart. Or how do you route the requests to the Java model when using jQuery directly?

Am 19.05.2020 um 20:52 schrieb 'Gavin Mogan' via Jenkins Developers <[hidden email]>:

Ajax.Request is actually prototype, and I strongly recommend not using it, as its incredibly old and has messed with a lot of standard apis.

I recommend using jquery, or the native alternatives (XMLHttpRequest/fetch)

http://youmightnotneedjquery.com/ (search for ajax) has some good examples

On Tue, May 19, 2020 at 11:49 AM Ullrich Hafner <[hidden email]> wrote:
You can also have a look at some plugins that use the new JS UI components (bootstrap, charts, datatables). All of these plugins use Ajax to populate charts and tables: they also use the techniques described in the wiki and I can confirm that it works! What exactly is not working in your plugin?

The plugins that use these JA Ajax elements are 
- warnings plugin 
- forensics plugin
- autograding plugin


Am 19.05.2020 um 15:58 schrieb Aytunc Beken <[hidden email]>:

I will check. Thanks!

On Tuesday, May 19, 2020 at 3:57:27 PM UTC+2, Oleg Nenashev wrote:
Jenkins Build History widget is probably the best example of AJAX usage in Jenkins: 
BR, Oleg

On Tuesday, May 19, 2020 at 3:35:15 PM UTC+2, Aytunc Beken wrote:
Hi,

I am trying to implement Ajax call in UI page. I could only find this page (https://wiki.jenkins.io/display/JENKINS/AJAX+with+JavaScript+proxy) however it did not worked.

I will be glad if anyone can point some help.

- Documentation
- Plugin implemented Ajax
- Plugin implemented Jquery


Thanks a lot.


-- 
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/15189aee-5005-46a0-9569-36e24a70e02c%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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/2483942C-E728-4FF7-9D0C-23C983E64453%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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CAG%3D_Dus1HAE1dFi8EDp9UxCV645faY05fNz0Jjhhore%3DZBM4RA%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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/8FFD60D6-E404-4F7A-A6D8-5D2FA973AFBA%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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CAG%3D_DuvY6yKmHzvVzTh%3DphAF5ywUCyxmUxSdn3eNpp%3DGDnBKBQ%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Plugin Development - Ajax Example

Aytunc Beken
Hi,

Finally solved the problem with JavaScriptMethod.

For the problem was in Script side.

I had the change the ${instance} to ${it}

var pipelineAsYamlSnippetizer = <st:bind value="${it}" />

Thank you all for the help.


On Tuesday, May 19, 2020 at 9:33:35 PM UTC+2, Gavin Mogan wrote:
Uh, prototype is a frontend library, it doesn't actually expose things. I think any of the doName (like doAjax) expose as web GETters

var request = new XMLHttpRequest();
request.open('GET', "${it.baseUrl}/buildHistory/all", true);

request.onload = function() {
  if (this.status >= 200 && this.status < 400) {
    // Success!
    var hist = $$("buildHistory");

    var newhist = document.createElement('div');
    newhist.innerHTML = this.response.text;
    newhist.headers = hist.headers

    relace(hist, newhist);
    fireBuildHistoryChanged();
  } else {
    // We reached our target server, but it returned an error
  }
};

request.onerror = function() {
  // There was a connection error of some sort
};

request.send();

```


```
              new Ajax.Request("${it.baseUrl}/buildHistory/all",{
                method: "get",
                onComplete: function(rsp,_) {
                  <!-- neither outerHTML nor responseXML works in Firefox 2.0 -->
                  var hist = $$("buildHistory");

                  var newhist = document.createElement('div');
                  newhist.innerHTML = rsp.responseText;
                  newhist.headers = hist.headers

                  replace(hist, newhist);
                  fireBuildHistoryChanged();
                }
            });
            }
```
becomes
```


On Tue, May 19, 2020 at 12:27 PM Ullrich Hafner <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="3LRiJ2SCAAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">ullric...@...> wrote:
The problem with the alternatives is that they have no server counterpart. Or how do you route the requests to the Java model when using jQuery directly?

Am 19.05.2020 um 20:52 schrieb 'Gavin Mogan' via Jenkins Developers <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="3LRiJ2SCAAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jenkin...@googlegroups.com>:

Ajax.Request is actually prototype, and I strongly recommend not using it, as its incredibly old and has messed with a lot of standard apis.

I recommend using jquery, or the native alternatives (XMLHttpRequest/fetch)

<a href="http://youmightnotneedjquery.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fyoumightnotneedjquery.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGoxt0W8HdmWB5coDN1oNFY8ZgGEg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fyoumightnotneedjquery.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGoxt0W8HdmWB5coDN1oNFY8ZgGEg&#39;;return true;">http://youmightnotneedjquery.com/ (search for ajax) has some good examples

On Tue, May 19, 2020 at 11:49 AM Ullrich Hafner <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="3LRiJ2SCAAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">ullric...@...> wrote:
You can also have a look at some plugins that use the new JS UI components (bootstrap, charts, datatables). All of these plugins use Ajax to populate charts and tables: they also use the techniques described in the wiki and I can confirm that it works! What exactly is not working in your plugin?

The plugins that use these JA Ajax elements are 
- warnings plugin 
- forensics plugin
- autograding plugin


Am 19.05.2020 um 15:58 schrieb Aytunc Beken <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="3LRiJ2SCAAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">aytunc...@...>:

I will check. Thanks!

On Tuesday, May 19, 2020 at 3:57:27 PM UTC+2, Oleg Nenashev wrote:
Jenkins Build History widget is probably the best example of AJAX usage in Jenkins: 
  • JAVA: <a href="https://github.com/jenkinsci/jenkins/blob/449c5aced523a6e66fe3d6a804e5dbfd5c5c67c6/core/src/main/java/hudson/widgets/HistoryWidget.java#L210-L256" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjenkinsci%2Fjenkins%2Fblob%2F449c5aced523a6e66fe3d6a804e5dbfd5c5c67c6%2Fcore%2Fsrc%2Fmain%2Fjava%2Fhudson%2Fwidgets%2FHistoryWidget.java%23L210-L256\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFz1KdXZvAHelTdPA2yFeA-4WNOKA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjenkinsci%2Fjenkins%2Fblob%2F449c5aced523a6e66fe3d6a804e5dbfd5c5c67c6%2Fcore%2Fsrc%2Fmain%2Fjava%2Fhudson%2Fwidgets%2FHistoryWidget.java%23L210-L256\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFz1KdXZvAHelTdPA2yFeA-4WNOKA&#39;;return true;">https://github.com/jenkinsci/jenkins/blob/449c5aced523a6e66fe3d6a804e5dbfd5c5c67c6/core/src/main/java/hudson/widgets/HistoryWidget.java#L210-L256
  • Jelly with embedded JavaScriptL <a href="https://github.com/jenkinsci/jenkins/blob/master/core/src/main/resources/hudson/widgets/HistoryWidget/index.jelly#L79-L115" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjenkinsci%2Fjenkins%2Fblob%2Fmaster%2Fcore%2Fsrc%2Fmain%2Fresources%2Fhudson%2Fwidgets%2FHistoryWidget%2Findex.jelly%23L79-L115\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFoNxcj1_u-r4TBp7QSpEbFiPMcLg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjenkinsci%2Fjenkins%2Fblob%2Fmaster%2Fcore%2Fsrc%2Fmain%2Fresources%2Fhudson%2Fwidgets%2FHistoryWidget%2Findex.jelly%23L79-L115\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFoNxcj1_u-r4TBp7QSpEbFiPMcLg&#39;;return true;">https://github.com/jenkinsci/jenkins/blob/master/core/src/main/resources/hudson/widgets/HistoryWidget/index.jelly#L79-L115
BR, Oleg

On Tuesday, May 19, 2020 at 3:35:15 PM UTC+2, Aytunc Beken wrote:
Hi,

I am trying to implement Ajax call in UI page. I could only find this page (<a href="https://wiki.jenkins.io/display/JENKINS/AJAX+with+JavaScript+proxy" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwiki.jenkins.io%2Fdisplay%2FJENKINS%2FAJAX%2Bwith%2BJavaScript%2Bproxy\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGi37xi-XwVeY8V0Ll3g3A3lEiqWA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwiki.jenkins.io%2Fdisplay%2FJENKINS%2FAJAX%2Bwith%2BJavaScript%2Bproxy\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGi37xi-XwVeY8V0Ll3g3A3lEiqWA&#39;;return true;">https://wiki.jenkins.io/display/JENKINS/AJAX+with+JavaScript+proxy) however it did not worked.

I will be glad if anyone can point some help.

- Documentation
- Plugin implemented Ajax
- Plugin implemented Jquery


Thanks a lot.


-- 
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 <a href="javascript:" style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank" gdf-obfuscated-mailto="3LRiJ2SCAAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jenkin...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-dev/15189aee-5005-46a0-9569-36e24a70e02c%40googlegroups.com?utm_medium=email&amp;utm_source=footer" style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-dev/15189aee-5005-46a0-9569-36e24a70e02c%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-dev/15189aee-5005-46a0-9569-36e24a70e02c%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-dev/15189aee-5005-46a0-9569-36e24a70e02c%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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="3LRiJ2SCAAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jenkin...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-dev/2483942C-E728-4FF7-9D0C-23C983E64453%40gmail.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-dev/2483942C-E728-4FF7-9D0C-23C983E64453%40gmail.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-dev/2483942C-E728-4FF7-9D0C-23C983E64453%40gmail.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-dev/2483942C-E728-4FF7-9D0C-23C983E64453%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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="3LRiJ2SCAAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jenkin...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-dev/CAG%3D_Dus1HAE1dFi8EDp9UxCV645faY05fNz0Jjhhore%3DZBM4RA%40mail.gmail.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-dev/CAG%3D_Dus1HAE1dFi8EDp9UxCV645faY05fNz0Jjhhore%3DZBM4RA%40mail.gmail.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-dev/CAG%3D_Dus1HAE1dFi8EDp9UxCV645faY05fNz0Jjhhore%3DZBM4RA%40mail.gmail.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-dev/CAG%3D_Dus1HAE1dFi8EDp9UxCV645faY05fNz0Jjhhore%3DZBM4RA%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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="3LRiJ2SCAAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jenkin...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-dev/8FFD60D6-E404-4F7A-A6D8-5D2FA973AFBA%40gmail.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-dev/8FFD60D6-E404-4F7A-A6D8-5D2FA973AFBA%40gmail.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-dev/8FFD60D6-E404-4F7A-A6D8-5D2FA973AFBA%40gmail.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-dev/8FFD60D6-E404-4F7A-A6D8-5D2FA973AFBA%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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/c2c0724d-8388-4706-95f7-99ea07c29f9f%40googlegroups.com.