Using data-tables-api-plugin

66 views
Skip to first unread message

Marit M

unread,
Mar 11, 2022, 1:31:27 AM3/11/22
to Jenkins Developers
Hi,

I'm trying to implement tables with dynamic model based content in my plugin.
Only the table columns are displayed, while the the content is missing, and instead the following message is displayed: "Loading - please wait ...".

I tried to debug with a breakpoint at getRows() and it seems like it's not being called.

Looking at the browser console:

 Uncaught ReferenceError: Prototype is not defined
    at no-prototype.js:2:1
:8080/jenkins/$stapler/bound/7c9ca447-e432-4e0c-8aac-d6a208329a5b/getTableRows:1          Failed to load resource: the server responded with a status of 403 (Forbidden)

404 Not Found

Stapler processed this HTTP request as follows, but couldn't find the resource to consume the request

-> evaluate(<org.kohsuke.stapler.bind.BoundObjectTable@6a30f8c1> :org.kohsuke.stapler.bind.BoundObjectTable,"/7c9ca447-e432-4e0c-8aac-d6a208329a5b/getTableRows") -> evaluate(((StaplerFallback)<org.kohsuke.stapler.bind.BoundObjectTable@6a30f8c1>).getStaplerFallback(),"/7c9ca447-e432-4e0c-8aac-d6a208329a5b/getTableRows") -> evaluate(<org.kohsuke.stapler.bind.BoundObjectTable$Table@6a61b7b1> :org.kohsuke.stapler.bind.BoundObjectTable$Table,"/7c9ca447-e432-4e0c-8aac-d6a208329a5b/getTableRows") -> evaluate(<org.kohsuke.stapler.bind.BoundObjectTable$Table@6a61b7b1>.getDynamic("7c9ca447-e432-4e0c-8aac-d6a208329a5b",...),"/getTableRows") -> evaluate(<com.bmc.ims.BmcCfaAction@7e434c65> :com.bmc.ims.BmcCfaAction,"/getTableRows") -> No matching rule was found on <com.bmc.ims.BmcCfaAction@7e434c65> for "/getTableRows"

<com.bmc.ims.BmcCfaAction@7e434c65> has the following URL mappings, in the order of preference:

  1. If path ends without '/' insert it
  2. io.jenkins.plugins.datatables.DefaultAsyncTableContentProvider.getTableRows(...) for url=/getTableRows/...
  3. VIEW.groovy for url=/VIEW
  4. VIEW.gsp for url=/VIEW
  5. VIEW.jelly for url=/VIEW
  6. index view of org.kohsuke.stapler.jelly.groovy.GroovyFacet@163d95c0 for url=/
  7. index view of org.kohsuke.stapler.jelly.JellyFacet@41be6b24 for url=/
  8. BLOCKED: java.lang.String com.bmc.ims.BmcCfaAction.getDisplayName() for url=/displayName/...
  9. BLOCKED: java.lang.String com.bmc.ims.BmcCfaAction.getIconFileName() for url=/iconFileName/...
  10. BLOCKED: java.lang.String com.bmc.ims.BmcCfaAction.getUrlName() for url=/urlName/...
  11. BLOCKED: java.io.File com.bmc.ims.BmcCfaAction.getRelatedJob() for url=/relatedJob/...
  12. BLOCKED: java.lang.String com.bmc.ims.BmcCfaAction.getCommitModel() for url=/commitModel/...
  13. BLOCKED: io.jenkins.plugins.datatables.TableModel com.bmc.ims.BmcCfaAction.getTableModel(String) for url=/tableModel/TOKEN/...
  14. BLOCKED: java.lang.String io.jenkins.plugins.datatables.DefaultAsyncTableContentProvider.getTableRows(String) for url=/tableRows/TOKEN/...

Any idea?

Thanks,
Marit.

Ullrich Hafner

unread,
Mar 15, 2022, 3:44:56 PM3/15/22
to JenkinsCI Developers
Does your class implement the AsyncTableContentProvider Interface? Or why is the method call blocked?


Thanks,
Marit.

--
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/7d49b425-2339-4755-9f20-b4ed90128d41n%40googlegroups.com.

Tim Jacomb

unread,
Mar 15, 2022, 4:47:28 PM3/15/22
to Jenkins Developers
If you can share your code / a branch with what you have you might get better help if that's possible

Marit M

unread,
Mar 24, 2022, 8:21:36 AM3/24/22
to Jenkins Developers


loading_tbl.JPG

ב-יום שלישי, 15 במרץ 2022 בשעה 22:47:28 UTC+2, timja...@gmail.com כתב/ה:

Ullrich Hafner

unread,
Mar 24, 2022, 12:27:17 PM3/24/22
to JenkinsCI Developers
Your layout is broken. Do not use Jenkins default layouts when using BS. It seems that the side panel is missing and so some JS libs are not loaded.

Example:


<bs:page it="${it}>
</bs:page>

Marit M

unread,
Mar 29, 2022, 7:59:33 AM3/29/22
to Jenkins Developers
Thanks, I fixed the layout and able to retrieve the data table now.
I did include an empty side panel, how do I extend the default side panel that is associated to a build?

Thanks, 
Marit.

ב-יום חמישי, 24 במרץ 2022 בשעה 18:27:17 UTC+2, ullrich...@gmail.com כתב/ה:

Ullrich Hafner

unread,
Mar 29, 2022, 5:27:12 PM3/29/22
to JenkinsCI Developers
You can add actions to your build. See https://www.jenkins.io/doc/developer/extensibility/action-for-all-projects/
Or what do you mean with extend?

Marit M

unread,
Apr 3, 2022, 7:17:29 AM4/3/22
to Jenkins Developers
This is what I needed:
<st:include it="${it.owner}" page="sidepanel.jelly"/>

Thanks,
Marit.

ב-יום רביעי, 30 במרץ 2022 בשעה 00:27:12 UTC+3, ullrich...@gmail.com כתב/ה:
Reply all
Reply to author
Forward
0 new messages