From 6e3d79f52ef0e1b2b6fe1e660820cabdca6179c2 Mon Sep 17 00:00:00 2001 From: Sen Hastings Date: Sun, 25 Feb 2024 14:05:44 -0800 Subject: [PATCH] support/scripts/pkg-stats: fix bug when sorting by hashfile Because the div_class variable was not reassigned a value, cells in the latest_version column were still being assigned hash_file classes and so were being picked up as elements in the hash_file sort. This lead to execessive grid gap elements stacking up and creating huge blank spaces at the top of the page. This is very noticable on pages with a large number of packages, like the ones the autobuilder creates. original behaviour(click the "Hash file" column label twice): http://autobuild.buildroot.org/stats/master.html demo of fixed behaviour: https://sen-h.codeberg.page/pkg-stats-demos/@pages/fix-bug-when-sorting-by-hash-file.html Signed-off-by: Sen Hastings Signed-off-by: Arnout Vandecappelle --- support/scripts/pkg-stats | 1 + 1 file changed, 1 insertion(+) diff --git a/support/scripts/pkg-stats b/support/scripts/pkg-stats index 53898a36f2..3295eb7a48 100755 --- a/support/scripts/pkg-stats +++ b/support/scripts/pkg-stats @@ -977,6 +977,7 @@ def dump_html_pkg(f, pkg): # Latest version data_field_id = f'latest_version__{pkg_css_class}' + div_class = ["centered"] div_class.append(f'_{pkg_css_class}') div_class.append("latest_version data") if pkg.latest_version['status'] == RM_API_STATUS_ERROR: