mirror of https://github.com/grafana/loki
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
284 KiB
64 lines
284 KiB
|
10 months ago
|
import{j as e,S as Se,c as hr,P as re,e as Me,B as uo,E as xr,G as po,T as mo,H as go,I as br,J as fo,K as ho,L as xo,M as yr,u as vr,N as bo,V as jr,a as yo,g as vo,b as jt,d as pe,O as jo,n as wo,p as No,m as ko}from"./radix-core-ByqQ8fsu.js";import{c as wr,r as i,b as Be}from"./react-core-D_V7s-9r.js";import{u as It,a as at,L as ce,b as Nr,c as So,d as Eo,R as Co,e as To,f as Ro,g as Ao}from"./react-router-Bj-soKrx.js";import{t as _o,c as ys,a as Ee}from"./ui-utils-BNSC_Jv-.js";import{S as Io,M as Fo,C as kr,R as Lo,H as Po,a as qe,b as Do,A as Ws,c as ls,d as Sr,e as Ft,X as vs,f as Er,P as Oo,L as he,g as nt,h as Cr,i as $o,j as Mo,k as ot,l as Tr,F as Bo,m as zo,D as Rr,n as Ar,o as Vo,G as js,p as Uo,q as qo,r as Go,s as Ho,t as Ko,U as Wo,u as Zo,B as Yo}from"./ui-icons-CFVjIJRk.js";import{f as Xo,a as Qo,b as _r,c as wt,p as cs,i as Ze,d as Jo,e as Zs,g as ei,h as ti,D as Ys}from"./date-utils-B6syNIuD.js";import{R as Ir,I as si,T as Fr,a as ri,S as Lr,b as Pr,P as ai,C as Dr,V as ni,L as Or,c as $r,d as oi,e as ii,f as Mr,g as li,h as ci,i as Br,j as di,k as zr,l as Vr,m as Ur}from"./radix-inputs-D4_OLmm6.js";import{S as qr,d as Gr,P as ui,C as Hr,e as Kr,f as Wr,g as Zr,h as Yr,L as Xr,i as Qr,j as pi,T as mi,k as Jr,V as gi,l as fi,m as ea,n as hi,o as ta,p as sa,q as ra,r as xi,c as bi}from"./radix-navigation-DYoR-lWZ.js";import{R as ws,P as Ns,O as it,C as lt,a as aa,T as Lt,D as Pt,b as na,c as yi,d as vi,e as ji,f as wi,g as Ni,h as oa}from"./radix-layout-BqTpm3s4.js";import{R as ct,P as Dt,a as Ot,C as $t,T as dt,d as ki,B as Si,b as Ei,Y as Ci,X as Ti,c as Ri}from"./data-viz-BuFFX-vG.js";import{u as Mt,a as Ai,Q as _i,b as Ii}from"./query-management-DbWM5GrR.js";import{z as Fi}from"./theme-utils-CNom64Sw.js";import{u as Li,F as Pi,C as Di,o as Oi,r as $i,a as Mi,b as ia,s as Ye,d as Xs,c as la}from"./form-libs-B6JBoFJD.js";(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))a(n);new MutationObserver(n=>{for(const o of n)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&a(l)}).observe(document,{childList:!0,subtree:!0});function r(n){const o={};return n.integrity&&(o.integrity=n.integrity),n.referrerPolicy&&(o.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?o.credentials="include":n.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function a(n){if(n.ep)return;n.ep=!0;const o=r(n);fetch(n.href,o)}})();var ca,Qs=wr;ca=Qs.createRoot,Qs.hydrateRoot;function v(...t){return _o(ys(t))}function me(t){if(t===0)return"0 B";const s=1024,r=["B","KB","MB","GB","TB","PB"],a=Math.floor(Math.log(t)/Math.log(s));return`${parseFloat((t/Math.pow(s,a)).toFixed(2))} ${r[a]}`}function Oe(t,s){return t?Object.keys(t).find(r=>da(t[r],s)):null}function da(t,s){var r;return((r=t.services)==null?void 0:r.some(a=>a.service===s))??!1}const Bi=Ee("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),q=i.forwardRef(({className:t,variant:s,size:r,asChild:a=!1,...n},o)=>{const l=a?Se:"button";return e.jsx(l,{className:v(Bi({variant:s,size:r,className:t})),ref
|
||
|
|
.bg-dot-pattern {
|
||
|
|
background-image: radial-gradient(circle at 1px 1px, hsl(var(--muted-foreground) / 0.1) 1px, transparent 0);
|
||
|
|
background-size: 32px 32px;
|
||
|
|
}
|
||
|
|
@keyframes shake {
|
||
|
|
0%, 100% { transform: rotate(180deg); }
|
||
|
|
25% { transform: rotate(170deg); }
|
||
|
|
75% { transform: rotate(190deg); }
|
||
|
|
}
|
||
|
|
@keyframes swing {
|
||
|
|
0%, 100% { transform: rotate(180deg); }
|
||
|
|
50% { transform: rotate(190deg); }
|
||
|
|
}
|
||
|
|
.animate-swing {
|
||
|
|
animation: swing 1s ease-in-out infinite;
|
||
|
|
}
|
||
|
|
.animate-shake {
|
||
|
|
animation: shake 0.3s ease-in-out;
|
||
|
|
}
|
||
|
|
`})]})}const J={INGESTER:"ingester",PARTITION_INGESTER:"partition-ingester",DISTRIBUTOR:"distributor",PATTERN_INGESTER:"pattern-ingester",QUERY_SCHEDULER:"query-scheduler",COMPACTOR:"compactor",RULER:"ruler",INDEX_GATEWAY:"index-gateway"},ga={0:"Unknown",1:"Pending",2:"Active",3:"Inactive",4:"Deleted"},Yi={cluster:null,error:null,isLoading:!0,refresh:()=>Promise.resolve()},fa=i.createContext(Yi);function ue(){const t=i.useContext(fa);if(!t)throw new Error("useCluster must be used within a ClusterProvider");return t}function ha(t){const s=new Date(t);return`${Xo(s)} ago`}function xa(t){const s=new Date(t);return Qo(s,{format:"extended"})}function Et(t){switch(typeof t=="string"?parseInt(t,10):t){case 2:return"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200";case 1:return"bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200";case 3:return"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200";case 4:return"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200";default:return"bg-gray-100 text-gray-800 dark:bg-gray-900 dark:text-gray-200"}}function ba(t){const s=t.split("").reduce((n,o)=>o.charCodeAt(0)+((n<<5)-n),0),r=["bg-rose-100 text-rose-800 dark:bg-rose-900 dark:text-rose-200","bg-orange-100 text-orange-800 dark:bg-orange-900 dark:text-orange-200","bg-amber-100 text-amber-800 dark:bg-amber-900 dark:text-amber-200","bg-lime-100 text-lime-800 dark:bg-lime-900 dark:text-lime-200","bg-teal-100 text-teal-800 dark:bg-teal-900 dark:text-teal-200","bg-cyan-100 text-cyan-800 dark:bg-cyan-900 dark:text-cyan-200","bg-indigo-100 text-indigo-800 dark:bg-indigo-900 dark:text-indigo-200","bg-fuchsia-100 text-fuchsia-800 dark:bg-fuchsia-900 dark:text-fuchsia-200"],a=Math.abs(s)%r.length;return r[a]}function Es(t){const s=t.split("-");return s.length>=3?s[s.length-2]:""}function Xi(t){const s=["B","KiB","MiB","GiB","TiB"];let r=t,a=0;for(;r>=1024&&a<s.length-1;)r/=1024,a++;return`${r.toFixed(1)} ${s[a]}`}const Qi=(t,s)=>Object.values(t).some(r=>da(r,s)),ya={ingester:"ingester","partition-ring":"partition-ring",distributor:"distributor","pattern-ingester":"pattern-ingester","query-scheduler":"query-scheduler",compactor:"compactor",ruler:"ruler","index-gateway":"index-gateway"},Ne={ingester:{title:"Ingester",ringName:J.INGESTER,ringPath:"/ring",needsTokens:!0},"partition-ring":{title:"Partition Ingester",ringName:J.PARTITION_INGESTER,ringPath:"/partition-ring",needsTokens:!0},distributor:{title:"Distributor",ringName:J.DISTRIBUTOR,ringPath:"/distributor/ring",needsTokens:!1},"pattern-ingester":{title:"Pattern Ingester",ringName:J.PATTERN_INGESTER,ringPath:"/pattern/ring",needsTokens:!0},"query-scheduler":{title:"Scheduler",ringName:J.QUERY_SCHEDULER,ringPath:"/scheduler/ring",needsTokens:!1},compactor:{title:"Compactor",ringName:J.COMPACTOR,ringPath:"/compactor/ring",needsTokens:!1},ruler:{title:"Ruler",ringName:J.RULER,ringPath:"/ruler/ring",needsTokens:!0},"index-gateway":{title:"Index Gateway",ringName:J.INDEX_GATEWAY,ringPath:"/indexgateway/ring",needsTokens:!0}};function va(t){return Object.keys(Ne).find(s=>Ne[s].ringName===t)}function Ji(t){if(!t)return!1;const s=va(t);return s?Ne[s].needsTokens:!1}const el=t=>{const s=[];if(!t)return s;for(const r in Ne)Qi(t,r)&&s.push({title:Ne[r].title,url:`/rings/${Ne[r].ringName}`});return s};function ja(t,s){if(!t||!s)return"";const r=va(s);if(!r)return"";const a=Oe(t,r);if(!a)return"";const n=`/ui/api/v1/proxy/${a}`,o=Ne[r].ringPath,l=Ne[r].needsTokens?"?tokens=true":"";return`${n}${o}${l}`}const wa=[{id:J.INGESTER,title:"Ingester"},{id:J.PARTITION_INGESTER,title:"Partition Ingester"},{id:J.DISTRIBUTOR,title:"Distributor"},{id:J.PATTERN_INGESTER,title:"Pattern Ingester"},{id:J.QUERY_SCHEDULER,title:"Scheduler"},{id:J.COMPACTOR,title:"Compactor"},{id:J.RULER,title:"Ruler"},{id:J.INDEX_GATEWAY,title:"Index Gateway"}];function tl(t){const s={};try{const r=/<tbody[^>]*>([\s\S]*?)<\/tbody>/,a=t.match(r);if(!a)return s;const n=/<tr[^>]*>([\s\S]*?)<\/tr>/g,o=Array.from(a[1].matchAll(n));for(const l of o){const c=/<td[^>]*>([\s\S]*?)<\/td>/g,d=
|
||
|
|
- a positive number
|
||
|
|
- less than the value passed to \`max\` (or ${Ts} if no \`max\` prop is set)
|
||
|
|
- \`null\` or \`undefined\` if the progress is indeterminate.
|
||
|
|
|
||
|
|
Defaulting to \`null\`.`}var Ta=ka,yl=Ea;const Ra=i.forwardRef(({className:t,value:s,...r},a)=>e.jsx(Ta,{ref:a,className:v("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",t),...r,children:e.jsx(yl,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(s||0)}%)`}})}));Ra.displayName=Ta.displayName;function vl({visibleIds:t,selectedIds:s,onChange:r}){const a=t.every(o=>s.has(o)),n=()=>{const o=new Set(t);r(a?new Set([...s].filter(l=>!o.has(l))):new Set([...s,...t]))};return e.jsx(Le,{checked:t.length>0&&a,onCheckedChange:n,"aria-label":"Select all visible instances"})}function jl({instances:t,selectedInstances:s,onSelectInstance:r,sortField:a,sortDirection:n,onSort:o,showTokens:l=!1}){return e.jsxs(Ce,{children:[e.jsx(Te,{children:e.jsxs(X,{className:"hover:bg-transparent",children:[e.jsx(D,{className:"w-[50px]",children:e.jsx(vl,{visibleIds:t.map(c=>c.id),selectedIds:s,onChange:c=>{t.forEach(d=>{c.has(d.id)!==s.has(d.id)&&r(d.id)})}})}),e.jsx(D,{className:"w-[200px]",children:e.jsx(Z,{title:"ID",field:"id",sortField:a,sortDirection:n,onSort:o})}),e.jsx(D,{className:"w-[150px]",children:e.jsx(Z,{title:"State",field:"state",sortField:a,sortDirection:n,onSort:o})}),e.jsx(D,{children:e.jsx(Z,{title:"Address",field:"address",sortField:a,sortDirection:n,onSort:o})}),l&&e.jsx(D,{className:"w-[200px]",children:e.jsx(Z,{title:"Ownership",field:"ownership",sortField:a,sortDirection:n,onSort:o})}),e.jsx(D,{className:"w-[150px]",children:e.jsx(Z,{title:"Zone",field:"zone",sortField:a,sortDirection:n,onSort:o})}),e.jsx(D,{className:"w-[200px]",children:e.jsx(Z,{title:"Last Heartbeat",field:"timestamp",sortField:a,sortDirection:n,onSort:o})}),e.jsx(D,{className:"w-[50px]"})]})}),e.jsxs(Re,{children:[t.map(c=>{const d=l?c.ownership:0;return e.jsxs(X,{children:[e.jsx(F,{children:e.jsx(Le,{checked:s.has(c.id),onCheckedChange:()=>r(c.id),"aria-label":`Select instance ${c.id}`})}),e.jsx(F,{className:"font-medium",children:e.jsx(ce,{to:`/nodes/${c.id}`,className:"hover:underline",children:c.id})}),e.jsx(F,{children:e.jsx("span",{className:v("inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium",Et(c.state)),children:c.state})}),e.jsx(F,{children:c.address}),l&&e.jsx(F,{children:e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex justify-between text-xs",children:[e.jsx("span",{children:d}),e.jsxs("span",{className:"text-muted-foreground",children:[c.tokens.length," tokens"]})]}),e.jsx(Ra,{value:typeof d=="number"?d:Number(d.slice(0,-1)),className:"h-2"})]})}),e.jsx(F,{children:c.zone?e.jsx("span",{className:v("inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium",ba(c.zone)),children:c.zone}):e.jsx("span",{className:"text-muted-foreground",children:"-"})}),e.jsx(F,{children:e.jsx("span",{title:xa(c.timestamp),className:"text-muted-foreground",children:ha(c.timestamp)})}),e.jsx(F,{children:e.jsx(q,{variant:"ghost",size:"icon",asChild:!0,className:"h-8 w-8",title:"View instance details",children:e.jsx(ce,{to:`/nodes/${c.id}`,children:e.jsx(Ft,{className:"h-4 w-4"})})})})]},c.id)}),t.length===0&&e.jsx(X,{children:e.jsx(F,{colSpan:7,className:"h-24 text-center",children:e.jsx("div",{className:"text-muted-foreground",children:"No instances found"})})})]})]})}const xe=i.forwardRef(({className:t,type:s,...r},a)=>e.jsx("input",{type:s,className:v("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),ref:a,...r}));xe.displayName="Input";var tr=1,wl=.9,Nl=.8,kl=.17,Qt=.1,Jt=.999,Sl=.9999,El=.99,Cl=/[\\\/_+.#"@\[\(\{&]/,Tl=/[\\\/_+.#"@\[\(\{&]/g,Rl=/[\s-]/,Aa=/[\s-]/g;function us(t,s,r,a,n,o,l){if(o===s.length)return n===t.length?tr:El;var c=`${n},${o}`;if(l[c]!==void 0)return l[c];for(var d=a.charAt(o),u=r.indexOf(d,n),m=0,f,y,N,h
|
||
|
|
* @license React
|
||
|
|
* use-sync-external-store-shim.production.js
|
||
|
|
*
|
||
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
|
|
*
|
||
|
|
* This source code is licensed under the MIT license found in the
|
||
|
|
* LICENSE file in the root directory of this source tree.
|
||
|
|
*/var Ve=i;function _l(t,s){return t===s&&(t!==0||1/t===1/s)||t!==t&&s!==s}var Il=typeof Object.is=="function"?Object.is:_l,Fl=Ve.useState,Ll=Ve.useEffect,Pl=Ve.useLayoutEffect,Dl=Ve.useDebugValue;function Ol(t,s){var r=s(),a=Fl({inst:{value:r,getSnapshot:s}}),n=a[0].inst,o=a[1];return Pl(function(){n.value=r,n.getSnapshot=s,es(n)&&o({inst:n})},[t,r,s]),Ll(function(){return es(n)&&o({inst:n}),t(function(){es(n)&&o({inst:n})})},[t]),Dl(r),r}function es(t){var s=t.getSnapshot;t=t.value;try{var r=s();return!Il(t,r)}catch{return!0}}function $l(t,s){return s()}var Ml=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?$l:Ol;Ia.useSyncExternalStore=Ve.useSyncExternalStore!==void 0?Ve.useSyncExternalStore:Ml;_a.exports=Ia;var Bl=_a.exports,We='[cmdk-group=""]',ts='[cmdk-group-items=""]',zl='[cmdk-group-heading=""]',Rs='[cmdk-item=""]',rr=`${Rs}:not([aria-disabled="true"])`,ps="cmdk-item-select",_e="data-value",Vl=(t,s,r)=>Al(t,s,r),Fa=i.createContext(void 0),ut=()=>i.useContext(Fa),La=i.createContext(void 0),As=()=>i.useContext(La),Pa=i.createContext(void 0),Da=i.forwardRef((t,s)=>{let r=$e(()=>{var S,R;return{search:"",value:(R=(S=t.value)!=null?S:t.defaultValue)!=null?R:"",filtered:{count:0,items:new Map,groups:new Set}}}),a=$e(()=>new Set),n=$e(()=>new Map),o=$e(()=>new Map),l=$e(()=>new Set),c=Oa(t),{label:d,children:u,value:m,onValueChange:f,filter:y,shouldFilter:N,loop:h,disablePointerSelection:p=!1,vimBindings:g=!0,...x}=t,b=Me(),j=Me(),w=Me(),E=i.useRef(null),C=Jl();Pe(()=>{if(m!==void 0){let S=m.trim();r.current.value=S,A.emit()}},[m]),Pe(()=>{C(6,W)},[]);let A=i.useMemo(()=>({subscribe:S=>(l.current.add(S),()=>l.current.delete(S)),snapshot:()=>r.current,setState:(S,R,$)=>{var L,G,H;if(!Object.is(r.current[S],R)){if(r.current[S]=R,S==="search")M(),Y(),C(1,K);else if(S==="value"&&($||C(5,W),((L=c.current)==null?void 0:L.value)!==void 0)){let ne=R??"";(H=(G=c.current).onValueChange)==null||H.call(G,ne);return}A.emit()}},emit:()=>{l.current.forEach(S=>S())}}),[]),B=i.useMemo(()=>({value:(S,R,$)=>{var L;R!==((L=o.current.get(S))==null?void 0:L.value)&&(o.current.set(S,{value:R,keywords:$}),r.current.filtered.items.set(S,z(R,$)),C(2,()=>{Y(),A.emit()}))},item:(S,R)=>(a.current.add(S),R&&(n.current.has(R)?n.current.get(R).add(S):n.current.set(R,new Set([S]))),C(3,()=>{M(),Y(),r.current.value||K(),A.emit()}),()=>{o.current.delete(S),a.current.delete(S),r.current.filtered.items.delete(S);let $=T();C(4,()=>{M(),($==null?void 0:$.getAttribute("id"))===S&&K(),A.emit()})}),group:S=>(n.current.has(S)||n.current.set(S,new Set),()=>{o.current.delete(S),n.current.delete(S)}),filter:()=>c.current.shouldFilter,label:d||t["aria-label"],getDisablePointerSelection:()=>c.current.disablePointerSelection,listId:b,inputId:w,labelId:j,listInnerRef:E}),[]);function z(S,R){var $,L;let G=(L=($=c.current)==null?void 0:$.filter)!=null?L:Vl;return S?G(S,r.current.search,R):0}function Y(){if(!r.current.search||c.current.shouldFilter===!1)return;let S=r.current.filtered.items,R=[];r.current.filtered.groups.forEach(L=>{let G=n.current.get(L),H=0;G.forEach(ne=>{let de=S.get(ne);H=Math.max(de,H)}),R.push([L,H])});let $=E.current;O().sort((L,G)=>{var H,ne;let de=L.getAttribute("id"),gt=G.getAttribute("id");return((H=S.get(gt))!=null?H:0)-((ne=S.get(de))!=null?ne:0)}).forEach(L=>{let G=L.closest(ts);G?G.appendChild(L.parentElement===G?L:L.closest(`${ts} > *`)):$.appendChild(L.parentElement===$?L:L.closest(`${ts} > *`))}),R.sort((L,G)=>G[1]-L[1]).forEach(L=>{var G;let H=(G=E.current)==null?void 0:G.querySelector(`${We}[${_e}="${encodeURIComponent(L[0])}"]`);H==null||H.parentElement.appendChild(H)})}function K(){let S=O().find($=>$.getAttribute("aria-disabled")!=="true"),R=S==null?void 0:S.getAttribute(_e);A.setState("value",R||void 0)}function M(){var S,R,$,L;if(!r.current.search||c.current.shouldFilter===!1){r.current.filtered.count=a.current.size;return}r.current.filtered.groups=new Set;let G=0;for(let H of a.current){let ne=(R=(S=o.current.get(H))==null?void 0:S.value)!=null?R:"",de=(L=($=o.current.get(H))==null?void
|
||
|
|
`,empty:!0}):t.length===1&&t[0].content===""&&(t[0].content=`
|
||
|
|
`,t[0].empty=!0)},ur=(t,s)=>{const r=t.length;return r>0&&t[r-1]===s?t:t.concat(s)},ou=t=>{const s=[[]],r=[t],a=[0],n=[t.length];let o=0,l=0,c=[];const d=[c];for(;l>-1;){for(;(o=a[l]++)<n[l];){let u,m=s[l];const y=r[l][o];if(typeof y=="string"?(m=l>0?m:["plain"],u=y):(m=ur(m,y.type),y.alias&&(m=ur(m,y.alias)),u=y.content),typeof u!="string"){l++,s.push(m),r.push(u),a.push(0),n.push(u.length);continue}const N=u.split(nu),h=N.length;c.push({types:m,content:N[0]});for(let p=1;p<h;p++)dr(c),d.push(c=[]),c.push({types:m,content:N[p]})}l--,s.pop(),r.pop(),a.pop(),n.pop()}return dr(c),d},pr=ou,iu=({prism:t,code:s,grammar:r,language:a})=>i.useMemo(()=>{if(r==null)return pr([s]);const n={code:s,grammar:r,language:a,tokens:[]};return t.hooks.run("before-tokenize",n),n.tokens=t.tokenize(s,r),t.hooks.run("after-tokenize",n),pr(n.tokens)},[s,r,a,t]),lu=(t,s)=>{const{plain:r}=t,a=t.styles.reduce((n,o)=>{const{languages:l,style:c}=o;return l&&!l.includes(s)||o.types.forEach(d=>{const u=ge(ge({},n[d]),c);n[d]=u}),n},{});return a.root=r,a.plain=Ht(ge({},r),{backgroundColor:void 0}),a},cu=lu,du=({children:t,language:s,code:r,theme:a,prism:n})=>{const o=s.toLowerCase(),l=cu(a,o),c=ru(l),d=au(l),u=n.languages[o],m=iu({prism:n,language:o,code:r,grammar:u});return t({tokens:m,className:`prism-code language-${o}`,style:l!=null?l.root:{},getLineProps:c,getTokenProps:d})},uu=t=>i.createElement(du,Ht(ge({},t),{prism:t.prism||k,theme:t.theme||sn,code:t.code,language:t.language}));/*! Bundled license information:
|
||
|
|
|
||
|
|
prismjs/prism.js:
|
||
|
|
(**
|
||
|
|
* Prism: Lightweight, robust, elegant syntax highlighting
|
||
|
|
*
|
||
|
|
* @license MIT <https://opensource.org/licenses/MIT>
|
||
|
|
* @author Lea Verou <https://lea.verou.me>
|
||
|
|
* @namespace
|
||
|
|
* @public
|
||
|
|
*)
|
||
|
|
*/const pu=(t,s)=>s.some(r=>{if(typeof r=="number")return t===r;const[a,n]=r.split(":").map(o=>parseInt(o));return a<=t&&t<=n}),mu=(t,s,r)=>r.some(([a,[n,o]])=>a===t&&n<=s&&s<=o),gu=(t,s)=>t.split(new RegExp(`(${s.map(([r])=>r).join("|")})`)).filter(Boolean),fu=t=>t.map(s=>{s=s.startsWith("/")?s:"/"+s;const[,r,a="0:Infinity"]=s.split("/"),[n,o=n]=a.split(":").map(l=>Number(l));return[r,[n,o]]}),rn=(t,s)=>()=>{const r=i.useContext(t);if(r===void 0)throw new Error(s);return r},Kt=t=>Object.assign(i.forwardRef(t),{displayName:t.displayName??t.name}),an=i.createContext(void 0),nn=i.createContext(void 0),on=rn(an,'Could not find nearest <CodeBlock /> component. Please wrap this component with a <CodeBlock /> component imported from "react-code-block".'),zs=rn(nn,'Could not find nearest <CodeBlock.Code /> component. Please wrap this component with <CodeBlock.Code /> component imported from "react-code-block".'),ye=({code:t,words:s=[],lines:r=[],children:a,...n})=>{const o=i.useMemo(()=>fu(s),[s]);return e.jsx(an.Provider,{value:{code:t.trim(),words:o,lines:r,...n},children:a})},hu=({as:t,children:s,...r},a)=>{const{lines:n,words:o,...l}=on(),c=t??"pre";return e.jsx(uu,{...l,children:d=>e.jsx(c,{...r,ref:a,children:d.tokens.map((u,m)=>{const f=m+1,y=pu(f,n);return e.jsx(nn.Provider,{value:{highlight:d,line:u,lineNumber:f},children:typeof s=="function"?s({isLineHighlighted:y,lineNumber:f},m):s},m)})})})},xu=({as:t,children:s,className:r,...a},n)=>{const{highlight:o,line:l}=zs(),{getLineProps:c}=o,d=t??"div";return e.jsx(d,{...c({line:l,className:r}),...a,ref:n,children:s})},bu=({as:t,children:s=({children:o})=>e.jsx("span",{children:o}),className:r,...a},n)=>{const{words:o}=on(),{line:l,highlight:c,lineNumber:d}=zs(),{getTokenProps:u}=c,m=t??"span";return e.jsx(Be.Fragment,{children:l.map((f,y)=>{const{children:N,...h}=u({token:f,className:r}),p=o.length?gu(N,o):[N];return e.jsx(Be.Fragment,{children:p.map((g,x)=>e.jsx(m,{...h,...a,ref:n,children:s({children:g,isTokenHighlighted:mu(g,d,o)})},x))},y)})})},yu=({as:t,...s},r)=>{const{lineNumber:a}=zs(),n=t??"span";return e.jsx(n,{...s,ref:r,children:a})};ye.Code=Kt(hu);ye.LineContent=Kt(xu);ye.Token=Kt(bu);ye.LineNumber=Kt(yu);const vu={plain:{color:"var(--foreground)",backgroundColor:"var(--muted)"},styles:[{types:["comment"],style:{color:"#6e7781",fontStyle:"italic"}},{types:["keyword","selector","changed"],style:{color:"#cf222e"}},{types:["constant","number","builtin"],style:{color:"#0550ae"}},{types:["string","attr-value"],style:{color:"#0a3069"}},{types:["function","attr-name"],style:{color:"#8250df"}},{types:["tag","operator"],style:{color:"#116329"}},{types:["variable","property"],style:{color:"#953800"}},{types:["punctuation"],style:{color:"#24292f"}}]},ju={plain:{color:"var(--foreground)",backgroundColor:"var(--muted)"},styles:[{types:["comment"],style:{color:"#8b949e",fontStyle:"italic"}},{types:["keyword","selector","changed"],style:{color:"#ff7b72"}},{types:["constant","number","builtin"],style:{color:"#79c0ff"}},{types:["string","attr-value"],style:{color:"#a5d6ff"}},{types:["function","attr-name"],style:{color:"#d2a8ff"}},{types:["tag","operator"],style:{color:"#7ee787"}},{types:["variable","property"],style:{color:"#ffa657"}},{types:["punctuation"],style:{color:"#c9d1d9"}}]};function as({code:t,language:s="typescript",fileName:r,className:a,maxLines:n=200}){const[o,l]=i.useState(!1),[c,d]=i.useState(!1),{theme:u}=Fi(),m=async()=>{await navigator.clipboard.writeText(t),l(!0),setTimeout(()=>l(!1),2e3)},f=t.split(`
|
||
|
|
`),y=f.length>n,N=c?t:f.slice(0,n).join(`
|
||
|
|
`);return e.jsxs("div",{className:v("relative group rounded-lg overflow-hidden",a),children:[r&&e.jsxs("div",{className:"flex items-center justify-between px-4 py-2 border-b bg-muted/50",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:r}),e.jsxs(q,{variant:"ghost",size:"icon",className:"h-7 w-7 opacity-0 group-hover:opacity-100 transition-opacity",onClick:m,children:[o?e.jsx(qe,{className:"h-4 w-4"}):e.jsx(Ar,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"Copy code"})]})]}),e.jsx(ye,{code:N,language:s,theme:u==="dark"?ju:vu,children:e.jsx(ye.Code,{className:"bg-muted/50 p-4 text-sm whitespace-pre-wrap break-words",children:e.jsx(ye.LineContent,{className:"max-w-full",children:e.jsx(ye.Token,{})})})}),y&&e.jsx("div",{className:"flex justify-center p-2 border-t bg-muted/50",children:e.jsx(q,{variant:"ghost",size:"sm",onClick:()=>d(!c),className:"flex items-center gap-2",children:c?e.jsxs(e.Fragment,{children:["Show Less ",e.jsx(Tr,{className:"h-4 w-4"})]}):e.jsxs(e.Fragment,{children:["Show More (",f.length-n," more lines)"," ",e.jsx(ot,{className:"h-4 w-4"})]})})})]})}function wu(t){const[s,r]=i.useState(null),[a,n]=i.useState(!1),[o,l]=i.useState(null);return i.useEffect(()=>{if(!t){l("Node name is required");return}n(!0),l(null),fetch(`/ui/api/v1/proxy/${t}/ui/api/v1/cluster/nodes/self/details`).then(c=>{if(!c.ok)throw new Error(`Failed to fetch node details: ${c.statusText}`);return c.json()}).then(c=>{var d,u;c.target=((u=(d=c.config.match(/target:\s*([^\n]+)/))==null?void 0:d[1])==null?void 0:u.trim())||"",r(c),n(!1)}).catch(c=>{l(c instanceof Error?c.message:"An error occurred"),n(!1)})},[t]),{nodeDetails:s,isLoading:a,error:o}}function Nu(t,s){const[r,a]=i.useState(!1),[n,o]=i.useState(null),[l,c]=i.useState("");return i.useEffect(()=>{if(!s){c("");return}if(!t)return;const d=new AbortController;async function u(){a(!0),o(null);try{const m=await fetch(`/ui/api/v1/proxy/${t}/metrics`,{signal:d.signal});if(!m.ok)throw new Error(`Failed to fetch metrics: ${m.statusText}`);const f=await m.text();c(f)}catch(m){m instanceof Error?o(m.message):o("An unknown error occurred")}finally{a(!1)}}return u(),()=>{d.abort()}},[t,s]),{isLoading:r,error:n,metrics:l}}const ku={Running:"#10B981",Starting:"#F59E0B",New:"#3B82F6",Stopping:"#F59E0B",Terminated:"#6B7280",Failed:"#EF4444"};function Su({services:t}){const s=i.useMemo(()=>{const a=t.reduce((n,{status:o})=>{const l=o;return n.set(l,(n.get(l)||0)+1),n},new Map);return Array.from(a.entries()).sort((n,o)=>o[1]-n[1]).map(([n,o])=>({name:n,value:o,color:ku[n]}))},[t]),r=i.useMemo(()=>t.length,[t]);return s.length===0?null:e.jsxs("div",{className:"h-[180px] w-full flex items-center",children:[e.jsxs("div",{className:"flex-1 relative",children:[e.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none z-10",children:[e.jsx("div",{className:"text-2xl font-bold",children:r}),e.jsx("div",{className:"text-xs text-muted-foreground",children:"Services"})]}),e.jsx(ct,{width:"100%",height:180,children:e.jsxs(Dt,{margin:{top:0,right:0,bottom:0,left:0},children:[e.jsx(Ot,{data:s,cx:"50%",cy:"50%",labelLine:!1,outerRadius:70,innerRadius:50,dataKey:"value",paddingAngle:2,strokeWidth:2,children:s.map(a=>e.jsx($t,{fill:a.color,stroke:"hsl(var(--background))"},`cell-${a.name}`))}),e.jsx(dt,{content:({active:a,payload:n})=>{if(!a||!n||!n[0])return null;const o=n[0].payload;return e.jsxs("div",{className:"bg-background border rounded-lg shadow-lg px-3 py-2 flex items-center gap-2",children:[e.jsx("div",{className:"w-2.5 h-2.5 rounded-sm",style:{backgroundColor:o.color}}),e.jsx("span",{className:"text-sm font-medium",children:o.name}),e.jsx("span",{className:"text-sm font-semibold",children:o.value})]})}})]})})]}),e.jsx("div",{className:"flex flex-col gap-1.5 min-w-[120px] pl-4",children:s.map(a=>e.jsxs("div",{className:"flex items-center justify-between gap-2 text-sm",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-2 h-2 rounded-full shrink-0",style:{backgroundC
|
||
|
|
${n} [data-chart=${t}] {
|
||
|
|
${r.map(([o,l])=>{var d;const c=((d=l.theme)==null?void 0:d[a])||l.color;return c?` --color-${o}: ${c};`:null}).join(`
|
||
|
|
`)}
|
||
|
|
}
|
||
|
|
`).join(`
|
||
|
|
`)}}):null},rp=dt,wn=i.forwardRef(({active:t,payload:s,className:r,indicator:a="dot",hideLabel:n=!1,hideIndicator:o=!1,label:l,labelFormatter:c,labelClassName:d,formatter:u,color:m,nameKey:f,labelKey:y},N)=>{const{config:h}=vn(),p=i.useMemo(()=>{var E;if(n||!(s!=null&&s.length))return null;const[x]=s,b=`${y||x.dataKey||x.name||"value"}`,j=gs(h,x,b),w=!y&&typeof l=="string"?((E=h[l])==null?void 0:E.label)||l:j==null?void 0:j.label;return c?e.jsx("div",{className:v("font-medium",d),children:c(w,s)}):w?e.jsx("div",{className:v("font-medium",d),children:w}):null},[l,c,s,n,d,h,y]);if(!t||!(s!=null&&s.length))return null;const g=s.length===1&&a!=="dot";return e.jsxs("div",{ref:N,className:v("grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl",r),children:[g?null:p,e.jsx("div",{className:"grid gap-1.5",children:s.map((x,b)=>{const j=`${f||x.name||x.dataKey||"value"}`,w=gs(h,x,j),E=m||x.payload.fill||x.color;return e.jsx("div",{className:v("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",a==="dot"&&"items-center"),children:u&&(x==null?void 0:x.value)!==void 0&&x.name?u(x.value,x.name,x,b,x.payload):e.jsxs(e.Fragment,{children:[w!=null&&w.icon?e.jsx(w.icon,{}):!o&&e.jsx("div",{className:v("shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]",{"h-2.5 w-2.5":a==="dot","w-1":a==="line","w-0 border-[1.5px] border-dashed bg-transparent":a==="dashed","my-0.5":g&&a==="dashed"}),style:{"--color-bg":E,"--color-border":E}}),e.jsxs("div",{className:v("flex flex-1 justify-between leading-none",g?"items-end":"items-center"),children:[e.jsxs("div",{className:"grid gap-1.5",children:[g?p:null,e.jsx("span",{className:"text-muted-foreground",children:(w==null?void 0:w.label)||x.name})]}),x.value&&e.jsx("span",{className:"font-mono font-medium tabular-nums text-foreground",children:x.value.toLocaleString()})]})]})},x.dataKey)})})]})});wn.displayName="ChartTooltip";const ap=i.forwardRef(({className:t,hideIcon:s=!1,payload:r,verticalAlign:a="bottom",nameKey:n},o)=>{const{config:l}=vn();return r!=null&&r.length?e.jsx("div",{ref:o,className:v("flex items-center justify-center gap-4",a==="top"?"pb-3":"pt-3",t),children:r.map(c=>{const d=`${n||c.dataKey||"value"}`,u=gs(l,c,d);return e.jsxs("div",{className:v("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"),children:[u!=null&&u.icon&&!s?e.jsx(u.icon,{}):e.jsx("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:c.color}}),u==null?void 0:u.label]},c.value)})}):null});ap.displayName="ChartLegend";function gs(t,s,r){if(typeof s!="object"||s===null)return;const a="payload"in s&&typeof s.payload=="object"&&s.payload!==null?s.payload:void 0;let n=r;return r in s&&typeof s[r]=="string"?n=s[r]:a&&r in a&&typeof a[r]=="string"&&(n=a[r]),n in t?t[n]:t[r]}const np=ji,op=wi,ip=Ni,lp=ia({tenant:Ye().min(1,"Tenant ID is required"),since:Ye(),matcher:Ye().default("{}")}),cp=[{value:"1h",label:"Last 1 hour"},{value:"3h",label:"Last 3 hours"},{value:"6h",label:"Last 6 hours"},{value:"12h",label:"Last 12 hours"},{value:"24h",label:"Last 24 hours"}];function dp({values:t,totalValues:s}){return e.jsx("div",{className:"space-y-2 py-2",children:t.map(({value:r,count:a})=>e.jsxs("div",{className:"grid grid-cols-[200px_1fr_80px] items-center gap-4",children:[e.jsx(be,{variant:"outline",className:"font-mono text-xs justify-self-start overflow-hidden",children:r}),e.jsx("div",{className:"h-2 bg-muted rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full bg-primary",style:{width:`${a/s*100}%`}})}),e.jsxs("span",{className:"text-xs text-muted-foreground tabular-nums justify-self-end",children:[(a/s*100).toFixed(1),"%"]})]},r))})}function up(){const{cluster:t}=ue(),{toast:s}=zt(),[r,a]=i.useState(null),[n,o]=i.useState("uniqueValues"),[l,c]=i.useState("desc"),[d,u]=i.useState("uniqueValues"),[m,f]=i.useState(new Set),y=la({resolver:bn(lp),defaultValues:{matcher:"{}",since:"1h"}}),N=Oe(t==null?void 0:t.members,"query-frontend"),{isLoa
|
||
|
|
`))||"";return w.textContent=`:root { ${E} }`,document.head.appendChild(w),()=>w.remove()},[r]);i.useEffect(()=>x,[x]);const b={value:{label:d==="uniqueValues"?"Unique Values":"Found In Streams",theme:{light:"var(--chart-color-0)",dark:"var(--chart-color-0)"}}},j=i.useMemo(()=>r?[...r.labels].sort((w,E)=>{let C=0;switch(n){case"name":C=w.name.localeCompare(E.name);break;case"uniqueValues":C=w.uniqueValues-E.uniqueValues;break;case"inStreams":C=w.inStreams-E.inStreams;break;case"cardinality":C=w.uniqueValues/w.inStreams-E.uniqueValues/E.inStreams;break}return l==="asc"?C:-C}):[],[r,n,l]);return e.jsxs("div",{className:"container mx-auto p-4 space-y-6",children:[e.jsxs(ee,{children:[e.jsxs(se,{children:[e.jsx(ae,{children:"Analyze Labels"}),e.jsx(Qe,{children:"Analyze label distribution across your log streams"})]}),e.jsx(te,{children:e.jsx(mn,{...y,children:e.jsxs("form",{onSubmit:y.handleSubmit(g),className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[e.jsx(Ie,{control:y.control,name:"tenant",render:({field:w})=>e.jsxs(ve,{className:"flex flex-col space-y-1.5",children:[e.jsx(fe,{children:"Tenant ID"}),e.jsx(je,{children:e.jsx(xe,{placeholder:"Enter tenant ID...",...w})}),e.jsx(we,{className:"text-xs"})]})}),e.jsx(Ie,{control:y.control,name:"since",render:({field:w})=>e.jsxs(ve,{className:"flex flex-col space-y-1.5",children:[e.jsx(fe,{children:"Time Range"}),e.jsxs(Tt,{onValueChange:w.onChange,defaultValue:w.value,children:[e.jsx(je,{children:e.jsx(et,{children:e.jsx(Rt,{placeholder:"Select time range"})})}),e.jsx(tt,{children:cp.map(E=>e.jsx(ze,{value:E.value,children:E.label},E.value))})]}),e.jsx(we,{className:"text-xs"})]})}),e.jsx(Ie,{control:y.control,name:"matcher",render:({field:w})=>e.jsxs(ve,{className:"flex flex-col space-y-1.5",children:[e.jsx(fe,{children:"Matcher"}),e.jsx(je,{children:e.jsx(xe,{placeholder:"Enter matcher... (default: {})",...w})}),e.jsx(we,{className:"text-xs"})]})}),e.jsx(q,{type:"submit",disabled:h,className:"self-end h-10",children:h?"Analyzing...":"Analyze"})]})})})]}),r&&e.jsxs(e.Fragment,{children:[e.jsxs(ee,{children:[e.jsxs(se,{className:"flex flex-col items-stretch space-y-0 border-b p-0 sm:flex-row",children:[e.jsxs("div",{className:"flex flex-1 flex-col justify-center gap-1 px-6 py-5 sm:py-6",children:[e.jsx(ae,{children:"Label Distribution"}),e.jsx(Qe,{children:"Top 20 labels by unique values"})]}),e.jsxs("div",{className:"flex",children:[e.jsxs("div",{className:"relative z-30 flex flex-1 flex-col justify-center gap-1 px-6 py-4 text-left sm:px-8 sm:py-6",children:[e.jsx("span",{className:"text-xs text-muted-foreground",children:"Total Streams"}),e.jsx("span",{className:"text-lg font-bold leading-none sm:text-3xl",children:r.totalStreams.toLocaleString()})]}),e.jsxs("div",{className:"relative z-30 flex flex-1 flex-col justify-center gap-1 border-l px-6 py-4 text-left sm:px-8 sm:py-6",children:[e.jsx("span",{className:"text-xs text-muted-foreground",children:"Unique Labels"}),e.jsx("span",{className:"text-lg font-bold leading-none sm:text-3xl",children:r.uniqueLabels.toLocaleString()})]})]})]}),e.jsxs(te,{className:"px-2 sm:p-6",children:[e.jsx("div",{className:"mb-4",children:e.jsxs(Tt,{value:d,onValueChange:w=>u(w),children:[e.jsx(et,{className:"w-[200px]",children:e.jsx(Rt,{placeholder:"Select metric"})}),e.jsxs(tt,{children:[e.jsx(ze,{value:"uniqueValues",children:"Unique Values"}),e.jsx(ze,{value:"inStreams",children:"Found In Streams"})]})]})}),e.jsx(jn,{config:b,className:"aspect-auto h-[500px] w-full",children:e.jsxs(Si,{data:r.labels.slice(0,20).map((w,E)=>({name:w.name,value:d==="uniqueValues"?w.uniqueValues:w.inStreams,fill:`var(--chart-color-${E})`})),layout:"vertical",margin:{right:24},barSize:452/Math.min(20,r.labels.length)*.6,maxBarSize:24,children:[e.jsx(Ei,{horizontal:!1}),e.jsx(Ci,{dataKey:"name",type:"category",tickLine:!1,axisLine:!1,width:90,fontSize:11,interval:0}),e.jsx(Ti,{type:"number",tickLine:!1,axisLine:!1,tickMargin:8}),e.jsx(rp,{content:e.jsx(wn,{className:"w-[200px]"})}),e.jsx(Ri,{dataKey:"value",fillOpacity:.8,radius:[4,4,0,0]})]})})]})]}),e.
|
||
|
|
Revision: ${c.revision}
|
||
|
|
Branch: ${c.branch}
|
||
|
|
Build User: ${c.buildUser}
|
||
|
|
Build Date: ${c.buildDate}
|
||
|
|
Go Version: ${c.goVersion}
|
||
|
|
`).join(`
|
||
|
|
`);return e.jsxs(Vt,{open:a,onOpenChange:n,children:[e.jsx(Ut,{asChild:!0,children:e.jsxs("span",{className:"text-sm text-muted-foreground flex items-center gap-1",children:[e.jsx("button",{onClick:()=>n(!a),className:v("transition-opacity duration-200 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 rounded px-1 -mx-1",{"opacity-0":r,"opacity-100":!r}),children:t}),r&&e.jsxs(e.Fragment,{children:[e.jsx(he,{className:"h-3 w-3 animate-spin"}),"Loading..."]})]})}),e.jsx(mt,{side:"bottom",align:"start",className:"w-[400px]",children:e.jsxs("div",{className:"p-2",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("div",{className:"font-semibold",children:"Build Information"}),!r&&s.length>0&&e.jsx($s,{text:o()})]}),e.jsx("div",{className:v("transition-opacity duration-200",{"opacity-0":r,"opacity-100":!r}),children:s.length>0?s.map(({version:l,info:c})=>e.jsxs("div",{className:"mb-2 last:mb-0",children:[e.jsx("div",{className:"font-semibold",children:l}),e.jsxs("div",{className:"text-sm",children:[e.jsxs("div",{children:["Revision: ",c.revision]}),e.jsxs("div",{children:["Branch: ",c.branch]}),e.jsxs("div",{children:["Build User: ",c.buildUser]}),e.jsxs("div",{children:["Build Date: ",c.buildDate]}),e.jsxs("div",{children:["Go Version: ",c.goVersion]})]})]},l)):e.jsx("div",{className:"text-sm text-muted-foreground",children:"No build information available"})}),r&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(he,{className:"h-4 w-4 animate-spin"}),e.jsx("span",{children:"Loading build information..."})]})]})})]})}const ns=768;function hp(){const[t,s]=i.useState(void 0);return i.useEffect(()=>{const r=window.matchMedia(`(max-width: ${ns-1}px)`),a=()=>{s(window.innerWidth<ns)};return r.addEventListener("change",a),s(window.innerWidth<ns),()=>r.removeEventListener("change",a)},[]),!!t}const Vs=i.forwardRef(({className:t,orientation:s="horizontal",decorative:r=!0,...a},n)=>e.jsx(oa,{ref:n,decorative:r,orientation:s,className:v("shrink-0 bg-border",s==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",t),...a}));Vs.displayName=oa.displayName;const xp=ws,bp=Ns,Sn=i.forwardRef(({className:t,...s},r)=>e.jsx(it,{className:v("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...s,ref:r}));Sn.displayName=it.displayName;const yp=Ee("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),En=i.forwardRef(({side:t="right",className:s,children:r,...a},n)=>e.jsxs(bp,{children:[e.jsx(Sn,{}),e.jsxs(lt,{ref:n,className:v(yp({side:t}),s),...a,children:[e.jsxs(aa,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[e.jsx(vs,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]}),r]})]}));En.displayName=lt.displayName;const vp=i.forwardRef(({className:t,...s},r)=>e.jsx(Lt,{ref:r,className:v("text-lg font-semibold text-foreground",t),...s}));vp.displayName=Lt.displayName;const jp=i.forwardRef(({className:t,...s},r)=>e.jsx(Pt,{ref:r,className:v("text-sm text-muted-foreground",t),...s}));jp.displayName=Pt.displayName;function mr(
|