@odigos/ui-kit 0.0.153 → 0.0.155

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.
@@ -1,6 +1,11 @@
1
1
  import { type FC } from 'react';
2
2
  import type { SVG } from '@/types';
3
3
  import { type ButtonProps } from '../button';
4
+ import { type IconButtonProps } from '../icon-button';
5
+ export declare enum DropDataAlign {
6
+ Left = "left",
7
+ Right = "right"
8
+ }
4
9
  interface DropDataOption {
5
10
  id: string;
6
11
  label: string;
@@ -9,10 +14,13 @@ interface DropDataOption {
9
14
  }
10
15
  export interface DropDataProps {
11
16
  items: DropDataOption[];
12
- selectedId: DropDataOption['id'];
13
- onSelect: (optionId: DropDataOption['id']) => void;
17
+ selectedIds: DropDataOption['id'][];
18
+ setSelectedIds: (ids: DropDataOption['id'][]) => void;
19
+ withMultiSelect?: boolean;
20
+ align?: DropDataAlign;
14
21
  defaultOpen?: boolean;
15
22
  buttonProps?: ButtonProps;
23
+ iconButtonProps?: IconButtonProps;
16
24
  }
17
25
  export declare const DropData: FC<DropDataProps>;
18
26
  export {};
@@ -1,7 +1,7 @@
1
1
  import { type FC } from 'react';
2
+ import { HoverAction } from '../hover-actions';
2
3
  import { CSSProperties } from 'styled-components';
3
4
  import { type TableColumn, type TableRow, TableVariant } from './types';
4
- import { HoverAction } from '..';
5
5
  export * from './types';
6
6
  export interface TableProps {
7
7
  variant: TableVariant;
@@ -24,7 +24,6 @@ export declare const Td: import("styled-components/dist/types").IStyledComponent
24
24
  $isFirstCell: boolean;
25
25
  $isLastCell: boolean;
26
26
  }>> & string;
27
- export declare const Sortable: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
27
+ export declare const HeadWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
28
28
  $textAlign?: TableColumn["textAlign"];
29
- $withClick: boolean;
30
29
  }>> & string;
@@ -0,0 +1,11 @@
1
+ import { type FC } from 'react';
2
+ import { TableRow, type TableRowCell } from '../../types';
3
+ export interface FilterProps {
4
+ columnKey: string;
5
+ filters: {
6
+ [key: string]: TableRowCell['rawValue'][];
7
+ };
8
+ onFilter: (columnKey: string, values: TableRowCell['rawValue'][]) => void;
9
+ rowsUnfiltered: TableRow[];
10
+ }
11
+ export declare const Filter: FC<FilterProps>;
@@ -1,12 +1,17 @@
1
1
  import { type FC } from 'react';
2
2
  import { SortDirection } from '@/types';
3
- import { type TableColumn, TableVariant } from '../types';
3
+ import { type TableColumn, TableVariant, TableRowCell, TableRow } from '../types';
4
4
  interface TableColumnsProps {
5
5
  variant: TableVariant;
6
6
  columns: TableColumn[];
7
+ rowsUnfiltered: TableRow[];
7
8
  sortDirection: SortDirection;
8
9
  sortByKey: string;
9
- onSort: (key: string) => void;
10
+ onSort: (columnKey: string) => void;
11
+ filters: {
12
+ [key: string]: TableRowCell['rawValue'][];
13
+ };
14
+ onFilter: (columnKey: string, values: TableRowCell['rawValue'][]) => void;
10
15
  withCheckboxes?: boolean;
11
16
  partiallySelected?: boolean;
12
17
  allSelected?: boolean;
@@ -0,0 +1,9 @@
1
+ import { type FC } from 'react';
2
+ import { SortDirection } from '@/types';
3
+ export interface SortProps {
4
+ columnKey: string;
5
+ sortDirection: SortDirection;
6
+ sortByKey: string;
7
+ onSort: (columnKey: string) => void;
8
+ }
9
+ export declare const Sort: FC<SortProps>;
@@ -6,18 +6,18 @@ export declare enum TableVariant {
6
6
  export interface TableColumn {
7
7
  key: string;
8
8
  label: string;
9
- sortable?: boolean;
10
9
  minWidth?: CSSProperties['minWidth'];
11
10
  textAlign?: CSSProperties['textAlign'];
12
11
  }
12
+ export interface TableRowCell {
13
+ key: string;
14
+ rawValue: string | number | boolean;
15
+ component?: FC;
16
+ }
13
17
  export interface TableRow {
14
18
  onClick?: () => void;
15
19
  isSelected?: boolean;
16
20
  onSelect?: () => void;
17
21
  onDeselect?: () => void;
18
- cells: {
19
- key: string;
20
- rawValue: string | number | boolean;
21
- component?: FC;
22
- }[];
22
+ cells: TableRowCell[];
23
23
  }
@@ -1 +1 @@
1
- export{k as Badge,p as Button,B as ButtonSize,db as ButtonTab,dc as ButtonTabList,a as ButtonVariants,l as Checkbox,df as CheckboxList,de as CheckboxSize,x as CliCommand,w as DataCard,D as Drawer,dg as DropData,dh as Header,c1 as HoverActions,I as IconButton,cc as IconButtonSize,di as Input,L as Loader,dj as Modal,dk as Navbar,f as Note,dm as Radio,dn as RadioGroup,dl as RadioSize,e as Search,b as SectionCard,S as SectionCardActionType,dd as SectionCardSize,z as Segment,A as StatusCard,r as Table,s as TableVariant,dp as Tag,E as TextCard,n as Toggle,dr as ToggleLabelAlign,ds as ToggleList,o as ToggleSize,dq as ToggleVariant,T as Typography,j as TypographySize,dt as TypographyVariants,W as WarningModal}from"../chunks/ui-components-e057d958.js";import"../icons.js";import"react";import"styled-components";import"zustand";import"javascript-time-ago";import"../chunks/vendor-55cc654c.js";import"react-dom";import"@xyflow/react";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";
1
+ export{k as Badge,p as Button,B as ButtonSize,da as ButtonTab,db as ButtonTabList,a as ButtonVariants,l as Checkbox,de as CheckboxList,dd as CheckboxSize,x as CliCommand,w as DataCard,D as Drawer,dg as DropData,df as DropDataAlign,dh as Header,c0 as HoverActions,I as IconButton,cb as IconButtonSize,di as Input,L as Loader,dj as Modal,dk as Navbar,f as Note,dm as Radio,dn as RadioGroup,dl as RadioSize,e as Search,b as SectionCard,S as SectionCardActionType,dc as SectionCardSize,z as Segment,A as StatusCard,r as Table,s as TableVariant,dp as Tag,E as TextCard,n as Toggle,dr as ToggleLabelAlign,ds as ToggleList,o as ToggleSize,dq as ToggleVariant,T as Typography,j as TypographySize,dt as TypographyVariants,W as WarningModal}from"../chunks/ui-components-4a2e974a.js";import"../icons.js";import"react";import"styled-components";import"zustand";import"javascript-time-ago";import"../chunks/vendor-55cc654c.js";import"react-dom";import"@xyflow/react";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";
package/lib/components.js CHANGED
@@ -1 +1 @@
1
- export{aw as AutocompleteInput,aQ as Badge,aT as Button,ah as CancelWarning,c as CenterThis,R as Checkbox,C as Code,an as ConditionDetails,ao as DataCard,J as DataCardFieldTypes,bE as DataCardFields,c$ as DataFinger,aW as DataTab,ag as DeleteWarning,b$ as DescribeRow,ax as Divider,a7 as DocsButton,af as Drawer,d1 as DrawerFooter,d0 as DrawerHeader,bh as Dropdown,d2 as ErrorBoundary,bq as ExtendArrow,m as FadeLoader,V as FieldError,Q as FieldLabel,F as FlexColumn,i as FlexRow,d3 as Header,bp as IconButton,c9 as IconGroup,aL as IconTitleBadge,aG as IconWrapped,bX as IconsNav,d4 as ImageControlled,Y as Input,a2 as InputList,$ as InputTable,aO as InteractiveTable,a1 as KeyValueInputsList,aS as LoadingText,ar as Modal,at as ModalBody,a8 as MonitorsCheckboxes,aI as MonitorsIcons,as as NavigationButtons,N as NoDataFound,au as NotificationNote,da as Overlay,P as PageContent,bc as Popup,cd as PopupForm,ci as ScrollX,a_ as ScrollY,a6 as SectionTitle,a5 as Segment,bd as SelectionButton,b2 as SkeletonLoader,az as Status,bD as Stepper,d5 as TabList,aJ as TableContainer,aK as TableTitleWrap,aN as TableWrap,bN as Tag,a4 as Text,a9 as TextArea,a0 as Toggle,cg as ToggleCodeComponent,aB as Tooltip,aP as TraceLoader,U as UpgradeRequiredWrapper,be as VerticalScroll,d9 as WarningModal,d6 as getLinksFromText,d7 as getStrongsFromText,d8 as renderText}from"./chunks/ui-components-e057d958.js";import"./icons.js";import"react";import"styled-components";import"zustand";import"javascript-time-ago";import"./chunks/vendor-55cc654c.js";import"react-dom";import"@xyflow/react";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";
1
+ export{ax as AutocompleteInput,aR as Badge,aU as Button,ah as CancelWarning,c as CenterThis,R as Checkbox,C as Code,ao as ConditionDetails,ap as DataCard,J as DataCardFieldTypes,bE as DataCardFields,c_ as DataFinger,aX as DataTab,ag as DeleteWarning,b_ as DescribeRow,ay as Divider,a7 as DocsButton,af as Drawer,d0 as DrawerFooter,c$ as DrawerHeader,bh as Dropdown,d1 as ErrorBoundary,bq as ExtendArrow,m as FadeLoader,V as FieldError,Q as FieldLabel,F as FlexColumn,i as FlexRow,d2 as Header,bp as IconButton,c8 as IconGroup,aM as IconTitleBadge,aH as IconWrapped,bW as IconsNav,d3 as ImageControlled,Y as Input,a2 as InputList,$ as InputTable,aP as InteractiveTable,a1 as KeyValueInputsList,aT as LoadingText,as as Modal,au as ModalBody,a8 as MonitorsCheckboxes,aJ as MonitorsIcons,at as NavigationButtons,N as NoDataFound,av as NotificationNote,d9 as Overlay,P as PageContent,bc as Popup,cc as PopupForm,ch as ScrollX,a_ as ScrollY,a6 as SectionTitle,a5 as Segment,bd as SelectionButton,b2 as SkeletonLoader,aA as Status,bD as Stepper,d4 as TabList,aK as TableContainer,aL as TableTitleWrap,aO as TableWrap,bN as Tag,a4 as Text,a9 as TextArea,a0 as Toggle,cf as ToggleCodeComponent,aC as Tooltip,aQ as TraceLoader,U as UpgradeRequiredWrapper,be as VerticalScroll,d8 as WarningModal,d5 as getLinksFromText,d6 as getStrongsFromText,d7 as renderText}from"./chunks/ui-components-4a2e974a.js";import"./icons.js";import"react";import"styled-components";import"zustand";import"javascript-time-ago";import"./chunks/vendor-55cc654c.js";import"react-dom";import"@xyflow/react";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";
package/lib/constants.js CHANGED
@@ -1 +1 @@
1
- export{al as ACTION_OPTIONS,ae as BUTTON_TEXTS,bo as DEFAULT_DATA_STREAM_NAME,bB as DESTINATION_CATEGORIES,bi as DISPLAY_LANGUAGES,H as DISPLAY_TITLES,av as FORM_ALERTS,bQ as INSTRUMENTATION_RULE_OPTIONS,cU as LANGUAGE_OPTIONS,bj as MONITORS_OPTIONS,bk as STORAGE_KEYS,cV as TOKEN_ABOUT_TO_EXPIRE}from"./chunks/ui-components-e057d958.js";import"./icons.js";import"react";import"styled-components";import"zustand";import"javascript-time-ago";import"./chunks/vendor-55cc654c.js";import"react-dom";import"@xyflow/react";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";
1
+ export{am as ACTION_OPTIONS,ae as BUTTON_TEXTS,bo as DEFAULT_DATA_STREAM_NAME,bB as DESTINATION_CATEGORIES,bi as DISPLAY_LANGUAGES,H as DISPLAY_TITLES,aw as FORM_ALERTS,bQ as INSTRUMENTATION_RULE_OPTIONS,cT as LANGUAGE_OPTIONS,bj as MONITORS_OPTIONS,bk as STORAGE_KEYS,cU as TOKEN_ABOUT_TO_EXPIRE}from"./chunks/ui-components-4a2e974a.js";import"./icons.js";import"react";import"styled-components";import"zustand";import"javascript-time-ago";import"./chunks/vendor-55cc654c.js";import"react-dom";import"@xyflow/react";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";
@@ -1,4 +1,4 @@
1
- import e,{useState as t,useMemo as a,useEffect as l,useCallback as o}from"react";import n,{useTheme as i}from"styled-components";import{W as s,F as r,d as c,D as d,e as u,f as g,h as p,i as b,T as m,j as y,k as h,O as f,l as v,m as w,n as C,o as k,L as x,p as $,a as R,q as A,P as L,b as P,g as I,S as D,B as S,r as V,s as z,t as M,v as O,c as T,w as j,I as N,x as E,y as U,z as W,A as F,E as q,G as H,U as Y}from"../chunks/ui-components-e057d958.js";import{ConnectionsIcon as G,OdigosLogo as K,RefreshIcon as B,SettingsIcon as J,DeleteIcon as Q,VIcon as X,XIcon as Z,PodIcon as _,ChevronUpIcon as ee,ChevronDownIcon as te,TerminalIcon as ae,VSquareIcon as le,XSquareIcon as oe,PipelineCollectorIcon as ne,DownloadIcon as ie,GatewayIcon as se,YamlIcon as re}from"../icons.js";import{Y as ce}from"../chunks/index-e3f25476.js";import{useOdigos as de}from"../contexts.js";import{V as ue}from"../chunks/index-64bb5a64.js";import"zustand";import"javascript-time-ago";import"../chunks/vendor-55cc654c.js";import"react-dom";import"@xyflow/react";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";const ge=({onDeny:t,onApprove:a})=>e.createElement(s,{title:"Discard changes?",description:"You have unsaved changes.\nIf you cancel now, your changes won't be saved.",onDeny:t,denyLabel:"Keep editing",onApprove:a,approveLabel:"Discard changes"}),pe=({onDeny:t,onApprove:a,action:l="delete",target:o})=>{const n=l.charAt(0).toUpperCase()+l.substring(1),i=o?.endsWith("s")?"these":"this";return e.createElement(s,{title:`${n}${o?` ${o}`:""}?`,description:`Are you sure you want to ${l}${o?` ${i} ${o}`:""}?`,onDeny:t,denyLabel:"Go back",onApprove:a,approveLabel:n})},be=({minSupportedVersion:t,currentVersion:a})=>e.createElement(s,{relativeToParent:!0,visual:ue,title:"Upgrade Required",description:`To use this feature, please upgrade to Odigos v${t} or later.\nCurrent version: ${a}.`}),me="75vw",ye=n.div`
1
+ import e,{useState as t,useMemo as a,useEffect as l,useCallback as o}from"react";import n,{useTheme as i}from"styled-components";import{W as s,F as r,d as c,D as d,e as u,f as g,h as p,i as b,T as m,j as y,k as h,O as f,l as v,m as w,n as C,o as k,L as x,p as $,a as R,q as A,P as L,b as P,g as I,S as D,B as S,r as V,s as z,t as M,v as O,c as T,w as j,I as N,x as E,y as U,z as W,A as F,E as q,G as H,U as Y}from"../chunks/ui-components-4a2e974a.js";import{ConnectionsIcon as G,OdigosLogo as K,RefreshIcon as B,SettingsIcon as J,DeleteIcon as Q,VIcon as X,XIcon as Z,PodIcon as _,ChevronUpIcon as ee,ChevronDownIcon as te,TerminalIcon as ae,VSquareIcon as le,XSquareIcon as oe,PipelineCollectorIcon as ne,DownloadIcon as ie,GatewayIcon as se,YamlIcon as re}from"../icons.js";import{Y as ce}from"../chunks/index-edf5386a.js";import{useOdigos as de}from"../contexts.js";import{V as ue}from"../chunks/index-64bb5a64.js";import"zustand";import"javascript-time-ago";import"../chunks/vendor-55cc654c.js";import"react-dom";import"@xyflow/react";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";const ge=({onDeny:t,onApprove:a})=>e.createElement(s,{title:"Discard changes?",description:"You have unsaved changes.\nIf you cancel now, your changes won't be saved.",onDeny:t,denyLabel:"Keep editing",onApprove:a,approveLabel:"Discard changes"}),pe=({onDeny:t,onApprove:a,action:l="delete",target:o})=>{const n=l.charAt(0).toUpperCase()+l.substring(1),i=o?.endsWith("s")?"these":"this";return e.createElement(s,{title:`${n}${o?` ${o}`:""}?`,description:`Are you sure you want to ${l}${o?` ${i} ${o}`:""}?`,onDeny:t,denyLabel:"Go back",onApprove:a,approveLabel:n})},be=({minSupportedVersion:t,currentVersion:a})=>e.createElement(s,{relativeToParent:!0,visual:ue,title:"Upgrade Required",description:`To use this feature, please upgrade to Odigos v${t} or later.\nCurrent version: ${a}.`}),me="75vw",ye=n.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  border-radius: 16px;
@@ -46,7 +46,7 @@ import e,{useState as t,useMemo as a,useEffect as l,useCallback as o}from"react"
46
46
  justify-content: flex-end;
47
47
  gap: 16px;
48
48
  padding: 0 24px;
49
- `,xe=({onClose:o,connections:n,selectedConnectionIds:s,setSelectedConnectionIds:r,getConnectionRemoteConfig:A,onApply:L})=>{const P=i(),[I,D]=t(""),S=a(()=>n.filter(e=>!I||e.name.toLowerCase().includes(I.toLowerCase())),[n,I]),V=s.length>0,z=e=>{r(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},[M,O]=t(!1),[T,j]=t(!1),[N,E]=t(void 0),[U,W]=t(!1),[F,q]=t(void 0),{formData:H,handleFormChange:Y,areFormValuesEqual:B,resetFormData:J}=c({automaticRollout:!0}),Q=a(()=>s.length>1||void 0!==F&&!B(F,H),[s.length,F,H]);return l(()=>{1===s.length?(async e=>{if(U)return;W(!0);const t=await A(e);if(t){const e={automaticRollout:!t.rollout?.automaticRolloutDisabled};q(e),J(e)}W(!1)})(s[0]):q(void 0)},[s.length]),e.createElement(d,{isOpen:!0,hideOverlay:!0,width:me,header:{icon:G,title:"Cluster Configuration",onClose:o}},e.createElement(ye,null,e.createElement(he,null,e.createElement(u,{width:"40%",value:I,onChange:D}),Q?e.createElement(g,{fullWidth:!0,status:p.Info,message:'The values don\'t reflect the current configuration of the selected clusters.\n"Apply" will override the current configurations.'}):1===s.length&&void 0!==F?e.createElement(g,{fullWidth:!0,status:p.Success,message:"The values reflect the current configuration of the selected cluster."}):null),e.createElement(fe,null,e.createElement(ve,{$width:"40%"},e.createElement(b,{$padding:"0 12px",$justifyContent:"space-between"},e.createElement(b,{$gap:8},e.createElement(m,{size:y.XS},"Clusters"),e.createElement(h,{label:n.length,status:f.Unknown})),e.createElement(b,{$gap:8},e.createElement(m,{size:y.XXXS,color:P.v2.colors.silver[200]},"Selected"),e.createElement(h,{label:`${s.length}/${n.length}`,status:f.Unknown}))),e.createElement(we,{$isFooterOpen:V,$borderRadius:"16px 0 0 16px"},S.map(t=>e.createElement(Ce,{key:t.id,onClick:()=>z(t.id)},e.createElement(v,{value:s.includes(t.id),onChange:()=>z(t.id)}),e.createElement(m,{size:y.XS},t.name))))),e.createElement(ve,{$width:"60%"},e.createElement(b,{$padding:"2px 12px"},e.createElement(m,{size:y.XS},"Configurations")),e.createElement(we,{$isFooterOpen:V,$borderRadius:"0 16px 16px 0"},U?e.createElement(w,null):e.createElement(b,{$gap:12},e.createElement(C,{size:k.S,label:"Automatic Rollout "+(H.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:H.automaticRollout,onChange:e=>Y("automaticRollout",e)})))))),V&&e.createElement(ke,null,T?e.createElement(x,{label:"Applying configurations...",icon:K,withGradient:!0,typographyProps:{size:y.XXS}}):N?e.createElement(m,{size:y.XXS,color:P.v2.colors.red[500]},N):null,e.createElement("div",{style:{width:"150px"}},e.createElement($,{variant:R.Secondary,label:"Cancel",fullWidth:!0,onClick:()=>O(!0),disabled:T})),e.createElement("div",{style:{width:"150px"}},e.createElement($,{variant:R.Primary,label:"Apply",fullWidth:!0,onClick:async()=>{j(!0);const{error:e}=await L(s,H);j(!1),e?E(e):(r([]),o())},disabled:T}))),M&&e.createElement(ge,{onDeny:()=>O(!1),onApprove:()=>{O(!1),r([]),o()}}))};var $e;!function(e){e.Id="id",e.Name="name",e.Type="type",e.Status="status",e.OdigosVersion="odigosVersion",e.ConnectedSince="connectedSince",e.LastActivity="lastActivity"}($e||($e={}));const Re=[{key:$e.Name,label:"Name",sortable:!0},{key:$e.Type,label:"Type",sortable:!0,textAlign:"right"},{key:$e.Status,label:"Status",sortable:!0},{key:$e.OdigosVersion,label:"Odigos Version",sortable:!0},{key:$e.ConnectedSince,label:"Connected Since",sortable:!0},{key:$e.LastActivity,label:"Last Activity",sortable:!0}],Ae=({tableRowsMaxHeight:n,connections:i,getConnections:s,onClickConnection:r,deleteConnection:c,getConnectionRemoteConfig:d,applyConfigurations:u})=>{const{formatTimeAgo:g}=A(),[b,m]=t(!1),[y,v]=t(i||[]),[w,C]=t(""),k=o(async()=>{try{m(!0),v(await s()??[])}catch(e){}finally{m(!1)}},[]);l(()=>{y.length||k()},[y.length,k]);const[x,$]=t(null),[M,O]=t([]),[T,j]=t(!1),N=a(()=>y.filter(e=>!w||e.name.toLowerCase().includes(w.toLowerCase())).map(t=>({onClick:()=>r(t),isSelected:M.includes(t.id),onSelect:()=>O(e=>[...e,t.id]),onDeselect:()=>O(e=>e.filter(e=>e!==t.id)),cells:[{key:$e.Id,rawValue:t.id},{key:$e.Name,rawValue:t.name},{key:$e.Type,rawValue:t.type},{key:$e.Status,rawValue:t.status,component:()=>(t=>{const a=t===p.Success?"Connection live":"Connection lost",l=t===p.Success?X:Z;return e.createElement(h,{status:t,label:a,leftIcon:l})})(t.status)},{key:$e.OdigosVersion,rawValue:t.odigosVersion},{key:$e.ConnectedSince,rawValue:t.connectedAt?g(t.connectedAt):"-"},{key:$e.LastActivity,rawValue:t.lastSeenAt?g(t.lastSeenAt):"-"}]})),[y,M,w]);return e.createElement(L,null,e.createElement(P,{backgroundWeight:"1000",icon:G,title:"Connections",badge:{label:y.length.toString(),status:f.Unknown},search:{placeholder:"Search by cluster name",value:w,onChange:e=>C(e)},actions:[{id:I(),type:D.Button,buttonProps:{variant:R.Secondary,size:S.S,leftIcon:B,onClick:()=>k(),disabled:b}},{id:I(),type:D.Button,buttonProps:{variant:R.Primary,size:S.S,label:"Configurations",rightIcon:J,onClick:()=>j(!0)}}]},e.createElement(V,{variant:z.Pretty,maxHeight:n,isLoading:b,withCheckboxes:!0,columns:Re,rows:N,rowActionsPushRightPosition:T?`calc(${me} - 24px)`:void 0,getRowActions:({cells:e})=>[{id:I(),label:"Edit Configuration",rightIcon:J,onClick:async()=>{const t=e.find(e=>e.key===$e.Id)?.rawValue;t&&(O([t.toString()]),j(!0))}},{id:I(),label:"Delete Connection",rightIcon:Q,disabled:e.find(e=>e.key===$e.Status)?.rawValue===p.Success,onClick:()=>{const t=e.find(e=>e.key===$e.Id)?.rawValue;t&&$(t.toString())}}]}),T&&e.createElement(xe,{onClose:()=>j(!1),connections:y,selectedConnectionIds:M,setSelectedConnectionIds:O,getConnectionRemoteConfig:d,onApply:u}),x&&e.createElement(pe,{target:"connection",onDeny:()=>$(null),onApprove:async()=>{x&&(await c(x),k())}})))},Le=n.div`
49
+ `,xe=({onClose:o,connections:n,selectedConnectionIds:s,setSelectedConnectionIds:r,getConnectionRemoteConfig:A,onApply:L})=>{const P=i(),[I,D]=t(""),S=a(()=>n.filter(e=>!I||e.name.toLowerCase().includes(I.toLowerCase())),[n,I]),V=s.length>0,z=e=>{r(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},[M,O]=t(!1),[T,j]=t(!1),[N,E]=t(void 0),[U,W]=t(!1),[F,q]=t(void 0),{formData:H,handleFormChange:Y,areFormValuesEqual:B,resetFormData:J}=c({automaticRollout:!0}),Q=a(()=>s.length>1||void 0!==F&&!B(F,H),[s.length,F,H]);return l(()=>{1===s.length?(async e=>{if(U)return;W(!0);const t=await A(e);if(t){const e={automaticRollout:!t.rollout?.automaticRolloutDisabled};q(e),J(e)}W(!1)})(s[0]):q(void 0)},[s.length]),e.createElement(d,{isOpen:!0,hideOverlay:!0,width:me,header:{icon:G,title:"Cluster Configuration",onClose:o}},e.createElement(ye,null,e.createElement(he,null,e.createElement(u,{width:"40%",value:I,onChange:D}),Q?e.createElement(g,{fullWidth:!0,status:p.Info,message:'The values don\'t reflect the current configuration of the selected clusters.\n"Apply" will override the current configurations.'}):1===s.length&&void 0!==F?e.createElement(g,{fullWidth:!0,status:p.Success,message:"The values reflect the current configuration of the selected cluster."}):null),e.createElement(fe,null,e.createElement(ve,{$width:"40%"},e.createElement(b,{$padding:"0 12px",$justifyContent:"space-between"},e.createElement(b,{$gap:8},e.createElement(m,{size:y.XS},"Clusters"),e.createElement(h,{label:n.length,status:f.Unknown})),e.createElement(b,{$gap:8},e.createElement(m,{size:y.XXXS,color:P.v2.colors.silver[200]},"Selected"),e.createElement(h,{label:`${s.length}/${n.length}`,status:f.Unknown}))),e.createElement(we,{$isFooterOpen:V,$borderRadius:"16px 0 0 16px"},S.map(t=>e.createElement(Ce,{key:t.id,onClick:()=>z(t.id)},e.createElement(v,{value:s.includes(t.id),onChange:()=>z(t.id)}),e.createElement(m,{size:y.XS},t.name))))),e.createElement(ve,{$width:"60%"},e.createElement(b,{$padding:"2px 12px"},e.createElement(m,{size:y.XS},"Configurations")),e.createElement(we,{$isFooterOpen:V,$borderRadius:"0 16px 16px 0"},U?e.createElement(w,null):e.createElement(b,{$gap:12},e.createElement(C,{size:k.S,label:"Automatic Rollout "+(H.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:H.automaticRollout,onChange:e=>Y("automaticRollout",e)})))))),V&&e.createElement(ke,null,T?e.createElement(x,{label:"Applying configurations...",icon:K,withGradient:!0,typographyProps:{size:y.XXS}}):N?e.createElement(m,{size:y.XXS,color:P.v2.colors.red[500]},N):null,e.createElement("div",{style:{width:"150px"}},e.createElement($,{variant:R.Secondary,label:"Cancel",fullWidth:!0,onClick:()=>O(!0),disabled:T})),e.createElement("div",{style:{width:"150px"}},e.createElement($,{variant:R.Primary,label:"Apply",fullWidth:!0,onClick:async()=>{j(!0);const{error:e}=await L(s,H);j(!1),e?E(e):(r([]),o())},disabled:T}))),M&&e.createElement(ge,{onDeny:()=>O(!1),onApprove:()=>{O(!1),r([]),o()}}))};var $e;!function(e){e.Id="id",e.Name="name",e.Type="type",e.Status="status",e.OdigosVersion="odigosVersion",e.ConnectedSince="connectedSince",e.LastActivity="lastActivity"}($e||($e={}));const Re=[{key:$e.Name,label:"Name"},{key:$e.Type,label:"Type",textAlign:"right"},{key:$e.Status,label:"Status"},{key:$e.OdigosVersion,label:"Odigos Version"},{key:$e.ConnectedSince,label:"Connected Since"},{key:$e.LastActivity,label:"Last Activity"}],Ae=({tableRowsMaxHeight:n,connections:i,getConnections:s,onClickConnection:r,deleteConnection:c,getConnectionRemoteConfig:d,applyConfigurations:u})=>{const{formatTimeAgo:g}=A(),[b,m]=t(!1),[y,v]=t(i||[]),[w,C]=t(""),k=o(async()=>{try{m(!0),v(await s()??[])}catch(e){}finally{m(!1)}},[]);l(()=>{y.length||k()},[y.length,k]);const[x,$]=t(null),[M,O]=t([]),[T,j]=t(!1),N=a(()=>y.filter(e=>!w||e.name.toLowerCase().includes(w.toLowerCase())).map(t=>({onClick:()=>r(t),isSelected:M.includes(t.id),onSelect:()=>O(e=>[...e,t.id]),onDeselect:()=>O(e=>e.filter(e=>e!==t.id)),cells:[{key:$e.Id,rawValue:t.id},{key:$e.Name,rawValue:t.name},{key:$e.Type,rawValue:t.type},{key:$e.Status,rawValue:t.status,component:()=>(t=>{const a=t===p.Success?"Connection live":"Connection lost",l=t===p.Success?X:Z;return e.createElement(h,{status:t,label:a,leftIcon:l})})(t.status)},{key:$e.OdigosVersion,rawValue:t.odigosVersion},{key:$e.ConnectedSince,rawValue:t.connectedAt?g(t.connectedAt):"-"},{key:$e.LastActivity,rawValue:t.lastSeenAt?g(t.lastSeenAt):"-"}]})),[y,M,w]);return e.createElement(L,null,e.createElement(P,{backgroundWeight:"1000",icon:G,title:"Connections",badge:{label:y.length.toString(),status:f.Unknown},search:{placeholder:"Search by cluster name",value:w,onChange:e=>C(e)},actions:[{id:I(),type:D.Button,buttonProps:{variant:R.Secondary,size:S.S,leftIcon:B,onClick:()=>k(),disabled:b}},{id:I(),type:D.Button,buttonProps:{variant:R.Primary,size:S.S,label:"Configurations",rightIcon:J,onClick:()=>j(!0)}}]},e.createElement(V,{variant:z.Pretty,maxHeight:n,isLoading:b,withCheckboxes:!0,columns:Re,rows:N,rowActionsPushRightPosition:T?`calc(${me} - 24px)`:void 0,getRowActions:({cells:e})=>[{id:I(),label:"Edit Configuration",rightIcon:J,onClick:async()=>{const t=e.find(e=>e.key===$e.Id)?.rawValue;t&&(O([t.toString()]),j(!0))}},{id:I(),label:"Delete Connection",rightIcon:Q,disabled:e.find(e=>e.key===$e.Status)?.rawValue===p.Success,onClick:()=>{const t=e.find(e=>e.key===$e.Id)?.rawValue;t&&$(t.toString())}}]}),T&&e.createElement(xe,{onClose:()=>j(!1),connections:y,selectedConnectionIds:M,setSelectedConnectionIds:O,getConnectionRemoteConfig:d,onApply:u}),x&&e.createElement(pe,{target:"connection",onDeny:()=>$(null),onApprove:async()=>{x&&(await c(x),k())}})))},Le=n.div`
50
50
  display: flex;
51
51
  align-items: center;
52
52
  justify-content: space-between;
@@ -60,7 +60,7 @@ import e,{useState as t,useMemo as a,useEffect as l,useCallback as o}from"react"
60
60
  }
61
61
  `,Pe=n.div`
62
62
  animation-name: ${M.animations.fade.in};
63
- `,Ie=({pod:o,getExtendedPodInfo:n,onClose:i})=>{const{formatTimeAgo:s}=A(),[c,u]=t(null),[g,p]=t(!1);l(()=>{o?n(o.namespace,o.name).then(e=>u(e??null)):(u(null),p(!1))},[o]);const b=a(()=>[{id:I(),title:"Node",label:c?.node??"-",withCopy:!0},{id:I(),title:"Status",badge:{status:O(c?.status),label:c?.status??"-"}}],[c]),y=a(()=>c?.containers?.map(e=>({id:I(),items:[{id:I(),title:"Container",label:e.name??"-"},{id:I(),title:"Status",badge:{status:O(e.status),label:e.status??"-"},label:e.startedAt?`(since ${s(e.startedAt)})`:""},{id:I(),title:"Image Version",label:e.image?.split(":")?.[1]??"-"},{id:I(),title:"Image Repository",label:e.image?.split(":")?.[0]??"-"},{id:I(),title:"Restarts",label:e.restarts.toString()},{id:I(),title:"State Reason",label:e.stateReason??"-"},{id:I(),title:"Resource Requests",label:`CPU ${e.resources.requests.cpu} • Memory ${e.resources.requests.memory}`},{id:I(),title:"Resource Limits",label:`CPU ${e.resources.limits.cpu} • Memory ${e.resources.limits.memory}`}]}))||[],[c]);return e.createElement(d,{isOpen:!!o,header:{icon:_,title:"Pod Information",onClose:i}},c?null:e.createElement(T,null,e.createElement(w,null)),c?e.createElement(e.Fragment,null,e.createElement(P,{icon:_,title:c.name,withCopyTitle:!0},e.createElement(r,{$gap:24},e.createElement(j,{cellsPerRow:2,items:b}),y.length>0&&e.createElement(r,{$gap:12},e.createElement(Le,{onClick:()=>p(e=>!e)},e.createElement(m,null,"Containers Overview"),e.createElement(N,{icon:g?ee:te})),g&&y.map(({id:t,items:a})=>e.createElement(Pe,{key:t},e.createElement(j,{cellsPerRow:2,items:a})))))),e.createElement(P,{icon:ae,title:"Kubectl Commands"},e.createElement(r,{$gap:12},e.createElement(E,{value:`kubectl get pod ${c.name} -n ${c.namespace} -o yaml`}),e.createElement(E,{value:`kubectl describe pod ${c.name} -n ${c.namespace}`}),e.createElement(E,{value:`kubectl logs ${c.name} -n ${c.namespace}`}))),e.createElement(ce,{yaml:c.manifestYAML})):null)};var De;!function(e){e.PodName="podName",e.Ready="ready",e.Started="started",e.Status="status",e.Restarts="restarts",e.NodeName="nodeName",e.Age="age",e.DockerImage="dockerImage"}(De||(De={}));const Se=[{key:De.PodName,label:"Pod Name",sortable:!0},{key:De.Ready,label:"Ready",sortable:!0,textAlign:"right"},{key:De.Started,label:"Started",sortable:!0,textAlign:"right"},{key:De.Status,label:"Status",sortable:!0},{key:De.Restarts,label:"Restarts",sortable:!0,textAlign:"right"},{key:De.NodeName,label:"Node Name",sortable:!0},{key:De.Age,label:"Age",sortable:!0,textAlign:"right"},{key:De.DockerImage,label:"Docker Image",sortable:!0,textAlign:"right"}],Ve=({isLoading:l,tableRowsMaxHeight:o,pods:n,getExtendedPodInfo:s})=>{const r=i(),{formatTimeAgo:c}=A(),[d,u]=t(null),g=a(()=>{const t=t=>t?e.createElement(le,{fill:U(r,p.Success,"500"),size:20}):e.createElement(oe,{fill:U(r,p.Error,"500"),size:20});return n.map(a=>({onClick:()=>u(a),cells:[{key:De.PodName,rawValue:a.name},{key:De.Ready,rawValue:a.ready,component:()=>t(a.ready)},{key:De.Started,rawValue:a.started,component:()=>t(a.started)},{key:De.Status,rawValue:a.status,component:()=>{return t=a.status,e.createElement(h,{status:O(t),label:t});var t}},{key:De.Restarts,rawValue:a.restartsCount.toString()},{key:De.NodeName,rawValue:a.nodeName},{key:De.Age,rawValue:c(a.creationTimestamp)},{key:De.DockerImage,rawValue:a.image}]}))},[n,r]);return e.createElement(P,{icon:_,title:"Pods"},e.createElement(V,{variant:z.Data,maxHeight:o,isLoading:l,columns:Se,rows:g}),e.createElement(Ie,{pod:d,getExtendedPodInfo:s,onClose:()=>u(null)}))};var ze;!function(e){e.Gateway="gateway",e.Node="node"}(ze||(ze={}));const Me=[{value:ze.Gateway,label:"Gateway"},{value:ze.Node,label:"Node Collector"}],Oe=n.div`
63
+ `,Ie=({pod:o,getExtendedPodInfo:n,onClose:i})=>{const{formatTimeAgo:s}=A(),[c,u]=t(null),[g,p]=t(!1);l(()=>{o?n(o.namespace,o.name).then(e=>u(e??null)):(u(null),p(!1))},[o]);const b=a(()=>[{id:I(),title:"Node",label:c?.node??"-",withCopy:!0},{id:I(),title:"Status",badge:{status:O(c?.status),label:c?.status??"-"}}],[c]),y=a(()=>c?.containers?.map(e=>({id:I(),items:[{id:I(),title:"Container",label:e.name??"-"},{id:I(),title:"Status",badge:{status:O(e.status),label:e.status??"-"},label:e.startedAt?`(since ${s(e.startedAt)})`:""},{id:I(),title:"Image Version",label:e.image?.split(":")?.[1]??"-"},{id:I(),title:"Image Repository",label:e.image?.split(":")?.[0]??"-"},{id:I(),title:"Restarts",label:e.restarts.toString()},{id:I(),title:"State Reason",label:e.stateReason??"-"},{id:I(),title:"Resource Requests",label:`CPU ${e.resources.requests.cpu} • Memory ${e.resources.requests.memory}`},{id:I(),title:"Resource Limits",label:`CPU ${e.resources.limits.cpu} • Memory ${e.resources.limits.memory}`}]}))||[],[c]);return e.createElement(d,{isOpen:!!o,header:{icon:_,title:"Pod Information",onClose:i}},c?null:e.createElement(T,null,e.createElement(w,null)),c?e.createElement(e.Fragment,null,e.createElement(P,{icon:_,title:c.name,withCopyTitle:!0},e.createElement(r,{$gap:24},e.createElement(j,{cellsPerRow:2,items:b}),y.length>0&&e.createElement(r,{$gap:12},e.createElement(Le,{onClick:()=>p(e=>!e)},e.createElement(m,null,"Containers Overview"),e.createElement(N,{icon:g?ee:te})),g&&y.map(({id:t,items:a})=>e.createElement(Pe,{key:t},e.createElement(j,{cellsPerRow:2,items:a})))))),e.createElement(P,{icon:ae,title:"Kubectl Commands"},e.createElement(r,{$gap:12},e.createElement(E,{value:`kubectl get pod ${c.name} -n ${c.namespace} -o yaml`}),e.createElement(E,{value:`kubectl describe pod ${c.name} -n ${c.namespace}`}),e.createElement(E,{value:`kubectl logs ${c.name} -n ${c.namespace}`}))),e.createElement(ce,{yaml:c.manifestYAML})):null)};var De;!function(e){e.PodName="podName",e.Ready="ready",e.Started="started",e.Status="status",e.Restarts="restarts",e.NodeName="nodeName",e.Age="age",e.DockerImage="dockerImage"}(De||(De={}));const Se=[{key:De.PodName,label:"Pod Name"},{key:De.Ready,label:"Ready",textAlign:"right"},{key:De.Started,label:"Started",textAlign:"right"},{key:De.Status,label:"Status"},{key:De.Restarts,label:"Restarts",textAlign:"right"},{key:De.NodeName,label:"Node Name"},{key:De.Age,label:"Age",textAlign:"right"},{key:De.DockerImage,label:"Docker Image",textAlign:"right"}],Ve=({isLoading:l,tableRowsMaxHeight:o,pods:n,getExtendedPodInfo:s})=>{const r=i(),{formatTimeAgo:c}=A(),[d,u]=t(null),g=a(()=>{const t=t=>t?e.createElement(le,{fill:U(r,p.Success,"500"),size:20}):e.createElement(oe,{fill:U(r,p.Error,"500"),size:20});return n.map(a=>({onClick:()=>u(a),cells:[{key:De.PodName,rawValue:a.name},{key:De.Ready,rawValue:a.ready,component:()=>t(a.ready)},{key:De.Started,rawValue:a.started,component:()=>t(a.started)},{key:De.Status,rawValue:a.status,component:()=>{return t=a.status,e.createElement(h,{status:O(t),label:t});var t}},{key:De.Restarts,rawValue:a.restartsCount.toString()},{key:De.NodeName,rawValue:a.nodeName},{key:De.Age,rawValue:c(a.creationTimestamp)},{key:De.DockerImage,rawValue:a.image}]}))},[n,r]);return e.createElement(P,{icon:_,title:"Pods"},e.createElement(V,{variant:z.Data,maxHeight:o,isLoading:l,columns:Se,rows:g}),e.createElement(Ie,{pod:d,getExtendedPodInfo:s,onClose:()=>u(null)}))};var ze;!function(e){e.Gateway="gateway",e.Node="node"}(ze||(ze={}));const Me=[{value:ze.Gateway,label:"Gateway"},{value:ze.Node,label:"Node Collector"}],Oe=n.div`
64
64
  display: flex;
65
65
  align-items: center;
66
66
  justify-content: space-between;