@odigos/ui-kit 0.0.145 → 0.0.147

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.0.147](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.146...ui-kit-v0.0.147) (2025-12-14)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * update YAML formatting in YamlSectionCard to remove unnecessary spaces after colons ([#535](https://github.com/odigos-io/ui-kit/issues/535)) ([3fd4db9](https://github.com/odigos-io/ui-kit/commit/3fd4db9ae22a0b1ba831375468eedd5d290b3d66))
9
+
10
+ ## [0.0.146](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.145...ui-kit-v0.0.146) (2025-12-14)
11
+
12
+
13
+ ### Features
14
+
15
+ * add yaml for source overview ([#533](https://github.com/odigos-io/ui-kit/issues/533)) ([d0cc4ca](https://github.com/odigos-io/ui-kit/commit/d0cc4ca99cdb435dfa5e5f19fb96bac3e6d45fab))
16
+
3
17
  ## [0.0.145](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.144...ui-kit-v0.0.145) (2025-12-14)
4
18
 
5
19
 
@@ -0,0 +1,3 @@
1
+ import o,{useMemo as s}from"react";import t from"styled-components";import{VIcon as a,CopyIcon as i,YamlIcon as e}from"../icons.js";import{c7 as n,i as r,j as l,k as c,f as m,q as p,aJ as d,h as u,cf as f}from"./ui-components-ad4d911e.js";const y=t.div`
2
+ padding: 0 12px;
3
+ `,b=({yaml:t})=>{const{clickCopy:b,isCopied:h}=n(),k=s(()=>[{id:r(),type:l.Button,buttonProps:{leftIcon:h?a:i,onClick:()=>b(t||""),disabled:h,size:c.S,variant:m.Secondary}}],[t,h]);return t?o.createElement(u,{icon:e,title:"YAML",actions:k},o.createElement(y,null,o.createElement(f,{code:t.replaceAll(": |",":"),language:"yaml",theme:"duotoneDark"}))):o.createElement(p,null,o.createElement(d,{title:"No YAML found",subTitle:"The YAML for this resource is not available"}))};export{b as Y};
@@ -472,7 +472,7 @@ import{SamplerIcon as e,PiiMaskingIcon as t,ImageErrorIcon as o,K8sLogo as n,Add
472
472
  `,pr=It(Li)`
473
473
  word-break: break-word;
474
474
  white-space: pre-wrap;
475
- `,ur=({withIcon:e,titleIcon:t,title:o,text:n,timestamp:i,children:a})=>{const r=Si.useTheme(),{popupRef:s,popupOpen:l,setPopupOpen:c,popupPosition:d,handlePosition:p}=Ba({defaultClientHeight:40,defaultClientwidth:Math.min(7.5*(n?.length||0),300)}),u=ft(()=>!!_i(n||"")?.length,[n]),h=e=>{const{type:t,clientX:o,clientY:n}=e;u?p(d.left||o,d.top||n):p(o,n),c("mouseleave"!==t)};return n?xt.createElement(dr,{onMouseEnter:h,onMouseMove:h,onMouseLeave:h},a,e&&xt.createElement(qe,{fill:r.v2.colors.silver[200]}),xt.createElement(cr,{ref:s,isOpen:l,top:d.top,left:d.left,asPortal:!0,withPointerEvents:u,onMouseEnter:u?h:void 0,maxWidth:"270px",borderRadius:"16px",padding:"8px 12px"},(!!t||!!o)&&xt.createElement(ca,{style:{marginBottom:"4px"},$gap:4},t&&xt.createElement(t,{size:12,fill:r.text.secondary}),o&&xt.createElement(Li,{size:12,color:r.text.secondary},o)),xt.createElement(pr,{size:12,color:r.text.info},n),!!i&&xt.createElement(Li,{size:10,color:r.text.darker_grey,family:"secondary",style:{marginTop:"8px"}},new Date(i).toLocaleString()))):xt.createElement(xt.Fragment,null,a)},hr=It.button`
475
+ `,ur=({withIcon:e,titleIcon:t,title:o,text:n,timestamp:i,children:a})=>{const r=Si.useTheme(),{popupRef:s,popupOpen:l,setPopupOpen:c,popupPosition:d,handlePosition:p}=Ba({defaultClientHeight:40,defaultClientwidth:Math.min(7.5*(n?.length||0),300)}),u=ft(()=>!!_i(n||"")?.length,[n]),h=e=>{const{type:t,clientX:o,clientY:n}=e;u?p(d.left||o,d.top||n):p(o,n),c("mouseleave"!==t)};return n?xt.createElement(dr,{onMouseEnter:h,onMouseMove:h,onMouseLeave:h},a,e&&xt.createElement(qe,{fill:r.v2.colors.silver[200]}),xt.createElement(cr,{ref:s,isOpen:l,top:d.top,left:d.left,asPortal:!0,withPointerEvents:u,onMouseEnter:u?h:void 0,maxWidth:"270px",borderRadius:"16px",padding:"8px 12px"},(!!t||!!o)&&xt.createElement(ca,{style:{marginBottom:"4px"},$gap:4},t&&xt.createElement(t,{key:"icon",size:12,fill:r.text.secondary}),o&&xt.createElement(Li,{key:"title",size:12,color:r.text.secondary},o)),xt.createElement(pr,{size:12,color:r.text.info},n),!!i&&xt.createElement(Li,{size:10,color:r.text.darker_grey,family:"secondary",style:{marginTop:"8px"}},new Date(i).toLocaleString()))):xt.createElement(xt.Fragment,null,a)},hr=It.button`
476
476
  position: relative;
477
477
  width: ${({$size:e})=>e}px;
478
478
  height: ${({$size:e})=>e}px;
@@ -775,9 +775,9 @@ import{SamplerIcon as e,PiiMaskingIcon as t,ImageErrorIcon as o,K8sLogo as n,Add
775
775
  `,Ls=It(Li)`
776
776
  font-size: 12px;
777
777
  text-align: right;
778
- `,Bs=({title:e,subTitle:t,tooltip:o,value:n})=>xt.createElement(Os,null,xt.createElement(da,{$gap:4},xt.createElement(ur,{text:o||""},e&&xt.createElement(_s,null,e),t&&xt.createElement(Fs,null,t))),xt.createElement(Rs,null,n?.status?xt.createElement(ps,{status:"transitioning"===n.status?go.Loading:n.status,title:n.text||n.status,withBorder:!0,withIcon:!0}):xt.createElement(Ls,null,n?.text||"-"))),Ms=It(da)`
778
+ `,Bs=({title:e,subTitle:t,tooltip:o,value:n})=>xt.createElement(Os,null,xt.createElement(da,{$gap:4},xt.createElement(ur,{text:o||""},e&&xt.createElement(_s,{key:"title"},e),t&&xt.createElement(Fs,{key:"subtitle"},t))),xt.createElement(Rs,null,n?.status?xt.createElement(ps,{status:"transitioning"===n.status?go.Loading:n.status,title:n.text||n.status,withBorder:!0,withIcon:!0}):xt.createElement(Ls,null,n?.text||"-"))),Ms=It(da)`
779
779
  width: 100%;
780
- `,Ps=({containerName:e,actualDevices:t,started:o,ready:n,instrumentationInstances:i})=>{const a=ft(()=>{const e=[];return o?.name&&e.push(xt.createElement(ps,{status:Rn(o.value)?Hn(o.value)?ho.Success:ho.Error:ho.Default,title:o.name,withIcon:!0,withBorder:!0,size:8})),n?.name&&e.push(xt.createElement(ps,{status:Rn(n.value)?Hn(n.value)?ho.Success:ho.Error:ho.Default,title:n.name,withIcon:!0,withBorder:!0,size:8})),e},[o?.name,o?.value,n?.name,n?.value]);return xt.createElement(zs,{title:e.value,subTitle:i.length?`${i.length} Instrumented Processes`:void 0,visualProps:{componentsUnderTitles:a},renderActions:()=>xt.createElement(ps,{status:ho.Info,title:"Instrumentation Device",subtitle:t.value&&"[]"!==t.value?t.value:"none",withBorder:!0}),extendableProps:{isExtended:!!i.length,renderExtended:()=>xt.createElement(Ms,{$gap:24},i.map((e,t)=>xt.createElement(Ms,{key:`process-${t}`,$gap:8},xt.createElement(Bs,{title:`Instrumented Process #${t+1}`,subTitle:e.message?.value||"",value:{status:e.healthy.status,text:e.healthy.status===ho.Success?"healthy":"unhealthy"}}),e.identifyingAttributes?.map(({name:e,value:t})=>xt.createElement(Bs,{key:`describe-${e}-${t}`,title:e,subTitle:"",value:{text:t,status:void 0}})))))}})},js=It.div`
780
+ `,Ps=({containerName:e,actualDevices:t,started:o,ready:n,instrumentationInstances:i})=>{const a=ft(()=>{const e=[];return o?.name&&e.push(xt.createElement(ps,{key:"started",status:Rn(o.value)?Hn(o.value)?ho.Success:ho.Error:ho.Default,title:o.name,withIcon:!0,withBorder:!0,size:8})),n?.name&&e.push(xt.createElement(ps,{key:"ready",status:Rn(n.value)?Hn(n.value)?ho.Success:ho.Error:ho.Default,title:n.name,withIcon:!0,withBorder:!0,size:8})),e},[o?.name,o?.value,n?.name,n?.value]);return xt.createElement(zs,{title:e.value,subTitle:i.length?`${i.length} Instrumented Processes`:void 0,visualProps:{componentsUnderTitles:a},renderActions:()=>xt.createElement(ps,{status:ho.Info,title:"Instrumentation Device",subtitle:t.value&&"[]"!==t.value?t.value:"none",withBorder:!0}),extendableProps:{isExtended:!!i.length,renderExtended:()=>xt.createElement(Ms,{$gap:24},i.map((e,t)=>xt.createElement(Ms,{key:`process-${t}`,$gap:8},xt.createElement(Bs,{title:`Instrumented Process #${t+1}`,subTitle:e.message?.value||"",value:{status:e.healthy.status,text:e.healthy.status===ho.Success?"healthy":"unhealthy"}}),e.identifyingAttributes?.map(({name:e,value:t})=>xt.createElement(Bs,{key:`describe-${e}-${t}`,title:e,subTitle:"",value:{text:t,status:void 0}})))))}})},js=It.div`
781
781
  display: flex;
782
782
  flex-direction: column;
783
783
  align-items: center;
@@ -2190,4 +2190,4 @@ import{SamplerIcon as e,PiiMaskingIcon as t,ImageErrorIcon as o,K8sLogo as n,Add
2190
2190
  display: flex;
2191
2191
  flex-direction: ${({$direction:e})=>e===to.Horizontal?"row":"column"};
2192
2192
  gap: ${({$direction:e})=>e===to.Horizontal?16:8}px;
2193
- `,ah=({direction:e=to.Vertical,title:t,size:o,disabled:n,options:i,values:a,setValues:r})=>{const s=o===Qu.S?Di.XS:Di.S;return xt.createElement(ih,{$direction:e},t&&xt.createElement(Ni,{size:s},t),i.map(e=>xt.createElement(nh,{key:`${t}-toggle-${e.id}`,...e,labelAlign:Zu.Right,value:a[e.id],onChange:t=>{return o=e.id,n=t,void r(e=>{const t={...e};return o?t[o]=n:i.forEach(e=>t[e.id]=n),t});var o,n},disabled:n,size:o})))};export{Zc as $,Hp as A,zi as B,Dp as C,iu as D,en as E,da as F,Jl as G,Kt as H,Da as I,sl as J,Yt as K,fu as L,Rr as M,Hs as N,xo as O,la as P,Pi as Q,Jt as R,Cp as S,Ni as T,ml as U,uo as V,Ao as W,On as X,nd as Y,rp as Z,dd as _,ca as a,Ud as a$,po as a0,Li as a1,Od as a2,Td as a3,gc as a4,xd as a5,np as a6,pi as a7,ci as a8,ni as a9,Sn as aA,ri as aB,Go as aC,ws as aD,gn as aE,Ss as aF,ga as aG,xa as aH,Hc as aI,hn as aJ,$a as aK,Kl as aL,cp as aM,na as aN,Jn as aO,hd as aP,sa as aQ,ui as aR,si as aS,zs as aT,mn as aU,Wn as aV,an as aW,vd as aX,Mo as aY,un as aZ,pn as a_,Ra as aa,tn as ab,Rc as ac,hc as ad,Or as ae,lo as af,ii as ag,ya as ah,Lo as ai,Ro as aj,ss as ak,sc as al,so as am,li as an,or as ao,bd as ap,ma as aq,Cr as ar,Zo as as,ea as at,ir as au,ln as av,ps as aw,jn as ax,ur as ay,go as az,Di as b,Rn as b$,Ca as b0,oi as b1,Ea as b2,Yo as b3,on as b4,Ko as b5,Jo as b6,ka as b7,Ba as b8,cr as b9,Yd as bA,ec as bB,fn as bC,Co as bD,_o as bE,Eo as bF,Fo as bG,vo as bH,So as bI,ko as bJ,Zd as bK,dn as bL,Fa as bM,Po as bN,Ga as bO,Tn as bP,va as bQ,fo as bR,nl as bS,gs as bT,Kc as bU,An as bV,zn as bW,ms as bX,Bs as bY,Ps as bZ,cu as b_,Rd as ba,ua as bb,La as bc,Pn as bd,bl as be,Xn as bf,jo as bg,Qo as bh,Ma as bi,Na as bj,gi as bk,Xo as bl,gr as bm,es as bn,us as bo,xs as bp,co as bq,Un as br,Ho as bs,Nn as bt,Io as bu,za as bv,In as bw,Uo as bx,Bo as by,qo as bz,nh as c,Wc as c$,Hn as c0,ja as c1,Fl as c2,zo as c3,ro as c4,Ha as c5,Cs as c6,cn as c7,Fn as c8,Sa as c9,nn as cA,xn as cB,$n as cC,bn as cD,yn as cE,wn as cF,vn as cG,Dn as cH,_n as cI,Ln as cJ,Mn as cK,Vn as cL,qn as cM,Gn as cN,Kn as cO,Yn as cP,Qn as cQ,Zn as cR,qt as cS,wa as cT,Oa as cU,Zs as cV,Gs as cW,uc as cX,Sc as cY,zc as cZ,Bc as c_,Il as ca,ei as cb,rn as cc,Mr as cd,kn as ce,fs as cf,Gt as cg,Xt as ch,Qt as ci,Zt as cj,eo as ck,to as cl,oo as cm,no as cn,io as co,ao as cp,mo as cq,$o as cr,bo as cs,yo as ct,wo as cu,Do as cv,To as cw,No as cx,Oo as cy,Wo as cz,Qu as d,bs as d0,bc as d1,_i as d2,Fi as d3,Ri as d4,zr as d5,ha as d6,$p as d7,fp as d8,Rp as d9,Ep as da,Np as db,Fp as dc,su as dd,gu as de,ku as df,Cu as dg,Au as dh,Du as di,Iu as dj,Ou as dk,Yu as dl,Xu as dm,Zu as dn,ah as dp,Ai as dq,hp as e,dp as f,qa as g,Mp as h,sn as i,Lp as j,pp as k,Ku as l,Lu as m,ho as n,Si as o,Ta as p,En as q,pa as r,Qr as s,wp as t,fa as u,Yp as v,qr as w,Cn as x,Ru as y,Up as z};
2193
+ `,ah=({direction:e=to.Vertical,title:t,size:o,disabled:n,options:i,values:a,setValues:r})=>{const s=o===Qu.S?Di.XS:Di.S;return xt.createElement(ih,{$direction:e},t&&xt.createElement(Ni,{size:s},t),i.map(e=>xt.createElement(nh,{key:`${t}-toggle-${e.id}`,...e,labelAlign:Zu.Right,value:a[e.id],onChange:t=>{return o=e.id,n=t,void r(e=>{const t={...e};return o?t[o]=n:i.forEach(e=>t[e.id]=n),t});var o,n},disabled:n,size:o})))};export{Od as $,Jl as A,zi as B,Dp as C,iu as D,Kt as E,da as F,sl as G,Rr as H,Da as I,Pi as J,Yt as K,fu as L,Jt as M,ml as N,xo as O,la as P,uo as Q,On as R,Cp as S,Ni as T,nd as U,rp as V,Ao as W,dd as X,Zc as Y,po as Z,Li as _,ca as a,oi as a$,Td as a0,gc as a1,xd as a2,np as a3,pi as a4,ci as a5,ni as a6,Ra as a7,tn as a8,Rc as a9,ws as aA,gn as aB,Ss as aC,ga as aD,xa as aE,Hc as aF,hn as aG,$a as aH,Kl as aI,Hs as aJ,cp as aK,na as aL,Jn as aM,hd as aN,sa as aO,ui as aP,si as aQ,zs as aR,mn as aS,Wn as aT,an as aU,vd as aV,Mo as aW,un as aX,pn as aY,Ud as aZ,Ca as a_,hc as aa,Or as ab,lo as ac,ii as ad,ya as ae,Lo as af,Ro as ag,ss as ah,sc as ai,so as aj,li as ak,or as al,bd as am,ma as an,Cr as ao,Zo as ap,ea as aq,ir as ar,ln as as,ps as at,jn as au,ur as av,go as aw,Sn as ax,ri as ay,Go as az,Di as b,ja as b$,Ea as b0,Yo as b1,on as b2,Ko as b3,Jo as b4,ka as b5,Ba as b6,cr as b7,Rd as b8,ua as b9,fn as bA,Co as bB,_o as bC,Eo as bD,Fo as bE,vo as bF,So as bG,ko as bH,Zd as bI,dn as bJ,Fa as bK,Po as bL,Ga as bM,Tn as bN,va as bO,fo as bP,nl as bQ,gs as bR,Kc as bS,An as bT,zn as bU,ms as bV,Bs as bW,Ps as bX,cu as bY,Rn as bZ,Hn as b_,La as ba,Pn as bb,bl as bc,Xn as bd,jo as be,Qo as bf,Ma as bg,Na as bh,gi as bi,Xo as bj,gr as bk,es as bl,us as bm,xs as bn,co as bo,Un as bp,Ho as bq,Nn as br,Io as bs,za as bt,In as bu,Uo as bv,Bo as bw,qo as bx,Yd as by,ec as bz,nh as c,Wc as c$,Fl as c0,zo as c1,ro as c2,Ha as c3,Cs as c4,cn as c5,Fn as c6,Ta as c7,Sa as c8,Il as c9,nn as cA,xn as cB,$n as cC,bn as cD,yn as cE,wn as cF,vn as cG,Dn as cH,_n as cI,Ln as cJ,Mn as cK,Vn as cL,qn as cM,Gn as cN,Kn as cO,Yn as cP,Qn as cQ,Zn as cR,qt as cS,wa as cT,Oa as cU,Zs as cV,Gs as cW,uc as cX,Sc as cY,zc as cZ,Bc as c_,ei as ca,rn as cb,Mr as cc,kn as cd,fs as ce,qr as cf,Gt as cg,Xt as ch,Qt as ci,Zt as cj,eo as ck,to as cl,oo as cm,no as cn,io as co,ao as cp,mo as cq,$o as cr,bo as cs,yo as ct,wo as cu,Do as cv,To as cw,No as cx,Oo as cy,Wo as cz,Qu as d,bs as d0,bc as d1,_i as d2,Fi as d3,Ri as d4,zr as d5,ha as d6,$p as d7,fp as d8,Rp as d9,Ep as da,Np as db,Fp as dc,su as dd,gu as de,ku as df,Cu as dg,Au as dh,Du as di,Iu as dj,Ou as dk,Yu as dl,Xu as dm,Zu as dn,ah as dp,Ai as dq,hp as e,dp as f,qa as g,Mp as h,sn as i,Lp as j,pp as k,Ku as l,Lu as m,ho as n,Si as o,En as p,pa as q,Qr as r,wp as s,Yp as t,fa as u,Cn as v,Ru as w,Up as x,Hp as y,en as z};
@@ -1 +1 @@
1
- export{B as Badge,e as Button,k as ButtonSize,d7 as ButtonTab,d8 as ButtonTabList,f as ButtonVariants,C as Checkbox,db as CheckboxList,da as CheckboxSize,v as CliCommand,t as DataCard,D as Drawer,dc as DropData,dd as Header,b_ as HoverActions,I as IconButton,c9 as IconButtonSize,de as Input,L as Loader,df as Modal,dg as Navbar,dh as Note,dj as Radio,dk as RadioGroup,di as RadioSize,S as Search,h as SectionCard,j as SectionCardActionType,d9 as SectionCardSize,y as Segment,z as StatusCard,l as Table,m as TableVariant,dl as Tag,A as TextCard,c as Toggle,dn as ToggleLabelAlign,dp as ToggleList,d as ToggleSize,dm as ToggleVariant,T as Typography,b as TypographySize,dq as TypographyVariants}from"../chunks/ui-components-c5321fb4.js";import"../icons.js";import"react";import"styled-components";import"zustand";import"javascript-time-ago";import"../chunks/vendor-55cc654c.js";import"react-dom";import"@xyflow/react";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";
1
+ export{B as Badge,e as Button,k as ButtonSize,d7 as ButtonTab,d8 as ButtonTabList,f as ButtonVariants,C as Checkbox,db as CheckboxList,da as CheckboxSize,t as CliCommand,s as DataCard,D as Drawer,dc as DropData,dd as Header,bY as HoverActions,I as IconButton,c8 as IconButtonSize,de as Input,L as Loader,df as Modal,dg as Navbar,dh as Note,dj as Radio,dk as RadioGroup,di as RadioSize,S as Search,h as SectionCard,j as SectionCardActionType,d9 as SectionCardSize,w as Segment,x as StatusCard,l as Table,m as TableVariant,dl as Tag,y as TextCard,c as Toggle,dn as ToggleLabelAlign,dp as ToggleList,d as ToggleSize,dm as ToggleVariant,T as Typography,b as TypographySize,dq as TypographyVariants}from"../chunks/ui-components-ad4d911e.js";import"../icons.js";import"react";import"styled-components";import"zustand";import"javascript-time-ago";import"../chunks/vendor-55cc654c.js";import"react-dom";import"@xyflow/react";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";
package/lib/components.js CHANGED
@@ -1 +1 @@
1
- export{at as AutocompleteInput,aN as Badge,aQ as Button,ae as CancelWarning,r as CenterThis,M as Checkbox,w as Code,ak as ConditionDetails,al as DataCard,G as DataCardFieldTypes,bB as DataCardFields,cX as DataFinger,aT as DataTab,ad as DeleteWarning,bY as DescribeRow,au as Divider,a4 as DocsButton,ac as Drawer,cZ as DrawerFooter,cY as DrawerHeader,be as Dropdown,c_ as ErrorBoundary,bn as ExtendArrow,s as FadeLoader,Q as FieldError,J as FieldLabel,F as FlexColumn,a as FlexRow,c$ as Header,bm as IconButton,c6 as IconGroup,aI as IconTitleBadge,aD as IconWrapped,bU as IconsNav,d0 as ImageControlled,U as Input,$ as InputList,Y as InputTable,aL as InteractiveTable,_ as KeyValueInputsList,aP as LoadingText,ao as Modal,aq as ModalBody,a5 as MonitorsCheckboxes,aF as MonitorsIcons,ap as NavigationButtons,N as NoDataFound,ar as NotificationNote,d6 as Overlay,P as PageContent,b9 as Popup,ca as PopupForm,cf as ScrollX,aX as ScrollY,a3 as SectionTitle,a2 as Segment,ba as SelectionButton,a$ as SkeletonLoader,aw as Status,bA as Stepper,d1 as TabList,aG as TableContainer,aH as TableTitleWrap,aK as TableWrap,bK as Tag,a1 as Text,a6 as TextArea,Z as Toggle,cd as ToggleCodeComponent,ay as Tooltip,aM as TraceLoader,bb as VerticalScroll,d5 as WarningModal,d2 as getLinksFromText,d3 as getStrongsFromText,d4 as renderText}from"./chunks/ui-components-c5321fb4.js";import"./icons.js";import"react";import"styled-components";import"zustand";import"javascript-time-ago";import"./chunks/vendor-55cc654c.js";import"react-dom";import"@xyflow/react";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";
1
+ export{aq as AutocompleteInput,aL as Badge,aO as Button,ab as CancelWarning,q as CenterThis,H as Checkbox,cf as Code,ah as ConditionDetails,ai as DataCard,A as DataCardFieldTypes,bz as DataCardFields,cX as DataFinger,aR as DataTab,aa as DeleteWarning,bW as DescribeRow,ar as Divider,a1 as DocsButton,a9 as Drawer,cZ as DrawerFooter,cY as DrawerHeader,bc as Dropdown,c_ as ErrorBoundary,bl as ExtendArrow,r as FadeLoader,J as FieldError,G as FieldLabel,F as FlexColumn,a as FlexRow,c$ as Header,bk as IconButton,c4 as IconGroup,aF as IconTitleBadge,aA as IconWrapped,bS as IconsNav,d0 as ImageControlled,N as Input,Y as InputList,U as InputTable,aI as InteractiveTable,X as KeyValueInputsList,aN as LoadingText,al as Modal,an as ModalBody,a2 as MonitorsCheckboxes,aC as MonitorsIcons,am as NavigationButtons,aJ as NoDataFound,ao as NotificationNote,d6 as Overlay,P as PageContent,b7 as Popup,c9 as PopupForm,ce as ScrollX,aV as ScrollY,a0 as SectionTitle,$ as Segment,b8 as SelectionButton,aZ as SkeletonLoader,at as Status,by as Stepper,d1 as TabList,aD as TableContainer,aE as TableTitleWrap,aH as TableWrap,bI as Tag,_ as Text,a3 as TextArea,V as Toggle,cc as ToggleCodeComponent,av as Tooltip,aK as TraceLoader,b9 as VerticalScroll,d5 as WarningModal,d2 as getLinksFromText,d3 as getStrongsFromText,d4 as renderText}from"./chunks/ui-components-ad4d911e.js";import"./icons.js";import"react";import"styled-components";import"zustand";import"javascript-time-ago";import"./chunks/vendor-55cc654c.js";import"react-dom";import"@xyflow/react";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";
package/lib/constants.js CHANGED
@@ -1 +1 @@
1
- export{ai as ACTION_OPTIONS,ab as BUTTON_TEXTS,bl as DEFAULT_DATA_STREAM_NAME,by as DESTINATION_CATEGORIES,bf as DISPLAY_LANGUAGES,E as DISPLAY_TITLES,as as FORM_ALERTS,bN as INSTRUMENTATION_RULE_OPTIONS,cQ as LANGUAGE_OPTIONS,bg as MONITORS_OPTIONS,bh as STORAGE_KEYS,cR as TOKEN_ABOUT_TO_EXPIRE}from"./chunks/ui-components-c5321fb4.js";import"./icons.js";import"react";import"styled-components";import"zustand";import"javascript-time-ago";import"./chunks/vendor-55cc654c.js";import"react-dom";import"@xyflow/react";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";
1
+ export{af as ACTION_OPTIONS,a8 as BUTTON_TEXTS,bj as DEFAULT_DATA_STREAM_NAME,bw as DESTINATION_CATEGORIES,bd as DISPLAY_LANGUAGES,z as DISPLAY_TITLES,ap as FORM_ALERTS,bL as INSTRUMENTATION_RULE_OPTIONS,cQ as LANGUAGE_OPTIONS,be as MONITORS_OPTIONS,bf as STORAGE_KEYS,cR as TOKEN_ABOUT_TO_EXPIRE}from"./chunks/ui-components-ad4d911e.js";import"./icons.js";import"react";import"styled-components";import"zustand";import"javascript-time-ago";import"./chunks/vendor-55cc654c.js";import"react-dom";import"@xyflow/react";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";
@@ -1,25 +1,25 @@
1
- import e,{useState as t,useMemo as a,useCallback as l,useEffect as o}from"react";import i,{useTheme as n}from"styled-components";import{F as s,u as r,D as d,S as c,a as u,T as g,b as p,B as b,O as m,C as y,c as h,d as f,L as k,e as C,f as w,g as v,P as x,h as $,i as L,j as P,k as R,l as I,m as A,n as S,o as D,p as M,q as z,r as V,s as O,t as N,I as T,v as j,w as Y,x as F,y as H,N as U,z as W,A as E,W as q}from"../chunks/ui-components-c5321fb4.js";import{ConnectionsIcon as G,OdigosLogo as B,RefreshIcon as K,SettingsIcon as J,DeleteIcon as Q,VIcon as X,XIcon as Z,PodIcon as _,ChevronUpIcon as ee,ChevronDownIcon as te,TerminalIcon as ae,YamlIcon as le,CopyIcon as oe,VSquareIcon as ie,XSquareIcon as ne,PipelineCollectorIcon as se,DownloadIcon as re,GatewayIcon as de}from"../icons.js";import"zustand";import"javascript-time-ago";import"../chunks/vendor-55cc654c.js";import"react-dom";import"@xyflow/react";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";const ce="75vw",ue=i.div`
1
+ import e,{useState as t,useMemo as a,useCallback as l,useEffect as o}from"react";import i,{useTheme as n}from"styled-components";import{F as s,u as r,D as c,S as d,a as u,T as g,b as p,B as b,O as m,C as y,c as h,d as f,L as w,e as k,f as C,g as v,P as x,h as $,i as R,j as L,k as P,l as I,m as A,n as S,o as D,p as V,q as z,r as M,s as O,I as N,t as j,v as T,w as F,x as H,y as U,W}from"../chunks/ui-components-ad4d911e.js";import{ConnectionsIcon as E,OdigosLogo as Y,RefreshIcon as q,SettingsIcon as G,DeleteIcon as B,VIcon as K,XIcon as J,PodIcon as Q,ChevronUpIcon as X,ChevronDownIcon as Z,TerminalIcon as _,VSquareIcon as ee,XSquareIcon as te,PipelineCollectorIcon as ae,DownloadIcon as le,GatewayIcon as oe,YamlIcon as ie}from"../icons.js";import{Y as ne}from"../chunks/index-c204fc21.js";import"zustand";import"javascript-time-ago";import"../chunks/vendor-55cc654c.js";import"react-dom";import"@xyflow/react";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";const se="75vw",re=i.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  border-radius: 16px;
5
5
  background-color: ${({theme:e})=>e.v2.colors.silver[1e3]};
6
6
  overflow: hidden;
7
- `,ge=i.div`
7
+ `,ce=i.div`
8
8
  display: flex;
9
9
  gap: 12px;
10
10
  padding: 16px;
11
11
  background-color: ${({theme:e})=>e.v2.colors.silver[900]};
12
12
  position: sticky;
13
13
  top: 0;
14
- `,pe=i.div`
14
+ `,de=i.div`
15
15
  display: flex;
16
16
  gap: 12px;
17
17
  padding: 16px;
18
- `,be=i(s)`
18
+ `,ue=i(s)`
19
19
  width: ${({$width:e})=>e};
20
20
  gap: 12px;
21
21
  justify-content: space-between;
22
- `,me=i.div`
22
+ `,ge=i.div`
23
23
  display: flex;
24
24
  flex-direction: column;
25
25
  padding: 12px;
@@ -29,7 +29,7 @@ import e,{useState as t,useMemo as a,useCallback as l,useEffect as o}from"react"
29
29
  background-color: ${({theme:e})=>e.v2.colors.silver[900]};
30
30
  overflow-y: auto;
31
31
  overflow-x: hidden;
32
- `,ye=i.div`
32
+ `,pe=i.div`
33
33
  display: flex;
34
34
  align-items: center;
35
35
  gap: 12px;
@@ -40,13 +40,13 @@ import e,{useState as t,useMemo as a,useCallback as l,useEffect as o}from"react"
40
40
  &:hover {
41
41
  background-color: ${({theme:e})=>e.v2.colors.silver[800]};
42
42
  }
43
- `,he=i.div`
43
+ `,be=i.div`
44
44
  display: flex;
45
45
  align-items: center;
46
46
  justify-content: flex-end;
47
47
  gap: 16px;
48
48
  padding: 0 24px;
49
- `,fe=({isOpen:l,onClose:o,connections:i,selectedConnectionIds:s,setSelectedConnectionIds:v,onApply:x})=>{const $=n(),[L,P]=t(""),R=a(()=>i.filter(e=>!L||e.name.toLowerCase().includes(L.toLowerCase())),[i,L]),I=s.length>0,A=e=>{v(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},[S,D]=t(!1),[M,z]=t(void 0),{formData:V,handleFormChange:O,resetFormData:N}=r({automaticRollout:!0});return e.createElement(d,{isOpen:l,hideOverlay:!0,width:ce,header:{icon:G,title:"Cluster Configuration",onClose:o}},e.createElement(ue,null,e.createElement(ge,null,e.createElement(c,{width:"40%",value:L,onChange:P})),e.createElement(pe,null,e.createElement(be,{$width:"40%"},e.createElement(u,{$padding:"0 12px",$justifyContent:"space-between"},e.createElement(u,{$gap:8},e.createElement(g,{size:p.XS},"Clusters"),e.createElement(b,{label:i.length,status:m.Unknown})),e.createElement(u,{$gap:8},e.createElement(g,{size:p.XXXS,color:$.v2.colors.silver[200]},"Selected"),e.createElement(b,{label:`${s.length}/${i.length}`,status:m.Unknown}))),e.createElement(me,{$isFooterOpen:I,$borderRadius:"16px 0 0 16px"},R.map(t=>e.createElement(ye,{key:t.id,onClick:()=>A(t.id)},e.createElement(y,{value:s.includes(t.id),onChange:()=>A(t.id)}),e.createElement(g,{size:p.XS},t.name))))),e.createElement(be,{$width:"60%"},e.createElement(u,{$padding:"2px 12px"},e.createElement(g,{size:p.XS},"Configurations")),e.createElement(me,{$isFooterOpen:I,$borderRadius:"0 16px 16px 0"},e.createElement(u,{$gap:12},e.createElement(h,{size:f.S,label:"Automatic Rollout "+(V.automaticRollout?"Enabled":"Disabled"),tooltip:"Odigos automatically triggers a one-time rollout for workloads when instrumenting or uninstrumenting, ensuring that changes are applied without requiring manual intervention. When automatic rollout is enabled, Odigos will proactively restart workloads as needed to apply updated instrumentation. Users do not need to manually trigger rollouts after adding or removing sources. Any new pods created after enabling or disabling the agent (via automatic rollout, autoscaling, etc.) will still have the agent injected, regardless of this setting. When set to false, additional configurations related to automated rollouts or rollbacks take effect.",value:V.automaticRollout,onChange:e=>O("automaticRollout",e)})))))),I&&e.createElement(he,null,S?e.createElement(k,{label:"Applying configurations...",icon:B,withGradient:!0,typographyProps:{size:p.XXS}}):M?e.createElement(g,{size:p.XXS,color:$.v2.colors.red[500]},M):null,e.createElement("div",{style:{width:"150px"}},e.createElement(C,{variant:w.Secondary,label:"Cancel",fullWidth:!0,onClick:()=>{N(),v([])},disabled:S})),e.createElement("div",{style:{width:"150px"}},e.createElement(C,{variant:w.Primary,label:"Apply",fullWidth:!0,onClick:async()=>{D(!0);const{error:e}=await x(s,V);D(!1),e?z(e):o()},disabled:S}))))};var ke;!function(e){e.Id="id",e.Name="name",e.Type="type",e.Status="status",e.OdigosVersion="odigosVersion",e.ConnectedSince="connectedSince",e.LastActivity="lastActivity"}(ke||(ke={}));const Ce=[{key:ke.Name,label:"Name",sortable:!0},{key:ke.Type,label:"Type",sortable:!0,textAlign:"right"},{key:ke.Status,label:"Status",sortable:!0},{key:ke.OdigosVersion,label:"Odigos Version",sortable:!0},{key:ke.ConnectedSince,label:"Connected Since",sortable:!0},{key:ke.LastActivity,label:"Last Activity",sortable:!0}],we=({tableRowsMaxHeight:i,connections:n,getConnections:s,onClickConnection:r,deleteConnection:d,applyConfigurations:c})=>{const{formatTimeAgo:u}=v(),[g,p]=t(!1),[y,h]=t(n||[]),[f,k]=t(""),C=l(async()=>{try{p(!0),h(await s()??[])}catch(e){}finally{p(!1)}},[]);o(()=>{y.length||C()},[y.length,C]);const[D,M]=t([]),[z,V]=t(!1),O=a(()=>y.filter(e=>!f||e.name.toLowerCase().includes(f.toLowerCase())).map(t=>({onClick:()=>r(t.id),isSelected:D.includes(t.id),onSelect:()=>M(e=>[...e,t.id]),onDeselect:()=>M(e=>e.filter(e=>e!==t.id)),cells:[{key:ke.Id,rawValue:t.id},{key:ke.Name,rawValue:t.name},{key:ke.Type,rawValue:t.type},{key:ke.Status,rawValue:t.status,component:()=>(t=>{const a=t===S.Success?"Connection live":"Connection lost",l=t===S.Success?X:Z;return e.createElement(b,{status:t,label:a,leftIcon:l})})(t.status)},{key:ke.OdigosVersion,rawValue:t.odigosVersion},{key:ke.ConnectedSince,rawValue:t.connectedAt?u(t.connectedAt):"-"},{key:ke.LastActivity,rawValue:t.lastSeenAt?u(t.lastSeenAt):"-"}]})),[y,D,f]);return e.createElement(x,null,e.createElement($,{backgroundWeight:"1000",icon:G,title:"Connections",badge:{label:y.length.toString(),status:m.Unknown},search:{placeholder:"Search by cluster name",value:f,onChange:e=>k(e)},actions:[{id:L(),type:P.Button,buttonProps:{variant:w.Secondary,size:R.S,leftIcon:K,onClick:()=>C(),disabled:g}},{id:L(),type:P.Button,buttonProps:{variant:w.Primary,size:R.S,label:"Configurations",rightIcon:J,onClick:()=>V(!0)}}]},e.createElement(I,{variant:A.Pretty,maxHeight:i,isLoading:g,withCheckboxes:!0,columns:Ce,rows:O,rowActionsPushRightPosition:z?`calc(${ce} - 24px)`:void 0,getRowActions:({cells:e})=>[{id:L(),leftIcon:J,onClick:()=>{const t=e.find(e=>e.key===ke.Id)?.rawValue;t&&(M([t.toString()]),V(!0))}},{id:L(),leftIcon:Q,disabled:e.find(e=>e.key===ke.Status)?.rawValue===S.Success,onClick:async()=>{const t=e.find(e=>e.key===ke.Id)?.rawValue;t&&(await d(t.toString()),C())}}]}),e.createElement(fe,{isOpen:z,onClose:()=>{M([]),V(!1)},connections:y,selectedConnectionIds:D,setSelectedConnectionIds:M,onApply:c})))},ve=i.div`
49
+ `,me=({isOpen:l,onClose:o,connections:i,selectedConnectionIds:s,setSelectedConnectionIds:v,onApply:x})=>{const $=n(),[R,L]=t(""),P=a(()=>i.filter(e=>!R||e.name.toLowerCase().includes(R.toLowerCase())),[i,R]),I=s.length>0,A=e=>{v(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},[S,D]=t(!1),[V,z]=t(void 0),{formData:M,handleFormChange:O,resetFormData:N}=r({automaticRollout:!0});return e.createElement(c,{isOpen:l,hideOverlay:!0,width:se,header:{icon:E,title:"Cluster Configuration",onClose:o}},e.createElement(re,null,e.createElement(ce,null,e.createElement(d,{width:"40%",value:R,onChange:L})),e.createElement(de,null,e.createElement(ue,{$width:"40%"},e.createElement(u,{$padding:"0 12px",$justifyContent:"space-between"},e.createElement(u,{$gap:8},e.createElement(g,{size:p.XS},"Clusters"),e.createElement(b,{label:i.length,status:m.Unknown})),e.createElement(u,{$gap:8},e.createElement(g,{size:p.XXXS,color:$.v2.colors.silver[200]},"Selected"),e.createElement(b,{label:`${s.length}/${i.length}`,status:m.Unknown}))),e.createElement(ge,{$isFooterOpen:I,$borderRadius:"16px 0 0 16px"},P.map(t=>e.createElement(pe,{key:t.id,onClick:()=>A(t.id)},e.createElement(y,{value:s.includes(t.id),onChange:()=>A(t.id)}),e.createElement(g,{size:p.XS},t.name))))),e.createElement(ue,{$width:"60%"},e.createElement(u,{$padding:"2px 12px"},e.createElement(g,{size:p.XS},"Configurations")),e.createElement(ge,{$isFooterOpen:I,$borderRadius:"0 16px 16px 0"},e.createElement(u,{$gap:12},e.createElement(h,{size:f.S,label:"Automatic Rollout "+(M.automaticRollout?"Enabled":"Disabled"),tooltip:"Odigos automatically triggers a one-time rollout for workloads when instrumenting or uninstrumenting, ensuring that changes are applied without requiring manual intervention. When automatic rollout is enabled, Odigos will proactively restart workloads as needed to apply updated instrumentation. Users do not need to manually trigger rollouts after adding or removing sources. Any new pods created after enabling or disabling the agent (via automatic rollout, autoscaling, etc.) will still have the agent injected, regardless of this setting. When set to false, additional configurations related to automated rollouts or rollbacks take effect.",value:M.automaticRollout,onChange:e=>O("automaticRollout",e)})))))),I&&e.createElement(be,null,S?e.createElement(w,{label:"Applying configurations...",icon:Y,withGradient:!0,typographyProps:{size:p.XXS}}):V?e.createElement(g,{size:p.XXS,color:$.v2.colors.red[500]},V):null,e.createElement("div",{style:{width:"150px"}},e.createElement(k,{variant:C.Secondary,label:"Cancel",fullWidth:!0,onClick:()=>{N(),v([])},disabled:S})),e.createElement("div",{style:{width:"150px"}},e.createElement(k,{variant:C.Primary,label:"Apply",fullWidth:!0,onClick:async()=>{D(!0);const{error:e}=await x(s,M);D(!1),e?z(e):o()},disabled:S}))))};var ye;!function(e){e.Id="id",e.Name="name",e.Type="type",e.Status="status",e.OdigosVersion="odigosVersion",e.ConnectedSince="connectedSince",e.LastActivity="lastActivity"}(ye||(ye={}));const he=[{key:ye.Name,label:"Name",sortable:!0},{key:ye.Type,label:"Type",sortable:!0,textAlign:"right"},{key:ye.Status,label:"Status",sortable:!0},{key:ye.OdigosVersion,label:"Odigos Version",sortable:!0},{key:ye.ConnectedSince,label:"Connected Since",sortable:!0},{key:ye.LastActivity,label:"Last Activity",sortable:!0}],fe=({tableRowsMaxHeight:i,connections:n,getConnections:s,onClickConnection:r,deleteConnection:c,applyConfigurations:d})=>{const{formatTimeAgo:u}=v(),[g,p]=t(!1),[y,h]=t(n||[]),[f,w]=t(""),k=l(async()=>{try{p(!0),h(await s()??[])}catch(e){}finally{p(!1)}},[]);o(()=>{y.length||k()},[y.length,k]);const[D,V]=t([]),[z,M]=t(!1),O=a(()=>y.filter(e=>!f||e.name.toLowerCase().includes(f.toLowerCase())).map(t=>({onClick:()=>r(t.id),isSelected:D.includes(t.id),onSelect:()=>V(e=>[...e,t.id]),onDeselect:()=>V(e=>e.filter(e=>e!==t.id)),cells:[{key:ye.Id,rawValue:t.id},{key:ye.Name,rawValue:t.name},{key:ye.Type,rawValue:t.type},{key:ye.Status,rawValue:t.status,component:()=>(t=>{const a=t===S.Success?"Connection live":"Connection lost",l=t===S.Success?K:J;return e.createElement(b,{status:t,label:a,leftIcon:l})})(t.status)},{key:ye.OdigosVersion,rawValue:t.odigosVersion},{key:ye.ConnectedSince,rawValue:t.connectedAt?u(t.connectedAt):"-"},{key:ye.LastActivity,rawValue:t.lastSeenAt?u(t.lastSeenAt):"-"}]})),[y,D,f]);return e.createElement(x,null,e.createElement($,{backgroundWeight:"1000",icon:E,title:"Connections",badge:{label:y.length.toString(),status:m.Unknown},search:{placeholder:"Search by cluster name",value:f,onChange:e=>w(e)},actions:[{id:R(),type:L.Button,buttonProps:{variant:C.Secondary,size:P.S,leftIcon:q,onClick:()=>k(),disabled:g}},{id:R(),type:L.Button,buttonProps:{variant:C.Primary,size:P.S,label:"Configurations",rightIcon:G,onClick:()=>M(!0)}}]},e.createElement(I,{variant:A.Pretty,maxHeight:i,isLoading:g,withCheckboxes:!0,columns:he,rows:O,rowActionsPushRightPosition:z?`calc(${se} - 24px)`:void 0,getRowActions:({cells:e})=>[{id:R(),leftIcon:G,onClick:()=>{const t=e.find(e=>e.key===ye.Id)?.rawValue;t&&(V([t.toString()]),M(!0))}},{id:R(),leftIcon:B,disabled:e.find(e=>e.key===ye.Status)?.rawValue===S.Success,onClick:async()=>{const t=e.find(e=>e.key===ye.Id)?.rawValue;t&&(await c(t.toString()),k())}}]}),e.createElement(me,{isOpen:z,onClose:()=>{V([]),M(!1)},connections:y,selectedConnectionIds:D,setSelectedConnectionIds:V,onApply:d})))},we=i.div`
50
50
  display: flex;
51
51
  align-items: center;
52
52
  justify-content: space-between;
@@ -58,10 +58,10 @@ import e,{useState as t,useMemo as a,useCallback as l,useEffect as o}from"react"
58
58
  &:hover {
59
59
  background: ${({theme:e})=>e.v2.colors.silver[700]};
60
60
  }
61
- `,xe=i.div`
61
+ `,ke=i.div`
62
62
  animation-name: ${D.animations.fade.in};
63
- `,$e=({pod:l,getExtendedPodInfo:i,onClose:n})=>{const{formatTimeAgo:r}=v(),{clickCopy:c,isCopied:u}=M(),[p,b]=t(null),[m,y]=t(!1);o(()=>{l?i(l.namespace,l.name).then(e=>b(e??null)):(b(null),y(!1))},[l]);const h=a(()=>[{id:L(),title:"Node",label:p?.node??"-",withCopy:!0},{id:L(),title:"Status",badge:{status:z(p?.status),label:p?.status??"-"}}],[p]),f=a(()=>p?.containers?.map(e=>({id:L(),items:[{id:L(),title:"Container",label:e.name??"-"},{id:L(),title:"Status",badge:{status:z(e.status),label:e.status??"-"},label:e.startedAt?`(since ${r(e.startedAt)})`:""},{id:L(),title:"Image Version",label:e.image?.split(":")?.[1]??"-"},{id:L(),title:"Image Repository",label:e.image?.split(":")?.[0]??"-"},{id:L(),title:"Restarts",label:e.restarts.toString()},{id:L(),title:"State Reason",label:e.stateReason??"-"},{id:L(),title:"Resource Requests",label:`CPU ${e.resources.requests.cpu} • Memory ${e.resources.requests.memory}`},{id:L(),title:"Resource Limits",label:`CPU ${e.resources.limits.cpu} • Memory ${e.resources.limits.memory}`}]}))||[],[p]);return e.createElement(d,{isOpen:!!l,header:{icon:_,title:"Pod Information",onClose:n}},p?null:e.createElement(V,null,e.createElement(O,null)),p?e.createElement(e.Fragment,null,e.createElement($,{icon:_,title:p.name,withCopyTitle:!0},e.createElement(s,{$gap:24},e.createElement(N,{cellsPerRow:2,items:h}),f.length>0&&e.createElement(s,{$gap:12},e.createElement(ve,{onClick:()=>y(e=>!e)},e.createElement(g,null,"Containers Overview"),e.createElement(T,{icon:m?ee:te})),m&&f.map(({id:t,items:a})=>e.createElement(xe,{key:t},e.createElement(N,{cellsPerRow:2,items:a})))))),e.createElement($,{icon:ae,title:"Kubectl Commands"},e.createElement(s,{$gap:12},e.createElement(j,{value:`kubectl get pod ${p.name} -n ${p.namespace} -o yaml`}),e.createElement(j,{value:`kubectl describe pod ${p.name} -n ${p.namespace}`}),e.createElement(j,{value:`kubectl logs ${p.name} -n ${p.namespace}`}))),e.createElement($,{icon:le,title:"YAML",actions:[{id:L(),type:P.Button,buttonProps:{label:"",leftIcon:u?X:oe,onClick:()=>c(p.manifestYAML),disabled:u,size:R.S,variant:w.Secondary}}]},e.createElement("div",{style:{padding:"0 12px"}},e.createElement(Y,{code:p.manifestYAML,language:"yaml",theme:"duotoneDark"})))):null)};var Le;!function(e){e.PodName="podName",e.Ready="ready",e.Started="started",e.Status="status",e.Restarts="restarts",e.NodeName="nodeName",e.Age="age",e.DockerImage="dockerImage"}(Le||(Le={}));const Pe=[{key:Le.PodName,label:"Pod Name",sortable:!0},{key:Le.Ready,label:"Ready",sortable:!0,textAlign:"right"},{key:Le.Started,label:"Started",sortable:!0,textAlign:"right"},{key:Le.Status,label:"Status",sortable:!0},{key:Le.Restarts,label:"Restarts",sortable:!0,textAlign:"right"},{key:Le.NodeName,label:"Node Name",sortable:!0},{key:Le.Age,label:"Age",sortable:!0,textAlign:"right"},{key:Le.DockerImage,label:"Docker Image",sortable:!0,textAlign:"right"}],Re=({isLoading:l,tableRowsMaxHeight:o,pods:i,getExtendedPodInfo:s})=>{const r=n(),{formatTimeAgo:d}=v(),[c,u]=t(null),g=a(()=>{const t=t=>t?e.createElement(ie,{fill:F(r,S.Success,"500"),size:20}):e.createElement(ne,{fill:F(r,S.Error,"500"),size:20});return i.map(a=>({onClick:()=>u(a),cells:[{key:Le.PodName,rawValue:a.name},{key:Le.Ready,rawValue:a.ready,component:()=>t(a.ready)},{key:Le.Started,rawValue:a.started,component:()=>t(a.started)},{key:Le.Status,rawValue:a.status,component:()=>{return t=a.status,e.createElement(b,{status:z(t),label:t});var t}},{key:Le.Restarts,rawValue:a.restartsCount.toString()},{key:Le.NodeName,rawValue:a.nodeName},{key:Le.Age,rawValue:d(a.creationTimestamp)},{key:Le.DockerImage,rawValue:a.image}]}))},[i,r]);return e.createElement($,{icon:_,title:"Pods"},e.createElement(I,{variant:A.Data,maxHeight:o,isLoading:l,columns:Pe,rows:g}),e.createElement($e,{pod:c,getExtendedPodInfo:s,onClose:()=>u(null)}))};var Ie;!function(e){e.Gateway="gateway",e.Node="node"}(Ie||(Ie={}));const Ae=[{value:Ie.Gateway,label:"Gateway"},{value:Ie.Node,label:"Node Collector"}],Se=i.div`
63
+ `,Ce=({pod:l,getExtendedPodInfo:i,onClose:n})=>{const{formatTimeAgo:r}=v(),[d,u]=t(null),[p,b]=t(!1);o(()=>{l?i(l.namespace,l.name).then(e=>u(e??null)):(u(null),b(!1))},[l]);const m=a(()=>[{id:R(),title:"Node",label:d?.node??"-",withCopy:!0},{id:R(),title:"Status",badge:{status:V(d?.status),label:d?.status??"-"}}],[d]),y=a(()=>d?.containers?.map(e=>({id:R(),items:[{id:R(),title:"Container",label:e.name??"-"},{id:R(),title:"Status",badge:{status:V(e.status),label:e.status??"-"},label:e.startedAt?`(since ${r(e.startedAt)})`:""},{id:R(),title:"Image Version",label:e.image?.split(":")?.[1]??"-"},{id:R(),title:"Image Repository",label:e.image?.split(":")?.[0]??"-"},{id:R(),title:"Restarts",label:e.restarts.toString()},{id:R(),title:"State Reason",label:e.stateReason??"-"},{id:R(),title:"Resource Requests",label:`CPU ${e.resources.requests.cpu} • Memory ${e.resources.requests.memory}`},{id:R(),title:"Resource Limits",label:`CPU ${e.resources.limits.cpu} • Memory ${e.resources.limits.memory}`}]}))||[],[d]);return e.createElement(c,{isOpen:!!l,header:{icon:Q,title:"Pod Information",onClose:n}},d?null:e.createElement(z,null,e.createElement(M,null)),d?e.createElement(e.Fragment,null,e.createElement($,{icon:Q,title:d.name,withCopyTitle:!0},e.createElement(s,{$gap:24},e.createElement(O,{cellsPerRow:2,items:m}),y.length>0&&e.createElement(s,{$gap:12},e.createElement(we,{onClick:()=>b(e=>!e)},e.createElement(g,null,"Containers Overview"),e.createElement(N,{icon:p?X:Z})),p&&y.map(({id:t,items:a})=>e.createElement(ke,{key:t},e.createElement(O,{cellsPerRow:2,items:a})))))),e.createElement($,{icon:_,title:"Kubectl Commands"},e.createElement(s,{$gap:12},e.createElement(j,{value:`kubectl get pod ${d.name} -n ${d.namespace} -o yaml`}),e.createElement(j,{value:`kubectl describe pod ${d.name} -n ${d.namespace}`}),e.createElement(j,{value:`kubectl logs ${d.name} -n ${d.namespace}`}))),e.createElement(ne,{yaml:d.manifestYAML})):null)};var ve;!function(e){e.PodName="podName",e.Ready="ready",e.Started="started",e.Status="status",e.Restarts="restarts",e.NodeName="nodeName",e.Age="age",e.DockerImage="dockerImage"}(ve||(ve={}));const xe=[{key:ve.PodName,label:"Pod Name",sortable:!0},{key:ve.Ready,label:"Ready",sortable:!0,textAlign:"right"},{key:ve.Started,label:"Started",sortable:!0,textAlign:"right"},{key:ve.Status,label:"Status",sortable:!0},{key:ve.Restarts,label:"Restarts",sortable:!0,textAlign:"right"},{key:ve.NodeName,label:"Node Name",sortable:!0},{key:ve.Age,label:"Age",sortable:!0,textAlign:"right"},{key:ve.DockerImage,label:"Docker Image",sortable:!0,textAlign:"right"}],$e=({isLoading:l,tableRowsMaxHeight:o,pods:i,getExtendedPodInfo:s})=>{const r=n(),{formatTimeAgo:c}=v(),[d,u]=t(null),g=a(()=>{const t=t=>t?e.createElement(ee,{fill:T(r,S.Success,"500"),size:20}):e.createElement(te,{fill:T(r,S.Error,"500"),size:20});return i.map(a=>({onClick:()=>u(a),cells:[{key:ve.PodName,rawValue:a.name},{key:ve.Ready,rawValue:a.ready,component:()=>t(a.ready)},{key:ve.Started,rawValue:a.started,component:()=>t(a.started)},{key:ve.Status,rawValue:a.status,component:()=>{return t=a.status,e.createElement(b,{status:V(t),label:t});var t}},{key:ve.Restarts,rawValue:a.restartsCount.toString()},{key:ve.NodeName,rawValue:a.nodeName},{key:ve.Age,rawValue:c(a.creationTimestamp)},{key:ve.DockerImage,rawValue:a.image}]}))},[i,r]);return e.createElement($,{icon:Q,title:"Pods"},e.createElement(I,{variant:A.Data,maxHeight:o,isLoading:l,columns:xe,rows:g}),e.createElement(Ce,{pod:d,getExtendedPodInfo:s,onClose:()=>u(null)}))};var Re;!function(e){e.Gateway="gateway",e.Node="node"}(Re||(Re={}));const Le=[{value:Re.Gateway,label:"Gateway"},{value:Re.Node,label:"Node Collector"}],Pe=i.div`
64
64
  display: flex;
65
65
  align-items: center;
66
66
  justify-content: space-between;
67
- `,De=({selectedTab:t,setSelectedTab:a,onClickDownloadDiagnose:l,onClickRefresh:o,isLoading:i})=>e.createElement(Se,null,e.createElement(u,{$gap:12},e.createElement(u,{$gap:8},e.createElement(se,{size:32}),e.createElement(g,{size:p.M,weight:500},"Pipeline Collectors")),e.createElement(H,{options:Ae,selected:t,setSelected:a})),e.createElement(u,{$gap:8},l&&e.createElement(C,{label:"Download Diagnose",leftIcon:re,size:R.S,variant:w.Text,onClick:l}),o&&e.createElement(C,{label:"Refresh",leftIcon:K,size:R.S,variant:w.Text,onClick:o,loading:i}))),Me=({isOpen:t,onClose:a,title:l,yaml:o})=>{const{clickCopy:i,isCopied:n}=M();return e.createElement(d,{isOpen:t,header:{icon:de,title:l,onClose:a}},o?e.createElement($,{icon:le,title:"YAML",actions:[{id:L(),type:P.Button,buttonProps:{label:"",leftIcon:n?X:oe,onClick:()=>i(o),disabled:n,size:R.S,variant:w.Secondary}}]},e.createElement("div",{style:{padding:"0 12px"}},e.createElement(Y,{code:o,language:"yaml",theme:"duotoneDark"}))):e.createElement(U,{title:"No YAML found",subTitle:"The YAML for this resource is not available"}))};var ze;!function(e){e.ManifestYaml="manifest-yaml",e.ConfigMapYaml="configmap-yaml"}(ze||(ze={}));const Ve=({icon:a,title:l,badge:o,statusCard:i,textCards:n,manifestYaml:s,configMapYaml:r})=>{const[d,c]=t(null);return e.createElement($,{icon:a,title:l,badge:o,actions:[{id:L(),type:P.ButtonDropData,buttonProps:{variant:w.Secondary,size:R.S,label:"View YAML",onClick:e=>c(e)},dropDataItems:[{id:ze.ManifestYaml,label:l,icon:le},{id:ze.ConfigMapYaml,label:"ConfigMap",icon:le}]}]},e.createElement(u,{$gap:16},e.createElement(W,{...i}),n.map(t=>e.createElement(E,{key:t.title,...t}))),e.createElement(Me,{isOpen:d===ze.ManifestYaml,onClose:()=>c(null),title:l,yaml:s}),e.createElement(Me,{isOpen:d===ze.ConfigMapYaml,onClose:()=>c(null),title:"ConfigMap",yaml:r}))},Oe=e=>{switch(e){case q.Healthy:return"All desired replicas are updated, available, and ready";case q.Updating:return"Workload is progressing towards desired state (e.g., updating pods)";case q.Degraded:return"Progressing but with availability issues (e.g., not enough available replicas)";case q.Failed:return"Progress deadline exceeded or an unrecoverable error occurred";case q.Down:return"No available replicas";case q.Unknown:return"Status cannot be determined from current signals";default:return"Status unknown"}},Ne=({tableRowsMaxHeight:i,getGatewayInfo:n,getGatewayPods:s,getNodeCollectorInfo:r,getNodeCollectorPods:d,getExtendedPodInfo:c})=>{const{formatTimeAgo:u}=v(),[g,p]=t(!1),[b,y]=t(Ie.Gateway),[h,f]=t(null),[k,C]=t([]),[w,$]=t(null),[L,P]=t([]),R=l(async()=>{p(!0);try{switch(b){case Ie.Gateway:f(await n()??null),C(await s()??[]);break;case Ie.Node:$(await r()??null),P(await d()??[])}}catch(e){}p(!1)},[b]);o(()=>{R()},[R]);const I=a(()=>(e=>{switch(e){case Ie.Gateway:return"Deployment";case Ie.Node:return"DaemonSet";default:return"Pipeline Collectors"}})(b),[b]),A=a(()=>((e,t,a,l)=>{const o={status:m.Disabled,label:"No rollouts yet"};let i=!1,n=null;switch(e){case Ie.Gateway:i=t?.rolloutInProgress??!1,n=t?.lastRolloutAt??null;break;case Ie.Node:i=a?.rolloutInProgress??!1,n=a?.lastRolloutAt??null;break;default:return o}return i?{status:S.Info,label:"Rollout in progress",rightIcon:K,useSecondaryTone:!0}:n?{status:m.Disabled,label:`Last Rollout: ${l(n)}`}:o})(b,h,w,u),[h,w,b,u]),D=a(()=>((e,t,a,l)=>{let o=l?S.Info:m.Unknown,i=l?"Loading":q.Unknown,n=l?"Fetching data...":Oe(q.Unknown);switch(e){case Ie.Gateway:o=t?.status?z(t?.status):o,i=t?.status??i,n=t?.status?Oe(t.status):n;break;case Ie.Node:o=a?.status?z(a?.status):o,i=a?.status??i,n=a?.status?Oe(a.status):n}return{status:o,title:i,description:n}})(b,h,w,g),[h,w,b,g]),M=a(()=>((e,t,a,l)=>{switch(e){case Ie.Gateway:return[{title:"HPA Spec (Replicas)",cells:[{label:"Min.",value:t?.hpa?.min.toString()??"-",isLoading:l},{label:"Max.",value:t?.hpa?.max.toString()??"-",isLoading:l},{label:"Current",value:t?.hpa?.current.toString()??"-",isLoading:l},{label:"Desired",value:t?.hpa?.desired.toString()??"-",isLoading:l}]},{title:"Requests",cells:[{label:"CPU",value:t?.resources?.requests.cpu??"-",isLoading:l},{label:"Memory",value:t?.resources?.requests.memory??"-",isLoading:l}]},{title:"Limits",cells:[{label:"CPU",value:t?.resources?.limits.cpu??"-",isLoading:l},{label:"Memory",value:t?.resources?.limits.memory??"-",isLoading:l}]},{title:"Docker Image",cells:[{value:t?.imageVersion??"-",isLoading:l}]}];case Ie.Node:return[{title:"Nodes",cells:[{label:"Desired",value:a?.nodes?.desired.toString()??"-",isLoading:l},{label:"Ready",value:a?.nodes?.ready.toString()??"-",isLoading:l}]},{title:"Requests",cells:[{label:"CPU",value:a?.resources?.requests.cpu??"-",isLoading:l},{label:"Memory",value:a?.resources?.requests.memory??"-",isLoading:l}]},{title:"Limits",cells:[{label:"CPU",value:a?.resources?.limits.cpu??"-",isLoading:l},{label:"Memory",value:a?.resources?.limits.memory??"-",isLoading:l}]},{title:"Docker Image",cells:[{value:a?.imageVersion??"-",isLoading:l}]}];default:return[]}})(b,h,w,g),[h,w,b,g]),V=a(()=>(b===Ie.Gateway?h?.manifestYAML:w?.manifestYAML)??"",[h,w,b]),O=a(()=>(b===Ie.Gateway?h?.configMapYAML:w?.configMapYAML)??"",[h,w,b]),N=a(()=>b===Ie.Gateway?k:L,[k,L,b]);return e.createElement(x,null,e.createElement(De,{isLoading:g,selectedTab:b,setSelectedTab:y,onClickDownloadDiagnose:void 0,onClickRefresh:R}),e.createElement(Ve,{icon:de,title:I,badge:A,statusCard:D,textCards:M,manifestYaml:V,configMapYaml:O}),e.createElement(Re,{isLoading:g,tableRowsMaxHeight:i,pods:N,getExtendedPodInfo:c}))};export{we as CentralConnections,Ne as PipelineCollectors};
67
+ `,Ie=({selectedTab:t,setSelectedTab:a,onClickDownloadDiagnose:l,onClickRefresh:o,isLoading:i})=>e.createElement(Pe,null,e.createElement(u,{$gap:12},e.createElement(u,{$gap:8},e.createElement(ae,{size:32}),e.createElement(g,{size:p.M,weight:500},"Pipeline Collectors")),e.createElement(F,{options:Le,selected:t,setSelected:a})),e.createElement(u,{$gap:8},l&&e.createElement(k,{label:"Download Diagnose",leftIcon:le,size:P.S,variant:C.Text,onClick:l}),o&&e.createElement(k,{label:"Refresh",leftIcon:q,size:P.S,variant:C.Text,onClick:o,loading:i}))),Ae=({isOpen:t,onClose:a,title:l,yaml:o})=>e.createElement(c,{isOpen:t,header:{icon:oe,title:l,onClose:a}},e.createElement(ne,{yaml:o}));var Se;!function(e){e.ManifestYaml="manifest-yaml",e.ConfigMapYaml="configmap-yaml"}(Se||(Se={}));const De=({icon:a,title:l,badge:o,statusCard:i,textCards:n,manifestYaml:s,configMapYaml:r})=>{const[c,d]=t(null);return e.createElement($,{icon:a,title:l,badge:o,actions:[{id:R(),type:L.ButtonDropData,buttonProps:{variant:C.Secondary,size:P.S,label:"View YAML",onClick:e=>d(e)},dropDataItems:[{id:Se.ManifestYaml,label:l,icon:ie},{id:Se.ConfigMapYaml,label:"ConfigMap",icon:ie}]}]},e.createElement(u,{$gap:16},e.createElement(H,{...i}),n.map(t=>e.createElement(U,{key:t.title,...t}))),e.createElement(Ae,{isOpen:c===Se.ManifestYaml,onClose:()=>d(null),title:l,yaml:s}),e.createElement(Ae,{isOpen:c===Se.ConfigMapYaml,onClose:()=>d(null),title:"ConfigMap",yaml:r}))},Ve=e=>{switch(e){case W.Healthy:return"All desired replicas are updated, available, and ready";case W.Updating:return"Workload is progressing towards desired state (e.g., updating pods)";case W.Degraded:return"Progressing but with availability issues (e.g., not enough available replicas)";case W.Failed:return"Progress deadline exceeded or an unrecoverable error occurred";case W.Down:return"No available replicas";case W.Unknown:return"Status cannot be determined from current signals";default:return"Status unknown"}},ze=({tableRowsMaxHeight:i,getGatewayInfo:n,getGatewayPods:s,getNodeCollectorInfo:r,getNodeCollectorPods:c,getExtendedPodInfo:d})=>{const{formatTimeAgo:u}=v(),[g,p]=t(!1),[b,y]=t(Re.Gateway),[h,f]=t(null),[w,k]=t([]),[C,$]=t(null),[R,L]=t([]),P=l(async()=>{p(!0);try{switch(b){case Re.Gateway:f(await n()??null),k(await s()??[]);break;case Re.Node:$(await r()??null),L(await c()??[])}}catch(e){}p(!1)},[b]);o(()=>{P()},[P]);const I=a(()=>(e=>{switch(e){case Re.Gateway:return"Deployment";case Re.Node:return"DaemonSet";default:return"Pipeline Collectors"}})(b),[b]),A=a(()=>((e,t,a,l)=>{const o={status:m.Disabled,label:"No rollouts yet"};let i=!1,n=null;switch(e){case Re.Gateway:i=t?.rolloutInProgress??!1,n=t?.lastRolloutAt??null;break;case Re.Node:i=a?.rolloutInProgress??!1,n=a?.lastRolloutAt??null;break;default:return o}return i?{status:S.Info,label:"Rollout in progress",rightIcon:q,useSecondaryTone:!0}:n?{status:m.Disabled,label:`Last Rollout: ${l(n)}`}:o})(b,h,C,u),[h,C,b,u]),D=a(()=>((e,t,a,l)=>{let o=l?S.Info:m.Unknown,i=l?"Loading":W.Unknown,n=l?"Fetching data...":Ve(W.Unknown);switch(e){case Re.Gateway:o=t?.status?V(t?.status):o,i=t?.status??i,n=t?.status?Ve(t.status):n;break;case Re.Node:o=a?.status?V(a?.status):o,i=a?.status??i,n=a?.status?Ve(a.status):n}return{status:o,title:i,description:n}})(b,h,C,g),[h,C,b,g]),z=a(()=>((e,t,a,l)=>{switch(e){case Re.Gateway:return[{title:"HPA Spec (Replicas)",cells:[{label:"Min.",value:t?.hpa?.min.toString()??"-",isLoading:l},{label:"Max.",value:t?.hpa?.max.toString()??"-",isLoading:l},{label:"Current",value:t?.hpa?.current.toString()??"-",isLoading:l},{label:"Desired",value:t?.hpa?.desired.toString()??"-",isLoading:l}]},{title:"Requests",cells:[{label:"CPU",value:t?.resources?.requests.cpu??"-",isLoading:l},{label:"Memory",value:t?.resources?.requests.memory??"-",isLoading:l}]},{title:"Limits",cells:[{label:"CPU",value:t?.resources?.limits.cpu??"-",isLoading:l},{label:"Memory",value:t?.resources?.limits.memory??"-",isLoading:l}]},{title:"Docker Image",cells:[{value:t?.imageVersion??"-",isLoading:l}]}];case Re.Node:return[{title:"Nodes",cells:[{label:"Desired",value:a?.nodes?.desired.toString()??"-",isLoading:l},{label:"Ready",value:a?.nodes?.ready.toString()??"-",isLoading:l}]},{title:"Requests",cells:[{label:"CPU",value:a?.resources?.requests.cpu??"-",isLoading:l},{label:"Memory",value:a?.resources?.requests.memory??"-",isLoading:l}]},{title:"Limits",cells:[{label:"CPU",value:a?.resources?.limits.cpu??"-",isLoading:l},{label:"Memory",value:a?.resources?.limits.memory??"-",isLoading:l}]},{title:"Docker Image",cells:[{value:a?.imageVersion??"-",isLoading:l}]}];default:return[]}})(b,h,C,g),[h,C,b,g]),M=a(()=>(b===Re.Gateway?h?.manifestYAML:C?.manifestYAML)??"",[h,C,b]),O=a(()=>(b===Re.Gateway?h?.configMapYAML:C?.configMapYAML)??"",[h,C,b]),N=a(()=>b===Re.Gateway?w:R,[w,R,b]);return e.createElement(x,null,e.createElement(Ie,{isLoading:g,selectedTab:b,setSelectedTab:y,onClickDownloadDiagnose:void 0,onClickRefresh:P}),e.createElement(De,{icon:oe,title:I,badge:A,statusCard:D,textCards:z,manifestYaml:M,configMapYaml:O}),e.createElement($e,{isLoading:g,tableRowsMaxHeight:i,pods:N,getExtendedPodInfo:d}))};export{fe as CentralConnections,ze as PipelineCollectors};