dashboard: fix ssl badge after use_ssl config removal
All checks were successful
CI / syntax-check (push) Successful in 2s
CI / memory-leak-check (push) Successful in 11s

This commit is contained in:
Username
2025-12-26 21:30:23 +01:00
parent 9f81e1e4af
commit 03dd277c54
2 changed files with 4 additions and 4 deletions

View File

@@ -2135,7 +2135,6 @@ class Proxywatchd():
stats_data['queue_size'] = self.job_queue.qsize()
stats_data['checktype'] = ','.join(config.watchd.checktypes)
stats_data['checktypes'] = config.watchd.checktypes
stats_data['use_ssl'] = config.watchd.use_ssl
stats_data['profiling'] = getattr(config.args, 'profile', False) if hasattr(config, 'args') else False
stats_data['pass_rate'] = try_div(self.stats.passed, elapsed)

View File

@@ -262,16 +262,17 @@ function renderLeaderboard(id, data, nameKey, valKey, limit) {
function update(d) {
$('dot').className = 'dot'; $('statusTxt').textContent = 'Live';
// SSL badge (main test mode when enabled)
// SSL badge (show if 'ssl' checktype is enabled)
var sslBadge = $('sslBadge');
if (sslBadge) {
sslBadge.style.display = d.use_ssl ? 'inline-block' : 'none';
var hasSSL = d.checktypes && d.checktypes.indexOf('ssl') >= 0;
sslBadge.style.display = hasSSL ? 'inline-block' : 'none';
}
// Check type badges (multiple supported)
var ctContainer = $('checktypeBadges');
if (ctContainer) {
var checktypes = (d.checktype || 'unknown').split(',');
var badgeColors = {judges: 'blu', head: 'grn', ssl: 'cyn', irc: 'pur', unknown: 'dim'};
var badgeColors = {judges: 'blu', head: 'grn', ssl: 'cyn', irc: 'pur', tor: 'mag', unknown: 'dim'};
var html = '';
checktypes.forEach(function(ct) {
ct = ct.trim();