@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 +14 -0
- package/lib/chunks/index-c204fc21.js +3 -0
- package/lib/chunks/{ui-components-c5321fb4.js → ui-components-ad4d911e.js} +4 -4
- package/lib/components/v2.js +1 -1
- package/lib/components.js +1 -1
- package/lib/constants.js +1 -1
- package/lib/containers/v2.js +11 -11
- package/lib/containers.js +111 -111
- package/lib/functions.js +1 -1
- package/lib/hooks.js +1 -1
- package/lib/snippets/_v2/index.d.ts +1 -0
- package/lib/snippets/_v2/yaml-section-card/index.d.ts +5 -0
- package/lib/snippets.js +1 -1
- package/lib/store.js +1 -1
- package/lib/theme.js +1 -1
- package/lib/types/sources/index.d.ts +1 -0
- package/lib/types.js +1 -1
- package/package.json +1 -1
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,
|
|
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{
|
|
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};
|
package/lib/components/v2.js
CHANGED
|
@@ -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,
|
|
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{
|
|
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{
|
|
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";
|
package/lib/containers/v2.js
CHANGED
|
@@ -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
|
|
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
|
-
`,
|
|
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
|
-
`,
|
|
14
|
+
`,de=i.div`
|
|
15
15
|
display: flex;
|
|
16
16
|
gap: 12px;
|
|
17
17
|
padding: 16px;
|
|
18
|
-
`,
|
|
18
|
+
`,ue=i(s)`
|
|
19
19
|
width: ${({$width:e})=>e};
|
|
20
20
|
gap: 12px;
|
|
21
21
|
justify-content: space-between;
|
|
22
|
-
`,
|
|
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
|
-
`,
|
|
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
|
-
`,
|
|
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
|
-
`,
|
|
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
|
-
`,
|
|
61
|
+
`,ke=i.div`
|
|
62
62
|
animation-name: ${D.animations.fade.in};
|
|
63
|
-
|
|
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
|
-
`,
|
|
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};
|