Skip to content

Commit c9faf0e

Browse files
committed
Sort and limit dependent package kinds to top 100
1 parent 5133e1f commit c9faf0e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/views/packages/dependent_packages.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<a class="list-group-item list-group-item-action d-flex justify-content-between align-items-center text-break <%= 'active' if params[:kind].blank? %>" href="<%= dependent_packages_registry_package_path(@registry, @package, latest: params[:latest]) %>">
2121
All kinds
2222
</a>
23-
<% @kinds.each do |kind, count| %>
23+
<% @kinds.sort_by(&:last).reverse.first(100).each do |kind, count| %>
2424
<a class="list-group-item list-group-item-action d-flex justify-content-between align-items-center text-break <%= 'active' if params[:kind] == kind %>" href="<%= dependent_packages_registry_package_path(@registry, @package, kind: kind, latest: params[:latest]) %>">
2525
<%= kind %>
2626
<span class='badge bg-primary rounded-pill'><%= number_with_delimiter count %></span>

0 commit comments

Comments
 (0)