@odigos/ui-kit 0.0.170 → 0.0.172

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.
@@ -6,6 +6,8 @@ export declare enum TableVariant {
6
6
  export interface TableColumn {
7
7
  key: string;
8
8
  label: string;
9
+ noSort?: boolean;
10
+ noFilter?: boolean;
9
11
  minWidth?: CSSProperties['minWidth'];
10
12
  textAlign?: CSSProperties['textAlign'];
11
13
  }
@@ -6,6 +6,7 @@ export declare const FlexRow: import("styled-components/dist/types").IStyledComp
6
6
  $alignItems?: CSSProperties["alignItems"];
7
7
  $justifyContent?: CSSProperties["justifyContent"];
8
8
  $wrap?: CSSProperties["flexWrap"];
9
+ $width?: CSSProperties["width"];
9
10
  $padding?: CSSProperties["padding"];
10
11
  }>> & string;
11
12
  export declare const FlexColumn: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
@@ -13,13 +14,15 @@ export declare const FlexColumn: import("styled-components/dist/types").IStyledC
13
14
  $alignItems?: CSSProperties["alignItems"];
14
15
  $justifyContent?: CSSProperties["justifyContent"];
15
16
  $wrap?: CSSProperties["flexWrap"];
17
+ $width?: CSSProperties["width"];
16
18
  $padding?: CSSProperties["padding"];
17
19
  }>> & string;
18
- export declare const CenterThis: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$gap" | "$alignItems" | "$justifyContent" | "$wrap" | "$padding"> & {
20
+ export declare const CenterThis: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$gap" | "$alignItems" | "$justifyContent" | "$wrap" | "$width" | "$padding"> & {
19
21
  $gap?: number;
20
22
  $alignItems?: CSSProperties["alignItems"];
21
23
  $justifyContent?: CSSProperties["justifyContent"];
22
24
  $wrap?: CSSProperties["flexWrap"];
25
+ $width?: CSSProperties["width"];
23
26
  $padding?: CSSProperties["padding"];
24
27
  }, {
25
28
  $width?: CSSProperties["width"];
@@ -33,20 +36,22 @@ export declare const ModalBody: import("styled-components/dist/types").IStyledCo
33
36
  $isNotModal?: boolean;
34
37
  $minHeight?: CSSProperties["minHeight"];
35
38
  }>> & string;
36
- export declare const TableContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$gap" | "$alignItems" | "$justifyContent" | "$wrap" | "$padding"> & {
39
+ export declare const TableContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$gap" | "$alignItems" | "$justifyContent" | "$wrap" | "$width" | "$padding"> & {
37
40
  $gap?: number;
38
41
  $alignItems?: CSSProperties["alignItems"];
39
42
  $justifyContent?: CSSProperties["justifyContent"];
40
43
  $wrap?: CSSProperties["flexWrap"];
44
+ $width?: CSSProperties["width"];
41
45
  $padding?: CSSProperties["padding"];
42
46
  }, {
43
47
  $maxWidth: CSSProperties["maxWidth"];
44
48
  }>> & string;
45
- export declare const TableTitleWrap: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$gap" | "$alignItems" | "$justifyContent" | "$wrap" | "$padding"> & {
49
+ export declare const TableTitleWrap: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$gap" | "$alignItems" | "$justifyContent" | "$wrap" | "$width" | "$padding"> & {
46
50
  $gap?: number;
47
51
  $alignItems?: CSSProperties["alignItems"];
48
52
  $justifyContent?: CSSProperties["justifyContent"];
49
53
  $wrap?: CSSProperties["flexWrap"];
54
+ $width?: CSSProperties["width"];
50
55
  $padding?: CSSProperties["padding"];
51
56
  }, never>> & string;
52
57
  export declare const TableWrap: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
@@ -1 +1 @@
1
- export{B as Badge,m as Button,w as ButtonSize,dq as ButtonTab,dr as ButtonTabList,n as ButtonVariants,C as Checkbox,du as CheckboxList,dt as CheckboxSize,Q as CliCommand,K as DataCard,i as Drawer,dw as DropData,G as DropDataAlignX,dv as DropDataAlignY,dx as Header,c7 as HoverActions,M as IconButton,cj as IconButtonSize,dy as Input,I as Island,L as Loader,dz as Modal,dA as Navbar,l as Note,dC as Radio,dD as RadioGroup,dB as RadioSize,k as Search,t as SectionCard,ds as SectionCardSize,U as Segment,dE as SegmentSize,W as StatusCard,x as Table,y as TableVariant,dF as Tag,X as TextCard,d as Toggle,dH as ToggleLabelAlign,dI as ToggleList,e as ToggleSize,dG as ToggleVariant,T as Typography,b as TypographySize,f as TypographyVariants,dJ as WarningModal}from"../chunks/ui-components-917db301.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";
1
+ export{B as Badge,m as Button,w as ButtonSize,ds as ButtonTab,dt as ButtonTabList,n as ButtonVariants,C as Checkbox,dw as CheckboxList,dv as CheckboxSize,Q as CliCommand,K as DataCard,i as Drawer,dy as DropData,G as DropDataAlignX,dx as DropDataAlignY,dz as Header,c7 as HoverActions,M as IconButton,cj as IconButtonSize,dA as Input,I as Island,L as Loader,dB as Modal,dC as Navbar,l as Note,dE as Radio,dF as RadioGroup,dD as RadioSize,k as Search,t as SectionCard,du as SectionCardSize,U as Segment,dG as SegmentSize,W as StatusCard,x as Table,y as TableVariant,dH as Tag,X as TextCard,d as Toggle,dJ as ToggleLabelAlign,dK as ToggleList,e as ToggleSize,dI as ToggleVariant,T as Typography,b as TypographySize,f as TypographyVariants,dL as WarningModal}from"../chunks/ui-components-e5ad46f1.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{aH as AutocompleteInput,a_ as Badge,b0 as Button,as as CancelWarning,j as CenterThis,a6 as Checkbox,d7 as Code,ay as ConditionDetails,az as DataCard,a2 as DataCardFieldTypes,bJ as DataCardFields,d8 as DataFinger,b2 as DataTab,ar as DeleteWarning,c5 as DescribeRow,aI as Divider,ak as DocsButton,aq as Drawer,da as DrawerFooter,d9 as DrawerHeader,bo as Dropdown,db as ErrorBoundary,bw as ExtendArrow,q as FadeLoader,a7 as FieldError,a5 as FieldLabel,F as FlexColumn,a as FlexRow,dc as Header,bv as IconButton,cf as IconGroup,aV as IconTitleBadge,aQ as IconWrapped,c1 as IconsNav,dd as ImageControlled,a9 as Input,af as InputList,ac as InputTable,aY as InteractiveTable,ae as KeyValueInputsList,b$ as LoadingText,aC as Modal,aE as ModalBody,al as MonitorsCheckboxes,aS as MonitorsIcons,aD as NavigationButtons,N as NoDataFound,aF as NotificationNote,dj as Overlay,s as PageContent,bj as Popup,ck as PopupForm,cp as ScrollX,b5 as ScrollY,aj as SectionTitle,ai as Segment,bk as SelectionButton,ba as SkeletonLoader,aK as Status,bI as Stepper,de as TabList,aT as TableContainer,aU as TableTitleWrap,aX as TableWrap,bS as Tag,ah as Text,am as TextArea,ad as Toggle,cn as ToggleCodeComponent,c as Tooltip,aZ as TraceLoader,$ as UpgradeRequiredWrapper,bl as VerticalScroll,di as WarningModal,df as getLinksFromText,dg as getStrongsFromText,dh as renderText}from"./chunks/ui-components-917db301.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";
1
+ export{aH as AutocompleteInput,a_ as Badge,b0 as Button,as as CancelWarning,j as CenterThis,a6 as Checkbox,d9 as Code,ay as ConditionDetails,az as DataCard,a2 as DataCardFieldTypes,bJ as DataCardFields,da as DataFinger,b2 as DataTab,ar as DeleteWarning,c5 as DescribeRow,aI as Divider,ak as DocsButton,aq as Drawer,dc as DrawerFooter,db as DrawerHeader,bo as Dropdown,dd as ErrorBoundary,bw as ExtendArrow,q as FadeLoader,a7 as FieldError,a5 as FieldLabel,F as FlexColumn,a as FlexRow,de as Header,bv as IconButton,cf as IconGroup,aV as IconTitleBadge,aQ as IconWrapped,c1 as IconsNav,df as ImageControlled,a9 as Input,af as InputList,ac as InputTable,aY as InteractiveTable,ae as KeyValueInputsList,b$ as LoadingText,aC as Modal,aE as ModalBody,al as MonitorsCheckboxes,aS as MonitorsIcons,aD as NavigationButtons,N as NoDataFound,aF as NotificationNote,dl as Overlay,s as PageContent,bj as Popup,ck as PopupForm,cp as ScrollX,b5 as ScrollY,aj as SectionTitle,ai as Segment,bk as SelectionButton,ba as SkeletonLoader,aK as Status,bI as Stepper,dg as TabList,aT as TableContainer,aU as TableTitleWrap,aX as TableWrap,bS as Tag,ah as Text,am as TextArea,ad as Toggle,cn as ToggleCodeComponent,c as Tooltip,aZ as TraceLoader,$ as UpgradeRequiredWrapper,bl as VerticalScroll,dk as WarningModal,dh as getLinksFromText,di as getStrongsFromText,dj as renderText}from"./chunks/ui-components-e5ad46f1.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";
@@ -1,4 +1,8 @@
1
- import { ProgrammingLanguages } from '@/types';
1
+ import { OtelDistroName, ProgrammingLanguages } from '@/types';
2
2
  import type { DropdownOption } from '@/components';
3
3
  export declare const DISPLAY_LANGUAGES: Record<ProgrammingLanguages, string>;
4
4
  export declare const LANGUAGE_OPTIONS: DropdownOption<ProgrammingLanguages>[];
5
+ export declare const OTEL_DISTRO_NAME_OPTIONS: Record<ProgrammingLanguages, {
6
+ community: DropdownOption<OtelDistroName>[];
7
+ enterprise: DropdownOption<OtelDistroName>[];
8
+ }>;
package/lib/constants.js CHANGED
@@ -1 +1 @@
1
- export{aw as ACTION_OPTIONS,ap as BUTTON_TEXTS,D as DEFAULT_DATA_STREAM_NAME,bH as DESTINATION_CATEGORIES,bp as DISPLAY_LANGUAGES,a1 as DISPLAY_TITLES,aG as FORM_ALERTS,bW as INSTRUMENTATION_RULE_OPTIONS,c$ as LANGUAGE_OPTIONS,bq as MONITORS_OPTIONS,br as STORAGE_KEYS,d0 as TOKEN_ABOUT_TO_EXPIRE}from"./chunks/ui-components-917db301.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";
1
+ export{aw as ACTION_OPTIONS,ap as BUTTON_TEXTS,D as DEFAULT_DATA_STREAM_NAME,bH as DESTINATION_CATEGORIES,bp as DISPLAY_LANGUAGES,a1 as DISPLAY_TITLES,aG as FORM_ALERTS,bW as INSTRUMENTATION_RULE_OPTIONS,d0 as LANGUAGE_OPTIONS,bq as MONITORS_OPTIONS,d1 as OTEL_DISTRO_NAME_OPTIONS,br as STORAGE_KEYS,d2 as TOKEN_ABOUT_TO_EXPIRE}from"./chunks/ui-components-e5ad46f1.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";
@@ -1,9 +1,10 @@
1
1
  import { type CSSProperties } from 'react';
2
- export declare const Column: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$gap" | "$alignItems" | "$justifyContent" | "$wrap" | "$padding"> & {
2
+ export declare const Column: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$gap" | "$alignItems" | "$justifyContent" | "$wrap" | "$width" | "$padding"> & {
3
3
  $gap?: number;
4
4
  $alignItems?: import("styled-components").CSSProperties["alignItems"];
5
5
  $justifyContent?: import("styled-components").CSSProperties["justifyContent"];
6
6
  $wrap?: import("styled-components").CSSProperties["flexWrap"];
7
+ $width?: import("styled-components").CSSProperties["width"];
7
8
  $padding?: import("styled-components").CSSProperties["padding"];
8
9
  }, {
9
10
  $width: CSSProperties["width"];
@@ -1,5 +1,5 @@
1
1
  import { type FC, type CSSProperties } from 'react';
2
- import type { GetExtendedPodInfo, PodInfo } from '@/types';
2
+ import { type GetExtendedPodInfo, type PodInfo } from '@/types';
3
3
  export interface PodsInfoProps {
4
4
  isLoading?: boolean;
5
5
  tableRowsMaxHeight: CSSProperties['maxHeight'];
@@ -1,8 +1,8 @@
1
- import e,{useMemo as t,useState as a,useEffect as l,useCallback as n}from"react";import o,{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 m,O as h,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 A,P as R,R as P,k as T,l as D,m as z,n as N,o as L,p as V,q as M,r as O,s as W,t as j,v as F,A as U,w as E,x as H,y as G,z as q,I as Y,G as B,H as K,J as X,K as J,M as Q,Q as Z,Y as _,U as ee,V as te,W as ae,X as le,Z as ne,_ as oe,$ as se,a0 as ie}from"../chunks/ui-components-917db301.js";import{SourceIcon as re,VSquareIcon as ce,SettingsIcon as de,OdigosLogo as ue,ConnectionsIcon as pe,RefreshIcon as ge,DeleteIcon as me,VIcon as he,XIcon as be,XSquareIcon as fe,PodIcon as ye,ChevronUpIcon as we,ChevronDownIcon as Ce,TerminalIcon as ve,DownloadIcon as ke,PipelineCollectorIcon as xe,GatewayIcon as $e,YamlIcon as Se}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 Ie=o(i)`
1
+ import e,{useMemo as t,useState as a,useEffect as l,useCallback as n}from"react";import o,{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 m,O as h,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 A,P as R,R as P,k as D,l as T,m as z,n as N,o as L,p as M,q as V,r as O,s as W,t as F,v as j,A as E,w as U,x as H,y as G,z as q,I as Y,G as B,H as K,J as X,K as J,M as Q,Q as Z,Y as _,U as ee,V as te,W as ae,X as le,Z as ne,_ as oe,$ as se,a0 as ie}from"../chunks/ui-components-e5ad46f1.js";import{SourceIcon as re,VSquareIcon as ce,SettingsIcon as de,OdigosLogo as ue,ConnectionsIcon as pe,RefreshIcon as ge,DeleteIcon as me,VIcon as he,XIcon as be,XSquareIcon as fe,PodIcon as ye,ChevronUpIcon as we,ChevronDownIcon as Ce,TerminalIcon as ve,ArrowDownSquareIcon as ke,ArrowUpSquareIcon as xe,DownloadIcon as $e,PipelineCollectorIcon as Se,GatewayIcon as Ie,YamlIcon as Ae}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 Re=o(i)`
2
2
  width: ${({$width:e})=>e};
3
3
  gap: 12px;
4
4
  justify-content: space-between;
5
- `,Ae=o.div`
5
+ `,Pe=o.div`
6
6
  display: flex;
7
7
  flex-direction: column;
8
8
  padding: 12px;
@@ -13,7 +13,7 @@ import e,{useMemo as t,useState as a,useEffect as l,useCallback as n}from"react"
13
13
  background-color: ${({theme:e})=>e.v2.colors.silver[900]};
14
14
  overflow-y: auto;
15
15
  overflow-x: hidden;
16
- `,Re=o.div`
16
+ `,De=o.div`
17
17
  display: flex;
18
18
  align-items: center;
19
19
  justify-content: space-between;
@@ -25,55 +25,55 @@ import e,{useMemo as t,useState as a,useEffect as l,useCallback as n}from"react"
25
25
  &:hover {
26
26
  background-color: ${({theme:e})=>e.v2.colors.silver[600]};
27
27
  }
28
- `,Pe=({formData:a,handleSourceChange:l,handleSelectAll:n,selectedArea:o,searchText:i,filters:f})=>{const y=s(),{activeNamespace:w,isAll:C,isSome:v}=t(()=>{const e=o.value.clusterId&&o.value.namespaceName?a.find(({clusterId:e})=>e===o.value.clusterId)?.namespaces.find(({name:e})=>e===o.value.namespaceName):void 0;if(!e)return{activeNamespace:void 0,isAll:!1,isSome:!1};const t=e.workloads.filter(({selected:e})=>e).length;return{activeNamespace:e,isAll:t>0&&t===e.workloads.length,isSome:t>0&&t<e.workloads.length}},[a,o.value.clusterId,o.value.namespaceName]),k=t(()=>{if(!w)return[];const{clusterId:t}=o.value,{name:a,workloads:n}=w;return n.map(({name:n,selected:o,kind:s})=>{if(i&&!n.toLowerCase().includes(i.toLowerCase()))return null;const m=o||!1;if(f.showOnlySelected&&!m)return null;const h=()=>l({clusterId:t,workloadId:{namespace:a,name:n,kind:s}});return e.createElement(Re,{key:`${t}#${a}#${n}#${s}`,onClick:h},e.createElement(r,{$gap:12},e.createElement(c,{value:m,onChange:h}),e.createElement(d,{size:u.XS},n)),e.createElement(p,{label:s,status:g.Info,textSize:u.XXXS,backgroundColor:y.v2.colors.blue[900]}))})},[a,o.value.clusterId,w,i,f]);return e.createElement(Ie,{$width:"50%"},e.createElement(r,{$padding:"0 12px 0 28px",$gap:12},e.createElement(m,{text:(C?"Unselect":"Select")+" all workloads in the selected namespace"},e.createElement(c,{partiallyChecked:v,value:C,onChange:()=>n({clusterId:o.value.clusterId,namespaceName:o.value.namespaceName,boolean:!C}),disabled:!k.length})),e.createElement(r,{$gap:8},e.createElement(d,{size:u.XS,nowrap:!0},o.value.clusterId?`${o.value.clusterName} > ${o.value.namespaceName} > Workloads`:"Workloads"),e.createElement(p,{label:k.length,status:h.Unknown}))),e.createElement(Ae,{$borderRadius:"0 16px 16px 0"},k.length?k:e.createElement(b,{title:"Workloads not found",subTitle:"Please select a namespace to view workloads"})))},Te=({formData:a,handleSourceChange:l,handleSelectAll:n,selectedArea:o,searchText:i,filters:C})=>{const v=s(),{isAll:k,isSome:x}=t(()=>{const e=a.length>0&&a.every(({namespaces:e})=>e.every(({workloads:e})=>e.every(({selected:e})=>e)));return{isAll:e,isSome:!e&&a.length>0&&a.some(({namespaces:e})=>e.some(({workloads:e})=>e.some(({selected:e})=>e)))}},[a]),$=t(()=>a.flatMap(({clusterId:t,clusterName:a,namespaces:n})=>n.map(({name:n,workloads:s,selected:b})=>{if(i&&!n.toLowerCase().includes(i.toLowerCase()))return null;const k=s.filter(({selected:e})=>e).length,x=k>0&&k===s.length,$=k>0&&k<s.length,S=b||!1;if(C.showOnlySelected&&!x&&!$&&!S)return null;const I=o.value.clusterId===t&&o.value.namespaceName===n,A=()=>o.setValue({clusterId:t,clusterName:a,namespaceName:n}),R=e=>{A(),l({clusterId:t,workloadId:{namespace:n},auto:e.auto,selected:e.all})};return e.createElement(Re,{key:`${t}#${n}`,$isSelected:I,onClick:A},e.createElement(r,{$gap:12},e.createElement(c,{partiallyChecked:$,value:x,onChange:e=>R({auto:e,all:e})}),e.createElement(d,{size:u.XS},`${a} > ${n}`)),e.createElement(r,{$gap:12},e.createElement(m,{text:"Automatically instrument all workloads currently in the namespace, and all workloads that will be deployed to this namespace in the future"},e.createElement(f,{label:"Auto",size:y.S,value:S,onChange:e=>R({auto:e,all:e||void 0})})),e.createElement(r,{$gap:8},e.createElement(d,{variant:w.Span,size:u.XXXS,color:v.v2.colors.silver[200],align:"right"},"Selected"),e.createElement(p,{label:`${k}/${s.length}`,status:I?g.Default:h.Unknown,minWidth:"42px"}))))})),[a,o.value.clusterId,o.value.namespaceName,i,C]);return e.createElement(Ie,{$width:"50%"},e.createElement(r,{$padding:"0 12px 0 28px",$gap:12},e.createElement(m,{text:(k?"Unselect":"Select")+" all workloads in all namespaces"},e.createElement(c,{partiallyChecked:x,value:k,onChange:()=>n({boolean:!k}),disabled:!$.length})),e.createElement(r,{$gap:8},e.createElement(d,{size:u.XS,nowrap:!0},"Namespaces"),e.createElement(p,{label:$.length,status:h.Unknown}))),e.createElement(Ae,{$borderRadius:"16px 0 0 16px"},$.length?$:e.createElement(b,{title:"Namespaces not found",subTitle:""})))},De="75vw",ze=o.div`
28
+ `,Te=({formData:a,handleSourceChange:l,handleSelectAll:n,selectedArea:o,searchText:i,filters:f})=>{const y=s(),{activeNamespace:w,isAll:C,isSome:v}=t(()=>{const e=o.value.clusterId&&o.value.namespaceName?a.find(({clusterId:e})=>e===o.value.clusterId)?.namespaces.find(({name:e})=>e===o.value.namespaceName):void 0;if(!e)return{activeNamespace:void 0,isAll:!1,isSome:!1};const t=e.workloads.filter(({selected:e})=>e).length;return{activeNamespace:e,isAll:t>0&&t===e.workloads.length,isSome:t>0&&t<e.workloads.length}},[a,o.value.clusterId,o.value.namespaceName]),k=t(()=>{if(!w)return[];const{clusterId:t}=o.value,{name:a,workloads:n}=w;return n.map(({name:n,selected:o,kind:s})=>{if(i&&!n.toLowerCase().includes(i.toLowerCase()))return null;const m=o||!1;if(f.showOnlySelected&&!m)return null;const h=()=>l({clusterId:t,workloadId:{namespace:a,name:n,kind:s}});return e.createElement(De,{key:`${t}#${a}#${n}#${s}`,onClick:h},e.createElement(r,{$gap:12},e.createElement(c,{value:m,onChange:h}),e.createElement(d,{size:u.XS},n)),e.createElement(p,{label:s,status:g.Info,textSize:u.XXXS,backgroundColor:y.v2.colors.blue[900]}))})},[a,o.value.clusterId,w,i,f]);return e.createElement(Re,{$width:"50%"},e.createElement(r,{$padding:"0 12px 0 28px",$gap:12},e.createElement(m,{text:(C?"Unselect":"Select")+" all workloads in the selected namespace"},e.createElement(c,{partiallyChecked:v,value:C,onChange:()=>n({clusterId:o.value.clusterId,namespaceName:o.value.namespaceName,boolean:!C}),disabled:!k.length})),e.createElement(r,{$gap:8},e.createElement(d,{size:u.XS,nowrap:!0},o.value.clusterId?`${o.value.clusterName} > ${o.value.namespaceName} > Workloads`:"Workloads"),e.createElement(p,{label:k.length,status:h.Unknown}))),e.createElement(Pe,{$borderRadius:"0 16px 16px 0"},k.length?k:e.createElement(b,{title:"Workloads not found",subTitle:"Please select a namespace to view workloads"})))},ze=({formData:a,handleSourceChange:l,handleSelectAll:n,selectedArea:o,searchText:i,filters:C})=>{const v=s(),{isAll:k,isSome:x}=t(()=>{const e=a.length>0&&a.every(({namespaces:e})=>e.every(({workloads:e})=>e.every(({selected:e})=>e)));return{isAll:e,isSome:!e&&a.length>0&&a.some(({namespaces:e})=>e.some(({workloads:e})=>e.some(({selected:e})=>e)))}},[a]),$=t(()=>a.flatMap(({clusterId:t,clusterName:a,namespaces:n})=>n.map(({name:n,workloads:s,selected:b})=>{if(i&&!n.toLowerCase().includes(i.toLowerCase()))return null;const k=s.filter(({selected:e})=>e).length,x=k>0&&k===s.length,$=k>0&&k<s.length,S=b||!1;if(C.showOnlySelected&&!x&&!$&&!S)return null;const I=o.value.clusterId===t&&o.value.namespaceName===n,A=()=>o.setValue({clusterId:t,clusterName:a,namespaceName:n}),R=e=>{A(),l({clusterId:t,workloadId:{namespace:n},auto:e.auto,selected:e.all})};return e.createElement(De,{key:`${t}#${n}`,$isSelected:I,onClick:A},e.createElement(r,{$gap:12},e.createElement(c,{partiallyChecked:$,value:x,onChange:e=>R({auto:e,all:e})}),e.createElement(d,{size:u.XS},`${a} > ${n}`)),e.createElement(r,{$gap:12},e.createElement(m,{text:"Automatically instrument all workloads currently in the namespace, and all workloads that will be deployed to this namespace in the future"},e.createElement(f,{label:"Auto",size:y.S,value:S,onChange:e=>R({auto:e,all:e||void 0})})),e.createElement(r,{$gap:8},e.createElement(d,{variant:w.Span,size:u.XXXS,color:v.v2.colors.silver[200],align:"right"},"Selected"),e.createElement(p,{label:`${k}/${s.length}`,status:I?g.Default:h.Unknown,minWidth:"42px"}))))})),[a,o.value.clusterId,o.value.namespaceName,i,C]);return e.createElement(Re,{$width:"50%"},e.createElement(r,{$padding:"0 12px 0 28px",$gap:12},e.createElement(m,{text:(k?"Unselect":"Select")+" all workloads in all namespaces"},e.createElement(c,{partiallyChecked:x,value:k,onChange:()=>n({boolean:!k}),disabled:!$.length})),e.createElement(r,{$gap:8},e.createElement(d,{size:u.XS,nowrap:!0},"Namespaces"),e.createElement(p,{label:$.length,status:h.Unknown}))),e.createElement(Pe,{$borderRadius:"16px 0 0 16px"},$.length?$:e.createElement(b,{title:"Namespaces not found",subTitle:""})))},Ne="75vw",Le=o.div`
29
29
  display: flex;
30
30
  flex-direction: column;
31
31
  border-radius: 16px;
32
32
  background-color: ${({theme:e})=>e.v2.colors.silver[1e3]};
33
33
  overflow: hidden;
34
- `,Ne=o.div`
34
+ `,Me=o.div`
35
35
  display: flex;
36
36
  gap: 12px;
37
37
  padding: 16px;
38
38
  background-color: ${({theme:e})=>e.v2.colors.silver[1e3]};
39
39
  position: sticky;
40
40
  top: 0;
41
- `,Le=o.div`
41
+ `,Ve=o.div`
42
42
  display: flex;
43
43
  gap: 12px;
44
44
  padding: 16px;
45
- `,Ve=o.div`
45
+ `,Oe=o.div`
46
46
  padding: 5vh 10vw;
47
47
  border-radius: 12px;
48
48
  background-color: ${({theme:e})=>e.v2.colors.silver[800]};
49
- `,Me=o.div`
49
+ `,We=o.div`
50
50
  display: flex;
51
51
  align-items: center;
52
52
  justify-content: flex-end;
53
53
  gap: 16px;
54
54
  padding: 0 12px;
55
- `,Oe=({onClose:o,snapshots:i,selectedConnectionIds:c,setSelectedConnectionIds:p,persistSources:m})=>{const h=s(),{selectedStreamName:b}=C(),{progress:w,resetProgress:V}=v(),M=t(()=>b||k,[b]),[O,W]=a(""),[j,F]=a(x.Namespace),[U,E]=a({showOnlySelected:!1}),[H,G]=a(!1),[q,Y]=a(!1),[B,K]=a(void 0),[X,J]=a({clusterId:"",clusterName:"",namespaceName:""}),[Q,Z]=a([]);l(()=>{Z(e=>{const t=((e,t)=>$(((e,t)=>e.clusters.filter(({clusterId:e})=>t.includes(e)))(e,t)))(i,c);return t.map(t=>{const a=e?.find(e=>e.clusterId===t.clusterId);return a??t})})},[i,c]);const{formDiff:_,isFormDirty:ee}=t(()=>{const e=((e,t,a)=>{const l={};return e.forEach(e=>{e.namespaces.forEach(n=>{const o=t.find(t=>t.clusterId===e.clusterId)?.namespaces.find(e=>e.name===n.name),s=n.selected||!1,i=s!==o?.selected;if(i&&(l[e.clusterId]||(l[e.clusterId]=[]),l[e.clusterId].push({namespace:n.name,selected:s,currentStreamName:a}),s&&(l[e.clusterId]=l[e.clusterId].filter(e=>e.namespace!==n.name||e.namespace===n.name&&(!e.name||!e.kind)))),!i||!s){const t=((e,t,a)=>{const l=[];return t.workloads.forEach(n=>{const o=e?.workloads.find(e=>e.name===n.name&&e.kind===n.kind);n.selected!==o?.selected&&l.push({namespace:t.name,name:n.name,kind:n.kind,selected:n.selected||!1,currentStreamName:a})}),l})(o,n,a);t.length>0&&(l[e.clusterId]||(l[e.clusterId]=[]),l[e.clusterId].push(...t))}})}),l})(Q,i.clusters,M);return{formDiff:e,isFormDirty:Object.keys(e).length>0}},[Q,i,M]),te=n(({clusterId:e,workloadId:t,selected:a,auto:l})=>{Z(n=>{const o=$(n),s=o.findIndex(t=>t.clusterId===e);if(-1===s)return o;const i=o[s].namespaces.findIndex(e=>e.name===t.namespace);if(-1===i)return o;if(t.kind&&t.name){const e=o[s].namespaces[i].workloads.findIndex(e=>e.name===t.name&&e.kind===t.kind);if(-1===e)return o;const l="boolean"==typeof a?a:!o[s].namespaces[i].workloads[e].selected;o[s].namespaces[i].workloads[e].selected=l,l?o[s].namespaces[i].workloads.every(e=>e.selected)&&(o[s].namespaces[i].selected=!0):o[s].namespaces[i].selected=!1}else{const e="boolean"==typeof l?l:!o[s].namespaces[i].selected;o[s].namespaces[i].selected=e,e?o[s].namespaces[i].workloads.forEach(e=>{e.selected=!0}):"boolean"!=typeof a||a||o[s].namespaces[i].workloads.forEach(e=>{e.selected=!1})}return o})},[]),ae=n(({clusterId:e,namespaceName:t,boolean:a})=>{Z(l=>{const n=$(l);return n.forEach((l,o)=>{e&&l.clusterId!==e||l.namespaces.forEach(({name:e,workloads:l},s)=>{t&&e!==t||(n[o].namespaces[s].selected=a,l.forEach((e,t)=>{n[o].namespaces[s].workloads[t].selected=a}))})}),n})},[]),le=()=>{G(!1),o()};return e.createElement(S,{isOpen:!0,hideOverlay:!q,width:De,header:{icon:re,title:"Manage Sources",onClose:o,onCloseDisabled:q}},q?e.createElement(I,{$height:"calc(100vh - 136px)"},e.createElement(Ve,null,e.createElement(A,{title:"Creating Sources...",titleSize:u.S,subTitle:"This may take a few moments while sources are being created.",subTitleSize:u.XXXS,withGradient:!0,withSpinner:!0,prettySpinner:!0,percentage:w[R.BulkInstrumenting]?.percentage||0}))):e.createElement(ze,null,e.createElement(Ne,null,e.createElement(P,{icon:ce,title:"Selected Clusters",badge:{label:c.length}}),e.createElement(T,{width:"300px",value:O,onChange:W,segment:{options:[{label:"Namespace",value:x.Namespace},{label:"Source",value:x.Source}],selected:j,setSelected:F}}),e.createElement(r,{$gap:8},e.createElement(d,{size:u.XXXS,color:h.v2.colors.silver[200],nowrap:!0},"Show only:"),e.createElement(f,{size:y.S,label:"Selected",value:U.showOnlySelected,onChange:e=>E(t=>({...t,showOnlySelected:e}))}))),e.createElement(Le,null,e.createElement(Te,{formData:Q,handleSourceChange:te,handleSelectAll:ae,selectedArea:{value:X,setValue:J},searchText:j===x.Namespace?O:"",filters:U}),e.createElement(Pe,{formData:Q,handleSourceChange:te,handleSelectAll:ae,selectedArea:{value:X,setValue:J},searchText:j===x.Source?O:"",filters:U}))),e.createElement(Me,null,q?null:B?e.createElement(D,{fullWidth:!0,status:g.Error,message:B}):ee?e.createElement(D,{fullWidth:!0,status:g.Info,message:'The values don\'t reflect the current configuration of the selected clusters.\n"Apply" will override the current configurations.'}):ee?null:e.createElement(D,{fullWidth:!0,status:g.Success,message:"The values reflect the current configuration of the selected cluster."}),e.createElement(r,{$gap:8},e.createElement("div",{style:{width:"150px"}},e.createElement(z,{fullWidth:!0,variant:N.Secondary,label:"Cancel",onClick:()=>ee?G(!0):le(),disabled:!ee||q})),e.createElement("div",{style:{width:"150px"}},e.createElement(z,{fullWidth:!0,variant:N.Primary,label:"Save",onClick:async()=>{Y(!0);const e=await m(_);V(R.BulkInstrumenting),Y(!1),e?.error?K(e.error):(p([]),o())},disabled:!ee||q})))),e.createElement(L,{isOpen:H,onClose:()=>G(!1),onApprove:le}))},We="75vw",je=o.div`
55
+ `,Fe=({onClose:o,snapshots:i,selectedConnectionIds:c,setSelectedConnectionIds:p,persistSources:m})=>{const h=s(),{selectedStreamName:b}=C(),{progress:w,resetProgress:M}=v(),V=t(()=>b||k,[b]),[O,W]=a(""),[F,j]=a(x.Namespace),[E,U]=a({showOnlySelected:!1}),[H,G]=a(!1),[q,Y]=a(!1),[B,K]=a(void 0),[X,J]=a({clusterId:"",clusterName:"",namespaceName:""}),[Q,Z]=a([]);l(()=>{Z(e=>{const t=((e,t)=>$(((e,t)=>e.clusters.filter(({clusterId:e})=>t.includes(e)))(e,t)))(i,c);return t.map(t=>{const a=e?.find(e=>e.clusterId===t.clusterId);return a??t})})},[i,c]);const{formDiff:_,isFormDirty:ee}=t(()=>{const e=((e,t,a)=>{const l={};return e.forEach(e=>{e.namespaces.forEach(n=>{const o=t.find(t=>t.clusterId===e.clusterId)?.namespaces.find(e=>e.name===n.name),s=n.selected||!1,i=s!==o?.selected;if(i&&(l[e.clusterId]||(l[e.clusterId]=[]),l[e.clusterId].push({namespace:n.name,selected:s,currentStreamName:a}),s&&(l[e.clusterId]=l[e.clusterId].filter(e=>e.namespace!==n.name||e.namespace===n.name&&(!e.name||!e.kind)))),!i||!s){const t=((e,t,a)=>{const l=[];return t.workloads.forEach(n=>{const o=e?.workloads.find(e=>e.name===n.name&&e.kind===n.kind);n.selected!==o?.selected&&l.push({namespace:t.name,name:n.name,kind:n.kind,selected:n.selected||!1,currentStreamName:a})}),l})(o,n,a);t.length>0&&(l[e.clusterId]||(l[e.clusterId]=[]),l[e.clusterId].push(...t))}})}),l})(Q,i.clusters,V);return{formDiff:e,isFormDirty:Object.keys(e).length>0}},[Q,i,V]),te=n(({clusterId:e,workloadId:t,selected:a,auto:l})=>{Z(n=>{const o=$(n),s=o.findIndex(t=>t.clusterId===e);if(-1===s)return o;const i=o[s].namespaces.findIndex(e=>e.name===t.namespace);if(-1===i)return o;if(t.kind&&t.name){const e=o[s].namespaces[i].workloads.findIndex(e=>e.name===t.name&&e.kind===t.kind);if(-1===e)return o;const l="boolean"==typeof a?a:!o[s].namespaces[i].workloads[e].selected;o[s].namespaces[i].workloads[e].selected=l,l?o[s].namespaces[i].workloads.every(e=>e.selected)&&(o[s].namespaces[i].selected=!0):o[s].namespaces[i].selected=!1}else{const e="boolean"==typeof l?l:!o[s].namespaces[i].selected;o[s].namespaces[i].selected=e,e?o[s].namespaces[i].workloads.forEach(e=>{e.selected=!0}):"boolean"!=typeof a||a||o[s].namespaces[i].workloads.forEach(e=>{e.selected=!1})}return o})},[]),ae=n(({clusterId:e,namespaceName:t,boolean:a})=>{Z(l=>{const n=$(l);return n.forEach((l,o)=>{e&&l.clusterId!==e||l.namespaces.forEach(({name:e,workloads:l},s)=>{t&&e!==t||(n[o].namespaces[s].selected=a,l.forEach((e,t)=>{n[o].namespaces[s].workloads[t].selected=a}))})}),n})},[]),le=()=>{G(!1),o()};return e.createElement(S,{isOpen:!0,hideOverlay:!q,width:Ne,header:{icon:re,title:"Manage Sources",onClose:o,onCloseDisabled:q}},q?e.createElement(I,{$height:"calc(100vh - 136px)"},e.createElement(Oe,null,e.createElement(A,{title:"Creating Sources...",titleSize:u.S,subTitle:"This may take a few moments while sources are being created.",subTitleSize:u.XXXS,withGradient:!0,withSpinner:!0,prettySpinner:!0,percentage:w[R.BulkInstrumenting]?.percentage||0}))):e.createElement(Le,null,e.createElement(Me,null,e.createElement(P,{icon:ce,title:"Selected Clusters",badge:{label:c.length}}),e.createElement(D,{width:"300px",value:O,onChange:W,segment:{options:[{label:"Namespace",value:x.Namespace},{label:"Source",value:x.Source}],selected:F,setSelected:j}}),e.createElement(r,{$gap:8},e.createElement(d,{size:u.XXXS,color:h.v2.colors.silver[200],nowrap:!0},"Show only:"),e.createElement(f,{size:y.S,label:"Selected",value:E.showOnlySelected,onChange:e=>U(t=>({...t,showOnlySelected:e}))}))),e.createElement(Ve,null,e.createElement(ze,{formData:Q,handleSourceChange:te,handleSelectAll:ae,selectedArea:{value:X,setValue:J},searchText:F===x.Namespace?O:"",filters:E}),e.createElement(Te,{formData:Q,handleSourceChange:te,handleSelectAll:ae,selectedArea:{value:X,setValue:J},searchText:F===x.Source?O:"",filters:E}))),e.createElement(We,null,q?null:B?e.createElement(T,{fullWidth:!0,status:g.Error,message:B}):ee?e.createElement(T,{fullWidth:!0,status:g.Info,message:'The values don\'t reflect the current configuration of the selected clusters.\n"Apply" will override the current configurations.'}):ee?null:e.createElement(T,{fullWidth:!0,status:g.Success,message:"The values reflect the current configuration of the selected cluster."}),e.createElement(r,{$gap:8},e.createElement("div",{style:{width:"150px"}},e.createElement(z,{fullWidth:!0,variant:N.Secondary,label:"Cancel",onClick:()=>ee?G(!0):le(),disabled:!ee||q})),e.createElement("div",{style:{width:"150px"}},e.createElement(z,{fullWidth:!0,variant:N.Primary,label:"Save",onClick:async()=>{Y(!0);const e=await m(_);M(R.BulkInstrumenting),Y(!1),e?.error?K(e.error):(p([]),o())},disabled:!ee||q})))),e.createElement(L,{isOpen:H,onClose:()=>G(!1),onApprove:le}))},je="75vw",Ee=o.div`
56
56
  display: flex;
57
57
  flex-direction: column;
58
58
  border-radius: 16px;
59
59
  background-color: ${({theme:e})=>e.v2.colors.silver[1e3]};
60
60
  overflow: hidden;
61
- `,Fe=o.div`
61
+ `,Ue=o.div`
62
62
  display: flex;
63
63
  gap: 12px;
64
64
  padding: 16px;
65
65
  background-color: ${({theme:e})=>e.v2.colors.silver[1e3]};
66
66
  position: sticky;
67
67
  top: 0;
68
- `,Ue=o.div`
68
+ `,He=o.div`
69
69
  display: flex;
70
70
  gap: 12px;
71
71
  padding: 16px;
72
- `,Ee=o(i)`
72
+ `,Ge=o(i)`
73
73
  width: ${({$width:e})=>e};
74
74
  gap: 12px;
75
75
  justify-content: space-between;
76
- `,He=o.div`
76
+ `,qe=o.div`
77
77
  display: flex;
78
78
  flex-direction: column;
79
79
  padding: 12px;
@@ -84,7 +84,7 @@ import e,{useMemo as t,useState as a,useEffect as l,useCallback as n}from"react"
84
84
  background-color: ${({theme:e})=>e.v2.colors.silver[900]};
85
85
  overflow-y: auto;
86
86
  overflow-x: hidden;
87
- `,Ge=o.div`
87
+ `,Ye=o.div`
88
88
  display: flex;
89
89
  align-items: center;
90
90
  gap: 12px;
@@ -95,13 +95,13 @@ import e,{useMemo as t,useState as a,useEffect as l,useCallback as n}from"react"
95
95
  &:hover {
96
96
  background-color: ${({theme:e})=>e.v2.colors.silver[600]};
97
97
  }
98
- `,qe=o.div`
98
+ `,Be=o.div`
99
99
  display: flex;
100
100
  align-items: center;
101
101
  justify-content: flex-end;
102
102
  gap: 16px;
103
103
  padding: 0 12px;
104
- `,Ye=({onClose:n,connections:o,selectedConnectionIds:i,setSelectedConnectionIds:m,getConnectionRemoteConfig:b,onApply:w})=>{const C=s(),[v,k]=a(""),[x,$]=a({showOnlySelected:!1}),I=t(()=>o.filter(e=>(!v||e.name.toLowerCase().includes(v.toLowerCase()))&&(!x.showOnlySelected||i.includes(e.id))),[o,i.length,v,x]),R=e=>{m(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},[O,W]=a(!1),[j,F]=a(!1),[U,E]=a(void 0),[H,G]=a(!1),[q,Y]=a(void 0),{formData:B,handleFormChange:K,areFormValuesEqual:X,resetFormData:J}=V(q||{automaticRollout:!0}),{isFormDirty:Q,isFormMatch:Z}=t(()=>({isFormDirty:i.length>1||void 0!==q&&!X(q,B),isFormMatch:1===i.length&&void 0!==q&&X(q,B)}),[i.length,q,B]);l(()=>{1===i.length?(async e=>{if(H)return;G(!0);const t=await b(e);if(t){const e={automaticRollout:!t.rollout?.automaticRolloutDisabled};Y(e),J(e)}G(!1)})(i[0]):Y(void 0)},[i.length]);const _=()=>{W(!1),n()};return e.createElement(S,{isOpen:!0,hideOverlay:!0,width:We,header:{icon:de,title:"Cluster Configuration",onClose:n}},e.createElement(je,null,e.createElement(Fe,null,e.createElement(P,{icon:ce,title:"Selected Clusters",badge:{label:i.length}}),e.createElement(T,{width:"300px",placeholder:"Search by cluster name",value:v,onChange:k}),e.createElement(r,{$gap:8},e.createElement(d,{size:u.XXXS,color:C.v2.colors.silver[200],nowrap:!0},"Show only:"),e.createElement(f,{size:y.S,label:"Selected",value:x.showOnlySelected,onChange:e=>$(t=>({...t,showOnlySelected:e}))}))),e.createElement(Ue,null,e.createElement(Ee,{$width:"40%"},e.createElement(r,{$padding:"0 12px",$justifyContent:"space-between"},e.createElement(r,{$gap:8},e.createElement(d,{size:u.XS},"Clusters"),e.createElement(p,{label:o.length,status:h.Unknown})),e.createElement(r,{$gap:8},e.createElement(d,{size:u.XXXS,color:C.v2.colors.silver[200],align:"right"},"Selected clusters"),e.createElement(p,{label:`${i.length}/${o.length}`,status:h.Unknown}))),e.createElement(He,{$borderRadius:"16px 0 0 16px"},I.map(t=>e.createElement(Ge,{key:t.id,onClick:()=>R(t.id)},e.createElement(c,{value:i.includes(t.id),onChange:()=>R(t.id)}),e.createElement(d,{size:u.XS},t.name))))),e.createElement(Ee,{$width:"60%"},e.createElement(r,{$padding:"0 12px"},e.createElement(d,{size:u.XS},"Configurations")),e.createElement(He,{$borderRadius:"0 16px 16px 0",$gap:12},H?e.createElement(M,null):e.createElement(f,{label:"Automatic Rollout "+(B.automaticRollout?"Enabled":"Disabled"),tooltip:"Odigos automatically triggers a one-time rollout for workloads when instrumenting or uninstrumenting, ensuring that changes are applied without requiring manual intervention. When automatic rollout is enabled, Odigos will proactively restart workloads as needed to apply updated instrumentation. Users do not need to manually trigger rollouts after adding or removing sources. Any new pods created after enabling or disabling the agent (via automatic rollout, autoscaling, etc.) will still have the agent injected, regardless of this setting. When set to false, additional configurations related to automated rollouts or rollbacks take effect.",value:B.automaticRollout,onChange:e=>K("automaticRollout",e)}))))),e.createElement(qe,null,H?e.createElement(A,{icon:ue,title:"Fetching Configuration...",titleSize:u.XXS,withGradient:!0}):j?e.createElement(A,{icon:ue,title:"Applying Configurations...",titleSize:u.XXS,withGradient:!0}):U?e.createElement(D,{fullWidth:!0,status:g.Error,message:U}):Q?e.createElement(D,{fullWidth:!0,status:g.Info,message:'The values don\'t reflect the current configuration of the selected clusters.\n"Apply" will override the current configurations.'}):Z?e.createElement(D,{fullWidth:!0,status:g.Success,message:"The values reflect the current configuration of the selected cluster."}):null,e.createElement(r,{$gap:8},e.createElement("div",{style:{width:"150px"}},e.createElement(z,{fullWidth:!0,variant:N.Secondary,label:"Cancel",onClick:()=>Q?W(!0):_(),disabled:j})),e.createElement("div",{style:{width:"150px"}},e.createElement(z,{fullWidth:!0,variant:N.Primary,label:"Save",onClick:async()=>{F(!0);const e=await w(i,B);F(!1),e?.error?E(e.error):(m([]),n())},disabled:!Q||j})))),e.createElement(L,{isOpen:O,onClose:()=>W(!1),onApprove:_}))};var Be,Ke;!function(e){e.BulkConfig="bulk-config",e.BulkSource="bulk-source",e.BulkDestination="bulk-destination",e.BulkAction="bulk-action",e.BulkInstrumentationRule="bulk-instrumentation-rule",e.Delete="delete"}(Be||(Be={})),function(e){e.Id="id",e.Name="name",e.Type="type",e.Status="status",e.OdigosVersion="odigosVersion",e.ConnectedSince="connectedSince",e.LastActivity="lastActivity"}(Ke||(Ke={}));const Xe=[{key:Ke.Name,label:"Name"},{key:Ke.Type,label:"Type",textAlign:"right"},{key:Ke.Status,label:"Status"},{key:Ke.OdigosVersion,label:"Odigos Version"},{key:Ke.ConnectedSince,label:"Connected Since"},{key:Ke.LastActivity,label:"Last Activity"}],Je=(e,t)=>{const a=e.find(e=>e.key===Ke.Id)?.rawValue;a&&t(a.toString())},Qe=({tableRowsMaxHeight:o,connections:i,getConnections:r,onClickConnection:c,deleteConnection:d,getConnectionRemoteConfig:u,applyConfigurations:m,getAllClusterSnapshots:b,persistSources:f})=>{const y=s(),{formatTimeAgo:w}=O(),[C,v]=a(!1),[k,x]=a(i||[]),[$,S]=a(!1),[I,A]=a(null),R=n(async()=>{try{v(!0),x(await r()??[])}catch(e){}finally{v(!1)}},[]),P=n(async()=>{if(b)try{S(!0),A(await b()??null)}catch(e){}finally{S(!1)}},[]);l(()=>{k.length||R()},[k.length,R]),l(()=>{I||P()},[I,P]);const[T,D]=a(""),[z,L]=a(null),[V,M]=a([]),K=t(()=>k.filter(e=>e.status===g.Success),[k]),X=t(()=>k.filter(e=>!T||e.name.toLowerCase().includes(T.toLowerCase())).map(t=>({cells:[{key:Ke.Id,rawValue:t.id},{key:Ke.Name,rawValue:t.name},{key:Ke.Type,rawValue:t.type},{key:Ke.Status,rawValue:t.status,component:()=>(t=>{const a=t===g.Success?"Connection live":"Connection lost",l=t===g.Success?he:be;return e.createElement(p,{status:t,label:a,leftIcon:l})})(t.status)},{key:Ke.OdigosVersion,rawValue:t.odigosVersion},{key:Ke.ConnectedSince,rawValue:t.connectedAt?w(t.connectedAt):"-"},{key:Ke.LastActivity,rawValue:t.lastSeenAt?w(t.lastSeenAt):"-"}],onClick:t.status===g.Success?()=>c(t):void 0,isSelected:V.includes(t.id),onSelect:()=>M(e=>Array.from(new Set([...e,t.id]))),onDeselect:()=>M(e=>e.filter(e=>e!==t.id)),hideCheckbox:t.status!==g.Success})),[k,V,T]);return e.createElement(W,null,e.createElement(j,{richTitle:{icon:pe,title:"Connections",badge:{label:k.length.toString(),status:h.Unknown}},search:{placeholder:"Search by cluster name",value:T,onChange:e=>D(e),width:"300px"},actions:[{id:F(),type:U.Button,buttonProps:{variant:N.Secondary,size:E.S,leftIcon:ge,onClick:async()=>{await R(),await P()},disabled:C||$}}]},e.createElement(H,{variant:G.Pretty,maxHeight:o,headerBackgroundColor:y.v2.colors.silver[1e3],isLoading:C,withCheckboxes:!0,columns:Xe,rows:X,rowActionsPushRightPosition:z?`calc(${z===Be.BulkConfig?We:De} - 24px)`:void 0,getRowActions:({cells:e})=>(e=>e.find(e=>e.key===Ke.Status)?.rawValue===g.Success)(e)?[I&&f?{id:F(),tooltip:"Manage Sources",rightIcon:re,onClick:async()=>{Je(e,e=>{M([e]),L(Be.BulkSource)})}}:null,u&&m?{id:F(),tooltip:"Edit Configuration",rightIcon:de,onClick:async()=>{Je(e,e=>{M([e]),L(Be.BulkConfig)})}}:null]:[{id:F(),label:"Delete Connection",rightIcon:me,onClick:()=>{Je(e,e=>{M([e]),L(Be.Delete)})}}]}),z===Be.BulkConfig&&u&&m&&e.createElement(Ye,{onClose:()=>L(null),connections:K,selectedConnectionIds:V,setSelectedConnectionIds:M,getConnectionRemoteConfig:u,onApply:m}),z===Be.BulkSource&&I&&f&&e.createElement(Oe,{onClose:()=>L(null),snapshots:I,selectedConnectionIds:V,setSelectedConnectionIds:M,persistSources:async e=>{if(!f)return{error:"Persist sources function is not defined"};const t=await f(e);return t?.error||await P(),t}}),e.createElement(q,{target:"connection",isOpen:z===Be.Delete,onClose:()=>{M([]),L(null)},onApprove:async()=>{const e=V[0];e&&(await d(e),await R())}}),e.createElement(Y,{isOpen:!!V.length&&!z,richTitle:{icon:ce,title:"Selected Clusters",badge:{label:V.length}},actions:[{id:F(),type:U.Button,buttonProps:{variant:N.Text,size:E.S,label:"Cancel",onClick:()=>M([])}},I&&f?{id:F(),type:U.ButtonDropData,buttonProps:{variant:N.Secondary,size:E.S,label:"Add Component",onClick:e=>L(e)},dropDataProps:{alignX:B.Left,items:[{id:Be.BulkSource,label:"Add Source",icon:re}]}}:null,u&&m?{id:F(),type:U.Button,buttonProps:{variant:N.Primary,size:E.S,label:"Manage Configurations",rightIcon:de,onClick:()=>L(Be.BulkConfig)}}:null]})))},Ze=o.div`
104
+ `,Ke=({onClose:n,connections:o,selectedConnectionIds:i,setSelectedConnectionIds:m,getConnectionRemoteConfig:b,onApply:w})=>{const C=s(),[v,k]=a(""),[x,$]=a({showOnlySelected:!1}),I=t(()=>o.filter(e=>(!v||e.name.toLowerCase().includes(v.toLowerCase()))&&(!x.showOnlySelected||i.includes(e.id))),[o,i.length,v,x]),R=e=>{m(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},[O,W]=a(!1),[F,j]=a(!1),[E,U]=a(void 0),[H,G]=a(!1),[q,Y]=a(void 0),{formData:B,handleFormChange:K,areFormValuesEqual:X,resetFormData:J}=M(q||{automaticRollout:!0}),{isFormDirty:Q,isFormMatch:Z}=t(()=>({isFormDirty:i.length>1||void 0!==q&&!X(q,B),isFormMatch:1===i.length&&void 0!==q&&X(q,B)}),[i.length,q,B]);l(()=>{1===i.length?(async e=>{if(H)return;G(!0);const t=await b(e);if(t){const e={automaticRollout:!t.rollout?.automaticRolloutDisabled};Y(e),J(e)}G(!1)})(i[0]):Y(void 0)},[i.length]);const _=()=>{W(!1),n()};return e.createElement(S,{isOpen:!0,hideOverlay:!0,width:je,header:{icon:de,title:"Cluster Configuration",onClose:n}},e.createElement(Ee,null,e.createElement(Ue,null,e.createElement(P,{icon:ce,title:"Selected Clusters",badge:{label:i.length}}),e.createElement(D,{width:"300px",placeholder:"Search by cluster name",value:v,onChange:k}),e.createElement(r,{$gap:8},e.createElement(d,{size:u.XXXS,color:C.v2.colors.silver[200],nowrap:!0},"Show only:"),e.createElement(f,{size:y.S,label:"Selected",value:x.showOnlySelected,onChange:e=>$(t=>({...t,showOnlySelected:e}))}))),e.createElement(He,null,e.createElement(Ge,{$width:"40%"},e.createElement(r,{$padding:"0 12px",$justifyContent:"space-between"},e.createElement(r,{$gap:8},e.createElement(d,{size:u.XS},"Clusters"),e.createElement(p,{label:o.length,status:h.Unknown})),e.createElement(r,{$gap:8},e.createElement(d,{size:u.XXXS,color:C.v2.colors.silver[200],align:"right"},"Selected clusters"),e.createElement(p,{label:`${i.length}/${o.length}`,status:h.Unknown}))),e.createElement(qe,{$borderRadius:"16px 0 0 16px"},I.map(t=>e.createElement(Ye,{key:t.id,onClick:()=>R(t.id)},e.createElement(c,{value:i.includes(t.id),onChange:()=>R(t.id)}),e.createElement(d,{size:u.XS},t.name))))),e.createElement(Ge,{$width:"60%"},e.createElement(r,{$padding:"0 12px"},e.createElement(d,{size:u.XS},"Configurations")),e.createElement(qe,{$borderRadius:"0 16px 16px 0",$gap:12},H?e.createElement(V,null):e.createElement(f,{label:"Automatic Rollout "+(B.automaticRollout?"Enabled":"Disabled"),tooltip:"Odigos automatically triggers a one-time rollout for workloads when instrumenting or uninstrumenting, ensuring that changes are applied without requiring manual intervention. When automatic rollout is enabled, Odigos will proactively restart workloads as needed to apply updated instrumentation. Users do not need to manually trigger rollouts after adding or removing sources. Any new pods created after enabling or disabling the agent (via automatic rollout, autoscaling, etc.) will still have the agent injected, regardless of this setting. When set to false, additional configurations related to automated rollouts or rollbacks take effect.",value:B.automaticRollout,onChange:e=>K("automaticRollout",e)}))))),e.createElement(Be,null,H?e.createElement(A,{icon:ue,title:"Fetching Configuration...",titleSize:u.XXS,withGradient:!0}):F?e.createElement(A,{icon:ue,title:"Applying Configurations...",titleSize:u.XXS,withGradient:!0}):E?e.createElement(T,{fullWidth:!0,status:g.Error,message:E}):Q?e.createElement(T,{fullWidth:!0,status:g.Info,message:'The values don\'t reflect the current configuration of the selected clusters.\n"Apply" will override the current configurations.'}):Z?e.createElement(T,{fullWidth:!0,status:g.Success,message:"The values reflect the current configuration of the selected cluster."}):null,e.createElement(r,{$gap:8},e.createElement("div",{style:{width:"150px"}},e.createElement(z,{fullWidth:!0,variant:N.Secondary,label:"Cancel",onClick:()=>Q?W(!0):_(),disabled:F})),e.createElement("div",{style:{width:"150px"}},e.createElement(z,{fullWidth:!0,variant:N.Primary,label:"Save",onClick:async()=>{j(!0);const e=await w(i,B);j(!1),e?.error?U(e.error):(m([]),n())},disabled:!Q||F})))),e.createElement(L,{isOpen:O,onClose:()=>W(!1),onApprove:_}))};var Xe,Je;!function(e){e.BulkConfig="bulk-config",e.BulkSource="bulk-source",e.BulkDestination="bulk-destination",e.BulkAction="bulk-action",e.BulkInstrumentationRule="bulk-instrumentation-rule",e.Delete="delete"}(Xe||(Xe={})),function(e){e.Id="id",e.Name="name",e.Type="type",e.Status="status",e.OdigosVersion="odigosVersion",e.ConnectedSince="connectedSince",e.LastActivity="lastActivity"}(Je||(Je={}));const Qe=[{key:Je.Name,label:"Name"},{key:Je.Type,label:"Type",textAlign:"right"},{key:Je.Status,label:"Status"},{key:Je.OdigosVersion,label:"Odigos Version"},{key:Je.ConnectedSince,label:"Connected Since"},{key:Je.LastActivity,label:"Last Activity"}],Ze=(e,t)=>{const a=e.find(e=>e.key===Je.Id)?.rawValue;a&&t(a.toString())},_e=({tableRowsMaxHeight:o,connections:i,getConnections:r,onClickConnection:c,deleteConnection:d,getConnectionRemoteConfig:u,applyConfigurations:m,getAllClusterSnapshots:b,persistSources:f})=>{const y=s(),{formatTimeAgo:w}=O(),[C,v]=a(!1),[k,x]=a(i||[]),[$,S]=a(!1),[I,A]=a(null),R=n(async()=>{try{v(!0),x(await r()??[])}catch(e){}finally{v(!1)}},[]),P=n(async()=>{if(b)try{S(!0),A(await b()??null)}catch(e){}finally{S(!1)}},[]);l(()=>{k.length||R()},[k.length,R]),l(()=>{I||P()},[I,P]);const[D,T]=a(""),[z,L]=a(null),[M,V]=a([]),K=t(()=>k.filter(e=>e.status===g.Success),[k]),X=t(()=>k.filter(e=>!D||e.name.toLowerCase().includes(D.toLowerCase())).map(t=>({cells:[{key:Je.Id,rawValue:t.id},{key:Je.Name,rawValue:t.name},{key:Je.Type,rawValue:t.type},{key:Je.Status,rawValue:t.status,component:()=>(t=>{const a=t===g.Success?"Connection live":"Connection lost",l=t===g.Success?he:be;return e.createElement(p,{status:t,label:a,leftIcon:l})})(t.status)},{key:Je.OdigosVersion,rawValue:t.odigosVersion},{key:Je.ConnectedSince,rawValue:t.connectedAt?w(t.connectedAt):"-"},{key:Je.LastActivity,rawValue:t.lastSeenAt?w(t.lastSeenAt):"-"}],onClick:t.status===g.Success?()=>c(t):void 0,isSelected:M.includes(t.id),onSelect:()=>V(e=>Array.from(new Set([...e,t.id]))),onDeselect:()=>V(e=>e.filter(e=>e!==t.id)),hideCheckbox:t.status!==g.Success})),[k,M,D]);return e.createElement(W,null,e.createElement(F,{richTitle:{icon:pe,title:"Connections",badge:{label:k.length.toString(),status:h.Unknown}},search:{placeholder:"Search by cluster name",value:D,onChange:e=>T(e),width:"300px"},actions:[{id:j(),type:E.Button,buttonProps:{variant:N.Secondary,size:U.S,leftIcon:ge,onClick:async()=>{await R(),await P()},disabled:C||$}}]},e.createElement(H,{variant:G.Pretty,maxHeight:o,headerBackgroundColor:y.v2.colors.silver[1e3],isLoading:C,withCheckboxes:!0,columns:Qe,rows:X,rowActionsPushRightPosition:z?`calc(${z===Xe.BulkConfig?je:Ne} - 24px)`:void 0,getRowActions:({cells:e})=>(e=>e.find(e=>e.key===Je.Status)?.rawValue===g.Success)(e)?[I&&f?{id:j(),tooltip:"Manage Sources",rightIcon:re,onClick:async()=>{Ze(e,e=>{V([e]),L(Xe.BulkSource)})}}:null,u&&m?{id:j(),tooltip:"Edit Configuration",rightIcon:de,onClick:async()=>{Ze(e,e=>{V([e]),L(Xe.BulkConfig)})}}:null]:[{id:j(),label:"Delete Connection",rightIcon:me,onClick:()=>{Ze(e,e=>{V([e]),L(Xe.Delete)})}}]}),z===Xe.BulkConfig&&u&&m&&e.createElement(Ke,{onClose:()=>L(null),connections:K,selectedConnectionIds:M,setSelectedConnectionIds:V,getConnectionRemoteConfig:u,onApply:m}),z===Xe.BulkSource&&I&&f&&e.createElement(Fe,{onClose:()=>L(null),snapshots:I,selectedConnectionIds:M,setSelectedConnectionIds:V,persistSources:async e=>{if(!f)return{error:"Persist sources function is not defined"};const t=await f(e);return t?.error||await P(),t}}),e.createElement(q,{target:"connection",isOpen:z===Xe.Delete,onClose:()=>{V([]),L(null)},onApprove:async()=>{const e=M[0];e&&(await d(e),await R())}}),e.createElement(Y,{isOpen:!!M.length&&!z,richTitle:{icon:ce,title:"Selected Clusters",badge:{label:M.length}},actions:[{id:j(),type:E.Button,buttonProps:{variant:N.Text,size:U.S,label:"Cancel",onClick:()=>V([])}},I&&f?{id:j(),type:E.ButtonDropData,buttonProps:{variant:N.Secondary,size:U.S,label:"Add Component",onClick:e=>L(e)},dropDataProps:{alignX:B.Left,items:[{id:Xe.BulkSource,label:"Add Source",icon:re}]}}:null,u&&m?{id:j(),type:E.Button,buttonProps:{variant:N.Primary,size:U.S,label:"Manage Configurations",rightIcon:de,onClick:()=>L(Xe.BulkConfig)}}:null]})))},et=o.div`
105
105
  display: flex;
106
106
  align-items: center;
107
107
  justify-content: space-between;
@@ -113,10 +113,10 @@ import e,{useMemo as t,useState as a,useEffect as l,useCallback as n}from"react"
113
113
  &:hover {
114
114
  background: ${({theme:e})=>e.v2.colors.silver[700]};
115
115
  }
116
- `,_e=o.div`
116
+ `,tt=o.div`
117
117
  animation-name: ${K.animations.fade.in};
118
- `,et=({pod:n,getExtendedPodInfo:o,onClose:s})=>{const{formatTimeAgo:r}=O(),[c,u]=a(null),[p,m]=a(!1);l(()=>{n?o(n.namespace,n.name).then(e=>u(e??null)):(u(null),m(!1))},[n]);const h=t(()=>[{id:F(),title:"Node",label:c?.node??"-",withCopy:!0},{id:F(),title:"Status",badge:{status:X(c?.status),label:c?.status??"-"}}],[c]),b=t(()=>c?.containers?.map(e=>({id:F(),items:[{id:F(),title:"Container",label:e.name??"-"},{id:F(),title:"Status",label:e.startedAt?`${e.status} (since ${r(e.startedAt)})`:e.status},{id:F(),title:"Ready",badge:{status:e.ready?g.Success:g.Error,leftIcon:e.ready?ce:fe,label:e.ready?"True":"False",invertColors:!0}},{id:F(),title:"Started",badge:{status:e.started?g.Success:g.Error,leftIcon:e.started?ce:fe,label:e.started?"True":"False",invertColors:!0}},{id:F(),title:"Image Version",label:e.image?.split(":")?.[1]??"-"},{id:F(),title:"Image Repository",label:e.image?.split(":")?.[0]??"-"},{id:F(),title:"Restarts",label:e.restarts.toString()},{id:F(),title:"State Reason",label:e.stateReason??"-"},{id:F(),title:"Resource Requests",label:`CPU ${e.resources.requests.cpu} • Memory ${e.resources.requests.memory}`},{id:F(),title:"Resource Limits",label:`CPU ${e.resources.limits.cpu} • Memory ${e.resources.limits.memory}`}]}))||[],[c]);return e.createElement(S,{isOpen:!!n,header:{icon:ye,title:"Pod Information",onClose:s}},c?null:e.createElement(I,null,e.createElement(M,null)),c?e.createElement(e.Fragment,null,e.createElement(j,{richTitle:{icon:ye,title:c.name,withCopy:!0}},e.createElement(i,{$gap:24},e.createElement(J,{cellsPerRow:2,items:h}),b.length>0&&e.createElement(i,{$gap:12},e.createElement(Ze,{onClick:()=>m(e=>!e)},e.createElement(d,null,"Containers Overview"),e.createElement(Q,{icon:p?we:Ce})),p&&b.map(({id:t,items:a})=>e.createElement(_e,{key:t},e.createElement(J,{cellsPerRow:2,items:a})))))),e.createElement(j,{richTitle:{icon:ve,title:"Kubectl Commands"}},e.createElement(i,{$gap:12},e.createElement(Z,{value:`kubectl get pod ${c.name} -n ${c.namespace} -o yaml`}),e.createElement(Z,{value:`kubectl describe pod ${c.name} -n ${c.namespace}`}),e.createElement(Z,{value:`kubectl logs ${c.name} -n ${c.namespace}`}))),e.createElement(_,{yaml:c.manifestYAML})):null)};var tt;!function(e){e.PodName="podName",e.Status="status",e.Restarts="restarts",e.NodeName="nodeName",e.Age="age",e.DockerImage="dockerImage"}(tt||(tt={}));const at=[{key:tt.PodName,label:"Pod Name"},{key:tt.Status,label:"Status"},{key:tt.Restarts,label:"Restarts",textAlign:"right"},{key:tt.NodeName,label:"Node Name"},{key:tt.Age,label:"Age",textAlign:"right"},{key:tt.DockerImage,label:"Docker Image",textAlign:"right"}],lt=({isLoading:l,tableRowsMaxHeight:n,pods:o,getExtendedPodInfo:i})=>{const r=s(),{formatTimeAgo:c}=O(),[d,u]=a(null),g=t(()=>o.map(t=>({onClick:()=>u(t),cells:[{key:tt.PodName,rawValue:t.name},{key:tt.Status,rawValue:t.status,component:()=>{return a=t.status,e.createElement(p,{status:X(a),label:a});var a}},{key:tt.Restarts,rawValue:t.restartsCount.toString()},{key:tt.NodeName,rawValue:t.nodeName},{key:tt.Age,rawValue:c(t.creationTimestamp)},{key:tt.DockerImage,rawValue:t.image}]})),[o,r]);return e.createElement(j,{richTitle:{icon:ye,title:"Pods"}},e.createElement(H,{variant:G.Data,maxHeight:n,isLoading:l,columns:at,rows:g}),e.createElement(et,{pod:d,getExtendedPodInfo:i,onClose:()=>u(null)}))};var nt;!function(e){e.Gateway="gateway",e.Node="node"}(nt||(nt={}));const ot=[{value:nt.Gateway,label:"Gateway"},{value:nt.Node,label:"Node Collector"}],st=o.div`
118
+ `,at=({pod:n,getExtendedPodInfo:o,onClose:s})=>{const{formatTimeAgo:r}=O(),[c,u]=a(null),[p,m]=a(!1);l(()=>{n?o(n.namespace,n.name).then(e=>u(e??null)):(u(null),m(!1))},[n]);const h=t(()=>[{id:j(),title:"Node",label:c?.node??"-",withCopy:!0},{id:j(),title:"Status",badge:{status:X(c?.status),label:c?.status??"-"}}],[c]),b=t(()=>c?.containers?.map(e=>({id:j(),items:[{id:j(),title:"Container",label:e.name??"-"},{id:j(),title:"Status",label:e.startedAt?`${e.status} (since ${r(e.startedAt)})`:e.status},{id:j(),title:"Ready",badge:{status:e.ready?g.Success:g.Error,leftIcon:e.ready?ce:fe,label:e.ready?"True":"False",invertColors:!0}},{id:j(),title:"Started",badge:{status:e.started?g.Success:g.Error,leftIcon:e.started?ce:fe,label:e.started?"True":"False",invertColors:!0}},{id:j(),title:"Image Version",label:e.image?.split(":")?.[1]??"-"},{id:j(),title:"Image Repository",label:e.image?.split(":")?.[0]??"-"},{id:j(),title:"Restarts",label:e.restarts.toString()},{id:j(),title:"State Reason",label:e.stateReason??"-"},{id:j(),title:"Resource Requests",label:`CPU ${e.resources.requests.cpu} • Memory ${e.resources.requests.memory}`},{id:j(),title:"Resource Limits",label:`CPU ${e.resources.limits.cpu} • Memory ${e.resources.limits.memory}`}]}))||[],[c]);return e.createElement(S,{isOpen:!!n,header:{icon:ye,title:"Pod Information",onClose:s}},c?null:e.createElement(I,null,e.createElement(V,null)),c?e.createElement(e.Fragment,null,e.createElement(F,{richTitle:{icon:ye,title:c.name,withCopy:!0}},e.createElement(i,{$gap:24},e.createElement(J,{cellsPerRow:2,items:h}),b.length>0&&e.createElement(i,{$gap:12},e.createElement(et,{onClick:()=>m(e=>!e)},e.createElement(d,null,"Containers Overview"),e.createElement(Q,{icon:p?we:Ce})),p&&b.map(({id:t,items:a})=>e.createElement(tt,{key:t},e.createElement(J,{cellsPerRow:2,items:a})))))),e.createElement(F,{richTitle:{icon:ve,title:"Kubectl Commands"}},e.createElement(i,{$gap:12},e.createElement(Z,{value:`kubectl get pod ${c.name} -n ${c.namespace} -o yaml`}),e.createElement(Z,{value:`kubectl describe pod ${c.name} -n ${c.namespace}`}),e.createElement(Z,{value:`kubectl logs ${c.name} -n ${c.namespace}`}))),e.createElement(_,{yaml:c.manifestYAML})):null)};var lt;!function(e){e.PodName="podName",e.Status="status",e.Restarts="restarts",e.NodeName="nodeName",e.SpanDropDrate="spanDropDrate",e.Age="age",e.DockerImage="dockerImage"}(lt||(lt={}));const nt=[{key:lt.PodName,label:"Pod Name"},{key:lt.Status,label:"Status"},{key:lt.Restarts,label:"Restarts",textAlign:"right"},{key:lt.NodeName,label:"Node Name"},{key:lt.SpanDropDrate,label:"Span Drop Rate",noSort:!0,noFilter:!0},{key:lt.Age,label:"Age",textAlign:"right"},{key:lt.DockerImage,label:"Docker Image",textAlign:"right"}],ot=({isLoading:l,tableRowsMaxHeight:n,pods:o,getExtendedPodInfo:i})=>{const c=s(),{formatTimeAgo:u}=O(),[h,b]=a(null),f=t(()=>o.map(t=>({onClick:()=>b(t),cells:[{key:lt.PodName,rawValue:t.name},{key:lt.Status,rawValue:t.status,component:()=>{return a=t.status,e.createElement(p,{status:X(a),label:a});var a}},{key:lt.Restarts,rawValue:t.restartsCount.toString()},{key:lt.NodeName,rawValue:t.nodeName},{key:lt.SpanDropDrate,rawValue:0,component:()=>{const{collectorMetrics:a}=t;if(!a)return e.createElement(d,null,"-");const l=(a?.metricsAcceptedRps??0)+(a?.metricsDroppedRps??0),n=l>0?Math.round((a?.metricsDroppedRps??0)/l*100):0,o=n>0?g.Error:g.Success,s=(a?.exporterSuccessRps??0)+(a?.exporterFailedRps??0),i=s>0?Math.round((a?.exporterFailedRps??0)/s*100):0,c=i>0?g.Error:g.Success;return e.createElement(r,{$gap:4},e.createElement(m,{text:`Accepted: ${a.metricsAcceptedRps.toLocaleString()}, Dropped: ${a.metricsDroppedRps.toLocaleString()}`},e.createElement(p,{status:o,label:`Receiver ${n}%`,leftIcon:o===g.Error?ke:xe,useSecondaryTone:!0,invertColors:!0})),e.createElement(m,{text:`Success: ${a.exporterSuccessRps.toLocaleString()}, Failed: ${a.exporterFailedRps.toLocaleString()}`},e.createElement(p,{status:c,label:`Exporter ${i}%`,leftIcon:c===g.Error?ke:xe,useSecondaryTone:!0,invertColors:!0})))}},{key:lt.Age,rawValue:u(t.creationTimestamp)},{key:lt.DockerImage,rawValue:t.image}]})),[o,c]);return e.createElement(F,{richTitle:{icon:ye,title:"Pods"}},e.createElement(H,{variant:G.Data,maxHeight:n,isLoading:l,columns:nt,rows:f}),e.createElement(at,{pod:h,getExtendedPodInfo:i,onClose:()=>b(null)}))};var st;!function(e){e.Gateway="gateway",e.Node="node"}(st||(st={}));const it=[{value:st.Gateway,label:"Gateway"},{value:st.Node,label:"Node Collector"}],rt=o.div`
119
119
  display: flex;
120
120
  align-items: center;
121
121
  justify-content: space-between;
122
- `,it=({selectedTab:a,setSelectedTab:l,onClickDownloadDiagnose:n,onClickRefresh:o,loading:s,disabled:i})=>{const c=t(()=>{const e=[];return n&&e.push({id:F(),type:U.Button,buttonProps:{label:"Download Diagnose",leftIcon:ke,size:E.S,variant:N.Text,onClick:n,disabled:i}}),o&&e.push({id:F(),type:U.Button,buttonProps:{label:"Refresh",leftIcon:ge,size:E.S,variant:N.Text,onClick:o,disabled:i,loading:s}}),e},[n,o,i,s]);return e.createElement(st,null,e.createElement(r,{$gap:12},e.createElement(r,{$gap:8},e.createElement(xe,{size:32}),e.createElement(d,{size:u.M,weight:500},"Pipeline Collectors")),e.createElement(ee,{options:ot,selected:a,setSelected:l,disabled:i})),e.createElement(te,{actions:c}))},rt=({isOpen:t,onClose:a,title:l,yaml:n})=>e.createElement(S,{isOpen:t,header:{icon:$e,title:l,onClose:a}},e.createElement(_,{yaml:n}));var ct;!function(e){e.ManifestYaml="manifest-yaml",e.ConfigMapYaml="configmap-yaml"}(ct||(ct={}));const dt=({richTitle:t,statusCard:l,textCards:n,manifestYaml:o,configMapYaml:s})=>{const[i,c]=a(null);return e.createElement(j,{richTitle:t,actions:[{id:F(),type:U.ButtonDropData,buttonProps:{variant:N.Secondary,size:E.S,label:"View YAML",onClick:e=>c(e)},dropDataProps:{items:[{id:ct.ManifestYaml,label:t.title,icon:Se},{id:ct.ConfigMapYaml,label:"ConfigMap",icon:Se}]}}]},e.createElement(r,{$gap:16},e.createElement(ae,{...l}),n.map(t=>e.createElement(le,{key:t.title,...t}))),e.createElement(rt,{isOpen:i===ct.ManifestYaml,onClose:()=>c(null),title:t.title,yaml:o}),e.createElement(rt,{isOpen:i===ct.ConfigMapYaml,onClose:()=>c(null),title:"ConfigMap",yaml:s}))},ut=e=>{switch(e){case ne.Healthy:return"All desired replicas are updated, available, and ready";case ne.Updating:return"Workload is progressing towards desired state (e.g., updating pods)";case ne.Degraded:return"Progressing but with availability issues (e.g., not enough available replicas)";case ne.Failed:return"Progress deadline exceeded or an unrecoverable error occurred";case ne.Down:return"No available replicas";case ne.Unknown:return"Status cannot be determined from current signals";default:return"Status unknown"}},pt=({tableRowsMaxHeight:o,getGatewayInfo:s,getGatewayPods:i,getNodeCollectorInfo:r,getNodeCollectorPods:c,getExtendedPodInfo:d})=>{const{formatTimeAgo:u}=O(),{isVersionSupported:p,version:m}=oe(1.12),[b,f]=a(!1),[y,w]=a(nt.Gateway),[C,v]=a(null),[k,x]=a([]),[$,S]=a(null),[I,A]=a([]),R=n(async()=>{f(!0);try{switch(y){case nt.Gateway:v(await s()??null),x(await i()??[]);break;case nt.Node:S(await r()??null),A(await c()??[])}}catch(e){}f(!1)},[y]);l(()=>{R()},[R]);const P=t(()=>(e=>{switch(e){case nt.Gateway:return"Deployment";case nt.Node:return"DaemonSet";default:return"Pipeline Collectors"}})(y),[y]),T=t(()=>((e,t,a,l)=>{const n={status:h.Disabled,label:"No rollouts yet"};let o=!1,s=null;switch(e){case nt.Gateway:o=t?.rolloutInProgress??!1,s=t?.lastRolloutAt??null;break;case nt.Node:o=a?.rolloutInProgress??!1,s=a?.lastRolloutAt??null;break;default:return n}return o?{status:g.Info,label:"Rollout in progress",rightIcon:ge,useSecondaryTone:!0}:s?{status:h.Disabled,label:`Last Rollout: ${l(s)}`}:n})(y,C,$,u),[C,$,y,u]),D=t(()=>((e,t,a,l)=>{let n=l?g.Info:h.Unknown,o=l?"Loading":ne.Unknown,s=l?"Fetching data...":ut(ne.Unknown);switch(e){case nt.Gateway:n=t?.status?X(t?.status):n,o=t?.status??o,s=t?.status?ut(t.status):s;break;case nt.Node:n=a?.status?X(a?.status):n,o=a?.status??o,s=a?.status?ut(a.status):s}return{status:n,title:o,description:s}})(y,C,$,b),[C,$,y,b]),z=t(()=>((e,t,a,l)=>{switch(e){case nt.Gateway:return[{title:"HPA Spec (Replicas)",cells:[{label:"Min.",value:t?.hpa?.min.toString()??"-",isLoading:l},{label:"Max.",value:t?.hpa?.max.toString()??"-",isLoading:l},{label:"Current",value:t?.hpa?.current.toString()??"-",isLoading:l},{label:"Desired",value:t?.hpa?.desired.toString()??"-",isLoading:l}]},{title:"Requests",cells:[{label:"CPU",value:t?.resources?.requests.cpu??"-",isLoading:l},{label:"Memory",value:t?.resources?.requests.memory??"-",isLoading:l}]},{title:"Limits",cells:[{label:"CPU",value:t?.resources?.limits.cpu??"-",isLoading:l},{label:"Memory",value:t?.resources?.limits.memory??"-",isLoading:l}]},{title:"Docker Image",cells:[{value:t?.imageVersion??"-",isLoading:l}]}];case nt.Node:return[{title:"Nodes",cells:[{label:"Desired",value:a?.nodes?.desired.toString()??"-",isLoading:l},{label:"Ready",value:a?.nodes?.ready.toString()??"-",isLoading:l}]},{title:"Requests",cells:[{label:"CPU",value:a?.resources?.requests.cpu??"-",isLoading:l},{label:"Memory",value:a?.resources?.requests.memory??"-",isLoading:l}]},{title:"Limits",cells:[{label:"CPU",value:a?.resources?.limits.cpu??"-",isLoading:l},{label:"Memory",value:a?.resources?.limits.memory??"-",isLoading:l}]},{title:"Docker Image",cells:[{value:a?.imageVersion??"-",isLoading:l}]}];default:return[]}})(y,C,$,b),[C,$,y,b]),N=t(()=>(y===nt.Gateway?C?.manifestYAML:$?.manifestYAML)??"",[C,$,y]),L=t(()=>(y===nt.Gateway?C?.configMapYAML:$?.configMapYAML)??"",[C,$,y]),V=t(()=>y===nt.Gateway?k:I,[k,I,y]);return e.createElement(W,null,e.createElement(it,{disabled:!p,loading:b,selectedTab:y,setSelectedTab:w,onClickDownloadDiagnose:void 0,onClickRefresh:R}),e.createElement(se,null,e.createElement(dt,{richTitle:{icon:$e,title:P,badge:T},statusCard:D,textCards:z,manifestYaml:N,configMapYaml:L}),e.createElement(lt,{isLoading:b,tableRowsMaxHeight:o,pods:V,getExtendedPodInfo:d}),!p&&e.createElement(ie,{minSupportedVersion:1.12,currentVersion:m||""})))};export{Qe as CentralConnections,pt as PipelineCollectors};
122
+ `,ct=({selectedTab:a,setSelectedTab:l,onClickDownloadDiagnose:n,onClickRefresh:o,loading:s,disabled:i})=>{const c=t(()=>{const e=[];return n&&e.push({id:j(),type:E.Button,buttonProps:{label:"Download Diagnose",leftIcon:$e,size:U.S,variant:N.Text,onClick:n,disabled:i}}),o&&e.push({id:j(),type:E.Button,buttonProps:{label:"Refresh",leftIcon:ge,size:U.S,variant:N.Text,onClick:o,disabled:i,loading:s}}),e},[n,o,i,s]);return e.createElement(rt,null,e.createElement(r,{$gap:12},e.createElement(r,{$gap:8},e.createElement(Se,{size:32}),e.createElement(d,{size:u.M,weight:500},"Pipeline Collectors")),e.createElement(ee,{options:it,selected:a,setSelected:l,disabled:i})),e.createElement(te,{actions:c}))},dt=({isOpen:t,onClose:a,title:l,yaml:n})=>e.createElement(S,{isOpen:t,header:{icon:Ie,title:l,onClose:a}},e.createElement(_,{yaml:n}));var ut;!function(e){e.ManifestYaml="manifest-yaml",e.ConfigMapYaml="configmap-yaml"}(ut||(ut={}));const pt=({richTitle:t,statusCard:l,textCards:n,manifestYaml:o,configMapYaml:s})=>{const[i,c]=a(null);return e.createElement(F,{richTitle:t,actions:[{id:j(),type:E.ButtonDropData,buttonProps:{variant:N.Secondary,size:U.S,label:"View YAML",onClick:e=>c(e)},dropDataProps:{items:[{id:ut.ManifestYaml,label:t.title,icon:Ae},{id:ut.ConfigMapYaml,label:"ConfigMap",icon:Ae}]}}]},e.createElement(r,{$gap:16},e.createElement(ae,{...l}),n.map(t=>e.createElement(le,{key:t.title,...t}))),e.createElement(dt,{isOpen:i===ut.ManifestYaml,onClose:()=>c(null),title:t.title,yaml:o}),e.createElement(dt,{isOpen:i===ut.ConfigMapYaml,onClose:()=>c(null),title:"ConfigMap",yaml:s}))},gt=e=>{switch(e){case ne.Healthy:return"All desired replicas are updated, available, and ready";case ne.Updating:return"Workload is progressing towards desired state (e.g., updating pods)";case ne.Degraded:return"Progressing but with availability issues (e.g., not enough available replicas)";case ne.Failed:return"Progress deadline exceeded or an unrecoverable error occurred";case ne.Down:return"No available replicas";case ne.Unknown:return"Status cannot be determined from current signals";default:return"Status unknown"}},mt=({tableRowsMaxHeight:o,getGatewayInfo:s,getGatewayPods:i,getNodeCollectorInfo:r,getNodeCollectorPods:c,getExtendedPodInfo:d})=>{const{formatTimeAgo:u}=O(),{isVersionSupported:p,version:m}=oe(1.12),[b,f]=a(!1),[y,w]=a(st.Gateway),[C,v]=a(null),[k,x]=a([]),[$,S]=a(null),[I,A]=a([]),R=n(async()=>{f(!0);try{switch(y){case st.Gateway:v(await s()??null),x(await i()??[]);break;case st.Node:S(await r()??null),A(await c()??[])}}catch(e){}f(!1)},[y]);l(()=>{R()},[R]);const P=t(()=>(e=>{switch(e){case st.Gateway:return"Deployment";case st.Node:return"DaemonSet";default:return"Pipeline Collectors"}})(y),[y]),D=t(()=>((e,t,a,l)=>{const n={status:h.Disabled,label:"No rollouts yet"};let o=!1,s=null;switch(e){case st.Gateway:o=t?.rolloutInProgress??!1,s=t?.lastRolloutAt??null;break;case st.Node:o=a?.rolloutInProgress??!1,s=a?.lastRolloutAt??null;break;default:return n}return o?{status:g.Info,label:"Rollout in progress",rightIcon:ge,useSecondaryTone:!0}:s?{status:h.Disabled,label:`Last Rollout: ${l(s)}`}:n})(y,C,$,u),[C,$,y,u]),T=t(()=>((e,t,a,l)=>{let n=l?g.Info:h.Unknown,o=l?"Loading":ne.Unknown,s=l?"Fetching data...":gt(ne.Unknown);switch(e){case st.Gateway:n=t?.status?X(t?.status):n,o=t?.status??o,s=t?.status?gt(t.status):s;break;case st.Node:n=a?.status?X(a?.status):n,o=a?.status??o,s=a?.status?gt(a.status):s}return{status:n,title:o,description:s}})(y,C,$,b),[C,$,y,b]),z=t(()=>((e,t,a,l)=>{switch(e){case st.Gateway:return[{title:"HPA Spec (Replicas)",cells:[{label:"Min.",value:t?.hpa?.min.toString()??"-",isLoading:l},{label:"Max.",value:t?.hpa?.max.toString()??"-",isLoading:l},{label:"Current",value:t?.hpa?.current.toString()??"-",isLoading:l},{label:"Desired",value:t?.hpa?.desired.toString()??"-",isLoading:l}]},{title:"Requests",cells:[{label:"CPU",value:t?.resources?.requests.cpu??"-",isLoading:l},{label:"Memory",value:t?.resources?.requests.memory??"-",isLoading:l}]},{title:"Limits",cells:[{label:"CPU",value:t?.resources?.limits.cpu??"-",isLoading:l},{label:"Memory",value:t?.resources?.limits.memory??"-",isLoading:l}]},{title:"Docker Image",cells:[{value:t?.imageVersion??"-",isLoading:l}]}];case st.Node:return[{title:"Nodes",cells:[{label:"Desired",value:a?.nodes?.desired.toString()??"-",isLoading:l},{label:"Ready",value:a?.nodes?.ready.toString()??"-",isLoading:l}]},{title:"Requests",cells:[{label:"CPU",value:a?.resources?.requests.cpu??"-",isLoading:l},{label:"Memory",value:a?.resources?.requests.memory??"-",isLoading:l}]},{title:"Limits",cells:[{label:"CPU",value:a?.resources?.limits.cpu??"-",isLoading:l},{label:"Memory",value:a?.resources?.limits.memory??"-",isLoading:l}]},{title:"Docker Image",cells:[{value:a?.imageVersion??"-",isLoading:l}]}];default:return[]}})(y,C,$,b),[C,$,y,b]),N=t(()=>(y===st.Gateway?C?.manifestYAML:$?.manifestYAML)??"",[C,$,y]),L=t(()=>(y===st.Gateway?C?.configMapYAML:$?.configMapYAML)??"",[C,$,y]),M=t(()=>y===st.Gateway?k:I,[k,I,y]);return e.createElement(W,null,e.createElement(ct,{disabled:!p,loading:b,selectedTab:y,setSelectedTab:w,onClickDownloadDiagnose:void 0,onClickRefresh:R}),e.createElement(se,null,e.createElement(pt,{richTitle:{icon:Ie,title:P,badge:D},statusCard:T,textCards:z,manifestYaml:N,configMapYaml:L}),e.createElement(ot,{isLoading:b,tableRowsMaxHeight:o,pods:M,getExtendedPodInfo:d}),!p&&e.createElement(ie,{minSupportedVersion:1.12,currentVersion:m||""})))};export{_e as CentralConnections,mt as PipelineCollectors};
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{a1 as m,a2 as h,a3 as g,a4 as y,a5 as v,a6 as b,a7 as f,a8 as x,a9 as S,aa as $,ab as k,ac as C,ad as w,ae as D,af as T,ag as N,ah as E,H as O,ai as A,aj as F,ak as I,al as M,am as R,an as L,ao as P,ap as j,aq as K,ar as V,as as q,E as H,at as z,au as B,av as W,aw as _,ax as J,ay as U,az as G,aA as Y,F as X,aB as Z,aC as Q,aD as ee,aE as te,aF as ae,S as ie,aG as ne,aH as oe,aI as le,aJ as re,aK as se,a as ce,aL as de,c as ue,aM as pe,aN as me,aO as he,aP as ge,aQ as ye,aR as ve,aS as be,aT as fe,aU as xe,aV as Se,aW as $e,aX as ke,aY as Ce,j as we,N as De,aZ as Te,a_ as Ne,a$ as Ee,b0 as Oe,q as Ae,b1 as Fe,b2 as Ie,b3 as Me,b4 as Re,b5 as Le,b6 as Pe,b7 as je,b8 as Ke,b9 as Ve,g as qe,P as He,ba as ze,bb as Be,u as We,bc as _e,bd as Je,be as Ue,bf as Ge,bg as Ye,bh as Xe,bi as Ze,bj as Qe,bk as et,bl as tt,bm as at,bn as it,bo as nt,bp as ot,bq as lt,br as rt,bs as st,bt as ct,bu as dt,D as ut,bv as pt,bw as mt,bx as ht,by as gt,bz as yt,bA as vt,bB as bt,bC as ft,bD as xt,bE as St,bF as $t,bG as kt,bH as Ct,h as wt,bI as Dt,bJ as Tt,bK as Nt,bL as Et,bM as Ot,bN as At,bO as Ft,bP as It,bQ as Mt,bR as Rt,bS as Lt,bT as Pt,bU as jt,bV as Kt,bW as Vt,bX as qt,r as Ht,bY as zt,bZ as Bt,b_ as Wt,b$ as _t,c0 as Jt,c1 as Ut,c2 as Gt,c3 as Yt,c4 as Xt,c5 as Zt,c6 as Qt,Y as ea,c7 as ta,v as aa,c8 as ia,c9 as na,ca as oa,cb as la,cc as ra,cd as sa,ce as ca,cf as da,cg as ua,ch as pa,ci as ma,p as ha,cj as ga,ck as ya,cl as va,cm as ba,cn as fa,co as xa,cp as Sa}from"./chunks/ui-components-917db301.js";import{VSquareIcon as $a,XSquareIcon as ka,EditIcon as Ca,TrashIcon as wa,OdigosLogoText as Da,PlusIcon as Ta,RefreshIcon as Na,SearchIcon as Ea,FilterIcon as Oa,DataStreamIcon as Aa,VIcon as Fa,OdigosLogo as Ia,ArrowIcon as Ma,RefreshLeftArrowIcon as Ra,NotificationIcon as La,UserIcon as Pa,ImageErrorIcon as ja,OverviewIcon as Ka,InstrumentationRuleIcon as Va,ActionIcon as qa,SourceIcon as Ha,DestinationIcon as za,SlackLogo as Ba,KeyIcon as Wa,TerminalIcon as _a,ExclamationTriangleIcon as Ja,TraceViewIcon as Ua}from"./icons.js";import{MarkerType as Ga,useNodesState as Ya,useEdgesState as Xa,applyNodeChanges as Za}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 Qa=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},ei=x.PiiCategories,ti=d.div`
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{a1 as m,a2 as h,a3 as g,a4 as y,a5 as v,a6 as b,a7 as f,a8 as x,a9 as S,aa as $,ab as k,ac as C,ad as w,ae as D,af as T,ag as N,ah as E,H as O,ai as A,aj as F,ak as I,al as M,am as R,an as L,ao as P,ap as j,aq as K,ar as V,as as q,E as H,at as z,au as B,av as W,aw as _,ax as J,ay as U,az as G,aA as Y,F as X,aB as Z,aC as Q,aD as ee,aE as te,aF as ae,S as ie,aG as ne,aH as oe,aI as le,aJ as re,aK as se,a as ce,aL as de,c as ue,aM as pe,aN as me,aO as he,aP as ge,aQ as ye,aR as ve,aS as be,aT as fe,aU as xe,aV as Se,aW as $e,aX as ke,aY as Ce,j as we,N as De,aZ as Te,a_ as Ne,a$ as Ee,b0 as Oe,q as Ae,b1 as Fe,b2 as Ie,b3 as Me,b4 as Re,b5 as Le,b6 as Pe,b7 as je,b8 as Ke,b9 as Ve,g as qe,P as He,ba as ze,bb as Be,u as We,bc as _e,bd as Je,be as Ue,bf as Ge,bg as Ye,bh as Xe,bi as Ze,bj as Qe,bk as et,bl as tt,bm as at,bn as it,bo as nt,bp as ot,bq as lt,br as rt,bs as st,bt as ct,bu as dt,D as ut,bv as pt,bw as mt,bx as ht,by as gt,bz as yt,bA as vt,bB as bt,bC as ft,bD as xt,bE as St,bF as $t,bG as kt,bH as Ct,h as wt,bI as Dt,bJ as Tt,bK as Nt,bL as Et,bM as Ot,bN as At,bO as Ft,bP as It,bQ as Mt,bR as Rt,bS as Lt,bT as Pt,bU as jt,bV as Kt,bW as Vt,bX as qt,r as Ht,bY as zt,bZ as Bt,b_ as Wt,b$ as _t,c0 as Jt,c1 as Ut,c2 as Gt,c3 as Yt,c4 as Xt,c5 as Zt,c6 as Qt,Y as ea,c7 as ta,v as aa,c8 as ia,c9 as na,ca as oa,cb as la,cc as ra,cd as sa,ce as ca,cf as da,cg as ua,ch as pa,ci as ma,p as ha,cj as ga,ck as ya,cl as va,cm as ba,cn as fa,co as xa,cp as Sa}from"./chunks/ui-components-e5ad46f1.js";import{VSquareIcon as $a,XSquareIcon as ka,EditIcon as Ca,TrashIcon as wa,OdigosLogoText as Da,PlusIcon as Ta,RefreshIcon as Na,SearchIcon as Ea,FilterIcon as Oa,DataStreamIcon as Aa,VIcon as Fa,OdigosLogo as Ia,ArrowIcon as Ma,RefreshLeftArrowIcon as Ra,NotificationIcon as La,UserIcon as Pa,ImageErrorIcon as ja,OverviewIcon as Ka,InstrumentationRuleIcon as Va,ActionIcon as qa,SourceIcon as Ha,DestinationIcon as za,SlackLogo as Ba,KeyIcon as Wa,TerminalIcon as _a,ExclamationTriangleIcon as Ja,TraceViewIcon as Ua}from"./icons.js";import{MarkerType as Ga,useNodesState as Ya,useEdgesState as Xa,applyNodeChanges as Za}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 Qa=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},ei=x.PiiCategories,ti=d.div`
2
2
  display: flex;
3
3
  flex-direction: row;
4
4
  gap: 32px;
@@ -471,7 +471,7 @@ import e,{useState as t,useEffect as a,forwardRef as i,useRef as n,useImperative
471
471
  width: 100%;
472
472
  align-items: center;
473
473
  justify-content: space-between;
474
- `,Ol=({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(G,{title:"Instrumented Libraries"},c.map(({name:t,healthy:a,nonIdentifyingAttributes:i},n)=>e.createElement(r,{key:`library-${t}`},e.createElement(El,null,e.createElement(E,{size:12,color:o.text.grey},t),e.createElement(ce,{$gap:4},i.map(({key:a,value:i})=>ia(i)&&na(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}))),n!==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 Al;!function(e){e.Overview="Overview",e.Pods="Pods",e.Libraries="Libraries"}(Al||(Al={}));const Fl=[ra.Deployment,ra.StatefulSet,ra.DaemonSet,ra.DeploymentConfig],Il=[sa.Python,sa.Go,sa.Java],Ml=d.div`
474
+ `,Ol=({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(G,{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(El,{$width:"100%"},e.createElement(E,{size:12,color:o.text.grey},t),e.createElement(ce,{$gap:4},n.map(({key:a,value:i})=>ia(i)&&na(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 Al;!function(e){e.Overview="Overview",e.Pods="Pods",e.Libraries="Libraries"}(Al||(Al={}));const Fl=[ra.Deployment,ra.StatefulSet,ra.DaemonSet,ra.DeploymentConfig,ra.Rollout,ra.StaticPod],Il=[sa.Python,sa.Go,sa.Java],Ml=d.div`
475
475
  width: 100%;
476
476
  height: 100%;
477
477
  max-height: calc(100vh - 220px);
@@ -481,7 +481,7 @@ import e,{useState as t,useEffect as a,forwardRef as i,useRef as n,useImperative
481
481
  display: flex;
482
482
  flex-direction: column;
483
483
  gap: 12px;
484
- `,Ll=({persistSources:i,updateSource:o,restartWorkloads:r,fetchSourceById:s,fetchSourceDescribe:c,fetchSourceLibraries:d,restartPod:u})=>{const{isVm:p}=Be(),{sources:h}=z(),{selectedStreamName:g}=We(),{drawerType:y,drawerEntityId:v}=L(),b=l(()=>Ue(h,g),[h,g]),f=n(null),x=y===H.Source,[S,$]=t(!1),[k,C]=t(!1),[w,D]=t(Al.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}=oa(),M=l(()=>{if(v)return T&&JSON.stringify(qt(T))===JSON.stringify(qt(v))?T:b?.find(e=>JSON.stringify(qt(e))===JSON.stringify(qt(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:Al.Overview,onClick:()=>D(Al.Overview),selected:w===Al.Overview}];return Fl.includes(M?.kind)&&e.push({label:Al.Pods,onClick:()=>D(Al.Pods),selected:w===Al.Pods}),M?.containers?.some(({language:e})=>Il.includes(e))&&e.push({label:Al.Libraries,onClick:()=>D(Al.Libraries),selected:w===Al.Libraries}),e},[w,M]);return M?e.createElement(Si,{ref:f,onClose:()=>{D(Al.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:Ke(M.containers),isEdit:S,isFormDirty:k,onEdit:w===Al.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===Al.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:[{"data-id":"rollout-restart",variant:"tertiary",onClick:()=>r([v]),children:e.createElement(e.Fragment,null,e.createElement(Ra,null),e.createElement(E,{size:14,family:"secondary",decoration:"underline"},"Restart"))}]},w===Al.Overview?S?e.createElement(Ml,null,e.createElement(Dl,{formData:O,handleFormChange:(...e)=>{C(!0),A(...e),A("currentStreamName",g)}})):e.createElement(Rl,null,e.createElement(Tl,{workloadOdigosHealthStatus:M.workloadOdigosHealthStatus}),e.createElement(U,{conditions:M.conditions||[]}),e.createElement(G,{title:m.SOURCE_DETAILS,data:M?Cl(M,p):[]}),e.createElement(G,{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(la,{key:`source-container-${t.containerName}`,...t,callbackRuntimeOverride:async e=>await o(v,e)}))),e.createElement(ea,{yaml:M.manifestYAML})):w===Al.Pods?e.createElement(Nl,{source:M,fetchSourceDescribe:c,restartPod:u}):e.createElement(Ol,{source:M,fetchSourceLibraries:d})):null},Pl=d.div`
484
+ `,Ll=({persistSources:i,updateSource:o,restartWorkloads:r,fetchSourceById:s,fetchSourceDescribe:c,fetchSourceLibraries:d,restartPod:u})=>{const{isVm:p}=Be(),{sources:h}=z(),{selectedStreamName:g}=We(),{drawerType:y,drawerEntityId:v}=L(),b=l(()=>Ue(h,g),[h,g]),f=n(null),x=y===H.Source,[S,$]=t(!1),[k,C]=t(!1),[w,D]=t(Al.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}=oa(),M=l(()=>{if(v)return T&&JSON.stringify(qt(T))===JSON.stringify(qt(v))?T:b?.find(e=>JSON.stringify(qt(e))===JSON.stringify(qt(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:Al.Overview,onClick:()=>D(Al.Overview),selected:w===Al.Overview}];return Fl.includes(M?.kind)&&e.push({label:Al.Pods,onClick:()=>D(Al.Pods),selected:w===Al.Pods}),M?.containers?.some(({language:e})=>Il.includes(e))&&e.push({label:Al.Libraries,onClick:()=>D(Al.Libraries),selected:w===Al.Libraries}),e},[w,M]);return M?e.createElement(Si,{ref:f,onClose:()=>{D(Al.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:Ke(M.containers),isEdit:S,isFormDirty:k,onEdit:w===Al.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===Al.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:[{"data-id":"rollout-restart",variant:"tertiary",onClick:()=>r([v]),children:e.createElement(e.Fragment,null,e.createElement(Ra,null),e.createElement(E,{size:14,family:"secondary",decoration:"underline"},"Restart"))}]},w===Al.Overview?S?e.createElement(Ml,null,e.createElement(Dl,{formData:O,handleFormChange:(...e)=>{C(!0),A(...e),A("currentStreamName",g)}})):e.createElement(Rl,null,e.createElement(Tl,{workloadOdigosHealthStatus:M.workloadOdigosHealthStatus}),e.createElement(U,{conditions:M.conditions||[]}),e.createElement(G,{title:m.SOURCE_DETAILS,data:M?Cl(M,p):[]}),e.createElement(G,{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(la,{key:`source-container-${t.containerName}`,...t,callbackRuntimeOverride:e=>o(v,e)}))),e.createElement(ea,{yaml:M.manifestYAML})):w===Al.Pods?e.createElement(Nl,{source:M,fetchSourceDescribe:c,restartPod:u}):e.createElement(Ol,{source:M,fetchSourceLibraries:d})):null},Pl=d.div`
485
485
  max-width: ${({$fullWidth:e})=>e?"unset":"420px"};
486
486
  width: 100%;
487
487
  `,jl=i(({isModal:t,fetchSingleNamespace:a,onClickSummary:i},n)=>{const l=O.useTheme(),{isVm:r}=Be(),s=ca({fetchSingleNamespace:a}),{selectedSources:c,fetchingNamespace:d,selectedAllNamespaces:u,onSelectAllNamespaces:p,getApiSourcesPayload:h,getApiFutureAppsPayload:g,searchText:y,setSearchText:v,searchBy:b,setSearchBy:f,showSelectedOnly:x,setShowSelectedOnly:$,showRunningOnly:k,setShowRunningOnly:C}=s;o(n,()=>({getFormValues:()=>({apps:h(),futureApps:g()})}));const D=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:D,description:m.SELECT_SOURCES_DESCRIPTION}),e.createElement(ce,{$justifyContent:"space-between"},e.createElement(Pl,{$fullWidth:r},e.createElement(S,{placeholder:b===H.Source?m.SEARCH_SOURCES:m.SEARCH_NAMESPACES,icon:Ea,value:y,onChange:e=>v(e.target.value.toLowerCase())})),!r&&e.createElement(A,{options:[{label:m.SOURCE,value:H.Source,selectedBgColor:l.text.secondary,selectedTextColor:l.text.primary},{label:m.NAMESPACE,value:H.Namespace,selectedBgColor:l.text.secondary,selectedTextColor:l.text.primary}],selected:b,setSelected:f})),e.createElement(ce,{$gap:36},e.createElement(w,{title:m.SELECT_ALL,initialValue:u,onChange:p,disabled:!!d}),e.createElement(w,{title:m.ONLY_SELECTED,initialValue:x,onChange:$}),e.createElement(w,{title:m.ONLY_RUNNING_INSTANCES,initialValue:k,onChange:C}))),e.createElement(le,null),e.createElement(vl,{isModal:t,...s})))});jl.displayName=jl.name;const Kl=({fetchSingleNamespace:t,persistSources:a})=>{const{currentModal:i,setCurrentModal:o}=Z(),l=i===H.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(jl,{ref:c,isModal:!0,fetchSingleNamespace:t})):null},Vl=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},ql=({metrics:t,maxHeight:a,maxWidth:i})=>{const n=p(),{isVm:o}=Be(),r=he(),{selectedStreamName:c}=We(),{sources:d,sourcesLoading:u}=z(),{setDrawerType:h,setDrawerEntityId:g}=L(),{selectedSources:y,setSelectedSources:v}=Fe(),{progress:f}=qe(),x=l(()=>f[He.Instrumenting]||f[He.Uninstrumenting]?f[He.Instrumenting]?.percentage||f[He.Uninstrumenting]?.percentage||0:void 0,[f[He.Instrumenting],f[He.Uninstrumenting]]),S=l(()=>Ue(d,c),[d,c]),$=l(()=>Ai({instrumentationRules:[],sources:Je(S,r),actions:[],destinations:[],searchText:r.searchText,selectedCategory:H.Source}).searchResults.find(({category:e})=>e===H.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=qt(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(H.Source),g(i)},cells:[{columnKey:"checkbox-and-icon",component:()=>e.createElement(ce,{$gap:16},e.createElement(b,{value:c,onChange:()=>D(a)}),e.createElement(da,{icons:Ke(a.containers),id:o}))},{columnKey:"name",value:ve(a,H.Source,{extended:!0})},{columnKey:"kind",value:a.kind,textColor:n.text.info},{columnKey:"namespace",value:a.namespace,textColor:n.text.info},{columnKey:"throughput",value:Re(Nt(t,H.Source,i).throughput),textColor:n.text.info},{columnKey:"conditions",component:()=>e.createElement(Ei,{conditions:a.conditions||[],id:o})},{columnKey:"containers",component:()=>e.createElement("div",{style:{lineHeight:1}},e.createElement(se,{status:ie.Info,title:ua(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(H.Source),title:m.SOURCES,badge:N,badgeTooltip:O,loading:u||"number"==typeof x})),e.createElement(ke,{$maxHeight:a},e.createElement(Ce,{columns:Vl(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[He.Instrumenting]?"Instrumenting":"Uninstrumenting"," workloads..."),e.createElement(Ne,{label:`${x}%`}))))},Hl=({expiresAt:t})=>{const a=O.useTheme(),{formatTimeAgo:i}=Ht(),n=i(t),o=new Date(t).toDateString().split(" ").slice(1).join(" "),l=pa(t,0)?a.text.error:pa(t,6048e5)?a.text.warning:a.text.success;return e.createElement(E,{size:14,color:l},n," (",o,")")},zl=d.div`
package/lib/contexts.js CHANGED
@@ -1 +1 @@
1
- export{d2 as OdigosProvider,_ as useOdigos}from"./chunks/ui-components-917db301.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";
1
+ export{d4 as OdigosProvider,_ as useOdigos}from"./chunks/ui-components-e5ad46f1.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{bG as capitalizeFirstLetter,cI as cleanObjectEmptyStringsValues,bB as compareCondition,h as deepClone,aP as filterActions,bf as filterDestinations,bg as filterDestinationsByStream,bd as filterSources,be as filterSourcesByStream,cJ as flattenObjectKeys,b4 as formatBytes,cm as formatDuration,v as generateId,ax as getActionIcon,aJ as getConditionsBooleans,b8 as getContainersIcons,cg as getContainersInstrumentedCount,b7 as getDestinationIcon,aW as getEntityIcon,av as getEntityId,aR as getEntityLabel,cK as getIdFromSseTarget,b6 as getInstrumentationRuleIcon,cL as getMainContainerLanguage,bK as getMetricForEntity,cM as getMonitorIcon,cN as getPlatformIcon,cO as getPlatformLabel,bT as getProgrammingLanguageIcon,co as getRecursiveValues,cP as getSseTargetFromId,cQ as getStatusColor,J as getStatusFromPodStatus,aN as getStatusIcon,c2 as getStatusTypeFromOdigosHealth,cR as getValueForRange,bX as getWorkloadId,bF as getYamlFieldsForDestination,c3 as hasUnhealthyInstances,ab as isEmpty,cS as isLegalK8sLabel,ch as isOverTime,c8 as isStringABoolean,cT as isTimeElapsed,cU as isValidVersion,aL as mapConditions,bA as mapDestinationFieldsForDisplay,b3 as mapExportedSignals,cV as numbersOnly,c9 as parseBooleanFromString,cW as parseJsonStringToPrettyString,cX as removeEmptyValuesFromObject,bC as safeJsonParse,cY as safeJsonStringify,a$ as sleep,bn as splitCamelString,cZ as stringifyNonStringValues,c_ as trimVersion}from"./chunks/ui-components-917db301.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";
1
+ export{bG as capitalizeFirstLetter,cJ as cleanObjectEmptyStringsValues,bB as compareCondition,h as deepClone,aP as filterActions,bf as filterDestinations,bg as filterDestinationsByStream,bd as filterSources,be as filterSourcesByStream,cK as flattenObjectKeys,b4 as formatBytes,cm as formatDuration,v as generateId,ax as getActionIcon,aJ as getConditionsBooleans,b8 as getContainersIcons,cg as getContainersInstrumentedCount,b7 as getDestinationIcon,aW as getEntityIcon,av as getEntityId,aR as getEntityLabel,cL as getIdFromSseTarget,b6 as getInstrumentationRuleIcon,cM as getMainContainerLanguage,bK as getMetricForEntity,cN as getMonitorIcon,cO as getPlatformIcon,cP as getPlatformLabel,bT as getProgrammingLanguageIcon,co as getRecursiveValues,cQ as getSseTargetFromId,cR as getStatusColor,J as getStatusFromPodStatus,aN as getStatusIcon,c2 as getStatusTypeFromOdigosHealth,cS as getValueForRange,bX as getWorkloadId,bF as getYamlFieldsForDestination,c3 as hasUnhealthyInstances,ab as isEmpty,cT as isLegalK8sLabel,ch as isOverTime,c8 as isStringABoolean,cU as isTimeElapsed,cV as isValidVersion,aL as mapConditions,bA as mapDestinationFieldsForDisplay,b3 as mapExportedSignals,cW as numbersOnly,c9 as parseBooleanFromString,cX as parseJsonStringToPrettyString,cY as removeEmptyValuesFromObject,bC as safeJsonParse,cZ as safeJsonStringify,a$ as sleep,bn as splitCamelString,c_ as stringifyNonStringValues,c$ as trimVersion}from"./chunks/ui-components-e5ad46f1.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{au as useActionFormData,d3 as useBodyScroll,bh as useClickNode,bY as useClickNotification,bb as useConnection,bc as useContainerSize,ci as useCopy,bt as useDataStreamFormData,bE as useDestinationFormData,p as useGenericForm,d4 as useInfiniteScroll,bV as useInstrumentationRuleFormData,ao as useKeyDown,bm as useOnClickOutside,bi as usePopup,bs as useSessionStorage,ca as useSourceFormData,ce as useSourceSelectionFormData,r as useTimeAgo}from"./chunks/ui-components-917db301.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";
1
+ export{au as useActionFormData,d5 as useBodyScroll,bh as useClickNode,bY as useClickNotification,bb as useConnection,bc as useContainerSize,ci as useCopy,bt as useDataStreamFormData,bE as useDestinationFormData,p as useGenericForm,d6 as useInfiniteScroll,bV as useInstrumentationRuleFormData,ao as useKeyDown,bm as useOnClickOutside,bi as usePopup,bs as useSessionStorage,ca as useSourceFormData,ce as useSourceSelectionFormData,r as useTimeAgo}from"./chunks/ui-components-e5ad46f1.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";
@@ -1,2 +1,3 @@
1
1
  export * from './azure-icon';
2
2
  export * from './email-icon';
3
+ export * from './okta-icon';
@@ -0,0 +1,2 @@
1
+ import type { SVG } from '@odigos/ui-kit/types';
2
+ export declare const OktaIcon: SVG;