@odigos/ui-kit 0.0.158 → 0.0.159

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/containers.js CHANGED
@@ -1,4 +1,4 @@
1
- import e,{useState as t,useEffect as i,forwardRef as a,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{H as m,J as h,K as g,M as y,Q as v,R as b,V as f,X as x,Y as $,Z as k,_ as C,$ as S,a0 as w,a1 as T,a2 as D,a3 as N,a4 as E,t as O,a5 as F,a6 as I,a7 as A,a8 as M,a9 as R,aa as L,ab as P,ac as K,ad as j,ae as V,af as q,ag as z,ah as H,ai as B,h as W,aj as _,ak as J,al as U,am as Y,an as G,ao as X,ap as Z,aq as Q,F as ee,ar as te,as as ie,at as ae,au as ne,av as oe,aw as le,ax as re,ay as se,az as ce,aA as de,i as ue,aB as pe,aC as me,aD as he,aE as ge,aF as ye,aG as ve,aH as be,aI as fe,aJ as xe,aK as $e,aL as ke,aM as Ce,aN as Se,aO as we,aP as Te,c as De,N as Ne,aQ as Ee,aR as Oe,aS as Fe,aT as Ie,aU as Ae,aV as Me,aW as Re,aX as Le,m as Pe,aY as Ke,aZ as je,a_ as Ve,a$ as qe,b0 as ze,b1 as He,b2 as Be,b3 as We,b4 as _e,b5 as Je,b6 as Ue,b7 as Ye,b8 as Ge,b9 as Xe,ba as Ze,bb as Qe,bc as et,bd as tt,be as it,bf as at,bg as nt,bh as ot,bi as lt,bj as rt,bk as st,bl as ct,bm as dt,bn as ut,bo as pt,bp as mt,bq as ht,br as gt,bs as yt,bt as vt,bu as bt,bv as ft,bw as xt,bx as $t,by as kt,bz as Ct,bA as St,bB as wt,bC as Tt,bD as Dt,bE as Nt,bF as Et,bG as Ot,bH as Ft,bI as It,bJ as At,bK as Mt,bL as Rt,bM as Lt,bN as Pt,bO as Kt,bP as jt,bQ as Vt,bR as qt,q as zt,bS as Ht,bT as Bt,bU as Wt,bV as _t,bW as Jt,bX as Ut,bY as Yt,bZ as Gt,b_ as Xt,b$ as Zt,c0 as Qt,g as ei,c1 as ti,c2 as ii,c3 as ai,c4 as ni,c5 as oi,c6 as li,c7 as ri,c8 as si,c9 as ci,ca as di,u as ui,d as pi,cb as mi,cc as hi,cd as gi,ce as yi,cf as vi,cg as bi,ch as fi}from"./chunks/ui-components-8250476f.js";import{VSquareIcon as xi,XSquareIcon as $i,EditIcon as ki,TrashIcon as Ci,OdigosLogoText as Si,PlusIcon as wi,SearchIcon as Ti,FilterIcon as Di,DataStreamIcon as Ni,VIcon as Ei,OdigosLogo as Oi,ArrowIcon as Fi,RefreshLeftArrowIcon as Ii,NotificationIcon as Ai,UserIcon as Mi,ImageErrorIcon as Ri,OverviewIcon as Li,InstrumentationRuleIcon as Pi,ActionIcon as Ki,SourceIcon as ji,DestinationIcon as Vi,SlackLogo as qi,RefreshIcon as zi,KeyIcon as Hi,TerminalIcon as Bi,ExclamationTriangleIcon as Wi,TraceViewIcon as _i}from"./icons.js";import{MarkerType as Ji,useNodesState as Ui,useEdgesState as Yi,applyNodeChanges as Gi}from"@xyflow/react";import{Y as Xi}from"./chunks/index-2b728335.js";import"zustand";import"javascript-time-ago";import"./chunks/vendor-55cc654c.js";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";const Zi=e=>{const{type:t,name:i,notes:a,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:$,samplingPercentage:k,endpointsFilters:C,servicesNameFilters:S,attributeFilters:w}}=e,T=[{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:i||""},{title:m.NOTES,value:a||""},{type:h.Divider}];if(t===g.K8sAttributes&&(T.push({title:"Collect Container Attributes",value:String(l)}),T.push({title:"Collect ReplicaSet Attributes",value:String(r)}),T.push({title:"Collect Workload ID",value:String(s)}),T.push({title:"Collect Cluster ID",value:String(c)}),d?.length&&T.push({type:h.Divider}),d?.forEach(({labelKey:e,attributeKey:t,from:i},a)=>{let n="";n+=`Label Key: ${e}\n`,n+=`Attribute Key: ${t}\n`,n+=`From: ${i||y.Pod}\n`,T.push({title:"Label"+(d.length>1?` #${a+1}`:""),value:n})}),u?.length&&T.push({type:h.Divider}),u?.forEach(({annotationKey:e,attributeKey:t,from:i},a)=>{let n="";n+=`Annotation Key: ${e}\n`,n+=`Attribute Key: ${t}\n`,n+=`From: ${i||y.Pod}\n`,T.push({title:"Annotation"+(u.length>1?` #${a+1}`:""),value:n})})),t===g.AddClusterInfo){T.push({title:"Overwrite Existing Values",value:String(v||!1)});let e="";p?.forEach(({attributeName:t,attributeStringValue:i},a)=>{e+=`${t}: ${i}`,a<p.length-1&&(e+=", ")}),T.push({title:"Attributes",value:e})}if(t===g.DeleteAttributes){let e="";b?.forEach((t,i)=>{e+=t,i<b.length-1&&(e+=", ")}),T.push({title:"Attributes",value:e})}if(t===g.RenameAttributes){let e="";const t=Object.entries(f||{});t.forEach(([i,a],n)=>{e+=`${i}: ${a}`,n<t.length-1&&(e+=", ")}),T.push({title:"Attributes",value:e})}if(t===g.PiiMasking){let e="";x?.forEach((t,i)=>{e+=t,i<x.length-1&&(e+=", ")}),T.push({title:"Categories",value:e})}return t===g.ErrorSampler&&T.push({title:"Sampling Ratio",value:String($)}),t===g.ProbabilisticSampler&&T.push({title:"Sampling Percentage",value:String(k)}),t===g.LatencySampler&&C?.forEach(({serviceName:e,httpRoute:t,minimumLatencyThreshold:i,fallbackSamplingRatio:a},n)=>{let o="";o+=`Service Name: ${e}\n`,o+=`HTTP Route: ${t}\n`,o+=`Min. Latency: ${i}\n`,o+=`Fallback Sampling Ratio: ${a}`,T.push({title:"Endpoint"+(C.length>1?` #${n+1}`:""),value:o})}),t===g.ServiceNameSampler&&S?.forEach(({serviceName:e,samplingRatio:t,fallbackSamplingRatio:i},a)=>{let n="";n+=`Service Name: ${e}\n`,n+=`Sampling Ratio: ${t}\n`,n+=`Fallback Sampling Ratio: ${i}`,T.push({title:"Filter"+(S.length>1?` #${a+1}`:""),value:n})}),t===g.SpanAttributeSampler&&w?.forEach(({serviceName:e,attributeKey:t,fallbackSamplingRatio:i,condition:a},n)=>{let o="";o+=`Service Name: ${e}\n`,o+=`Attribute Key: ${t}\n`,o+=`Fallback Sampling Ratio: ${i}\n`;const l=Object.keys(a)[0];o+=`Condition: ${l}\n`,o+=`Operation: ${a[l]?.operation}\n`,o+=`Expected Value: ${a[l]?.expectedValue}`,"jsonCondition"===l&&(o+=`\nJSON Path: ${a[l].jsonPath}`),T.push({title:"Filter"+(w.length>1?` #${n+1}`:""),value:o})}),T},Qi=x.PiiCategories,ea=d.div`
1
+ import e,{useState as t,useEffect as i,forwardRef as a,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{E as m,G as h,H as g,K as y,J as v,M as b,Q as f,R as x,V as $,X as k,Y as C,Z as S,_ as w,$ as T,a0 as D,a1 as N,a2 as E,p as O,a3 as F,a4 as I,a5 as A,a6 as M,a7 as R,a8 as L,a9 as P,aa as K,ab as j,ac as V,ad as q,ae as z,af as H,ag as B,a as W,ah as _,ai as J,aj as U,ak as G,al as Y,am as X,an as Z,ao as Q,F as ee,ap as te,aq as ie,ar as ae,as as ne,at as oe,au as le,av as re,aw as se,ax as ce,ay as de,b as ue,az as pe,aA as me,aB as he,aC as ge,aD as ye,aE as ve,aF as be,aG as fe,aH as xe,aI as $e,aJ as ke,aK as Ce,aL as Se,aM as we,aN as Te,r as De,aO as Ne,aP as Ee,aQ as Oe,aR as Fe,aS as Ie,aT as Ae,aU as Me,aV as Re,aW as Le,d as Pe,aX as Ke,aY as je,aZ as Ve,a_ as qe,a$ as ze,b0 as He,b1 as Be,b2 as We,b3 as _e,b4 as Je,b5 as Ue,b6 as Ge,b7 as Ye,b8 as Xe,b9 as Ze,ba as Qe,bb as et,bc as tt,bd as it,be as at,bf as nt,bg as ot,bh as lt,bi as rt,bj as st,bk as ct,bl as dt,bm as ut,bn as pt,bo as mt,bp as ht,bq as gt,br as yt,bs as vt,bt,bu as ft,bv as xt,bw as $t,bx as kt,by as Ct,bz as St,bA as wt,bB as Tt,bC as Dt,bD as Nt,bE as Et,bF as Ot,bG as Ft,bH as It,bI as At,bJ as Mt,bK as Rt,bL as Lt,bM as Pt,bN as Kt,bO as jt,bP as Vt,bQ as qt,i as zt,bR as Ht,bS as Bt,bT as Wt,bU as _t,bV as Jt,bW as Ut,bX as Gt,bY as Yt,bZ as Xt,b_ as Zt,b$ as Qt,k as ei,c0 as ti,c1 as ii,c2 as ai,c3 as ni,c4 as oi,c5 as li,c6 as ri,c7 as si,c8 as ci,c9 as di,ca as ui,u as pi,cb as mi,cc as hi,cd as gi,ce as yi,cf as vi,cg as bi,ch as fi}from"./chunks/ui-components-f482fcd2.js";import{VSquareIcon as xi,XSquareIcon as $i,EditIcon as ki,TrashIcon as Ci,OdigosLogoText as Si,PlusIcon as wi,SearchIcon as Ti,FilterIcon as Di,DataStreamIcon as Ni,VIcon as Ei,OdigosLogo as Oi,ArrowIcon as Fi,RefreshLeftArrowIcon as Ii,NotificationIcon as Ai,UserIcon as Mi,ImageErrorIcon as Ri,OverviewIcon as Li,InstrumentationRuleIcon as Pi,ActionIcon as Ki,SourceIcon as ji,DestinationIcon as Vi,SlackLogo as qi,RefreshIcon as zi,KeyIcon as Hi,TerminalIcon as Bi,ExclamationTriangleIcon as Wi,TraceViewIcon as _i}from"./icons.js";import{MarkerType as Ji,useNodesState as Ui,useEdgesState as Gi,applyNodeChanges as Yi}from"@xyflow/react";import{Y as Xi}from"./chunks/index-f8b63983.js";import"zustand";import"javascript-time-ago";import"./chunks/vendor-55cc654c.js";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";const Zi=e=>{const{type:t,name:i,notes:a,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:$,samplingPercentage:k,endpointsFilters:C,servicesNameFilters:S,attributeFilters:w}}=e,T=[{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:i||""},{title:m.NOTES,value:a||""},{type:h.Divider}];if(t===g.K8sAttributes&&(T.push({title:"Collect Container Attributes",value:String(l)}),T.push({title:"Collect ReplicaSet Attributes",value:String(r)}),T.push({title:"Collect Workload ID",value:String(s)}),T.push({title:"Collect Cluster ID",value:String(c)}),d?.length&&T.push({type:h.Divider}),d?.forEach(({labelKey:e,attributeKey:t,from:i},a)=>{let n="";n+=`Label Key: ${e}\n`,n+=`Attribute Key: ${t}\n`,n+=`From: ${i||y.Pod}\n`,T.push({title:"Label"+(d.length>1?` #${a+1}`:""),value:n})}),u?.length&&T.push({type:h.Divider}),u?.forEach(({annotationKey:e,attributeKey:t,from:i},a)=>{let n="";n+=`Annotation Key: ${e}\n`,n+=`Attribute Key: ${t}\n`,n+=`From: ${i||y.Pod}\n`,T.push({title:"Annotation"+(u.length>1?` #${a+1}`:""),value:n})})),t===g.AddClusterInfo){T.push({title:"Overwrite Existing Values",value:String(v||!1)});let e="";p?.forEach(({attributeName:t,attributeStringValue:i},a)=>{e+=`${t}: ${i}`,a<p.length-1&&(e+=", ")}),T.push({title:"Attributes",value:e})}if(t===g.DeleteAttributes){let e="";b?.forEach((t,i)=>{e+=t,i<b.length-1&&(e+=", ")}),T.push({title:"Attributes",value:e})}if(t===g.RenameAttributes){let e="";const t=Object.entries(f||{});t.forEach(([i,a],n)=>{e+=`${i}: ${a}`,n<t.length-1&&(e+=", ")}),T.push({title:"Attributes",value:e})}if(t===g.PiiMasking){let e="";x?.forEach((t,i)=>{e+=t,i<x.length-1&&(e+=", ")}),T.push({title:"Categories",value:e})}return t===g.ErrorSampler&&T.push({title:"Sampling Ratio",value:String($)}),t===g.ProbabilisticSampler&&T.push({title:"Sampling Percentage",value:String(k)}),t===g.LatencySampler&&C?.forEach(({serviceName:e,httpRoute:t,minimumLatencyThreshold:i,fallbackSamplingRatio:a},n)=>{let o="";o+=`Service Name: ${e}\n`,o+=`HTTP Route: ${t}\n`,o+=`Min. Latency: ${i}\n`,o+=`Fallback Sampling Ratio: ${a}`,T.push({title:"Endpoint"+(C.length>1?` #${n+1}`:""),value:o})}),t===g.ServiceNameSampler&&S?.forEach(({serviceName:e,samplingRatio:t,fallbackSamplingRatio:i},a)=>{let n="";n+=`Service Name: ${e}\n`,n+=`Sampling Ratio: ${t}\n`,n+=`Fallback Sampling Ratio: ${i}`,T.push({title:"Filter"+(S.length>1?` #${a+1}`:""),value:n})}),t===g.SpanAttributeSampler&&w?.forEach(({serviceName:e,attributeKey:t,fallbackSamplingRatio:i,condition:a},n)=>{let o="";o+=`Service Name: ${e}\n`,o+=`Attribute Key: ${t}\n`,o+=`Fallback Sampling Ratio: ${i}\n`;const l=Object.keys(a)[0];o+=`Condition: ${l}\n`,o+=`Operation: ${a[l]?.operation}\n`,o+=`Expected Value: ${a[l]?.expectedValue}`,"jsonCondition"===l&&(o+=`\nJSON Path: ${a[l].jsonPath}`),T.push({title:"Filter"+(w.length>1?` #${n+1}`:""),value:o})}),T},Qi=x.PiiCategories,ea=d.div`
2
2
  display: flex;
3
3
  flex-direction: row;
4
4
  gap: 32px;
@@ -14,7 +14,7 @@ import e,{useState as t,useEffect as i,forwardRef as a,useRef as n,useImperative
14
14
  padding: 4px;
15
15
  `,ba=d(E)`
16
16
  margin-bottom: 12px;
17
- `,fa=({isUpdate:t,action:i,formData:a,formErrors:n,handleFormChange:o})=>{const l=O.useTheme();return e.createElement(va,null,t&&e.createElement("div",null,e.createElement(ba,null,"Status"),e.createElement(F,{options:[{icon:xi,label:m.ENABLED,value:!1,selectedBgColor:l.text.success+O.opacity.hex["050"]},{icon:$i,label:m.DISABLED,value:!0,selectedBgColor:l.text.error+O.opacity.hex["050"]}],selected:a.disabled,setSelected:e=>o("disabled",e)})),!t&&e.createElement(I,{title:"",description:i.docsDescription,actionButton:e.createElement(A,{endpoint:i.docsEndpoint})}),e.createElement(M,{title:"Signals for Processing",required:!0,allowedSignals:i.allowedSignals,selectedSignals:a.signals||[],setSelectedSignals:e=>o("signals",e),errorMessage:n.signals}),!t&&e.createElement($,{title:"Action name",placeholder:"Use a name that describes the action",value:a.name||"",onChange:({target:{value:e}})=>o("name",e),errorMessage:n.name}),e.createElement(ya,{actionType:i.type,value:a.fields,setValue:(e,t)=>o(`fields.${e}`,t),formErrors:n}),e.createElement(R,{title:"Notes",value:a.notes||"",onChange:({target:{value:e}})=>o("notes",e),errorMessage:n.notes}))},xa=a(({children:i,width:a=640,title:r,titleTooltip:s,hideEditTitleFromEdit:c,icons:d,iconSrcs:u,isEdit:p=!1,isFormDirty:m=!1,isLastItem:h=!1,onClose:g,onEdit:y,onSave:v,onDelete:b,onCancel:f,tabs:x,headerActionButtons:$},k)=>{const C=O.useTheme(),{isThisPending:S}=L(),{addNotification:w}=P(),{drawerType:T,drawerEntityId:D,setDrawerType:N,setDrawerEntityId:F}=K();j({key:"Enter",active:p},()=>Q());const[I,A]=t(!1),[M,R]=t(!1),_=n(null),J=T===B.Source,U=()=>{A(!1),R(!1)},Y=()=>{U(),y&&y(!1),N(null),F(null),g?.()};o(k,()=>({closeDrawer:Y}));const G=()=>{_.current?.clearTitle(),f&&f(),U()},X=()=>{const e=_.current?.isTitleDirty();m||e?R(!0):G()},Z=()=>{A(!0)},Q=()=>{v&&v(_.current?.getTitle()||"")},ee=l(()=>!!T&&S({entityType:T,entityId:D}),[T,D]),te=e=>{w({type:W.Warning,title:"Pending",message:`Cannot click ${e}, ${T} is pending`,hideFromHistory:!0})},ie=$||[];return y&&!p&&ie.push({"data-id":"drawer-edit",variant:"tertiary",onClick:ee?()=>te("edit"):()=>y(!0),children:e.createElement(e.Fragment,null,e.createElement(ki,null),e.createElement(E,{size:14,family:"secondary",decoration:"underline"},"Edit"))}),b&&!p&&ie.push({"data-id":"drawer-delete",variant:"tertiary",onClick:ee?()=>te(J?"uninstrument":"delete"):Z,children:e.createElement(e.Fragment,null,e.createElement(Ci,null),e.createElement(E,{color:C.text.error,size:14,family:"secondary",decoration:"underline"},J?V.UNINSTRUMENT:V.DELETE))}),e.createElement(e.Fragment,null,e.createElement(q,{isOpen:!0,onClose:p?X:Y,closeOnEscape:!I&&!M,width:`${a+64}px`,header:{icons:d,iconSrcs:u,title:r,titleTooltip:s,replaceTitleWith:!c&&p?e.createElement($a,{ref:_,title:r}):void 0,actionButtons:ie,tabs:x},footer:{isOpen:p,leftButtons:[{"data-id":"drawer-save",variant:"primary",onClick:Q,children:V.SAVE},{"data-id":"drawer-cancel",variant:"secondary",onClick:X,children:V.CANCEL}],rightButtons:b?[{"data-id":"drawer-delete",variant:"tertiary",onClick:Z,children:e.createElement(e.Fragment,null,e.createElement(Ci,null),e.createElement(E,{size:14,color:C.text.error,family:"secondary",decoration:"underline"},V.DELETE))}]:[]}},i),e.createElement(z,{isOpen:I,noOverlay:!0,name:`${T}${r?` (${r})`:""}`,type:T,isLastItem:h,onApprove:()=>{b&&b(),U()},onDeny:U}),e.createElement(H,{isOpen:M,noOverlay:!0,name:"edit mode",onApprove:G,onDeny:U}))}),$a=a(({title:a},n)=>{const[l,r]=t(a);return i(()=>{r(a)},[a]),o(n,()=>({getTitle:()=>l||a,isTitleDirty:()=>l!==a,clearTitle:()=>r(a)})),e.createElement($,{"data-id":"title",value:l,onChange:e=>r(e.target.value)})});$a.displayName=$a.name,xa.displayName=xa.name;const ka=d.div`
17
+ `,fa=({isUpdate:t,action:i,formData:a,formErrors:n,handleFormChange:o})=>{const l=O.useTheme();return e.createElement(va,null,t&&e.createElement("div",null,e.createElement(ba,null,"Status"),e.createElement(F,{options:[{icon:xi,label:m.ENABLED,value:!1,selectedBgColor:l.text.success+O.opacity.hex["050"]},{icon:$i,label:m.DISABLED,value:!0,selectedBgColor:l.text.error+O.opacity.hex["050"]}],selected:a.disabled,setSelected:e=>o("disabled",e)})),!t&&e.createElement(I,{title:"",description:i.docsDescription,actionButton:e.createElement(A,{endpoint:i.docsEndpoint})}),e.createElement(M,{title:"Signals for Processing",required:!0,allowedSignals:i.allowedSignals,selectedSignals:a.signals||[],setSelectedSignals:e=>o("signals",e),errorMessage:n.signals}),!t&&e.createElement($,{title:"Action name",placeholder:"Use a name that describes the action",value:a.name||"",onChange:({target:{value:e}})=>o("name",e),errorMessage:n.name}),e.createElement(ya,{actionType:i.type,value:a.fields,setValue:(e,t)=>o(`fields.${e}`,t),formErrors:n}),e.createElement(R,{title:"Notes",value:a.notes||"",onChange:({target:{value:e}})=>o("notes",e),errorMessage:n.notes}))},xa=a(({children:i,width:a=640,title:r,titleTooltip:s,hideEditTitleFromEdit:c,icons:d,iconSrcs:u,isEdit:p=!1,isFormDirty:m=!1,isLastItem:h=!1,onClose:g,onEdit:y,onSave:v,onDelete:b,onCancel:f,tabs:x,headerActionButtons:$},k)=>{const C=O.useTheme(),{isThisPending:S}=L(),{addNotification:w}=P(),{drawerType:T,drawerEntityId:D,setDrawerType:N,setDrawerEntityId:F}=K();j({key:"Enter",active:p},()=>Q());const[I,A]=t(!1),[M,R]=t(!1),_=n(null),J=T===B.Source,U=()=>{A(!1),R(!1)},G=()=>{U(),y&&y(!1),N(null),F(null),g?.()};o(k,()=>({closeDrawer:G}));const Y=()=>{_.current?.clearTitle(),f&&f(),U()},X=()=>{const e=_.current?.isTitleDirty();m||e?R(!0):Y()},Z=()=>{A(!0)},Q=()=>{v&&v(_.current?.getTitle()||"")},ee=l(()=>!!T&&S({entityType:T,entityId:D}),[T,D]),te=e=>{w({type:W.Warning,title:"Pending",message:`Cannot click ${e}, ${T} is pending`,hideFromHistory:!0})},ie=$||[];return y&&!p&&ie.push({"data-id":"drawer-edit",variant:"tertiary",onClick:ee?()=>te("edit"):()=>y(!0),children:e.createElement(e.Fragment,null,e.createElement(ki,null),e.createElement(E,{size:14,family:"secondary",decoration:"underline"},"Edit"))}),b&&!p&&ie.push({"data-id":"drawer-delete",variant:"tertiary",onClick:ee?()=>te(J?"uninstrument":"delete"):Z,children:e.createElement(e.Fragment,null,e.createElement(Ci,null),e.createElement(E,{color:C.text.error,size:14,family:"secondary",decoration:"underline"},J?V.UNINSTRUMENT:V.DELETE))}),e.createElement(e.Fragment,null,e.createElement(q,{isOpen:!0,onClose:p?X:G,closeOnEscape:!I&&!M,width:`${a+64}px`,header:{icons:d,iconSrcs:u,title:r,titleTooltip:s,replaceTitleWith:!c&&p?e.createElement($a,{ref:_,title:r}):void 0,actionButtons:ie,tabs:x},footer:{isOpen:p,leftButtons:[{"data-id":"drawer-save",variant:"primary",onClick:Q,children:V.SAVE},{"data-id":"drawer-cancel",variant:"secondary",onClick:X,children:V.CANCEL}],rightButtons:b?[{"data-id":"drawer-delete",variant:"tertiary",onClick:Z,children:e.createElement(e.Fragment,null,e.createElement(Ci,null),e.createElement(E,{size:14,color:C.text.error,family:"secondary",decoration:"underline"},V.DELETE))}]:[]}},i),e.createElement(z,{isOpen:I,noOverlay:!0,name:`${T}${r?` (${r})`:""}`,type:T,isLastItem:h,onApprove:()=>{b&&b(),U()},onDeny:U}),e.createElement(H,{isOpen:M,noOverlay:!0,name:"edit mode",onApprove:Y,onDeny:U}))}),$a=a(({title:a},n)=>{const[l,r]=t(a);return i(()=>{r(a)},[a]),o(n,()=>({getTitle:()=>l||a,isTitleDirty:()=>l!==a,clearTitle:()=>r(a)})),e.createElement($,{"data-id":"title",value:l,onChange:e=>r(e.target.value)})});$a.displayName=$a.name,xa.displayName=xa.name;const ka=d.div`
18
18
  width: 100%;
19
19
  height: 100%;
20
20
  max-height: calc(100vh - 220px);
@@ -24,10 +24,10 @@ import e,{useState as t,useEffect as i,forwardRef as a,useRef as n,useImperative
24
24
  display: flex;
25
25
  flex-direction: column;
26
26
  gap: 12px;
27
- `,Sa=({updateAction:a,deleteAction:o})=>{const{actions:r}=_(),{drawerType:s,drawerEntityId:c}=K(),d=n(null),u=s===B.Action,[p,h]=t(!1),[g,y]=t(!1),{formData:v,formErrors:b,handleFormChange:f,resetFormData:x,validateForm:$,loadFormWithDrawerItem:k}=J(),C=l(()=>{if(c)return r?.find(e=>U(e)===c)},[c,r]);if(i(()=>{u&&C?k(C):x()},[u,C]),!C)return null;const S=Y.find(({type:e})=>e===C.type)||Y.find(({label:e})=>"Attributes"===e)?.items?.find(({type:e})=>e===C.type)||Y.find(({label:e})=>"Samplers"===e)?.items?.find(({type:e})=>e===C.type);return e.createElement(xa,{ref:d,title:C.name||C.type,icons:[G(C.type)],isEdit:p,isFormDirty:g,onEdit:e=>{h("boolean"!=typeof e||e)},onSave:e=>{if($({withAlert:!0,alertTitle:Q.Update})){const t=e!==C.type?e:"";f("name",t),a(c,{...v,name:t}),h(!1),y(!1)}},onDelete:()=>{o(c,C.type),h(!1),y(!1),d.current?.closeDrawer()},onCancel:()=>{h(!1),y(!1),k(C)}},p&&S?e.createElement(ka,null,e.createElement(fa,{isUpdate:!0,action:S,formData:v,formErrors:b,handleFormChange:(...e)=>{y(!0),f(...e)}})):e.createElement(Ca,null,e.createElement(X,{conditions:C.conditions||[]}),e.createElement(Z,{title:m.ACTION_DETAILS,data:C?Zi(C):[]})))},wa=d(ee)`
27
+ `,Sa=({updateAction:a,deleteAction:o})=>{const{actions:r}=_(),{drawerType:s,drawerEntityId:c}=K(),d=n(null),u=s===B.Action,[p,h]=t(!1),[g,y]=t(!1),{formData:v,formErrors:b,handleFormChange:f,resetFormData:x,validateForm:$,loadFormWithDrawerItem:k}=J(),C=l(()=>{if(c)return r?.find(e=>U(e)===c)},[c,r]);if(i(()=>{u&&C?k(C):x()},[u,C]),!C)return null;const S=G.find(({type:e})=>e===C.type)||G.find(({label:e})=>"Attributes"===e)?.items?.find(({type:e})=>e===C.type)||G.find(({label:e})=>"Samplers"===e)?.items?.find(({type:e})=>e===C.type);return e.createElement(xa,{ref:d,title:C.name||C.type,icons:[Y(C.type)],isEdit:p,isFormDirty:g,onEdit:e=>{h("boolean"!=typeof e||e)},onSave:e=>{if($({withAlert:!0,alertTitle:Q.Update})){const t=e!==C.type?e:"";f("name",t),a(c,{...v,name:t}),h(!1),y(!1)}},onDelete:()=>{o(c,C.type),h(!1),y(!1),d.current?.closeDrawer()},onCancel:()=>{h(!1),y(!1),k(C)}},p&&S?e.createElement(ka,null,e.createElement(fa,{isUpdate:!0,action:S,formData:v,formErrors:b,handleFormChange:(...e)=>{y(!0),f(...e)}})):e.createElement(Ca,null,e.createElement(X,{conditions:C.conditions||[]}),e.createElement(Z,{title:m.ACTION_DETAILS,data:C?Zi(C):[]})))},wa=d(ee)`
28
28
  margin-top: 24px;
29
29
  gap: 12px;
30
- `,Ta=({createAction:i})=>{const{currentModal:a,setCurrentModal:n}=te(),o=a===B.Action,{formData:l,formErrors:r,handleFormChange:s,resetFormData:c,validateForm:d}=J(),[u,p]=t(void 0),h=()=>{c(),p(void 0),n("")},g=()=>{if(!d({withAlert:!0,alertTitle:Q.Create}))return null;i(l),h()};return j({key:"Enter",active:o},()=>g()),e.createElement(ie,{isOpen:o,onClose:h,header:{title:"Add Action"},actionComponent:e.createElement(ae,{buttons:[{variant:"primary",label:"DONE",onClick:g,disabled:!u}]})},e.createElement(ne,null,e.createElement(I,{title:"Select Action",description:"Select an action to modify telemetry data before it`s sent to destinations. Choose an action type and configure its details."}),e.createElement(wa,null,e.createElement(oe,{type:W.Warning,message:le.DEFINED_FOR_ALL_STREAMS(m.ACTIONS)}),e.createElement(re,{options:Y,selectedOption:u,onOptionSelect:e=>{return t=e,c(),s("type",t?.type||""),void p(t);var t},autoFocus:!u?.type})),u?.type?e.createElement("div",null,e.createElement(se,{margin:"16px 0"}),e.createElement(fa,{action:u,formData:l,formErrors:r,handleFormChange:s})):null))},Da=e=>{const{type:t,fields:{collectContainerAttributes:i,collectReplicaSetAttributes:a,collectWorkloadId:n,collectClusterId:o,labelsAttributes:l,annotationsAttributes:r,clusterAttributes:s,overwriteExistingValues:c,attributeNamesToDelete:d,renames:u,piiCategories:p,fallbackSamplingRatio:m,samplingPercentage:h,endpointsFilters:v,attributeFilters:b,servicesNameFilters:f}}=e;let x="";if(t===g.K8sAttributes&&(i&&(x+="Container Attributes, "),a&&(x+="ReplicaSet Attributes, "),n&&(x+="Workload ID, "),o&&(x+="Cluster ID, "),l?.forEach(({labelKey:e,attributeKey:t,from:i},a)=>{x+=`Label: ${e} ${t} ${i||y.Pod} `,a===l.length-1&&(x+=", ")}),r?.forEach(({annotationKey:e,attributeKey:t,from:i},a)=>{x+=`Annotation: ${e} ${t} ${i||y.Pod} `,a===r.length-1&&(x+=", ")})),t===g.AddClusterInfo&&(x+=`Overwrite Existing: ${c}\n`,s?.forEach(({attributeName:e,attributeStringValue:t},i)=>{x+=`${e}: ${t}`,i<s.length-1&&(x+=", ")})),t===g.DeleteAttributes&&d?.forEach((e,t)=>{x+=e,t<d.length-1&&(x+=", ")}),t===g.RenameAttributes){const e=Object.entries(u||{});e.forEach(([t,i],a)=>{x+=`${t}: ${i}`,a<e.length-1&&(x+=", ")})}return t===g.PiiMasking&&p?.forEach((e,t)=>{x+=e,t<p.length-1&&(x+=", ")}),t===g.ErrorSampler&&(x+=String(m)),t===g.ProbabilisticSampler&&(x+=String(h),x+="%"),t===g.LatencySampler&&v?.forEach(({serviceName:e,httpRoute:t,minimumLatencyThreshold:i,fallbackSamplingRatio:a},n)=>{x+=`Endpoint${v.length>1?` #${n+1}`:""}=${e}${t}\n`,x+=` Latency=${i}`,x+=` Sampling=${a}`,n<v.length-1&&(x+=", ")}),t===g.ServiceNameSampler&&f?.forEach(({serviceName:e,samplingRatio:t,fallbackSamplingRatio:i})=>{x+=`Service Name: ${e}, `,x+=`Sampling Ratio: ${t}, `,x+=`Fallback Sampling Ratio: ${i}\n`}),t===g.SpanAttributeSampler&&b?.forEach(({serviceName:e,attributeKey:t,fallbackSamplingRatio:i})=>{x+=`Service Name: ${e}, `,x+=`Attribute Key: ${t}, `,x+=`Fallback Sampling Ratio: ${i}\n`}),x},Na=({conditions:t,id:i})=>{const{errors:a,warnings:n,disableds:o,hasLoadings:r}=l(()=>ce(t),[t]),s=a.length>0?a:n.length>0?n:o.length>0?o:[];if(s.length>0)return e.createElement("div",{style:{lineHeight:1}},e.createElement(Ea,{conditions:s,id:i}));const c=r?he.Loading:W.Success;return e.createElement("div",{style:{lineHeight:1}},e.createElement(de,{status:c,title:c,withBorder:!0,withIcon:!0}))},Ea=({conditions:t,id:i})=>{const a=O.useTheme();return e.createElement(ue,null,pe(t).map(({status:t,type:n,reason:o,message:l,lastTransitionTime:r},s)=>{"loading"!==t&&"disabled"!==t||(t=W.Info);const c=ge(t,a);return e.createElement(me,{key:`condition-${i}-${t}-${n}-${s}`,titleIcon:c,title:n,text:l||o||"",timestamp:r},e.createElement(de,{status:t,title:o||n,withBorder:!0,withIcon:!0}))}))},Oa=({instrumentationRules:e,sources:t,actions:i,destinations:a,searchText:n,selectedCategory:o})=>{const l=n?e.filter(e=>e.type?.toLowerCase().includes(n)||e.ruleName?.toLowerCase().includes(n)):e,r=n?t.filter(e=>e.name?.toLowerCase().includes(n)||e.otelServiceName?.toLowerCase().includes(n)||e.namespace?.toLowerCase().includes(n)):t,s=n?i.filter(e=>e.type?.toLowerCase().includes(n)||e.name?.toLowerCase().includes(n)):i,c=n?a.filter(e=>e.destinationType.displayName?.toLowerCase().includes(n)||e.name?.toLowerCase().includes(n)):a,d=[{category:B.Source,label:"Sources",count:r.length,entities:[]},{category:B.Action,label:"Actions",count:s.length,entities:[]},{category:B.Destination,label:"Destinations",count:c.length,entities:[]},{category:B.InstrumentationRule,label:"Instrumentation Rules",count:l.length,entities:[]}];d.unshift({category:"all",label:"All",count:l.length+r.length+s.length+c.length,entities:[]});const u=d.filter(({count:e,category:t})=>!!e&&"all"!==t&&["all",t].includes(o)).map(e=>({...e,entities:e.category===B.InstrumentationRule?l:e.category===B.Source?r:e.category===B.Action?s:e.category===B.Destination?c:[]}));return{categories:d,searchResults:u}},Fa=[{key:"icon",title:""},{key:"name",title:m.NAME,sortable:!0},{key:"signals",title:m.MONITORS},{key:"active-status",title:m.STATUS},{key:"conditions",title:"Conditions"},{key:"type",title:m.TYPE,sortable:!0},{key:"spec",title:"Spec",sortable:!0},{key:"notes",title:m.NOTES,sortable:!0}],Ia=({maxHeight:t,maxWidth:i})=>{const a=O.useTheme(),n=ye(),{actions:o,actionsLoading:r}=_(),{setDrawerType:s,setDrawerEntityId:c}=K(),d=l(()=>Oa({instrumentationRules:[],sources:[],actions:ve(o,n),destinations:[],searchText:n.searchText,selectedCategory:B.Action}).searchResults.find(({category:e})=>e===B.Action)?.entities||[],[o,n]),u=l(()=>d.map(t=>{const{hasErrors:i,hasWarnings:n,hasDisableds:o}=ce(t.conditions||[]);return{status:i?W.Error:n?W.Warning:void 0,faded:o,onClick:()=>{s(B.Action),c(t.id)},cells:[{columnKey:"icon",component:()=>e.createElement(be,{icon:G(t.type)})},{columnKey:"name",value:fe(t,B.Action,{prioritizeDisplayName:!0})},{columnKey:"type",value:t.type,textColor:a.text.info},{columnKey:"notes",value:t.notes,textColor:a.text.info,withTooltip:!0},{columnKey:"spec",value:Da(t),textColor:a.text.info,withTooltip:!0},{columnKey:"signals",component:()=>e.createElement(xe,{withLabels:!0,monitors:t.signals||[]})},{columnKey:"conditions",component:()=>e.createElement(Na,{conditions:t.conditions||[],id:t.id})},{columnKey:"active-status",component:()=>e.createElement("div",{style:{lineHeight:1}},e.createElement(de,{status:t.disabled?W.Error:W.Success,title:t.disabled?m.DISABLED:m.ENABLED,withIcon:!0,withBorder:!0}))}]}}),[d]),{badge:p,badgeTooltip:h}=l(()=>d.length!==o.length?{badge:`${d.length}/${o.length}`,badgeTooltip:m.FILTERED_COUNT_TOOLTIP}:{badge:o.length,badgeTooltip:void 0},[d,o]);return e.createElement($e,{$maxWidth:i},e.createElement(ke,null,e.createElement(Ce,{icon:Se(B.Action),title:m.ACTIONS,badge:p,badgeTooltip:h,loading:r})),e.createElement(we,{$maxHeight:t},e.createElement(Te,{columns:Fa,rows:u})),!d.length&&e.createElement(De,{style:{marginTop:"2rem"}},e.createElement(Ne,null)))},Aa=d(ee)`
30
+ `,Ta=({createAction:i})=>{const{currentModal:a,setCurrentModal:n}=te(),o=a===B.Action,{formData:l,formErrors:r,handleFormChange:s,resetFormData:c,validateForm:d}=J(),[u,p]=t(void 0),h=()=>{c(),p(void 0),n("")},g=()=>{if(!d({withAlert:!0,alertTitle:Q.Create}))return null;i(l),h()};return j({key:"Enter",active:o},()=>g()),e.createElement(ie,{isOpen:o,onClose:h,header:{title:"Add Action"},actionComponent:e.createElement(ae,{buttons:[{variant:"primary",label:"DONE",onClick:g,disabled:!u}]})},e.createElement(ne,null,e.createElement(I,{title:"Select Action",description:"Select an action to modify telemetry data before it`s sent to destinations. Choose an action type and configure its details."}),e.createElement(wa,null,e.createElement(oe,{type:W.Warning,message:le.DEFINED_FOR_ALL_STREAMS(m.ACTIONS)}),e.createElement(re,{options:G,selectedOption:u,onOptionSelect:e=>{return t=e,c(),s("type",t?.type||""),void p(t);var t},autoFocus:!u?.type})),u?.type?e.createElement("div",null,e.createElement(se,{margin:"16px 0"}),e.createElement(fa,{action:u,formData:l,formErrors:r,handleFormChange:s})):null))},Da=e=>{const{type:t,fields:{collectContainerAttributes:i,collectReplicaSetAttributes:a,collectWorkloadId:n,collectClusterId:o,labelsAttributes:l,annotationsAttributes:r,clusterAttributes:s,overwriteExistingValues:c,attributeNamesToDelete:d,renames:u,piiCategories:p,fallbackSamplingRatio:m,samplingPercentage:h,endpointsFilters:v,attributeFilters:b,servicesNameFilters:f}}=e;let x="";if(t===g.K8sAttributes&&(i&&(x+="Container Attributes, "),a&&(x+="ReplicaSet Attributes, "),n&&(x+="Workload ID, "),o&&(x+="Cluster ID, "),l?.forEach(({labelKey:e,attributeKey:t,from:i},a)=>{x+=`Label: ${e} ${t} ${i||y.Pod} `,a===l.length-1&&(x+=", ")}),r?.forEach(({annotationKey:e,attributeKey:t,from:i},a)=>{x+=`Annotation: ${e} ${t} ${i||y.Pod} `,a===r.length-1&&(x+=", ")})),t===g.AddClusterInfo&&(x+=`Overwrite Existing: ${c}\n`,s?.forEach(({attributeName:e,attributeStringValue:t},i)=>{x+=`${e}: ${t}`,i<s.length-1&&(x+=", ")})),t===g.DeleteAttributes&&d?.forEach((e,t)=>{x+=e,t<d.length-1&&(x+=", ")}),t===g.RenameAttributes){const e=Object.entries(u||{});e.forEach(([t,i],a)=>{x+=`${t}: ${i}`,a<e.length-1&&(x+=", ")})}return t===g.PiiMasking&&p?.forEach((e,t)=>{x+=e,t<p.length-1&&(x+=", ")}),t===g.ErrorSampler&&(x+=String(m)),t===g.ProbabilisticSampler&&(x+=String(h),x+="%"),t===g.LatencySampler&&v?.forEach(({serviceName:e,httpRoute:t,minimumLatencyThreshold:i,fallbackSamplingRatio:a},n)=>{x+=`Endpoint${v.length>1?` #${n+1}`:""}=${e}${t}\n`,x+=` Latency=${i}`,x+=` Sampling=${a}`,n<v.length-1&&(x+=", ")}),t===g.ServiceNameSampler&&f?.forEach(({serviceName:e,samplingRatio:t,fallbackSamplingRatio:i})=>{x+=`Service Name: ${e}, `,x+=`Sampling Ratio: ${t}, `,x+=`Fallback Sampling Ratio: ${i}\n`}),t===g.SpanAttributeSampler&&b?.forEach(({serviceName:e,attributeKey:t,fallbackSamplingRatio:i})=>{x+=`Service Name: ${e}, `,x+=`Attribute Key: ${t}, `,x+=`Fallback Sampling Ratio: ${i}\n`}),x},Na=({conditions:t,id:i})=>{const{errors:a,warnings:n,disableds:o,hasLoadings:r}=l(()=>ce(t),[t]),s=a.length>0?a:n.length>0?n:o.length>0?o:[];if(s.length>0)return e.createElement("div",{style:{lineHeight:1}},e.createElement(Ea,{conditions:s,id:i}));const c=r?he.Loading:W.Success;return e.createElement("div",{style:{lineHeight:1}},e.createElement(de,{status:c,title:c,withBorder:!0,withIcon:!0}))},Ea=({conditions:t,id:i})=>{const a=O.useTheme();return e.createElement(ue,null,pe(t).map(({status:t,type:n,reason:o,message:l,lastTransitionTime:r},s)=>{"loading"!==t&&"disabled"!==t||(t=W.Info);const c=ge(t,a);return e.createElement(me,{key:`condition-${i}-${t}-${n}-${s}`,titleIcon:c,title:n,text:l||o||"",timestamp:r},e.createElement(de,{status:t,title:o||n,withBorder:!0,withIcon:!0}))}))},Oa=({instrumentationRules:e,sources:t,actions:i,destinations:a,searchText:n,selectedCategory:o})=>{const l=n?e.filter(e=>e.type?.toLowerCase().includes(n)||e.ruleName?.toLowerCase().includes(n)):e,r=n?t.filter(e=>e.name?.toLowerCase().includes(n)||e.otelServiceName?.toLowerCase().includes(n)||e.namespace?.toLowerCase().includes(n)):t,s=n?i.filter(e=>e.type?.toLowerCase().includes(n)||e.name?.toLowerCase().includes(n)):i,c=n?a.filter(e=>e.destinationType.displayName?.toLowerCase().includes(n)||e.name?.toLowerCase().includes(n)):a,d=[{category:B.Source,label:"Sources",count:r.length,entities:[]},{category:B.Action,label:"Actions",count:s.length,entities:[]},{category:B.Destination,label:"Destinations",count:c.length,entities:[]},{category:B.InstrumentationRule,label:"Instrumentation Rules",count:l.length,entities:[]}];d.unshift({category:"all",label:"All",count:l.length+r.length+s.length+c.length,entities:[]});const u=d.filter(({count:e,category:t})=>!!e&&"all"!==t&&["all",t].includes(o)).map(e=>({...e,entities:e.category===B.InstrumentationRule?l:e.category===B.Source?r:e.category===B.Action?s:e.category===B.Destination?c:[]}));return{categories:d,searchResults:u}},Fa=[{key:"icon",title:""},{key:"name",title:m.NAME,sortable:!0},{key:"signals",title:m.MONITORS},{key:"active-status",title:m.STATUS},{key:"conditions",title:"Conditions"},{key:"type",title:m.TYPE,sortable:!0},{key:"spec",title:"Spec",sortable:!0},{key:"notes",title:m.NOTES,sortable:!0}],Ia=({maxHeight:t,maxWidth:i})=>{const a=O.useTheme(),n=ye(),{actions:o,actionsLoading:r}=_(),{setDrawerType:s,setDrawerEntityId:c}=K(),d=l(()=>Oa({instrumentationRules:[],sources:[],actions:ve(o,n),destinations:[],searchText:n.searchText,selectedCategory:B.Action}).searchResults.find(({category:e})=>e===B.Action)?.entities||[],[o,n]),u=l(()=>d.map(t=>{const{hasErrors:i,hasWarnings:n,hasDisableds:o}=ce(t.conditions||[]);return{status:i?W.Error:n?W.Warning:void 0,faded:o,onClick:()=>{s(B.Action),c(t.id)},cells:[{columnKey:"icon",component:()=>e.createElement(be,{icon:Y(t.type)})},{columnKey:"name",value:fe(t,B.Action,{prioritizeDisplayName:!0})},{columnKey:"type",value:t.type,textColor:a.text.info},{columnKey:"notes",value:t.notes,textColor:a.text.info,withTooltip:!0},{columnKey:"spec",value:Da(t),textColor:a.text.info,withTooltip:!0},{columnKey:"signals",component:()=>e.createElement(xe,{withLabels:!0,monitors:t.signals||[]})},{columnKey:"conditions",component:()=>e.createElement(Na,{conditions:t.conditions||[],id:t.id})},{columnKey:"active-status",component:()=>e.createElement("div",{style:{lineHeight:1}},e.createElement(de,{status:t.disabled?W.Error:W.Success,title:t.disabled?m.DISABLED:m.ENABLED,withIcon:!0,withBorder:!0}))}]}}),[d]),{badge:p,badgeTooltip:h}=l(()=>d.length!==o.length?{badge:`${d.length}/${o.length}`,badgeTooltip:m.FILTERED_COUNT_TOOLTIP}:{badge:o.length,badgeTooltip:void 0},[d,o]);return e.createElement($e,{$maxWidth:i},e.createElement(ke,null,e.createElement(Ce,{icon:Se(B.Action),title:m.ACTIONS,badge:p,badgeTooltip:h,loading:r})),e.createElement(we,{$maxHeight:t},e.createElement(Te,{columns:Fa,rows:u})),!d.length&&e.createElement(De,{style:{marginTop:"2rem"}},e.createElement(Ne,null)))},Aa=d(ee)`
31
31
  // width: 100vw;
32
32
  // height: 100vh;
33
33
  gap: 64px;
@@ -124,20 +124,20 @@ import e,{useState as t,useEffect as i,forwardRef as a,useRef as n,useImperative
124
124
  justify-content: center;
125
125
 
126
126
  pointer-events: none;
127
- `,Ya=({height:t,entityType:i,entities:a,metrics:n,isVm:o})=>{const r=l(()=>a.map(t=>{const a=U(t);if(!a)return null;const l=[B.Source,B.Destination].includes(i),r=[B.Destination,B.Action].includes(i),s=[B.Destination,B.Action,B.InstrumentationRule].includes(i),c=r?i==B.Destination?Ke(t.exportedSignals):t.signals:void 0,d=l?n?.[`${i.toLowerCase()}s`]?.find(e=>JSON.stringify(U(e))===JSON.stringify(a)):void 0,u=s?!t.disabled:void 0,p=fe(t,i,{extended:i===B.Source,prioritizeDisplayName:i!==B.Source}),m=((e,t,i)=>{switch(e){case B.Source:return i?`${t.kind}`:`${t.namespace} • ${t.kind}`;case B.Destination:return t.destinationType.displayName;case B.Action:case B.InstrumentationRule:return t.type;default:return""}})(i,t,o),h=l?je(d?.throughput):void 0,{priorotizedStatus:g,hasDisableds:y}=ce(t.conditions||[]),{icons:v,icon:b,iconSrc:f}=((e,t)=>{switch(e){case B.Source:return{icons:He(t.containers),icon:Se(e)};case B.Destination:return ze(t.destinationType.type);case B.Action:return{icon:G(t.type)};case B.InstrumentationRule:return{icon:qe(t.type)};default:return{icon:Se(e)}}})(i,t);return e.createElement(_a,{key:JSON.stringify(a),entityType:i,entityId:a,raw:t,title:p,subTitle:m,faded:y,status:g,label:h,icons:v,icon:b,iconSrc:f,monitors:c,isActive:u})}),[a,i,n,o]);return e.createElement(Ja,{$height:t},e.createElement(Ve,{containerHeight:t-24,elementHeight:80,elements:r}),e.createElement(Ua,{$hide:!0}))},Ga=d.div`
127
+ `,Ga=({height:t,entityType:i,entities:a,metrics:n,isVm:o})=>{const r=l(()=>a.map(t=>{const a=U(t);if(!a)return null;const l=[B.Source,B.Destination].includes(i),r=[B.Destination,B.Action].includes(i),s=[B.Destination,B.Action,B.InstrumentationRule].includes(i),c=r?i==B.Destination?Ke(t.exportedSignals):t.signals:void 0,d=l?n?.[`${i.toLowerCase()}s`]?.find(e=>JSON.stringify(U(e))===JSON.stringify(a)):void 0,u=s?!t.disabled:void 0,p=fe(t,i,{extended:i===B.Source,prioritizeDisplayName:i!==B.Source}),m=((e,t,i)=>{switch(e){case B.Source:return i?`${t.kind}`:`${t.namespace} • ${t.kind}`;case B.Destination:return t.destinationType.displayName;case B.Action:case B.InstrumentationRule:return t.type;default:return""}})(i,t,o),h=l?je(d?.throughput):void 0,{priorotizedStatus:g,hasDisableds:y}=ce(t.conditions||[]),{icons:v,icon:b,iconSrc:f}=((e,t)=>{switch(e){case B.Source:return{icons:He(t.containers),icon:Se(e)};case B.Destination:return ze(t.destinationType.type);case B.Action:return{icon:Y(t.type)};case B.InstrumentationRule:return{icon:qe(t.type)};default:return{icon:Se(e)}}})(i,t);return e.createElement(_a,{key:JSON.stringify(a),entityType:i,entityId:a,raw:t,title:p,subTitle:m,faded:y,status:g,label:h,icons:v,icon:b,iconSrc:f,monitors:c,isActive:u})}),[a,i,n,o]);return e.createElement(Ja,{$height:t},e.createElement(Ve,{containerHeight:t-24,elementHeight:80,elements:r}),e.createElement(Ua,{$hide:!0}))},Ya=d.div`
128
128
  width: ${({$isVm:e})=>e?"45vw":"22vw"};
129
129
 
130
130
  display: flex;
131
131
  flex-direction: column;
132
132
  gap: 12px;
133
- `,Xa=({entityType:t,entities:i,unfilteredCount:a,metrics:n,loading:o,maxHeight:l,isVm:r})=>{const s=i.length!==a,c=Math.min(l,80*i.length+12);return r&&[B.InstrumentationRule,B.Action].includes(t)?null:e.createElement(Ga,{$isVm:r},e.createElement(Ba,{entityType:t,badge:s?`${i.length}/${a}`:a,badgeTooltip:s?m.FILTERED_COUNT_TOOLTIP:void 0,isLoading:o}),i.length?e.createElement(Ya,{height:c,entityType:t,entities:i,metrics:n,isVm:r}):o?e.createElement(Be,{size:3}):e.createElement(ja,{entityType:t,description:m.TO_COLLECT_OTEL_DATA}))},Za=d.div`
133
+ `,Xa=({entityType:t,entities:i,unfilteredCount:a,metrics:n,loading:o,maxHeight:l,isVm:r})=>{const s=i.length!==a,c=Math.min(l,80*i.length+12);return r&&[B.InstrumentationRule,B.Action].includes(t)?null:e.createElement(Ya,{$isVm:r},e.createElement(Ba,{entityType:t,badge:s?`${i.length}/${a}`:a,badgeTooltip:s?m.FILTERED_COUNT_TOOLTIP:void 0,isLoading:o}),i.length?e.createElement(Ga,{height:c,entityType:t,entities:i,metrics:n,isVm:r}):o?e.createElement(Be,{size:3}):e.createElement(ja,{entityType:t,description:m.TO_COLLECT_OTEL_DATA}))},Za=d.div`
134
134
  width: 100%;
135
135
  height: ${({$height:e})=>e};
136
136
 
137
137
  display: flex;
138
138
  justify-content: space-evenly;
139
139
  gap: 24px;
140
- `,Qa=({height:a,metrics:n})=>{const{isVm:o}=We(),l=ye(),{selectedStreamName:r}=_e(),{containerRef:s,containerHeight:c}=Je(),{sources:d,sourcesLoading:u,destinations:p,destinationsLoading:m,actions:h,actionsLoading:g,instrumentationRules:y,instrumentationRulesLoading:v}=_(),[b,f]=t([]),[x,$]=t([]),[k,C]=t([]),[S,w]=t([]);return i(()=>{f(Ue(Ye(d,r),l))},[d,r,l]),i(()=>{$(Ge(Xe(p,r),l))},[p,r,l]),i(()=>{C(ve(h,l))},[h,l]),i(()=>{w(y)},[y]),e.createElement(Za,{ref:s,$height:a},e.createElement(Xa,{entityType:B.InstrumentationRule,entities:S,unfilteredCount:y.length,loading:v,maxHeight:c,isVm:o}),e.createElement(Xa,{entityType:B.Source,entities:b,unfilteredCount:d.length,metrics:n,loading:u,maxHeight:c,isVm:o}),e.createElement(Xa,{entityType:B.Action,entities:k,unfilteredCount:h.length,loading:g,maxHeight:c,isVm:o}),e.createElement(Xa,{entityType:B.Destination,entities:x,unfilteredCount:p.length,metrics:n,loading:m,maxHeight:c,isVm:o}))},en=d.div`
140
+ `,Qa=({height:a,metrics:n})=>{const{isVm:o}=We(),l=ye(),{selectedStreamName:r}=_e(),{containerRef:s,containerHeight:c}=Je(),{sources:d,sourcesLoading:u,destinations:p,destinationsLoading:m,actions:h,actionsLoading:g,instrumentationRules:y,instrumentationRulesLoading:v}=_(),[b,f]=t([]),[x,$]=t([]),[k,C]=t([]),[S,w]=t([]);return i(()=>{f(Ue(Ge(d,r),l))},[d,r,l]),i(()=>{$(Ye(Xe(p,r),l))},[p,r,l]),i(()=>{C(ve(h,l))},[h,l]),i(()=>{w(y)},[y]),e.createElement(Za,{ref:s,$height:a},e.createElement(Xa,{entityType:B.InstrumentationRule,entities:S,unfilteredCount:y.length,loading:v,maxHeight:c,isVm:o}),e.createElement(Xa,{entityType:B.Source,entities:b,unfilteredCount:d.length,metrics:n,loading:u,maxHeight:c,isVm:o}),e.createElement(Xa,{entityType:B.Action,entities:k,unfilteredCount:h.length,loading:g,maxHeight:c,isVm:o}),e.createElement(Xa,{entityType:B.Destination,entities:x,unfilteredCount:p.length,metrics:n,loading:m,maxHeight:c,isVm:o}))},en=d.div`
141
141
  position: relative;
142
142
  max-width: 200px;
143
143
  `;d.div`
@@ -155,7 +155,7 @@ import e,{useState as t,useEffect as i,forwardRef as a,useRef as n,useImperative
155
155
  display: flex;
156
156
  align-items: center;
157
157
  overflow-x: scroll;
158
- `,an=({onClose:a})=>{const n=O.useTheme(),{onClickNode:o}=Ze(),{searchText:s}=ye(),{selectedStreamName:c}=_e(),{sources:d,destinations:u,actions:p,instrumentationRules:m}=_(),{popupRef:h,popupOpen:g,setPopupOpen:y,popupPosition:v,handlePosition:b}=Qe();i(()=>{g||(b(0,50),y(!0))},[g]);const[f,x]=t("all"),{categories:$,searchResults:k}=l(()=>Oa({instrumentationRules:m,sources:Ye(d,c),actions:p,destinations:Xe(u,c),searchText:s,selectedCategory:f}),[m,d,p,u,c,s,f]);return k.length?e.createElement(et,{ref:h,isOpen:g,top:v.top,left:v.left,maxWidth:"420px",header:e.createElement(tn,null,$.map(({category:t,label:i,count:a})=>!!a&&e.createElement(tt,{key:`category-select-${t}`,label:i,badgeLabel:a,isSelected:f===t,onClick:()=>x(t)})))},k.map(({category:t,label:i,entities:l},s)=>!!l.length&&e.createElement(r,{key:`category-list-${t}`},e.createElement(it,{style:{maxHeight:"all"!==f?"240px":"140px",padding:"12px 0"}},e.createElement(E,{size:12,family:"secondary",color:n.text.darker_grey,style:{marginLeft:"16px"}},i),l.map((i,n)=>e.createElement(tt,{key:`entity-${s}-${n}`,icon:Se(t),label:fe(i,t,{extended:!0}),onClick:()=>{const e=U(i);o(null,{data:{type:t,id:e}}),a()},style:{width:"100%",justifyContent:"flex-start"},color:"transparent"}))),e.createElement(se,{thickness:s===k.length-1?0:1,length:"90%",margin:"8px auto"})))):e.createElement(et,{ref:h,isOpen:g,top:v.top,left:v.left},e.createElement(Ne,null))},nn=({preventPopup:i=!1})=>{const{searchText:a,setSearchText:o}=ye(),[l,r]=t(!1),s=!!a||l,c=()=>{o(""),r(!1)},d=n(null);return at(d,c),j({key:"Escape",active:s},c),e.createElement(en,{ref:d},e.createElement($,{placeholder:"Search",icon:Ti,value:a,onChange:e=>o(e.target.value.toLowerCase()),onFocus:()=>r(!0)}),s&&!i?e.createElement(an,{onClose:c}):null)},on=({sources:t,title:i="Condition",value:a,onSelect:n,onDeselect:o,...r})=>{const s=l(()=>{const e=[];return t.forEach(({conditions:t})=>{t?.forEach(({type:t,reason:i})=>{e.find(e=>e.id===`${t}#${i}`)||e.push({id:`${t}#${i}`,value:`${nt(t)} - ${nt(i)}`})})}),e.sort((e,t)=>e.id?.localeCompare(t.id||"")||0)},[t]);return e.createElement(ot,{disabled:!s?.length,title:i,placeholder:"All",options:s,value:a,onSelect:n,onDeselect:o,...r})},ln=({sources:t,title:i="Error Message",value:a,onSelect:n,onDeselect:o,disabled:r,...s})=>{const c=l(()=>{const e=[];return t.forEach(({conditions:t})=>{pe(t||[]).forEach(({status:t,message:i,reason:a})=>{t!==W.Error||e.find(e=>e.id===i)||(i?e.find(e=>e.id===i)||e.push({id:i,value:i}):a&&(e.find(e=>e.id===a)||e.push({id:a,value:a})))})}),e},[t]);return e.createElement(ot,{disabled:r||!c?.length,title:i,placeholder:"All",options:c,value:a,onSelect:n,onDeselect:o,...s})},rn=({sources:t,title:i="Programming Language",value:a,onSelect:n,onDeselect:o,...r})=>{const s=l(()=>{const e=[];return t.forEach(({containers:t})=>{t?.forEach(({language:t})=>{e.find(e=>e.id===t)||e.push({id:t,value:lt[t]||t})})}),e.sort((e,t)=>e.id?.localeCompare(t.id||"")||0)},[t]);return e.createElement(ot,{disabled:!s?.length,title:i,placeholder:"All",options:s,value:a,onSelect:n,onDeselect:o,...r})},sn=({title:t="Monitors",value:i,onSelect:a,onDeselect:n,...o})=>{const r=l(()=>{const e=[];return rt.forEach(({id:t,value:i})=>{e.find(e=>e.id===t)||e.push({id:t,value:i})}),e},[]);return e.createElement(ot,{disabled:!r?.length,title:t,placeholder:"All",options:r,value:i,onSelect:a,onDeselect:n,...o})},cn=({namespaces:t,title:i="Namespace",value:a,onSelect:n,onDeselect:o,...r})=>{const s=l(()=>{const e=[];return t?.forEach(({name:t})=>{e.find(e=>e.id===t)||e.push({id:t,value:t})}),e},[t]);return e.createElement(ot,{disabled:!s?.length,title:i,placeholder:"Select namespace",options:s,value:a,onSelect:n,onDeselect:o,...r})},dn=({sources:t,title:i="Kind",value:a,onSelect:n,onDeselect:o,...r})=>{const s=l(()=>{const e=[];return t.forEach(({kind:t})=>{e.find(e=>e.id===t)||e.push({id:t,value:t})}),e},[t]);return e.createElement(ot,{disabled:!s?.length,title:i,placeholder:"All",options:s,value:a,onSelect:n,onDeselect:o,...r})},un=d.div`
158
+ `,an=({onClose:a})=>{const n=O.useTheme(),{onClickNode:o}=Ze(),{searchText:s}=ye(),{selectedStreamName:c}=_e(),{sources:d,destinations:u,actions:p,instrumentationRules:m}=_(),{popupRef:h,popupOpen:g,setPopupOpen:y,popupPosition:v,handlePosition:b}=Qe();i(()=>{g||(b(0,50),y(!0))},[g]);const[f,x]=t("all"),{categories:$,searchResults:k}=l(()=>Oa({instrumentationRules:m,sources:Ge(d,c),actions:p,destinations:Xe(u,c),searchText:s,selectedCategory:f}),[m,d,p,u,c,s,f]);return k.length?e.createElement(et,{ref:h,isOpen:g,top:v.top,left:v.left,maxWidth:"420px",header:e.createElement(tn,null,$.map(({category:t,label:i,count:a})=>!!a&&e.createElement(tt,{key:`category-select-${t}`,label:i,badgeLabel:a,isSelected:f===t,onClick:()=>x(t)})))},k.map(({category:t,label:i,entities:l},s)=>!!l.length&&e.createElement(r,{key:`category-list-${t}`},e.createElement(it,{style:{maxHeight:"all"!==f?"240px":"140px",padding:"12px 0"}},e.createElement(E,{size:12,family:"secondary",color:n.text.darker_grey,style:{marginLeft:"16px"}},i),l.map((i,n)=>e.createElement(tt,{key:`entity-${s}-${n}`,icon:Se(t),label:fe(i,t,{extended:!0}),onClick:()=>{const e=U(i);o(null,{data:{type:t,id:e}}),a()},style:{width:"100%",justifyContent:"flex-start"},color:"transparent"}))),e.createElement(se,{thickness:s===k.length-1?0:1,length:"90%",margin:"8px auto"})))):e.createElement(et,{ref:h,isOpen:g,top:v.top,left:v.left},e.createElement(Ne,null))},nn=({preventPopup:i=!1})=>{const{searchText:a,setSearchText:o}=ye(),[l,r]=t(!1),s=!!a||l,c=()=>{o(""),r(!1)},d=n(null);return at(d,c),j({key:"Escape",active:s},c),e.createElement(en,{ref:d},e.createElement($,{placeholder:"Search",icon:Ti,value:a,onChange:e=>o(e.target.value.toLowerCase()),onFocus:()=>r(!0)}),s&&!i?e.createElement(an,{onClose:c}):null)},on=({sources:t,title:i="Condition",value:a,onSelect:n,onDeselect:o,...r})=>{const s=l(()=>{const e=[];return t.forEach(({conditions:t})=>{t?.forEach(({type:t,reason:i})=>{e.find(e=>e.id===`${t}#${i}`)||e.push({id:`${t}#${i}`,value:`${nt(t)} - ${nt(i)}`})})}),e.sort((e,t)=>e.id?.localeCompare(t.id||"")||0)},[t]);return e.createElement(ot,{disabled:!s?.length,title:i,placeholder:"All",options:s,value:a,onSelect:n,onDeselect:o,...r})},ln=({sources:t,title:i="Error Message",value:a,onSelect:n,onDeselect:o,disabled:r,...s})=>{const c=l(()=>{const e=[];return t.forEach(({conditions:t})=>{pe(t||[]).forEach(({status:t,message:i,reason:a})=>{t!==W.Error||e.find(e=>e.id===i)||(i?e.find(e=>e.id===i)||e.push({id:i,value:i}):a&&(e.find(e=>e.id===a)||e.push({id:a,value:a})))})}),e},[t]);return e.createElement(ot,{disabled:r||!c?.length,title:i,placeholder:"All",options:c,value:a,onSelect:n,onDeselect:o,...s})},rn=({sources:t,title:i="Programming Language",value:a,onSelect:n,onDeselect:o,...r})=>{const s=l(()=>{const e=[];return t.forEach(({containers:t})=>{t?.forEach(({language:t})=>{e.find(e=>e.id===t)||e.push({id:t,value:lt[t]||t})})}),e.sort((e,t)=>e.id?.localeCompare(t.id||"")||0)},[t]);return e.createElement(ot,{disabled:!s?.length,title:i,placeholder:"All",options:s,value:a,onSelect:n,onDeselect:o,...r})},sn=({title:t="Monitors",value:i,onSelect:a,onDeselect:n,...o})=>{const r=l(()=>{const e=[];return rt.forEach(({id:t,value:i})=>{e.find(e=>e.id===t)||e.push({id:t,value:i})}),e},[]);return e.createElement(ot,{disabled:!r?.length,title:t,placeholder:"All",options:r,value:i,onSelect:a,onDeselect:n,...o})},cn=({namespaces:t,title:i="Namespace",value:a,onSelect:n,onDeselect:o,...r})=>{const s=l(()=>{const e=[];return t?.forEach(({name:t})=>{e.find(e=>e.id===t)||e.push({id:t,value:t})}),e},[t]);return e.createElement(ot,{disabled:!s?.length,title:i,placeholder:"Select namespace",options:s,value:a,onSelect:n,onDeselect:o,...r})},dn=({sources:t,title:i="Kind",value:a,onSelect:n,onDeselect:o,...r})=>{const s=l(()=>{const e=[];return t.forEach(({kind:t})=>{e.find(e=>e.id===t)||e.push({id:t,value:t})}),e},[t]);return e.createElement(ot,{disabled:!s?.length,title:i,placeholder:"All",options:s,value:a,onSelect:n,onDeselect:o,...r})},un=d.div`
159
159
  display: flex;
160
160
  flex-direction: column;
161
161
  gap: 12px;
@@ -167,7 +167,7 @@ import e,{useState as t,useEffect as i,forwardRef as a,useRef as n,useImperative
167
167
  ${({$color:e})=>`color: ${e};`}
168
168
  `,hn=d.div`
169
169
  margin-left: auto;
170
- `,gn=e=>{let t=0;return Object.values(e).forEach(e=>{e&&Array.isArray(e)&&e.length>0&&(t+=e.length)}),e.onlyErrors&&t++,e.searchText&&t++,t},yn=()=>{const a=O.useTheme(),{isVm:o}=We(),{namespaces:r,sources:s}=_(),{selectedStreamName:c}=_e(),{getItemSS:d,setItemSS:u,removeItemSS:p}=ct(),{popupRef:m,popupOpen:h,setPopupOpen:g,popupPosition:y,handlePosition:v}=Qe(),{namespaces:b,kinds:f,monitors:x,languages:$,conditions:k,errors:C,onlyErrors:S,setAll:T,clearAll:D,getEmptyState:N}=ye(),E=l(()=>Ye(s,c),[s,c]),[F,I]=t({namespaces:b,kinds:f,monitors:x,languages:$,conditions:k,errors:C,onlyErrors:S}),[A,M]=t(gn(F));i(()=>{const e=d(st.OVERVIEW_FILTERS,N());T(e)},[]),i(()=>{if(!h){const e={namespaces:b,kinds:f,monitors:x,languages:$,conditions:k,errors:C,onlyErrors:S};I(e),M(gn(e))}},[h,b,f,x,$,k,C,S]);const R=()=>{g(!1)},L=n(null);return at(L,R),j({key:"Escape",active:h},R),e.createElement(en,{ref:L},e.createElement(tt,{label:"Filters",icon:Di,badgeLabel:A,badgeFilled:!!A,withBorder:!0,color:"transparent",onClick:()=>{v(0,50),g(!0)}}),e.createElement(et,{ref:m,isOpen:h,top:y.top,left:y.left,width:"420px",footer:e.createElement(ue,null,e.createElement(mn,{variant:"primary",onClick:()=>{u(st.OVERVIEW_FILTERS,F),T(F),M(gn(F)),g(!1)}},"Apply"),e.createElement(mn,{variant:"secondary",onClick:R},"Cancel"),e.createElement(hn,null,e.createElement(mn,{variant:"tertiary",onClick:()=>{p(st.OVERVIEW_FILTERS),D(),I(N()),M(0),g(!1)},$color:a.text.error},"Reset")))},e.createElement(un,null,!o&&e.createElement(cn,{namespaces:r,value:F.namespaces,onSelect:e=>I(t=>({...t,namespaces:[...t.namespaces||[],e]})),onDeselect:e=>I(t=>({...t,namespaces:(t.namespaces||[]).filter(t=>t.id!==e.id)})),showSearch:!0,required:!0,isMulti:!0}),e.createElement(dn,{sources:E,value:F.kinds,onSelect:e=>I(t=>({...t,kinds:[...t.kinds||[],e]})),onDeselect:e=>I(t=>({...t,kinds:(t.kinds||[]).filter(t=>t.id!==e.id)})),showSearch:!0,required:!0,isMulti:!0}),e.createElement(rn,{sources:E,value:F.languages,onSelect:e=>I(t=>({...t,languages:[...t.languages||[],e]})),onDeselect:e=>I(t=>({...t,languages:(t.languages||[]).filter(t=>t.id!==e.id)})),showSearch:!0,required:!0,isMulti:!0}),e.createElement(sn,{value:F.monitors,onSelect:e=>I(t=>({...t,monitors:[...t.monitors||[],e]})),onDeselect:e=>I(t=>({...t,monitors:(t.monitors||[]).filter(t=>t.id!==e.id)})),showSearch:!0,required:!0,isMulti:!0}),e.createElement(on,{sources:E,value:F.conditions,onSelect:e=>I(t=>({...t,conditions:[...t.conditions||[],e]})),onDeselect:e=>I(t=>({...t,conditions:(t.conditions||[]).filter(t=>t.id!==e.id)})),showSearch:!0,required:!0,isMulti:!0}),e.createElement(pn,null,e.createElement(w,{title:"Show only sources with errors",initialValue:F.onlyErrors,onChange:e=>I(t=>({...t,errors:[],onlyErrors:e}))})),e.createElement(ln,{sources:E,value:F.errors,onSelect:e=>I(t=>({...t,errors:[...t.errors||[],e]})),onDeselect:e=>I(t=>({...t,errors:(t.errors||[]).filter(t=>t.id!==e.id)})),disabled:!F.onlyErrors,showSearch:!0,required:!0,isMulti:!0}))))},vn=d.div`
170
+ `,gn=e=>{let t=0;return Object.values(e).forEach(e=>{e&&Array.isArray(e)&&e.length>0&&(t+=e.length)}),e.onlyErrors&&t++,e.searchText&&t++,t},yn=()=>{const a=O.useTheme(),{isVm:o}=We(),{namespaces:r,sources:s}=_(),{selectedStreamName:c}=_e(),{getItemSS:d,setItemSS:u,removeItemSS:p}=ct(),{popupRef:m,popupOpen:h,setPopupOpen:g,popupPosition:y,handlePosition:v}=Qe(),{namespaces:b,kinds:f,monitors:x,languages:$,conditions:k,errors:C,onlyErrors:S,setAll:T,clearAll:D,getEmptyState:N}=ye(),E=l(()=>Ge(s,c),[s,c]),[F,I]=t({namespaces:b,kinds:f,monitors:x,languages:$,conditions:k,errors:C,onlyErrors:S}),[A,M]=t(gn(F));i(()=>{const e=d(st.OVERVIEW_FILTERS,N());T(e)},[]),i(()=>{if(!h){const e={namespaces:b,kinds:f,monitors:x,languages:$,conditions:k,errors:C,onlyErrors:S};I(e),M(gn(e))}},[h,b,f,x,$,k,C,S]);const R=()=>{g(!1)},L=n(null);return at(L,R),j({key:"Escape",active:h},R),e.createElement(en,{ref:L},e.createElement(tt,{label:"Filters",icon:Di,badgeLabel:A,badgeFilled:!!A,withBorder:!0,color:"transparent",onClick:()=>{v(0,50),g(!0)}}),e.createElement(et,{ref:m,isOpen:h,top:y.top,left:y.left,width:"420px",footer:e.createElement(ue,null,e.createElement(mn,{variant:"primary",onClick:()=>{u(st.OVERVIEW_FILTERS,F),T(F),M(gn(F)),g(!1)}},"Apply"),e.createElement(mn,{variant:"secondary",onClick:R},"Cancel"),e.createElement(hn,null,e.createElement(mn,{variant:"tertiary",onClick:()=>{p(st.OVERVIEW_FILTERS),D(),I(N()),M(0),g(!1)},$color:a.text.error},"Reset")))},e.createElement(un,null,!o&&e.createElement(cn,{namespaces:r,value:F.namespaces,onSelect:e=>I(t=>({...t,namespaces:[...t.namespaces||[],e]})),onDeselect:e=>I(t=>({...t,namespaces:(t.namespaces||[]).filter(t=>t.id!==e.id)})),showSearch:!0,required:!0,isMulti:!0}),e.createElement(dn,{sources:E,value:F.kinds,onSelect:e=>I(t=>({...t,kinds:[...t.kinds||[],e]})),onDeselect:e=>I(t=>({...t,kinds:(t.kinds||[]).filter(t=>t.id!==e.id)})),showSearch:!0,required:!0,isMulti:!0}),e.createElement(rn,{sources:E,value:F.languages,onSelect:e=>I(t=>({...t,languages:[...t.languages||[],e]})),onDeselect:e=>I(t=>({...t,languages:(t.languages||[]).filter(t=>t.id!==e.id)})),showSearch:!0,required:!0,isMulti:!0}),e.createElement(sn,{value:F.monitors,onSelect:e=>I(t=>({...t,monitors:[...t.monitors||[],e]})),onDeselect:e=>I(t=>({...t,monitors:(t.monitors||[]).filter(t=>t.id!==e.id)})),showSearch:!0,required:!0,isMulti:!0}),e.createElement(on,{sources:E,value:F.conditions,onSelect:e=>I(t=>({...t,conditions:[...t.conditions||[],e]})),onDeselect:e=>I(t=>({...t,conditions:(t.conditions||[]).filter(t=>t.id!==e.id)})),showSearch:!0,required:!0,isMulti:!0}),e.createElement(pn,null,e.createElement(w,{title:"Show only sources with errors",initialValue:F.onlyErrors,onChange:e=>I(t=>({...t,errors:[],onlyErrors:e}))})),e.createElement(ln,{sources:E,value:F.errors,onSelect:e=>I(t=>({...t,errors:[...t.errors||[],e]})),onDeselect:e=>I(t=>({...t,errors:(t.errors||[]).filter(t=>t.id!==e.id)})),disabled:!F.onlyErrors,showSearch:!0,required:!0,isMulti:!0}))))},vn=d.div`
171
171
  display: flex;
172
172
  flex-direction: column;
173
173
  gap: 24px;
@@ -247,11 +247,11 @@ import e,{useState as t,useEffect as i,forwardRef as a,useRef as n,useImperative
247
247
  display: flex;
248
248
  flex-direction: column;
249
249
  gap: 24px;
250
- `,Yn=d.div`
250
+ `,Gn=d.div`
251
251
  display: flex;
252
252
  align-items: center;
253
253
  gap: 12px;
254
- `,Gn=d.div`
254
+ `,Yn=d.div`
255
255
  width: 170px;
256
256
  margin-right: 8px;
257
257
  `,Xn=d.div`
@@ -267,7 +267,7 @@ import e,{useState as t,useEffect as i,forwardRef as a,useRef as n,useImperative
267
267
  }
268
268
  `,Zn=d(Un)`
269
269
  margin-top: 80px;
270
- `,{MANAGED:Qn,SELF_HOSTED:eo,DETECTED:to,EXISTS:io}=wt,ao=[{value:"All types",id:"all"},{value:Qn.TITLE,id:Qn.TITLE},{value:eo.TITLE,id:eo.TITLE},{value:to.TITLE,id:to.TITLE},{value:io.TITLE,id:io.TITLE}],no=ao[0],oo=[$t.Logs,$t.Metrics,$t.Traces],lo=(e,t,i)=>e.map(e=>{const{type:a,displayName:n}=e.destinationType,o=e.dataStreamNames?.includes(t),l=i.has(e.id);return{id:e.id,type:a,displayName:n,selected:o||l,fields:[],testConnectionSupported:!1,supportedSignals:{[$t.Logs]:{supported:e.exportedSignals.logs},[$t.Metrics]:{supported:e.exportedSignals.metrics},[$t.Traces]:{supported:e.exportedSignals.traces}}}}),ro=({hidden:i,categories:a,potentialDestinations:n,onSelectNew:o,onSelectConfigured:r,isLoadingForDestinationIds:s})=>{const{destinations:c}=_(),{selectedStreamName:d}=_e(),{configuredDestinations:u,configuredDestinationsUpdateOnly:p}=ut(),[m,h]=t(""),[g,y]=t(no),[v,b]=t(oo),f=l(()=>{const e=Tt(a);return e.unshift({name:io.TITLE,description:io.DESCRIPTION,icon:Ei,items:lo(c,d,new Set(u.concat(p).map(e=>e.id)))}),e.unshift({name:to.TITLE,description:to.DESCRIPTION,icon:Oi,items:n}),e.map(e=>{const t=e.items.filter(t=>{const i=!m||t.displayName.toLowerCase().includes(m.toLowerCase()),a="all"===g.id||g.id===e.name,n=v.some(e=>t.supportedSignals[e.toLowerCase()]?.supported);return i&&a&&n});return{...e,items:t}}).filter(({items:e})=>!!e.length)},[a,n,c,m,g,v,d,u,p]);return i?null:e.createElement(Un,null,e.createElement(I,{title:"Choose destination",description:"Add backend destination you want to connect with Odigos."}),e.createElement(Yn,null,e.createElement(Gn,null,e.createElement($,{placeholder:"Search...",icon:Ti,value:m,onChange:({target:{value:e}})=>h(e)})),e.createElement(Gn,null,e.createElement(ot,{options:ao,value:g,onSelect:y,onDeselect:()=>{}})),e.createElement(M,{title:"",selectedSignals:v,setSelectedSignals:b})),e.createElement(se,null),f.length?e.createElement(Xn,null,e.createElement(Jn,{items:f,onSelectNew:e=>o(e,v),onSelectConfigured:r,isLoadingForDestinationIds:s})):e.createElement(Zn,null,e.createElement(Ne,{title:"No destinations found"})))},so=d.div`
270
+ `,{MANAGED:Qn,SELF_HOSTED:eo,DETECTED:to,EXISTS:io}=wt,ao=[{value:"All types",id:"all"},{value:Qn.TITLE,id:Qn.TITLE},{value:eo.TITLE,id:eo.TITLE},{value:to.TITLE,id:to.TITLE},{value:io.TITLE,id:io.TITLE}],no=ao[0],oo=[$t.Logs,$t.Metrics,$t.Traces],lo=(e,t,i)=>e.map(e=>{const{type:a,displayName:n}=e.destinationType,o=e.dataStreamNames?.includes(t),l=i.has(e.id);return{id:e.id,type:a,displayName:n,selected:o||l,fields:[],testConnectionSupported:!1,supportedSignals:{[$t.Logs]:{supported:e.exportedSignals.logs},[$t.Metrics]:{supported:e.exportedSignals.metrics},[$t.Traces]:{supported:e.exportedSignals.traces}}}}),ro=({hidden:i,categories:a,potentialDestinations:n,onSelectNew:o,onSelectConfigured:r,isLoadingForDestinationIds:s})=>{const{destinations:c}=_(),{selectedStreamName:d}=_e(),{configuredDestinations:u,configuredDestinationsUpdateOnly:p}=ut(),[m,h]=t(""),[g,y]=t(no),[v,b]=t(oo),f=l(()=>{const e=Tt(a);return e.unshift({name:io.TITLE,description:io.DESCRIPTION,icon:Ei,items:lo(c,d,new Set(u.concat(p).map(e=>e.id)))}),e.unshift({name:to.TITLE,description:to.DESCRIPTION,icon:Oi,items:n}),e.map(e=>{const t=e.items.filter(t=>{const i=!m||t.displayName.toLowerCase().includes(m.toLowerCase()),a="all"===g.id||g.id===e.name,n=v.some(e=>t.supportedSignals[e.toLowerCase()]?.supported);return i&&a&&n});return{...e,items:t}}).filter(({items:e})=>!!e.length)},[a,n,c,m,g,v,d,u,p]);return i?null:e.createElement(Un,null,e.createElement(I,{title:"Choose destination",description:"Add backend destination you want to connect with Odigos."}),e.createElement(Gn,null,e.createElement(Yn,null,e.createElement($,{placeholder:"Search...",icon:Ti,value:m,onChange:({target:{value:e}})=>h(e)})),e.createElement(Yn,null,e.createElement(ot,{options:ao,value:g,onSelect:y,onDeselect:()=>{}})),e.createElement(M,{title:"",selectedSignals:v,setSelectedSignals:b})),e.createElement(se,null),f.length?e.createElement(Xn,null,e.createElement(Jn,{items:f,onSelectNew:e=>o(e,v),onSelectConfigured:r,isLoadingForDestinationIds:s})):e.createElement(Zn,null,e.createElement(Ne,{title:"No destinations found"})))},so=d.div`
271
271
  display: flex;
272
272
  `,co=d.div`
273
273
  border-right: 1px solid ${({theme:e})=>e.colors.border};
@@ -294,7 +294,7 @@ import e,{useState as t,useEffect as i,forwardRef as a,useRef as n,useImperative
294
294
  padding: 32px;
295
295
  border-radius: 16px;
296
296
  border-style: dashed !important;
297
- `,yo=({isSourcesListEmpty:t,goToSources:i,categories:a,potentialDestinations:n,testConnection:o,onClickSummary:l})=>{const r=O.useTheme(),{setCurrentModal:s}=te(),{configuredDestinations:c,configuredDestinationsUpdateOnly:d}=ut();return e.createElement(e.Fragment,null,e.createElement(ne,{$isNotModal:!0},e.createElement(ee,{$gap:12},e.createElement(ee,{$gap:24},l&&e.createElement(yt,{onClick:l}),e.createElement(I,{title:m.ADD_DESTINATIONS,badgeLabel:c.length+d.length,description:m.ADD_DESTINATION_DESCRIPTION}),t&&e.createElement(oe,{type:W.Warning,message:m.NO_SOURCES_GO_BACK,action:{label:m.SELECT_SOURCES,onClick:i}}),e.createElement(go,{variant:"secondary",onClick:()=>s(B.Destination)},e.createElement(wi,null),e.createElement(E,{color:r.colors.secondary,size:14,decoration:"underline",family:"secondary"},m.ADD_DESTINATION))),e.createElement(mo,{categories:a,withDelete:!0}))),e.createElement(uo,{isOnboarding:!0,categories:a,potentialDestinations:n,updateDestination:async()=>{},createDestination:async()=>{},deleteDestination:async()=>{},testConnection:o}))},vo=[{key:"icon",title:""},{key:"name",title:m.NAME,sortable:!0},{key:"type",title:m.TYPE,sortable:!0},{key:"signals",title:m.MONITORS},{key:"active-status",title:m.STATUS},{key:"conditions",title:"Conditions"},{key:"throughput",title:"Throughput",sortable:!0}],bo=({metrics:t,maxHeight:i,maxWidth:a})=>{const n=O.useTheme(),o=ye(),{selectedStreamName:r}=_e(),{setDrawerType:s,setDrawerEntityId:c}=K(),{destinations:d,destinationsLoading:u}=_(),p=l(()=>Xe(d,r),[d,r]),h=l(()=>Oa({instrumentationRules:[],sources:[],actions:[],destinations:Ge(p,o),searchText:o.searchText,selectedCategory:B.Destination}).searchResults.find(({category:e})=>e===B.Destination)?.entities||[],[p,o]),g=l(()=>h.map(i=>{const{hasErrors:a,hasWarnings:o,hasDisableds:l}=ce(i.conditions||[]),{icon:r,iconSrc:d}=ze(i.destinationType.type);return{status:a?W.Error:o?W.Warning:void 0,faded:l,onClick:()=>{s(B.Destination),c(i.id)},cells:[{columnKey:"icon",component:()=>e.createElement(be,{icon:r,src:d})},{columnKey:"name",value:fe(i,B.Destination,{prioritizeDisplayName:!0})},{columnKey:"type",value:i.destinationType.type,textColor:n.text.info},{columnKey:"throughput",value:je(Et(t,B.Destination,i.id).throughput),textColor:n.text.info},{columnKey:"signals",component:()=>e.createElement(xe,{withLabels:!0,monitors:Ke(i.exportedSignals)})},{columnKey:"conditions",component:()=>i.conditions?.length?e.createElement(Na,{conditions:i.conditions,id:i.id}):null},{columnKey:"active-status",component:()=>e.createElement("div",{style:{lineHeight:1}},e.createElement(de,{status:i.disabled?W.Error:W.Success,title:i.disabled?m.DISABLED:m.ENABLED,withIcon:!0,withBorder:!0}))}]}}),[h,t]),{badge:y,badgeTooltip:v}=l(()=>h.length!==p.length?{badge:`${h.length}/${p.length}`,badgeTooltip:m.FILTERED_COUNT_TOOLTIP}:{badge:p.length,badgeTooltip:void 0},[h,p]);return e.createElement($e,{$maxWidth:a},e.createElement(ke,null,e.createElement(Ce,{icon:Se(B.Destination),title:m.DESTINATIONS,badge:y,badgeTooltip:v,loading:u})),e.createElement(we,{$maxHeight:i},e.createElement(Te,{columns:vo,rows:g})),!h.length&&e.createElement(De,{style:{marginTop:"2rem"}},e.createElement(Ne,null)))},fo=e=>{const{type:t,ruleName:i,notes:a,disabled:n,profileName:o,payloadCollection:l,codeAttributes:r,headersCollection:s,customInstrumentations:c}=e,d=[{title:m.TYPE,value:t},{type:h.ActiveStatus,title:m.STATUS,value:String(!n)},{title:m.NAME,value:i},{title:m.NOTES,value:a},{title:m.MANAGED_BY_PROFILE,value:o},{type:h.Divider}];if(l){const e=Object.entries(l).filter(([e,t])=>t).map(([e,t])=>e).join(", ");e&&d.push({title:"Collect",value:e})}if(r){const e=Object.entries(r).filter(([e,t])=>t).map(([e,t])=>e).join(", ");e&&d.push({title:"Collect",value:e})}if(s){const e=(s[Ot.HeaderKeys]||[]).filter(e=>e).join(", ");e&&d.push({title:"Collect",value:e})}if(c){const e=(c[It.Java]||[]).map(e=>new Ft(e.className,e.methodName)).map(e=>`• ${e.toString()}`).join("\r\n");e&&d.push({title:m.JAVA_CUSTOM_PROBES,value:e});const t=(c[It.Golang]||[]).map(e=>new At(e.packageName,e.functionName,e.receiverName,e.receiverMethodName)).map(e=>`• ${e.toString()}`).join("\r\n");t&&d.push({title:m.GOLANG_CUSTOM_PROBES,value:t})}return d},xo=d.div`
297
+ `,yo=({isSourcesListEmpty:t,goToSources:i,categories:a,potentialDestinations:n,testConnection:o,onClickSummary:l})=>{const r=O.useTheme(),{setCurrentModal:s}=te(),{configuredDestinations:c,configuredDestinationsUpdateOnly:d}=ut();return e.createElement(e.Fragment,null,e.createElement(ne,{$isNotModal:!0},e.createElement(ee,{$gap:12},e.createElement(ee,{$gap:24},l&&e.createElement(yt,{onClick:l}),e.createElement(I,{title:m.ADD_DESTINATIONS,badgeLabel:c.length+d.length,description:m.ADD_DESTINATION_DESCRIPTION}),t&&e.createElement(oe,{type:W.Warning,message:m.NO_SOURCES_GO_BACK,action:{label:m.SELECT_SOURCES,onClick:i}}),e.createElement(go,{variant:"secondary",onClick:()=>s(B.Destination)},e.createElement(wi,null),e.createElement(E,{color:r.colors.secondary,size:14,decoration:"underline",family:"secondary"},m.ADD_DESTINATION))),e.createElement(mo,{categories:a,withDelete:!0}))),e.createElement(uo,{isOnboarding:!0,categories:a,potentialDestinations:n,updateDestination:async()=>{},createDestination:async()=>{},deleteDestination:async()=>{},testConnection:o}))},vo=[{key:"icon",title:""},{key:"name",title:m.NAME,sortable:!0},{key:"type",title:m.TYPE,sortable:!0},{key:"signals",title:m.MONITORS},{key:"active-status",title:m.STATUS},{key:"conditions",title:"Conditions"},{key:"throughput",title:"Throughput",sortable:!0}],bo=({metrics:t,maxHeight:i,maxWidth:a})=>{const n=O.useTheme(),o=ye(),{selectedStreamName:r}=_e(),{setDrawerType:s,setDrawerEntityId:c}=K(),{destinations:d,destinationsLoading:u}=_(),p=l(()=>Xe(d,r),[d,r]),h=l(()=>Oa({instrumentationRules:[],sources:[],actions:[],destinations:Ye(p,o),searchText:o.searchText,selectedCategory:B.Destination}).searchResults.find(({category:e})=>e===B.Destination)?.entities||[],[p,o]),g=l(()=>h.map(i=>{const{hasErrors:a,hasWarnings:o,hasDisableds:l}=ce(i.conditions||[]),{icon:r,iconSrc:d}=ze(i.destinationType.type);return{status:a?W.Error:o?W.Warning:void 0,faded:l,onClick:()=>{s(B.Destination),c(i.id)},cells:[{columnKey:"icon",component:()=>e.createElement(be,{icon:r,src:d})},{columnKey:"name",value:fe(i,B.Destination,{prioritizeDisplayName:!0})},{columnKey:"type",value:i.destinationType.type,textColor:n.text.info},{columnKey:"throughput",value:je(Et(t,B.Destination,i.id).throughput),textColor:n.text.info},{columnKey:"signals",component:()=>e.createElement(xe,{withLabels:!0,monitors:Ke(i.exportedSignals)})},{columnKey:"conditions",component:()=>i.conditions?.length?e.createElement(Na,{conditions:i.conditions,id:i.id}):null},{columnKey:"active-status",component:()=>e.createElement("div",{style:{lineHeight:1}},e.createElement(de,{status:i.disabled?W.Error:W.Success,title:i.disabled?m.DISABLED:m.ENABLED,withIcon:!0,withBorder:!0}))}]}}),[h,t]),{badge:y,badgeTooltip:v}=l(()=>h.length!==p.length?{badge:`${h.length}/${p.length}`,badgeTooltip:m.FILTERED_COUNT_TOOLTIP}:{badge:p.length,badgeTooltip:void 0},[h,p]);return e.createElement($e,{$maxWidth:a},e.createElement(ke,null,e.createElement(Ce,{icon:Se(B.Destination),title:m.DESTINATIONS,badge:y,badgeTooltip:v,loading:u})),e.createElement(we,{$maxHeight:i},e.createElement(Te,{columns:vo,rows:g})),!h.length&&e.createElement(De,{style:{marginTop:"2rem"}},e.createElement(Ne,null)))},fo=e=>{const{type:t,ruleName:i,notes:a,disabled:n,profileName:o,payloadCollection:l,codeAttributes:r,headersCollection:s,customInstrumentations:c}=e,d=[{title:m.TYPE,value:t},{type:h.ActiveStatus,title:m.STATUS,value:String(!n)},{title:m.NAME,value:i},{title:m.NOTES,value:a},{title:m.MANAGED_BY_PROFILE,value:o},{type:h.Divider}];if(l){const e=Object.entries(l).filter(([e,t])=>t).map(([e,t])=>e).join(", ");e&&d.push({title:"Collect",value:e})}if(r){const e=Object.entries(r).filter(([e,t])=>t).map(([e,t])=>e).join(", ");e&&d.push({title:"Collect",value:e})}if(s){const e=(s[Ot.HeaderKeys]||[]).filter(e=>e).join(", ");e&&d.push({title:"Collect",value:e})}if(c){const e=(c[It.Java]||[]).map(e=>new Ft(e.className,e.methodName)).map(e=>`• ${e.toString()}`).join("\r\n");e&&d.push({title:m.JAVA_CUSTOM_PROBES,value:e});const t=(c[It.Golang]||[]).map(e=>new At(e.packageName,e.functionName,e.receiverName,e.receiverMethodName)).map(e=>`• ${e.toString()}`).join("\r\n");t&&d.push({title:m.GOLANG_CUSTOM_PROBES,value:t})}return d},xo=d.div`
298
298
  display: flex;
299
299
  flex-direction: column;
300
300
  gap: 12px;
@@ -373,7 +373,7 @@ import e,{useState as t,useEffect as i,forwardRef as a,useRef as n,useImperative
373
373
  border-radius: 32px;
374
374
  width: fit-content;
375
375
  padding: 2px 8px;
376
- `,Uo=()=>{const t=O.useTheme(),{notifications:i,markAsSeen:a}=P(),n=i.filter(({hideFromHistory:e})=>!e),o=n.filter(({seen:e})=>!e),l=o.length,{popupRef:r,popupOpen:s,setPopupOpen:c,popupPosition:d,handlePosition:u}=Qe({defaultClientHeight:420,defaultClientwidth:400,onClickOutside:()=>{l&&o.forEach(({id:e})=>a(e))}});return e.createElement(Ho,null,e.createElement(mt,{onClick:()=>{u(0,0),c(e=>!e)},tooltip:"Notifications",withPing:!!l,pingColor:t.colors.orange_og},e.createElement(Ai,{size:18})),e.createElement(et,{ref:r,isOpen:s,right:d.left,maxWidth:"400px",header:e.createElement(Bo,null,e.createElement(E,{size:20},"Notifications"),!!l&&e.createElement(Jo,{size:12,family:"secondary"},l," new"))},e.createElement(Wo,null,n.length?n.map(t=>e.createElement(el,{key:`notification-${t.id}`,...t,onClick:()=>c(!1)})):e.createElement(Ne,{title:"No notifications",subTitle:""})),e.createElement(_o,null)))},Yo=d.div`
376
+ `,Uo=()=>{const t=O.useTheme(),{notifications:i,markAsSeen:a}=P(),n=i.filter(({hideFromHistory:e})=>!e),o=n.filter(({seen:e})=>!e),l=o.length,{popupRef:r,popupOpen:s,setPopupOpen:c,popupPosition:d,handlePosition:u}=Qe({defaultClientHeight:420,defaultClientwidth:400,onClickOutside:()=>{l&&o.forEach(({id:e})=>a(e))}});return e.createElement(Ho,null,e.createElement(mt,{onClick:()=>{u(0,0),c(e=>!e)},tooltip:"Notifications",withPing:!!l,pingColor:t.colors.orange_og},e.createElement(Ai,{size:18})),e.createElement(et,{ref:r,isOpen:s,right:d.left,maxWidth:"400px",header:e.createElement(Bo,null,e.createElement(E,{size:20},"Notifications"),!!l&&e.createElement(Jo,{size:12,family:"secondary"},l," new"))},e.createElement(Wo,null,n.length?n.map(t=>e.createElement(el,{key:`notification-${t.id}`,...t,onClick:()=>c(!1)})):e.createElement(Ne,{title:"No notifications",subTitle:""})),e.createElement(_o,null)))},Go=d.div`
377
377
  display: flex;
378
378
  align-items: flex-start;
379
379
  gap: 12px;
@@ -387,7 +387,7 @@ import e,{useState as t,useEffect as i,forwardRef as a,useRef as n,useImperative
387
387
  background-color: ${({theme:e})=>e.colors.dropdown_bg_2};
388
388
  }
389
389
  }
390
- `,Go=d.div`
390
+ `,Yo=d.div`
391
391
  background-color: ${({$type:e,theme:t})=>t.text[e]+O.opacity.hex["015"]};
392
392
  border-radius: 8px;
393
393
  width: 36px;
@@ -403,11 +403,11 @@ import e,{useState as t,useEffect as i,forwardRef as a,useRef as n,useImperative
403
403
  display: flex;
404
404
  align-items: center;
405
405
  gap: 6px;
406
- `,el=({id:t,seen:i,type:a,title:n,message:o,time:l,crdType:r,target:s,onClick:c})=>{const d=O.useTheme(),{formatTimeAgo:u}=zt(),{onClickNotification:p}=Ht(),m=!!r&&!!s,h=n?.toLowerCase().includes(Q.Delete.toLowerCase())||!1,g=ge(a,d);return e.createElement(Yo,{key:`notification-${t}`,className:m?"click-enabled":"",onClick:()=>{m&&(c(),p({id:t,crdType:r,target:s}))}},e.createElement(Go,{$type:h?W.Error:a},h?e.createElement(Ci,null):e.createElement(g,null)),e.createElement(Xo,null,e.createElement(Zo,null,e.createElement(E,{size:14},o)),e.createElement(Qo,null,e.createElement(E,{size:10,color:d.text.grey},u(l)),!i&&e.createElement(e.Fragment,null,e.createElement(E,{size:10},"·"),e.createElement(E,{size:10,color:d.colors.orange_soft},"new")))))},tl=(e,t,i)=>{const a=e?.serviceName||t?.otelServiceName||t?.name,n=i?[Mi]:He(t?.containers||[]),{priorotizedStatus:o}=ce(t?.conditions||[]);return{id:a,title:a,icons:n.length?n:[Ri],status:o,serviceMapEntry:e}},il=e=>"user"===e?.otelServiceName&&!e?.namespace&&!e?.name&&!e?.kind,al=d.div`
406
+ `,el=({id:t,seen:i,type:a,title:n,message:o,time:l,crdType:r,target:s,onClick:c})=>{const d=O.useTheme(),{formatTimeAgo:u}=zt(),{onClickNotification:p}=Ht(),m=!!r&&!!s,h=n?.toLowerCase().includes(Q.Delete.toLowerCase())||!1,g=ge(a,d);return e.createElement(Go,{key:`notification-${t}`,className:m?"click-enabled":"",onClick:()=>{m&&(c(),p({id:t,crdType:r,target:s}))}},e.createElement(Yo,{$type:h?W.Error:a},h?e.createElement(Ci,null):e.createElement(g,null)),e.createElement(Xo,null,e.createElement(Zo,null,e.createElement(E,{size:14},o)),e.createElement(Qo,null,e.createElement(E,{size:10,color:d.text.grey},u(l)),!i&&e.createElement(e.Fragment,null,e.createElement(E,{size:10},"·"),e.createElement(E,{size:10,color:d.colors.orange_soft},"new")))))},tl=(e,t,i)=>{const a=e?.serviceName||t?.otelServiceName||t?.name,n=i?[Mi]:He(t?.containers||[]),{priorotizedStatus:o}=ce(t?.conditions||[]);return{id:a,title:a,icons:n.length?n:[Ri],status:o,serviceMapEntry:e}},il=e=>"user"===e?.otelServiceName&&!e?.namespace&&!e?.name&&!e?.kind,al=d.div`
407
407
  width: 100%;
408
408
  height: ${({$heightToRemove:e})=>`calc(100vh - ${e}px)`};
409
409
  position: relative;
410
- `,nl={namespace:"",name:"",kind:"",otelServiceName:"user",selected:!0,numberOfInstances:0,dataStreamNames:[],containers:[],conditions:[]},ol=({heightToRemove:t,serviceMap:a})=>{const n=O.useTheme(),{sources:o,sourcesLoading:l}=_(),{containerRef:r,containerHeight:s,containerWidth:c}=Je(),[d,u,p]=Ui([]),[h,g,y]=Yi([]);return i(()=>{if(s&&c){const t=(({sources:e,serviceMap:t,containerHeight:i,containerWidth:a})=>{const n=[],o=new Map,l=((e,t)=>{const i=new Map,a=new Map,n=new Map,o=new Set;e.forEach(e=>{o.add(e.serviceName),e.services.forEach(e=>{o.add(e.serviceName)})}),o.forEach(e=>{a.set(e,[]),n.set(e,0)}),e.forEach(e=>{e.services.forEach(t=>{a.get(e.serviceName)?.push(t.serviceName);const i=n.get(t.serviceName)||0;n.set(t.serviceName,i+1)})});const l=[],r=[];for(o.forEach(e=>{0===(n.get(e)||0)&&r.push(e)});r.length>0;){const e=[],t=r.length;for(let i=0;i<t;i++){const t=r.shift();e.push(t),a.get(t)?.forEach(e=>{const t=n.get(e)||0;n.set(e,t-1),t-1==0&&r.push(e)})}e.length>0&&l.push(e)}return o.forEach(e=>{l.flat().includes(e)||(0===l.length?l.push([e]):l[l.length-1].push(e))}),l.forEach((e,a)=>{const n=100+150*a,o=150*(e.length-1),l=(t-o)/2;e.forEach((e,t)=>{const a=l+150*t,o=n;i.set(e,{x:a,y:o})})}),i})(t,a);if(t.length&&e.length){t.forEach(t=>{const i=t.serviceName;if(n.find(e=>e.id===`${B.Source}-${i}-${Bt.MapItem}`))return;const a=e.find(e=>i===e.otelServiceName||i===e.name);o.set(i,t),t.services.forEach(e=>o.set(e.serviceName,{serviceName:e.serviceName,services:[]})),n.push({id:`${B.Source}-${i}-${Bt.MapItem}`,type:Bt.MapItem,position:l.get(i),data:tl(t,a,il(a))})}),o.forEach((t,i)=>{if(n.find(e=>e.id===`${B.Source}-${i}-${Bt.MapItem}`))return;const a=e.find(e=>i===e.otelServiceName||i===e.name);n.push({id:`${B.Source}-${i}-${Bt.MapItem}`,type:Bt.MapItem,position:l.get(i),data:tl(t,a,il(a))})});let i=50;e.forEach(e=>{const t=e.otelServiceName||e.name;n.find(e=>e.id===`${B.Source}-${t}-${Bt.MapItem}`)||(n.push({id:`${B.Source}-${t}-${Bt.MapItem}`,type:Bt.MapItem,position:{x:i,y:10},data:tl(void 0,e,il(e))}),i+=110)})}else n.push({id:`${B.Source}-${Bt.NoData}`,type:Bt.NoData,position:{x:a/2-150,y:i/4},data:{subTitle:m.ARE_SERVICES_INSTRUMENTED_AND_PRODUCING_TRAFFIC}});return n})({serviceMap:a,sources:[nl].concat(o),sourcesLoading:l,containerHeight:s,containerWidth:c});d.length>1?(e=t,u(t=>{const i=e.map(e=>{const i=t.find(t=>t.id===e.id);return e.position=i?.position||e.position,{id:e.id,item:e,type:i?"replace":"add"}});return t.find(e=>e.id===`${B.Source}-${Bt.NoData}`)&&i.push({id:`${B.Source}-${Bt.NoData}`,type:"remove"}),Gi(i,t)})):u(t)}var e},[a,o,l,s,c]),i(()=>{g((({theme:e,nodes:t,serviceMap:i})=>{const a=[];return t.forEach(({id:t,data:{id:n,status:o}})=>{const{services:l}=i.find(e=>e.serviceName===n)||{services:[]};l.forEach(i=>{const n=t,l=`${B.Source}-${i.serviceName}-${Bt.MapItem}`,r=o===W.Error;a.push({id:`${n}-to-${l}`,source:n,target:l,markerEnd:{type:Ji.ArrowClosed},style:{stroke:r?e?.colors.dark_red:e?.colors.border}})})}),a})({theme:n,nodes:d,serviceMap:a}))},[n,d,a]),e.createElement(al,{ref:r,$heightToRemove:t},e.createElement(Wt,{nodes:d,edges:h,onNodesChange:p,onEdgesChange:y,zoomOnScroll:!0}))},ll=d.div`
410
+ `,nl={namespace:"",name:"",kind:"",otelServiceName:"user",selected:!0,numberOfInstances:0,dataStreamNames:[],containers:[],conditions:[]},ol=({heightToRemove:t,serviceMap:a})=>{const n=O.useTheme(),{sources:o,sourcesLoading:l}=_(),{containerRef:r,containerHeight:s,containerWidth:c}=Je(),[d,u,p]=Ui([]),[h,g,y]=Gi([]);return i(()=>{if(s&&c){const t=(({sources:e,serviceMap:t,containerHeight:i,containerWidth:a})=>{const n=[],o=new Map,l=((e,t)=>{const i=new Map,a=new Map,n=new Map,o=new Set;e.forEach(e=>{o.add(e.serviceName),e.services.forEach(e=>{o.add(e.serviceName)})}),o.forEach(e=>{a.set(e,[]),n.set(e,0)}),e.forEach(e=>{e.services.forEach(t=>{a.get(e.serviceName)?.push(t.serviceName);const i=n.get(t.serviceName)||0;n.set(t.serviceName,i+1)})});const l=[],r=[];for(o.forEach(e=>{0===(n.get(e)||0)&&r.push(e)});r.length>0;){const e=[],t=r.length;for(let i=0;i<t;i++){const t=r.shift();e.push(t),a.get(t)?.forEach(e=>{const t=n.get(e)||0;n.set(e,t-1),t-1==0&&r.push(e)})}e.length>0&&l.push(e)}return o.forEach(e=>{l.flat().includes(e)||(0===l.length?l.push([e]):l[l.length-1].push(e))}),l.forEach((e,a)=>{const n=100+150*a,o=150*(e.length-1),l=(t-o)/2;e.forEach((e,t)=>{const a=l+150*t,o=n;i.set(e,{x:a,y:o})})}),i})(t,a);if(t.length&&e.length){t.forEach(t=>{const i=t.serviceName;if(n.find(e=>e.id===`${B.Source}-${i}-${Bt.MapItem}`))return;const a=e.find(e=>i===e.otelServiceName||i===e.name);o.set(i,t),t.services.forEach(e=>o.set(e.serviceName,{serviceName:e.serviceName,services:[]})),n.push({id:`${B.Source}-${i}-${Bt.MapItem}`,type:Bt.MapItem,position:l.get(i),data:tl(t,a,il(a))})}),o.forEach((t,i)=>{if(n.find(e=>e.id===`${B.Source}-${i}-${Bt.MapItem}`))return;const a=e.find(e=>i===e.otelServiceName||i===e.name);n.push({id:`${B.Source}-${i}-${Bt.MapItem}`,type:Bt.MapItem,position:l.get(i),data:tl(t,a,il(a))})});let i=50;e.forEach(e=>{const t=e.otelServiceName||e.name;n.find(e=>e.id===`${B.Source}-${t}-${Bt.MapItem}`)||(n.push({id:`${B.Source}-${t}-${Bt.MapItem}`,type:Bt.MapItem,position:{x:i,y:10},data:tl(void 0,e,il(e))}),i+=110)})}else n.push({id:`${B.Source}-${Bt.NoData}`,type:Bt.NoData,position:{x:a/2-150,y:i/4},data:{subTitle:m.ARE_SERVICES_INSTRUMENTED_AND_PRODUCING_TRAFFIC}});return n})({serviceMap:a,sources:[nl].concat(o),sourcesLoading:l,containerHeight:s,containerWidth:c});d.length>1?(e=t,u(t=>{const i=e.map(e=>{const i=t.find(t=>t.id===e.id);return e.position=i?.position||e.position,{id:e.id,item:e,type:i?"replace":"add"}});return t.find(e=>e.id===`${B.Source}-${Bt.NoData}`)&&i.push({id:`${B.Source}-${Bt.NoData}`,type:"remove"}),Yi(i,t)})):u(t)}var e},[a,o,l,s,c]),i(()=>{g((({theme:e,nodes:t,serviceMap:i})=>{const a=[];return t.forEach(({id:t,data:{id:n,status:o}})=>{const{services:l}=i.find(e=>e.serviceName===n)||{services:[]};l.forEach(i=>{const n=t,l=`${B.Source}-${i.serviceName}-${Bt.MapItem}`,r=o===W.Error;a.push({id:`${n}-to-${l}`,source:n,target:l,markerEnd:{type:Ji.ArrowClosed},style:{stroke:r?e?.colors.dark_red:e?.colors.border}})})}),a})({theme:n,nodes:d,serviceMap:a}))},[n,d,a]),e.createElement(al,{ref:r,$heightToRemove:t},e.createElement(Wt,{nodes:d,edges:h,onNodesChange:p,onEdgesChange:y,zoomOnScroll:!0}))},ll=d.div`
411
411
  display: flex;
412
412
  flex-direction: column;
413
413
  align-items: center;
@@ -467,7 +467,7 @@ import e,{useState as t,useEffect as i,forwardRef as a,useRef as n,useImperative
467
467
  flex-direction: column;
468
468
  gap: 24px;
469
469
  padding: 4px;
470
- `,Sl=({formData:t,handleFormChange:i})=>e.createElement(Cl,null,e.createElement($,{name:"sourceName",title:"Source name",tooltip:"This overrides the default service name that runs in your cluster.",placeholder:"Use a name that overrides the source name",value:t.otelServiceName,onChange:({target:{value:e}})=>i("otelServiceName",e)})),wl=({workloadOdigosHealthStatus:t})=>{if(!t)return null;const i=Ut(t.status),a=nt(t.reasonEnum),n=t.message;return e.createElement(ue,{$alignItems:"center",$justifyContent:"center"},e.createElement(de,{status:i,title:a,subtitle:n,withBackground:i!==he.Disabled,withBorder:!0,withIcon:!0,width:"calc(100% - 24px)"}))},Tl=({source:a,fetchSourceDescribe:n,restartPod:o})=>{const[l,r]=t(!1),[s,d]=t(null);return i(()=>{a&&n({namespace:a.namespace,name:a.name,kind:a.kind}).then(({data:e})=>{e?.describeSource?d(e.describeSource):r(!0)})},[a.namespace,a.name,a.kind]),s||l?e.createElement(ee,{$gap:12},l?e.createElement(De,{$height:"70vh"},e.createElement(Ne,{subTitle:"Could not fetch describe for this source"})):s?.pods?.length?s.pods.map(({podName:t,nodeName:i,phase:n,agentInjected:l,runningLatestWorkloadRevision:r,containers:d,manifestYAML:u})=>{const p=n.status!==W.Success||Yt(d)?W.Error:W.Success,m=[];return m.push(e.createElement(Gt,{key:"copy-text",value:`kubectl get pod ${t.value} -n ${s?.namespace?.value||a.namespace}`.toLowerCase()})),m.push(e.createElement(se,{key:"divider-1",length:"100%",margin:"0"})),m.push(e.createElement(Xt,{key:"describe-row-1",title:i.name,tooltip:i.explain||"",value:{status:i.status||void 0,text:i.value}})),m.push(e.createElement(se,{key:"divider-2",length:"100%",margin:"0"})),m.push(e.createElement(Xt,{key:"describe-row-2",title:n.name,tooltip:n.explain||"",value:{status:n.status||void 0,text:n.value}})),m.push(e.createElement(se,{key:"divider-3",length:"100%",margin:"0"})),m.push(e.createElement(Xt,{key:"describe-row-3",title:l.name,tooltip:l.explain||"",value:{status:l.status||void 0,text:l.value}})),m.push(e.createElement(se,{key:"divider-4",length:"100%",margin:"0"})),r?.name&&(m.push(e.createElement(Xt,{key:"describe-row-4",title:r.name,tooltip:r.explain||void 0,value:{status:r.status||void 0,text:r.value}})),m.push(e.createElement(se,{key:"divider-5",length:"100%",margin:"0"}))),d.forEach(t=>{m.push(e.createElement(Zt,{key:`pod-container-${t.containerName.value}`,...t}))}),u&&(m.push(e.createElement(se,{key:"divider-6",length:"100%",margin:"0"})),m.push(e.createElement(Xi,{key:"yaml-section-card",yaml:u}))),e.createElement(Z,{key:`pod-${t.value}`,title:`Pod: ${t.value}`,withExtend:!0,action:({hovered:i})=>e.createElement("div",{style:{position:"relative"}},e.createElement(de,{key:"status",status:p,title:p,withIcon:!0,withBorder:!0}),i&&e.createElement(Qt,{key:"hover-actions",isOpen:!0,positionRight:"calc(100% + 12px)",actions:[{id:ei(),label:"Restart",rightIcon:zi,onClick:()=>o(s?.namespace?.value||a.namespace,t.value)}]}))},c.toArray(m))}):e.createElement(De,{$height:"70vh"},e.createElement(Ne,{subTitle:"Check if you have any running pods and try again"}))):e.createElement(De,{$height:"70vh"},e.createElement(Pe,null))},Dl=d(ue)`
470
+ `,Sl=({formData:t,handleFormChange:i})=>e.createElement(Cl,null,e.createElement($,{name:"sourceName",title:"Source name",tooltip:"This overrides the default service name that runs in your cluster.",placeholder:"Use a name that overrides the source name",value:t.otelServiceName,onChange:({target:{value:e}})=>i("otelServiceName",e)})),wl=({workloadOdigosHealthStatus:t})=>{if(!t)return null;const i=Ut(t.status),a=nt(t.reasonEnum),n=t.message;return e.createElement(ue,{$alignItems:"center",$justifyContent:"center"},e.createElement(de,{status:i,title:a,subtitle:n,withBackground:i!==he.Disabled,withBorder:!0,withIcon:!0,width:"calc(100% - 24px)"}))},Tl=({source:a,fetchSourceDescribe:n,restartPod:o})=>{const[l,r]=t(!1),[s,d]=t(null);return i(()=>{a&&n({namespace:a.namespace,name:a.name,kind:a.kind}).then(({data:e})=>{e?.describeSource?d(e.describeSource):r(!0)})},[a.namespace,a.name,a.kind]),s||l?e.createElement(ee,{$gap:12},l?e.createElement(De,{$height:"70vh"},e.createElement(Ne,{subTitle:"Could not fetch describe for this source"})):s?.pods?.length?s.pods.map(({podName:t,nodeName:i,phase:n,agentInjected:l,runningLatestWorkloadRevision:r,containers:d,manifestYAML:u})=>{const p=n.status!==W.Success||Gt(d)?W.Error:W.Success,m=[];return m.push(e.createElement(Yt,{key:"copy-text",value:`kubectl get pod ${t.value} -n ${s?.namespace?.value||a.namespace}`.toLowerCase()})),m.push(e.createElement(se,{key:"divider-1",length:"100%",margin:"0"})),m.push(e.createElement(Xt,{key:"describe-row-1",title:i.name,tooltip:i.explain||"",value:{status:i.status||void 0,text:i.value}})),m.push(e.createElement(se,{key:"divider-2",length:"100%",margin:"0"})),m.push(e.createElement(Xt,{key:"describe-row-2",title:n.name,tooltip:n.explain||"",value:{status:n.status||void 0,text:n.value}})),m.push(e.createElement(se,{key:"divider-3",length:"100%",margin:"0"})),m.push(e.createElement(Xt,{key:"describe-row-3",title:l.name,tooltip:l.explain||"",value:{status:l.status||void 0,text:l.value}})),m.push(e.createElement(se,{key:"divider-4",length:"100%",margin:"0"})),r?.name&&(m.push(e.createElement(Xt,{key:"describe-row-4",title:r.name,tooltip:r.explain||void 0,value:{status:r.status||void 0,text:r.value}})),m.push(e.createElement(se,{key:"divider-5",length:"100%",margin:"0"}))),d.forEach(t=>{m.push(e.createElement(Zt,{key:`pod-container-${t.containerName.value}`,...t}))}),u&&(m.push(e.createElement(se,{key:"divider-6",length:"100%",margin:"0"})),m.push(e.createElement(Xi,{key:"yaml-section-card",yaml:u}))),e.createElement(Z,{key:`pod-${t.value}`,title:`Pod: ${t.value}`,withExtend:!0,action:({hovered:i})=>e.createElement("div",{style:{position:"relative"}},e.createElement(de,{key:"status",status:p,title:p,withIcon:!0,withBorder:!0}),i&&e.createElement(Qt,{key:"hover-actions",isOpen:!0,positionRight:"calc(100% + 12px)",actions:[{id:ei(),label:"Restart",rightIcon:zi,onClick:()=>o(s?.namespace?.value||a.namespace,t.value)}]}))},c.toArray(m))}):e.createElement(De,{$height:"70vh"},e.createElement(Ne,{subTitle:"Check if you have any running pods and try again"}))):e.createElement(De,{$height:"70vh"},e.createElement(Pe,null))},Dl=d(ue)`
471
471
  width: 100%;
472
472
  align-items: center;
473
473
  justify-content: space-between;
@@ -481,10 +481,10 @@ import e,{useState as t,useEffect as i,forwardRef as a,useRef as n,useImperative
481
481
  display: flex;
482
482
  flex-direction: column;
483
483
  gap: 12px;
484
- `,Ml=({persistSources:a,updateSource:o,restartWorkloads:r,fetchSourceById:s,fetchSourceDescribe:c,fetchSourceLibraries:d,restartPod:u})=>{const{isVm:p}=We(),{sources:h}=_(),{selectedStreamName:g}=_e(),{drawerType:y,drawerEntityId:v}=K(),b=l(()=>Ye(h,g),[h,g]),f=n(null),x=y===B.Source,[$,k]=t(!1),[C,S]=t(!1),[w,T]=t(El.Overview),[D,N]=t(null);i(()=>{x&&v&&s(v).then(e=>N(e||null))},[x,v]);const{formData:O,handleFormChange:F,resetFormData:I,loadFormWithDrawerItem:A}=ai(),M=l(()=>{if(v)return D&&JSON.stringify(qt(D))===JSON.stringify(qt(v))?D:b?.find(e=>JSON.stringify(qt(e))===JSON.stringify(qt(v)))},[v,b,D]);i(()=>{x&&M?A(M):I()},[x,M]);const R=l(()=>{const e=M?.conditions?.find(({type:e})=>"RuntimeDetection"===e);return{description:e?.message,isLoading:e?.status===he.Loading,containers:M?.containers||[]}},[M]),L=l(()=>{const e=[{label:El.Overview,onClick:()=>T(El.Overview),selected:w===El.Overview}];return Ol.includes(M?.kind)&&e.push({label:El.Pods,onClick:()=>T(El.Pods),selected:w===El.Pods}),M?.containers?.some(({language:e})=>Fl.includes(e))&&e.push({label:El.Libraries,onClick:()=>T(El.Libraries),selected:w===El.Libraries}),e},[w,M]);return M?e.createElement(xa,{ref:f,onClose:()=>{T(El.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:He(M.containers),isEdit:$,isFormDirty:C,onEdit:w===El.Overview?e=>{k("boolean"!=typeof e||e)}:void 0,onSave:async()=>{const e=O.otelServiceName!==M.name?O.otelServiceName:"";F("otelServiceName",e),await o(v,{...O,otelServiceName:e}),N(null),S(!1),k(!1)},onDelete:w===El.Overview?async()=>{const{namespace:e}=M;a({[e]:[{...M,selected:!1,currentStreamName:g}]},{}),N(null),S(!1),k(!1),f.current?.closeDrawer()}:void 0,onCancel:()=>{S(!1),k(!1),F("otelServiceName",M.otelServiceName||M.name||"")},isLastItem:1===b.length,tabs:L,headerActionButtons:[{"data-id":"rollout-restart",variant:"tertiary",onClick:()=>r([v]),children:e.createElement(e.Fragment,null,e.createElement(Ii,null),e.createElement(E,{size:14,family:"secondary",decoration:"underline"},"Restart"))}]},w===El.Overview?$?e.createElement(Il,null,e.createElement(Sl,{formData:O,handleFormChange:(...e)=>{S(!0),F(...e),F("currentStreamName",g)}})):e.createElement(Al,null,e.createElement(wl,{workloadOdigosHealthStatus:M.workloadOdigosHealthStatus}),e.createElement(X,{conditions:M.conditions||[]}),e.createElement(Z,{title:m.SOURCE_DETAILS,data:M?kl(M,p):[]}),e.createElement(Z,{title:p?m.DETECTED_PROCESSES:m.DETECTED_CONTAINERS,titleBadge:R.isLoading?he.Loading:R.containers.length,description:R.description||(p?m.DETECTED_PROCESSES_DESCRIPTION:m.DETECTED_CONTAINERS_DESCRIPTION)},R.containers.map(t=>e.createElement(ni,{key:`source-container-${t.containerName}`,...t,callbackRuntimeOverride:async e=>await o(v,e)}))),e.createElement(Xi,{yaml:M.manifestYAML})):w===El.Pods?e.createElement(Tl,{source:M,fetchSourceDescribe:c,restartPod:u}):e.createElement(Nl,{source:M,fetchSourceLibraries:d})):null},Rl=d.div`
484
+ `,Ml=({persistSources:a,updateSource:o,restartWorkloads:r,fetchSourceById:s,fetchSourceDescribe:c,fetchSourceLibraries:d,restartPod:u})=>{const{isVm:p}=We(),{sources:h}=_(),{selectedStreamName:g}=_e(),{drawerType:y,drawerEntityId:v}=K(),b=l(()=>Ge(h,g),[h,g]),f=n(null),x=y===B.Source,[$,k]=t(!1),[C,S]=t(!1),[w,T]=t(El.Overview),[D,N]=t(null);i(()=>{x&&v&&s(v).then(e=>N(e||null))},[x,v]);const{formData:O,handleFormChange:F,resetFormData:I,loadFormWithDrawerItem:A}=ai(),M=l(()=>{if(v)return D&&JSON.stringify(qt(D))===JSON.stringify(qt(v))?D:b?.find(e=>JSON.stringify(qt(e))===JSON.stringify(qt(v)))},[v,b,D]);i(()=>{x&&M?A(M):I()},[x,M]);const R=l(()=>{const e=M?.conditions?.find(({type:e})=>"RuntimeDetection"===e);return{description:e?.message,isLoading:e?.status===he.Loading,containers:M?.containers||[]}},[M]),L=l(()=>{const e=[{label:El.Overview,onClick:()=>T(El.Overview),selected:w===El.Overview}];return Ol.includes(M?.kind)&&e.push({label:El.Pods,onClick:()=>T(El.Pods),selected:w===El.Pods}),M?.containers?.some(({language:e})=>Fl.includes(e))&&e.push({label:El.Libraries,onClick:()=>T(El.Libraries),selected:w===El.Libraries}),e},[w,M]);return M?e.createElement(xa,{ref:f,onClose:()=>{T(El.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:He(M.containers),isEdit:$,isFormDirty:C,onEdit:w===El.Overview?e=>{k("boolean"!=typeof e||e)}:void 0,onSave:async()=>{const e=O.otelServiceName!==M.name?O.otelServiceName:"";F("otelServiceName",e),await o(v,{...O,otelServiceName:e}),N(null),S(!1),k(!1)},onDelete:w===El.Overview?async()=>{const{namespace:e}=M;a({[e]:[{...M,selected:!1,currentStreamName:g}]},{}),N(null),S(!1),k(!1),f.current?.closeDrawer()}:void 0,onCancel:()=>{S(!1),k(!1),F("otelServiceName",M.otelServiceName||M.name||"")},isLastItem:1===b.length,tabs:L,headerActionButtons:[{"data-id":"rollout-restart",variant:"tertiary",onClick:()=>r([v]),children:e.createElement(e.Fragment,null,e.createElement(Ii,null),e.createElement(E,{size:14,family:"secondary",decoration:"underline"},"Restart"))}]},w===El.Overview?$?e.createElement(Il,null,e.createElement(Sl,{formData:O,handleFormChange:(...e)=>{S(!0),F(...e),F("currentStreamName",g)}})):e.createElement(Al,null,e.createElement(wl,{workloadOdigosHealthStatus:M.workloadOdigosHealthStatus}),e.createElement(X,{conditions:M.conditions||[]}),e.createElement(Z,{title:m.SOURCE_DETAILS,data:M?kl(M,p):[]}),e.createElement(Z,{title:p?m.DETECTED_PROCESSES:m.DETECTED_CONTAINERS,titleBadge:R.isLoading?he.Loading:R.containers.length,description:R.description||(p?m.DETECTED_PROCESSES_DESCRIPTION:m.DETECTED_CONTAINERS_DESCRIPTION)},R.containers.map(t=>e.createElement(ni,{key:`source-container-${t.containerName}`,...t,callbackRuntimeOverride:async e=>await o(v,e)}))),e.createElement(Xi,{yaml:M.manifestYAML})):w===El.Pods?e.createElement(Tl,{source:M,fetchSourceDescribe:c,restartPod:u}):e.createElement(Nl,{source:M,fetchSourceLibraries:d})):null},Rl=d.div`
485
485
  max-width: ${({$fullWidth:e})=>e?"unset":"420px"};
486
486
  width: 100%;
487
- `,Ll=a(({isModal:t,fetchSingleNamespace:i,onClickSummary:a},n)=>{const l=O.useTheme(),{isVm:r}=We(),s=ri({fetchSingleNamespace:i}),{selectedSources:c,fetchingNamespace:d,selectedAllNamespaces:u,onSelectAllNamespaces:p,getApiSourcesPayload:h,getApiFutureAppsPayload:g,searchText:y,setSearchText:v,searchBy:b,setSearchBy:f,showSelectedOnly:x,setShowSelectedOnly:k,showRunningOnly:C,setShowRunningOnly:S}=s;o(n,()=>({getFormValues:()=>({apps:h(),futureApps:g()})}));const T=Object.values(c).reduce((e,t)=>e+t.filter(e=>e.selected).length,0);return e.createElement(ne,{$isNotModal:!t},e.createElement(ee,{$gap:12},e.createElement(ee,{$gap:24},a&&e.createElement(yt,{onClick:a}),e.createElement(I,{title:m.SELECT_SOURCES,badgeLabel:T,description:m.SELECT_SOURCES_DESCRIPTION}),e.createElement(ue,{$justifyContent:"space-between"},e.createElement(Rl,{$fullWidth:r},e.createElement($,{placeholder:b===B.Source?m.SEARCH_SOURCES:m.SEARCH_NAMESPACES,icon:Ti,value:y,onChange:e=>v(e.target.value.toLowerCase())})),!r&&e.createElement(F,{options:[{label:m.SOURCE,value:B.Source,selectedBgColor:l.text.secondary,selectedTextColor:l.text.primary},{label:m.NAMESPACE,value:B.Namespace,selectedBgColor:l.text.secondary,selectedTextColor:l.text.primary}],selected:b,setSelected:f})),e.createElement(ue,{$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:k}),e.createElement(w,{title:m.ONLY_RUNNING_INSTANCES,initialValue:C,onChange:S}))),e.createElement(se,null),e.createElement(gl,{isModal:t,...s})))});Ll.displayName=Ll.name;const Pl=({fetchSingleNamespace:t,persistSources:i})=>{const{currentModal:a,setCurrentModal:o}=te(),l=a===B.Source,r=()=>{o("")},s=async()=>{if(c.current){const{apps:e,futureApps:t}=c.current.getFormValues();i(e,t),r()}},c=n(null);return j({key:"Enter",active:l},s),l?e.createElement(ie,{isOpen:l,onClose:r,header:{title:"Add Source"},actionComponent:e.createElement(ae,{buttons:[{label:"DONE",variant:"primary",onClick:s}]})},e.createElement(Ll,{ref:c,isModal:!0,fetchSingleNamespace:t})):null},Kl=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},jl=({metrics:t,maxHeight:i,maxWidth:a})=>{const n=O.useTheme(),{isVm:o}=We(),r=ye(),{isThisPending:c}=L(),{selectedStreamName:d}=_e(),{sources:u,sourcesLoading:p}=_(),{setDrawerType:h,setDrawerEntityId:g}=K(),{selectedSources:y,setSelectedSources:v}=Me(),{isAwaitingInstrumentation:f,sourcesToCreate:x,sourcesCreated:$,sourcesToDelete:k,sourcesDeleted:C}=Re(),S=l(()=>{const e=(e,t)=>e>0&&Math.floor(100/e*t)||1;return x?e(x,$):k?e(k,C):1},[x,$,k,C]),w=l(()=>Ye(u,d),[u,d]),T=l(()=>Oa({instrumentationRules:[],sources:Ue(w,r),actions:[],destinations:[],searchText:r.searchText,selectedCategory:B.Source}).searchResults.find(({category:e})=>e===B.Source)?.entities||[],[w,r]),[D,N]=l(()=>{let e=0;return Object.values(y).forEach(t=>{e+=t.length}),[0!==e,e]},[y]),F=s(e=>{if(e){const e={};T.forEach(t=>{const i={namespace:t.namespace,name:t.name,kind:t.kind};c({entityType:B.Source,entityId:i})||(e[t.namespace]?e[t.namespace].push(t):e[t.namespace]=[t])}),v(e)}else v({})},[T]),I=s(e=>{const{namespace:t,name:i,kind:a}=e,n={...y};n[t]||(n[t]=[]);const o=n[t].findIndex(e=>e.name===i&&e.kind===a);-1===o?n[t].push(e):n[t].splice(o,1),v(n)},[y]),A=l(()=>T.map(i=>{const a=qt(i),o=JSON.stringify(a),{hasErrors:l,hasWarnings:r,hasDisableds:s}=ce(i.conditions||[]),d=c({entityType:B.Source,entityId:a}),u=!!y[a.namespace]?.find(e=>e.namespace===a.namespace&&e.name===a.name&&e.kind===a.kind);return{status:l?W.Error:r?W.Warning:void 0,faded:s,onClick:()=>{h(B.Source),g(a)},cells:[{columnKey:"checkbox-and-icon",component:()=>e.createElement(ue,{$gap:16},e.createElement(b,{disabled:d,value:u,onChange:()=>I(i)}),e.createElement(si,{icons:He(i.containers),id:o}))},{columnKey:"name",value:fe(i,B.Source,{extended:!0})},{columnKey:"kind",value:i.kind,textColor:n.text.info},{columnKey:"namespace",value:i.namespace,textColor:n.text.info},{columnKey:"throughput",value:je(Et(t,B.Source,a).throughput),textColor:n.text.info},{columnKey:"conditions",component:()=>e.createElement(Na,{conditions:i.conditions||[],id:o})},{columnKey:"containers",component:()=>e.createElement("div",{style:{lineHeight:1}},e.createElement(de,{status:W.Info,title:ci(i.containers),withBorder:!0}))}]}}),[T,y,t,I]),{badge:M,badgeTooltip:R}=l(()=>T.length!==w.length?{badge:`${T.length}/${w.length}`,badgeTooltip:m.FILTERED_COUNT_TOOLTIP}:{badge:w.length,badgeTooltip:void 0},[T,w]);return e.createElement($e,{$maxWidth:a},e.createElement(ke,null,e.createElement(b,{partiallyChecked:D&&T?.length!==N,value:D&&T?.length===N,onChange:F,disabled:!T?.length}),e.createElement(Ce,{icon:Se(B.Source),title:m.SOURCES,badge:M,badgeTooltip:R,loading:p||f})),e.createElement(we,{$maxHeight:i},e.createElement(Te,{columns:Kl(o),rows:A})),f&&!A.length?e.createElement(De,{style:{marginTop:"2rem",gap:"24px"}},e.createElement(Ee,{width:420}),e.createElement(ue,{$gap:16},e.createElement(E,{color:n.text.info},x?"Instrumenting":"Uninstrumenting"," workloads..."),e.createElement(Oe,{label:`${S}%`}))):A.length?null:e.createElement(De,{style:{marginTop:"2rem"}},e.createElement(Ne,null)))},Vl=({expiresAt:t})=>{const i=O.useTheme(),{formatTimeAgo:a}=zt(),n=a(t),o=new Date(t).toDateString().split(" ").slice(1).join(" "),l=di(t,0)?i.text.error:di(t,6048e5)?i.text.warning:i.text.success;return e.createElement(E,{size:14,color:l},n," (",o,")")},ql=d.div`
487
+ `,Ll=a(({isModal:t,fetchSingleNamespace:i,onClickSummary:a},n)=>{const l=O.useTheme(),{isVm:r}=We(),s=ri({fetchSingleNamespace:i}),{selectedSources:c,fetchingNamespace:d,selectedAllNamespaces:u,onSelectAllNamespaces:p,getApiSourcesPayload:h,getApiFutureAppsPayload:g,searchText:y,setSearchText:v,searchBy:b,setSearchBy:f,showSelectedOnly:x,setShowSelectedOnly:k,showRunningOnly:C,setShowRunningOnly:S}=s;o(n,()=>({getFormValues:()=>({apps:h(),futureApps:g()})}));const T=Object.values(c).reduce((e,t)=>e+t.filter(e=>e.selected).length,0);return e.createElement(ne,{$isNotModal:!t},e.createElement(ee,{$gap:12},e.createElement(ee,{$gap:24},a&&e.createElement(yt,{onClick:a}),e.createElement(I,{title:m.SELECT_SOURCES,badgeLabel:T,description:m.SELECT_SOURCES_DESCRIPTION}),e.createElement(ue,{$justifyContent:"space-between"},e.createElement(Rl,{$fullWidth:r},e.createElement($,{placeholder:b===B.Source?m.SEARCH_SOURCES:m.SEARCH_NAMESPACES,icon:Ti,value:y,onChange:e=>v(e.target.value.toLowerCase())})),!r&&e.createElement(F,{options:[{label:m.SOURCE,value:B.Source,selectedBgColor:l.text.secondary,selectedTextColor:l.text.primary},{label:m.NAMESPACE,value:B.Namespace,selectedBgColor:l.text.secondary,selectedTextColor:l.text.primary}],selected:b,setSelected:f})),e.createElement(ue,{$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:k}),e.createElement(w,{title:m.ONLY_RUNNING_INSTANCES,initialValue:C,onChange:S}))),e.createElement(se,null),e.createElement(gl,{isModal:t,...s})))});Ll.displayName=Ll.name;const Pl=({fetchSingleNamespace:t,persistSources:i})=>{const{currentModal:a,setCurrentModal:o}=te(),l=a===B.Source,r=()=>{o("")},s=async()=>{if(c.current){const{apps:e,futureApps:t}=c.current.getFormValues();i(e,t),r()}},c=n(null);return j({key:"Enter",active:l},s),l?e.createElement(ie,{isOpen:l,onClose:r,header:{title:"Add Source"},actionComponent:e.createElement(ae,{buttons:[{label:"DONE",variant:"primary",onClick:s}]})},e.createElement(Ll,{ref:c,isModal:!0,fetchSingleNamespace:t})):null},Kl=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},jl=({metrics:t,maxHeight:i,maxWidth:a})=>{const n=O.useTheme(),{isVm:o}=We(),r=ye(),{isThisPending:c}=L(),{selectedStreamName:d}=_e(),{sources:u,sourcesLoading:p}=_(),{setDrawerType:h,setDrawerEntityId:g}=K(),{selectedSources:y,setSelectedSources:v}=Me(),{isAwaitingInstrumentation:f,sourcesToCreate:x,sourcesCreated:$,sourcesToDelete:k,sourcesDeleted:C}=Re(),S=l(()=>{const e=(e,t)=>e>0&&Math.floor(100/e*t)||1;return x?e(x,$):k?e(k,C):1},[x,$,k,C]),w=l(()=>Ge(u,d),[u,d]),T=l(()=>Oa({instrumentationRules:[],sources:Ue(w,r),actions:[],destinations:[],searchText:r.searchText,selectedCategory:B.Source}).searchResults.find(({category:e})=>e===B.Source)?.entities||[],[w,r]),[D,N]=l(()=>{let e=0;return Object.values(y).forEach(t=>{e+=t.length}),[0!==e,e]},[y]),F=s(e=>{if(e){const e={};T.forEach(t=>{const i={namespace:t.namespace,name:t.name,kind:t.kind};c({entityType:B.Source,entityId:i})||(e[t.namespace]?e[t.namespace].push(t):e[t.namespace]=[t])}),v(e)}else v({})},[T]),I=s(e=>{const{namespace:t,name:i,kind:a}=e,n={...y};n[t]||(n[t]=[]);const o=n[t].findIndex(e=>e.name===i&&e.kind===a);-1===o?n[t].push(e):n[t].splice(o,1),v(n)},[y]),A=l(()=>T.map(i=>{const a=qt(i),o=JSON.stringify(a),{hasErrors:l,hasWarnings:r,hasDisableds:s}=ce(i.conditions||[]),d=c({entityType:B.Source,entityId:a}),u=!!y[a.namespace]?.find(e=>e.namespace===a.namespace&&e.name===a.name&&e.kind===a.kind);return{status:l?W.Error:r?W.Warning:void 0,faded:s,onClick:()=>{h(B.Source),g(a)},cells:[{columnKey:"checkbox-and-icon",component:()=>e.createElement(ue,{$gap:16},e.createElement(b,{disabled:d,value:u,onChange:()=>I(i)}),e.createElement(si,{icons:He(i.containers),id:o}))},{columnKey:"name",value:fe(i,B.Source,{extended:!0})},{columnKey:"kind",value:i.kind,textColor:n.text.info},{columnKey:"namespace",value:i.namespace,textColor:n.text.info},{columnKey:"throughput",value:je(Et(t,B.Source,a).throughput),textColor:n.text.info},{columnKey:"conditions",component:()=>e.createElement(Na,{conditions:i.conditions||[],id:o})},{columnKey:"containers",component:()=>e.createElement("div",{style:{lineHeight:1}},e.createElement(de,{status:W.Info,title:ci(i.containers),withBorder:!0}))}]}}),[T,y,t,I]),{badge:M,badgeTooltip:R}=l(()=>T.length!==w.length?{badge:`${T.length}/${w.length}`,badgeTooltip:m.FILTERED_COUNT_TOOLTIP}:{badge:w.length,badgeTooltip:void 0},[T,w]);return e.createElement($e,{$maxWidth:a},e.createElement(ke,null,e.createElement(b,{partiallyChecked:D&&T?.length!==N,value:D&&T?.length===N,onChange:F,disabled:!T?.length}),e.createElement(Ce,{icon:Se(B.Source),title:m.SOURCES,badge:M,badgeTooltip:R,loading:p||f})),e.createElement(we,{$maxHeight:i},e.createElement(Te,{columns:Kl(o),rows:A})),f&&!A.length?e.createElement(De,{style:{marginTop:"2rem",gap:"24px"}},e.createElement(Ee,{width:420}),e.createElement(ue,{$gap:16},e.createElement(E,{color:n.text.info},x?"Instrumenting":"Uninstrumenting"," workloads..."),e.createElement(Oe,{label:`${S}%`}))):A.length?null:e.createElement(De,{style:{marginTop:"2rem"}},e.createElement(Ne,null)))},Vl=({expiresAt:t})=>{const i=O.useTheme(),{formatTimeAgo:a}=zt(),n=a(t),o=new Date(t).toDateString().split(" ").slice(1).join(" "),l=di(t,0)?i.text.error:di(t,6048e5)?i.text.warning:i.text.success;return e.createElement(E,{size:14,color:l},n," (",o,")")},ql=d.div`
488
488
  position: relative;
489
489
  `,zl=({token:i,saveToken:a})=>{const{CopyButton:n}=ui(),{formData:o,handleFormChange:l,resetFormData:r}=pi({token:i}),[s,c]=t(!1),d=()=>{c(!1),r()};return e.createElement(ue,{$gap:0},e.createElement(n,{value:i,size:mi.L}),e.createElement(se,{orientation:"vertical",length:"12px"}),e.createElement(ql,null,e.createElement(mt,{size:32,onClick:()=>{c(!0)}},e.createElement(ki,null)),s&&e.createElement(hi,{flipX:!0,clientX:36,isOpen:s,onClose:d,onSave:()=>{a(o.token).then(d)},title:"Enter a new API Token",titleTooltip:"Contact us to generate a new one"},e.createElement($,{placeholder:"API Token",type:"password",value:o.token,onChange:e=>l("token",e.target.value)}))))},Hl=({tokens:t,saveToken:i})=>e.createElement(Z,{title:"Authorization Tokens",titleBadge:t.length,data:[{type:h.Table,value:{columns:[{key:"icon",title:""},{key:"name",title:"Name"},{key:"expires_at",title:"Expires"},{key:"token",title:"Token"},{key:"actions",title:""}],rows:t.map(({name:t,token:a,expiresAt:n})=>({cells:[{columnKey:"icon",icon:Hi},{columnKey:"name",value:t},{columnKey:"token",value:`${new Array(15).fill("•").join("")}`},{columnKey:"expires_at",component:()=>e.createElement(Vl,{expiresAt:n})},{columnKey:"actions",component:()=>e.createElement(zl,{token:a,saveToken:i})}]}))}}]}),Bl=({fetchDescribeOdigos:a})=>{const[n,o]=t(null);if(i(()=>{a().then(({data:e})=>o(e?.describeOdigos||null))},[]),!n)return e.createElement(De,null,e.createElement(Pe,null));const l=t=>t?.name?[e.createElement(se,{key:`divider-${t.name}`}),e.createElement(Xt,{key:`describe-row-${t.name}`,title:t.name,subTitle:t.explain||void 0,value:{status:t.status||(ti(t.value)?ii(t.value)?W.Success:W.Error:W.Default),text:t.value}})]:[];return e.createElement(e.Fragment,null,e.createElement(Z,{title:"General Information",withExtend:!0,initialExtended:!0,data:[{title:n?.odigosVersion?.name,value:n?.odigosVersion?.value},{title:n?.kubernetesVersion?.name,value:n?.kubernetesVersion?.value},{title:n?.installationMethod?.name,value:n?.installationMethod?.value},{title:n?.tier?.name,value:n?.tier?.value},{title:"# of sources",value:n?.numberOfSources?.toString()},{title:"# of destinations",value:n?.numberOfDestinations?.toString()}]}),e.createElement(Z,{title:"Cluster Collector",withExtend:!0},Object.values(n?.clusterCollector||{}).map(l)),e.createElement(Z,{title:"Node Collector",withExtend:!0},Object.values(n?.nodeCollector||{}).map(l)))},Wl=d.div`
490
490
  display: flex;
@@ -499,7 +499,7 @@ import e,{useState as t,useEffect as i,forwardRef as a,useRef as n,useImperative
499
499
  flex-direction: column-reverse;
500
500
  gap: 6px;
501
501
  max-width: 600px;
502
- `,Yl=()=>{const{notifications:t,markAsDismissed:i,markAsSeen:a}=P(),{onClickNotification:n}=Ht();return e.createElement(Ul,null,t.filter(({dismissed:e})=>!e).map(({id:t,type:o,title:l,message:r,crdType:s,target:c})=>e.createElement(oe,{key:`toast-${t}`,id:t,type:o,title:l,message:r,action:s&&c?{label:"go to details",onClick:()=>n({id:t,crdType:s,target:c},{dismissToast:!0})}:void 0,onClose:()=>(({id:e,asSeen:t})=>{i(e),t&&a(e)})({id:t,asSeen:!0})})))},Gl=d.div`
502
+ `,Gl=()=>{const{notifications:t,markAsDismissed:i,markAsSeen:a}=P(),{onClickNotification:n}=Ht();return e.createElement(Ul,null,t.filter(({dismissed:e})=>!e).map(({id:t,type:o,title:l,message:r,crdType:s,target:c})=>e.createElement(oe,{key:`toast-${t}`,id:t,type:o,title:l,message:r,action:s&&c?{label:"go to details",onClick:()=>n({id:t,crdType:s,target:c},{dismissToast:!0})}:void 0,onClose:()=>(({id:e,asSeen:t})=>{i(e),t&&a(e)})({id:t,asSeen:!0})})))},Yl=d.div`
503
503
  position: relative;
504
504
  display: flex;
505
505
  align-items: center;
@@ -528,7 +528,7 @@ import e,{useState as t,useEffect as i,forwardRef as a,useRef as n,useImperative
528
528
  background-color: ${({theme:e})=>e.colors.border};
529
529
  border-radius: 100%;
530
530
  transition: all 0.3s;
531
- `,Zl=({path:t})=>e.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"none"},e.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:t})),Ql=()=>{const{darkMode:t,setDarkMode:i}=gi();return e.createElement(Gl,{onClick:()=>i(!t)},e.createElement(Zl,{path:"M14 7.977A4.333 4.333 0 1 1 8.023 2H8a6 6 0 1 0 6 6v-.023Z"}),e.createElement(Zl,{path:"M8 15.333v-.666m-5.185-1.482.471-.471M.666 8h.667m1.482-5.185.471.47M8 1.334V.667m4.714 2.619.471-.471M14.667 8h.666m-2.619 4.714.471.471M12 8a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z"}),e.createElement(Xl,{$darkMode:t}))},er=e=>{const{spans:t}=e,i=new Map;t.forEach(e=>{i.set(e.spanID,{...e,spans:[]})});const a=[];return t.forEach(e=>{const t=i.get(e.spanID);let n=!1;if(e.references.length){const t=e.references.find(e=>"CHILD_OF"===e.refType);t&&t.spanID&&i.has(t.spanID)||(n=!0)}else n=!0;if(n)a.push(t);else{const a=e.references.find(e=>"CHILD_OF"===e.refType);if(a){const e=i.get(a.spanID);e&&(e.spans=e.spans||[],e.spans.push(t),e.spans=e.spans.sort((e,t)=>e.startTime-t.startTime))}}}),a.sort((e,t)=>e.startTime-t.startTime)},tr=(e,t)=>{const{tags:i}=e,a={},n=[];return i.forEach(e=>{a[e.key]=e.value}),n.push({type:h.Code,value:{language:"json",code:JSON.stringify(a,null,2),pretty:t}}),n},ir=e=>{const{logs:t}=e,i=[];return t.forEach((e,a)=>{e.fields.forEach(e=>{i.push({title:e.key,value:e.value})}),a!==t.length-1&&i.push({type:h.Divider})}),i},ar=e=>{const{traceID:t,spanID:i,processID:a,operationName:n,duration:o,startTime:l,warnings:r}=e,s=[];return s.push({type:h.CopyText,title:"Trace ID",value:t}),s.push({type:h.CopyText,title:"Span ID",value:i}),s.push({type:h.Divider}),s.push({title:"Service",value:a}),s.push({title:"Operation",value:n}),s.push({title:"Duration",value:yi(o)}),s.push({title:"Start time",value:new Date(l/1e3).toLocaleString()}),r.length&&(s.push({type:h.Divider}),s.push({title:"Warnings",titleIcon:Wi,value:r})),s},nr=(e,t)=>{const{tags:i}=e,a={},n=[];return i.forEach(e=>{a[e.key]=e.value}),n.push({type:h.Code,value:{language:"json",code:JSON.stringify(a,null,2),pretty:t}}),n},or=d.div`
531
+ `,Zl=({path:t})=>e.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"none"},e.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:t})),Ql=()=>{const{darkMode:t,setDarkMode:i}=gi();return e.createElement(Yl,{onClick:()=>i(!t)},e.createElement(Zl,{path:"M14 7.977A4.333 4.333 0 1 1 8.023 2H8a6 6 0 1 0 6 6v-.023Z"}),e.createElement(Zl,{path:"M8 15.333v-.666m-5.185-1.482.471-.471M.666 8h.667m1.482-5.185.471.47M8 1.334V.667m4.714 2.619.471-.471M14.667 8h.666m-2.619 4.714.471.471M12 8a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z"}),e.createElement(Xl,{$darkMode:t}))},er=e=>{const{spans:t}=e,i=new Map;t.forEach(e=>{i.set(e.spanID,{...e,spans:[]})});const a=[];return t.forEach(e=>{const t=i.get(e.spanID);let n=!1;if(e.references.length){const t=e.references.find(e=>"CHILD_OF"===e.refType);t&&t.spanID&&i.has(t.spanID)||(n=!0)}else n=!0;if(n)a.push(t);else{const a=e.references.find(e=>"CHILD_OF"===e.refType);if(a){const e=i.get(a.spanID);e&&(e.spans=e.spans||[],e.spans.push(t),e.spans=e.spans.sort((e,t)=>e.startTime-t.startTime))}}}),a.sort((e,t)=>e.startTime-t.startTime)},tr=(e,t)=>{const{tags:i}=e,a={},n=[];return i.forEach(e=>{a[e.key]=e.value}),n.push({type:h.Code,value:{language:"json",code:JSON.stringify(a,null,2),pretty:t}}),n},ir=e=>{const{logs:t}=e,i=[];return t.forEach((e,a)=>{e.fields.forEach(e=>{i.push({title:e.key,value:e.value})}),a!==t.length-1&&i.push({type:h.Divider})}),i},ar=e=>{const{traceID:t,spanID:i,processID:a,operationName:n,duration:o,startTime:l,warnings:r}=e,s=[];return s.push({type:h.CopyText,title:"Trace ID",value:t}),s.push({type:h.CopyText,title:"Span ID",value:i}),s.push({type:h.Divider}),s.push({title:"Service",value:a}),s.push({title:"Operation",value:n}),s.push({title:"Duration",value:yi(o)}),s.push({title:"Start time",value:new Date(l/1e3).toLocaleString()}),r.length&&(s.push({type:h.Divider}),s.push({title:"Warnings",titleIcon:Wi,value:r})),s},nr=(e,t)=>{const{tags:i}=e,a={},n=[];return i.forEach(e=>{a[e.key]=e.value}),n.push({type:h.Code,value:{language:"json",code:JSON.stringify(a,null,2),pretty:t}}),n},or=d.div`
532
532
  display: flex;
533
533
  flex-direction: column;
534
534
  gap: 12px;
@@ -599,4 +599,4 @@ import e,{useState as t,useEffect as i,forwardRef as a,useRef as n,useImperative
599
599
  padding-top: 12px;
600
600
  padding-left: 12px;
601
601
  white-space: nowrap;
602
- `,$r=({heightToRemove:i,traces:a,isLoading:n})=>{const[o,r]=t([]),[s,c]=t(null),d=l(()=>Tt(a).sort((e,t)=>t.spans[0].startTime-e.spans[0].startTime).map(e=>({...e,spans:er(e)})),[a]),u=l(()=>d.reduce((e,t)=>Math.max(e,t.spans.reduce((e,t)=>e+t.duration,0)),0),[d]),p=l(()=>{const e=d.find(e=>e.spans.some(e=>e.spanID===s?.spanID)),t=e?.processes.find(e=>e.serviceName===s?.processID);return t},[d,s]);return e.createElement(e.Fragment,null,e.createElement(yr,{$heightToRemove:i},n?e.createElement(De,{$height:"50vh"},e.createElement(Pe,{scale:1.5})):d.length?e.createElement(vr,{$heightToRemove:i},e.createElement(br,null,e.createElement(E,null,"Service & operation")),new Array(5).fill(null).map((t,a)=>e.createElement(fr,{key:`${a}-divider`,$heightToRemove:i,index:a},e.createElement(xr,null,yi(u/5*a)))),d.map((t,i)=>{const{spans:a}=t,n=a.reduce((e,t)=>Math.min(e,t.startTime),Number.MAX_SAFE_INTEGER),l=a.reduce((e,t)=>Math.max(e,t.startTime+t.duration),0);return e.createElement(gr,{key:`recursive-spans-${t.traceID}`,spans:a,logs:[],depth:1,indexInMatrix:i,maxDuration:u,minStartTime:n,maxEndTime:l,openSpanIdsState:{value:o,set:r},selectedSpanState:{value:s,set:c}})})):e.createElement(De,{$height:"50vh"},e.createElement(Ne,{title:m.NO_TRACES_FOUND,subTitle:m.ARE_SERVICES_INSTRUMENTED_AND_PRODUCING_TRAFFIC}))),s&&e.createElement(lr,{span:s,process:p,onClose:()=>c(null)}))};export{Sa as ActionDrawer,fa as ActionForm,Ta as ActionModal,Ia as ActionTable,Pa as AwaitPipeline,on as ConditionDropdown,Qa as DataFlow,On as DataFlowActionsMenu,xn as DataStreamDrawer,bn as DataStreamForm,In as DataStreamModal,Fn as DataStreamSelectionForm,Wn as DestinationDrawer,zn as DestinationForm,uo as DestinationModal,yo as DestinationSelectionForm,bo as DestinationTable,ln as ErrorDropdown,Mo as InstrumentationRuleDrawer,Fo as InstrumentationRuleForm,Po as InstrumentationRuleModal,Vo as InstrumentationRuleTable,dn as KindDropdown,rn as LanguageDropdown,sn as MonitorDropdown,zo as MultiSourceControl,cn as NamespaceDropdown,fl as NavIconIds,Uo as NotificationManager,xa as OverviewDrawer,ol as ServiceMap,bl as SetupSummary,xl as SideNav,$l as SlackInvite,Ml as SourceDrawer,Sl as SourceForm,Pl as SourceModal,Ll as SourceSelectionForm,jl as SourceTable,Jl as SystemOverview,Na as TableCellConditions,Yl as ToastList,Ql as ToggleDarkMode,$r as TraceView};
602
+ `,$r=({heightToRemove:i,traces:a,isLoading:n})=>{const[o,r]=t([]),[s,c]=t(null),d=l(()=>Tt(a).sort((e,t)=>t.spans[0].startTime-e.spans[0].startTime).map(e=>({...e,spans:er(e)})),[a]),u=l(()=>d.reduce((e,t)=>Math.max(e,t.spans.reduce((e,t)=>e+t.duration,0)),0),[d]),p=l(()=>{const e=d.find(e=>e.spans.some(e=>e.spanID===s?.spanID)),t=e?.processes.find(e=>e.serviceName===s?.processID);return t},[d,s]);return e.createElement(e.Fragment,null,e.createElement(yr,{$heightToRemove:i},n?e.createElement(De,{$height:"50vh"},e.createElement(Pe,{scale:1.5})):d.length?e.createElement(vr,{$heightToRemove:i},e.createElement(br,null,e.createElement(E,null,"Service & operation")),new Array(5).fill(null).map((t,a)=>e.createElement(fr,{key:`${a}-divider`,$heightToRemove:i,index:a},e.createElement(xr,null,yi(u/5*a)))),d.map((t,i)=>{const{spans:a}=t,n=a.reduce((e,t)=>Math.min(e,t.startTime),Number.MAX_SAFE_INTEGER),l=a.reduce((e,t)=>Math.max(e,t.startTime+t.duration),0);return e.createElement(gr,{key:`recursive-spans-${t.traceID}`,spans:a,logs:[],depth:1,indexInMatrix:i,maxDuration:u,minStartTime:n,maxEndTime:l,openSpanIdsState:{value:o,set:r},selectedSpanState:{value:s,set:c}})})):e.createElement(De,{$height:"50vh"},e.createElement(Ne,{title:m.NO_TRACES_FOUND,subTitle:m.ARE_SERVICES_INSTRUMENTED_AND_PRODUCING_TRAFFIC}))),s&&e.createElement(lr,{span:s,process:p,onClose:()=>c(null)}))};export{Sa as ActionDrawer,fa as ActionForm,Ta as ActionModal,Ia as ActionTable,Pa as AwaitPipeline,on as ConditionDropdown,Qa as DataFlow,On as DataFlowActionsMenu,xn as DataStreamDrawer,bn as DataStreamForm,In as DataStreamModal,Fn as DataStreamSelectionForm,Wn as DestinationDrawer,zn as DestinationForm,uo as DestinationModal,yo as DestinationSelectionForm,bo as DestinationTable,ln as ErrorDropdown,Mo as InstrumentationRuleDrawer,Fo as InstrumentationRuleForm,Po as InstrumentationRuleModal,Vo as InstrumentationRuleTable,dn as KindDropdown,rn as LanguageDropdown,sn as MonitorDropdown,zo as MultiSourceControl,cn as NamespaceDropdown,fl as NavIconIds,Uo as NotificationManager,xa as OverviewDrawer,ol as ServiceMap,bl as SetupSummary,xl as SideNav,$l as SlackInvite,Ml as SourceDrawer,Sl as SourceForm,Pl as SourceModal,Ll as SourceSelectionForm,jl as SourceTable,Jl as SystemOverview,Na as TableCellConditions,Gl as ToastList,Ql as ToggleDarkMode,$r as TraceView};
@@ -1,13 +1,15 @@
1
1
  import React, { type PropsWithChildren } from 'react';
2
- import { Tier } from '@/types';
2
+ import { PlatformType, Tier } from '@/types';
3
3
  interface ContextProps extends PropsWithChildren {
4
4
  tier?: Tier;
5
5
  version?: string;
6
+ platformType?: PlatformType;
6
7
  }
7
- export declare const OdigosProvider: ({ children, tier, version }: ContextProps) => React.JSX.Element;
8
+ export declare const OdigosProvider: ({ children, tier, version, platformType }: ContextProps) => React.JSX.Element;
8
9
  export declare const useOdigos: (minSupportedVersion?: number) => {
9
10
  isVersionSupported: boolean | "" | undefined;
10
- tier?: Tier;
11
- version?: string;
11
+ version?: string | undefined;
12
+ tier?: Tier | undefined;
13
+ platformType?: PlatformType | undefined;
12
14
  };
13
15
  export {};
package/lib/contexts.js CHANGED
@@ -1 +1 @@
1
- import r,{createContext as o,useMemo as t,useContext as i}from"react";import{ci as e}from"./chunks/ui-components-8250476f.js";import"./icons.js";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";const s=o({tier:void 0,version:void 0,isVersionSupported:!1}),n=({children:o,tier:i,version:e})=>{const n=t(()=>({tier:i,version:e}),[i,e]);return r.createElement(s.Provider,{value:n},o)},p=r=>{const o=i(s),t=!r||o.version&&e(o.version)>=e(r);return{...o,isVersionSupported:t}};export{n as OdigosProvider,p as useOdigos};
1
+ export{cX as OdigosProvider,A as useOdigos}from"./chunks/ui-components-f482fcd2.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/functions.js CHANGED
@@ -1 +1 @@
1
- export{bA as capitalizeFirstLetter,cC as cleanObjectEmptyStringsValues,bv as compareCondition,bC as deepClone,aG as filterActions,b8 as filterDestinations,b9 as filterDestinationsByStream,b6 as filterSources,b7 as filterSourcesByStream,cD as flattenObjectKeys,aZ as formatBytes,ce as formatDuration,g as generateId,an as getActionIcon,az as getConditionsBooleans,b1 as getContainersIcons,c9 as getContainersInstrumentedCount,b0 as getDestinationIcon,aN as getEntityIcon,al as getEntityId,aI as getEntityLabel,cE as getIdFromSseTarget,a$ as getInstrumentationRuleIcon,cF as getMainContainerLanguage,bF as getMetricForEntity,cG as getMonitorIcon,cH as getPlatformIcon,cI as getPlatformLabel,bO as getProgrammingLanguageIcon,cg as getRecursiveValues,cJ as getSseTargetFromId,y as getStatusColor,v as getStatusFromPodStatus,aE as getStatusIcon,bX as getStatusTypeFromOdigosHealth,cK as getValueForRange,bR as getWorkloadId,bz as getYamlFieldsForDestination,bY as hasUnhealthyInstances,_ as isEmpty,cL as isLegalK8sLabel,ca as isOverTime,c1 as isStringABoolean,cM as isTimeElapsed,cN as isValidVersion,aB as mapConditions,bu as mapDestinationFieldsForDisplay,aY as mapExportedSignals,cO as numbersOnly,c2 as parseBooleanFromString,cP as parseJsonStringToPrettyString,cQ as removeEmptyValuesFromObject,bw as safeJsonParse,cR as safeJsonStringify,aS as sleep,bg as splitCamelString,cS as stringifyNonStringValues,ci as trimVersion}from"./chunks/ui-components-8250476f.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{bz as capitalizeFirstLetter,cC as cleanObjectEmptyStringsValues,bu as compareCondition,bB as deepClone,aE as filterActions,b7 as filterDestinations,b8 as filterDestinationsByStream,b5 as filterSources,b6 as filterSourcesByStream,cD as flattenObjectKeys,aY as formatBytes,ce as formatDuration,k as generateId,al as getActionIcon,ax as getConditionsBooleans,b0 as getContainersIcons,c8 as getContainersInstrumentedCount,a$ as getDestinationIcon,aL as getEntityIcon,aj as getEntityId,aG as getEntityLabel,cE as getIdFromSseTarget,a_ as getInstrumentationRuleIcon,cF as getMainContainerLanguage,bE as getMetricForEntity,cG as getMonitorIcon,cH as getPlatformIcon,cI as getPlatformLabel,bN as getProgrammingLanguageIcon,cg as getRecursiveValues,cJ as getSseTargetFromId,v as getStatusColor,q as getStatusFromPodStatus,aC as getStatusIcon,bW as getStatusTypeFromOdigosHealth,cK as getValueForRange,bQ as getWorkloadId,by as getYamlFieldsForDestination,bX as hasUnhealthyInstances,Y as isEmpty,cL as isLegalK8sLabel,c9 as isOverTime,c0 as isStringABoolean,cM as isTimeElapsed,cN as isValidVersion,az as mapConditions,bt as mapDestinationFieldsForDisplay,aX as mapExportedSignals,cO as numbersOnly,c1 as parseBooleanFromString,cP as parseJsonStringToPrettyString,cQ as removeEmptyValuesFromObject,bv as safeJsonParse,cR as safeJsonStringify,aR as sleep,bf as splitCamelString,cS as stringifyNonStringValues,cT as trimVersion}from"./chunks/ui-components-f482fcd2.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,3 @@
1
1
  export declare const useConnection: () => {
2
- selectedConnection: import("@/types").Connection | null;
3
2
  isVm: boolean;
4
3
  };
package/lib/hooks.js CHANGED
@@ -1 +1 @@
1
- export{ak as useActionFormData,cW as useBodyScroll,ba as useClickNode,bS as useClickNotification,b3 as useConnection,b5 as useContainerSize,u as useCopy,bm as useDataStreamFormData,by as useDestinationFormData,d as useGenericForm,cX as useInfiniteScroll,bP as useInstrumentationRuleFormData,ad as useKeyDown,bf as useOnClickOutside,bb as usePopup,bl as useSessionStorage,c3 as useSourceFormData,c7 as useSourceSelectionFormData,q as useTimeAgo}from"./chunks/ui-components-8250476f.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{ai as useActionFormData,cY as useBodyScroll,b9 as useClickNode,bR as useClickNotification,b2 as useConnection,b4 as useContainerSize,ca as useCopy,bl as useDataStreamFormData,bx as useDestinationFormData,u as useGenericForm,cZ as useInfiniteScroll,bO as useInstrumentationRuleFormData,ab as useKeyDown,be as useOnClickOutside,ba as usePopup,bk as useSessionStorage,c2 as useSourceFormData,c6 as useSourceSelectionFormData,i as useTimeAgo}from"./chunks/ui-components-f482fcd2.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/snippets.js CHANGED
@@ -1 +1 @@
1
- export{br as AddButton,bZ as CopyText,bV as EditButton,bU as Flow,cY as MapItemNode,cZ as NoDataNode,bs as NoteBackToSummary,b$ as PodContainer,c4 as SourceContainer}from"./chunks/ui-components-8250476f.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{bq as AddButton,bY as CopyText,bU as EditButton,bT as Flow,c_ as MapItemNode,c$ as NoDataNode,br as NoteBackToSummary,b_ as PodContainer,c3 as SourceContainer}from"./chunks/ui-components-f482fcd2.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,12 +1,10 @@
1
- import type { Connection, Source } from '@/types';
1
+ import type { Source } from '@/types';
2
2
  export interface SelectedState {
3
- selectedConnection: Connection | null;
4
3
  selectedSources: {
5
4
  [namespace: string]: Source[];
6
5
  };
7
6
  }
8
7
  interface SelectedStateSetters {
9
- setSelectedConnection: (payload: SelectedState['selectedConnection']) => void;
10
8
  setSelectedSources: (payload: SelectedState['selectedSources']) => void;
11
9
  resetSelectedState: () => void;
12
10
  }
package/lib/store.js CHANGED
@@ -1 +1 @@
1
- export{cV as useActiveNodeStore,cd as useDarkMode,b4 as useDataStreamStore,ac as useDrawerStore,aj as useEntityStore,aF as useFilterStore,aW as useInstrumentStore,ar as useModalStore,ab as useNotificationStore,aa as usePendingStore,aV as useSelectedStore,bn as useSetupStore}from"./chunks/ui-components-8250476f.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{cW as useActiveNodeStore,cd as useDarkMode,b3 as useDataStreamStore,aa as useDrawerStore,ah as useEntityStore,aD as useFilterStore,aV as useInstrumentStore,ap as useModalStore,a9 as useNotificationStore,a8 as usePendingStore,aU as useSelectedStore,bm as useSetupStore}from"./chunks/ui-components-f482fcd2.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/theme.js CHANGED
@@ -1 +1 @@
1
- export{t as default}from"./chunks/ui-components-8250476f.js";import"styled-components";import"./icons.js";import"react";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{p as default}from"./chunks/ui-components-f482fcd2.js";import"styled-components";import"./icons.js";import"react";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/types.js CHANGED
@@ -1 +1 @@
1
- export{cj as ActionCategory,X as ActionKeyTypes,K as ActionType,cw as AddNodeTypes,cm as BooleanOperation,bK as CodeAttributesKeyTypes,aq as Crud,bI as CustomInstrumentationsKeyTypes,cx as DestinationTypes,cv as EdgeTypes,ai as EntityTypes,a3 as FieldTypes,bJ as GolangCustomProbe,bG as HeadersCollectionKeyTypes,Z as InputTypes,cs as InstallationMethod,bM as InstrumentationRuleType,ct as IntrumentationStatus,bH as JavaCustomProbe,cn as JsonOperation,M as K8sAttributesFrom,c5 as K8sResourceKind,co as ListDirection,bT as NodeTypes,cl as NumberOperation,cB as OdigosHealthStatus,bt as OtherEntityTypes,aD as OtherStatus,O as OtherStatusType,bL as PayloadCollectionKeyTypes,cr as PlatformType,cA as PodContainerLifecycleStatus,cz as PodContainerStatus,cy as PodPhase,cu as Profile,c6 as ProgrammingLanguages,bx as SignalType,cp as SortDirection,h as StatusType,ck as StringOperation,cq as Tier,G as WorkloadRolloutStatus}from"./chunks/ui-components-8250476f.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{cj as ActionCategory,R as ActionKeyTypes,H as ActionType,cw as AddNodeTypes,cm as BooleanOperation,bJ as CodeAttributesKeyTypes,ao as Crud,bH as CustomInstrumentationsKeyTypes,cx as DestinationTypes,cv as EdgeTypes,ag as EntityTypes,a1 as FieldTypes,bI as GolangCustomProbe,bF as HeadersCollectionKeyTypes,X as InputTypes,cs as InstallationMethod,bL as InstrumentationRuleType,ct as IntrumentationStatus,bG as JavaCustomProbe,cn as JsonOperation,K as K8sAttributesFrom,c4 as K8sResourceKind,co as ListDirection,bS as NodeTypes,cl as NumberOperation,cB as OdigosHealthStatus,bs as OtherEntityTypes,aB as OtherStatus,O as OtherStatusType,bK as PayloadCollectionKeyTypes,cr as PlatformType,cA as PodContainerLifecycleStatus,cz as PodContainerStatus,cy as PodPhase,cu as Profile,c5 as ProgrammingLanguages,bw as SignalType,cp as SortDirection,a as StatusType,ck as StringOperation,cq as Tier,z as WorkloadRolloutStatus}from"./chunks/ui-components-f482fcd2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odigos/ui-kit",
3
- "version": "0.0.158",
3
+ "version": "0.0.159",
4
4
  "author": "Odigos",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,3 +0,0 @@
1
- import o,{useMemo as s}from"react";import t from"styled-components";import{u as a,g as e,S as i,B as n,a as r,b as l,C as c,c as m,N as p}from"./ui-components-8250476f.js";import{VIcon as u,CopyIcon as d,YamlIcon as f}from"../icons.js";const b=t.div`
2
- padding: 0 12px;
3
- `,y=({yaml:t})=>{const{clickCopy:y,isCopied:g}=a(),C=s(()=>[{id:e(),type:i.Button,buttonProps:{leftIcon:g?u:d,onClick:()=>y(t||""),disabled:g,size:n.S,variant:r.Secondary}}],[t,g]);return o.createElement(l,{icon:f,title:"YAML",actions:C},o.createElement(b,null,t?o.createElement(c,{code:t,language:"yaml",theme:"duotoneDark"}):o.createElement(m,null,o.createElement(p,{title:"No YAML found",subTitle:"The YAML for this resource is not available"}))))};export{y as Y};