[Rt-commit] rt branch 5.0/configuration-load-size-on-demand created. rt-5.0.5-38-g724953435c

BPS Git Server git at git.bestpractical.com
Tue Nov 7 21:43:12 UTC 2023


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt".

The branch, 5.0/configuration-load-size-on-demand has been created
        at  724953435cba4630725a75ef964c374b92aab17f (commit)

- Log -----------------------------------------------------------------
commit 724953435cba4630725a75ef964c374b92aab17f
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Tue Nov 7 16:23:59 2023 -0500

    Load RT size only on demand to speed up configuration page load
    
    For big RT instances, it takes time to calculate RT sizes and could
    cause timeout. This commit makes the calculation part optional so admins
    can still access Configuration page to check other info in that case.

diff --git a/share/html/Admin/Tools/Configuration.html b/share/html/Admin/Tools/Configuration.html
index 38898b89be..898a63d493 100644
--- a/share/html/Admin/Tools/Configuration.html
+++ b/share/html/Admin/Tools/Configuration.html
@@ -127,11 +127,12 @@ foreach my $key ( sort keys %{*RT::} ) {
     </&>
 
     <&|/Widgets/TitleBox, title => loc("RT Size") &>
+
+%   if ( $LoadSize ) {
       <div class="form-row">
         <div class="collection-as-table label col-6 text-left"><&|/l&>Object</&></div>
         <div class="collection-as-table label col-6 text-left"><&|/l&>Size</&></div>
       </div>
-
 <%PERL>
 my ($index_size, $user_count, $privileged_count);
 for my $type (qw/Tickets Queues Transactions Articles Assets Groups PrivilegedUsers UnprivilegedUsers/) {
@@ -157,7 +158,11 @@ for my $type (qw/Tickets Queues Transactions Articles Assets Groups PrivilegedUs
         <div class="collection-as-table value col-6"><% $count %></div>
       </div>
 % }
-    </&>
+
+%   } else {
+    <a class="mt-2 button btn btn-primary" href="?LoadSize=1"><&|/l&>Load Size</&></a>
+%   }
+</&>
 
   </div>
 
@@ -390,3 +395,7 @@ sub stringify {
     return $output;
 }
 </%INIT>
+
+<%ARGS>
+$LoadSize => undef
+</%ARGS>

-----------------------------------------------------------------------


hooks/post-receive
-- 
rt


More information about the rt-commit mailing list