Skip to content

Report2 Plugin does not work proberly (PDF) #1464

@kindkains

Description

@kindkains

Describe the bug
When I create a report and convert it into PDF I will get always just 1 Site, plus the options "Minmal Layout --> Yes" and "Include Navigation --> No" is ignored

Thruk Version
Thruk Version | 3.22.2
OMD 5.60-labs-edition
Release May 28, 2025

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Reports --> Reporting'
  2. Click on 'create new report'
  3. Image
  4. Report from URL: https://servername/nagios/thruk/cgi-bin/avail.cgi?show_log_entries=&host=myHostname&timeperiod=last24hours&t1=2025-09-04+23%3A42%3A58&t2=2025-09-05+23%3A42%3A58&rpttimeperiod=24x7&assumeinitialstates=yes&assumestateretention=yes&assumestatesduringnotrunning=yes&includesoftstates=no&initialassumedhoststate=0&initialassumedservicestate=0&view_mode=html
  5. Minmal Layout = YES
  6. Include Navigation = NO
  7. Direct PDF = YES
  8. Save Report
  9. Click on "Regenerate Report"
  10. The PDF is generated without any errors
  11. BUT --> The PDF has only ONE Site. The Navigation Side Bar is visible, there is NO minmal Layout --> the generated PDF is useless :-(

Nagios-Report.pdf

When I just open the url, then I would have 18 pages!

Expected behavior
A generated PDF with 18 pages (the full report) and a HIDDEN Sidebar

Desktop (please complete the following information):

  • Browser: Chrome, Firefix, Brave, Edge.... it doesn't matter

Additional context
I have a workaround for this problem. Maybe it can be useful for others or even for the developer to find and fix the issue.

  1. create a new bookmark in your browser
  2. edit the bookmark, name it "Fix-PDF" (or whatever you want) and copy this as URL
    javascript:(function(){var s=document.createElement('style');s.innerHTML='@media print{*{max-height:none!important;height:auto!important;overflow:visible!important}html,body{height:auto!important}}';document.head.appendChild(s);window.print();})();
  3. open the url in your Thruk/OMD, you want to make a report from f. e. https://your-server-address/your-site/thruk/cgi-bin/status.cgi?host=all&type=detail&hostprops=10&hoststatustypes=3&serviceprops=10&servicestatustypes=28
  4. then click on the Fix-PDF-bookmark and print to pdf
  5. Enjoy

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions