mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-04-18 10:02:16 +00:00
Update latency-detail-modal.tsx
This commit is contained in:
@@ -19,10 +19,10 @@ const TIMEFRAME_OPTIONS = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
const TARGET_OPTIONS = [
|
const TARGET_OPTIONS = [
|
||||||
{ value: "gateway", label: "Gateway (Router)", realtime: false },
|
{ value: "gateway", label: "Gateway (Router)", shortLabel: "Gateway", realtime: false },
|
||||||
{ value: "cloudflare", label: "Cloudflare (1.1.1.1)", realtime: true },
|
{ value: "cloudflare", label: "Cloudflare (1.1.1.1)", shortLabel: "Cloudflare", realtime: true },
|
||||||
{ value: "google", label: "Google DNS (8.8.8.8)", realtime: true },
|
{ value: "google", label: "Google DNS (8.8.8.8)", shortLabel: "Google DNS", realtime: true },
|
||||||
]
|
]
|
||||||
|
|
||||||
// Realtime test configuration
|
// Realtime test configuration
|
||||||
const REALTIME_TEST_DURATION = 120 // 2 minutes in seconds
|
const REALTIME_TEST_DURATION = 120 // 2 minutes in seconds
|
||||||
@@ -479,7 +479,7 @@ function pmxPrint(){
|
|||||||
<div class="section-title">1. Executive Summary</div>
|
<div class="section-title">1. Executive Summary</div>
|
||||||
<div class="exec-box">
|
<div class="exec-box">
|
||||||
<div class="latency-gauge">
|
<div class="latency-gauge">
|
||||||
<svg viewBox="0 0 120 80" style="width:100%;height:auto;max-width:160px;">
|
<svg viewBox="0 0 120 80" width="160" height="107">
|
||||||
<!-- Gauge background arc -->
|
<!-- Gauge background arc -->
|
||||||
<path d="M 10 70 A 50 50 0 0 1 110 70" fill="none" stroke="#e2e8f0" stroke-width="8" stroke-linecap="round"/>
|
<path d="M 10 70 A 50 50 0 0 1 110 70" fill="none" stroke="#e2e8f0" stroke-width="8" stroke-linecap="round"/>
|
||||||
<!-- Colored segments: Excellent (green), Good (green), Fair (yellow), Poor (red) -->
|
<!-- Colored segments: Excellent (green), Good (green), Fair (yellow), Poor (red) -->
|
||||||
@@ -837,10 +837,12 @@ export function LatencyDetailModal({ open, onOpenChange, currentLatency }: Laten
|
|||||||
Network Latency
|
Network Latency
|
||||||
</DialogTitle>
|
</DialogTitle>
|
||||||
</DialogHeader>
|
</DialogHeader>
|
||||||
<div className="flex items-center gap-2 mt-1 flex-nowrap overflow-x-auto">
|
<div className="flex items-center gap-2 mt-1 flex-nowrap">
|
||||||
<Select value={target} onValueChange={setTarget}>
|
<Select value={target} onValueChange={setTarget}>
|
||||||
<SelectTrigger className="w-[160px] sm:w-[200px] h-8 text-xs shrink-0">
|
<SelectTrigger className="w-[140px] sm:w-[180px] h-8 text-xs shrink-0">
|
||||||
<SelectValue />
|
<span className="truncate">
|
||||||
|
{TARGET_OPTIONS.find(t => t.value === target)?.shortLabel || target}
|
||||||
|
</span>
|
||||||
</SelectTrigger>
|
</SelectTrigger>
|
||||||
<SelectContent>
|
<SelectContent>
|
||||||
{TARGET_OPTIONS.map(opt => (
|
{TARGET_OPTIONS.map(opt => (
|
||||||
|
|||||||
Reference in New Issue
Block a user