[Rt-commit] rt 09/12: Show top 50 related dashboards in case it's a long list

sunnavy sunnavy at bestpractical.com
Wed Jul 14 14:46:50 EDT 2021


This is an automated email from the git hooks/post-receive script.

sunnavy pushed a commit to branch 5.0/use-dashboard-for-homepage-select-ui
in repository rt.

commit b14c2f0b2f533a7c59480e6c3e0715940bcb81ce
Author: sunnavy <sunnavy at bestpractical.com>
AuthorDate: Wed Jul 14 23:26:51 2021 +0800

    Show top 50 related dashboards in case it's a long list
---
 share/html/Search/Elements/EditSearches | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/share/html/Search/Elements/EditSearches b/share/html/Search/Elements/EditSearches
index 6a89bc19a9..b7d71f2db3 100644
--- a/share/html/Search/Elements/EditSearches
+++ b/share/html/Search/Elements/EditSearches
@@ -431,11 +431,13 @@ return @results;
 
 <%METHOD GetDependedOnByList>
 
+% my $links = $Object->DependedOnBy;
+% $links->RowsPerPage(50);
+% my $total = $links->CountAll;
   <p>
-    <&|/l&>This search is used in these dashboards</&>:
+    <&|/l, $total &>This search is used in the following [quant,_1,dashboard,dashboards]</&>:
   </p>
   <ul class="saved-search-depended-on-by-list list-group-compact">
-% my $links = $Object->DependedOnBy;
 % while ( my $link = $links->Next ) {
     <li class="list-group-item">
 %   if ( $link->BaseObj->Name eq 'Dashboard' ) {
@@ -445,6 +447,10 @@ return @results;
 %   }
     </li>
 % }
+
+% if ( $total > 50 ) {
+    <li class="list-group-item">...</li>
+% }
   </ul>
 
 <%ARGS>

-- 
To stop receiving notification emails like this one, please contact
sysadmin at bestpractical.com.


More information about the rt-commit mailing list