@odigos/ui-kit 0.0.179 → 0.0.180
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 +7 -0
- package/lib/chunks/{ui-components-2aff6067.js → ui-components-fb24c792.js} +1 -1
- package/lib/components/v2.js +1 -1
- package/lib/components.js +1 -1
- package/lib/constants.js +1 -1
- package/lib/containers/v2.js +1 -1
- package/lib/containers.js +28 -28
- package/lib/contexts.js +1 -1
- package/lib/functions.js +1 -1
- package/lib/hooks.js +1 -1
- package/lib/snippets/_v2/yaml-section-card/index.d.ts +1 -0
- package/lib/snippets.js +1 -1
- package/lib/store.js +1 -1
- package/lib/theme.js +1 -1
- package/lib/types.js +1 -1
- package/lib/visuals.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.180](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.179...ui-kit-v0.0.180) (2026-01-22)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* enhance YAML section card with dynamic titles in source drawer ([#623](https://github.com/odigos-io/ui-kit/issues/623)) ([46d3b88](https://github.com/odigos-io/ui-kit/commit/46d3b88a521f610c89ad93aa2d44a98545d18f64))
|
|
9
|
+
|
|
3
10
|
## [0.0.179](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.178...ui-kit-v0.0.179) (2026-01-22)
|
|
4
11
|
|
|
5
12
|
|
|
@@ -2065,7 +2065,7 @@ import{SamplerIcon as e,PiiMaskingIcon as t,ImageErrorIcon as o,K8sLogo as n,Add
|
|
|
2065
2065
|
transform: translate(-50%, -50%);
|
|
2066
2066
|
`,Ku=()=>bt.createElement(qu,null,bt.createElement(Gu,null,bt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"464",height:"464",viewBox:"0 0 464 464",fill:"none"},bt.createElement("path",{opacity:"0.1",d:"M231.567 463.134C359.458 463.134 463.134 359.458 463.134 231.567C463.134 103.676 359.458 0 231.567 0C103.676 0 0 103.676 0 231.567C0 359.458 103.676 463.134 231.567 463.134Z",fill:"url(#paint0_radial_164_65835)"}),bt.createElement("defs",null,bt.createElement("radialGradient",{id:"paint0_radial_164_65835",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(201.232 229.641) scale(231.217)"},bt.createElement("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),bt.createElement("stop",{offset:"0.41",stopColor:"#7C3BFF",stopOpacity:"0.11"}),bt.createElement("stop",{offset:"0.56",stopColor:"#7C3BFF",stopOpacity:"0.13"}),bt.createElement("stop",{offset:"0.67",stopColor:"#7C3BFF",stopOpacity:"0.18"}),bt.createElement("stop",{offset:"0.75",stopColor:"#7C3BFF",stopOpacity:"0.25"}),bt.createElement("stop",{offset:"0.83",stopColor:"#7C3BFF",stopOpacity:"0.33"}),bt.createElement("stop",{offset:"0.89",stopColor:"#7C3BFF",stopOpacity:"0.44"}),bt.createElement("stop",{offset:"0.95",stopColor:"#7C3BFF",stopOpacity:"0.56"}),bt.createElement("stop",{offset:"1",stopColor:"#7C3BFF",stopOpacity:"0.7"}))))),bt.createElement(Gu,null,bt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"432",height:"432",viewBox:"0 0 432 432",fill:"none"},bt.createElement("path",{opacity:"0.3",d:"M215.921 431.841C335.17 431.841 431.841 335.17 431.841 215.921C431.841 96.6709 335.17 0 215.921 0C96.6709 0 0 96.6709 0 215.921C0 335.17 96.6709 431.841 215.921 431.841Z",fill:"url(#paint0_radial_164_65836)"}),bt.createElement("defs",null,bt.createElement("radialGradient",{id:"paint0_radial_164_65836",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(204.229 214.376) scale(216.276)"},bt.createElement("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),bt.createElement("stop",{offset:"0.38",stopColor:"#7C3BFF",stopOpacity:"0.11"}),bt.createElement("stop",{offset:"0.52",stopColor:"#7C3BFF",stopOpacity:"0.13"}),bt.createElement("stop",{offset:"0.62",stopColor:"#7C3BFF",stopOpacity:"0.18"}),bt.createElement("stop",{offset:"0.69",stopColor:"#7C3BFF",stopOpacity:"0.25"}),bt.createElement("stop",{offset:"0.76",stopColor:"#7C3BFF",stopOpacity:"0.33"}),bt.createElement("stop",{offset:"0.82",stopColor:"#7C3BFF",stopOpacity:"0.44"}),bt.createElement("stop",{offset:"0.88",stopColor:"#7C3BFF",stopOpacity:"0.57"}),bt.createElement("stop",{offset:"0.93",stopColor:"#7C3BFF",stopOpacity:"0.72"}),bt.createElement("stop",{offset:"0.97",stopColor:"#7C3BFF",stopOpacity:"0.88"}),bt.createElement("stop",{offset:"1",stopColor:"#7C3BFF"}))))),bt.createElement(Gu,null,bt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"374",height:"374",viewBox:"0 0 374 374",fill:"none"},bt.createElement("path",{opacity:"0.5",d:"M186.963 373.927C290.22 373.927 373.927 290.22 373.927 186.963C373.927 83.7063 290.22 0 186.963 0C83.7063 0 0 83.7063 0 186.963C0 290.22 83.7063 373.927 186.963 373.927Z",fill:"url(#paint0_radial_164_65837)"}),bt.createElement("defs",null,bt.createElement("radialGradient",{id:"paint0_radial_164_65837",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(166.792 184.246) scale(186.963)"},bt.createElement("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),bt.createElement("stop",{offset:"0.31",stopColor:"#7C3BFF",stopOpacity:"0.11"}),bt.createElement("stop",{offset:"0.45",stopColor:"#7C3BFF",stopOpacity:"0.14"}),bt.createElement("stop",{offset:"0.56",stopColor:"#7C3BFF",stopOpacity:"0.19"}),bt.createElement("stop",{offset:"0.65",stopColor:"#7C3BFF",stopOpacity:"0.26"}),bt.createElement("stop",{offset:"0.73",stopColor:"#7C3BFF",stopOpacity:"0.35"}),bt.createElement("stop",{offset:"0.8",stopColor:"#7C3BFF",stopOpacity:"0.46"}),bt.createElement("stop",{offset:"0.86",stopColor:"#7C3BFF",stopOpacity:"0.6"}),bt.createElement("stop",{offset:"0.92",stopColor:"#7C3BFF",stopOpacity:"0.76"}),bt.createElement("stop",{offset:"0.98",stopColor:"#7C3BFF",stopOpacity:"0.93"}),bt.createElement("stop",{offset:"1",stopColor:"#7C3BFF"}))))),bt.createElement(Gu,null,bt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"257",height:"257",viewBox:"0 0 257 257",fill:"none"},bt.createElement("path",{opacity:"0.7",d:"M128.193 256.387C198.992 256.387 256.387 198.992 256.387 128.193C256.387 57.3941 198.992 0 128.193 0C57.3941 0 0 57.3941 0 128.193C0 198.992 57.3941 256.387 128.193 256.387Z",fill:"url(#paint0_radial_164_65838)"}),bt.createElement("defs",null,bt.createElement("radialGradient",{id:"paint0_radial_164_65838",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(113.263 126.219) scale(128.08)"},bt.createElement("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),bt.createElement("stop",{offset:"0.31",stopColor:"#7C3BFF",stopOpacity:"0.11"}),bt.createElement("stop",{offset:"0.45",stopColor:"#7C3BFF",stopOpacity:"0.14"}),bt.createElement("stop",{offset:"0.56",stopColor:"#7C3BFF",stopOpacity:"0.19"}),bt.createElement("stop",{offset:"0.65",stopColor:"#7C3BFF",stopOpacity:"0.26"}),bt.createElement("stop",{offset:"0.73",stopColor:"#7C3BFF",stopOpacity:"0.35"}),bt.createElement("stop",{offset:"0.8",stopColor:"#7C3BFF",stopOpacity:"0.46"}),bt.createElement("stop",{offset:"0.86",stopColor:"#7C3BFF",stopOpacity:"0.6"}),bt.createElement("stop",{offset:"0.92",stopColor:"#7C3BFF",stopOpacity:"0.76"}),bt.createElement("stop",{offset:"0.98",stopColor:"#7C3BFF",stopOpacity:"0.93"}),bt.createElement("stop",{offset:"1",stopColor:"#7C3BFF"}))))),bt.createElement(Gu,null,bt.createElement(se,{size:112}))),Yu=({minSupportedVersion:e,currentVersion:t})=>bt.createElement(Mu,{isOpen:!0,onClose:()=>{},relativeToParent:!0,visual:()=>bt.createElement(Wu,{scale:2.4,icon:()=>bt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"21",viewBox:"0 0 22 21",fill:"none"},bt.createElement("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: ${t}.`}),Ju=Bt.div`
|
|
2067
2067
|
padding: 0 12px;
|
|
2068
|
-
`,Xu=({
|
|
2068
|
+
`,Xu=({title:e="YAML",yaml:t,defaultOpen:o})=>{const{clickCopy:n,isCopied:i}=Aa(),[a,r]=kt(o??!1),s=wt(()=>t?[{id:rn(),type:Jp.Button,buttonProps:{variant:xp.Secondary,size:bp.S,leftIcon:i?Ge:Ke,onClick:()=>n(t||""),disabled:i}},{id:rn(),type:Jp.Button,buttonProps:{variant:xp.Secondary,size:bp.S,leftIcon:a?pt:ut,onClick:()=>r(e=>!e)}}]:[],[t,i,a]);return bt.createElement(tu,{richTitle:{icon:mt,title:e},actions:s},a&&bt.createElement(Ju,null,t?bt.createElement(es,{code:t,language:"yaml",theme:"duotoneDark"}):bt.createElement(Ya,null,bt.createElement(Ys,{title:"YAML not found",subTitle:"The YAML for this resource is not available"}))))},Zu=Bt.div`
|
|
2069
2069
|
display: flex;
|
|
2070
2070
|
align-items: center;
|
|
2071
2071
|
justify-content: space-between;
|
package/lib/components/v2.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{B as Badge,m as Button,v as ButtonSize,dt as ButtonTab,du as ButtonTabList,n as ButtonVariants,C as Checkbox,dx as CheckboxList,dw as CheckboxSize,U as CliCommand,M as DataCard,i as Drawer,a3 as DropData,w as DropDataAlignX,a4 as DropDataAlignY,dy as Header,ca as HoverActions,Q as IconButton,cm as IconButtonSize,dz as Input,I as Island,L as Loader,dA as Modal,dB as Navbar,l as Note,dD as Radio,dE as RadioGroup,dC as RadioSize,k as Search,y as SectionCard,dv as SectionCardSize,V as Segment,dF as SegmentSize,X as StatusCard,z as Table,G as TableVariant,dG as Tag,Z as TextCard,d as Toggle,dI as ToggleLabelAlign,dJ as ToggleList,e as ToggleSize,dH as ToggleVariant,T as Typography,b as TypographySize,f as TypographyVariants,dK as WarningModal}from"../chunks/ui-components-
|
|
1
|
+
export{B as Badge,m as Button,v as ButtonSize,dt as ButtonTab,du as ButtonTabList,n as ButtonVariants,C as Checkbox,dx as CheckboxList,dw as CheckboxSize,U as CliCommand,M as DataCard,i as Drawer,a3 as DropData,w as DropDataAlignX,a4 as DropDataAlignY,dy as Header,ca as HoverActions,Q as IconButton,cm as IconButtonSize,dz as Input,I as Island,L as Loader,dA as Modal,dB as Navbar,l as Note,dD as Radio,dE as RadioGroup,dC as RadioSize,k as Search,y as SectionCard,dv as SectionCardSize,V as Segment,dF as SegmentSize,X as StatusCard,z as Table,G as TableVariant,dG as Tag,Z as TextCard,d as Toggle,dI as ToggleLabelAlign,dJ as ToggleList,e as ToggleSize,dH as ToggleVariant,T as Typography,b as TypographySize,f as TypographyVariants,dK as WarningModal}from"../chunks/ui-components-fb24c792.js";import"../icons.js";import"react";import"styled-components";import"zustand";import"javascript-time-ago";import"../chunks/vendor-0965fadc.js";import"react-dom";import"@xyflow/react";import"react-error-boundary";import"lottie-react";import"prism-react-renderer";
|
package/lib/components.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{aK as AutocompleteInput,b1 as Badge,b3 as Button,aw as CancelWarning,j as CenterThis,aa as Checkbox,db as Code,aB as ConditionDetails,aC as DataCard,a6 as DataCardFieldTypes,bL as DataCardFields,dc as DataFinger,b5 as DataTab,av as DeleteWarning,c8 as DescribeRow,aL as Divider,ao as DocsButton,au as Drawer,de as DrawerFooter,dd as DrawerHeader,bq as Dropdown,df as ErrorBoundary,by as ExtendArrow,r as FadeLoader,ab as FieldError,a9 as FieldLabel,F as FlexColumn,a as FlexRow,dg as Header,bx as IconButton,ci as IconGroup,aY as IconTitleBadge,aT as IconWrapped,c4 as IconsNav,dh as ImageControlled,ad as Input,aj as InputList,ag as InputTable,a$ as InteractiveTable,ai as KeyValueInputsList,c2 as LoadingText,aF as Modal,aH as ModalBody,ap as MonitorsCheckboxes,aV as MonitorsIcons,aG as NavigationButtons,N as NoDataFound,aI as NotificationNote,dn as Overlay,x as PageContent,bl as Popup,cn as PopupForm,cs as ScrollX,b8 as ScrollY,an as SectionTitle,am as Segment,bm as SelectionButton,bd as SkeletonLoader,aN as Status,bK as Stepper,di as TabList,aW as TableContainer,aX as TableTitleWrap,a_ as TableWrap,bU as Tag,al as Text,aq as TextArea,ah as Toggle,cq as ToggleCodeComponent,c as Tooltip,b0 as TraceLoader,a0 as UpgradeRequiredWrapper,bn as VerticalScroll,dm as WarningModal,dj as getLinksFromText,dk as getStrongsFromText,dl as renderText}from"./chunks/ui-components-
|
|
1
|
+
export{aK as AutocompleteInput,b1 as Badge,b3 as Button,aw as CancelWarning,j as CenterThis,aa as Checkbox,db as Code,aB as ConditionDetails,aC as DataCard,a6 as DataCardFieldTypes,bL as DataCardFields,dc as DataFinger,b5 as DataTab,av as DeleteWarning,c8 as DescribeRow,aL as Divider,ao as DocsButton,au as Drawer,de as DrawerFooter,dd as DrawerHeader,bq as Dropdown,df as ErrorBoundary,by as ExtendArrow,r as FadeLoader,ab as FieldError,a9 as FieldLabel,F as FlexColumn,a as FlexRow,dg as Header,bx as IconButton,ci as IconGroup,aY as IconTitleBadge,aT as IconWrapped,c4 as IconsNav,dh as ImageControlled,ad as Input,aj as InputList,ag as InputTable,a$ as InteractiveTable,ai as KeyValueInputsList,c2 as LoadingText,aF as Modal,aH as ModalBody,ap as MonitorsCheckboxes,aV as MonitorsIcons,aG as NavigationButtons,N as NoDataFound,aI as NotificationNote,dn as Overlay,x as PageContent,bl as Popup,cn as PopupForm,cs as ScrollX,b8 as ScrollY,an as SectionTitle,am as Segment,bm as SelectionButton,bd as SkeletonLoader,aN as Status,bK as Stepper,di as TabList,aW as TableContainer,aX as TableTitleWrap,a_ as TableWrap,bU as Tag,al as Text,aq as TextArea,ah as Toggle,cq as ToggleCodeComponent,c as Tooltip,b0 as TraceLoader,a0 as UpgradeRequiredWrapper,bn as VerticalScroll,dm as WarningModal,dj as getLinksFromText,dk as getStrongsFromText,dl as renderText}from"./chunks/ui-components-fb24c792.js";import"./icons.js";import"react";import"styled-components";import"zustand";import"javascript-time-ago";import"./chunks/vendor-0965fadc.js";import"react-dom";import"@xyflow/react";import"react-error-boundary";import"lottie-react";import"prism-react-renderer";
|
package/lib/constants.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{az as ACTION_OPTIONS,at as BUTTON_TEXTS,D as DEFAULT_DATA_STREAM_NAME,bJ as DESTINATION_CATEGORIES,br as DISPLAY_LANGUAGES,a5 as DISPLAY_TITLES,aJ as FORM_ALERTS,bY as INSTRUMENTATION_RULE_OPTIONS,d2 as LANGUAGE_OPTIONS,bs as MONITORS_OPTIONS,d3 as OTEL_DISTRO_NAME_OPTIONS,bt as STORAGE_KEYS,d4 as TOKEN_ABOUT_TO_EXPIRE}from"./chunks/ui-components-
|
|
1
|
+
export{az as ACTION_OPTIONS,at as BUTTON_TEXTS,D as DEFAULT_DATA_STREAM_NAME,bJ as DESTINATION_CATEGORIES,br as DISPLAY_LANGUAGES,a5 as DISPLAY_TITLES,aJ as FORM_ALERTS,bY as INSTRUMENTATION_RULE_OPTIONS,d2 as LANGUAGE_OPTIONS,bs as MONITORS_OPTIONS,d3 as OTEL_DISTRO_NAME_OPTIONS,bt as STORAGE_KEYS,d4 as TOKEN_ABOUT_TO_EXPIRE}from"./chunks/ui-components-fb24c792.js";import"./icons.js";import"react";import"styled-components";import"zustand";import"javascript-time-ago";import"./chunks/vendor-0965fadc.js";import"react-dom";import"@xyflow/react";import"react-error-boundary";import"lottie-react";import"prism-react-renderer";
|
package/lib/containers/v2.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e,{useMemo as t,useState as a,useEffect as l,useCallback as o}from"react";import n,{useTheme as s}from"styled-components";import{F as i,a as r,C as c,T as d,b as u,B as p,S as g,c as h,O as m,N as b,d as f,e as y,f as w,u as C,g as v,D as k,E as x,h as $,i as S,j as I,L as D,P as A,R as P,k as T,l as R,m as z,n as N,o as O,p as M,q as L,r as V,s as W,t as F,A as j,v as E,w as G,x as U,y as H,z as Y,G as q,H as X,I as B,J as K,K as J,M as Q,Q as Z,U as _,Y as ee,V as te,W as ae,X as le,Z as oe,_ as ne,$ as se,a0 as ie,a1 as re,a2 as ce,a3 as de,a4 as ue}from"../chunks/ui-components-
|
|
1
|
+
import e,{useMemo as t,useState as a,useEffect as l,useCallback as o}from"react";import n,{useTheme as s}from"styled-components";import{F as i,a as r,C as c,T as d,b as u,B as p,S as g,c as h,O as m,N as b,d as f,e as y,f as w,u as C,g as v,D as k,E as x,h as $,i as S,j as I,L as D,P as A,R as P,k as T,l as R,m as z,n as N,o as O,p as M,q as L,r as V,s as W,t as F,A as j,v as E,w as G,x as U,y as H,z as Y,G as q,H as X,I as B,J as K,K as J,M as Q,Q as Z,U as _,Y as ee,V as te,W as ae,X as le,Z as oe,_ as ne,$ as se,a0 as ie,a1 as re,a2 as ce,a3 as de,a4 as ue}from"../chunks/ui-components-fb24c792.js";import{SourceIcon as pe,VSquareIcon as ge,SettingsIcon as he,OdigosLogo as me,DeleteIcon as be,ConnectionsIcon as fe,RefreshIcon as ye,VIcon as we,XIcon as Ce,XSquareIcon as ve,PodIcon as ke,ChevronUpIcon as xe,ChevronDownIcon as $e,TerminalIcon as Se,ArrowDownSquareIcon as Ie,ArrowUpSquareIcon as De,DownloadIcon as Ae,PipelineCollectorIcon as Pe,GatewayIcon as Te,YamlIcon as Re,DiagnoseIcon as ze}from"../icons.js";import"zustand";import"javascript-time-ago";import"../chunks/vendor-0965fadc.js";import"react-dom";import"@xyflow/react";import"react-error-boundary";import"lottie-react";import"prism-react-renderer";const Ne=n(i)`
|
|
2
2
|
width: ${({$width:e})=>e};
|
|
3
3
|
gap: 12px;
|
|
4
4
|
justify-content: space-between;
|
package/lib/containers.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e,{useState as t,useEffect as a,forwardRef as i,useRef as n,useImperativeHandle as o,useMemo as l,Fragment as r,useCallback as s,Children as c}from"react";import d,{css as u,useTheme as p}from"styled-components";import{a5 as m,a6 as h,a7 as g,a8 as y,a9 as v,aa as b,ab as f,ac as x,ad as S,ae as $,af as k,ag as C,ah as w,ai as D,aj as T,ak as N,al as E,J as O,am as A,an as F,ao as I,ap as M,aq as R,ar as L,as as P,at as j,au as K,av as q,aw as H,E as z,a2 as V,ax as B,ay as W,az as _,aA as J,aB as U,aC as
|
|
1
|
+
import e,{useState as t,useEffect as a,forwardRef as i,useRef as n,useImperativeHandle as o,useMemo as l,Fragment as r,useCallback as s,Children as c}from"react";import d,{css as u,useTheme as p}from"styled-components";import{a5 as m,a6 as h,a7 as g,a8 as y,a9 as v,aa as b,ab as f,ac as x,ad as S,ae as $,af as k,ag as C,ah as w,ai as D,aj as T,ak as N,al as E,J as O,am as A,an as F,ao as I,ap as M,aq as R,ar as L,as as P,at as j,au as K,av as q,aw as H,E as z,a2 as V,ax as B,ay as W,az as _,aA as J,aB as U,aC as Y,aD as G,F as X,aE as Z,aF as Q,aG as ee,aH as te,aI as ae,S as ie,aJ as ne,aK as oe,aL as le,aM as re,aN as se,a as ce,aO as de,c as ue,aP as pe,aQ as me,aR as he,aS as ge,aT as ye,aU as ve,aV as be,aW as fe,aX as xe,aY as Se,aZ as $e,a_ as ke,a$ as Ce,j as we,N as De,b0 as Te,b1 as Ne,b2 as Ee,b3 as Oe,r as Ae,b4 as Fe,b5 as Ie,$ as Me,b6 as Re,b7 as Le,b8 as Pe,b9 as je,ba as Ke,bb as qe,bc as He,g as ze,P as Ve,bd as Be,u as We,be as _e,bf as Je,bg as Ue,bh as Ye,bi as Ge,bj as Xe,bk as Ze,bl as Qe,bm as et,bn as tt,bo as at,bp as it,bq as nt,br as ot,bs as lt,bt as rt,bu as st,bv as ct,bw as dt,D as ut,bx as pt,by as mt,bz as ht,bA as gt,bB as yt,bC as vt,bD as bt,bE as ft,bF as xt,bG as St,bH as $t,bI as kt,bJ as Ct,h as wt,bK as Dt,bL as Tt,bM as Nt,bN as Et,bO as Ot,bP as At,bQ as Ft,bR as It,bS as Mt,bT as Rt,bU as Lt,bV as Pt,bW as jt,bX as Kt,bY as qt,bZ as Ht,b_ as zt,s as Vt,b$ as Bt,c0 as Wt,c1 as _t,c2 as Jt,c3 as Ut,c4 as Yt,c5 as Gt,c6 as Xt,c7 as Zt,c8 as Qt,c9 as ea,Y as ta,ca as aa,t as ia,cb as na,cc as oa,cd as la,ce as ra,cf as sa,cg as ca,ch as da,ci as ua,cj as pa,ck as ma,cl as ha,q as ga,cm as ya,cn as va,co as ba,cp as fa,cq as xa,cr as Sa,cs as $a}from"./chunks/ui-components-fb24c792.js";import{VSquareIcon as ka,XSquareIcon as Ca,EditIcon as wa,TrashIcon as Da,OdigosLogoText as Ta,PlusIcon as Na,RefreshIcon as Ea,SearchIcon as Oa,FilterIcon as Aa,DataStreamIcon as Fa,VIcon as Ia,OdigosLogo as Ma,ArrowIcon as Ra,RefreshLeftArrowIcon as La,NotificationIcon as Pa,UserIcon as ja,ImageErrorIcon as Ka,OverviewIcon as qa,InstrumentationRuleIcon as Ha,ActionIcon as za,SourceIcon as Va,DestinationIcon as Ba,SlackLogo as Wa,KeyIcon as _a,TerminalIcon as Ja,ExclamationTriangleIcon as Ua,TraceViewIcon as Ya}from"./icons.js";import{MarkerType as Ga,useNodesState as Xa,useEdgesState as Za,applyNodeChanges as Qa}from"@xyflow/react";import"zustand";import"javascript-time-ago";import"./chunks/vendor-0965fadc.js";import"react-dom";import"react-error-boundary";import"lottie-react";import"prism-react-renderer";const ei=e=>{const{type:t,name:a,notes:i,signals:n,disabled:o,fields:{collectContainerAttributes:l,collectReplicaSetAttributes:r,collectWorkloadId:s,collectClusterId:c,labelsAttributes:d,annotationsAttributes:u,clusterAttributes:p,overwriteExistingValues:v,attributeNamesToDelete:b,renames:f,piiCategories:x,fallbackSamplingRatio:S,samplingPercentage:$,endpointsFilters:k,servicesNameFilters:C,attributeFilters:w}}=e,D=[{title:m.TYPE,value:t},{type:h.ActiveStatus,title:m.STATUS,value:String(!o)},{type:h.Monitors,title:m.SIGNALS_FOR_PROCESSING,value:n?.map(e=>e.toLowerCase()).join(", ")||""},{title:m.NAME,value:a||""},{title:m.NOTES,value:i||""},{type:h.Divider}];if(t===g.K8sAttributes&&(D.push({title:"Collect Container Attributes",value:String(l)}),D.push({title:"Collect ReplicaSet Attributes",value:String(r)}),D.push({title:"Collect Workload ID",value:String(s)}),D.push({title:"Collect Cluster ID",value:String(c)}),d?.length&&D.push({type:h.Divider}),d?.forEach(({labelKey:e,attributeKey:t,from:a,fromSources:i},n)=>{let o="";o+=`Label Key: ${e}\n`,o+=`Attribute Key: ${t}\n`,o+=`From: ${i?.length?i.join(", "):a||y.Pod}\n`,D.push({title:"Label"+(d.length>1?` #${n+1}`:""),value:o})}),u?.length&&D.push({type:h.Divider}),u?.forEach(({annotationKey:e,attributeKey:t,from:a,fromSources:i},n)=>{let o="";o+=`Annotation Key: ${e}\n`,o+=`Attribute Key: ${t}\n`,o+=`From: ${i?.length?i.join(", "):a||y.Pod}\n`,D.push({title:"Annotation"+(u.length>1?` #${n+1}`:""),value:o})})),t===g.AddClusterInfo){D.push({title:"Overwrite Existing Values",value:String(v||!1)});let e="";p?.forEach(({attributeName:t,attributeStringValue:a},i)=>{e+=`${t}: ${a}`,i<p.length-1&&(e+=", ")}),D.push({title:"Attributes",value:e})}if(t===g.DeleteAttributes){let e="";b?.forEach((t,a)=>{e+=t,a<b.length-1&&(e+=", ")}),D.push({title:"Attributes",value:e})}if(t===g.RenameAttributes){let e="";const t=Object.entries(f||{});t.forEach(([a,i],n)=>{e+=`${a}: ${i}`,n<t.length-1&&(e+=", ")}),D.push({title:"Attributes",value:e})}if(t===g.PiiMasking){let e="";x?.forEach((t,a)=>{e+=t,a<x.length-1&&(e+=", ")}),D.push({title:"Categories",value:e})}return t===g.ErrorSampler&&D.push({title:"Sampling Ratio",value:String(S)}),t===g.ProbabilisticSampler&&D.push({title:"Sampling Percentage",value:String($)}),t===g.LatencySampler&&k?.forEach(({serviceName:e,httpRoute:t,minimumLatencyThreshold:a,fallbackSamplingRatio:i},n)=>{let o="";o+=`Service Name: ${e}\n`,o+=`HTTP Route: ${t}\n`,o+=`Min. Latency: ${a}\n`,o+=`Fallback Sampling Ratio: ${i}`,D.push({title:"Endpoint"+(k.length>1?` #${n+1}`:""),value:o})}),t===g.ServiceNameSampler&&C?.forEach(({serviceName:e,samplingRatio:t,fallbackSamplingRatio:a},i)=>{let n="";n+=`Service Name: ${e}\n`,n+=`Sampling Ratio: ${t}\n`,n+=`Fallback Sampling Ratio: ${a}`,D.push({title:"Filter"+(C.length>1?` #${i+1}`:""),value:n})}),t===g.SpanAttributeSampler&&w?.forEach(({serviceName:e,attributeKey:t,fallbackSamplingRatio:a,condition:i},n)=>{let o="";o+=`Service Name: ${e}\n`,o+=`Attribute Key: ${t}\n`,o+=`Fallback Sampling Ratio: ${a}\n`;const l=Object.keys(i)[0];o+=`Condition: ${l}\n`,o+=`Operation: ${i[l]?.operation}\n`,o+=`Expected Value: ${i[l]?.expectedValue}`,"jsonCondition"===l&&(o+=`\nJSON Path: ${i[l].jsonPath}`),D.push({title:"Filter"+(w.length>1?` #${n+1}`:""),value:o})}),D},ti=x.PiiCategories,ai=d.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: row;
|
|
4
4
|
gap: 32px;
|
|
@@ -24,10 +24,10 @@ import e,{useState as t,useEffect as a,forwardRef as i,useRef as n,useImperative
|
|
|
24
24
|
display: flex;
|
|
25
25
|
flex-direction: column;
|
|
26
26
|
gap: 12px;
|
|
27
|
-
`,Di=({updateAction:i,deleteAction:o})=>{const{actions:r}=V(),{drawerType:s,drawerEntityId:c}=L(),d=n(null),u=s===z.Action,[p,h]=t(!1),[g,y]=t(!1),{formData:v,formErrors:b,handleFormChange:f,resetFormData:x,validateForm:S,loadFormWithDrawerItem:$}=B(),k=l(()=>{if(c)return r?.find(e=>W(e)===c)},[c,r]);if(a(()=>{u&&k?$(k):x()},[u,k]),!k)return null;const C=_.find(({type:e})=>e===k.type)||_.find(({label:e})=>"Attributes"===e)?.items?.find(({type:e})=>e===k.type)||_.find(({label:e})=>"Samplers"===e)?.items?.find(({type:e})=>e===k.type);return e.createElement($i,{ref:d,title:k.name||k.type,icons:[J(k.type)],isEdit:p,isFormDirty:g,onEdit:e=>{h("boolean"!=typeof e||e)},onSave:e=>{if(S({withAlert:!0,alertTitle:
|
|
27
|
+
`,Di=({updateAction:i,deleteAction:o})=>{const{actions:r}=V(),{drawerType:s,drawerEntityId:c}=L(),d=n(null),u=s===z.Action,[p,h]=t(!1),[g,y]=t(!1),{formData:v,formErrors:b,handleFormChange:f,resetFormData:x,validateForm:S,loadFormWithDrawerItem:$}=B(),k=l(()=>{if(c)return r?.find(e=>W(e)===c)},[c,r]);if(a(()=>{u&&k?$(k):x()},[u,k]),!k)return null;const C=_.find(({type:e})=>e===k.type)||_.find(({label:e})=>"Attributes"===e)?.items?.find(({type:e})=>e===k.type)||_.find(({label:e})=>"Samplers"===e)?.items?.find(({type:e})=>e===k.type);return e.createElement($i,{ref:d,title:k.name||k.type,icons:[J(k.type)],isEdit:p,isFormDirty:g,onEdit:e=>{h("boolean"!=typeof e||e)},onSave:e=>{if(S({withAlert:!0,alertTitle:G.Update})){const t=e!==k.type?e:"";f("name",t),i(c,{...v,name:t}),h(!1),y(!1)}},onDelete:()=>{o(c,k.type),h(!1),y(!1),d.current?.closeDrawer()},onCancel:()=>{h(!1),y(!1),$(k)}},p&&C?e.createElement(Ci,null,e.createElement(Si,{isUpdate:!0,action:C,formData:v,formErrors:b,handleFormChange:(...e)=>{y(!0),f(...e)}})):e.createElement(wi,null,e.createElement(U,{conditions:k.conditions||[]}),e.createElement(Y,{title:m.ACTION_DETAILS,data:k?ei(k):[]})))},Ti=d(X)`
|
|
28
28
|
margin-top: 24px;
|
|
29
29
|
gap: 12px;
|
|
30
|
-
`,Ni=({createAction:a})=>{const{currentModal:i,setCurrentModal:n}=Z(),o=i===z.Action,{formData:l,formErrors:r,handleFormChange:s,resetFormData:c,validateForm:d}=B(),[u,p]=t(void 0),h=()=>{c(),p(void 0),n("")},g=()=>{if(!d({withAlert:!0,alertTitle:
|
|
30
|
+
`,Ni=({createAction:a})=>{const{currentModal:i,setCurrentModal:n}=Z(),o=i===z.Action,{formData:l,formErrors:r,handleFormChange:s,resetFormData:c,validateForm:d}=B(),[u,p]=t(void 0),h=()=>{c(),p(void 0),n("")},g=()=>{if(!d({withAlert:!0,alertTitle:G.Create}))return null;a(l),h()};return P({key:"Enter",active:o},()=>g()),e.createElement(Q,{isOpen:o,onClose:h,header:{title:"Add Action"},actionComponent:e.createElement(ee,{buttons:[{variant:"primary",label:"DONE",onClick:g,disabled:!u}]})},e.createElement(te,null,e.createElement(F,{title:"Select Action",description:"Select an action to modify telemetry data before it`s sent to destinations. Choose an action type and configure its details."}),e.createElement(Ti,null,e.createElement(ae,{type:ie.Warning,message:ne.DEFINED_FOR_ALL_STREAMS(m.ACTIONS)}),e.createElement(oe,{options:_,selectedOption:u,onOptionSelect:e=>{return t=e,c(),s("type",t?.type||""),void p(t);var t},autoFocus:!u?.type})),u?.type?e.createElement("div",null,e.createElement(le,{margin:"16px 0"}),e.createElement(Si,{action:u,formData:l,formErrors:r,handleFormChange:s})):null))},Ei=e=>{const{type:t,fields:{collectContainerAttributes:a,collectReplicaSetAttributes:i,collectWorkloadId:n,collectClusterId:o,labelsAttributes:l,annotationsAttributes:r,clusterAttributes:s,overwriteExistingValues:c,attributeNamesToDelete:d,renames:u,piiCategories:p,fallbackSamplingRatio:m,samplingPercentage:h,endpointsFilters:v,attributeFilters:b,servicesNameFilters:f}}=e;let x="";if(t===g.K8sAttributes&&(a&&(x+="Container Attributes, "),i&&(x+="ReplicaSet Attributes, "),n&&(x+="Workload ID, "),o&&(x+="Cluster ID, "),l?.forEach(({labelKey:e,attributeKey:t,from:a,fromSources:i},n)=>{const o=i?.length?i.join(","):a||y.Pod;x+=`Label: ${e} ${t} ${o} `,n===l.length-1&&(x+=", ")}),r?.forEach(({annotationKey:e,attributeKey:t,from:a,fromSources:i},n)=>{const o=i?.length?i.join(","):a||y.Pod;x+=`Annotation: ${e} ${t} ${o} `,n===r.length-1&&(x+=", ")})),t===g.AddClusterInfo&&(x+=`Overwrite Existing: ${c}\n`,s?.forEach(({attributeName:e,attributeStringValue:t},a)=>{x+=`${e}: ${t}`,a<s.length-1&&(x+=", ")})),t===g.DeleteAttributes&&d?.forEach((e,t)=>{x+=e,t<d.length-1&&(x+=", ")}),t===g.RenameAttributes){const e=Object.entries(u||{});e.forEach(([t,a],i)=>{x+=`${t}: ${a}`,i<e.length-1&&(x+=", ")})}return t===g.PiiMasking&&p?.forEach((e,t)=>{x+=e,t<p.length-1&&(x+=", ")}),t===g.ErrorSampler&&(x+=String(m)),t===g.ProbabilisticSampler&&(x+=String(h),x+="%"),t===g.LatencySampler&&v?.forEach(({serviceName:e,httpRoute:t,minimumLatencyThreshold:a,fallbackSamplingRatio:i},n)=>{x+=`Endpoint${v.length>1?` #${n+1}`:""}=${e}${t}\n`,x+=` Latency=${a}`,x+=` Sampling=${i}`,n<v.length-1&&(x+=", ")}),t===g.ServiceNameSampler&&f?.forEach(({serviceName:e,samplingRatio:t,fallbackSamplingRatio:a})=>{x+=`Service Name: ${e}, `,x+=`Sampling Ratio: ${t}, `,x+=`Fallback Sampling Ratio: ${a}\n`}),t===g.SpanAttributeSampler&&b?.forEach(({serviceName:e,attributeKey:t,fallbackSamplingRatio:a})=>{x+=`Service Name: ${e}, `,x+=`Attribute Key: ${t}, `,x+=`Fallback Sampling Ratio: ${a}\n`}),x},Oi=({conditions:t,id:a})=>{const{errors:i,warnings:n,disableds:o,hasLoadings:r}=l(()=>re(t),[t]),s=i.length>0?i:n.length>0?n:o.length>0?o:[];if(s.length>0)return e.createElement("div",{style:{lineHeight:1}},e.createElement(Ai,{conditions:s,id:a}));const c=r?pe.Loading:ie.Success;return e.createElement("div",{style:{lineHeight:1}},e.createElement(se,{status:c,title:c,withBorder:!0,withIcon:!0}))},Ai=({conditions:t,id:a})=>{const i=O.useTheme();return e.createElement(ce,null,de(t).map(({status:t,type:n,reason:o,message:l,lastTransitionTime:r},s)=>{"loading"!==t&&"disabled"!==t||(t=ie.Info);const c=me(t,i);return e.createElement(ue,{key:`condition-${a}-${t}-${n}-${s}`,titleIcon:c,title:n,text:l||o||"",timestamp:r},e.createElement(se,{status:t,title:o||n,withBorder:!0,withIcon:!0}))}))},Fi=({instrumentationRules:e,sources:t,actions:a,destinations:i,searchText:n,selectedCategory:o})=>{const l=n?e.filter(e=>e.type?.toLowerCase().includes(n)||e.ruleName?.toLowerCase().includes(n)):e,r=n?t.filter(e=>e.name?.toLowerCase().includes(n)||e.otelServiceName?.toLowerCase().includes(n)||e.namespace?.toLowerCase().includes(n)):t,s=n?a.filter(e=>e.type?.toLowerCase().includes(n)||e.name?.toLowerCase().includes(n)):a,c=n?i.filter(e=>e.destinationType.displayName?.toLowerCase().includes(n)||e.name?.toLowerCase().includes(n)):i,d=[{category:z.Source,label:"Sources",count:r.length,entities:[]},{category:z.Action,label:"Actions",count:s.length,entities:[]},{category:z.Destination,label:"Destinations",count:c.length,entities:[]},{category:z.InstrumentationRule,label:"Instrumentation Rules",count:l.length,entities:[]}];d.unshift({category:"all",label:"All",count:l.length+r.length+s.length+c.length,entities:[]});const u=d.filter(({count:e,category:t})=>!!e&&"all"!==t&&["all",t].includes(o)).map(e=>({...e,entities:e.category===z.InstrumentationRule?l:e.category===z.Source?r:e.category===z.Action?s:e.category===z.Destination?c:[]}));return{categories:d,searchResults:u}},Ii=[{key:"icon",title:""},{key:"name",title:m.NAME,sortable:!0},{key:"signals",title:m.MONITORS},{key:"active-status",title:m.STATUS},{key:"conditions",title:"Conditions"},{key:"type",title:m.TYPE,sortable:!0},{key:"spec",title:"Spec",sortable:!0},{key:"notes",title:m.NOTES,sortable:!0}],Mi=({maxHeight:t,maxWidth:a})=>{const i=O.useTheme(),n=he(),{actions:o,actionsLoading:r}=V(),{setDrawerType:s,setDrawerEntityId:c}=L(),d=l(()=>Fi({instrumentationRules:[],sources:[],actions:ge(o,n),destinations:[],searchText:n.searchText,selectedCategory:z.Action}).searchResults.find(({category:e})=>e===z.Action)?.entities||[],[o,n]),u=l(()=>d.map(t=>{const{hasErrors:a,hasWarnings:n,hasDisableds:o}=re(t.conditions||[]);return{status:a?ie.Error:n?ie.Warning:void 0,faded:o,onClick:()=>{s(z.Action),c(t.id)},cells:[{columnKey:"icon",component:()=>e.createElement(ye,{icon:J(t.type)})},{columnKey:"name",value:ve(t,z.Action,{prioritizeDisplayName:!0})},{columnKey:"type",value:t.type,textColor:i.text.info},{columnKey:"notes",value:t.notes,textColor:i.text.info,withTooltip:!0},{columnKey:"spec",value:Ei(t),textColor:i.text.info,withTooltip:!0},{columnKey:"signals",component:()=>e.createElement(be,{withLabels:!0,monitors:t.signals||[]})},{columnKey:"conditions",component:()=>e.createElement(Oi,{conditions:t.conditions||[],id:t.id})},{columnKey:"active-status",component:()=>e.createElement("div",{style:{lineHeight:1}},e.createElement(se,{status:t.disabled?ie.Error:ie.Success,title:t.disabled?m.DISABLED:m.ENABLED,withIcon:!0,withBorder:!0}))}]}}),[d]),{badge:p,badgeTooltip:h}=l(()=>d.length!==o.length?{badge:`${d.length}/${o.length}`,badgeTooltip:m.FILTERED_COUNT_TOOLTIP}:{badge:o.length,badgeTooltip:void 0},[d,o]);return e.createElement(fe,{$maxWidth:a},e.createElement(xe,null,e.createElement(Se,{icon:$e(z.Action),title:m.ACTIONS,badge:p,badgeTooltip:h,loading:r})),e.createElement(ke,{$maxHeight:t},e.createElement(Ce,{columns:Ii,rows:u})),!d.length&&e.createElement(we,{style:{marginTop:"2rem"}},e.createElement(De,null)))},Ri=d(X)`
|
|
31
31
|
// width: 100vw;
|
|
32
32
|
// height: 100vh;
|
|
33
33
|
gap: 64px;
|
|
@@ -101,7 +101,7 @@ import e,{useState as t,useEffect as a,forwardRef as i,useRef as n,useImperative
|
|
|
101
101
|
align-items: center;
|
|
102
102
|
justify-content: center;
|
|
103
103
|
white-space: nowrap;
|
|
104
|
-
`,Ui=({entityId:t,entityType:a,status:i,faded:n,title:o,subTitle:l,tooltip:r,label:s,icon:c,icons:d,iconSrc:u,iconSrcs:m,monitors:h,isActive:g,raw:y})=>{const v=p(),b=a===z.Source,f="boolean"==typeof g,{setDrawerType:x,setDrawerEntityId:S}=L(),{selectedSources:$,setSelectedSources:k}=Fe(),C={...$},{namespace:w,name:D,kind:T}=y;b&&!C[w]&&(C[w]=[]);const N=b?C[w].findIndex(e=>e.name===D&&e.kind===T):-1;return e.createElement(Ie,{"data-id":a===z.Source?`${t.namespace}-${t.name}-${t.kind}`:t,title:o,subTitle:l,onClick:()=>{x(a),S(t)},renderActions:()=>{const t=b&&(!y.conditions?.length||y.conditions?.some(({status:e})=>"loading"===e)),a=f&&!g?me(ie.Info,v):i?me(i,v):void 0,n=t?e.createElement(Ae,{scale:.8}):a?e.createElement(a,{size:14}):null;return s?e.createElement(Ji,{$isError:i===ie.Error},e.createElement(ue,{text:r||"Heads up! The data-flow metrics you see are calculated over 10-second intervals."},s),n):n||null},iconProps:{icon:c,icons:d,iconSrc:u,iconSrcs:m},visualProps:{status:i,faded:n||f&&!g,monitors:h||void 0},checkboxProps:{withCheckbox:b,isChecked:-1!==N,onCheckboxChange:()=>{-1===N?C[w].push(y):C[w].splice(N,1),k(C)}}})},
|
|
104
|
+
`,Ui=({entityId:t,entityType:a,status:i,faded:n,title:o,subTitle:l,tooltip:r,label:s,icon:c,icons:d,iconSrc:u,iconSrcs:m,monitors:h,isActive:g,raw:y})=>{const v=p(),b=a===z.Source,f="boolean"==typeof g,{setDrawerType:x,setDrawerEntityId:S}=L(),{selectedSources:$,setSelectedSources:k}=Fe(),C={...$},{namespace:w,name:D,kind:T}=y;b&&!C[w]&&(C[w]=[]);const N=b?C[w].findIndex(e=>e.name===D&&e.kind===T):-1;return e.createElement(Ie,{"data-id":a===z.Source?`${t.namespace}-${t.name}-${t.kind}`:t,title:o,subTitle:l,onClick:()=>{x(a),S(t)},renderActions:()=>{const t=b&&(!y.conditions?.length||y.conditions?.some(({status:e})=>"loading"===e)),a=f&&!g?me(ie.Info,v):i?me(i,v):void 0,n=t?e.createElement(Ae,{scale:.8}):a?e.createElement(a,{size:14}):null;return s?e.createElement(Ji,{$isError:i===ie.Error},e.createElement(ue,{text:r||"Heads up! The data-flow metrics you see are calculated over 10-second intervals."},s),n):n||null},iconProps:{icon:c,icons:d,iconSrc:u,iconSrcs:m},visualProps:{status:i,faded:n||f&&!g,monitors:h||void 0},checkboxProps:{withCheckbox:b,isChecked:-1!==N,onCheckboxChange:()=>{-1===N?C[w].push(y):C[w].splice(N,1),k(C)}}})},Yi=d.div`
|
|
105
105
|
height: calc(${({$height:e})=>e}px - 24px);
|
|
106
106
|
width: calc(100% - 24px);
|
|
107
107
|
padding: 12px;
|
|
@@ -109,7 +109,7 @@ import e,{useState as t,useEffect as a,forwardRef as i,useRef as n,useImperative
|
|
|
109
109
|
border: 1px dashed ${({theme:e})=>e.colors.border};
|
|
110
110
|
border-radius: 24px;
|
|
111
111
|
position: relative;
|
|
112
|
-
`,
|
|
112
|
+
`,Gi=d.div`
|
|
113
113
|
position: absolute;
|
|
114
114
|
bottom: 0;
|
|
115
115
|
left: 0;
|
|
@@ -124,7 +124,7 @@ import e,{useState as t,useEffect as a,forwardRef as i,useRef as n,useImperative
|
|
|
124
124
|
justify-content: center;
|
|
125
125
|
|
|
126
126
|
pointer-events: none;
|
|
127
|
-
`,Xi=({height:t,entityType:a,entities:i,metrics:n})=>{const{isVm:o}=Me(),r=l(()=>i.map(t=>{const i=W(t);if(!i)return null;const l=[z.Source,z.Destination].includes(a),r=[z.Destination,z.Action].includes(a),s=[z.Destination,z.Action,z.InstrumentationRule].includes(a),c=r?a==z.Destination?Re(t.exportedSignals):t.signals:void 0,d=l?n?.[`${a.toLowerCase()}s`]?.find(e=>JSON.stringify(W(e))===JSON.stringify(i)):void 0,u=s?!t.disabled:void 0,p=ve(t,a,{extended:a===z.Source,prioritizeDisplayName:a!==z.Source}),m=((e,t,a)=>{switch(e){case z.Source:return a?`${t.kind}`:`${t.namespace} • ${t.kind}`;case z.Destination:return t.destinationType.displayName;case z.Action:case z.InstrumentationRule:return t.type;default:return""}})(a,t,o),h=l?Le(d?.throughput):void 0,{priorotizedStatus:g,hasDisableds:y}=re(t.conditions||[]),{icons:v,icon:b,iconSrc:f}=((e,t)=>{switch(e){case z.Source:return{icons:qe(t.containers),icon:$e(e)};case z.Destination:return Ke(t.destinationType.type);case z.Action:return{icon:J(t.type)};case z.InstrumentationRule:return{icon:je(t.type)};default:return{icon:$e(e)}}})(a,t),x=a===z.Source?t.podsAgentInjectionStatus:void 0,S=x?(e=>{switch(e){case He.Error:return ie.Error;case He.Notice:return ie.Warning;case He.Waiting:return ie.Info}})(x.status):void 0,$=x&&S?x.message:void 0;return e.createElement(Ui,{key:JSON.stringify(i),entityType:a,entityId:i,raw:t,title:p,subTitle:m,faded:y,status:S||g,tooltip:$,label:h,icons:v,icon:b,iconSrc:f,monitors:c,isActive:u})}),[i,a,n,o]);return e.createElement(
|
|
127
|
+
`,Xi=({height:t,entityType:a,entities:i,metrics:n})=>{const{isVm:o}=Me(),r=l(()=>i.map(t=>{const i=W(t);if(!i)return null;const l=[z.Source,z.Destination].includes(a),r=[z.Destination,z.Action].includes(a),s=[z.Destination,z.Action,z.InstrumentationRule].includes(a),c=r?a==z.Destination?Re(t.exportedSignals):t.signals:void 0,d=l?n?.[`${a.toLowerCase()}s`]?.find(e=>JSON.stringify(W(e))===JSON.stringify(i)):void 0,u=s?!t.disabled:void 0,p=ve(t,a,{extended:a===z.Source,prioritizeDisplayName:a!==z.Source}),m=((e,t,a)=>{switch(e){case z.Source:return a?`${t.kind}`:`${t.namespace} • ${t.kind}`;case z.Destination:return t.destinationType.displayName;case z.Action:case z.InstrumentationRule:return t.type;default:return""}})(a,t,o),h=l?Le(d?.throughput):void 0,{priorotizedStatus:g,hasDisableds:y}=re(t.conditions||[]),{icons:v,icon:b,iconSrc:f}=((e,t)=>{switch(e){case z.Source:return{icons:qe(t.containers),icon:$e(e)};case z.Destination:return Ke(t.destinationType.type);case z.Action:return{icon:J(t.type)};case z.InstrumentationRule:return{icon:je(t.type)};default:return{icon:$e(e)}}})(a,t),x=a===z.Source?t.podsAgentInjectionStatus:void 0,S=x?(e=>{switch(e){case He.Error:return ie.Error;case He.Notice:return ie.Warning;case He.Waiting:return ie.Info}})(x.status):void 0,$=x&&S?x.message:void 0;return e.createElement(Ui,{key:JSON.stringify(i),entityType:a,entityId:i,raw:t,title:p,subTitle:m,faded:y,status:S||g,tooltip:$,label:h,icons:v,icon:b,iconSrc:f,monitors:c,isActive:u})}),[i,a,n,o]);return e.createElement(Yi,{$height:t},e.createElement(Pe,{containerHeight:t-24,elementHeight:80,elements:r}),e.createElement(Gi,{$hide:!0}))},Zi=d.div`
|
|
128
128
|
width: ${({$isVm:e})=>e?"45vw":"22vw"};
|
|
129
129
|
display: flex;
|
|
130
130
|
flex-direction: column;
|
|
@@ -135,7 +135,7 @@ import e,{useState as t,useEffect as a,forwardRef as i,useRef as n,useImperative
|
|
|
135
135
|
display: flex;
|
|
136
136
|
justify-content: space-evenly;
|
|
137
137
|
gap: 24px;
|
|
138
|
-
`,tn=({height:i,metrics:n,refetchSources:o,refetchDestinations:l,refetchActions:r,refetchInstrumentationRules:s})=>{const c=he(),{selectedStreamName:d}=We(),{containerRef:u,containerHeight:p}=_e(),{sources:m,sourcesLoading:h,destinations:g,destinationsLoading:y,actions:v,actionsLoading:b,instrumentationRules:f,instrumentationRulesLoading:x}=V(),[S,$]=t([]),[k,C]=t([]),[w,D]=t([]),[T,N]=t([]);return a(()=>{$(Je(Ue(m,d),c))},[m,d,c]),a(()=>{C(Ge(
|
|
138
|
+
`,tn=({height:i,metrics:n,refetchSources:o,refetchDestinations:l,refetchActions:r,refetchInstrumentationRules:s})=>{const c=he(),{selectedStreamName:d}=We(),{containerRef:u,containerHeight:p}=_e(),{sources:m,sourcesLoading:h,destinations:g,destinationsLoading:y,actions:v,actionsLoading:b,instrumentationRules:f,instrumentationRulesLoading:x}=V(),[S,$]=t([]),[k,C]=t([]),[w,D]=t([]),[T,N]=t([]);return a(()=>{$(Je(Ue(m,d),c))},[m,d,c]),a(()=>{C(Ye(Ge(g,d),c))},[g,d,c]),a(()=>{D(ge(v,c))},[v,c]),a(()=>{N(f)},[f]),e.createElement(en,{ref:u,$height:i},e.createElement(Qi,{entityType:z.InstrumentationRule,entities:T,unfilteredCount:f.length,loading:x,maxHeight:p,refetch:s}),e.createElement(Qi,{entityType:z.Source,entities:S,unfilteredCount:m.length,metrics:n,loading:h,maxHeight:p,refetch:o}),e.createElement(Qi,{entityType:z.Action,entities:w,unfilteredCount:v.length,loading:b,maxHeight:p,refetch:r}),e.createElement(Qi,{entityType:z.Destination,entities:k,unfilteredCount:g.length,metrics:n,loading:y,maxHeight:p,refetch:l}))},an=d.div`
|
|
139
139
|
position: relative;
|
|
140
140
|
max-width: 200px;
|
|
141
141
|
`;d.div`
|
|
@@ -153,7 +153,7 @@ import e,{useState as t,useEffect as a,forwardRef as i,useRef as n,useImperative
|
|
|
153
153
|
display: flex;
|
|
154
154
|
align-items: center;
|
|
155
155
|
overflow-x: scroll;
|
|
156
|
-
`,on=({onClose:i})=>{const n=O.useTheme(),{onClickNode:o}=Xe(),{searchText:s}=he(),{selectedStreamName:c}=We(),{sources:d,destinations:u,actions:p,instrumentationRules:m}=V(),{popupRef:h,popupOpen:g,setPopupOpen:y,popupPosition:v,handlePosition:b}=Ze();a(()=>{g||(b(0,50),y(!0))},[g]);const[f,x]=t("all"),{categories:S,searchResults:$}=l(()=>Fi({instrumentationRules:m,sources:Ue(d,c),actions:p,destinations:
|
|
156
|
+
`,on=({onClose:i})=>{const n=O.useTheme(),{onClickNode:o}=Xe(),{searchText:s}=he(),{selectedStreamName:c}=We(),{sources:d,destinations:u,actions:p,instrumentationRules:m}=V(),{popupRef:h,popupOpen:g,setPopupOpen:y,popupPosition:v,handlePosition:b}=Ze();a(()=>{g||(b(0,50),y(!0))},[g]);const[f,x]=t("all"),{categories:S,searchResults:$}=l(()=>Fi({instrumentationRules:m,sources:Ue(d,c),actions:p,destinations:Ge(u,c),searchText:s,selectedCategory:f}),[m,d,p,u,c,s,f]);return $.length?e.createElement(Qe,{ref:h,isOpen:g,top:v.top,left:v.left,maxWidth:"420px",header:e.createElement(nn,null,S.map(({category:t,label:a,count:i})=>!!i&&e.createElement(et,{key:`category-select-${t}`,label:a,badgeLabel:i,isSelected:f===t,onClick:()=>x(t)})))},$.map(({category:t,label:a,entities:l},s)=>!!l.length&&e.createElement(r,{key:`category-list-${t}`},e.createElement(tt,{style:{maxHeight:"all"!==f?"240px":"140px",padding:"12px 0"}},e.createElement(E,{size:12,family:"secondary",color:n.text.darker_grey,style:{marginLeft:"16px"}},a),l.map((a,n)=>e.createElement(et,{key:`entity-${s}-${n}`,icon:$e(t),label:ve(a,t,{extended:!0}),onClick:()=>{const e=W(a);o(null,{data:{type:t,id:e}}),i()},style:{width:"100%",justifyContent:"flex-start"},color:"transparent"}))),e.createElement(le,{thickness:s===$.length-1?0:1,length:"90%",margin:"8px auto"})))):e.createElement(Qe,{ref:h,isOpen:g,top:v.top,left:v.left},e.createElement(De,null))},ln=({preventPopup:a=!1})=>{const{searchText:i,setSearchText:o}=he(),[l,r]=t(!1),s=!!i||l,c=()=>{o(""),r(!1)},d=n(null);return at(d,c),P({key:"Escape",active:s},c),e.createElement(an,{ref:d},e.createElement(S,{placeholder:"Search",icon:Oa,value:i,onChange:e=>o(e.target.value.toLowerCase()),onFocus:()=>r(!0)}),s&&!a?e.createElement(on,{onClose:c}):null)},rn=({sources:t,title:a="Condition",value:i,onSelect:n,onDeselect:o,...r})=>{const s=l(()=>{const e=[];return t.forEach(({conditions:t})=>{t?.forEach(({type:t,reason:a})=>{e.find(e=>e.id===`${t}#${a}`)||e.push({id:`${t}#${a}`,value:`${it(t)} - ${it(a)}`})})}),e.sort((e,t)=>e.id?.localeCompare(t.id||"")||0)},[t]);return e.createElement(nt,{disabled:!s?.length,title:a,placeholder:"All",options:s,value:i,onSelect:n,onDeselect:o,...r})},sn=({sources:t,title:a="Error Message",value:i,onSelect:n,onDeselect:o,disabled:r,...s})=>{const c=l(()=>{const e=[];return t.forEach(({conditions:t})=>{de(t||[]).forEach(({status:t,message:a,reason:i})=>{t!==ie.Error||e.find(e=>e.id===a)||(a?e.find(e=>e.id===a)||e.push({id:a,value:a}):i&&(e.find(e=>e.id===i)||e.push({id:i,value:i})))})}),e},[t]);return e.createElement(nt,{disabled:r||!c?.length,title:a,placeholder:"All",options:c,value:i,onSelect:n,onDeselect:o,...s})},cn=({sources:t,title:a="Programming Language",value:i,onSelect:n,onDeselect:o,...r})=>{const s=l(()=>{const e=[];return t.forEach(({containers:t})=>{t?.forEach(({language:t})=>{e.find(e=>e.id===t)||e.push({id:t,value:ot[t]||t})})}),e.sort((e,t)=>e.id?.localeCompare(t.id||"")||0)},[t]);return e.createElement(nt,{disabled:!s?.length,title:a,placeholder:"All",options:s,value:i,onSelect:n,onDeselect:o,...r})},dn=({title:t="Monitors",value:a,onSelect:i,onDeselect:n,...o})=>{const r=l(()=>{const e=[];return lt.forEach(({id:t,value:a})=>{e.find(e=>e.id===t)||e.push({id:t,value:a})}),e},[]);return e.createElement(nt,{disabled:!r?.length,title:t,placeholder:"All",options:r,value:a,onSelect:i,onDeselect:n,...o})},un=({namespaces:t,title:a="Namespace",value:i,onSelect:n,onDeselect:o,...r})=>{const s=l(()=>{const e=[];return t?.forEach(({name:t})=>{e.find(e=>e.id===t)||e.push({id:t,value:t})}),e},[t]);return e.createElement(nt,{disabled:!s?.length,title:a,placeholder:"Select namespace",options:s,value:i,onSelect:n,onDeselect:o,...r})},pn=({sources:t,title:a="Kind",value:i,onSelect:n,onDeselect:o,...r})=>{const s=l(()=>{const e=[];return t.forEach(({kind:t})=>{e.find(e=>e.id===t)||e.push({id:t,value:t})}),e},[t]);return e.createElement(nt,{disabled:!s?.length,title:a,placeholder:"All",options:s,value:i,onSelect:n,onDeselect:o,...r})},mn=({sources:t,title:a="Agent Injection Status",value:i,onSelect:n,onDeselect:o,disabled:r,...s})=>{const c=l(()=>{const e=[];return t.forEach(({podsAgentInjectionStatus:t})=>{const{reasonEnum:a,message:i}=t||{};a?e.find(e=>e.id===a)||e.push({id:a,value:it(a)}):i&&(e.find(e=>e.id===i)||e.push({id:i,value:i}))}),e},[t]);return e.createElement(nt,{disabled:r||!c?.length,title:a,placeholder:"All",options:c,value:i,onSelect:n,onDeselect:o,...s})},hn=d.div`
|
|
157
157
|
display: flex;
|
|
158
158
|
flex-direction: column;
|
|
159
159
|
gap: 12px;
|
|
@@ -176,7 +176,7 @@ import e,{useState as t,useEffect as a,forwardRef as i,useRef as n,useImperative
|
|
|
176
176
|
max-height: calc(100vh - 220px);
|
|
177
177
|
overflow: overlay;
|
|
178
178
|
overflow-y: auto;
|
|
179
|
-
`,kn=({isOpen:a,onClose:i,dataStreamName:o,updateDataStream:r})=>{const{dataStreams:c}=We(),d=n(null),[u,p]=t(!1),{formData:m,handleFormChange:h,formErrors:g,validateForm:y,resetFormData:v,loadFormWithDrawerItem:b}=ct({name:o}),f=l(()=>{if(!a)return v();const e=c?.find(e=>e.name===o);return e?b(e):v(),e},[a,c,o]),x=s((e,t)=>{h(e,t),p(!0)},[h]);return f?e.createElement($i,{ref:d,title:f.name,icons:[Fa],hideEditTitleFromEdit:!0,isEdit:!0,isFormDirty:u,onSave:()=>{y({withAlert:!0,alertTitle:
|
|
179
|
+
`,kn=({isOpen:a,onClose:i,dataStreamName:o,updateDataStream:r})=>{const{dataStreams:c}=We(),d=n(null),[u,p]=t(!1),{formData:m,handleFormChange:h,formErrors:g,validateForm:y,resetFormData:v,loadFormWithDrawerItem:b}=ct({name:o}),f=l(()=>{if(!a)return v();const e=c?.find(e=>e.name===o);return e?b(e):v(),e},[a,c,o]),x=s((e,t)=>{h(e,t),p(!0)},[h]);return f?e.createElement($i,{ref:d,title:f.name,icons:[Fa],hideEditTitleFromEdit:!0,isEdit:!0,isFormDirty:u,onSave:()=>{y({withAlert:!0,alertTitle:G.Update})&&(r(o,m),p(!1),i())},onCancel:()=>{v(),p(!1),i()}},e.createElement($n,null,e.createElement(Sn,{formData:m,handleFormChange:x,formErrors:g}))):null},Cn=d.div`
|
|
180
180
|
position: relative;
|
|
181
181
|
`,wn=d(ce)`
|
|
182
182
|
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
@@ -237,11 +237,11 @@ import e,{useState as t,useEffect as a,forwardRef as i,useRef as n,useImperative
|
|
|
237
237
|
display: flex;
|
|
238
238
|
flex-direction: column;
|
|
239
239
|
gap: 12px;
|
|
240
|
-
`,Un=({categories:i,updateDestination:o,deleteDestination:r,testConnection:s})=>{const{destinations:c}=V(),{selectedStreamName:d}=We(),{drawerType:u,drawerEntityId:p}=L(),h=l(()=>
|
|
240
|
+
`,Un=({categories:i,updateDestination:o,deleteDestination:r,testConnection:s})=>{const{destinations:c}=V(),{selectedStreamName:d}=We(),{drawerType:u,drawerEntityId:p}=L(),h=l(()=>Ge(c,d),[c,d]),g=n(null),y=u===z.Destination,[v,b]=t(!1),[f,x]=t(!1),{formData:S,formErrors:$,handleFormChange:k,resetFormData:C,validateForm:w,loadFormWithDrawerItem:D,yamlFields:T,setYamlFields:N,dynamicFields:E,setDynamicFields:O}=St({}),A=l(()=>{if(p)return h?.find(e=>W(e)===p)},[p,h]);if(a(()=>{y&&A?(N($t(i,A)),D(A)):C()},[y,A,i]),!A)return null;const F=i.flatMap(e=>e.items).find(e=>e.type===A.destinationType.type),{icon:I,iconSrc:M}=F?Ke(F?.type):{icon:void 0,iconSrc:void 0};return e.createElement($i,{ref:g,title:A.name||A.destinationType.displayName,icons:I?[I]:void 0,iconSrcs:M?[M]:void 0,isEdit:v,isFormDirty:f,onEdit:e=>{b("boolean"!=typeof e||e)},onSave:async e=>{if(w({withAlert:!0,alertTitle:G.Update})){const t=e!==A.destinationType.displayName?e:"";k("name",t),o(p,{...S,name:t}),b(!1),x(!1)}},onDelete:async()=>{r(p),b(!1),x(!1),g.current?.closeDrawer()},onCancel:()=>{b(!1),x(!1),D(A)},isLastItem:1===h.length},v?e.createElement(_n,null,e.createElement(Wn,{isUpdate:!0,categoryItem:F,formData:S,formErrors:$,handleFormChange:(...e)=>{x(!0),k(...e)},dynamicFields:E,setDynamicFields:(...e)=>{x(!0),O(...e)},validateForm:w,testConnection:s})):e.createElement(Jn,null,A.conditions?.length?e.createElement(U,{conditions:A.conditions}):null,e.createElement(Y,{title:m.DESTINATION_DETAILS,data:A?Pn(A,T):[]})))},Yn=d.div`
|
|
241
241
|
display: flex;
|
|
242
242
|
flex-direction: column;
|
|
243
243
|
gap: 12px;
|
|
244
|
-
`,
|
|
244
|
+
`,Gn=({items:t,onSelectNew:a,onSelectConfigured:i,isLoadingForDestinationIds:n})=>{const{configuredDestinationsUpdateOnly:o}=dt();return t.map(t=>{const l=t.name===Ct.EXISTS.TITLE;return e.createElement(Yn,{key:`category-${t.name}`},e.createElement(F,{size:"small",icon:t.icon,title:kt(t.name),description:t.description}),t.items.map(r=>{const s=`select-${t.name.replaceAll(" ","")}-destination-${r.type}`,c=Object.keys(r.supportedSignals).filter(e=>r.supportedSignals[e].supported),{icon:d,iconSrc:u}=Ke(r.type),p=r.selected||o.some(e=>e.id===r.id),m=!!n.find(e=>e===r.id),h=l?()=>i(r.id):()=>a(r);return e.createElement(Ie,{key:s,"data-id":s,title:r.displayName,hoverText:j.SELECT,onClick:h,iconProps:{icon:d,iconSrc:u},visualProps:{monitors:c,monitorsWithLabels:!0},checkboxProps:{withCheckbox:l,isChecked:p,isLoading:m,onCheckboxChange:()=>i(r.id)}})}))})},Xn=d.div`
|
|
245
245
|
display: flex;
|
|
246
246
|
flex-direction: column;
|
|
247
247
|
gap: 24px;
|
|
@@ -265,7 +265,7 @@ import e,{useState as t,useEffect as a,forwardRef as i,useRef as n,useImperative
|
|
|
265
265
|
}
|
|
266
266
|
`,to=d(Xn)`
|
|
267
267
|
margin-top: 80px;
|
|
268
|
-
`,{MANAGED:ao,SELF_HOSTED:io,DETECTED:no,EXISTS:oo}=Ct,lo=[{value:"All types",id:"all"},{value:ao.TITLE,id:ao.TITLE},{value:io.TITLE,id:io.TITLE},{value:no.TITLE,id:no.TITLE},{value:oo.TITLE,id:oo.TITLE}],ro=lo[0],so=[xt.Logs,xt.Metrics,xt.Traces],co=(e,t,a)=>e.map(e=>{const{type:i,displayName:n}=e.destinationType,o=e.dataStreamNames?.includes(t),l=a.has(e.id);return{id:e.id,type:i,displayName:n,selected:o||l,fields:[],testConnectionSupported:!1,supportedSignals:{[xt.Logs]:{supported:e.exportedSignals.logs},[xt.Metrics]:{supported:e.exportedSignals.metrics},[xt.Traces]:{supported:e.exportedSignals.traces}}}}),uo=({hidden:a,categories:i,potentialDestinations:n,onSelectNew:o,onSelectConfigured:r,isLoadingForDestinationIds:s})=>{const{destinations:c}=V(),{selectedStreamName:d}=We(),{configuredDestinations:u,configuredDestinationsUpdateOnly:p}=dt(),[m,h]=t(""),[g,y]=t(ro),[v,b]=t(so),f=l(()=>{const e=wt(i);return e.unshift({name:oo.TITLE,description:oo.DESCRIPTION,icon:Ia,items:co(c,d,new Set(u.concat(p).map(e=>e.id)))}),e.unshift({name:no.TITLE,description:no.DESCRIPTION,icon:Ma,items:n}),e.map(e=>{const t=e.items.filter(t=>{const a=!m||t.displayName.toLowerCase().includes(m.toLowerCase()),i="all"===g.id||g.id===e.name,n=v.some(e=>t.supportedSignals[e.toLowerCase()]?.supported);return a&&i&&n});return{...e,items:t}}).filter(({items:e})=>!!e.length)},[i,n,c,m,g,v,d,u,p]);return a?null:e.createElement(Xn,null,e.createElement(F,{title:"Choose destination",description:"Add backend destination you want to connect with Odigos."}),e.createElement(Zn,null,e.createElement(Qn,null,e.createElement(S,{placeholder:"Search...",icon:Oa,value:m,onChange:({target:{value:e}})=>h(e)})),e.createElement(Qn,null,e.createElement(nt,{options:lo,value:g,onSelect:y,onDeselect:()=>{}})),e.createElement(M,{title:"",selectedSignals:v,setSelectedSignals:b})),e.createElement(le,null),f.length?e.createElement(eo,null,e.createElement(
|
|
268
|
+
`,{MANAGED:ao,SELF_HOSTED:io,DETECTED:no,EXISTS:oo}=Ct,lo=[{value:"All types",id:"all"},{value:ao.TITLE,id:ao.TITLE},{value:io.TITLE,id:io.TITLE},{value:no.TITLE,id:no.TITLE},{value:oo.TITLE,id:oo.TITLE}],ro=lo[0],so=[xt.Logs,xt.Metrics,xt.Traces],co=(e,t,a)=>e.map(e=>{const{type:i,displayName:n}=e.destinationType,o=e.dataStreamNames?.includes(t),l=a.has(e.id);return{id:e.id,type:i,displayName:n,selected:o||l,fields:[],testConnectionSupported:!1,supportedSignals:{[xt.Logs]:{supported:e.exportedSignals.logs},[xt.Metrics]:{supported:e.exportedSignals.metrics},[xt.Traces]:{supported:e.exportedSignals.traces}}}}),uo=({hidden:a,categories:i,potentialDestinations:n,onSelectNew:o,onSelectConfigured:r,isLoadingForDestinationIds:s})=>{const{destinations:c}=V(),{selectedStreamName:d}=We(),{configuredDestinations:u,configuredDestinationsUpdateOnly:p}=dt(),[m,h]=t(""),[g,y]=t(ro),[v,b]=t(so),f=l(()=>{const e=wt(i);return e.unshift({name:oo.TITLE,description:oo.DESCRIPTION,icon:Ia,items:co(c,d,new Set(u.concat(p).map(e=>e.id)))}),e.unshift({name:no.TITLE,description:no.DESCRIPTION,icon:Ma,items:n}),e.map(e=>{const t=e.items.filter(t=>{const a=!m||t.displayName.toLowerCase().includes(m.toLowerCase()),i="all"===g.id||g.id===e.name,n=v.some(e=>t.supportedSignals[e.toLowerCase()]?.supported);return a&&i&&n});return{...e,items:t}}).filter(({items:e})=>!!e.length)},[i,n,c,m,g,v,d,u,p]);return a?null:e.createElement(Xn,null,e.createElement(F,{title:"Choose destination",description:"Add backend destination you want to connect with Odigos."}),e.createElement(Zn,null,e.createElement(Qn,null,e.createElement(S,{placeholder:"Search...",icon:Oa,value:m,onChange:({target:{value:e}})=>h(e)})),e.createElement(Qn,null,e.createElement(nt,{options:lo,value:g,onSelect:y,onDeselect:()=>{}})),e.createElement(M,{title:"",selectedSignals:v,setSelectedSignals:b})),e.createElement(le,null),f.length?e.createElement(eo,null,e.createElement(Gn,{items:f,onSelectNew:e=>o(e,v),onSelectConfigured:r,isLoadingForDestinationIds:s})):e.createElement(to,null,e.createElement(De,{title:"No destinations found"})))},po=d.div`
|
|
269
269
|
display: flex;
|
|
270
270
|
`,mo=d.div`
|
|
271
271
|
border-right: 1px solid ${({theme:e})=>e.colors.border};
|
|
@@ -274,7 +274,7 @@ import e,{useState as t,useEffect as a,forwardRef as i,useRef as n,useImperative
|
|
|
274
274
|
@media (max-width: 1050px) {
|
|
275
275
|
display: none;
|
|
276
276
|
}
|
|
277
|
-
`,ho=({isOnboarding:a,categories:i,potentialDestinations:n,createDestination:o,updateDestination:l,deleteDestination:r,testConnection:s})=>{const{destinations:c}=V(),{selectedStreamName:d}=We(),{currentModal:u,setCurrentModal:p}=Z(),{addConfiguredDestination:h,addConfiguredDestinationUpdateOnly:g,removeConfiguredDestinationUpdateOnly:y,configuredDestinationsUpdateOnly:v}=dt(),b=u===z.Destination,[f,x]=t(void 0),{formData:S,formErrors:$,handleFormChange:k,resetFormData:C,validateForm:w,setYamlFields:D,dynamicFields:T,setDynamicFields:N,loadFormWithDrawerItem:E}=St({supportedSignals:f?.supportedSignals,preLoadedFields:f?.fields}),[O,A]=t([]),F=e=>{const t={};return e||T.forEach(e=>t[e.name]=e.value),{id:e?.id||"",name:e?.name||S.name,disabled:e?.disabled||S.disabled,dataStreamNames:e?.dataStreamNames||[],conditions:e?.conditions||[],exportedSignals:e?.exportedSignals||S.exportedSignals,fields:e?.fields||JSON.stringify(t),destinationType:e?.destinationType||{type:f.type,displayName:f.displayName,supportedSignals:{logs:{supported:!1},metrics:{supported:!1},traces:{supported:!1}}}}},I=async e=>{if(a&&!e){const e=F();h(e)}else if(a&&e){const t=F(e);v.some(t=>t.id===e.id)?y(e):g(t)}else if(a||e){if(!a&&e){const t=F(e),a=t.dataStreamNames.some(e=>e===d);A(t=>[...t,e.id]),a?await r(e.id):await l(e.id,E(t)),A(t=>t.filter(t=>t!==e.id))}}else o(S)},M=()=>{C(),x(void 0),p("")},R=()=>{C(),x(void 0)},L=async()=>{if(f){if(!w({withAlert:!a,alertTitle:
|
|
277
|
+
`,ho=({isOnboarding:a,categories:i,potentialDestinations:n,createDestination:o,updateDestination:l,deleteDestination:r,testConnection:s})=>{const{destinations:c}=V(),{selectedStreamName:d}=We(),{currentModal:u,setCurrentModal:p}=Z(),{addConfiguredDestination:h,addConfiguredDestinationUpdateOnly:g,removeConfiguredDestinationUpdateOnly:y,configuredDestinationsUpdateOnly:v}=dt(),b=u===z.Destination,[f,x]=t(void 0),{formData:S,formErrors:$,handleFormChange:k,resetFormData:C,validateForm:w,setYamlFields:D,dynamicFields:T,setDynamicFields:N,loadFormWithDrawerItem:E}=St({supportedSignals:f?.supportedSignals,preLoadedFields:f?.fields}),[O,A]=t([]),F=e=>{const t={};return e||T.forEach(e=>t[e.name]=e.value),{id:e?.id||"",name:e?.name||S.name,disabled:e?.disabled||S.disabled,dataStreamNames:e?.dataStreamNames||[],conditions:e?.conditions||[],exportedSignals:e?.exportedSignals||S.exportedSignals,fields:e?.fields||JSON.stringify(t),destinationType:e?.destinationType||{type:f.type,displayName:f.displayName,supportedSignals:{logs:{supported:!1},metrics:{supported:!1},traces:{supported:!1}}}}},I=async e=>{if(a&&!e){const e=F();h(e)}else if(a&&e){const t=F(e);v.some(t=>t.id===e.id)?y(e):g(t)}else if(a||e){if(!a&&e){const t=F(e),a=t.dataStreamNames.some(e=>e===d);A(t=>[...t,e.id]),a?await r(e.id):await l(e.id,E(t)),A(t=>t.filter(t=>t!==e.id))}}else o(S)},M=()=>{C(),x(void 0),p("")},R=()=>{C(),x(void 0)},L=async()=>{if(f){if(!w({withAlert:!a,alertTitle:G.Create}))return null;I()}M()};return P({key:"Enter",active:b},()=>L()),e.createElement(Q,{isOpen:b,onClose:M,header:{title:m.ADD_DESTINATION},actionComponent:e.createElement(ee,{buttons:(()=>{const t=[{label:"DONE",variant:"primary",onClick:L}];return f&&t.unshift({label:"BACK",icon:()=>e.createElement(Ra,{rotate:-90}),variant:"secondary",onClick:R}),t})()})},e.createElement(po,null,e.createElement(mo,null,e.createElement(Dt,{currentStep:f?2:1,data:[{stepNumber:1,title:m.DESTINATIONS},{stepNumber:2,title:m.CONNECTION}]})),e.createElement(te,{style:{margin:"32px 24px 12px 24px"}},e.createElement(uo,{hidden:void 0!==f,categories:i,potentialDestinations:n,onSelectNew:(e,t)=>{C(),k("type",e?.type||""),k("currentStreamName",d);const a={logs:!1,metrics:!1,traces:!1};t.filter(t=>e.supportedSignals[t].supported).forEach(e=>a[e]=!0),k("exportedSignals",a),D(e?.fields||[]),x(e)},onSelectConfigured:e=>{const t=c.find(t=>t.id===e);t&&I(t)},isLoadingForDestinationIds:O}),f&&e.createElement(Wn,{categoryItem:f,formData:S,formErrors:$,handleFormChange:k,dynamicFields:T,setDynamicFields:N,validateForm:w,testConnection:s}))))},go=d.div`
|
|
278
278
|
display: flex;
|
|
279
279
|
flex-direction: column;
|
|
280
280
|
align-items: center;
|
|
@@ -292,7 +292,7 @@ import e,{useState as t,useEffect as a,forwardRef as i,useRef as n,useImperative
|
|
|
292
292
|
padding: 32px;
|
|
293
293
|
border-radius: 16px;
|
|
294
294
|
border-style: dashed !important;
|
|
295
|
-
`,fo=({isSourcesListEmpty:t,goToSources:a,categories:i,potentialDestinations:n,testConnection:o,onClickSummary:l})=>{const r=O.useTheme(),{setCurrentModal:s}=Z(),{configuredDestinations:c,configuredDestinationsUpdateOnly:d}=dt();return e.createElement(e.Fragment,null,e.createElement(te,{$isNotModal:!0},e.createElement(X,{$gap:12},e.createElement(X,{$gap:24},l&&e.createElement(gt,{onClick:l}),e.createElement(F,{title:m.ADD_DESTINATIONS,badgeLabel:c.length+d.length,description:m.ADD_DESTINATION_DESCRIPTION}),t&&e.createElement(ae,{type:ie.Warning,message:m.NO_SOURCES_GO_BACK,action:{label:m.SELECT_SOURCES,onClick:a}}),e.createElement(bo,{variant:"secondary",onClick:()=>s(z.Destination)},e.createElement(Na,null),e.createElement(E,{color:r.colors.secondary,size:14,decoration:"underline",family:"secondary"},m.ADD_DESTINATION))),e.createElement(yo,{categories:i,withDelete:!0}))),e.createElement(ho,{isOnboarding:!0,categories:i,potentialDestinations:n,updateDestination:async()=>{},createDestination:async()=>{},deleteDestination:async()=>{},testConnection:o}))},xo=[{key:"icon",title:""},{key:"name",title:m.NAME,sortable:!0},{key:"type",title:m.TYPE,sortable:!0},{key:"signals",title:m.MONITORS},{key:"active-status",title:m.STATUS},{key:"conditions",title:"Conditions"},{key:"throughput",title:"Throughput",sortable:!0}],So=({metrics:t,maxHeight:a,maxWidth:i})=>{const n=O.useTheme(),o=he(),{selectedStreamName:r}=We(),{setDrawerType:s,setDrawerEntityId:c}=L(),{destinations:d,destinationsLoading:u}=V(),p=l(()=>
|
|
295
|
+
`,fo=({isSourcesListEmpty:t,goToSources:a,categories:i,potentialDestinations:n,testConnection:o,onClickSummary:l})=>{const r=O.useTheme(),{setCurrentModal:s}=Z(),{configuredDestinations:c,configuredDestinationsUpdateOnly:d}=dt();return e.createElement(e.Fragment,null,e.createElement(te,{$isNotModal:!0},e.createElement(X,{$gap:12},e.createElement(X,{$gap:24},l&&e.createElement(gt,{onClick:l}),e.createElement(F,{title:m.ADD_DESTINATIONS,badgeLabel:c.length+d.length,description:m.ADD_DESTINATION_DESCRIPTION}),t&&e.createElement(ae,{type:ie.Warning,message:m.NO_SOURCES_GO_BACK,action:{label:m.SELECT_SOURCES,onClick:a}}),e.createElement(bo,{variant:"secondary",onClick:()=>s(z.Destination)},e.createElement(Na,null),e.createElement(E,{color:r.colors.secondary,size:14,decoration:"underline",family:"secondary"},m.ADD_DESTINATION))),e.createElement(yo,{categories:i,withDelete:!0}))),e.createElement(ho,{isOnboarding:!0,categories:i,potentialDestinations:n,updateDestination:async()=>{},createDestination:async()=>{},deleteDestination:async()=>{},testConnection:o}))},xo=[{key:"icon",title:""},{key:"name",title:m.NAME,sortable:!0},{key:"type",title:m.TYPE,sortable:!0},{key:"signals",title:m.MONITORS},{key:"active-status",title:m.STATUS},{key:"conditions",title:"Conditions"},{key:"throughput",title:"Throughput",sortable:!0}],So=({metrics:t,maxHeight:a,maxWidth:i})=>{const n=O.useTheme(),o=he(),{selectedStreamName:r}=We(),{setDrawerType:s,setDrawerEntityId:c}=L(),{destinations:d,destinationsLoading:u}=V(),p=l(()=>Ge(d,r),[d,r]),h=l(()=>Fi({instrumentationRules:[],sources:[],actions:[],destinations:Ye(p,o),searchText:o.searchText,selectedCategory:z.Destination}).searchResults.find(({category:e})=>e===z.Destination)?.entities||[],[p,o]),g=l(()=>h.map(a=>{const{hasErrors:i,hasWarnings:o,hasDisableds:l}=re(a.conditions||[]),{icon:r,iconSrc:d}=Ke(a.destinationType.type);return{status:i?ie.Error:o?ie.Warning:void 0,faded:l,onClick:()=>{s(z.Destination),c(a.id)},cells:[{columnKey:"icon",component:()=>e.createElement(ye,{icon:r,src:d})},{columnKey:"name",value:ve(a,z.Destination,{prioritizeDisplayName:!0})},{columnKey:"type",value:a.destinationType.type,textColor:n.text.info},{columnKey:"throughput",value:Le(Nt(t,z.Destination,a.id).throughput),textColor:n.text.info},{columnKey:"signals",component:()=>e.createElement(be,{withLabels:!0,monitors:Re(a.exportedSignals)})},{columnKey:"conditions",component:()=>a.conditions?.length?e.createElement(Oi,{conditions:a.conditions,id:a.id}):null},{columnKey:"active-status",component:()=>e.createElement("div",{style:{lineHeight:1}},e.createElement(se,{status:a.disabled?ie.Error:ie.Success,title:a.disabled?m.DISABLED:m.ENABLED,withIcon:!0,withBorder:!0}))}]}}),[h,t]),{badge:y,badgeTooltip:v}=l(()=>h.length!==p.length?{badge:`${h.length}/${p.length}`,badgeTooltip:m.FILTERED_COUNT_TOOLTIP}:{badge:p.length,badgeTooltip:void 0},[h,p]);return e.createElement(fe,{$maxWidth:i},e.createElement(xe,null,e.createElement(Se,{icon:$e(z.Destination),title:m.DESTINATIONS,badge:y,badgeTooltip:v,loading:u})),e.createElement(ke,{$maxHeight:a},e.createElement(Ce,{columns:xo,rows:g})),!h.length&&e.createElement(we,{style:{marginTop:"2rem"}},e.createElement(De,null)))},$o=e=>{const{type:t,ruleName:a,notes:i,disabled:n,profileName:o,payloadCollection:l,codeAttributes:r,headersCollection:s,customInstrumentations:c}=e,d=[{title:m.TYPE,value:t},{type:h.ActiveStatus,title:m.STATUS,value:String(!n)},{title:m.NAME,value:a},{title:m.NOTES,value:i},{title:m.MANAGED_BY_PROFILE,value:o},{type:h.Divider}];if(l){const e=Object.entries(l).filter(([e,t])=>t).map(([e,t])=>e).join(", ");e&&d.push({title:"Collect",value:e})}if(r){const e=Object.entries(r).filter(([e,t])=>t).map(([e,t])=>e).join(", ");e&&d.push({title:"Collect",value:e})}if(s){const e=(s[Et.HeaderKeys]||[]).filter(e=>e).join(", ");e&&d.push({title:"Collect",value:e})}if(c){const e=(c[At.Java]||[]).map(e=>new Ot(e.className,e.methodName)).map(e=>`• ${e.toString()}`).join("\r\n");e&&d.push({title:m.JAVA_CUSTOM_PROBES,value:e});const t=(c[At.Golang]||[]).map(e=>new Ft(e.packageName,e.functionName,e.receiverName,e.receiverMethodName)).map(e=>`• ${e.toString()}`).join("\r\n");t&&d.push({title:m.GOLANG_CUSTOM_PROBES,value:t})}return d},ko=d.div`
|
|
296
296
|
display: flex;
|
|
297
297
|
flex-direction: column;
|
|
298
298
|
gap: 12px;
|
|
@@ -329,7 +329,7 @@ import e,{useState as t,useEffect as a,forwardRef as i,useRef as n,useImperative
|
|
|
329
329
|
display: flex;
|
|
330
330
|
flex-direction: column;
|
|
331
331
|
gap: 12px;
|
|
332
|
-
`,Po=({updateInstrumentationRule:i,deleteInstrumentationRule:o})=>{const{instrumentationRules:r}=V(),{addNotification:s}=jt(),{drawerType:c,drawerEntityId:d}=L(),u=n(null),p=c===z.InstrumentationRule,[m,h]=t(!1),[g,y]=t(!1),{formData:v,formErrors:b,handleFormChange:f,resetFormData:x,validateForm:S,loadFormWithDrawerItem:$}=Kt(),k=l(()=>{if(d)return r?.find(e=>W(e)===d)},[d,r]);if(a(()=>{p&&k?$(k):x()},[p,k]),!k)return null;const C=qt.find(({type:e})=>e===k.type);return e.createElement($i,{ref:u,title:k.ruleName||k.type,icons:[je(k.type)],isEdit:m,isFormDirty:g,onEdit:e=>{k.mutable||!e&&void 0!==e?h("boolean"!=typeof e||e):s({type:ie.Warning,title:ne.FORBIDDEN,message:ne.CANNOT_EDIT_RULE,crdType:z.InstrumentationRule,target:d,hideFromHistory:!0})},onSave:e=>{if(S()){const t=e!==k.type?e:"";f("ruleName",t),i(d,{...v,ruleName:t}),h(!1),y(!1)}},onDelete:()=>{k.mutable?(o(d),h(!1),y(!1),u.current?.closeDrawer()):s({type:ie.Warning,title:ne.FORBIDDEN,message:ne.CANNOT_DELETE_RULE,crdType:z.InstrumentationRule,target:d,hideFromHistory:!0})},onCancel:()=>{h(!1),y(!1),$(k)}},m&&C?e.createElement(Ro,null,e.createElement(Mo,{isUpdate:!0,rule:C,formData:v,formErrors:b,handleFormChange:(...e)=>{y(!0),f(...e)}})):e.createElement(Lo,null,e.createElement(U,{conditions:k.conditions||[]}),e.createElement(
|
|
332
|
+
`,Po=({updateInstrumentationRule:i,deleteInstrumentationRule:o})=>{const{instrumentationRules:r}=V(),{addNotification:s}=jt(),{drawerType:c,drawerEntityId:d}=L(),u=n(null),p=c===z.InstrumentationRule,[m,h]=t(!1),[g,y]=t(!1),{formData:v,formErrors:b,handleFormChange:f,resetFormData:x,validateForm:S,loadFormWithDrawerItem:$}=Kt(),k=l(()=>{if(d)return r?.find(e=>W(e)===d)},[d,r]);if(a(()=>{p&&k?$(k):x()},[p,k]),!k)return null;const C=qt.find(({type:e})=>e===k.type);return e.createElement($i,{ref:u,title:k.ruleName||k.type,icons:[je(k.type)],isEdit:m,isFormDirty:g,onEdit:e=>{k.mutable||!e&&void 0!==e?h("boolean"!=typeof e||e):s({type:ie.Warning,title:ne.FORBIDDEN,message:ne.CANNOT_EDIT_RULE,crdType:z.InstrumentationRule,target:d,hideFromHistory:!0})},onSave:e=>{if(S()){const t=e!==k.type?e:"";f("ruleName",t),i(d,{...v,ruleName:t}),h(!1),y(!1)}},onDelete:()=>{k.mutable?(o(d),h(!1),y(!1),u.current?.closeDrawer()):s({type:ie.Warning,title:ne.FORBIDDEN,message:ne.CANNOT_DELETE_RULE,crdType:z.InstrumentationRule,target:d,hideFromHistory:!0})},onCancel:()=>{h(!1),y(!1),$(k)}},m&&C?e.createElement(Ro,null,e.createElement(Mo,{isUpdate:!0,rule:C,formData:v,formErrors:b,handleFormChange:(...e)=>{y(!0),f(...e)}})):e.createElement(Lo,null,e.createElement(U,{conditions:k.conditions||[]}),e.createElement(Y,{title:"Instrumentation Rule Details",data:k?$o(k):[]})))},jo=d(X)`
|
|
333
333
|
margin-top: 24px;
|
|
334
334
|
gap: 12px;
|
|
335
335
|
`,Ko=qt,qo=({createInstrumentationRule:a})=>{const{tier:i}=Me(),n=i===Ht.Onprem,{currentModal:o,setCurrentModal:l}=Z(),r=o===z.InstrumentationRule,{formData:s,formErrors:c,handleFormChange:d,resetFormData:u,validateForm:p}=Kt(),[h,g]=t(void 0),y=()=>{u(),g(void 0),l("")},v=()=>{if(!p())return null;a(s),y()};return P({key:"Enter",active:r},()=>v()),e.createElement(Q,{isOpen:r,onClose:y,header:{title:"Add Instrumentation Rule"},actionComponent:e.createElement(ee,{buttons:[{variant:"primary",label:"DONE",onClick:v,disabled:!n||!h,tooltip:n?"":ne.ENTERPRISE_ONLY("Instrumentation Rules")}]})},e.createElement(te,null,e.createElement(F,{title:"Select Instrumentation Rule",description:"Define how telemetry is recorded from your application. Choose a rule type and configure the details."}),e.createElement(jo,null,n?e.createElement(ae,{type:ie.Warning,message:ne.DEFINED_FOR_ALL_STREAMS(m.INSTRUMENTATION_RULES)}):e.createElement(ae,{type:ie.Default,message:ne.ENTERPRISE_ONLY(m.INSTRUMENTATION_RULES)}),e.createElement(oe,{options:Ko,selectedOption:h,onOptionSelect:e=>{return t=e,u(),void g(t);var t},autoFocus:!h?.type})),h?.type?e.createElement("div",null,e.createElement(le,{margin:"16px 0"}),e.createElement(Mo,{rule:h,formData:s,formErrors:c,handleFormChange:d})):null))},Ho=e=>{const{payloadCollection:t,codeAttributes:a,customInstrumentations:i}=e;let n="";return t&&(n+=Object.entries(t).filter(([e,t])=>!!t).map(([e,t])=>e).join(", ")),a&&(n+=Object.entries(a).filter(([e,t])=>!!t).map(([e,t])=>e).join(", ")),i&&Object.values(At).forEach(e=>{const t=(i[e]||[]).filter(e=>e).join(", ");t&&(n+=n?`, ${t}`:t)}),n},zo=[{key:"icon",title:""},{key:"name",title:m.NAME,sortable:!0},{key:"profile",title:m.MANAGED_BY_PROFILE,sortable:!0},{key:"active-status",title:m.STATUS},{key:"conditions",title:"Conditions"},{key:"source-count",title:"Applicable Source"},{key:"type",title:m.TYPE,sortable:!0},{key:"spec",title:"Spec",sortable:!0},{key:"notes",title:m.NOTES,sortable:!0}],Vo=({maxHeight:t,maxWidth:a})=>{const i=p(),n=he(),{setDrawerType:o,setDrawerEntityId:r}=L(),{instrumentationRules:s,instrumentationRulesLoading:c}=V(),d=l(()=>Fi({instrumentationRules:s,sources:[],actions:[],destinations:[],searchText:n.searchText,selectedCategory:z.InstrumentationRule}).searchResults.find(({category:e})=>e===z.InstrumentationRule)?.entities||[],[s,n]),u=l(()=>d.map(t=>{const{hasErrors:a,hasWarnings:n,hasDisableds:l}=re(t.conditions||[]);return{status:a?ie.Error:n?ie.Warning:void 0,faded:l,onClick:()=>{o(z.InstrumentationRule),r(t.ruleId)},cells:[{columnKey:"icon",component:()=>e.createElement(ye,{icon:je(t.type)})},{columnKey:"name",value:ve(t,z.InstrumentationRule,{prioritizeDisplayName:!0})},{columnKey:"type",value:t.type,textColor:i.text.info},{columnKey:"profile",value:t.profileName,textColor:i.text.info},{columnKey:"notes",value:t.notes,textColor:i.text.info,withTooltip:!0},{columnKey:"spec",value:Ho(t),textColor:i.text.info,withTooltip:!0},{columnKey:"conditions",component:()=>e.createElement(Oi,{conditions:t.conditions||[],id:t.ruleId})},{columnKey:"active-status",component:()=>e.createElement("div",{style:{lineHeight:1}},e.createElement(se,{status:t.disabled?ie.Error:ie.Success,title:t.disabled?m.DISABLED:m.ENABLED,withIcon:!0,withBorder:!0}))},{columnKey:"source-count",component:()=>e.createElement("div",{style:{lineHeight:1}},e.createElement(se,{status:ie.Info,title:"all sources",withBorder:!0}))}]}}),[d]),{badge:h,badgeTooltip:g}=l(()=>d.length!==s.length?{badge:`${d.length}/${s.length}`,badgeTooltip:m.FILTERED_COUNT_TOOLTIP}:{badge:s.length,badgeTooltip:void 0},[d,s]);return e.createElement(fe,{$maxWidth:a},e.createElement(xe,null,e.createElement(Se,{icon:$e(z.Action),title:m.INSTRUMENTATION_RULES,badge:h,badgeTooltip:g,loading:c})),e.createElement(ke,{$maxHeight:t},e.createElement(Ce,{columns:zo,rows:u})),!d.length&&e.createElement(we,{style:{marginTop:"2rem"}},e.createElement(De,null)))},Bo=d.div`
|
|
@@ -356,7 +356,7 @@ import e,{useState as t,useEffect as a,forwardRef as i,useRef as n,useImperative
|
|
|
356
356
|
gap: 12px;
|
|
357
357
|
max-height: 400px;
|
|
358
358
|
overflow-y: auto;
|
|
359
|
-
`,
|
|
359
|
+
`,Yo=d.div`
|
|
360
360
|
position: absolute;
|
|
361
361
|
bottom: 0;
|
|
362
362
|
left: 0;
|
|
@@ -365,13 +365,13 @@ import e,{useState as t,useEffect as a,forwardRef as i,useRef as n,useImperative
|
|
|
365
365
|
border-radius: 0 0 24px 24px;
|
|
366
366
|
background: ${({theme:e})=>`linear-gradient(to top, ${e.colors.dropdown_bg}, transparent)`};
|
|
367
367
|
pointer-events: none;
|
|
368
|
-
`,
|
|
368
|
+
`,Go=d(E)`
|
|
369
369
|
background-color: ${({theme:e})=>e.colors.orange_soft};
|
|
370
370
|
color: ${({theme:e})=>e.text.primary};
|
|
371
371
|
border-radius: 32px;
|
|
372
372
|
width: fit-content;
|
|
373
373
|
padding: 2px 8px;
|
|
374
|
-
`,Xo=()=>{const t=O.useTheme(),{notifications:a,markAsSeen:i}=jt(),n=a.filter(({hideFromHistory:e})=>!e),o=n.filter(({seen:e})=>!e),l=o.length,{popupRef:r,popupOpen:s,setPopupOpen:c,popupPosition:d,handlePosition:u}=Ze({defaultClientHeight:420,defaultClientwidth:400,onClickOutside:()=>{l&&o.forEach(({id:e})=>i(e))}});return e.createElement(_o,null,e.createElement(pt,{onClick:()=>{u(0,0),c(e=>!e)},tooltip:"Notifications",withPing:!!l,pingColor:t.colors.orange_og},e.createElement(Pa,{size:18})),e.createElement(Qe,{ref:r,isOpen:s,right:d.left,maxWidth:"400px",header:e.createElement(Jo,null,e.createElement(E,{size:20},"Notifications"),!!l&&e.createElement(
|
|
374
|
+
`,Xo=()=>{const t=O.useTheme(),{notifications:a,markAsSeen:i}=jt(),n=a.filter(({hideFromHistory:e})=>!e),o=n.filter(({seen:e})=>!e),l=o.length,{popupRef:r,popupOpen:s,setPopupOpen:c,popupPosition:d,handlePosition:u}=Ze({defaultClientHeight:420,defaultClientwidth:400,onClickOutside:()=>{l&&o.forEach(({id:e})=>i(e))}});return e.createElement(_o,null,e.createElement(pt,{onClick:()=>{u(0,0),c(e=>!e)},tooltip:"Notifications",withPing:!!l,pingColor:t.colors.orange_og},e.createElement(Pa,{size:18})),e.createElement(Qe,{ref:r,isOpen:s,right:d.left,maxWidth:"400px",header:e.createElement(Jo,null,e.createElement(E,{size:20},"Notifications"),!!l&&e.createElement(Go,{size:12,family:"secondary"},l," new"))},e.createElement(Uo,null,n.length?n.map(t=>e.createElement(il,{key:`notification-${t.id}`,...t,onClick:()=>c(!1)})):e.createElement(De,{title:"No notifications",subTitle:""})),e.createElement(Yo,null)))},Zo=d.div`
|
|
375
375
|
display: flex;
|
|
376
376
|
align-items: flex-start;
|
|
377
377
|
gap: 12px;
|
|
@@ -401,11 +401,11 @@ import e,{useState as t,useEffect as a,forwardRef as i,useRef as n,useImperative
|
|
|
401
401
|
display: flex;
|
|
402
402
|
align-items: center;
|
|
403
403
|
gap: 6px;
|
|
404
|
-
`,il=({id:t,seen:a,type:i,title:n,message:o,time:l,crdType:r,target:s,onClick:c})=>{const d=O.useTheme(),{formatTimeAgo:u}=Vt(),{onClickNotification:p}=Bt(),m=!!r&&!!s,h=n?.toLowerCase().includes(
|
|
404
|
+
`,il=({id:t,seen:a,type:i,title:n,message:o,time:l,crdType:r,target:s,onClick:c})=>{const d=O.useTheme(),{formatTimeAgo:u}=Vt(),{onClickNotification:p}=Bt(),m=!!r&&!!s,h=n?.toLowerCase().includes(G.Delete.toLowerCase())||!1,g=me(i,d);return e.createElement(Zo,{key:`notification-${t}`,className:m?"click-enabled":"",onClick:()=>{m&&(c(),p({id:t,crdType:r,target:s}))}},e.createElement(Qo,{$type:h?ie.Error:i},h?e.createElement(Da,null):e.createElement(g,null)),e.createElement(el,null,e.createElement(tl,null,e.createElement(E,{size:14},o)),e.createElement(al,null,e.createElement(E,{size:10,color:d.text.grey},u(l)),!a&&e.createElement(e.Fragment,null,e.createElement(E,{size:10},"·"),e.createElement(E,{size:10,color:d.colors.orange_soft},"new")))))},nl=(e,t,a)=>{const i=e?.serviceName||t?.otelServiceName||t?.name,n=a?[ja]:qe(t?.containers||[]),{priorotizedStatus:o}=re(t?.conditions||[]);return{id:i,title:i,icons:n.length?n:[Ka],status:o,serviceMapEntry:e}},ol=e=>"user"===e?.otelServiceName&&!e?.namespace&&!e?.name&&!e?.kind,ll=d.div`
|
|
405
405
|
width: 100%;
|
|
406
406
|
height: ${({$heightToRemove:e})=>`calc(100vh - ${e}px)`};
|
|
407
407
|
position: relative;
|
|
408
|
-
`,rl={namespace:"",name:"",kind:"",otelServiceName:"user",selected:!0,numberOfInstances:0,dataStreamNames:[],containers:[],conditions:[]},sl=({heightToRemove:t,serviceMap:i})=>{const n=O.useTheme(),{sources:o,sourcesLoading:l}=V(),{containerRef:r,containerHeight:s,containerWidth:c}=_e(),[d,u,p]=Xa([]),[h,g,y]=Za([]);return a(()=>{if(s&&c){const t=(({sources:e,serviceMap:t,containerHeight:a,containerWidth:i})=>{const n=[],o=new Map,l=((e,t)=>{const a=new Map,i=new Map,n=new Map,o=new Set;e.forEach(e=>{o.add(e.serviceName),e.services.forEach(e=>{o.add(e.serviceName)})}),o.forEach(e=>{i.set(e,[]),n.set(e,0)}),e.forEach(e=>{e.services.forEach(t=>{i.get(e.serviceName)?.push(t.serviceName);const a=n.get(t.serviceName)||0;n.set(t.serviceName,a+1)})});const l=[],r=[];for(o.forEach(e=>{0===(n.get(e)||0)&&r.push(e)});r.length>0;){const e=[],t=r.length;for(let a=0;a<t;a++){const t=r.shift();e.push(t),i.get(t)?.forEach(e=>{const t=n.get(e)||0;n.set(e,t-1),t-1==0&&r.push(e)})}e.length>0&&l.push(e)}return o.forEach(e=>{l.flat().includes(e)||(0===l.length?l.push([e]):l[l.length-1].push(e))}),l.forEach((e,i)=>{const n=100+150*i,o=150*(e.length-1),l=(t-o)/2;e.forEach((e,t)=>{const i=l+150*t,o=n;a.set(e,{x:i,y:o})})}),a})(t,i);if(t.length&&e.length){t.forEach(t=>{const a=t.serviceName;if(n.find(e=>e.id===`${z.Source}-${a}-${Wt.MapItem}`))return;const i=e.find(e=>a===e.otelServiceName||a===e.name);o.set(a,t),t.services.forEach(e=>o.set(e.serviceName,{serviceName:e.serviceName,services:[]})),n.push({id:`${z.Source}-${a}-${Wt.MapItem}`,type:Wt.MapItem,position:l.get(a),data:nl(t,i,ol(i))})}),o.forEach((t,a)=>{if(n.find(e=>e.id===`${z.Source}-${a}-${Wt.MapItem}`))return;const i=e.find(e=>a===e.otelServiceName||a===e.name);n.push({id:`${z.Source}-${a}-${Wt.MapItem}`,type:Wt.MapItem,position:l.get(a),data:nl(t,i,ol(i))})});let a=50;e.forEach(e=>{const t=e.otelServiceName||e.name;n.find(e=>e.id===`${z.Source}-${t}-${Wt.MapItem}`)||(n.push({id:`${z.Source}-${t}-${Wt.MapItem}`,type:Wt.MapItem,position:{x:a,y:10},data:nl(void 0,e,ol(e))}),a+=110)})}else n.push({id:`${z.Source}-${Wt.NoData}`,type:Wt.NoData,position:{x:i/2-150,y:a/4},data:{subTitle:m.ARE_SERVICES_INSTRUMENTED_AND_PRODUCING_TRAFFIC}});return n})({serviceMap:i,sources:[rl].concat(o),sourcesLoading:l,containerHeight:s,containerWidth:c});d.length>1?(e=t,u(t=>{const a=e.map(e=>{const a=t.find(t=>t.id===e.id);return e.position=a?.position||e.position,{id:e.id,item:e,type:a?"replace":"add"}});return t.find(e=>e.id===`${z.Source}-${Wt.NoData}`)&&a.push({id:`${z.Source}-${Wt.NoData}`,type:"remove"}),Qa(a,t)})):u(t)}var e},[i,o,l,s,c]),a(()=>{g((({theme:e,nodes:t,serviceMap:a})=>{const i=[];return t.forEach(({id:t,data:{id:n,status:o}})=>{const{services:l}=a.find(e=>e.serviceName===n)||{services:[]};l.forEach(a=>{const n=t,l=`${z.Source}-${a.serviceName}-${Wt.MapItem}`,r=o===ie.Error;i.push({id:`${n}-to-${l}`,source:n,target:l,markerEnd:{type:
|
|
408
|
+
`,rl={namespace:"",name:"",kind:"",otelServiceName:"user",selected:!0,numberOfInstances:0,dataStreamNames:[],containers:[],conditions:[]},sl=({heightToRemove:t,serviceMap:i})=>{const n=O.useTheme(),{sources:o,sourcesLoading:l}=V(),{containerRef:r,containerHeight:s,containerWidth:c}=_e(),[d,u,p]=Xa([]),[h,g,y]=Za([]);return a(()=>{if(s&&c){const t=(({sources:e,serviceMap:t,containerHeight:a,containerWidth:i})=>{const n=[],o=new Map,l=((e,t)=>{const a=new Map,i=new Map,n=new Map,o=new Set;e.forEach(e=>{o.add(e.serviceName),e.services.forEach(e=>{o.add(e.serviceName)})}),o.forEach(e=>{i.set(e,[]),n.set(e,0)}),e.forEach(e=>{e.services.forEach(t=>{i.get(e.serviceName)?.push(t.serviceName);const a=n.get(t.serviceName)||0;n.set(t.serviceName,a+1)})});const l=[],r=[];for(o.forEach(e=>{0===(n.get(e)||0)&&r.push(e)});r.length>0;){const e=[],t=r.length;for(let a=0;a<t;a++){const t=r.shift();e.push(t),i.get(t)?.forEach(e=>{const t=n.get(e)||0;n.set(e,t-1),t-1==0&&r.push(e)})}e.length>0&&l.push(e)}return o.forEach(e=>{l.flat().includes(e)||(0===l.length?l.push([e]):l[l.length-1].push(e))}),l.forEach((e,i)=>{const n=100+150*i,o=150*(e.length-1),l=(t-o)/2;e.forEach((e,t)=>{const i=l+150*t,o=n;a.set(e,{x:i,y:o})})}),a})(t,i);if(t.length&&e.length){t.forEach(t=>{const a=t.serviceName;if(n.find(e=>e.id===`${z.Source}-${a}-${Wt.MapItem}`))return;const i=e.find(e=>a===e.otelServiceName||a===e.name);o.set(a,t),t.services.forEach(e=>o.set(e.serviceName,{serviceName:e.serviceName,services:[]})),n.push({id:`${z.Source}-${a}-${Wt.MapItem}`,type:Wt.MapItem,position:l.get(a),data:nl(t,i,ol(i))})}),o.forEach((t,a)=>{if(n.find(e=>e.id===`${z.Source}-${a}-${Wt.MapItem}`))return;const i=e.find(e=>a===e.otelServiceName||a===e.name);n.push({id:`${z.Source}-${a}-${Wt.MapItem}`,type:Wt.MapItem,position:l.get(a),data:nl(t,i,ol(i))})});let a=50;e.forEach(e=>{const t=e.otelServiceName||e.name;n.find(e=>e.id===`${z.Source}-${t}-${Wt.MapItem}`)||(n.push({id:`${z.Source}-${t}-${Wt.MapItem}`,type:Wt.MapItem,position:{x:a,y:10},data:nl(void 0,e,ol(e))}),a+=110)})}else n.push({id:`${z.Source}-${Wt.NoData}`,type:Wt.NoData,position:{x:i/2-150,y:a/4},data:{subTitle:m.ARE_SERVICES_INSTRUMENTED_AND_PRODUCING_TRAFFIC}});return n})({serviceMap:i,sources:[rl].concat(o),sourcesLoading:l,containerHeight:s,containerWidth:c});d.length>1?(e=t,u(t=>{const a=e.map(e=>{const a=t.find(t=>t.id===e.id);return e.position=a?.position||e.position,{id:e.id,item:e,type:a?"replace":"add"}});return t.find(e=>e.id===`${z.Source}-${Wt.NoData}`)&&a.push({id:`${z.Source}-${Wt.NoData}`,type:"remove"}),Qa(a,t)})):u(t)}var e},[i,o,l,s,c]),a(()=>{g((({theme:e,nodes:t,serviceMap:a})=>{const i=[];return t.forEach(({id:t,data:{id:n,status:o}})=>{const{services:l}=a.find(e=>e.serviceName===n)||{services:[]};l.forEach(a=>{const n=t,l=`${z.Source}-${a.serviceName}-${Wt.MapItem}`,r=o===ie.Error;i.push({id:`${n}-to-${l}`,source:n,target:l,markerEnd:{type:Ga.ArrowClosed},style:{stroke:r?e?.colors.dark_red:e?.colors.border}})})}),i})({theme:n,nodes:d,serviceMap:i}))},[n,d,i]),e.createElement(ll,{ref:r,$heightToRemove:t},e.createElement(_t,{nodes:d,edges:h,onNodesChange:p,onEdgesChange:y,zoomOnScroll:!0}))},cl=d.div`
|
|
409
409
|
display: flex;
|
|
410
410
|
flex-direction: column;
|
|
411
411
|
align-items: center;
|
|
@@ -460,16 +460,16 @@ import e,{useState as t,useEffect as a,forwardRef as i,useRef as n,useImperative
|
|
|
460
460
|
max-height: calc(100vh - 200px);
|
|
461
461
|
height: fit-content;
|
|
462
462
|
overflow-y: scroll;
|
|
463
|
-
`,Sl=({onEditStream:t,onEditSources:a,onEditDestinations:i,categories:n})=>{const{selectedStreamName:o}=We(),{configuredSources:r,configuredDestinations:s,configuredDestinationsUpdateOnly:c}=dt(),d=l(()=>Object.values(r).reduce((e,t)=>e+t.filter(e=>e.selected).length,0),[r]);return e.createElement(te,{$isNotModal:!0},e.createElement(X,{$gap:12},e.createElement(F,{title:m.SUMMARY,description:m.STREAM_CONFIRM}),e.createElement(xl,null,e.createElement(
|
|
463
|
+
`,Sl=({onEditStream:t,onEditSources:a,onEditDestinations:i,categories:n})=>{const{selectedStreamName:o}=We(),{configuredSources:r,configuredDestinations:s,configuredDestinationsUpdateOnly:c}=dt(),d=l(()=>Object.values(r).reduce((e,t)=>e+t.filter(e=>e.selected).length,0),[r]);return e.createElement(te,{$isNotModal:!0},e.createElement(X,{$gap:12},e.createElement(F,{title:m.SUMMARY,description:m.STREAM_CONFIRM}),e.createElement(xl,null,e.createElement(Y,{title:m.STREAM_NAME,action:()=>e.createElement(Ut,{onClick:t}),data:[{title:"",value:o}]}),e.createElement(Y,{title:m.SELECTED_SOURCES,titleBadge:d,action:()=>e.createElement(Ut,{onClick:a})},e.createElement(bl,{filteredNamespacesAndSources:r,withInstances:!1})),e.createElement(Y,{title:m.SELECTED_DESTINATIONS,titleBadge:s.length+c.length,action:()=>e.createElement(Ut,{onClick:i})},e.createElement(yo,{categories:n})))))};var $l;!function(e){e.Overview="overview",e.InstrumentationRules="InstrumentationRule",e.Sources="Source",e.Actions="Action",e.Destinations="Destination"}($l||($l={}));const kl=({onClickId:a,defaultSelectedId:i,extendedNavIcons:n})=>{const{isVm:o}=Me(),[r,s]=t(i||""),c=l(()=>[{id:$l.Overview,icon:qa,selected:r===$l.Overview,onClick:()=>{s($l.Overview),a($l.Overview)},tooltip:"Overview"},...(n||[]).map(e=>({...e,selected:r===e.id,onClick:()=>{s(e.id),e.onClick()}}))],[r]),d=l(()=>{const e=[{id:$l.Sources,icon:Va,selected:r===$l.Sources,onClick:()=>{s($l.Sources),a($l.Sources)},tooltip:"Sources"},{id:$l.Destinations,icon:Ba,selected:r===$l.Destinations,onClick:()=>{s($l.Destinations),a($l.Destinations)},tooltip:"Destinations"}];return o||(e.push({id:$l.InstrumentationRules,icon:Ha,selected:r===$l.InstrumentationRules,onClick:()=>{s($l.InstrumentationRules),a($l.InstrumentationRules)},tooltip:"Instrumentation Rules"}),e.push({id:$l.Actions,icon:za,selected:r===$l.Actions,onClick:()=>{s($l.Actions),a($l.Actions)},tooltip:"Actions"})),e},[o,r]);return e.createElement(Yt,{orientation:"vertical",mainIcons:c,subIcons:d})},Cl=({})=>e.createElement(pt,{onClick:()=>window.open("https://join.slack.com/t/odigos/shared_invite/zt-2wc6gm4j9-EhcVFYrLwHqvcIErO9sVzw","_blank","noopener noreferrer"),tooltip:"Join our Slack community"},e.createElement(Wa,null)),wl=(e,t)=>{const{name:a,kind:i,namespace:n}=e,o=[{title:m.KIND,value:i},{title:m.NAME,value:a,tooltip:"Resource name"}];return t||(o.unshift({title:m.NAMESPACE,value:n}),o.push({type:h.Divider}),o.push({type:h.CopyText,value:`kubectl get ${i} ${a} -n ${n}`.toLowerCase()})),o},Dl=d.div`
|
|
464
464
|
display: flex;
|
|
465
465
|
flex-direction: column;
|
|
466
466
|
gap: 24px;
|
|
467
467
|
padding: 4px;
|
|
468
|
-
`,Tl=({formData:t,handleFormChange:a})=>e.createElement(Dl,null,e.createElement(S,{name:"sourceName",title:"Source name",tooltip:"This overrides the default service name that runs in your cluster.",placeholder:"Use a name that overrides the source name",value:t.otelServiceName,onChange:({target:{value:e}})=>a("otelServiceName",e)})),Nl=({workloadOdigosHealthStatus:t})=>{if(!t)return null;const a=
|
|
468
|
+
`,Tl=({formData:t,handleFormChange:a})=>e.createElement(Dl,null,e.createElement(S,{name:"sourceName",title:"Source name",tooltip:"This overrides the default service name that runs in your cluster.",placeholder:"Use a name that overrides the source name",value:t.otelServiceName,onChange:({target:{value:e}})=>a("otelServiceName",e)})),Nl=({workloadOdigosHealthStatus:t})=>{if(!t)return null;const a=Gt(t?.status),i=it(t?.reasonEnum),n=t?.message;return e.createElement(ce,{$alignItems:"center",$justifyContent:"center"},e.createElement(se,{status:a,title:i,subtitle:n,withBackground:a!==pe.Disabled,withBorder:!0,withIcon:!0,width:"calc(100% - 24px)"}))},El=({source:i,fetchSourceDescribe:n,restartPod:o})=>{const[l,r]=t(!1),[s,d]=t(null);return a(()=>{i&&n({namespace:i.namespace,name:i.name,kind:i.kind}).then(({data:e})=>{e?.describeSource?d(e.describeSource):r(!0)})},[i.namespace,i.name,i.kind]),s||l?e.createElement(X,{$gap:12},l?e.createElement(we,{$height:"70vh"},e.createElement(De,{subTitle:"Could not fetch describe for this source"})):s?.pods?.length?s.pods.map(({podName:t,nodeName:a,phase:n,agentInjected:l,runningLatestWorkloadRevision:r,containers:d,manifestYAML:u})=>{const p=n.status!==ie.Success||Xt(d)?ie.Error:ie.Success,m=[];return m.push(e.createElement(Zt,{key:"copy-text",value:`kubectl get pod ${t.value} -n ${s?.namespace?.value||i.namespace}`.toLowerCase()})),m.push(e.createElement(le,{key:"divider-1",length:"100%",margin:"0"})),m.push(e.createElement(Qt,{key:"describe-row-1",title:a.name,tooltip:a.explain||"",value:{status:a.status||void 0,text:a.value}})),m.push(e.createElement(le,{key:"divider-2",length:"100%",margin:"0"})),m.push(e.createElement(Qt,{key:"describe-row-2",title:n.name,tooltip:n.explain||"",value:{status:n.status||void 0,text:n.value}})),m.push(e.createElement(le,{key:"divider-3",length:"100%",margin:"0"})),m.push(e.createElement(Qt,{key:"describe-row-3",title:l.name,tooltip:l.explain||"",value:{status:l.status||void 0,text:l.value}})),m.push(e.createElement(le,{key:"divider-4",length:"100%",margin:"0"})),r?.name&&(m.push(e.createElement(Qt,{key:"describe-row-4",title:r.name,tooltip:r.explain||void 0,value:{status:r.status||void 0,text:r.value}})),m.push(e.createElement(le,{key:"divider-5",length:"100%",margin:"0"}))),d.forEach(t=>{m.push(e.createElement(ea,{key:`pod-container-${t.containerName.value}`,...t}))}),u&&(m.push(e.createElement(le,{key:"divider-6",length:"100%",margin:"0"})),m.push(e.createElement(ta,{key:"yaml-section-card",yaml:u}))),e.createElement(Y,{key:`pod-${t.value}`,title:`Pod: ${t.value}`,withExtend:!0,action:({hovered:a})=>e.createElement("div",{style:{position:"relative"}},e.createElement(se,{key:"status",status:p,title:p,withIcon:!0,withBorder:!0}),a&&e.createElement(aa,{key:"hover-actions",isOpen:!0,positionRight:"calc(100% + 12px)",actions:[{id:ia(),label:"Restart",rightIcon:Ea,onClick:()=>o(s?.namespace?.value||i.namespace,t.value)}]}))},c.toArray(m))}):e.createElement(we,{$height:"70vh"},e.createElement(De,{subTitle:"Check if you have any running pods and try again"}))):e.createElement(we,{$height:"70vh"},e.createElement(Ae,null))},Ol=d(ce)`
|
|
469
469
|
width: 100%;
|
|
470
470
|
align-items: center;
|
|
471
471
|
justify-content: space-between;
|
|
472
|
-
`,Al=({source:i,fetchSourceLibraries:n})=>{const o=O.useTheme(),[l,s]=t(!1),[c,d]=t(null);return a(()=>{i&&n({namespace:i.namespace,name:i.name,kind:i.kind}).then(({data:e})=>{e?.instrumentationInstanceComponents?d(wt(e.instrumentationInstanceComponents).sort((e,t)=>e.name.localeCompare(t.name))):s(!0)})},[i.namespace,i.name,i.kind]),c||l?e.createElement(X,{$gap:12},l?e.createElement(we,{$height:"70vh"},e.createElement(De,{subTitle:"Could not fetch libraries for this source"})):c?.length?e.createElement(
|
|
472
|
+
`,Al=({source:i,fetchSourceLibraries:n})=>{const o=O.useTheme(),[l,s]=t(!1),[c,d]=t(null);return a(()=>{i&&n({namespace:i.namespace,name:i.name,kind:i.kind}).then(({data:e})=>{e?.instrumentationInstanceComponents?d(wt(e.instrumentationInstanceComponents).sort((e,t)=>e.name.localeCompare(t.name))):s(!0)})},[i.namespace,i.name,i.kind]),c||l?e.createElement(X,{$gap:12},l?e.createElement(we,{$height:"70vh"},e.createElement(De,{subTitle:"Could not fetch libraries for this source"})):c?.length?e.createElement(Y,{title:"Instrumented Libraries"},c.map(({name:t,healthy:a,message:i,nonIdentifyingAttributes:n},l)=>e.createElement(r,{key:`library-${t}`},e.createElement(X,{$gap:4,$width:"100%"},e.createElement(Ol,{$width:"100%"},e.createElement(E,{size:12,color:o.text.grey},t),e.createElement(ce,{$gap:4},n.map(({key:a,value:i})=>na(i)&&oa(i)&&"is_standard_lib"===a?e.createElement(se,{key:`${t}-${a}`,status:ie.Default,title:"STANDARD",withBorder:!0}):null),"boolean"==typeof a&&e.createElement(se,{status:a?ie.Success:ie.Error,title:a?"HEALTHY":"UNHEALTHY",withBorder:!0}))),i&&e.createElement(E,{size:10,color:o.text.error,align:"right"},i)),l!==c.length-1&&e.createElement(le,{length:"100%",margin:"0"})))):e.createElement(we,{$height:"70vh",$gap:12},e.createElement(De,{title:"No libraries found",subTitle:""}),e.createElement(ae,{type:ie.Warning,message:"This feature is in early development, and has very limited support"}))):e.createElement(we,{$height:"70vh"},e.createElement(Ae,null))};var Fl;!function(e){e.Overview="Overview",e.Pods="Pods",e.Libraries="Libraries"}(Fl||(Fl={}));const Il=[sa.Deployment,sa.StatefulSet,sa.DaemonSet,sa.DeploymentConfig,sa.Rollout,sa.StaticPod],Ml=[ca.Python,ca.Go,ca.Java],Rl=d.div`
|
|
473
473
|
width: 100%;
|
|
474
474
|
height: 100%;
|
|
475
475
|
max-height: calc(100vh - 220px);
|
|
@@ -479,16 +479,16 @@ import e,{useState as t,useEffect as a,forwardRef as i,useRef as n,useImperative
|
|
|
479
479
|
display: flex;
|
|
480
480
|
flex-direction: column;
|
|
481
481
|
gap: 12px;
|
|
482
|
-
`,Pl=({persistSources:i,updateSource:o,restartWorkloads:r,fetchSourceById:s,fetchSourceDescribe:c,fetchSourceLibraries:d,restartPod:u})=>{const{isVm:p}=Me(),{sources:h}=V(),{selectedStreamName:g}=We(),{drawerType:y,drawerEntityId:v}=L(),b=l(()=>Ue(h,g),[h,g]),f=n(null),x=y===z.Source,[S,$]=t(!1),[k,C]=t(!1),[w,D]=t(Fl.Overview),[T,N]=t(null);a(()=>{x&&v&&s(v).then(e=>N(e||null))},[x,v]);const{formData:O,handleFormChange:A,resetFormData:F,loadFormWithDrawerItem:I}=la(),M=l(()=>{if(v)return T&&JSON.stringify(zt(T))===JSON.stringify(zt(v))?T:b?.find(e=>JSON.stringify(zt(e))===JSON.stringify(zt(v)))},[v,b,T]);a(()=>{x&&M?I(M):F()},[x,M]);const R=l(()=>{const e=M?.conditions?.find(({type:e})=>"RuntimeDetection"===e);return{description:e?.message,isLoading:e?.status===pe.Loading,containers:M?.containers||[]}},[M]),P=l(()=>{const e=[{label:Fl.Overview,onClick:()=>D(Fl.Overview),selected:w===Fl.Overview}];return p||(Il.includes(M?.kind)&&e.push({label:Fl.Pods,onClick:()=>D(Fl.Pods),selected:w===Fl.Pods}),M?.containers?.some(({language:e})=>Ml.includes(e))&&e.push({label:Fl.Libraries,onClick:()=>D(Fl.Libraries),selected:w===Fl.Libraries})),e},[w,M,p]);return M?e.createElement($i,{ref:f,onClose:()=>{D(Fl.Overview),N(null)},title:M.otelServiceName||M.name,titleTooltip:"This attribute is used to identify the name of the service (service.name) that is generating telemetry data.",hideEditTitleFromEdit:!0,icons:qe(M.containers),isEdit:S,isFormDirty:k,onEdit:w===Fl.Overview?e=>{$("boolean"!=typeof e||e)}:void 0,onSave:async()=>{const e=O.otelServiceName!==M.name?O.otelServiceName:"";A("otelServiceName",e),await o(v,{...O,otelServiceName:e}),N(null),C(!1),$(!1)},onDelete:w===Fl.Overview?async()=>{const{namespace:e}=M;i({[e]:[{...M,selected:!1,currentStreamName:g}]},{}),N(null),C(!1),$(!1),f.current?.closeDrawer()}:void 0,onCancel:()=>{C(!1),$(!1),A("otelServiceName",M.otelServiceName||M.name||"")},isLastItem:1===b.length,tabs:P,headerActionButtons:p?[]:[{"data-id":"rollout-restart",variant:"tertiary",onClick:()=>r([v]),children:e.createElement(e.Fragment,null,e.createElement(La,null),e.createElement(E,{size:14,family:"secondary",decoration:"underline"},"Restart"))}]},w===Fl.Overview?S?e.createElement(Rl,null,e.createElement(Tl,{formData:O,handleFormChange:(...e)=>{C(!0),A(...e),A("currentStreamName",g)}})):e.createElement(Ll,null,e.createElement(Nl,{workloadOdigosHealthStatus:M.workloadOdigosHealthStatus}),e.createElement(U,{conditions:M.conditions||[]}),e.createElement(
|
|
482
|
+
`,Pl=({persistSources:i,updateSource:o,restartWorkloads:r,fetchSourceById:s,fetchSourceDescribe:c,fetchSourceLibraries:d,restartPod:u})=>{const{isVm:p}=Me(),{sources:h}=V(),{selectedStreamName:g}=We(),{drawerType:y,drawerEntityId:v}=L(),b=l(()=>Ue(h,g),[h,g]),f=n(null),x=y===z.Source,[S,$]=t(!1),[k,C]=t(!1),[w,D]=t(Fl.Overview),[T,N]=t(null);a(()=>{x&&v&&s(v).then(e=>N(e||null))},[x,v]);const{formData:O,handleFormChange:A,resetFormData:F,loadFormWithDrawerItem:I}=la(),M=l(()=>{if(v)return T&&JSON.stringify(zt(T))===JSON.stringify(zt(v))?T:b?.find(e=>JSON.stringify(zt(e))===JSON.stringify(zt(v)))},[v,b,T]);a(()=>{x&&M?I(M):F()},[x,M]);const R=l(()=>{const e=M?.conditions?.find(({type:e})=>"RuntimeDetection"===e);return{description:e?.message,isLoading:e?.status===pe.Loading,containers:M?.containers||[]}},[M]),P=l(()=>{const e=[{label:Fl.Overview,onClick:()=>D(Fl.Overview),selected:w===Fl.Overview}];return p||(Il.includes(M?.kind)&&e.push({label:Fl.Pods,onClick:()=>D(Fl.Pods),selected:w===Fl.Pods}),M?.containers?.some(({language:e})=>Ml.includes(e))&&e.push({label:Fl.Libraries,onClick:()=>D(Fl.Libraries),selected:w===Fl.Libraries})),e},[w,M,p]);return M?e.createElement($i,{ref:f,onClose:()=>{D(Fl.Overview),N(null)},title:M.otelServiceName||M.name,titleTooltip:"This attribute is used to identify the name of the service (service.name) that is generating telemetry data.",hideEditTitleFromEdit:!0,icons:qe(M.containers),isEdit:S,isFormDirty:k,onEdit:w===Fl.Overview?e=>{$("boolean"!=typeof e||e)}:void 0,onSave:async()=>{const e=O.otelServiceName!==M.name?O.otelServiceName:"";A("otelServiceName",e),await o(v,{...O,otelServiceName:e}),N(null),C(!1),$(!1)},onDelete:w===Fl.Overview?async()=>{const{namespace:e}=M;i({[e]:[{...M,selected:!1,currentStreamName:g}]},{}),N(null),C(!1),$(!1),f.current?.closeDrawer()}:void 0,onCancel:()=>{C(!1),$(!1),A("otelServiceName",M.otelServiceName||M.name||"")},isLastItem:1===b.length,tabs:P,headerActionButtons:p?[]:[{"data-id":"rollout-restart",variant:"tertiary",onClick:()=>r([v]),children:e.createElement(e.Fragment,null,e.createElement(La,null),e.createElement(E,{size:14,family:"secondary",decoration:"underline"},"Restart"))}]},w===Fl.Overview?S?e.createElement(Rl,null,e.createElement(Tl,{formData:O,handleFormChange:(...e)=>{C(!0),A(...e),A("currentStreamName",g)}})):e.createElement(Ll,null,e.createElement(Nl,{workloadOdigosHealthStatus:M.workloadOdigosHealthStatus}),e.createElement(U,{conditions:M.conditions||[]}),e.createElement(Y,{title:m.SOURCE_DETAILS,data:M?wl(M,p):[]}),e.createElement(Y,{title:p?m.DETECTED_PROCESSES:m.DETECTED_CONTAINERS,titleBadge:R.isLoading?pe.Loading:R.containers.length,description:R.description||(p?m.DETECTED_PROCESSES_DESCRIPTION:m.DETECTED_CONTAINERS_DESCRIPTION)},R.containers.map(t=>e.createElement(ra,{key:`source-container-${t.containerName}`,...t,callbackRuntimeOverride:e=>o(v,e)}))),M.manifestYAML&&e.createElement(ta,{title:`${M.kind} YAML`,yaml:M.manifestYAML,defaultOpen:!M.instrumentationConfigYAML}),M.instrumentationConfigYAML&&e.createElement(ta,{title:"Instrumentation Config YAML",yaml:M.instrumentationConfigYAML,defaultOpen:!M.manifestYAML})):w===Fl.Pods?e.createElement(El,{source:M,fetchSourceDescribe:c,restartPod:u}):e.createElement(Al,{source:M,fetchSourceLibraries:d})):null},jl=d.div`
|
|
483
483
|
max-width: ${({$fullWidth:e})=>e?"unset":"420px"};
|
|
484
484
|
width: 100%;
|
|
485
485
|
`,Kl=i(({isModal:t,fetchSingleNamespace:a,onClickSummary:i},n)=>{const l=p(),{isVm:r}=Me(),s=da({fetchSingleNamespace:a}),{selectedSources:c,fetchingNamespace:d,selectedAllNamespaces:u,onSelectAllNamespaces:h,getApiSourcesPayload:g,getApiFutureAppsPayload:y,searchText:v,setSearchText:b,searchBy:f,setSearchBy:x,showSelectedOnly:$,setShowSelectedOnly:k,showRunningOnly:C,setShowRunningOnly:D}=s;o(n,()=>({getFormValues:()=>({apps:g(),futureApps:y()})}));const T=Object.values(c).reduce((e,t)=>e+t.filter(e=>e.selected).length,0);return e.createElement(te,{$isNotModal:!t},e.createElement(X,{$gap:12},e.createElement(X,{$gap:24},i&&e.createElement(gt,{onClick:i}),e.createElement(F,{title:m.SELECT_SOURCES,badgeLabel:T,description:m.SELECT_SOURCES_DESCRIPTION}),e.createElement(ce,{$justifyContent:"space-between"},e.createElement(jl,{$fullWidth:r},e.createElement(S,{placeholder:f===z.Source?m.SEARCH_SOURCES:m.SEARCH_NAMESPACES,icon:Oa,value:v,onChange:e=>b(e.target.value.toLowerCase())})),!r&&e.createElement(A,{options:[{label:m.SOURCE,value:z.Source,selectedBgColor:l.text.secondary,selectedTextColor:l.text.primary},{label:m.NAMESPACE,value:z.Namespace,selectedBgColor:l.text.secondary,selectedTextColor:l.text.primary}],selected:f,setSelected:x})),e.createElement(ce,{$gap:36},e.createElement(w,{title:m.SELECT_ALL,initialValue:u,onChange:h,disabled:!!d}),e.createElement(w,{title:m.ONLY_SELECTED,initialValue:$,onChange:k}),e.createElement(w,{title:m.ONLY_RUNNING_INSTANCES,initialValue:C,onChange:D}))),e.createElement(le,null),e.createElement(bl,{isModal:t,...s})))});Kl.displayName=Kl.name;const ql=({fetchSingleNamespace:t,persistSources:a})=>{const{currentModal:i,setCurrentModal:o}=Z(),l=i===z.Source,r=()=>{o("")},s=async()=>{if(c.current){const{apps:e,futureApps:t}=c.current.getFormValues();a(e,t),r()}},c=n(null);return P({key:"Enter",active:l},s),l?e.createElement(Q,{isOpen:l,onClose:r,header:{title:"Add Source"},actionComponent:e.createElement(ee,{buttons:[{label:"DONE",variant:"primary",onClick:s}]})},e.createElement(Kl,{ref:c,isModal:!0,fetchSingleNamespace:t})):null},Hl=e=>{const t=[{key:"checkbox-and-icon",title:""},{key:"name",title:m.NAME,sortable:!0},{key:"kind",title:"Kind",sortable:!0}];return e||t.push({key:"namespace",title:m.NAMESPACE,sortable:!0}),t.push({key:"containers",title:m.DETECTED_CONTAINERS}),t.push({key:"conditions",title:"Conditions"}),t.push({key:"throughput",title:"Throughput",sortable:!0}),t},zl=({metrics:t,maxHeight:a,maxWidth:i})=>{const n=p(),{isVm:o}=Me(),r=he(),{selectedStreamName:c}=We(),{sources:d,sourcesLoading:u}=V(),{setDrawerType:h,setDrawerEntityId:g}=L(),{selectedSources:y,setSelectedSources:v}=Fe(),{progress:f}=ze(),x=l(()=>f[Ve.Instrumenting]||f[Ve.Uninstrumenting]?f[Ve.Instrumenting]?.percentage||f[Ve.Uninstrumenting]?.percentage||0:void 0,[f[Ve.Instrumenting],f[Ve.Uninstrumenting]]),S=l(()=>Ue(d,c),[d,c]),$=l(()=>Fi({instrumentationRules:[],sources:Je(S,r),actions:[],destinations:[],searchText:r.searchText,selectedCategory:z.Source}).searchResults.find(({category:e})=>e===z.Source)?.entities||[],[S,r]),[k,C]=l(()=>{let e=0;return Object.values(y).forEach(t=>{e+=t.length}),[0!==e,e]},[y]),w=s(e=>{if(e){const e={};$.forEach(t=>{const{namespace:a}=t;e[a]?e[a].push(t):e[a]=[t]}),v(e)}else v({})},[$]),D=s(e=>{const{namespace:t,name:a,kind:i}=e,n={...y};n[t]||(n[t]=[]);const o=n[t].findIndex(e=>e.name===a&&e.kind===i);-1===o?n[t].push(e):n[t].splice(o,1),v(n)},[y]),T=l(()=>$.map(a=>{const i=zt(a),o=JSON.stringify(i),{hasErrors:l,hasWarnings:r,hasDisableds:s}=re(a.conditions||[]),c=!!y[i.namespace]?.find(e=>e.namespace===i.namespace&&e.name===i.name&&e.kind===i.kind);return{status:l?ie.Error:r?ie.Warning:void 0,faded:s,onClick:()=>{h(z.Source),g(i)},cells:[{columnKey:"checkbox-and-icon",component:()=>e.createElement(ce,{$gap:16},e.createElement(b,{value:c,onChange:()=>D(a)}),e.createElement(ua,{icons:qe(a.containers),id:o}))},{columnKey:"name",value:ve(a,z.Source,{extended:!0})},{columnKey:"kind",value:a.kind,textColor:n.text.info},{columnKey:"namespace",value:a.namespace,textColor:n.text.info},{columnKey:"throughput",value:Le(Nt(t,z.Source,i).throughput),textColor:n.text.info},{columnKey:"conditions",component:()=>e.createElement(Oi,{conditions:a.conditions||[],id:o})},{columnKey:"containers",component:()=>e.createElement("div",{style:{lineHeight:1}},e.createElement(se,{status:ie.Info,title:pa(a.containers),withBorder:!0}))}]}}),[$,y,t,D]),{badge:N,badgeTooltip:O}=l(()=>$.length!==S.length?{badge:`${$.length}/${S.length}`,badgeTooltip:m.FILTERED_COUNT_TOOLTIP}:{badge:S.length,badgeTooltip:void 0},[$,S]);return e.createElement(fe,{$maxWidth:i},e.createElement(xe,null,e.createElement(b,{partiallyChecked:k&&$?.length!==C,value:k&&$?.length===C,onChange:w,disabled:!$?.length}),e.createElement(Se,{icon:$e(z.Source),title:m.SOURCES,badge:N,badgeTooltip:O,loading:u||"number"==typeof x})),e.createElement(ke,{$maxHeight:a},e.createElement(Ce,{columns:Hl(o),rows:T})),"number"!=typeof x||T.length?T.length?null:e.createElement(we,{style:{marginTop:"2rem"}},e.createElement(De,null)):e.createElement(we,{style:{marginTop:"2rem",gap:"24px"}},e.createElement(Te,{width:420}),e.createElement(ce,{$gap:16},e.createElement(E,{color:n.text.info},f[Ve.Instrumenting]?"Instrumenting":"Uninstrumenting"," workloads..."),e.createElement(Ne,{label:`${x}%`}))))},Vl=({expiresAt:t})=>{const a=O.useTheme(),{formatTimeAgo:i}=Vt(),n=i(t),o=new Date(t).toDateString().split(" ").slice(1).join(" "),l=ma(t,0)?a.text.error:ma(t,6048e5)?a.text.warning:a.text.success;return e.createElement(E,{size:14,color:l},n," (",o,")")},Bl=d.div`
|
|
486
486
|
position: relative;
|
|
487
|
-
`,Wl=({token:a,saveToken:i})=>{const{CopyButton:n}=ha(),{formData:o,handleFormChange:l,resetFormData:r}=ga({token:a}),[s,c]=t(!1),d=()=>{c(!1),r()};return e.createElement(ce,{$gap:0},e.createElement(n,{value:a,size:ya.L}),e.createElement(le,{orientation:"vertical",length:"12px"}),e.createElement(Bl,null,e.createElement(pt,{size:32,onClick:()=>{c(!0)}},e.createElement(wa,null)),s&&e.createElement(va,{flipX:!0,clientX:36,isOpen:s,onClose:d,onSave:()=>{i(o.token).then(d)},title:"Enter a new API Token",titleTooltip:"Contact us to generate a new one"},e.createElement(S,{placeholder:"API Token",type:"password",value:o.token,onChange:e=>l("token",e.target.value)}))))},_l=({tokens:t,saveToken:a})=>e.createElement(
|
|
487
|
+
`,Wl=({token:a,saveToken:i})=>{const{CopyButton:n}=ha(),{formData:o,handleFormChange:l,resetFormData:r}=ga({token:a}),[s,c]=t(!1),d=()=>{c(!1),r()};return e.createElement(ce,{$gap:0},e.createElement(n,{value:a,size:ya.L}),e.createElement(le,{orientation:"vertical",length:"12px"}),e.createElement(Bl,null,e.createElement(pt,{size:32,onClick:()=>{c(!0)}},e.createElement(wa,null)),s&&e.createElement(va,{flipX:!0,clientX:36,isOpen:s,onClose:d,onSave:()=>{i(o.token).then(d)},title:"Enter a new API Token",titleTooltip:"Contact us to generate a new one"},e.createElement(S,{placeholder:"API Token",type:"password",value:o.token,onChange:e=>l("token",e.target.value)}))))},_l=({tokens:t,saveToken:a})=>e.createElement(Y,{title:"Authorization Tokens",titleBadge:t.length,data:[{type:h.Table,value:{columns:[{key:"icon",title:""},{key:"name",title:"Name"},{key:"expires_at",title:"Expires"},{key:"token",title:"Token"},{key:"actions",title:""}],rows:t.map(({name:t,token:i,expiresAt:n})=>({cells:[{columnKey:"icon",icon:_a},{columnKey:"name",value:t},{columnKey:"token",value:`${new Array(15).fill("•").join("")}`},{columnKey:"expires_at",component:()=>e.createElement(Vl,{expiresAt:n})},{columnKey:"actions",component:()=>e.createElement(Wl,{token:i,saveToken:a})}]}))}}]}),Jl=({fetchDescribeOdigos:i})=>{const[n,o]=t(null);if(a(()=>{i().then(({data:e})=>o(e?.describeOdigos||null))},[]),!n)return e.createElement(we,null,e.createElement(Ae,null));const l=t=>t?.name?[e.createElement(le,{key:`divider-${t.name}`}),e.createElement(Qt,{key:`describe-row-${t.name}`,title:t.name,subTitle:t.explain||void 0,value:{status:t.status||(na(t.value)?oa(t.value)?ie.Success:ie.Error:ie.Default),text:t.value}})]:[];return e.createElement(e.Fragment,null,e.createElement(Y,{title:"General Information",withExtend:!0,initialExtended:!0,data:[{title:n?.odigosVersion?.name,value:n?.odigosVersion?.value},{title:n?.kubernetesVersion?.name,value:n?.kubernetesVersion?.value},{title:n?.installationMethod?.name,value:n?.installationMethod?.value},{title:n?.tier?.name,value:n?.tier?.value},{title:"# of sources",value:n?.numberOfSources?.toString()},{title:"# of destinations",value:n?.numberOfDestinations?.toString()}]}),e.createElement(Y,{title:"Cluster Collector",withExtend:!0},Object.values(n?.clusterCollector||{}).map(l)),e.createElement(Y,{title:"Node Collector",withExtend:!0},Object.values(n?.nodeCollector||{}).map(l)))},Ul=d.div`
|
|
488
488
|
display: flex;
|
|
489
489
|
flex-direction: column;
|
|
490
490
|
gap: 12px;
|
|
491
|
-
`,
|
|
491
|
+
`,Yl="System Overview",Gl=({tokens:a,saveToken:i,fetchDescribeOdigos:n})=>{const[o,l]=t(!1),r=()=>l(e=>!e);return e.createElement(e.Fragment,null,e.createElement(pt,{key:Yl,onClick:r,tooltip:Yl},e.createElement(Ja,{size:18})),e.createElement(K,{width:"750px",isOpen:o,onClose:r,header:{icons:[Ja],title:Yl},footer:{isOpen:!1}},e.createElement(Ul,null,!!a?.length&&e.createElement(_l,{tokens:a,saveToken:i}),e.createElement(Jl,{fetchDescribeOdigos:n}))))},Xl=d.div`
|
|
492
492
|
position: fixed;
|
|
493
493
|
bottom: 12px;
|
|
494
494
|
left: 12px;
|
|
@@ -532,7 +532,7 @@ import e,{useState as t,useEffect as a,forwardRef as i,useRef as n,useImperative
|
|
|
532
532
|
gap: 12px;
|
|
533
533
|
max-height: 100vh;
|
|
534
534
|
overflow-y: auto;
|
|
535
|
-
`,cr=({span:a,process:i,onClose:n})=>{const[o,l]=t(!0),[r,s]=t(!0);return e.createElement(K,{width:"750px",isOpen:!0,onClose:n,header:{icons:[
|
|
535
|
+
`,cr=({span:a,process:i,onClose:n})=>{const[o,l]=t(!0),[r,s]=t(!0);return e.createElement(K,{width:"750px",isOpen:!0,onClose:n,header:{icons:[Ya],title:a.operationName},footer:{isOpen:!1}},e.createElement(sr,null,e.createElement(Y,{title:"Details",data:lr(a)}),a.logs.length>0&&e.createElement(Y,{title:"Errors",titleBadge:a.logs.length,titleIcon:Ua,data:or(a)}),e.createElement(Y,{title:"Tags",data:nr(a,o),action:e.createElement(xa,{isPrettyMode:o,setIsPrettyMode:l})}),i&&e.createElement(Y,{title:`Process (${i.serviceName})`,data:rr(i,r),action:e.createElement(xa,{isPrettyMode:r,setIsPrettyMode:s})})))},dr=370,ur=["#33DCA7","#50F6E8","#444AD9","#8B55FF","#FF7CA9"].reverse(),pr=d.div`
|
|
536
536
|
display: flex;
|
|
537
537
|
align-items: center;
|
|
538
538
|
width: ${dr}px;
|
|
@@ -597,4 +597,4 @@ import e,{useState as t,useEffect as a,forwardRef as i,useRef as n,useImperative
|
|
|
597
597
|
padding-top: 12px;
|
|
598
598
|
padding-left: 12px;
|
|
599
599
|
white-space: nowrap;
|
|
600
|
-
`,Cr=({heightToRemove:a,traces:i,isLoading:n})=>{const[o,r]=t([]),[s,c]=t(null),d=l(()=>wt(i).sort((e,t)=>t.spans[0].startTime-e.spans[0].startTime).map(e=>({...e,spans:ir(e)})),[i]),u=l(()=>d.reduce((e,t)=>Math.max(e,t.spans.reduce((e,t)=>e+t.duration,0)),0),[d]),p=l(()=>{const e=d.find(e=>e.spans.some(e=>e.spanID===s?.spanID)),t=e?.processes.find(e=>e.serviceName===s?.processID);return t},[d,s]);return e.createElement(e.Fragment,null,e.createElement(fr,{$heightToRemove:a},n?e.createElement(we,{$height:"50vh"},e.createElement(Ae,{scale:1.5})):d.length?e.createElement(xr,{$heightToRemove:a},e.createElement(Sr,null,e.createElement(E,null,"Service & operation")),new Array(5).fill(null).map((t,i)=>e.createElement($r,{key:`${i}-divider`,$heightToRemove:a,index:i},e.createElement(kr,null,fa(u/5*i)))),d.map((t,a)=>{const{spans:i}=t,n=i.reduce((e,t)=>Math.min(e,t.startTime),Number.MAX_SAFE_INTEGER),l=i.reduce((e,t)=>Math.max(e,t.startTime+t.duration),0);return e.createElement(br,{key:`recursive-spans-${t.traceID}`,spans:i,logs:[],depth:1,indexInMatrix:a,maxDuration:u,minStartTime:n,maxEndTime:l,openSpanIdsState:{value:o,set:r},selectedSpanState:{value:s,set:c}})})):e.createElement(we,{$height:"50vh"},e.createElement(De,{title:m.NO_TRACES_FOUND,subTitle:m.ARE_SERVICES_INSTRUMENTED_AND_PRODUCING_TRAFFIC}))),s&&e.createElement(cr,{span:s,process:p,onClose:()=>c(null)}))};export{Di as ActionDrawer,Si as ActionForm,Ni as ActionModal,Mi as ActionTable,Ki as AwaitPipeline,rn as ConditionDropdown,tn as DataFlow,In as DataFlowActionsMenu,kn as DataStreamDrawer,Sn as DataStreamForm,Rn as DataStreamModal,Mn as DataStreamSelectionForm,Un as DestinationDrawer,Wn as DestinationForm,ho as DestinationModal,fo as DestinationSelectionForm,So as DestinationTable,sn as ErrorDropdown,Po as InstrumentationRuleDrawer,Mo as InstrumentationRuleForm,qo as InstrumentationRuleModal,Vo as InstrumentationRuleTable,pn as KindDropdown,cn as LanguageDropdown,dn as MonitorDropdown,Wo as MultiSourceControl,un as NamespaceDropdown,$l as NavIconIds,Xo as NotificationManager,$i as OverviewDrawer,mn as PodsAgentInjectionStatusDropdown,sl as ServiceMap,Sl as SetupSummary,kl as SideNav,Cl as SlackInvite,Pl as SourceDrawer,Tl as SourceForm,ql as SourceModal,Kl as SourceSelectionForm,zl as SourceTable,
|
|
600
|
+
`,Cr=({heightToRemove:a,traces:i,isLoading:n})=>{const[o,r]=t([]),[s,c]=t(null),d=l(()=>wt(i).sort((e,t)=>t.spans[0].startTime-e.spans[0].startTime).map(e=>({...e,spans:ir(e)})),[i]),u=l(()=>d.reduce((e,t)=>Math.max(e,t.spans.reduce((e,t)=>e+t.duration,0)),0),[d]),p=l(()=>{const e=d.find(e=>e.spans.some(e=>e.spanID===s?.spanID)),t=e?.processes.find(e=>e.serviceName===s?.processID);return t},[d,s]);return e.createElement(e.Fragment,null,e.createElement(fr,{$heightToRemove:a},n?e.createElement(we,{$height:"50vh"},e.createElement(Ae,{scale:1.5})):d.length?e.createElement(xr,{$heightToRemove:a},e.createElement(Sr,null,e.createElement(E,null,"Service & operation")),new Array(5).fill(null).map((t,i)=>e.createElement($r,{key:`${i}-divider`,$heightToRemove:a,index:i},e.createElement(kr,null,fa(u/5*i)))),d.map((t,a)=>{const{spans:i}=t,n=i.reduce((e,t)=>Math.min(e,t.startTime),Number.MAX_SAFE_INTEGER),l=i.reduce((e,t)=>Math.max(e,t.startTime+t.duration),0);return e.createElement(br,{key:`recursive-spans-${t.traceID}`,spans:i,logs:[],depth:1,indexInMatrix:a,maxDuration:u,minStartTime:n,maxEndTime:l,openSpanIdsState:{value:o,set:r},selectedSpanState:{value:s,set:c}})})):e.createElement(we,{$height:"50vh"},e.createElement(De,{title:m.NO_TRACES_FOUND,subTitle:m.ARE_SERVICES_INSTRUMENTED_AND_PRODUCING_TRAFFIC}))),s&&e.createElement(cr,{span:s,process:p,onClose:()=>c(null)}))};export{Di as ActionDrawer,Si as ActionForm,Ni as ActionModal,Mi as ActionTable,Ki as AwaitPipeline,rn as ConditionDropdown,tn as DataFlow,In as DataFlowActionsMenu,kn as DataStreamDrawer,Sn as DataStreamForm,Rn as DataStreamModal,Mn as DataStreamSelectionForm,Un as DestinationDrawer,Wn as DestinationForm,ho as DestinationModal,fo as DestinationSelectionForm,So as DestinationTable,sn as ErrorDropdown,Po as InstrumentationRuleDrawer,Mo as InstrumentationRuleForm,qo as InstrumentationRuleModal,Vo as InstrumentationRuleTable,pn as KindDropdown,cn as LanguageDropdown,dn as MonitorDropdown,Wo as MultiSourceControl,un as NamespaceDropdown,$l as NavIconIds,Xo as NotificationManager,$i as OverviewDrawer,mn as PodsAgentInjectionStatusDropdown,sl as ServiceMap,Sl as SetupSummary,kl as SideNav,Cl as SlackInvite,Pl as SourceDrawer,Tl as SourceForm,ql as SourceModal,Kl as SourceSelectionForm,zl as SourceTable,Gl as SystemOverview,Oi as TableCellConditions,Zl as ToastList,ar as ToggleDarkMode,Cr as TraceView};
|
package/lib/contexts.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{d8 as OdigosProvider,p as checkVersionSupport,$ as useOdigos}from"./chunks/ui-components-
|
|
1
|
+
export{d8 as OdigosProvider,p as checkVersionSupport,$ as useOdigos}from"./chunks/ui-components-fb24c792.js";import"./icons.js";import"react";import"styled-components";import"zustand";import"javascript-time-ago";import"./chunks/vendor-0965fadc.js";import"react-dom";import"@xyflow/react";import"react-error-boundary";import"lottie-react";import"prism-react-renderer";
|
package/lib/functions.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{bI as capitalizeFirstLetter,cL as cleanObjectEmptyStringsValues,bD as compareCondition,h as deepClone,aS as filterActions,bh as filterDestinations,bi as filterDestinationsByStream,bf as filterSources,bg as filterSourcesByStream,cM as flattenObjectKeys,b7 as formatBytes,cp as formatDuration,t as generateId,aA as getActionIcon,aM as getConditionsBooleans,bb as getContainersIcons,cj as getContainersInstrumentedCount,ba as getDestinationIcon,aZ as getEntityIcon,ay as getEntityId,aU as getEntityLabel,cN as getIdFromSseTarget,b9 as getInstrumentationRuleIcon,cO as getMainContainerLanguage,bM as getMetricForEntity,cP as getMonitorIcon,cQ as getPlatformIcon,cR as getPlatformLabel,bV as getProgrammingLanguageIcon,cr as getRecursiveValues,cS as getSseTargetFromId,cT as getStatusColor,K as getStatusFromPodStatus,aQ as getStatusIcon,c5 as getStatusTypeFromOdigosHealth,cU as getValueForRange,b_ as getWorkloadId,bH as getYamlFieldsForDestination,c6 as hasUnhealthyInstances,af as isEmpty,cV as isLegalK8sLabel,ck as isOverTime,cb as isStringABoolean,cW as isTimeElapsed,cX as isValidVersion,aO as mapConditions,bC as mapDestinationFieldsForDisplay,b6 as mapExportedSignals,cY as numbersOnly,cc as parseBooleanFromString,cZ as parseJsonStringToPrettyString,c_ as removeEmptyValuesFromObject,bE as safeJsonParse,c$ as safeJsonStringify,b2 as sleep,bp as splitCamelString,d0 as stringifyNonStringValues,d1 as trimVersion}from"./chunks/ui-components-
|
|
1
|
+
export{bI as capitalizeFirstLetter,cL as cleanObjectEmptyStringsValues,bD as compareCondition,h as deepClone,aS as filterActions,bh as filterDestinations,bi as filterDestinationsByStream,bf as filterSources,bg as filterSourcesByStream,cM as flattenObjectKeys,b7 as formatBytes,cp as formatDuration,t as generateId,aA as getActionIcon,aM as getConditionsBooleans,bb as getContainersIcons,cj as getContainersInstrumentedCount,ba as getDestinationIcon,aZ as getEntityIcon,ay as getEntityId,aU as getEntityLabel,cN as getIdFromSseTarget,b9 as getInstrumentationRuleIcon,cO as getMainContainerLanguage,bM as getMetricForEntity,cP as getMonitorIcon,cQ as getPlatformIcon,cR as getPlatformLabel,bV as getProgrammingLanguageIcon,cr as getRecursiveValues,cS as getSseTargetFromId,cT as getStatusColor,K as getStatusFromPodStatus,aQ as getStatusIcon,c5 as getStatusTypeFromOdigosHealth,cU as getValueForRange,b_ as getWorkloadId,bH as getYamlFieldsForDestination,c6 as hasUnhealthyInstances,af as isEmpty,cV as isLegalK8sLabel,ck as isOverTime,cb as isStringABoolean,cW as isTimeElapsed,cX as isValidVersion,aO as mapConditions,bC as mapDestinationFieldsForDisplay,b6 as mapExportedSignals,cY as numbersOnly,cc as parseBooleanFromString,cZ as parseJsonStringToPrettyString,c_ as removeEmptyValuesFromObject,bE as safeJsonParse,c$ as safeJsonStringify,b2 as sleep,bp as splitCamelString,d0 as stringifyNonStringValues,d1 as trimVersion}from"./chunks/ui-components-fb24c792.js";import"./icons.js";import"react";import"styled-components";import"zustand";import"javascript-time-ago";import"./chunks/vendor-0965fadc.js";import"react-dom";import"@xyflow/react";import"react-error-boundary";import"lottie-react";import"prism-react-renderer";
|
package/lib/hooks.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{ax as useActionFormData,d6 as useBodyScroll,bj as useClickNode,b$ as useClickNotification,be as useContainerSize,cl as useCopy,bv as useDataStreamFormData,bG as useDestinationFormData,q as useGenericForm,d7 as useInfiniteScroll,bX as useInstrumentationRuleFormData,as as useKeyDown,bo as useOnClickOutside,bk as usePopup,bu as useSessionStorage,cd as useSourceFormData,ch as useSourceSelectionFormData,s as useTimeAgo}from"./chunks/ui-components-
|
|
1
|
+
export{ax as useActionFormData,d6 as useBodyScroll,bj as useClickNode,b$ as useClickNotification,be as useContainerSize,cl as useCopy,bv as useDataStreamFormData,bG as useDestinationFormData,q as useGenericForm,d7 as useInfiniteScroll,bX as useInstrumentationRuleFormData,as as useKeyDown,bo as useOnClickOutside,bk as usePopup,bu as useSessionStorage,cd as useSourceFormData,ch as useSourceSelectionFormData,s as useTimeAgo}from"./chunks/ui-components-fb24c792.js";import"./icons.js";import"react";import"styled-components";import"zustand";import"javascript-time-ago";import"./chunks/vendor-0965fadc.js";import"react-dom";import"@xyflow/react";import"react-error-boundary";import"lottie-react";import"prism-react-renderer";
|
package/lib/snippets.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{bz as AddButton,c7 as CopyText,c3 as EditButton,c1 as Flow,d9 as MapItemNode,da as NoDataNode,bA as NoteBackToSummary,c9 as PodContainer,ce as SourceContainer}from"./chunks/ui-components-
|
|
1
|
+
export{bz as AddButton,c7 as CopyText,c3 as EditButton,c1 as Flow,d9 as MapItemNode,da as NoDataNode,bA as NoteBackToSummary,c9 as PodContainer,ce as SourceContainer}from"./chunks/ui-components-fb24c792.js";import"./icons.js";import"react";import"styled-components";import"zustand";import"javascript-time-ago";import"./chunks/vendor-0965fadc.js";import"react-dom";import"@xyflow/react";import"react-error-boundary";import"lottie-react";import"prism-react-renderer";
|
package/lib/store.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{P as ProgressKeys,d5 as useActiveNodeStore,co as useDarkMode,u as useDataStreamStore,ar as useDrawerStore,a2 as useEntityStore,aR as useFilterStore,aE as useModalStore,bW as useNotificationStore,g as useProgressStore,b4 as useSelectedStore,bw as useSetupStore}from"./chunks/ui-components-
|
|
1
|
+
export{P as ProgressKeys,d5 as useActiveNodeStore,co as useDarkMode,u as useDataStreamStore,ar as useDrawerStore,a2 as useEntityStore,aR as useFilterStore,aE as useModalStore,bW as useNotificationStore,g as useProgressStore,b4 as useSelectedStore,bw as useSetupStore}from"./chunks/ui-components-fb24c792.js";import"./icons.js";import"react";import"styled-components";import"zustand";import"javascript-time-ago";import"./chunks/vendor-0965fadc.js";import"react-dom";import"@xyflow/react";import"react-error-boundary";import"lottie-react";import"prism-react-renderer";
|
package/lib/theme.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{J as default}from"./chunks/ui-components-
|
|
1
|
+
export{J as default}from"./chunks/ui-components-fb24c792.js";import"styled-components";import"./icons.js";import"react";import"zustand";import"javascript-time-ago";import"./chunks/vendor-0965fadc.js";import"react-dom";import"@xyflow/react";import"react-error-boundary";import"lottie-react";import"prism-react-renderer";
|
package/lib/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{ct as ActionCategory,ac as ActionKeyTypes,a7 as ActionType,cF as AddNodeTypes,cw as BooleanOperation,bR as CodeAttributesKeyTypes,aD as Crud,bP as CustomInstrumentationsKeyTypes,bc as DesiredStateProgress,cG as DestinationTypes,cE as EdgeTypes,E as EntityTypes,ak as FieldTypes,bQ as GolangCustomProbe,bN as HeadersCollectionKeyTypes,ae as InputTypes,cB as InstallationMethod,bT as InstrumentationRuleType,cC as IntrumentationStatus,bO as JavaCustomProbe,cx as JsonOperation,a8 as K8sAttributesFrom,cf as K8sResourceKind,cy as ListDirection,c0 as NodeTypes,cv as NumberOperation,cH as OtelDistroName,bB as OtherEntityTypes,aP as OtherStatus,O as OtherStatusType,bS as PayloadCollectionKeyTypes,cA as PlatformType,cK as PodContainerLifecycleStatus,cJ as PodContainerStatus,cI as PodPhase,cD as Profile,cg as ProgrammingLanguages,bF as SignalType,cz as SortDirection,S as StatusType,cu as StringOperation,bZ as Tier,_ as WorkloadRolloutStatus}from"./chunks/ui-components-
|
|
1
|
+
export{ct as ActionCategory,ac as ActionKeyTypes,a7 as ActionType,cF as AddNodeTypes,cw as BooleanOperation,bR as CodeAttributesKeyTypes,aD as Crud,bP as CustomInstrumentationsKeyTypes,bc as DesiredStateProgress,cG as DestinationTypes,cE as EdgeTypes,E as EntityTypes,ak as FieldTypes,bQ as GolangCustomProbe,bN as HeadersCollectionKeyTypes,ae as InputTypes,cB as InstallationMethod,bT as InstrumentationRuleType,cC as IntrumentationStatus,bO as JavaCustomProbe,cx as JsonOperation,a8 as K8sAttributesFrom,cf as K8sResourceKind,cy as ListDirection,c0 as NodeTypes,cv as NumberOperation,cH as OtelDistroName,bB as OtherEntityTypes,aP as OtherStatus,O as OtherStatusType,bS as PayloadCollectionKeyTypes,cA as PlatformType,cK as PodContainerLifecycleStatus,cJ as PodContainerStatus,cI as PodPhase,cD as Profile,cg as ProgrammingLanguages,bF as SignalType,cz as SortDirection,S as StatusType,cu as StringOperation,bZ as Tier,_ as WorkloadRolloutStatus}from"./chunks/ui-components-fb24c792.js";import"./icons.js";import"react";import"styled-components";import"zustand";import"javascript-time-ago";import"./chunks/vendor-0965fadc.js";import"react-dom";import"@xyflow/react";import"react-error-boundary";import"lottie-react";import"prism-react-renderer";
|
package/lib/visuals.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{dr as VISUAL_ODIGOS_LOGO_HEIGHT,dq as VISUAL_ODIGOS_LOGO_WIDTH,dp as VisualGreenRings,ds as VisualOdigosLogo}from"./chunks/ui-components-
|
|
1
|
+
export{dr as VISUAL_ODIGOS_LOGO_HEIGHT,dq as VISUAL_ODIGOS_LOGO_WIDTH,dp as VisualGreenRings,ds as VisualOdigosLogo}from"./chunks/ui-components-fb24c792.js";import"./icons.js";import"react";import"styled-components";import"zustand";import"javascript-time-ago";import"./chunks/vendor-0965fadc.js";import"react-dom";import"@xyflow/react";import"react-error-boundary";import"lottie-react";import"prism-react-renderer";
|