Skip to content

Commit

Permalink
Load RT size only on demand to speed up configuration page load
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sunnavy committed Nov 7, 2023
1 parent 5f0b745 commit 7249534
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions share/html/Admin/Tools/Configuration.html
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,12 @@
</&>

<&|/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/) {
Expand All @@ -157,7 +158,11 @@
<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>

Expand Down Expand Up @@ -390,3 +395,7 @@
return $output;
}
</%INIT>

<%ARGS>
$LoadSize => undef
</%ARGS>

0 comments on commit 7249534

Please sign in to comment.