diff --git a/doc/config.html b/doc/config.html index 7b5ffa2e..86a952c0 100755 --- a/doc/config.html +++ b/doc/config.html @@ -916,6 +916,18 @@ if the file name starts with a "/" (Unix) or case they can be replaced by others like Serif, Sans-serif, Helvetica. +
  • + All display limit = <n>
    + If a logbook contains many entries, the list gets divided into pages, + with some page navigation for the next, previous, a specific page and + all pages. If the logbook contains a large number of entries (>500), + the display of all thes entries can take very long and might slow down + the elogd server, especially if the entries are not displayed in + "summary" mode but in "full" mode. Therefore the "All" link should not + be used in the page navigation for large logbooks. The number of + entries from when on the "All" link gets hidden can be specified with + this number, the default value is 500. +

  • diff --git a/src/elogd.c b/src/elogd.c index bc16596b..fa628bf2 100755 --- a/src/elogd.c +++ b/src/elogd.c @@ -16293,10 +16293,10 @@ void show_page_filters(LOGBOOK * lbs, int n_msg, int page_n, BOOL mode_commands, /*------------------------------------------------------------------*/ -void show_page_navigation(int n_msg, int page_n, int n_page) +void show_page_navigation(LOGBOOK *lbs, int n_msg, int page_n, int n_page) { - int i, num_pages, skip; - char ref[256]; + int i, num_pages, skip, max_n_msg; + char ref[256], str[256]; if (!page_n || n_msg <= n_page) return; @@ -16360,7 +16360,12 @@ void show_page_navigation(int n_msg, int page_n, int n_page) rsprintf("%s  ", ref, loc("Next")); } - if (page_n != -1 && n_page < n_msg) { + if (getcfg(lbs->name, "All display limit", str, sizeof(str))) + max_n_msg = atoi(str); + else + max_n_msg = 500; + + if (page_n != -1 && n_page < n_msg && n_msg < max_n_msg) { sprintf(ref, "page"); build_ref(ref, sizeof(ref), "", "", "", ""); @@ -17961,7 +17966,7 @@ void show_elog_list(LOGBOOK * lbs, int past_n, int last_n, int page_n, BOOL defa if (!printable) { show_page_filters(lbs, n_msg, page_n, mode_commands, mode); - show_page_navigation(n_msg, page_n, n_page); + show_page_navigation(lbs, n_msg, page_n, n_page); } /*---- select navigation ----*/ @@ -18316,7 +18321,7 @@ void show_elog_list(LOGBOOK * lbs, int past_n, int last_n, int page_n, BOOL defa /*---- page navigation ----*/ if (!printable) - show_page_navigation(n_msg, page_n, n_page); + show_page_navigation(lbs, n_msg, page_n, n_page); rsprintf("\n"); show_bottom_text(lbs);