@odigos/ui-kit 0.0.203 → 0.0.204

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,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.0.204](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.203...ui-kit-v0.0.204) (2026-03-05)
4
+
5
+
6
+ ### Features
7
+
8
+ * add Service Map tab to source drawer ([#708](https://github.com/odigos-io/ui-kit/issues/708)) ([4840b16](https://github.com/odigos-io/ui-kit/commit/4840b163cf95c5594d6dc2cb65f7e2d92d1f688e))
9
+
3
10
  ## [0.0.203](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.202...ui-kit-v0.0.203) (2026-03-04)
4
11
 
5
12
 
@@ -1,3 +1,3 @@
1
- import{jsx as t}from"react/jsx-runtime";import{useState as o,useMemo as e}from"react";import i from"styled-components";import{am as a,h as n,j as s,az as r,ax as c,aq as l,cJ as m,n as p,N as d}from"./ui-components-Ci6lJdLr.js";import{VIcon as u,CopyIcon as f,ChevronUpIcon as h,ChevronDownIcon as y,YamlIcon as b}from"../icons.js";const j=i.div`
1
+ import{jsx as t}from"react/jsx-runtime";import{useState as o,useMemo as e}from"react";import i from"styled-components";import{am as a,h as n,j as s,az as r,ax as c,aq as l,cK as m,n as p,N as d}from"./ui-components-B7yqdEby.js";import{VIcon as u,CopyIcon as f,ChevronUpIcon as h,ChevronDownIcon as y,YamlIcon as b}from"../icons.js";const j=i.div`
2
2
  padding: 0 12px;
3
3
  `,k=({title:i="YAML",yaml:k,defaultOpen:x})=>{const{clickCopy:C,isCopied:Y}=a(),[g,v]=o(x??!1),z=e(()=>k?[{id:c(),type:r.Button,buttonProps:{variant:s.Secondary,size:n.S,leftIcon:Y?u:f,onClick:()=>C(k||""),disabled:Y}},{id:c(),type:r.Button,buttonProps:{variant:s.Secondary,size:n.S,leftIcon:g?h:y,onClick:()=>v(t=>!t)}}]:[],[k,Y,g]);return t(l,{richTitle:{icon:b,title:i},actions:z,children:g&&t(j,{children:k?t(m,{code:k,language:"yaml",theme:"duotoneDark"}):t(p,{children:t(d,{title:"YAML not found",subTitle:"The YAML for this resource is not available"})})})})};export{k as Y};
@@ -2379,4 +2379,4 @@ import{SamplerIcon as e,PiiMaskingIcon as t,ActionIcon as i,RenameAttributeIcon
2379
2379
  gap: 16px;
2380
2380
  padding: 16px 24px;
2381
2381
  background-color: ${({theme:e})=>e.v2.colors.silver[1e3]};
2382
- `,ym=({visual:e,title:t,description:i,isOpen:n,onClose:o,onDeny:r,denyLabel:a="Deny",onApprove:s,approveLabel:l="Approve",...c})=>{const d=Mt();return zt(Th,{isOpen:n,onClose:o,...c,children:Ft(xm,{children:[Ft(fm,{children:[e&&zt(e,{}),zt(co,{size:so.M,weight:500,color:d.v2.colors.white[500],children:t}),zt(sa,{$alignItems:"center",$gap:4,children:i.split("\n").map(e=>zt(co,{size:so.XS,weight:400,color:d.v2.colors.silver[200],children:e},e))})]}),(r||s)&&Ft(bm,{children:[zt(Rp,{variant:zp.Secondary,label:a,onClick:()=>{r?.(),o()}}),s&&zt(Rp,{variant:zp.Primary,label:l,onClick:()=>{s(),o()}})]})]})})};export{Vo as $,li as A,Rp as B,tu as C,Sa as D,Xn as E,sa as F,qi as G,Jn as H,Vu as I,Mi as J,ci as K,kh as L,Wo as M,Oh as N,Fa as O,Li as P,ji as Q,mu as R,qd as S,mm as T,Yi as U,gh as V,ym as W,Ki as X,Pi as Y,Bi as Z,uo as _,Lu as a,Pc as a$,mn as a0,xr as a1,Bo as a2,Mo as a3,Nr as a4,on as a5,nn as a6,Pr as a7,Mr as a8,Po as a9,rn as aA,oa as aB,im as aC,Wh as aD,oh as aE,On as aF,ys as aG,Tu as aH,Cr as aI,uu as aJ,yu as aK,Cu as aL,Ui as aM,ra as aN,yc as aO,Ol as aP,os as aQ,yo as aR,Ll as aS,Td as aT,Dp as aU,_d as aV,kd as aW,Ba as aX,Fs as aY,ip as aZ,Zd as a_,jo as aa,fn as ab,Gp as ac,Jo as ad,Uo as ae,Ti as af,cm as ag,ao as ah,ar as ai,en as aj,wi as ak,nr as al,jr as am,Hr as an,na as ao,Un as ap,xu as aq,Zo as ar,du as as,ru as at,ou as au,El as av,Vp as aw,dn as ax,kl as ay,pu as az,Pu as b,Ur as b$,jd as b0,Sp as b1,xo as b2,Xo as b3,sd as b4,Mc as b5,ts as b6,zr as b7,yn as b8,Lo as b9,cl as bA,Op as bB,Sr as bC,no as bD,Ir as bE,sr as bF,el as bG,Ri as bH,ln as bI,Cn as bJ,xn as bK,pp as bL,Br as bM,an as bN,ri as bO,Zi as bP,oi as bQ,_r as bR,Yr as bS,Na as bT,ca as bU,rp as bV,Kr as bW,Hn as bX,Vl as bY,tn as bZ,Jr as b_,Ds as ba,Oc as bb,pn as bc,yi as bd,tr as be,ka as bf,pa as bg,qa as bh,Fo as bi,Vd as bj,un as bk,zs as bl,Ai as bm,Kn as bn,zn as bo,er as bp,ni as bq,Ws as br,wn as bs,Ks as bt,ua as bu,ha as bv,$d as bw,bn as bx,ma as by,bc as bz,ki as c,Hi as c$,dr as c0,vs as c1,Ms as c2,vi as c3,Yn as c4,Vr as c5,Mn as c6,Zt as c7,Ji as c8,bp as c9,ia as cA,qs as cB,hn as cC,ic as cD,Ko as cE,cn as cF,ss as cG,Dn as cH,Ps as cI,ms as cJ,ai as cK,Oi as cL,ui as cM,zi as cN,Ni as cO,fi as cP,Si as cQ,hi as cR,mi as cS,pi as cT,_i as cU,xi as cV,Gi as cW,Vi as cX,Wi as cY,Di as cZ,Xi as c_,Ec as ca,En as cb,vp as cc,ir as cd,qr as ce,$i as cf,es as cg,br as ch,Rn as ci,Rr as cj,Ii as ck,wl as cl,Bs as cm,bd as cn,Fn as co,Ln as cp,Rs as cq,al as cr,ll as cs,Ju as ct,Wn as cu,Qn as cv,Zr as cw,Fi as cx,bi as cy,ac as cz,ih as d,Bh as d$,gi as d0,di as d1,Qt as d2,sn as d3,gn as d4,$n as d5,vn as d6,kn as d7,Sn as d8,An as d9,xl as dA,pl as dB,Bc as dC,nd as dD,Xc as dE,cd as dF,md as dG,js as dH,Md as dI,da as dJ,Vc as dK,ga as dL,mo as dM,go as dN,$o as dO,xh as dP,$h as dQ,yh as dR,Pp as dS,jp as dT,nu as dU,Zp as dV,Ku as dW,Th as dX,Ih as dY,Ph as dZ,Uh as d_,Tn as da,In as db,Nn as dc,_n as dd,jn as de,Vn as df,qn as dg,Zn as dh,eo as di,to as dj,io as dk,oo as dl,ro as dm,Go as dn,qo as dp,Ho as dq,Ro as dr,$r as ds,kr as dt,fr as du,gr as dv,Fr as dw,Cl as dx,Al as dy,Tl as dz,dm as e,gu as e0,om as e1,$m as e2,lm as e3,Xu as f,aa as g,Fp as h,Pn as i,zp as j,Ci as k,si as l,ii as m,la as n,Ru as o,so as p,Xp as q,Rh as r,Ei as s,co as t,Qi as u,Kp as v,sm as w,ti as x,Gu as y,Bn as z};
2382
+ `,ym=({visual:e,title:t,description:i,isOpen:n,onClose:o,onDeny:r,denyLabel:a="Deny",onApprove:s,approveLabel:l="Approve",...c})=>{const d=Mt();return zt(Th,{isOpen:n,onClose:o,...c,children:Ft(xm,{children:[Ft(fm,{children:[e&&zt(e,{}),zt(co,{size:so.M,weight:500,color:d.v2.colors.white[500],children:t}),zt(sa,{$alignItems:"center",$gap:4,children:i.split("\n").map(e=>zt(co,{size:so.XS,weight:400,color:d.v2.colors.silver[200],children:e},e))})]}),(r||s)&&Ft(bm,{children:[zt(Rp,{variant:zp.Secondary,label:a,onClick:()=>{r?.(),o()}}),s&&zt(Rp,{variant:zp.Primary,label:l,onClick:()=>{s(),o()}})]})]})})};export{Vo as $,li as A,Rp as B,tu as C,Sa as D,Xn as E,sa as F,qi as G,Jn as H,Vu as I,Mi as J,ci as K,kh as L,Wo as M,Oh as N,Fa as O,Li as P,ji as Q,mu as R,qd as S,mm as T,Yi as U,gh as V,ym as W,Ki as X,Pi as Y,Bi as Z,uo as _,Lu as a,Pc as a$,mn as a0,xr as a1,Bo as a2,Mo as a3,Nr as a4,on as a5,nn as a6,Pr as a7,Mr as a8,Po as a9,rn as aA,oa as aB,im as aC,Wh as aD,oh as aE,On as aF,ys as aG,Tu as aH,Cr as aI,uu as aJ,yu as aK,Cu as aL,Ui as aM,ra as aN,yc as aO,Ol as aP,os as aQ,yo as aR,Ll as aS,Td as aT,Dp as aU,_d as aV,kd as aW,Ba as aX,Fs as aY,ip as aZ,Zd as a_,jo as aa,fn as ab,Gp as ac,Jo as ad,Uo as ae,Ti as af,cm as ag,ao as ah,ar as ai,en as aj,wi as ak,nr as al,jr as am,Hr as an,na as ao,Un as ap,xu as aq,Zo as ar,du as as,ru as at,ou as au,El as av,Vp as aw,dn as ax,kl as ay,pu as az,Pu as b,Ur as b$,jd as b0,Sp as b1,xo as b2,Xo as b3,sd as b4,Mc as b5,ts as b6,zr as b7,yn as b8,Lo as b9,cl as bA,Op as bB,Sr as bC,no as bD,Ir as bE,sr as bF,el as bG,Ri as bH,ln as bI,Cn as bJ,xn as bK,pp as bL,Br as bM,an as bN,ri as bO,Zi as bP,oi as bQ,_r as bR,Yr as bS,Na as bT,ca as bU,rp as bV,Kr as bW,Hn as bX,Vl as bY,tn as bZ,Jr as b_,Ds as ba,Oc as bb,pn as bc,yi as bd,tr as be,ka as bf,pa as bg,qa as bh,Fo as bi,Vd as bj,un as bk,zs as bl,Ai as bm,Kn as bn,zn as bo,er as bp,ni as bq,Ws as br,wn as bs,Ks as bt,ua as bu,ha as bv,$d as bw,bn as bx,ma as by,bc as bz,ki as c,Xi as c$,dr as c0,vs as c1,Ms as c2,vi as c3,Yn as c4,Vr as c5,Mn as c6,Zt as c7,Ji as c8,bp as c9,gn as cA,ia as cB,qs as cC,hn as cD,ic as cE,Ko as cF,cn as cG,ss as cH,Dn as cI,Ps as cJ,ms as cK,ai as cL,Oi as cM,ui as cN,zi as cO,Ni as cP,fi as cQ,Si as cR,hi as cS,mi as cT,pi as cU,_i as cV,xi as cW,Gi as cX,Vi as cY,Wi as cZ,Di as c_,Ec as ca,En as cb,vp as cc,ir as cd,qr as ce,$i as cf,es as cg,br as ch,Rn as ci,Rr as cj,Ii as ck,wl as cl,Bs as cm,bd as cn,Fn as co,Ln as cp,Rs as cq,al as cr,ll as cs,Ju as ct,Wn as cu,Qn as cv,Zr as cw,Fi as cx,bi as cy,ac as cz,ih as d,Bh as d$,Hi as d0,gi as d1,di as d2,Qt as d3,sn as d4,$n as d5,vn as d6,kn as d7,Sn as d8,An as d9,xl as dA,pl as dB,Bc as dC,nd as dD,Xc as dE,cd as dF,md as dG,js as dH,Md as dI,da as dJ,Vc as dK,ga as dL,mo as dM,go as dN,$o as dO,xh as dP,$h as dQ,yh as dR,Pp as dS,jp as dT,nu as dU,Zp as dV,Ku as dW,Th as dX,Ih as dY,Ph as dZ,Uh as d_,Tn as da,In as db,Nn as dc,_n as dd,jn as de,Vn as df,qn as dg,Zn as dh,eo as di,to as dj,io as dk,oo as dl,ro as dm,Go as dn,qo as dp,Ho as dq,Ro as dr,$r as ds,kr as dt,fr as du,gr as dv,Fr as dw,Cl as dx,Al as dy,Tl as dz,dm as e,gu as e0,om as e1,$m as e2,lm as e3,Xu as f,aa as g,Fp as h,Pn as i,zp as j,Ci as k,si as l,ii as m,la as n,Ru as o,so as p,Xp as q,Rh as r,Ei as s,co as t,Qi as u,Kp as v,sm as w,ti as x,Gu as y,Bn as z};
@@ -1 +1 @@
1
- export{_ as Badge,B as Button,h as ButtonSize,dS as ButtonTab,dT as ButtonTabList,j as ButtonVariants,C as Checkbox,dU as CheckboxList,dV as CheckboxSize,aH as CliCommand,aw as DataCard,o as Drawer,as as DropData,au as DropDataAlignX,at as DropDataAlignY,y as DropDown,b as FieldMessage,a as FieldTitle,dW as Header,ct as HoverActions,a7 as IconButton,a8 as IconButtonSize,I as Input,f as InputList,d as InputTable,aE as Island,L as Loader,dX as Modal,dY as Navbar,N as NoData,r as Note,dZ as Radio,d_ as RadioGroup,d$ as RadioSize,q as Search,aq as SectionCard,e0 as SectionCardSize,v as Segment,ac as SegmentSize,aK as StatusCard,aC as Table,aD as TableVariant,e1 as Tag,w as TextArea,aL as TextCard,T as Toggle,e as ToggleLabelAlign,e2 as ToggleList,ag as ToggleSize,e3 as ToggleVariant,t as Typography,p as TypographySize,ah as TypographyVariants,W as WarningModal}from"../chunks/ui-components-Ci6lJdLr.js";import"../icons.js";import"react/jsx-runtime";import"styled-components";import"zustand";import"react";import"javascript-time-ago";import"../chunks/vendor-D99eCWta.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
1
+ export{_ as Badge,B as Button,h as ButtonSize,dS as ButtonTab,dT as ButtonTabList,j as ButtonVariants,C as Checkbox,dU as CheckboxList,dV as CheckboxSize,aH as CliCommand,aw as DataCard,o as Drawer,as as DropData,au as DropDataAlignX,at as DropDataAlignY,y as DropDown,b as FieldMessage,a as FieldTitle,dW as Header,ct as HoverActions,a7 as IconButton,a8 as IconButtonSize,I as Input,f as InputList,d as InputTable,aE as Island,L as Loader,dX as Modal,dY as Navbar,N as NoData,r as Note,dZ as Radio,d_ as RadioGroup,d$ as RadioSize,q as Search,aq as SectionCard,e0 as SectionCardSize,v as Segment,ac as SegmentSize,aK as StatusCard,aC as Table,aD as TableVariant,e1 as Tag,w as TextArea,aL as TextCard,T as Toggle,e as ToggleLabelAlign,e2 as ToggleList,ag as ToggleSize,e3 as ToggleVariant,t as Typography,p as TypographySize,ah as TypographyVariants,W as WarningModal}from"../chunks/ui-components-B7yqdEby.js";import"../icons.js";import"react/jsx-runtime";import"styled-components";import"zustand";import"react";import"javascript-time-ago";import"../chunks/vendor-D99eCWta.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
package/lib/components.js CHANGED
@@ -1 +1 @@
1
- export{bi as AutocompleteInput,bC as Badge,bE as Button,b6 as CancelWarning,n as CenterThis,aQ as Checkbox,cJ as Code,ba as ConditionDetails,bb as DataCard,aO as DataCardFieldTypes,ca as DataCardFields,dC as DataFinger,bG as DataTab,b5 as DeleteWarning,cr as DescribeRow,D as Divider,a$ as DocsButton,b4 as Drawer,dD as DrawerFooter,dE as DrawerHeader,bY as Dropdown,dF as ErrorBoundary,c1 as ExtendArrow,aG as FadeLoader,aR as FieldError,aP as FieldLabel,F as FlexColumn,g as FlexRow,dG as Header,aX as IconButton,cB as IconGroup,bw as IconTitleBadge,br as IconWrapped,cn as IconsNav,dH as ImageControlled,aS as Input,aW as InputList,aT as InputTable,bz as InteractiveTable,aV as KeyValueInputsList,dI as LoadingText,bf as Modal,bg as ModalBody,b0 as MonitorsCheckboxes,bt as MonitorsIcons,bj as NavigationButtons,bA as NoDataFound,bh as NotificationNote,dJ as Overlay,aB as PageContent,bT as Popup,cD as PopupForm,cI as ScrollX,S as ScrollY,a_ as SectionTitle,aZ as Segment,bV as SelectionButton,bL as SkeletonLoader,bl as Status,c9 as Stepper,dK as TabList,bu as TableContainer,bv as TableTitleWrap,by as TableWrap,cc as Tag,b2 as Text,b1 as TextArea,aU as Toggle,cG as ToggleCodeComponent,O as Tooltip,bB as TraceLoader,aN as UpgradeRequiredWrapper,bU as VerticalScroll,cg as WarningModal,dL as WhiteSpace,dM as getLinksFromText,dN as getStrongsFromText,dO as renderText}from"./chunks/ui-components-Ci6lJdLr.js";import"./icons.js";import"react/jsx-runtime";import"styled-components";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-D99eCWta.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
1
+ export{bi as AutocompleteInput,bC as Badge,bE as Button,b6 as CancelWarning,n as CenterThis,aQ as Checkbox,cK as Code,ba as ConditionDetails,bb as DataCard,aO as DataCardFieldTypes,ca as DataCardFields,dC as DataFinger,bG as DataTab,b5 as DeleteWarning,cr as DescribeRow,D as Divider,a$ as DocsButton,b4 as Drawer,dD as DrawerFooter,dE as DrawerHeader,bY as Dropdown,dF as ErrorBoundary,c1 as ExtendArrow,aG as FadeLoader,aR as FieldError,aP as FieldLabel,F as FlexColumn,g as FlexRow,dG as Header,aX as IconButton,cC as IconGroup,bw as IconTitleBadge,br as IconWrapped,cn as IconsNav,dH as ImageControlled,aS as Input,aW as InputList,aT as InputTable,bz as InteractiveTable,aV as KeyValueInputsList,dI as LoadingText,bf as Modal,bg as ModalBody,b0 as MonitorsCheckboxes,bt as MonitorsIcons,bj as NavigationButtons,bA as NoDataFound,bh as NotificationNote,dJ as Overlay,aB as PageContent,bT as Popup,cE as PopupForm,cJ as ScrollX,S as ScrollY,a_ as SectionTitle,aZ as Segment,bV as SelectionButton,bL as SkeletonLoader,bl as Status,c9 as Stepper,dK as TabList,bu as TableContainer,bv as TableTitleWrap,by as TableWrap,cc as Tag,b2 as Text,b1 as TextArea,aU as Toggle,cH as ToggleCodeComponent,O as Tooltip,bB as TraceLoader,aN as UpgradeRequiredWrapper,bU as VerticalScroll,cg as WarningModal,dL as WhiteSpace,dM as getLinksFromText,dN as getStrongsFromText,dO as renderText}from"./chunks/ui-components-B7yqdEby.js";import"./icons.js";import"react/jsx-runtime";import"styled-components";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-D99eCWta.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
package/lib/constants.js CHANGED
@@ -1 +1 @@
1
- export{a2 as ACTION_ATTRIBUTE_OPTIONS,b9 as ACTION_OPTIONS,a3 as ACTION_SAMPLER_OPTIONS,aA as BUTTON_TEXTS,aj as DEFAULT_DATA_STREAM_NAME,aa as DESTINATION_CATEGORIES,$ as DISPLAY_LANGUAGES,a5 as DISPLAY_TITLES,u as DOCS_BASE_URL,a9 as DestinationCategoryTypes,a6 as FORM_ALERTS,ae as INSTRUMENTATION_RULE_OPTIONS,dn as LANGUAGE_OPTIONS,M as MONITORS_OPTIONS,dp as OTEL_DISTRO_NAME_OPTIONS,bZ as STORAGE_KEYS,dq as TOKEN_ABOUT_TO_EXPIRE}from"./chunks/ui-components-Ci6lJdLr.js";import"./icons.js";import"react/jsx-runtime";import"styled-components";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-D99eCWta.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
1
+ export{a2 as ACTION_ATTRIBUTE_OPTIONS,b9 as ACTION_OPTIONS,a3 as ACTION_SAMPLER_OPTIONS,aA as BUTTON_TEXTS,aj as DEFAULT_DATA_STREAM_NAME,aa as DESTINATION_CATEGORIES,$ as DISPLAY_LANGUAGES,a5 as DISPLAY_TITLES,u as DOCS_BASE_URL,a9 as DestinationCategoryTypes,a6 as FORM_ALERTS,ae as INSTRUMENTATION_RULE_OPTIONS,dn as LANGUAGE_OPTIONS,M as MONITORS_OPTIONS,dp as OTEL_DISTRO_NAME_OPTIONS,bZ as STORAGE_KEYS,dq as TOKEN_ABOUT_TO_EXPIRE}from"./chunks/ui-components-B7yqdEby.js";import"./icons.js";import"react/jsx-runtime";import"styled-components";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-D99eCWta.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
@@ -1,6 +1,7 @@
1
1
  import { type FC } from 'react';
2
2
  import { type DescribeProps } from './describe';
3
3
  import { type LibrariesProps } from './libraries';
4
+ import { type PeerSourcesProps } from './peers';
4
5
  import { type PersistSources, type SourceFormData, type WorkloadId, type Source } from '@/types';
5
6
  interface SourceDrawerProps {
6
7
  persistSources: PersistSources;
@@ -11,6 +12,7 @@ interface SourceDrawerProps {
11
12
  fetchSourceById: (id: WorkloadId, bypassPaginationLoader?: boolean) => Promise<Source | undefined>;
12
13
  fetchSourceDescribe: DescribeProps['fetchSourceDescribe'];
13
14
  fetchSourceLibraries: LibrariesProps['fetchSourceLibraries'];
15
+ fetchPeerSources: PeerSourcesProps['fetchPeerSources'];
14
16
  }
15
17
  declare const SourceDrawer: FC<SourceDrawerProps>;
16
18
  export { SourceDrawer, type SourceDrawerProps };
@@ -0,0 +1,12 @@
1
+ import { type FC } from 'react';
2
+ import type { PeerSources, Source } from '@/types';
3
+ export interface PeerSourcesProps {
4
+ source: Source;
5
+ fetchPeerSources: (serviceName: string) => Promise<{
6
+ data?: {
7
+ peerSources: PeerSources;
8
+ };
9
+ }>;
10
+ }
11
+ declare const PeerSourcesTab: FC<PeerSourcesProps>;
12
+ export { PeerSourcesTab, type PeerSourcesProps as PeerSourcesTabProps };
@@ -1,4 +1,4 @@
1
- import{jsxs as e,jsx as t,Fragment as l}from"react/jsx-runtime";import{useEffect as a,Fragment as n,useState as o,useRef as i,forwardRef as r,useImperativeHandle as s,useMemo as c,Children as d,useCallback as u}from"react";import p,{useTheme as h}from"styled-components";import{A as m,F as g,a as b,C as f,b as y,I as C,c as v,i as w,d as k,K as S,T as $,e as x,f as I,D as N,g as A,B as T,h as D,j as F,k as V,l as O,W as M,m as R,M as P,V as L,S as E,n as z,N as j,o as q,L as H,p as K,R as _,q as B,r as W,s as G,t as J,u as U,v as Y,w as X,x as Z,y as Q,z as ee,E as te,G as le,H as ae,J as ne,O as oe,P as ie,Q as re,U as se,X as ce,Y as de,Z as ue,_ as pe,$ as he,a0 as me,a1 as ge,a2 as be,a3 as fe,a4 as ye,a5 as Ce,a6 as ve,a7 as we,a8 as ke,a9 as Se,aa as $e,ab as xe,ac as Ie,ad as Ne,ae as Ae,af as Te,ag as De,ah as Fe,ai as Ve,aj as Oe,ak as Me,al as Re,am as Pe,an as Le,ao as Ee,ap as ze,aq as je,ar as qe,as as He,at as Ke,au as _e,av as Be,aw as We,ax as Ge,ay as Je,az as Ue,aA as Ye,aB as Xe,aC as Ze,aD as Qe,aE as et,aF as tt,aG as lt,aH as at,aI as nt,aJ as ot,aK as it,aL as rt,aM as st,aN as ct}from"../chunks/ui-components-Ci6lJdLr.js";import{TrashIcon as dt,PlusIcon as ut,VSquareIcon as pt,OdigosLogo as ht,BookIcon as mt,XSquareIcon as gt,GoLogo as bt,JavaLogo as ft,ChevronRightIcon as yt,ActionIcon as Ct,DestinationIcon as vt,ChevronUpIcon as wt,ChevronDownIcon as kt,InstrumentationRuleIcon as St,SourceIcon as $t,SettingsIcon as xt,XIcon as It,VIcon as Nt,EditIcon as At,ExclamationTriangleIcon as Tt,ExclamationCircleIcon as Dt,KeyIcon as Ft,DiagnoseIcon as Vt,DownloadIcon as Ot,TerminalIcon as Mt,DeleteIcon as Rt,RefreshIcon as Pt,ConnectionsIcon as Lt,PodIcon as Et,ArrowDownSquareIcon as zt,ArrowUpSquareIcon as jt,PipelineCollectorIcon as qt,GatewayIcon as Ht,YamlIcon as Kt}from"../icons.js";import{Y as _t}from"../chunks/index-CmIINVHt.js";import"zustand";import"javascript-time-ago";import"../chunks/vendor-D99eCWta.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";const Bt=[{id:"CREDIT_CARD",label:"Credit card"}],Wt=[{id:m.CollectContainerAttributes,label:"Collect container attributes"},{id:m.CollectReplicaSetAttributes,label:"Collect ReplicaSet attributes"},{id:m.CollectWorkloadId,label:"Collect workload ID"},{id:m.CollectClusterId,label:"Collect cluster ID"}],Gt=[{id:S.Pod,label:S.Pod},{id:S.Namespace,label:S.Namespace},{id:S.Node,label:S.Node}],Jt=[{label:"Label key",keyName:"labelKey",placeholder:"app.kubernetes.io/name"},{label:"Attribute key",keyName:"attributeKey",placeholder:"app.kubernetes.name"},{label:"From sources",keyName:"fromSources",placeholder:"pod, namespace",tooltip:"Select multiple sources. Higher precedence sources (pod > namespace > node) will override lower ones.",componentType:"multi-dropdown",options:Gt}],Ut=[{label:"Annotation key",keyName:"annotationKey",placeholder:"kubectl.kubernetes.io/restartedAt"},{label:"Attribute key",keyName:"attributeKey",placeholder:"kubectl.kubernetes.restartedAt"},{label:"From sources",keyName:"fromSources",placeholder:"pod, namespace",tooltip:"Select multiple sources. Higher precedence sources (pod > namespace > node) will override lower ones.",componentType:"multi-dropdown",options:Gt}],Yt=[{label:"Service",keyName:"serviceName",placeholder:"e.g. my-service",tooltip:"Service name: The rule applies to a specific service name. Only traces originating from this service’s root span will be considered."},{label:"HTTP route",keyName:"httpRoute",placeholder:"e.g. /api/v1/users",tooltip:"HTTP route: The specific HTTP route prefix to match for sampling. Only traces with routes beginning with this prefix will be considered. For instance, configuring /buy will also match /buy/product."},{label:"Threshold",keyName:"minimumLatencyThreshold",placeholder:"e.g. 1000",tooltip:"Minimum latency threshold (ms): Specifies the minimum latency in milliseconds; traces with latency below this threshold are ignored.",inputType:v.Number},{label:"Fallback",keyName:"fallbackSamplingRatio",placeholder:"e.g. 100",tooltip:"Fallback sampling ratio: Specifies the percentage of traces that meet the service/http_route filter but fall below the threshold that you still want to retain. For example, if a rule is set for service A and http_route B with a minimum latency threshold of 1 second, you might still want to keep some traces below this threshold. Setting the ratio to 20% ensures that 20% of these traces will be retained.",inputType:v.Number}],Xt=m.UrlTemplatizationRulesGroups,Zt=[{keyName:"kind",label:"Kind",placeholder:"Any kind",componentType:"dropdown",options:[{id:"Deployment",label:"Deployment"},{id:"StatefulSet",label:"StatefulSet"},{id:"DaemonSet",label:"DaemonSet"}]},{keyName:"name",label:"Name",placeholder:"Any name"}],Qt=[{label:"Service name",keyName:"serviceName",placeholder:"e.g. my-service",tooltip:"Specifies the service name to search within the trace (Across all available spans)."},{label:"Sampling ratio",keyName:"samplingRatio",placeholder:"e.g. 10",tooltip:"Specifies the sample rate for all traces.",inputType:v.Number},{label:"Fallback sampling ratio",keyName:"fallbackSamplingRatio",placeholder:"e.g. 100",tooltip:"Specifies the percentage of traces that don’t meet the service name filter and that you still like to retain.",inputType:v.Number}],el=[{label:"Service name",keyName:"serviceName",placeholder:"e.g. my-service",tooltip:"Specifies the service name to search within the trace (across all available spans)."},{label:"Attribute key",keyName:"attributeKey",placeholder:"e.g. http.request.method",tooltip:"Specifies the attribute key inside of the span."},{label:"Fallback sampling ratio",keyName:"fallbackSamplingRatio",placeholder:"e.g. 100",tooltip:"Specifies the percentage of traces that don’t meet the service name filter and that you still like to retain.",inputType:v.Number},{label:"Condition",keyName:"condition",tooltip:"An object representing the filters for span attributes filters.",componentType:V.Dropdown,options:[{id:"stringCondition",label:"String condition"},{id:"numberCondition",label:"Number condition"},{id:"booleanCondition",label:"Boolean condition"},{id:"jsonCondition",label:"JSON condition"}]},{label:"Operation",keyName:"operation",tooltip:"Specifies the operation to run against the attribute.",componentType:V.Dropdown,options:[{id:"exists",label:"Exists"},{id:"equals",label:"Equals"},{id:"not_equals",label:"Not equals"},{id:"contains",label:"Contains"},{id:"not_contains",label:"Not contains"},{id:"regex",label:"Regex"},{id:"greater_than",label:"Greater than"},{id:"less_than",label:"Less than"},{id:"greater_than_or_equal",label:"Greater than or equal"},{id:"less_than_or_equal",label:"Less than or equal"},{id:"is_valid_json",label:"Is valid JSON"},{id:"is_invalid_json",label:"Is invalid JSON"},{id:"jsonpath_exists",label:"JSON path exists"},{id:"key_equals",label:"Key equals"},{id:"key_not_equals",label:"Key not equals"}]},{label:"Expected value",keyName:"expectedValue",placeholder:"e.g. GET",tooltip:"The values to test the attribute against."},{label:"JSON path",keyName:"jsonPath",placeholder:"e.g. $.user.role",tooltip:"An expression used to navigate the JSON structure.",renderCondition:e=>"jsonCondition"===e.condition}],tl={[O.K8sAttributes]:({value:n,setValue:o,formErrors:i})=>(a(()=>{n[m.CollectContainerAttributes]||n[m.CollectReplicaSetAttributes]||n[m.CollectWorkloadId]||n[m.CollectClusterId]||n[m.LabelsAttributes]?.length||n[m.AnnotationsAttributes]?.length||(o(m.CollectContainerAttributes,!0),o(m.CollectReplicaSetAttributes,!0),o(m.CollectWorkloadId,!0),o(m.CollectClusterId,!0),o(m.LabelsAttributes,[]),o(m.AnnotationsAttributes,[]))},[]),e(l,{children:[t(g,{$gap:6,children:Wt.map(({id:l,label:a})=>e(g,{children:[t(f,{label:a,value:n[l]||!1,onChange:e=>o(l,e)}),t(y,{errorMessage:i[l]})]},l))}),t(k,{label:"Label attributes",limitFieldsPerRow:2,columns:Jt,values:n[m.LabelsAttributes]||[],setValues:e=>o(m.LabelsAttributes,e),errorMessage:i[m.LabelsAttributes]}),t(k,{label:"Annotation attributes",limitFieldsPerRow:2,columns:Ut,values:n[m.AnnotationsAttributes]||[],setValues:e=>o(m.AnnotationsAttributes,e),errorMessage:i[m.AnnotationsAttributes]})]})),[O.AddClusterInfo]:({value:a,setValue:n,formErrors:o})=>{const i=h();return e(l,{children:[t($,{label:"Overwrite existing values",labelAlign:x.Left,labelColor:i.v2.colors.silver[200],tooltip:"If enabled, the resource attributes will overwrite any existing attributes with the same name.",value:a[m.OverwriteExistingValues]||!1,onChange:e=>n(m.OverwriteExistingValues,e)}),t(k,{label:"Resource attributes",limitFieldsPerRow:2,columns:[{keyName:"attributeName",label:"Attribute name"},{keyName:"attributeStringValue",label:"Attribute value"}],values:a[m.ClusterAttributes]||[],setValues:e=>n(m.ClusterAttributes,e),errorMessage:o[m.ClusterAttributes]})]})},[O.DeleteAttributes]:({value:e,setValue:l,formErrors:a})=>t(I,{label:"Attributes to delete",values:e[m.AttributeNamesToDelete]||[],setValues:e=>l(m.AttributeNamesToDelete,e),errorMessage:a[m.AttributeNamesToDelete]}),[O.RenameAttributes]:({value:e,setValue:l,formErrors:a})=>t(k,{label:"Attributes to rename",limitFieldsPerRow:2,columns:[{keyName:"oldKey",label:"Old key"},{keyName:"newKey",label:"New key"}],values:Object.entries(e[m.Renames]||{}).map(([e,t])=>({oldKey:e,newKey:t})),setValues:e=>{const t={};e.forEach(e=>t[e.oldKey]=e.newKey),l(m.Renames,t)},errorMessage:a[m.Renames]}),[O.PiiMasking]:({value:l,setValue:n,formErrors:o})=>(a(()=>{l[m.PiiCategories]?.length||n(m.PiiCategories,Bt.map(({id:e})=>e))},[]),e(g,{$gap:12,children:[t(b,{label:"Attributes to mask"}),t(g,{$gap:6,children:Bt.map(({id:e,label:a})=>t(f,{label:a,value:l[m.PiiCategories]?.includes(e)||!1,onChange:t=>{const a=l[m.PiiCategories]||[],o=t?[...a,e]:a.filter(t=>t!==e);n(m.PiiCategories,o)}},e))}),t(y,{errorMessage:o[m.PiiCategories]})]})),[O.ErrorSampler]:({value:e,setValue:l,formErrors:a})=>{const n=a[m.FallbackSamplingRatio],o=w(e[m.FallbackSamplingRatio])?"":String(e[m.FallbackSamplingRatio]);return t(C,{label:"Fallback sampling ratio",type:v.Number,min:0,max:100,value:o,placeholder:"0-100",onChange:e=>{return t=e.target.value,l(m.FallbackSamplingRatio,Math.max(0,Math.min(Number(t),100))||0);var t},errorMessage:n})},[O.ProbabilisticSampler]:({value:e,setValue:l,formErrors:a})=>{const n=a[m.SamplingPercentage],o=w(e[m.SamplingPercentage])?"":String(e[m.SamplingPercentage]);return t(C,{label:"Sampling percentage",type:v.Number,min:0,max:100,value:o,placeholder:"0-100",onChange:e=>{return t=e.target.value,l(m.SamplingPercentage,Math.max(0,Math.min(Number(t),100))||0);var t},errorMessage:n})},[O.LatencySampler]:({value:e,setValue:l,formErrors:a})=>{const n=a[m.EndpointsFilters],o=e[m.EndpointsFilters]||[];return t(k,{limitFieldsPerRow:2,columns:Yt,values:o,setValues:e=>{l(m.EndpointsFilters,e.map(({serviceName:e,httpRoute:t,minimumLatencyThreshold:l,fallbackSamplingRatio:a})=>({serviceName:e,httpRoute:t,minimumLatencyThreshold:Number(l),fallbackSamplingRatio:Number(a)})))},errorMessage:n})},[O.ServiceNameSampler]:({value:e,setValue:l,formErrors:a})=>{const n=a[m.ServicesNameFilters],o=e[m.ServicesNameFilters]||[];return t(k,{limitFieldsPerRow:2,columns:Qt,values:o,setValues:e=>{l(m.ServicesNameFilters,e.map(({serviceName:e,samplingRatio:t,fallbackSamplingRatio:l})=>({serviceName:e,samplingRatio:Number(t),fallbackSamplingRatio:Number(l)})))},errorMessage:n})},[O.SpanAttributeSampler]:({value:e,setValue:l,formErrors:a})=>{const n=a[m.AttributeFilters],o=(e[m.AttributeFilters]||[]).map(({serviceName:e,attributeKey:t,fallbackSamplingRatio:l,condition:a})=>{const n=Object.entries(a).filter(([e,t])=>t)[0][0];return{serviceName:e,attributeKey:t,fallbackSamplingRatio:l,condition:n,operation:a[n]?.operation,expectedValue:a[n]?.expectedValue,jsonPath:a[n]?.jsonPath}});return t(k,{limitFieldsPerRow:2,columns:el,values:o,setValues:e=>{l(m.AttributeFilters,e.map(({serviceName:e,attributeKey:t,fallbackSamplingRatio:l,condition:a,operation:n,expectedValue:o,jsonPath:i})=>{const r={serviceName:e,attributeKey:t,fallbackSamplingRatio:Number(l),condition:{[a]:{operation:n,expectedValue:o}}};return i&&(r.condition[a].jsonPath=i),r}))},errorMessage:n})},[O.URLTemplatization]:({value:a,setValue:o,formErrors:i})=>{const r=h(),s=a[Xt]||[{filterK8sNamespace:"",workloadFilters:[],templatizationRules:[{template:""}],notes:""}],c=e=>o(Xt,e),d=(e,t)=>c(s.map((l,a)=>a===e?{...l,...t}:l));return e(l,{children:[s.map((l,a)=>e(n,{children:[t(N,{}),e(g,{$gap:12,children:[e(A,{$justifyContent:"space-between",$alignItems:"center",children:[t(b,{label:`Rule Group ${a+1}`}),t(T,{leftIcon:()=>t(dt,{fill:r.v2.colors.red[500]}),variant:F.Secondary,size:D.S,onClick:()=>{return e=a,c(s.filter((t,l)=>l!==e));var e},disabled:1===s.length})]}),t(C,{label:"Namespace",placeholder:"All namespaces",tooltip:"Filter rules to a specific Kubernetes namespace.",value:l.filterK8sNamespace||"",onChange:e=>d(a,{filterK8sNamespace:e.target.value})}),t(k,{label:"Workload filters",tooltip:"Optionally scope templates to specific workloads.",columns:Zt,values:l.workloadFilters||[],setValues:e=>d(a,{workloadFilters:e})}),t(I,{label:"Templates",required:!0,placeholder:"e.g. /user/{id}",values:l.templatizationRules.map(e=>e.template),setValues:e=>d(a,{templatizationRules:e.map(e=>({template:e}))})})]}),t(y,{errorMessage:i[Xt]})]},`url-templatization-group-${a}`)),t(T,{variant:F.Secondary,label:"Add rule group",leftIcon:ut,onClick:()=>c([...s,{filterK8sNamespace:"",workloadFilters:[],templatizationRules:[{template:""}],notes:""}])}),t(N,{})]})}},ll=({actionType:e,value:l,setValue:a,formErrors:n})=>{if(!e)return null;const o=tl[e];return o?t(o,{value:l,setValue:a,formErrors:n}):null},al=({isOpen:e,onClose:l,onDeny:a,onApprove:n})=>t(M,{title:"Discard changes?",description:"You have unsaved changes.\nIf you cancel now, your changes won't be saved.",isOpen:e,onClose:l,onDeny:a,denyLabel:"Keep editing",onApprove:n,approveLabel:"Discard changes"}),nl=({isOpen:e,onClose:l,onDeny:a,onApprove:n,action:o="delete",target:i})=>{const r=o.charAt(0).toUpperCase()+o.substring(1),s=i?.endsWith("s")?"these":"this";return t(M,{title:`${r}${i?` ${i}`:""}?`,description:`Are you sure you want to ${o}${i?` ${s} ${i}`:""}?`,isOpen:e,onClose:l,onDeny:a,denyLabel:"Go back",onApprove:n,approveLabel:r})},ol=(e,t)=>!t?.length||!!t?.find(t=>t===e),il=({title:l="Signals",required:n,errorMessage:r,allowedSignals:s,selectedSignals:c,setSelectedSignals:d})=>{const[u,p]=o(1===c.length),h=i(JSON.stringify(c));return a(()=>{const e=R(c);e.length||P.forEach(({id:t})=>{ol(t,s)&&e.push(t)});const t=JSON.stringify(e);h.current!==t&&(h.current=t,d(e),p(1===e.length))},[s,c]),e(g,{$gap:12,children:[t(b,{label:l,required:n}),t(A,{$gap:12,children:P.map(e=>{const l=ol(e.id,s),a=((e,t)=>!!t?.find(t=>t===e))(e.id,c);return l?t(f,{label:e.value,disabled:!l||u&&a,value:a,onChange:t=>((e,t)=>{const l=e,a=t?[...c,l]:c.filter(e=>e!==l);d(a),p(1===a.length)})(e.id,t)},e.id):null})}),t(y,{errorMessage:r})]})},rl=({minSupportedVersion:e,currentVersion:l})=>t(M,{isOpen:!0,onClose:()=>{},relativeToParent:!0,visual:()=>t(L,{scale:2.4,icon:()=>t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"21",viewBox:"0 0 22 21",fill:"none",children:t("path",{fill:"#151618",d:"M9.4844 0.730003C9.99694 -0.243259 11.4076 -0.24341 11.92 0.730003L11.9685 0.831353L14.3039 6.22012L20.153 6.77755C21.3553 6.89211 21.841 8.38683 20.9358 9.18621L16.5314 13.0731L17.8091 18.8079C18.0716 19.9868 16.8005 20.9109 15.7605 20.2969L10.7017 17.3093L5.64282 20.2969C4.60289 20.9104 3.33173 19.9866 3.59427 18.8079L4.87192 13.0741L0.468608 9.18621C-0.43662 8.38693 0.0482932 6.8924 1.25029 6.77755L7.09837 6.22012L9.43588 0.831353L9.4844 0.730003ZM8.55284 7.02876C8.35287 7.48992 7.9179 7.80589 7.41751 7.85357L2.03952 8.36571L6.09027 11.941C6.46691 12.2737 6.63296 12.7852 6.5237 13.2758L5.34956 18.5459L10.0008 15.8009L10.1669 15.7179C10.5087 15.574 10.8945 15.5741 11.2364 15.7179L11.4036 15.8009L16.0538 18.5459L14.8807 13.2758C14.7714 12.7851 14.9374 12.2737 15.3141 11.941L19.3627 8.36571L13.9858 7.85357C13.4855 7.80587 13.0505 7.4899 12.8505 7.02876L10.7017 2.07342L8.55284 7.02876Z"})})}),title:"Upgrade Required",description:`To use this feature, please upgrade to Odigos v${e} or later.\nCurrent version: ${l}.`}),sl=p.div`
1
+ import{jsxs as e,jsx as t,Fragment as l}from"react/jsx-runtime";import{useEffect as a,Fragment as n,useState as o,useRef as i,forwardRef as r,useImperativeHandle as s,useMemo as c,Children as d,useCallback as u}from"react";import p,{useTheme as h}from"styled-components";import{A as m,F as g,a as b,C as f,b as y,I as C,c as v,i as w,d as k,K as S,T as $,e as x,f as I,D as N,g as A,B as T,h as D,j as F,k as V,l as O,W as M,m as R,M as P,V as L,S as E,n as z,N as j,o as q,L as H,p as K,R as _,q as B,r as W,s as G,t as J,u as U,v as Y,w as X,x as Z,y as Q,z as ee,E as te,G as le,H as ae,J as ne,O as oe,P as ie,Q as re,U as se,X as ce,Y as de,Z as ue,_ as pe,$ as he,a0 as me,a1 as ge,a2 as be,a3 as fe,a4 as ye,a5 as Ce,a6 as ve,a7 as we,a8 as ke,a9 as Se,aa as $e,ab as xe,ac as Ie,ad as Ne,ae as Ae,af as Te,ag as De,ah as Fe,ai as Ve,aj as Oe,ak as Me,al as Re,am as Pe,an as Le,ao as Ee,ap as ze,aq as je,ar as qe,as as He,at as Ke,au as _e,av as Be,aw as We,ax as Ge,ay as Je,az as Ue,aA as Ye,aB as Xe,aC as Ze,aD as Qe,aE as et,aF as tt,aG as lt,aH as at,aI as nt,aJ as ot,aK as it,aL as rt,aM as st,aN as ct}from"../chunks/ui-components-B7yqdEby.js";import{TrashIcon as dt,PlusIcon as ut,VSquareIcon as pt,OdigosLogo as ht,BookIcon as mt,XSquareIcon as gt,GoLogo as bt,JavaLogo as ft,ChevronRightIcon as yt,ActionIcon as Ct,DestinationIcon as vt,ChevronUpIcon as wt,ChevronDownIcon as kt,InstrumentationRuleIcon as St,SourceIcon as $t,SettingsIcon as xt,XIcon as It,VIcon as Nt,EditIcon as At,ExclamationTriangleIcon as Tt,ExclamationCircleIcon as Dt,KeyIcon as Ft,DiagnoseIcon as Vt,DownloadIcon as Ot,TerminalIcon as Mt,DeleteIcon as Rt,RefreshIcon as Pt,ConnectionsIcon as Lt,PodIcon as Et,ArrowDownSquareIcon as zt,ArrowUpSquareIcon as jt,PipelineCollectorIcon as qt,GatewayIcon as Ht,YamlIcon as Kt}from"../icons.js";import{Y as _t}from"../chunks/index-CqkUTwRb.js";import"zustand";import"javascript-time-ago";import"../chunks/vendor-D99eCWta.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";const Bt=[{id:"CREDIT_CARD",label:"Credit card"}],Wt=[{id:m.CollectContainerAttributes,label:"Collect container attributes"},{id:m.CollectReplicaSetAttributes,label:"Collect ReplicaSet attributes"},{id:m.CollectWorkloadId,label:"Collect workload ID"},{id:m.CollectClusterId,label:"Collect cluster ID"}],Gt=[{id:S.Pod,label:S.Pod},{id:S.Namespace,label:S.Namespace},{id:S.Node,label:S.Node}],Jt=[{label:"Label key",keyName:"labelKey",placeholder:"app.kubernetes.io/name"},{label:"Attribute key",keyName:"attributeKey",placeholder:"app.kubernetes.name"},{label:"From sources",keyName:"fromSources",placeholder:"pod, namespace",tooltip:"Select multiple sources. Higher precedence sources (pod > namespace > node) will override lower ones.",componentType:"multi-dropdown",options:Gt}],Ut=[{label:"Annotation key",keyName:"annotationKey",placeholder:"kubectl.kubernetes.io/restartedAt"},{label:"Attribute key",keyName:"attributeKey",placeholder:"kubectl.kubernetes.restartedAt"},{label:"From sources",keyName:"fromSources",placeholder:"pod, namespace",tooltip:"Select multiple sources. Higher precedence sources (pod > namespace > node) will override lower ones.",componentType:"multi-dropdown",options:Gt}],Yt=[{label:"Service",keyName:"serviceName",placeholder:"e.g. my-service",tooltip:"Service name: The rule applies to a specific service name. Only traces originating from this service’s root span will be considered."},{label:"HTTP route",keyName:"httpRoute",placeholder:"e.g. /api/v1/users",tooltip:"HTTP route: The specific HTTP route prefix to match for sampling. Only traces with routes beginning with this prefix will be considered. For instance, configuring /buy will also match /buy/product."},{label:"Threshold",keyName:"minimumLatencyThreshold",placeholder:"e.g. 1000",tooltip:"Minimum latency threshold (ms): Specifies the minimum latency in milliseconds; traces with latency below this threshold are ignored.",inputType:v.Number},{label:"Fallback",keyName:"fallbackSamplingRatio",placeholder:"e.g. 100",tooltip:"Fallback sampling ratio: Specifies the percentage of traces that meet the service/http_route filter but fall below the threshold that you still want to retain. For example, if a rule is set for service A and http_route B with a minimum latency threshold of 1 second, you might still want to keep some traces below this threshold. Setting the ratio to 20% ensures that 20% of these traces will be retained.",inputType:v.Number}],Xt=m.UrlTemplatizationRulesGroups,Zt=[{keyName:"kind",label:"Kind",placeholder:"Any kind",componentType:"dropdown",options:[{id:"Deployment",label:"Deployment"},{id:"StatefulSet",label:"StatefulSet"},{id:"DaemonSet",label:"DaemonSet"}]},{keyName:"name",label:"Name",placeholder:"Any name"}],Qt=[{label:"Service name",keyName:"serviceName",placeholder:"e.g. my-service",tooltip:"Specifies the service name to search within the trace (Across all available spans)."},{label:"Sampling ratio",keyName:"samplingRatio",placeholder:"e.g. 10",tooltip:"Specifies the sample rate for all traces.",inputType:v.Number},{label:"Fallback sampling ratio",keyName:"fallbackSamplingRatio",placeholder:"e.g. 100",tooltip:"Specifies the percentage of traces that don’t meet the service name filter and that you still like to retain.",inputType:v.Number}],el=[{label:"Service name",keyName:"serviceName",placeholder:"e.g. my-service",tooltip:"Specifies the service name to search within the trace (across all available spans)."},{label:"Attribute key",keyName:"attributeKey",placeholder:"e.g. http.request.method",tooltip:"Specifies the attribute key inside of the span."},{label:"Fallback sampling ratio",keyName:"fallbackSamplingRatio",placeholder:"e.g. 100",tooltip:"Specifies the percentage of traces that don’t meet the service name filter and that you still like to retain.",inputType:v.Number},{label:"Condition",keyName:"condition",tooltip:"An object representing the filters for span attributes filters.",componentType:V.Dropdown,options:[{id:"stringCondition",label:"String condition"},{id:"numberCondition",label:"Number condition"},{id:"booleanCondition",label:"Boolean condition"},{id:"jsonCondition",label:"JSON condition"}]},{label:"Operation",keyName:"operation",tooltip:"Specifies the operation to run against the attribute.",componentType:V.Dropdown,options:[{id:"exists",label:"Exists"},{id:"equals",label:"Equals"},{id:"not_equals",label:"Not equals"},{id:"contains",label:"Contains"},{id:"not_contains",label:"Not contains"},{id:"regex",label:"Regex"},{id:"greater_than",label:"Greater than"},{id:"less_than",label:"Less than"},{id:"greater_than_or_equal",label:"Greater than or equal"},{id:"less_than_or_equal",label:"Less than or equal"},{id:"is_valid_json",label:"Is valid JSON"},{id:"is_invalid_json",label:"Is invalid JSON"},{id:"jsonpath_exists",label:"JSON path exists"},{id:"key_equals",label:"Key equals"},{id:"key_not_equals",label:"Key not equals"}]},{label:"Expected value",keyName:"expectedValue",placeholder:"e.g. GET",tooltip:"The values to test the attribute against."},{label:"JSON path",keyName:"jsonPath",placeholder:"e.g. $.user.role",tooltip:"An expression used to navigate the JSON structure.",renderCondition:e=>"jsonCondition"===e.condition}],tl={[O.K8sAttributes]:({value:n,setValue:o,formErrors:i})=>(a(()=>{n[m.CollectContainerAttributes]||n[m.CollectReplicaSetAttributes]||n[m.CollectWorkloadId]||n[m.CollectClusterId]||n[m.LabelsAttributes]?.length||n[m.AnnotationsAttributes]?.length||(o(m.CollectContainerAttributes,!0),o(m.CollectReplicaSetAttributes,!0),o(m.CollectWorkloadId,!0),o(m.CollectClusterId,!0),o(m.LabelsAttributes,[]),o(m.AnnotationsAttributes,[]))},[]),e(l,{children:[t(g,{$gap:6,children:Wt.map(({id:l,label:a})=>e(g,{children:[t(f,{label:a,value:n[l]||!1,onChange:e=>o(l,e)}),t(y,{errorMessage:i[l]})]},l))}),t(k,{label:"Label attributes",limitFieldsPerRow:2,columns:Jt,values:n[m.LabelsAttributes]||[],setValues:e=>o(m.LabelsAttributes,e),errorMessage:i[m.LabelsAttributes]}),t(k,{label:"Annotation attributes",limitFieldsPerRow:2,columns:Ut,values:n[m.AnnotationsAttributes]||[],setValues:e=>o(m.AnnotationsAttributes,e),errorMessage:i[m.AnnotationsAttributes]})]})),[O.AddClusterInfo]:({value:a,setValue:n,formErrors:o})=>{const i=h();return e(l,{children:[t($,{label:"Overwrite existing values",labelAlign:x.Left,labelColor:i.v2.colors.silver[200],tooltip:"If enabled, the resource attributes will overwrite any existing attributes with the same name.",value:a[m.OverwriteExistingValues]||!1,onChange:e=>n(m.OverwriteExistingValues,e)}),t(k,{label:"Resource attributes",limitFieldsPerRow:2,columns:[{keyName:"attributeName",label:"Attribute name"},{keyName:"attributeStringValue",label:"Attribute value"}],values:a[m.ClusterAttributes]||[],setValues:e=>n(m.ClusterAttributes,e),errorMessage:o[m.ClusterAttributes]})]})},[O.DeleteAttributes]:({value:e,setValue:l,formErrors:a})=>t(I,{label:"Attributes to delete",values:e[m.AttributeNamesToDelete]||[],setValues:e=>l(m.AttributeNamesToDelete,e),errorMessage:a[m.AttributeNamesToDelete]}),[O.RenameAttributes]:({value:e,setValue:l,formErrors:a})=>t(k,{label:"Attributes to rename",limitFieldsPerRow:2,columns:[{keyName:"oldKey",label:"Old key"},{keyName:"newKey",label:"New key"}],values:Object.entries(e[m.Renames]||{}).map(([e,t])=>({oldKey:e,newKey:t})),setValues:e=>{const t={};e.forEach(e=>t[e.oldKey]=e.newKey),l(m.Renames,t)},errorMessage:a[m.Renames]}),[O.PiiMasking]:({value:l,setValue:n,formErrors:o})=>(a(()=>{l[m.PiiCategories]?.length||n(m.PiiCategories,Bt.map(({id:e})=>e))},[]),e(g,{$gap:12,children:[t(b,{label:"Attributes to mask"}),t(g,{$gap:6,children:Bt.map(({id:e,label:a})=>t(f,{label:a,value:l[m.PiiCategories]?.includes(e)||!1,onChange:t=>{const a=l[m.PiiCategories]||[],o=t?[...a,e]:a.filter(t=>t!==e);n(m.PiiCategories,o)}},e))}),t(y,{errorMessage:o[m.PiiCategories]})]})),[O.ErrorSampler]:({value:e,setValue:l,formErrors:a})=>{const n=a[m.FallbackSamplingRatio],o=w(e[m.FallbackSamplingRatio])?"":String(e[m.FallbackSamplingRatio]);return t(C,{label:"Fallback sampling ratio",type:v.Number,min:0,max:100,value:o,placeholder:"0-100",onChange:e=>{return t=e.target.value,l(m.FallbackSamplingRatio,Math.max(0,Math.min(Number(t),100))||0);var t},errorMessage:n})},[O.ProbabilisticSampler]:({value:e,setValue:l,formErrors:a})=>{const n=a[m.SamplingPercentage],o=w(e[m.SamplingPercentage])?"":String(e[m.SamplingPercentage]);return t(C,{label:"Sampling percentage",type:v.Number,min:0,max:100,value:o,placeholder:"0-100",onChange:e=>{return t=e.target.value,l(m.SamplingPercentage,Math.max(0,Math.min(Number(t),100))||0);var t},errorMessage:n})},[O.LatencySampler]:({value:e,setValue:l,formErrors:a})=>{const n=a[m.EndpointsFilters],o=e[m.EndpointsFilters]||[];return t(k,{limitFieldsPerRow:2,columns:Yt,values:o,setValues:e=>{l(m.EndpointsFilters,e.map(({serviceName:e,httpRoute:t,minimumLatencyThreshold:l,fallbackSamplingRatio:a})=>({serviceName:e,httpRoute:t,minimumLatencyThreshold:Number(l),fallbackSamplingRatio:Number(a)})))},errorMessage:n})},[O.ServiceNameSampler]:({value:e,setValue:l,formErrors:a})=>{const n=a[m.ServicesNameFilters],o=e[m.ServicesNameFilters]||[];return t(k,{limitFieldsPerRow:2,columns:Qt,values:o,setValues:e=>{l(m.ServicesNameFilters,e.map(({serviceName:e,samplingRatio:t,fallbackSamplingRatio:l})=>({serviceName:e,samplingRatio:Number(t),fallbackSamplingRatio:Number(l)})))},errorMessage:n})},[O.SpanAttributeSampler]:({value:e,setValue:l,formErrors:a})=>{const n=a[m.AttributeFilters],o=(e[m.AttributeFilters]||[]).map(({serviceName:e,attributeKey:t,fallbackSamplingRatio:l,condition:a})=>{const n=Object.entries(a).filter(([e,t])=>t)[0][0];return{serviceName:e,attributeKey:t,fallbackSamplingRatio:l,condition:n,operation:a[n]?.operation,expectedValue:a[n]?.expectedValue,jsonPath:a[n]?.jsonPath}});return t(k,{limitFieldsPerRow:2,columns:el,values:o,setValues:e=>{l(m.AttributeFilters,e.map(({serviceName:e,attributeKey:t,fallbackSamplingRatio:l,condition:a,operation:n,expectedValue:o,jsonPath:i})=>{const r={serviceName:e,attributeKey:t,fallbackSamplingRatio:Number(l),condition:{[a]:{operation:n,expectedValue:o}}};return i&&(r.condition[a].jsonPath=i),r}))},errorMessage:n})},[O.URLTemplatization]:({value:a,setValue:o,formErrors:i})=>{const r=h(),s=a[Xt]||[{filterK8sNamespace:"",workloadFilters:[],templatizationRules:[{template:""}],notes:""}],c=e=>o(Xt,e),d=(e,t)=>c(s.map((l,a)=>a===e?{...l,...t}:l));return e(l,{children:[s.map((l,a)=>e(n,{children:[t(N,{}),e(g,{$gap:12,children:[e(A,{$justifyContent:"space-between",$alignItems:"center",children:[t(b,{label:`Rule Group ${a+1}`}),t(T,{leftIcon:()=>t(dt,{fill:r.v2.colors.red[500]}),variant:F.Secondary,size:D.S,onClick:()=>{return e=a,c(s.filter((t,l)=>l!==e));var e},disabled:1===s.length})]}),t(C,{label:"Namespace",placeholder:"All namespaces",tooltip:"Filter rules to a specific Kubernetes namespace.",value:l.filterK8sNamespace||"",onChange:e=>d(a,{filterK8sNamespace:e.target.value})}),t(k,{label:"Workload filters",tooltip:"Optionally scope templates to specific workloads.",columns:Zt,values:l.workloadFilters||[],setValues:e=>d(a,{workloadFilters:e})}),t(I,{label:"Templates",required:!0,placeholder:"e.g. /user/{id}",values:l.templatizationRules.map(e=>e.template),setValues:e=>d(a,{templatizationRules:e.map(e=>({template:e}))})})]}),t(y,{errorMessage:i[Xt]})]},`url-templatization-group-${a}`)),t(T,{variant:F.Secondary,label:"Add rule group",leftIcon:ut,onClick:()=>c([...s,{filterK8sNamespace:"",workloadFilters:[],templatizationRules:[{template:""}],notes:""}])}),t(N,{})]})}},ll=({actionType:e,value:l,setValue:a,formErrors:n})=>{if(!e)return null;const o=tl[e];return o?t(o,{value:l,setValue:a,formErrors:n}):null},al=({isOpen:e,onClose:l,onDeny:a,onApprove:n})=>t(M,{title:"Discard changes?",description:"You have unsaved changes.\nIf you cancel now, your changes won't be saved.",isOpen:e,onClose:l,onDeny:a,denyLabel:"Keep editing",onApprove:n,approveLabel:"Discard changes"}),nl=({isOpen:e,onClose:l,onDeny:a,onApprove:n,action:o="delete",target:i})=>{const r=o.charAt(0).toUpperCase()+o.substring(1),s=i?.endsWith("s")?"these":"this";return t(M,{title:`${r}${i?` ${i}`:""}?`,description:`Are you sure you want to ${o}${i?` ${s} ${i}`:""}?`,isOpen:e,onClose:l,onDeny:a,denyLabel:"Go back",onApprove:n,approveLabel:r})},ol=(e,t)=>!t?.length||!!t?.find(t=>t===e),il=({title:l="Signals",required:n,errorMessage:r,allowedSignals:s,selectedSignals:c,setSelectedSignals:d})=>{const[u,p]=o(1===c.length),h=i(JSON.stringify(c));return a(()=>{const e=R(c);e.length||P.forEach(({id:t})=>{ol(t,s)&&e.push(t)});const t=JSON.stringify(e);h.current!==t&&(h.current=t,d(e),p(1===e.length))},[s,c]),e(g,{$gap:12,children:[t(b,{label:l,required:n}),t(A,{$gap:12,children:P.map(e=>{const l=ol(e.id,s),a=((e,t)=>!!t?.find(t=>t===e))(e.id,c);return l?t(f,{label:e.value,disabled:!l||u&&a,value:a,onChange:t=>((e,t)=>{const l=e,a=t?[...c,l]:c.filter(e=>e!==l);d(a),p(1===a.length)})(e.id,t)},e.id):null})}),t(y,{errorMessage:r})]})},rl=({minSupportedVersion:e,currentVersion:l})=>t(M,{isOpen:!0,onClose:()=>{},relativeToParent:!0,visual:()=>t(L,{scale:2.4,icon:()=>t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"21",viewBox:"0 0 22 21",fill:"none",children:t("path",{fill:"#151618",d:"M9.4844 0.730003C9.99694 -0.243259 11.4076 -0.24341 11.92 0.730003L11.9685 0.831353L14.3039 6.22012L20.153 6.77755C21.3553 6.89211 21.841 8.38683 20.9358 9.18621L16.5314 13.0731L17.8091 18.8079C18.0716 19.9868 16.8005 20.9109 15.7605 20.2969L10.7017 17.3093L5.64282 20.2969C4.60289 20.9104 3.33173 19.9866 3.59427 18.8079L4.87192 13.0741L0.468608 9.18621C-0.43662 8.38693 0.0482932 6.8924 1.25029 6.77755L7.09837 6.22012L9.43588 0.831353L9.4844 0.730003ZM8.55284 7.02876C8.35287 7.48992 7.9179 7.80589 7.41751 7.85357L2.03952 8.36571L6.09027 11.941C6.46691 12.2737 6.63296 12.7852 6.5237 13.2758L5.34956 18.5459L10.0008 15.8009L10.1669 15.7179C10.5087 15.574 10.8945 15.5741 11.2364 15.7179L11.4036 15.8009L16.0538 18.5459L14.8807 13.2758C14.7714 12.7851 14.9374 12.2737 15.3141 11.941L19.3627 8.36571L13.9858 7.85357C13.4855 7.80587 13.0505 7.4899 12.8505 7.02876L10.7017 2.07342L8.55284 7.02876Z"})})}),title:"Upgrade Required",description:`To use this feature, please upgrade to Odigos v${e} or later.\nCurrent version: ${l}.`}),sl=p.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  justify-content: flex-end;