Bugzilla – Attachment 186445 Details for
Bug 40813
Add ability to embed page start and end timing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40813: Add ability to embed page start and end timing
Bug-40813-Add-ability-to-embed-page-start-and-end-.patch (text/plain), 2.52 KB, created by
Kyle M Hall (khall)
on 2025-09-15 19:21:59 UTC
(
hide
)
Description:
Bug 40813: Add ability to embed page start and end timing
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2025-09-15 19:21:59 UTC
Size:
2.52 KB
patch
obsolete
>From 7a31a6305e08f4750c8c2bf5d8de7311e8f8bfd1 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 15 Sep 2025 15:20:13 -0400 >Subject: [PATCH] Bug 40813: Add ability to embed page start and end timing > >It would be useful to know what time a page load was initiated and >rendering completed for debugging purposes. The most reasonable solution >I've found is to get a time from the start of get_template_and_user and >the end of intranet-bottom.inc. This adds timing to nearly all Koha >pages with just a few lines of code. > >Test Plan: >1) Apply this patch >2) Restart all the things! >3) Load mainpage.pl >4) Note the "start" and "end" values at the bottom of the page >--- > C4/Auth.pm | 3 +++ > .../prog/en/includes/intranet-bottom.inc | 18 ++++++++++++++++++ > 2 files changed, 21 insertions(+) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index affc7ee43a2..4f38ff13993 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -189,6 +189,7 @@ Output.pm module. > =cut > > sub get_template_and_user { >+ my $start_time = dt_from_string; > > my $in = shift; > my ( $user, $cookie, $sessionID, $flags ); >@@ -692,6 +693,8 @@ sub get_template_and_user { > $template->param( logged_in_user => $patron ); > $template->param( sessionID => $sessionID ); > >+ $template->param( start_time => $start_time ); >+ > return ( $template, $borrowernumber, $cookie, $flags ); > } > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc >index d267032d37c..28e0e919fe2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc >@@ -1,5 +1,6 @@ > [% USE raw %] > [% USE Koha %] >+[% USE KohaDates %] > [% USE KohaPlugins %] > [% USE Asset %] > [% USE AdditionalContents %] >@@ -192,6 +193,23 @@ > [% END %] > [% KohaPlugins.get_plugins_intranet_js | $raw %] > >+[% IF start_time %] >+<footer class="footer"> >+ <div class="container"> >+ <span class="navbar-text start_time" data-start="[% start_time %]"> >+ <span class="badge text-bg-info">Start</span> >+ [% start_time.hms(':') %] >+ </span> >+ [%- SET end_time = KohaDates.datetime_from_string %] >+ <span class="navbar-text end_time" data-end="[% end_time %]"> >+ <span class="badge text-bg-primary">End</span> >+ [% end_time.hms(':') %] >+ </span> >+ </div> >+</footer> >+[% END %] >+ >+ > </body> > <!-- prettier-ignore-start --> > </html> >-- >2.39.5 (Apple Git-154)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 40813
: 186445 |
186490