.
This commit is contained in:
1 parent
f0bba7e7b9
commit
968c7c3eeb
5 files changed
+30
-11
No files matched your search
@@ -94,11 +94,11 @@ function SampleGraph({ estimate }: { estimate: ClockEstimate }) {
|
||||
{accepted.map((sample, index) => {
|
||||
const barWidth = Math.max(2, width / accepted.length - 2)
|
||||
const barHeight = sample.rttMs / maxRtt * height * 0.35
|
||||
return <rect key={sample.id} x={index * width / accepted.length} y={height - barHeight} width={barWidth} height={barHeight} fill="rgba(49,84,186,.22)" />
|
||||
return <rect key={sample.id} x={index * width / accepted.length} y={height - barHeight} width={barWidth} height={barHeight} fill="rgba(0,180,187,.35)" />
|
||||
})}
|
||||
<polyline points={points} fill="none" stroke="var(--color-primary)" strokeWidth="2" vectorEffect="non-scaling-stroke" />
|
||||
</svg>
|
||||
<div className="flex justify-between px-1 text-[9px] text-ink-muted"><span>붉은 선: 오프셋 편차</span><span>파란 막대: RTT</span></div>
|
||||
<div className="flex justify-between px-1 text-[9px] text-ink-muted"><span>붉은 선: 오프셋 편차</span><span>청록 막대: RTT</span></div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -263,11 +263,11 @@ export default function AutomationPanel({
|
||||
<h2 className="mt-1 text-base font-semibold text-ink">관측 서버시간</h2>
|
||||
<p className="mt-1 text-[10px] leading-4 text-ink-muted">HTTP Date는 초 단위이며 아래 값은 RTT 보정 추정치와 신뢰구간입니다.</p>
|
||||
</div>
|
||||
<button onClick={toggleMonitor} disabled={busy === 'monitor' || armed} className={`rounded-full border px-3 py-2 text-[11px] font-semibold transition ${clock?.monitoring ? 'border-success/30 bg-success/10 text-success' : 'border-line text-ink-muted hover:text-ink'} disabled:opacity-40`}>
|
||||
<button onClick={toggleMonitor} disabled={busy === 'monitor' || armed} className={`rounded-full border px-3 py-2 text-[11px] font-semibold transition ${clock?.monitoring ? 'border-cyan-deep/30 bg-cyan-soft text-cyan-deep' : 'border-line text-ink-muted hover:text-ink'} disabled:opacity-40`}>
|
||||
{busy === 'monitor' ? '측정 중…' : clock?.monitoring ? '모니터 중지' : '모니터 시작'}
|
||||
</button>
|
||||
</div>
|
||||
<p className="mt-5 font-mono text-xl tracking-tight text-ink sm:text-2xl" aria-label="관측 서버시간 값">{formatClock(liveServerTimeMs)}</p>
|
||||
<p className={`mt-5 font-mono text-xl tracking-tight sm:text-2xl ${clock?.monitoring ? 'text-cyan-deep' : 'text-ink'}`} aria-label="관측 서버시간 값">{formatClock(liveServerTimeMs)}</p>
|
||||
<div className="mt-4 grid grid-cols-2 gap-2 sm:grid-cols-4">
|
||||
<Metric label="offset" value={`${(clock?.offsetMs ?? 0).toFixed(1)}ms`} tone={qualityTone} />
|
||||
<Metric label="raw offset" value={`${(clock?.rawOffsetMs ?? 0).toFixed(1)}ms`} />
|
||||
@@ -321,7 +321,7 @@ export default function AutomationPanel({
|
||||
</div>
|
||||
|
||||
<div className="p-5 sm:p-6">
|
||||
<div className="flex items-start justify-between gap-4"><div><h3 className="text-sm font-semibold text-ink">단일 요청 자동 예약</h3><p className="mt-1 text-[10px] leading-4 text-ink-muted">목표 서버 도착 시각에 토큰 1개를 소비해 정확히 한 번 제출합니다.</p></div><span className={`rounded-full px-2.5 py-1 text-[9px] font-semibold uppercase tracking-wider ${armed ? 'bg-coral text-coral-ink' : autoState.status === 'succeeded' ? 'bg-success/10 text-success' : autoState.status === 'failed' ? 'bg-danger/10 text-danger' : 'bg-chrome text-ink-muted'}`}>{autoState.status}</span></div>
|
||||
<div className="flex items-start justify-between gap-4"><div><h3 className="text-sm font-semibold text-ink">단일 요청 자동 예약</h3><p className="mt-1 text-[10px] leading-4 text-ink-muted">목표 서버 도착 시각에 토큰 1개를 소비해 정확히 한 번 제출합니다.</p></div><span className={`rounded-full px-2.5 py-1 text-[9px] font-semibold uppercase tracking-wider ${armed ? 'bg-gold text-gold-ink' : autoState.status === 'succeeded' ? 'bg-success/10 text-success' : autoState.status === 'failed' ? 'bg-danger/10 text-danger' : 'bg-chrome text-ink-muted'}`}>{autoState.status}</span></div>
|
||||
<div className="mt-4 grid gap-3 sm:grid-cols-[1fr_140px]">
|
||||
<label className="space-y-2"><span className="text-[10px] font-semibold text-ink-muted">실행 시각 (KST, ms)</span><input type="datetime-local" step="0.001" value={targetInput} onChange={(event) => setTargetInput(event.target.value)} disabled={armed} className="w-full rounded-xl border border-line bg-surface px-3 py-3 font-mono text-xs text-ink outline-none focus:border-accent disabled:opacity-50" /></label>
|
||||
<label className="space-y-2"><span className="text-[10px] font-semibold text-ink-muted">도착 오프셋 (ms)</span><input type="number" min="-5000" max="5000" step="1" value={userOffsetMs} onChange={(event) => setUserOffsetMs(Math.max(-5_000, Math.min(5_000, Number(event.target.value))))} disabled={armed} className="w-full rounded-xl border border-line bg-surface px-3 py-3 font-mono text-xs text-ink outline-none focus:border-accent disabled:opacity-50" /></label>
|
||||
|
||||
Reference in new issue
Block a user