[Git][qa/jenkins.debian.net][master] r.d.n: include stats for all archs on frontpage

Holger Levsen (@holger) gitlab at salsa.debian.org
Thu Feb 20 14:03:33 GMT 2025



Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net


Commits:
70ee1cd6 by Holger Levsen at 2025-02-20T15:03:14+01:00
r.d.n: include stats for all archs on frontpage

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -


2 changed files:

- TODO.r.d.n
- hosts/osuosl5-amd64/var/www/html/index.html


Changes:

=====================================
TODO.r.d.n
=====================================
@@ -1,18 +1,17 @@
-mv everything to r.d.n/a/
-	then include data from all dashboards into index.html
+https://r.d.n/ improvements
+	improve layout
 	then add column: "(thanks to) workers hosted by/as" (maybe 2 columns?: hostnames & hoster)
 	add rb & debian logos
 do TODO.rebuilderd-systemd-units
-until debrebuild does it by itself:
-	purge 1000 files from cache in node health check if > $defined_size_4host
-	file wishlist bug for --max-cache-size option alongside with --cache
 upload src:rebuilderd to unstable (and its depends need to go through NEW too)
 fix riscv64 nodes:
 	- sudo chmod 644 /etc/logrotate.d/jenkins.debian.net-update_jdn
 	- keep connections on ssh tunnels, also for armhf
 	- riscv64-01 and -02 have the same ssh host keys...!?
 	- bullseye chdist on riscv64? (see maintenance jobs)
-	- 3rd worker on risc nodes?
+until debrebuild does it by itself:
+	purge 1000 files from cache in node health check if > $defined_size_4host
+	file wishlist bug for --max-cache-size option alongside with --cache
 test unstable & trixie
 drop i7 extra partition to save infomaniak credits
 fix cron.d perms


=====================================
hosts/osuosl5-amd64/var/www/html/index.html
=====================================
@@ -50,6 +50,55 @@
             margin: 30pt 0;
         }
         </style>
+        <script>
+        document.addEventListener('DOMContentLoaded', function() {
+            // display stats
+            function updateStats(arch, data) {
+                let div = document.getElementById('stats-'+arch);
+                // clear children
+                div.innerHTML = '';
+                // add rows
+                data.map(row => {
+                    let r = document.createElement('pre');
+                    let key = row[0] + ': ';
+                    r.textContent = key.padEnd(20) + row[1];
+                    div.appendChild(r);
+                });
+            }
+
+            function fetchStats() {
+                fetchArchStats("all");
+                fetchArchStats("amd64");
+                fetchArchStats("arm64");
+                fetchArchStats("armhf");
+                fetchArchStats("i386");
+                fetchArchStats("riscv64");
+            }
+
+            function fetchArchStats(arch) {
+                fetch('https://reproduce.debian.net/'+arch+'/api/v0/dashboard')
+                    .then(response => response.json())
+                    .then(data => {
+                        let div = document.getElementById('stats-'+arch);
+                        let main = data['suites']['main'];
+
+                        let good = main['good'];
+                        let bad = main['bad'];
+                        let unknown = main['unknown'];
+
+                        updateStats(arch, [
+                            ['repro', (100 / (good + bad) * good).toFixed(2) + '%'],
+                            ['good', good],
+                            ['bad', bad],
+                            ['build progress', (100 / (good + unknown + bad) * (good + bad)).toFixed(2) + '%'],
+                        ]);
+                    });
+            }
+
+            setInterval(fetchStats, 60 * 1000);
+            fetchStats();
+        });
+        </script>
     </head>
     <body>
         <h1>
@@ -78,6 +127,8 @@
 		<a href="https://reproduce.debian.net/all/">
 		<img src="https://reproduce.debian.net/all/stats/rb.png" width="20%">
 		</a>
+	</td><td>
+		<div id="stats-all">Loading stats...</div>
 	</td></tr><tr><td>
 		<a href="https://reproduce.debian.net/amd64/">r.d.n/amd64</a>
 	</td><td>
@@ -86,6 +137,8 @@
 		<a href="https://reproduce.debian.net/amd64/">
 		<img src="https://reproduce.debian.net/amd64/stats/rb.png" width="20%">
 		</a>
+	</td><td>
+		<div id="stats-amd64">Loading stats...</div>
 	</td></tr><tr><td>
 		<a href="https://reproduce.debian.net/arm64/">r.d.n/arm64</a>
 	</td><td>
@@ -94,6 +147,8 @@
 		<a href="https://reproduce.debian.net/arm64/">
 		<img src="https://reproduce.debian.net/arm64/stats/rb.png" width="20%">
 		</a>
+	</td><td>
+		<div id="stats-arm64">Loading stats...</div>
 	</td></tr><tr><td>
 		<a href="https://reproduce.debian.net/armhf/">r.d.n/armhf</a>
 	</td><td>
@@ -102,6 +157,8 @@
 		<a href="https://reproduce.debian.net/armhf/">
 		<img src="https://reproduce.debian.net/armhf/stats/rb.png" width="20%">
 		</a>
+	</td><td>
+		<div id="stats-armhf">Loading stats...</div>
 	</td></tr><tr><td>
 		<a href="https://reproduce.debian.net/i386/">r.d.n/i386</a>
 	</td><td>
@@ -110,6 +167,8 @@
 		<a href="https://reproduce.debian.net/i386/">
 		<img src="https://reproduce.debian.net/i386/stats/rb.png" width="20%">
 		</a>
+	</td><td>
+		<div id="stats-i386">Loading stats...</div>
 	</td></tr><tr><td>
 		<a href="https://reproduce.debian.net/riscv64/">r.d.n/riscv64</a>
 	</td><td>
@@ -118,6 +177,8 @@
 		<a href="https://reproduce.debian.net/riscv64/">
 		<img src="https://reproduce.debian.net/riscv64/stats/rb.png" width="20%">
 		</a>
+	</td><td>
+		<div id="stats-riscv64">Loading stats...</div>
 	</td></tr>
 	</table>
 	<br/>



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/70ee1cd69a58d33c70d8bf5cb5f597b3f5e2d51f

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/70ee1cd69a58d33c70d8bf5cb5f597b3f5e2d51f
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20250220/adaa852c/attachment-0001.htm>


More information about the Qa-jenkins-scm mailing list