Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

[dev.icinga.com #2725] Add pagination to various cgi's (via GET params, cgi.cfg option, select box) #1015

Closed
icinga-migration opened this issue Jun 26, 2012 · 6 comments

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/2725

Created by mfriedrich on 2012-06-26 12:25:29 +00:00

Assignee: ricardo
Status: Resolved (closed on 2012-08-31 12:57:54 +00:00)
Target Version: 1.8
Last Update: 2014-12-08 09:27:21 +00:00 (in Redmine)


i've seen the code in the nagios 3.4.x tree, but i do not really like the implementation.

thing is - the event log already got some page limit, and i do think such a pagination could be enhanced in both places - status and logs.

  • add cgi params for start and end (limit)
  • add cgi.cfg option for status.cgi as well
  • add a select box / dropdown to manually set pagination
  • keep an eye on extended filters (i.e. from navbarsearch / search_string) keeping that when enabled pagination

this should be put into cgiutils.c and allow generalized pagination, probably reusable for all cgis having listings, if applicable.

furthermore, this probably requires some caching methods, allowing the page change to read from browser cache, rather than pulling a page refresh (?) if that would be a mature way?

Attachments

Changesets

2012-07-19 21:53:45 +00:00 by ricardo 613f7cd

classic-ui: Added pagination to various cgi's #2725 - RB

refs: #2725

Added to:
* status.cgi for host & service status
* config.cgi
* extinfo.cgi for scheduling queue, comments and downtimes
* history.cgi
* notifications.cgi
* showlog.cgi

Added generic functions "page_num_selector" and "page_limit_selector" to cgiutils.c
Also added individual "status_page_num_selector" due to the special display case of STYLE_HOST_SERVICE_DETAIL

Added new config option "result_limit".
Removed config option "default_num_displayed_log_entries" !!!

Added URL GET options "limit" and "start" to cgi's using pagination.

Icon Source: http://www.iconfinder.com/search/?q=resultset by Mark James
Ideas and some code sourced from: Nagios, Thruk and Icinga-Web

This took way to long to implement but I hope this eases a lot of pain people having with long listings!

Don't forget: Stop talking, Start coding!

2012-07-20 10:33:50 +00:00 by mfriedrich f8245d8

beautify changelog on pagination, add thanks to sources, update copyright

refs #2725

2012-08-25 13:22:26 +00:00 by mfriedrich 54b8eff

fix tests, broken by previous commits

refs #905
refs #2878
refs #2725

Relations:

@icinga-migration
Copy link
Author

Updated by ricardo on 2012-07-19 22:06:22 +00:00

  • Subject changed from add pagination to status.cgi (via GET params, cgi.cfg option, select box) to Add pagination to various cgi's (via GET params, cgi.cfg option, select box)
  • Category set to 52
  • Status changed from New to Feedback
  • Assigned to set to ricardo
  • Target Version set to 1.8
  • Done % changed from 0 to 90

Please test this feature. in current "rbartels/cgi"

commit message:

classic-ui: Added pagination to various cgi's #2725 - RB

refs: #2725

Added to:
* status.cgi for host & service status
* config.cgi
* extinfo.cgi for scheduling queue, comments and downtimes
* history.cgi
* notifications.cgi
* showlog.cgi

Added generic functions "page_num_selector" and "page_limit_selector" to cgiutils.c
Also added individual "status_page_num_selector" due to the special display case of STYLE_HOST_SERVICE_DETAIL

Added new config option "result_limit".
Removed config option "default_num_displayed_log_entries" !!!

Added URL GET options "limit" and "start" to cgi's using pagination.

Icon Source: http://www.iconfinder.com/search/?q=resultset by Mark James
Ideas and some code sourced from: Nagios, Thruk and Icinga-Web

This took way to long to implement but I hope this eases a lot of pain people having with long listings!

Don't forget: Stop talking, Start coding!

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2012-07-20 10:44:42 +00:00

thank you very much!!!

classicui_1.8_pagination_final.png

tested the following:

  • dropdown selecting different values, autorefresh of the page
  • dropdown selecting different values, url GET params change accordingly
  • change url GET params to custom, review results, sets result count in dropdown correctly!
  • one thing on custom GET params - people should be made aware that this does not work well with the back/forward page counters.
  • setting result_limit to 1000 and 0 in cgi.cfg, without url GET params, checking the default value (1000 and all results)

looks fine to me - but you might ask gunnar or mzac for bigger tests :)

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2012-07-20 10:45:11 +00:00

  • File added classicui_1.8_pagination_final.png

@icinga-migration
Copy link
Author

Updated by ricardo on 2012-08-09 16:28:25 +00:00

  • Status changed from Feedback to 7

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2012-08-31 12:57:54 +00:00

  • Status changed from 7 to Resolved
  • Done % changed from 90 to 100

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2014-12-08 09:27:21 +00:00

  • Project changed from 19 to Core, Classic UI, IDOUtils
  • Category changed from 52 to Classic UI

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant