Backup UI: align badges in the Destinations table to the top of the row

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KC7BXv32Jwj8mY5sKX8u2F
This commit is contained in:
ayurishchevandClaude Sonnet 5.5 committed 2026-10-07 14:10:31 +03:00
1 parent b61989bd22
commit 87d8bbcd8c
15 files changed
+33 -33

No files matched your search

@@ -0,0 +1 @@
import{C as f,r as y}from"./vendor-charts-Bcjh2pZL.js";import{u as T}from"./useFormatters-CKGG-YVI.js";import{c as k}from"./index-pRvvTpjQ.js";f.register(...y);const v="#1652B8",L="#EC7C31",_=1024*1024,M=()=>{const t=document.documentElement.getAttribute("data-theme")==="dark";return{isDark:t,gridColor:t?"rgba(240, 246, 252, 0.1)":"rgba(0,0,0,0.05)",textColor:t?"#8b949e":"#6c757d"}},S=(t,l)=>{if(!t||t.length===0)return[];if(t.length<=l)return t;const u=Math.ceil(t.length/l),a=[];for(let s=0;s<t.length;s+=u){const c=t.slice(s,s+u);if(c.length===0)continue;let m=0,i=0,o=0,e=0;c.forEach(r=>{m+=r.bytes_received||0,i+=r.bytes_sent||0,o=Math.max(o,r.rx_rate_mbps||0),e=Math.max(e,r.tx_rate_mbps||0)}),a.push({timestamp:c[0].timestamp,bytes_received:m,bytes_sent:i,rx_rate_mbps:o,tx_rate_mbps:e})}return a};function X(t,{maxPoints:l}){const{parseServerDate:u}=T();let a=null;const s=()=>{a&&(a.destroy(),a=null)},c=(i,o)=>{const e=u(i),r=e.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"});return o.includes("h")||o==="1d"?r:e.toLocaleDateString([],{month:"short",day:"numeric"})+" "+r},m=(i,{range:o,speedMode:e})=>{if(!t.value)return;s();const r=[],d=[],b=[];S(i,l).forEach(n=>{r.push(c(n.timestamp,o)),e?(d.push(n.rx_rate_mbps||0),b.push(n.tx_rate_mbps||0)):(d.push(n.bytes_received/_),b.push(n.bytes_sent/_))});const{gridColor:h,textColor:g}=M(),x=(n,C,p,R)=>({label:n,data:C,borderColor:p,backgroundColor:R,borderWidth:2,fill:!0,tension:.3,pointRadius:3,pointHoverRadius:4});a=new f(t.value.getContext("2d"),{type:"line",data:{labels:r,datasets:[x(e?"RX Mbps":"Received (MB)",d,v,"rgba(22, 82, 184, 0.15)"),x(e?"TX Mbps":"Sent (MB)",b,L,"rgba(236, 124, 49, 0.15)")]},options:{responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},plugins:{legend:{labels:{color:g}}},scales:{x:{ticks:{color:g,maxTicksLimit:8},grid:{color:h}},y:{beginAtZero:!0,ticks:{color:g},grid:{color:h}}}}})};return k(s),{render:m,destroy:s}}export{v as C,L as a,M as g,X as u};