fix
This commit is contained in:
parent
aa405aedef
commit
2083326418
|
|
@ -347,7 +347,13 @@ async fn run_check_async(
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.as_secs() as i64;
|
.as_secs() as i64;
|
||||||
cert_expiry_days = Some((not_after - now) / 86400);
|
cert_expiry_days = Some((not_after - now) / 86400);
|
||||||
cert_issuer = Some(cert.issuer().to_string());
|
let issuer_str = cert.issuer().to_string();
|
||||||
|
cert_issuer = Some(
|
||||||
|
issuer_str.split(", ")
|
||||||
|
.find(|p| p.starts_with("O="))
|
||||||
|
.map(|p| p[2..].to_string())
|
||||||
|
.unwrap_or(issuer_str)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -721,10 +721,18 @@
|
||||||
const c = REGION_COLORS[pt.region] || '#6b7280';
|
const c = REGION_COLORS[pt.region] || '#6b7280';
|
||||||
const label = REGION_LABELS[pt.region] || pt.region;
|
const label = REGION_LABELS[pt.region] || pt.region;
|
||||||
const status = pt.ping.up ? '' : ' <span class="text-red-400">DOWN</span>';
|
const status = pt.ping.up ? '' : ' <span class="text-red-400">DOWN</span>';
|
||||||
html += `<div class="flex items-center justify-between gap-3">
|
html += '<div class="flex items-center justify-between gap-3">';
|
||||||
<span class="flex items-center gap-1.5"><span style="background:${c}" class="inline-block w-1.5 h-1.5 rounded-full"></span>${label}</span>
|
html += '<span class="flex items-center gap-1.5"><span style="background:' + c + '" class="inline-block w-1.5 h-1.5 rounded-full"></span>' + label + '</span>';
|
||||||
<span class="text-gray-200 font-mono">${pt.ping.latency_ms}ms${status}</span>
|
html += '<span class="text-gray-200 font-mono">' + (pt.ping.latency_ms || 0) + 'ms' + status + '</span>';
|
||||||
</div>`;
|
html += '</div>';
|
||||||
|
if (pt.ping.dns_ms != null || pt.ping.tcp_ms != null || pt.ping.tls_ms != null) {
|
||||||
|
var tp = [];
|
||||||
|
if (pt.ping.dns_ms != null) tp.push('DNS ' + pt.ping.dns_ms);
|
||||||
|
if (pt.ping.tcp_ms != null) tp.push('TCP ' + pt.ping.tcp_ms);
|
||||||
|
if (pt.ping.tls_ms != null) tp.push('TLS ' + pt.ping.tls_ms);
|
||||||
|
tp.push('HTTP ' + (pt.ping.latency_ms || 0));
|
||||||
|
html += '<div class="text-gray-600 text-[10px] pl-4">' + tp.join(' / ') + ' ms</div>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (result.runId) {
|
if (result.runId) {
|
||||||
html += `<div class="text-gray-600 mt-1 text-[10px] font-mono">${result.runId}</div>`;
|
html += `<div class="text-gray-600 mt-1 text-[10px] font-mono">${result.runId}</div>`;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue