@odigos/ui-kit 0.0.193 → 0.0.195

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.
Files changed (47) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/lib/chunks/index-DvMzoRJQ.js +3 -0
  3. package/lib/chunks/{ui-components-B4OMCuIf.js → ui-components-ymRfS19x.js} +396 -387
  4. package/lib/components/_v2/drawer/header/index.d.ts +1 -0
  5. package/lib/components/_v2/typography/index.d.ts +2 -0
  6. package/lib/components/styled.d.ts +1 -0
  7. package/lib/components/v2.js +1 -1
  8. package/lib/components.js +1 -1
  9. package/lib/constants/actions/index.d.ts +2 -0
  10. package/lib/constants.js +1 -1
  11. package/lib/containers/_v2/_drawers/add-action-drawer/helpers.d.ts +7 -0
  12. package/lib/containers/_v2/_drawers/add-action-drawer/index.d.ts +10 -0
  13. package/lib/containers/_v2/_drawers/add-source-drawer/index.d.ts +2 -2
  14. package/lib/containers/_v2/_drawers/add-source-drawer/namespaces-column/index.d.ts +2 -1
  15. package/lib/containers/_v2/_drawers/index.d.ts +1 -0
  16. package/lib/containers/_v2/_forms/add-action-form/custom-fields/add-cluster-info/index.d.ts +5 -0
  17. package/lib/containers/_v2/_forms/add-action-form/custom-fields/delete-attributes/index.d.ts +5 -0
  18. package/lib/containers/_v2/_forms/add-action-form/custom-fields/error-sampler/index.d.ts +5 -0
  19. package/lib/containers/_v2/_forms/add-action-form/custom-fields/index.d.ts +7 -0
  20. package/lib/containers/_v2/_forms/add-action-form/custom-fields/k8s-attributes/index.d.ts +5 -0
  21. package/lib/containers/_v2/_forms/add-action-form/custom-fields/latency-sampler/index.d.ts +5 -0
  22. package/lib/containers/_v2/_forms/add-action-form/custom-fields/pii-masking/index.d.ts +5 -0
  23. package/lib/containers/_v2/_forms/add-action-form/custom-fields/probabilistic-sampler/index.d.ts +5 -0
  24. package/lib/containers/_v2/_forms/add-action-form/custom-fields/rename-attributes/index.d.ts +5 -0
  25. package/lib/containers/_v2/_forms/add-action-form/custom-fields/service-name-sampler/index.d.ts +5 -0
  26. package/lib/containers/_v2/_forms/add-action-form/custom-fields/span-attribute-sampler/index.d.ts +5 -0
  27. package/lib/containers/_v2/_forms/add-action-form/index.d.ts +7 -0
  28. package/lib/containers/_v2/_forms/index.d.ts +1 -0
  29. package/lib/containers/_v2/central-connections/index.d.ts +2 -1
  30. package/lib/containers/v2.js +43 -26
  31. package/lib/containers.js +23 -23
  32. package/lib/contexts.js +1 -1
  33. package/lib/functions.js +1 -1
  34. package/lib/hooks.js +1 -1
  35. package/lib/snippets/_v2/wide-drawer/column/index.d.ts +0 -1
  36. package/lib/snippets/_v2/wide-drawer/column-list-collapse/index.d.ts +7 -0
  37. package/lib/snippets/_v2/wide-drawer/column-list-item/index.d.ts +2 -0
  38. package/lib/snippets/_v2/wide-drawer/index.d.ts +5 -5
  39. package/lib/snippets.js +1 -1
  40. package/lib/store.js +1 -1
  41. package/lib/theme.js +1 -1
  42. package/lib/types/actions/index.d.ts +4 -1
  43. package/lib/types/instrumentation-rules/index.d.ts +1 -1
  44. package/lib/types.js +1 -1
  45. package/lib/visuals.js +1 -1
  46. package/package.json +1 -1
  47. package/lib/chunks/index-BzflK0LT.js +0 -3
package/lib/containers.js CHANGED
@@ -1,4 +1,4 @@
1
- import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import{useState as n,useEffect as a,forwardRef as o,useRef as r,useImperativeHandle as l,useMemo as s,Fragment as c,useCallback as d,Children as u}from"react";import p,{css as h,useTheme as m}from"styled-components";import{y as g,ap as y,aq as v,ar as b,as as f,at as x,au as S,av as $,aw as C,ax as w,ay as k,az as D,aA as T,aB as N,aC as E,aD as A,aE as F,aF as O,aG as I,aH as R,aI as M,aJ as L,aK as P,aL as K,Z as j,aa as q,aM as H,aN as z,aO as V,U as B,a2 as W,aP as _,aQ as J,aR as U,aS as G,aT as Y,aU as X,aV as Z,aW as Q,aX as ee,aY as te,aZ as ie,S as ne,a_ as ae,a$ as oe,b0 as re,b1 as le,F as se,b2 as ce,b3 as de,b4 as ue,f as pe,b5 as he,b as me,b6 as ge,b7 as ye,b8 as ve,b9 as be,ba as fe,bb as xe,bc as Se,bd as $e,be as Ce,bf as we,bg as ke,bh as De,s as Te,N as Ne,bi as Ee,bj as Ae,bk as Fe,ah as Oe,bl as Ie,bm as Re,bn as Me,a6 as Le,bo as Pe,bp as Ke,bq as je,br as qe,bs as He,bt as ze,bu as Ve,M as Be,X as We,bv as _e,K as Je,bw as Ue,bx as Ge,by as Ye,bz as Xe,bA as Ze,bB as Qe,bC as et,bD as tt,bE as it,bF as nt,bG as at,bH as ot,bI as rt,m as lt,bJ as st,bK as ct,bL as dt,bM as ut,bN as pt,Q as ht,bO as mt,bP as gt,bQ as yt,bR as vt,bS as bt,bT as ft,bU as xt,bV as St,bW as $t,bX as Ct,bY as wt,bZ as kt,b_ as Dt,b$ as Tt,v as Nt,c0 as Et,c1 as At,c2 as Ft,c3 as Ot,H as It,J as Rt,e as Mt,G as Lt,C as Pt,P as Kt,i as jt,c4 as qt,n as Ht,c5 as zt,c6 as Vt,w as Bt,c7 as Wt,c8 as _t,c9 as Jt,ca as Ut,$ as Gt,cb as Yt,cc as Xt,cd as Zt,ce as Qt,cf as ei,cg as ti,ch as ii,ci as ni,cj as ai,ck as oi,cl as ri,cm as li,a8 as si,cn as ci,co as di,cp as ui,cq as pi,cr as hi,cs as mi,ct as gi,cu as yi,cv as vi,a0 as bi,Y as fi,x as xi,cw as Si,cx as $i,cy as Ci,cz as wi,cA as ki,cB as Di,cC as Ti}from"./chunks/ui-components-B4OMCuIf.js";import{VSquareIcon as Ni,XSquareIcon as Ei,EditIcon as Ai,TrashIcon as Fi,OdigosLogoText as Oi,PlusIcon as Ii,RefreshIcon as Ri,SearchIcon as Mi,FilterIcon as Li,DataStreamIcon as Pi,VIcon as Ki,OdigosLogo as ji,ArrowIcon as qi,RefreshLeftArrowIcon as Hi,NotificationIcon as zi,UserIcon as Vi,ImageErrorIcon as Bi,OverviewIcon as Wi,SourceIcon as _i,DestinationIcon as Ji,InstrumentationRuleIcon as Ui,ActionIcon as Gi,SlackLogo as Yi,KeyIcon as Xi,TerminalIcon as Zi,ExclamationTriangleIcon as Qi,TraceViewIcon as en}from"./icons.js";import{MarkerType as tn,useNodesState as nn,useEdgesState as an,applyNodeChanges as on}from"@xyflow/react";import{Y as rn}from"./chunks/index-BzflK0LT.js";import"zustand";import"javascript-time-ago";import"./chunks/vendor-C-kwkNJP.js";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";const ln=e=>{const{type:t,name:i,notes:n,signals:a,disabled:o,fields:{collectContainerAttributes:r,collectReplicaSetAttributes:l,collectWorkloadId:s,collectClusterId:c,labelsAttributes:d,annotationsAttributes:u,clusterAttributes:p,overwriteExistingValues:h,attributeNamesToDelete:m,renames:f,piiCategories:x,fallbackSamplingRatio:S,samplingPercentage:$,endpointsFilters:C,servicesNameFilters:w,attributeFilters:k}}=e,D=[{title:g.TYPE,value:t},{type:y.ActiveStatus,title:g.STATUS,value:String(!o)},{type:y.Monitors,title:g.SIGNALS_FOR_PROCESSING,value:a?.join(", ")||""},{title:g.NAME,value:i||""},{title:g.NOTES,value:n||""},{type:y.Divider}];if(t===v.K8sAttributes&&(D.push({title:"Collect Container Attributes",value:String(r)}),D.push({title:"Collect ReplicaSet Attributes",value:String(l)}),D.push({title:"Collect Workload ID",value:String(s)}),D.push({title:"Collect Cluster ID",value:String(c)}),d?.length&&D.push({type:y.Divider}),d?.forEach(({labelKey:e,attributeKey:t,from:i,fromSources:n},a)=>{let o="";o+=`Label Key: ${e}\n`,o+=`Attribute Key: ${t}\n`,o+=`From: ${n?.length?n.join(", "):i||b.Pod}\n`,D.push({title:"Label"+(d.length>1?` #${a+1}`:""),value:o})}),u?.length&&D.push({type:y.Divider}),u?.forEach(({annotationKey:e,attributeKey:t,from:i,fromSources:n},a)=>{let o="";o+=`Annotation Key: ${e}\n`,o+=`Attribute Key: ${t}\n`,o+=`From: ${n?.length?n.join(", "):i||b.Pod}\n`,D.push({title:"Annotation"+(u.length>1?` #${a+1}`:""),value:o})})),t===v.AddClusterInfo){D.push({title:"Overwrite Existing Values",value:String(h||!1)});let e="";p?.forEach(({attributeName:t,attributeStringValue:i},n)=>{e+=`${t}: ${i}`,n<p.length-1&&(e+=", ")}),D.push({title:"Attributes",value:e})}if(t===v.DeleteAttributes){let e="";m?.forEach((t,i)=>{e+=t,i<m.length-1&&(e+=", ")}),D.push({title:"Attributes",value:e})}if(t===v.RenameAttributes){let e="";const t=Object.entries(f||{});t.forEach(([i,n],a)=>{e+=`${i}: ${n}`,a<t.length-1&&(e+=", ")}),D.push({title:"Attributes",value:e})}if(t===v.PiiMasking){let e="";x?.forEach((t,i)=>{e+=t,i<x.length-1&&(e+=", ")}),D.push({title:"Categories",value:e})}return t===v.ErrorSampler&&D.push({title:"Sampling Ratio",value:String(S)}),t===v.ProbabilisticSampler&&D.push({title:"Sampling Percentage",value:String($)}),t===v.LatencySampler&&C?.forEach(({serviceName:e,httpRoute:t,minimumLatencyThreshold:i,fallbackSamplingRatio:n},a)=>{let o="";o+=`Service Name: ${e}\n`,o+=`HTTP Route: ${t}\n`,o+=`Min. Latency: ${i}\n`,o+=`Fallback Sampling Ratio: ${n}`,D.push({title:"Endpoint"+(C.length>1?` #${a+1}`:""),value:o})}),t===v.ServiceNameSampler&&w?.forEach(({serviceName:e,samplingRatio:t,fallbackSamplingRatio:i},n)=>{let a="";a+=`Service Name: ${e}\n`,a+=`Sampling Ratio: ${t}\n`,a+=`Fallback Sampling Ratio: ${i}`,D.push({title:"Filter"+(w.length>1?` #${n+1}`:""),value:a})}),t===v.SpanAttributeSampler&&k?.forEach(({serviceName:e,attributeKey:t,fallbackSamplingRatio:i,condition:n},a)=>{let o="";o+=`Service Name: ${e}\n`,o+=`Attribute Key: ${t}\n`,o+=`Fallback Sampling Ratio: ${i}\n`;const r=Object.keys(n)[0];o+=`Condition: ${r}\n`,o+=`Operation: ${n[r]?.operation}\n`,o+=`Expected Value: ${n[r]?.expectedValue}`,"jsonCondition"===r&&(o+=`\nJSON Path: ${n[r].jsonPath}`),D.push({title:"Filter"+(k.length>1?` #${a+1}`:""),value:o})}),D},sn=f.PiiCategories,cn=p.div`
1
+ import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import{useState as n,useEffect as a,forwardRef as o,useRef as r,useImperativeHandle as l,useMemo as s,Fragment as c,useCallback as d,Children as u}from"react";import p,{css as h,useTheme as m}from"styled-components";import{Z as g,aA as y,h as v,K as b,A as f,aB as x,aC as S,aD as $,aE as C,c as w,i as k,aF as D,aG as T,aH as N,aI as E,g as A,aJ as F,Q as O,aK as I,aL as R,aM as M,aN as L,aO as P,aP as j,a8 as K,al as q,aQ as H,aR as z,aS as V,a5 as B,ad as W,aT as _,aU as J,aV as U,aW as G,aX as Y,aY as X,aZ as Z,a_ as Q,a$ as ee,b0 as te,b1 as ie,o as ne,b2 as ae,b3 as oe,b4 as re,b5 as le,F as se,b6 as ce,b7 as de,b8 as ue,k as pe,b9 as he,w as me,ba as ge,bb as ye,bc as ve,bd as be,be as fe,bf as xe,bg as Se,bh as $e,bi as Ce,bj as we,bk as ke,bl as De,l as Te,N as Ne,bm as Ee,bn as Ae,bo as Fe,as as Oe,bp as Ie,bq as Re,br as Me,ah as Le,bs as Pe,bt as je,bu as Ke,bv as qe,bw as He,bx as ze,by as Ve,a3 as Be,a6 as We,bz as _e,a2 as Je,bA as Ue,bB as Ge,bC as Ye,bD as Xe,bE as Ze,bF as Qe,bG as et,bH as tt,bI as it,bJ as nt,bK as at,bL as ot,bM as rt,E as lt,M as st,bN as ct,bO as dt,bP as ut,bQ as pt,a4 as ht,bR as mt,bS as gt,bT as yt,bU as vt,bV as bt,bW as ft,bX as xt,bY as St,bZ as $t,b_ as Ct,b$ as wt,c0 as kt,c1 as Dt,c2 as Tt,j as Nt,c3 as Et,c4 as At,c5 as Ft,c6 as Ot,H as It,J as Rt,x as Mt,G as Lt,v as Pt,P as jt,y as Kt,c7 as qt,O as Ht,c8 as zt,c9 as Vt,_ as Bt,ca as Wt,cb as _t,cc as Jt,cd as Ut,aa as Gt,ce as Yt,cf as Xt,cg as Zt,ch as Qt,ci as ei,cj as ti,ck as ii,cl as ni,cm as ai,cn as oi,co as ri,cp as li,aj as si,cq as ci,cr as di,cs as ui,ct as pi,cu as hi,cv as mi,cw as gi,cx as yi,cy as vi,ab as bi,a7 as fi,Y as xi,cz as Si,cA as $i,cB as Ci,cC as wi,cD as ki,cE as Di,cF as Ti}from"./chunks/ui-components-ymRfS19x.js";import{VSquareIcon as Ni,XSquareIcon as Ei,EditIcon as Ai,TrashIcon as Fi,OdigosLogoText as Oi,PlusIcon as Ii,RefreshIcon as Ri,SearchIcon as Mi,FilterIcon as Li,DataStreamIcon as Pi,VIcon as ji,OdigosLogo as Ki,ArrowIcon as qi,RefreshLeftArrowIcon as Hi,NotificationIcon as zi,UserIcon as Vi,ImageErrorIcon as Bi,OverviewIcon as Wi,SourceIcon as _i,DestinationIcon as Ji,InstrumentationRuleIcon as Ui,ActionIcon as Gi,SlackLogo as Yi,KeyIcon as Xi,TerminalIcon as Zi,ExclamationTriangleIcon as Qi,TraceViewIcon as en}from"./icons.js";import{MarkerType as tn,useNodesState as nn,useEdgesState as an,applyNodeChanges as on}from"@xyflow/react";import{Y as rn}from"./chunks/index-DvMzoRJQ.js";import"zustand";import"javascript-time-ago";import"./chunks/vendor-C-kwkNJP.js";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";const ln=e=>{const{type:t,name:i,notes:n,signals:a,disabled:o,fields:{collectContainerAttributes:r,collectReplicaSetAttributes:l,collectWorkloadId:s,collectClusterId:c,labelsAttributes:d,annotationsAttributes:u,clusterAttributes:p,overwriteExistingValues:h,attributeNamesToDelete:m,renames:f,piiCategories:x,fallbackSamplingRatio:S,samplingPercentage:$,endpointsFilters:C,servicesNameFilters:w,attributeFilters:k}}=e,D=[{title:g.TYPE,value:t},{type:y.ActiveStatus,title:g.STATUS,value:String(!o)},{type:y.Monitors,title:g.SIGNALS_FOR_PROCESSING,value:a?.join(", ")||""},{title:g.NAME,value:i||""},{title:g.NOTES,value:n||""},{type:y.Divider}];if(t===v.K8sAttributes&&(D.push({title:"Collect Container Attributes",value:String(r)}),D.push({title:"Collect ReplicaSet Attributes",value:String(l)}),D.push({title:"Collect Workload ID",value:String(s)}),D.push({title:"Collect Cluster ID",value:String(c)}),d?.length&&D.push({type:y.Divider}),d?.forEach(({labelKey:e,attributeKey:t,from:i,fromSources:n},a)=>{let o="";o+=`Label Key: ${e}\n`,o+=`Attribute Key: ${t}\n`,o+=`From: ${n?.length?n.join(", "):i||b.Pod}\n`,D.push({title:"Label"+(d.length>1?` #${a+1}`:""),value:o})}),u?.length&&D.push({type:y.Divider}),u?.forEach(({annotationKey:e,attributeKey:t,from:i,fromSources:n},a)=>{let o="";o+=`Annotation Key: ${e}\n`,o+=`Attribute Key: ${t}\n`,o+=`From: ${n?.length?n.join(", "):i||b.Pod}\n`,D.push({title:"Annotation"+(u.length>1?` #${a+1}`:""),value:o})})),t===v.AddClusterInfo){D.push({title:"Overwrite Existing Values",value:String(h||!1)});let e="";p?.forEach(({attributeName:t,attributeStringValue:i},n)=>{e+=`${t}: ${i}`,n<p.length-1&&(e+=", ")}),D.push({title:"Attributes",value:e})}if(t===v.DeleteAttributes){let e="";m?.forEach((t,i)=>{e+=t,i<m.length-1&&(e+=", ")}),D.push({title:"Attributes",value:e})}if(t===v.RenameAttributes){let e="";const t=Object.entries(f||{});t.forEach(([i,n],a)=>{e+=`${i}: ${n}`,a<t.length-1&&(e+=", ")}),D.push({title:"Attributes",value:e})}if(t===v.PiiMasking){let e="";x?.forEach((t,i)=>{e+=t,i<x.length-1&&(e+=", ")}),D.push({title:"Categories",value:e})}return t===v.ErrorSampler&&D.push({title:"Sampling Ratio",value:String(S)}),t===v.ProbabilisticSampler&&D.push({title:"Sampling Percentage",value:String($)}),t===v.LatencySampler&&C?.forEach(({serviceName:e,httpRoute:t,minimumLatencyThreshold:i,fallbackSamplingRatio:n},a)=>{let o="";o+=`Service Name: ${e}\n`,o+=`HTTP Route: ${t}\n`,o+=`Min. Latency: ${i}\n`,o+=`Fallback Sampling Ratio: ${n}`,D.push({title:"Endpoint"+(C.length>1?` #${a+1}`:""),value:o})}),t===v.ServiceNameSampler&&w?.forEach(({serviceName:e,samplingRatio:t,fallbackSamplingRatio:i},n)=>{let a="";a+=`Service Name: ${e}\n`,a+=`Sampling Ratio: ${t}\n`,a+=`Fallback Sampling Ratio: ${i}`,D.push({title:"Filter"+(w.length>1?` #${n+1}`:""),value:a})}),t===v.SpanAttributeSampler&&k?.forEach(({serviceName:e,attributeKey:t,fallbackSamplingRatio:i,condition:n},a)=>{let o="";o+=`Service Name: ${e}\n`,o+=`Attribute Key: ${t}\n`,o+=`Fallback Sampling Ratio: ${i}\n`;const r=Object.keys(n)[0];o+=`Condition: ${r}\n`,o+=`Operation: ${n[r]?.operation}\n`,o+=`Expected Value: ${n[r]?.expectedValue}`,"jsonCondition"===r&&(o+=`\nJSON Path: ${n[r].jsonPath}`),D.push({title:"Filter"+(k.length>1?` #${a+1}`:""),value:o})}),D},sn=f.PiiCategories,cn=p.div`
2
2
  display: flex;
3
3
  flex-direction: row;
4
4
  gap: 32px;
@@ -14,7 +14,7 @@ import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import{useState
14
14
  padding: 4px;
15
15
  `,Tn=p(P)`
16
16
  margin-bottom: 12px;
17
- `,Nn=({isUpdate:i,action:n,formData:a,formErrors:o,handleFormChange:r})=>{const l=m();return e(Dn,{children:[i&&e("div",{children:[t(Tn,{children:"Status"}),t(F,{options:[{icon:Ni,label:g.ENABLED,value:!1,selectedBgColor:l.text.success+O["050"]},{icon:Ei,label:g.DISABLED,value:!0,selectedBgColor:l.text.error+O["050"]}],selected:a.disabled,setSelected:e=>r("disabled",e)})]}),!i&&t(I,{title:"",description:n.docsDescription,actionButton:t(R,{endpoint:n.docsEndpoint})}),t(M,{title:"Signals for Processing",required:!0,allowedSignals:n.allowedSignals,selectedSignals:a.signals||[],setSelectedSignals:e=>r("signals",e),errorMessage:o.signals}),!i&&t(C,{title:"Action name",placeholder:"Use a name that describes the action",value:a.name||"",onChange:({target:{value:e}})=>r("name",e),errorMessage:o.name}),t(kn,{actionType:n.type,value:a.fields,setValue:(e,t)=>r(`fields.${e}`,t),formErrors:o}),t(L,{title:"Notes",value:a.notes||"",onChange:({target:{value:e}})=>r("notes",e),errorMessage:o.notes})]})},En=o(({children:a,width:o=640,title:s,titleTooltip:c,hideEditTitleFromEdit:d,icons:u,iconSrcs:p,isEdit:h=!1,isFormDirty:g=!1,isLastItem:y=!1,onClose:v,onEdit:b,onSave:f,onDelete:x,onCancel:S,tabs:$,headerActionButtons:C},w)=>{const k=m(),{drawerType:D,setDrawerType:T,setDrawerEntityId:N}=K();j({key:"Enter",active:h},()=>U());const[E,A]=n(!1),[F,O]=n(!1),I=r(null),R=D===B.Source,M=()=>{A(!1),O(!1)},L=()=>{M(),b&&b(!1),T(null),N(null),v?.()};l(w,()=>({closeDrawer:L}));const W=()=>{I.current?.clearTitle(),S&&S(),M()},_=()=>{const e=I.current?.isTitleDirty();g||e?O(!0):W()},J=()=>{A(!0)},U=()=>{f&&f(I.current?.getTitle()||"")},G=C||[];return b&&!h&&G.push({"data-id":"drawer-edit",variant:"tertiary",onClick:()=>b(!0),children:e(i,{children:[t(Ai,{}),t(P,{size:14,family:"secondary",decoration:"underline",children:"Edit"})]})}),x&&!h&&G.push({"data-id":"drawer-delete",variant:"tertiary",onClick:J,children:e(i,{children:[t(Fi,{}),t(P,{color:k.text.error,size:14,family:"secondary",decoration:"underline",children:R?q.UNINSTRUMENT:q.DELETE})]})}),e(i,{children:[t(H,{isOpen:!0,onClose:h?_:L,closeOnEscape:!E&&!F,width:`${o+64}px`,header:{icons:u,iconSrcs:p,title:s,titleTooltip:c,replaceTitleWith:!d&&h?t(An,{ref:I,title:s}):void 0,actionButtons:G,tabs:$},footer:{isOpen:h,leftButtons:[{"data-id":"drawer-save",variant:"primary",onClick:U,children:q.SAVE},{"data-id":"drawer-cancel",variant:"secondary",onClick:_,children:q.CANCEL}],rightButtons:x?[{"data-id":"drawer-delete",variant:"tertiary",onClick:J,children:e(i,{children:[t(Fi,{}),t(P,{size:14,color:k.text.error,family:"secondary",decoration:"underline",children:q.DELETE})]})}]:[]},children:a}),t(z,{isOpen:E,noOverlay:!0,name:`${D}${s?` (${s})`:""}`,type:D,isLastItem:y,onApprove:()=>{x&&x(),M()},onDeny:M}),t(V,{isOpen:F,noOverlay:!0,name:"edit mode",onApprove:W,onDeny:M})]})}),An=o(({title:e},i)=>{const[o,r]=n(e);return a(()=>{r(e)},[e]),l(i,()=>({getTitle:()=>o||e,isTitleDirty:()=>o!==e,clearTitle:()=>r(e)})),t(C,{"data-id":"title",value:o,onChange:e=>r(e.target.value)})});An.displayName=An.name,En.displayName=En.name;const Fn=p.div`
17
+ `,Nn=({isUpdate:i,action:n,formData:a,formErrors:o,handleFormChange:r})=>{const l=m();return e(Dn,{children:[i&&e("div",{children:[t(Tn,{children:"Status"}),t(F,{options:[{icon:Ni,label:g.ENABLED,value:!1,selectedBgColor:l.text.success+O["050"]},{icon:Ei,label:g.DISABLED,value:!0,selectedBgColor:l.text.error+O["050"]}],selected:a.disabled,setSelected:e=>r("disabled",e)})]}),!i&&t(I,{title:"",description:n.docsDescription,actionButton:t(R,{endpoint:n.docsEndpoint})}),t(M,{title:"Signals for Processing",required:!0,allowedSignals:n.allowedSignals,selectedSignals:a.signals||[],setSelectedSignals:e=>r("signals",e),errorMessage:o.signals}),!i&&t(C,{title:"Action name",placeholder:"Use a name that describes the action",value:a.name||"",onChange:({target:{value:e}})=>r("name",e),errorMessage:o.name}),t(kn,{actionType:n.type,value:a.fields,setValue:(e,t)=>r(`fields.${e}`,t),formErrors:o}),t(L,{title:"Notes",value:a.notes||"",onChange:({target:{value:e}})=>r("notes",e),errorMessage:o.notes})]})},En=o(({children:a,width:o=640,title:s,titleTooltip:c,hideEditTitleFromEdit:d,icons:u,iconSrcs:p,isEdit:h=!1,isFormDirty:g=!1,isLastItem:y=!1,onClose:v,onEdit:b,onSave:f,onDelete:x,onCancel:S,tabs:$,headerActionButtons:C},w)=>{const k=m(),{drawerType:D,setDrawerType:T,setDrawerEntityId:N}=j();K({key:"Enter",active:h},()=>U());const[E,A]=n(!1),[F,O]=n(!1),I=r(null),R=D===B.Source,M=()=>{A(!1),O(!1)},L=()=>{M(),b&&b(!1),T(null),N(null),v?.()};l(w,()=>({closeDrawer:L}));const W=()=>{I.current?.clearTitle(),S&&S(),M()},_=()=>{const e=I.current?.isTitleDirty();g||e?O(!0):W()},J=()=>{A(!0)},U=()=>{f&&f(I.current?.getTitle()||"")},G=C||[];return b&&!h&&G.push({"data-id":"drawer-edit",variant:"tertiary",onClick:()=>b(!0),children:e(i,{children:[t(Ai,{}),t(P,{size:14,family:"secondary",decoration:"underline",children:"Edit"})]})}),x&&!h&&G.push({"data-id":"drawer-delete",variant:"tertiary",onClick:J,children:e(i,{children:[t(Fi,{}),t(P,{color:k.text.error,size:14,family:"secondary",decoration:"underline",children:R?q.UNINSTRUMENT:q.DELETE})]})}),e(i,{children:[t(H,{isOpen:!0,onClose:h?_:L,closeOnEscape:!E&&!F,width:`${o+64}px`,header:{icons:u,iconSrcs:p,title:s,titleTooltip:c,replaceTitleWith:!d&&h?t(An,{ref:I,title:s}):void 0,actionButtons:G,tabs:$},footer:{isOpen:h,leftButtons:[{"data-id":"drawer-save",variant:"primary",onClick:U,children:q.SAVE},{"data-id":"drawer-cancel",variant:"secondary",onClick:_,children:q.CANCEL}],rightButtons:x?[{"data-id":"drawer-delete",variant:"tertiary",onClick:J,children:e(i,{children:[t(Fi,{}),t(P,{size:14,color:k.text.error,family:"secondary",decoration:"underline",children:q.DELETE})]})}]:[]},children:a}),t(z,{isOpen:E,noOverlay:!0,name:`${D}${s?` (${s})`:""}`,type:D,isLastItem:y,onApprove:()=>{x&&x(),M()},onDeny:M}),t(V,{isOpen:F,noOverlay:!0,name:"edit mode",onApprove:W,onDeny:M})]})}),An=o(({title:e},i)=>{const[o,r]=n(e);return a(()=>{r(e)},[e]),l(i,()=>({getTitle:()=>o||e,isTitleDirty:()=>o!==e,clearTitle:()=>r(e)})),t(C,{"data-id":"title",value:o,onChange:e=>r(e.target.value)})});An.displayName=An.name,En.displayName=En.name;const Fn=p.div`
18
18
  width: 100%;
19
19
  height: 100%;
20
20
  max-height: calc(100vh - 220px);
@@ -24,10 +24,10 @@ import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import{useState
24
24
  display: flex;
25
25
  flex-direction: column;
26
26
  gap: 12px;
27
- `,In=({updateAction:i,deleteAction:o})=>{const{actions:l}=W(),{drawerType:c,drawerEntityId:d}=K(),u=r(null),p=c===B.Action,[h,m]=n(!1),[y,v]=n(!1),{formData:b,formErrors:f,handleFormChange:x,resetFormData:S,validateForm:$,loadFormWithDrawerItem:C}=_(),w=s(()=>{if(d)return l?.find(e=>J(e)===d)},[d,l]);if(a(()=>{p&&w?C(w):S()},[p,w]),!w)return null;const k=U.find(({type:e})=>e===w.type)||U.find(({label:e})=>"Attributes"===e)?.items?.find(({type:e})=>e===w.type)||U.find(({label:e})=>"Samplers"===e)?.items?.find(({type:e})=>e===w.type);return t(En,{ref:u,title:w.name||w.type,icons:[X(w.type)],isEdit:h,isFormDirty:y,onEdit:e=>{m("boolean"!=typeof e||e)},onSave:e=>{if($({withAlert:!0,alertTitle:Z.Update})){const t=e!==w.type?e:"";x("name",t),i(d,{...b,name:t}),m(!1),v(!1)}},onDelete:()=>{o(d,w.type),m(!1),v(!1),u.current?.closeDrawer()},onCancel:()=>{m(!1),v(!1),C(w)},children:h&&k?t(Fn,{children:t(Nn,{isUpdate:!0,action:k,formData:b,formErrors:f,handleFormChange:(...e)=>{v(!0),x(...e)}})}):e(On,{children:[t(G,{conditions:w.conditions||[]}),t(Y,{title:g.ACTION_DETAILS,data:w?ln(w):[]})]})})},Rn=p(se)`
27
+ `,In=({updateAction:i,deleteAction:o})=>{const{actions:l}=W(),{drawerType:c,drawerEntityId:d}=j(),u=r(null),p=c===B.Action,[h,m]=n(!1),[y,v]=n(!1),{formData:b,formErrors:f,handleFormChange:x,resetFormData:S,validateForm:$,loadFormWithDrawerItem:C}=_(),w=s(()=>{if(d)return l?.find(e=>J(e)===d)},[d,l]);if(a(()=>{p&&w?C(w):S()},[p,w]),!w)return null;const k=U.find(({type:e})=>e===w.type)||U.find(({label:e})=>"Attributes"===e)?.items?.find(({type:e})=>e===w.type)||U.find(({label:e})=>"Samplers"===e)?.items?.find(({type:e})=>e===w.type);return t(En,{ref:u,title:w.name||w.type,icons:[X(w.type)],isEdit:h,isFormDirty:y,onEdit:e=>{m("boolean"!=typeof e||e)},onSave:e=>{if($({withAlert:!0,alertTitle:Z.Update})){const t=e!==w.type?e:"";x("name",t),i(d,{...b,name:t}),m(!1),v(!1)}},onDelete:()=>{o(d,w.type),m(!1),v(!1),u.current?.closeDrawer()},onCancel:()=>{m(!1),v(!1),C(w)},children:h&&k?t(Fn,{children:t(Nn,{isUpdate:!0,action:k,formData:b,formErrors:f,handleFormChange:(...e)=>{v(!0),x(...e)}})}):e(On,{children:[t(G,{conditions:w.conditions||[]}),t(Y,{title:g.ACTION_DETAILS,data:w?ln(w):[]})]})})},Rn=p(se)`
28
28
  margin-top: 24px;
29
29
  gap: 12px;
30
- `,Mn=({createAction:i})=>{const{currentModal:a,setCurrentModal:o}=Q(),r=a===B.Action,{formData:l,formErrors:s,handleFormChange:c,resetFormData:d,validateForm:u}=_(),[p,h]=n(void 0),m=()=>{d(),h(void 0),o("")},y=()=>{if(!u({withAlert:!0,alertTitle:Z.Create}))return null;i(l),m()};return j({key:"Enter",active:r},()=>y()),t(ee,{isOpen:r,onClose:m,header:{title:"Add Action"},actionComponent:t(le,{buttons:[{variant:"primary",label:"DONE",onClick:y,disabled:!p}]}),children:e(te,{children:[t(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(Rn,{children:[t(ie,{type:ne.Warning,message:ae.DEFINED_FOR_ALL_STREAMS(g.ACTIONS)}),t(oe,{options:U,selectedOption:p,onOptionSelect:e=>{return t=e,d(),c("type",t?.type||""),void h(t);var t},autoFocus:!p?.type})]}),p?.type?e("div",{children:[t(re,{margin:"16px 0"}),t(Nn,{action:p,formData:l,formErrors:s,handleFormChange:c})]}):null]})})},Ln=e=>{const{type:t,fields:{collectContainerAttributes:i,collectReplicaSetAttributes:n,collectWorkloadId:a,collectClusterId:o,labelsAttributes:r,annotationsAttributes:l,clusterAttributes:s,overwriteExistingValues:c,attributeNamesToDelete:d,renames:u,piiCategories:p,fallbackSamplingRatio:h,samplingPercentage:m,endpointsFilters:g,attributeFilters:y,servicesNameFilters:f}}=e;let x="";if(t===v.K8sAttributes&&(i&&(x+="Container Attributes, "),n&&(x+="ReplicaSet Attributes, "),a&&(x+="Workload ID, "),o&&(x+="Cluster ID, "),r?.forEach(({labelKey:e,attributeKey:t,from:i,fromSources:n},a)=>{const o=n?.length?n.join(","):i||b.Pod;x+=`Label: ${e} ${t} ${o} `,a===r.length-1&&(x+=", ")}),l?.forEach(({annotationKey:e,attributeKey:t,from:i,fromSources:n},a)=>{const o=n?.length?n.join(","):i||b.Pod;x+=`Annotation: ${e} ${t} ${o} `,a===l.length-1&&(x+=", ")})),t===v.AddClusterInfo&&(x+=`Overwrite Existing: ${c}\n`,s?.forEach(({attributeName:e,attributeStringValue:t},i)=>{x+=`${e}: ${t}`,i<s.length-1&&(x+=", ")})),t===v.DeleteAttributes&&d?.forEach((e,t)=>{x+=e,t<d.length-1&&(x+=", ")}),t===v.RenameAttributes){const e=Object.entries(u||{});e.forEach(([t,i],n)=>{x+=`${t}: ${i}`,n<e.length-1&&(x+=", ")})}return t===v.PiiMasking&&p?.forEach((e,t)=>{x+=e,t<p.length-1&&(x+=", ")}),t===v.ErrorSampler&&(x+=String(h)),t===v.ProbabilisticSampler&&(x+=String(m),x+="%"),t===v.LatencySampler&&g?.forEach(({serviceName:e,httpRoute:t,minimumLatencyThreshold:i,fallbackSamplingRatio:n},a)=>{x+=`Endpoint${g.length>1?` #${a+1}`:""}=${e}${t}\n`,x+=` Latency=${i}`,x+=` Sampling=${n}`,a<g.length-1&&(x+=", ")}),t===v.ServiceNameSampler&&f?.forEach(({serviceName:e,samplingRatio:t,fallbackSamplingRatio:i})=>{x+=`Service Name: ${e}, `,x+=`Sampling Ratio: ${t}, `,x+=`Fallback Sampling Ratio: ${i}\n`}),t===v.SpanAttributeSampler&&y?.forEach(({serviceName:e,attributeKey:t,fallbackSamplingRatio:i})=>{x+=`Service Name: ${e}, `,x+=`Attribute Key: ${t}, `,x+=`Fallback Sampling Ratio: ${i}\n`}),x},Pn=({conditions:e,id:i})=>{const{errors:n,warnings:a,disableds:o,hasLoadings:r}=s(()=>ce(e),[e]),l=n.length>0?n:a.length>0?a:o.length>0?o:[];if(l.length>0)return t("div",{style:{lineHeight:1},children:t(Kn,{conditions:l,id:i})});const c=r?ue.Loading:ne.Success;return t("div",{style:{lineHeight:1},children:t(de,{status:c,title:c,withBorder:!0,withIcon:!0})})},Kn=({conditions:e,id:i})=>{const n=m();return t(pe,{children:he(e).map(({status:e,type:a,reason:o,message:r,lastTransitionTime:l},s)=>{"loading"!==e&&"disabled"!==e||(e=ne.Info);const c=ge(e,n);return t(me,{titleIcon:c,title:a,text:r||o||"",timestamp:l,children:t(de,{status:e,title:o||a,withBorder:!0,withIcon:!0})},`condition-${i}-${e}-${a}-${s}`)})})},jn=({instrumentationRules:e,sources:t,actions:i,destinations:n,searchText:a,selectedCategory:o})=>{const r=a?e.filter(e=>e.type?.toLowerCase().includes(a)||e.ruleName?.toLowerCase().includes(a)):e,l=a?t.filter(e=>e.name?.toLowerCase().includes(a)||e.otelServiceName?.toLowerCase().includes(a)||e.namespace?.toLowerCase().includes(a)):t,s=a?i.filter(e=>e.type?.toLowerCase().includes(a)||e.name?.toLowerCase().includes(a)):i,c=a?n.filter(e=>e.destinationType.displayName?.toLowerCase().includes(a)||e.name?.toLowerCase().includes(a)):n,d=[{category:B.Source,label:"Sources",count:l.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:r.length,entities:[]}];d.unshift({category:"all",label:"All",count:r.length+l.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?r:e.category===B.Source?l:e.category===B.Action?s:e.category===B.Destination?c:[]}));return{categories:d,searchResults:u}},qn=[{key:"icon",title:""},{key:"name",title:g.NAME,sortable:!0},{key:"signals",title:g.MONITORS},{key:"active-status",title:g.STATUS},{key:"conditions",title:"Conditions"},{key:"type",title:g.TYPE,sortable:!0},{key:"spec",title:"Spec",sortable:!0},{key:"notes",title:g.NOTES,sortable:!0}],Hn=({maxHeight:i,maxWidth:n})=>{const a=m(),o=ye(),{actions:r,actionsLoading:l}=W(),{setDrawerType:c,setDrawerEntityId:d}=K(),u=s(()=>jn({instrumentationRules:[],sources:[],actions:ve(r,o),destinations:[],searchText:o.searchText,selectedCategory:B.Action}).searchResults.find(({category:e})=>e===B.Action)?.entities||[],[r,o]),p=s(()=>u.map(e=>{const{hasErrors:i,hasWarnings:n,hasDisableds:o}=ce(e.conditions||[]);return{status:i?ne.Error:n?ne.Warning:void 0,faded:o,onClick:()=>{c(B.Action),d(e.id)},cells:[{columnKey:"icon",component:()=>t(be,{icon:X(e.type)})},{columnKey:"name",value:fe(e,B.Action,{prioritizeDisplayName:!0})},{columnKey:"type",value:e.type,textColor:a.text.info},{columnKey:"notes",value:e.notes,textColor:a.text.info,withTooltip:!0},{columnKey:"spec",value:Ln(e),textColor:a.text.info,withTooltip:!0},{columnKey:"signals",component:()=>t(xe,{withLabels:!0,monitors:e.signals||[]})},{columnKey:"conditions",component:()=>t(Pn,{conditions:e.conditions||[],id:e.id})},{columnKey:"active-status",component:()=>t("div",{style:{lineHeight:1},children:t(de,{status:e.disabled?ne.Error:ne.Success,title:e.disabled?g.DISABLED:g.ENABLED,withIcon:!0,withBorder:!0})})}]}}),[u]),{badge:h,badgeTooltip:y}=s(()=>u.length!==r.length?{badge:`${u.length}/${r.length}`,badgeTooltip:g.FILTERED_COUNT_TOOLTIP}:{badge:r.length,badgeTooltip:void 0},[u,r]);return e(Se,{$maxWidth:n,children:[t($e,{children:t(Ce,{icon:we(B.Action),title:g.ACTIONS,badge:h,badgeTooltip:y,loading:l})}),t(ke,{$maxHeight:i,children:t(De,{columns:qn,rows:p})}),!u.length&&t(Te,{style:{marginTop:"2rem"},children:t(Ne,{})})]})},zn=p(se)`
30
+ `,Mn=({createAction:i})=>{const{currentModal:a,setCurrentModal:o}=Q(),r=a===B.Action,{formData:l,formErrors:s,handleFormChange:c,resetFormData:d,validateForm:u}=_(),[p,h]=n(void 0),m=()=>{d(),h(void 0),o("")},y=()=>{if(!u({withAlert:!0,alertTitle:Z.Create}))return null;i(l),m()};return K({key:"Enter",active:r},()=>y()),t(ee,{isOpen:r,onClose:m,header:{title:"Add Action"},actionComponent:t(le,{buttons:[{variant:"primary",label:"DONE",onClick:y,disabled:!p}]}),children:e(te,{children:[t(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(Rn,{children:[t(ie,{type:ne.Warning,message:ae.DEFINED_FOR_ALL_STREAMS(g.ACTIONS)}),t(oe,{options:U,selectedOption:p,onOptionSelect:e=>{return t=e,d(),c("type",t?.type||""),void h(t);var t},autoFocus:!p?.type})]}),p?.type?e("div",{children:[t(re,{margin:"16px 0"}),t(Nn,{action:p,formData:l,formErrors:s,handleFormChange:c})]}):null]})})},Ln=e=>{const{type:t,fields:{collectContainerAttributes:i,collectReplicaSetAttributes:n,collectWorkloadId:a,collectClusterId:o,labelsAttributes:r,annotationsAttributes:l,clusterAttributes:s,overwriteExistingValues:c,attributeNamesToDelete:d,renames:u,piiCategories:p,fallbackSamplingRatio:h,samplingPercentage:m,endpointsFilters:g,attributeFilters:y,servicesNameFilters:f}}=e;let x="";if(t===v.K8sAttributes&&(i&&(x+="Container Attributes, "),n&&(x+="ReplicaSet Attributes, "),a&&(x+="Workload ID, "),o&&(x+="Cluster ID, "),r?.forEach(({labelKey:e,attributeKey:t,from:i,fromSources:n},a)=>{const o=n?.length?n.join(","):i||b.Pod;x+=`Label: ${e} ${t} ${o} `,a===r.length-1&&(x+=", ")}),l?.forEach(({annotationKey:e,attributeKey:t,from:i,fromSources:n},a)=>{const o=n?.length?n.join(","):i||b.Pod;x+=`Annotation: ${e} ${t} ${o} `,a===l.length-1&&(x+=", ")})),t===v.AddClusterInfo&&(x+=`Overwrite Existing: ${c}\n`,s?.forEach(({attributeName:e,attributeStringValue:t},i)=>{x+=`${e}: ${t}`,i<s.length-1&&(x+=", ")})),t===v.DeleteAttributes&&d?.forEach((e,t)=>{x+=e,t<d.length-1&&(x+=", ")}),t===v.RenameAttributes){const e=Object.entries(u||{});e.forEach(([t,i],n)=>{x+=`${t}: ${i}`,n<e.length-1&&(x+=", ")})}return t===v.PiiMasking&&p?.forEach((e,t)=>{x+=e,t<p.length-1&&(x+=", ")}),t===v.ErrorSampler&&(x+=String(h)),t===v.ProbabilisticSampler&&(x+=String(m),x+="%"),t===v.LatencySampler&&g?.forEach(({serviceName:e,httpRoute:t,minimumLatencyThreshold:i,fallbackSamplingRatio:n},a)=>{x+=`Endpoint${g.length>1?` #${a+1}`:""}=${e}${t}\n`,x+=` Latency=${i}`,x+=` Sampling=${n}`,a<g.length-1&&(x+=", ")}),t===v.ServiceNameSampler&&f?.forEach(({serviceName:e,samplingRatio:t,fallbackSamplingRatio:i})=>{x+=`Service Name: ${e}, `,x+=`Sampling Ratio: ${t}, `,x+=`Fallback Sampling Ratio: ${i}\n`}),t===v.SpanAttributeSampler&&y?.forEach(({serviceName:e,attributeKey:t,fallbackSamplingRatio:i})=>{x+=`Service Name: ${e}, `,x+=`Attribute Key: ${t}, `,x+=`Fallback Sampling Ratio: ${i}\n`}),x},Pn=({conditions:e,id:i})=>{const{errors:n,warnings:a,disableds:o,hasLoadings:r}=s(()=>ce(e),[e]),l=n.length>0?n:a.length>0?a:o.length>0?o:[];if(l.length>0)return t("div",{style:{lineHeight:1},children:t(jn,{conditions:l,id:i})});const c=r?ue.Loading:ne.Success;return t("div",{style:{lineHeight:1},children:t(de,{status:c,title:c,withBorder:!0,withIcon:!0})})},jn=({conditions:e,id:i})=>{const n=m();return t(pe,{children:he(e).map(({status:e,type:a,reason:o,message:r,lastTransitionTime:l},s)=>{"loading"!==e&&"disabled"!==e||(e=ne.Info);const c=ge(e,n);return t(me,{titleIcon:c,title:a,text:r||o||"",timestamp:l,children:t(de,{status:e,title:o||a,withBorder:!0,withIcon:!0})},`condition-${i}-${e}-${a}-${s}`)})})},Kn=({instrumentationRules:e,sources:t,actions:i,destinations:n,searchText:a,selectedCategory:o})=>{const r=a?e.filter(e=>e.type?.toLowerCase().includes(a)||e.ruleName?.toLowerCase().includes(a)):e,l=a?t.filter(e=>e.name?.toLowerCase().includes(a)||e.otelServiceName?.toLowerCase().includes(a)||e.namespace?.toLowerCase().includes(a)):t,s=a?i.filter(e=>e.type?.toLowerCase().includes(a)||e.name?.toLowerCase().includes(a)):i,c=a?n.filter(e=>e.destinationType.displayName?.toLowerCase().includes(a)||e.name?.toLowerCase().includes(a)):n,d=[{category:B.Source,label:"Sources",count:l.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:r.length,entities:[]}];d.unshift({category:"all",label:"All",count:r.length+l.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?r:e.category===B.Source?l:e.category===B.Action?s:e.category===B.Destination?c:[]}));return{categories:d,searchResults:u}},qn=[{key:"icon",title:""},{key:"name",title:g.NAME,sortable:!0},{key:"signals",title:g.MONITORS},{key:"active-status",title:g.STATUS},{key:"conditions",title:"Conditions"},{key:"type",title:g.TYPE,sortable:!0},{key:"spec",title:"Spec",sortable:!0},{key:"notes",title:g.NOTES,sortable:!0}],Hn=({maxHeight:i,maxWidth:n})=>{const a=m(),o=ye(),{actions:r,actionsLoading:l}=W(),{setDrawerType:c,setDrawerEntityId:d}=j(),u=s(()=>Kn({instrumentationRules:[],sources:[],actions:ve(r,o),destinations:[],searchText:o.searchText,selectedCategory:B.Action}).searchResults.find(({category:e})=>e===B.Action)?.entities||[],[r,o]),p=s(()=>u.map(e=>{const{hasErrors:i,hasWarnings:n,hasDisableds:o}=ce(e.conditions||[]);return{status:i?ne.Error:n?ne.Warning:void 0,faded:o,onClick:()=>{c(B.Action),d(e.id)},cells:[{columnKey:"icon",component:()=>t(be,{icon:X(e.type)})},{columnKey:"name",value:fe(e,B.Action,{prioritizeDisplayName:!0})},{columnKey:"type",value:e.type,textColor:a.text.info},{columnKey:"notes",value:e.notes,textColor:a.text.info,withTooltip:!0},{columnKey:"spec",value:Ln(e),textColor:a.text.info,withTooltip:!0},{columnKey:"signals",component:()=>t(xe,{withLabels:!0,monitors:e.signals||[]})},{columnKey:"conditions",component:()=>t(Pn,{conditions:e.conditions||[],id:e.id})},{columnKey:"active-status",component:()=>t("div",{style:{lineHeight:1},children:t(de,{status:e.disabled?ne.Error:ne.Success,title:e.disabled?g.DISABLED:g.ENABLED,withIcon:!0,withBorder:!0})})}]}}),[u]),{badge:h,badgeTooltip:y}=s(()=>u.length!==r.length?{badge:`${u.length}/${r.length}`,badgeTooltip:g.FILTERED_COUNT_TOOLTIP}:{badge:r.length,badgeTooltip:void 0},[u,r]);return e(Se,{$maxWidth:n,children:[t($e,{children:t(Ce,{icon:we(B.Action),title:g.ACTIONS,badge:h,badgeTooltip:y,loading:l})}),t(ke,{$maxHeight:i,children:t(De,{columns:qn,rows:p})}),!u.length&&t(Te,{style:{marginTop:"2rem"},children:t(Ne,{})})]})},zn=p(se)`
31
31
  // width: 100vw;
32
32
  // height: 100vh;
33
33
  gap: 64px;
@@ -101,7 +101,7 @@ import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import{useState
101
101
  align-items: center;
102
102
  justify-content: center;
103
103
  white-space: nowrap;
104
- `,ta=({entityId:i,entityType:n,status:a,faded:o,title:r,subTitle:l,tooltip:s,label:c,icon:d,icons:u,iconSrc:p,iconSrcs:h,monitors:g,isActive:y,raw:v})=>{const b=m(),f=n===B.Source,x="boolean"==typeof y,{setDrawerType:S,setDrawerEntityId:$}=K(),{selectedSources:C,setSelectedSources:w}=Re(),k={...C},{namespace:D,name:T,kind:N}=v;f&&!k[D]&&(k[D]=[]);const E=f?k[D].findIndex(e=>e.name===T&&e.kind===N):-1;return t(Me,{"data-id":n===B.Source?`${i.namespace}-${i.name}-${i.kind}`:i,title:r,subTitle:l,onClick:()=>{S(n),$(i)},renderActions:()=>{const i=f&&(!v.conditions?.length||v.conditions?.some(({status:e})=>"loading"===e)),n=x&&!y?ge(ne.Info,b):a?ge(a,b):void 0,o=i?t(Oe,{scale:.8}):n?t(n,{size:14}):null;return c?e(ea,{$isError:a===ne.Error,children:[t(me,{text:s||"Heads up! The data-flow metrics you see are calculated over 10-second intervals.",children:c}),o]}):o||null},iconProps:{icon:d,icons:u,iconSrc:p,iconSrcs:h},visualProps:{status:a,faded:o||x&&!y,monitors:g||void 0},checkboxProps:{withCheckbox:f,isChecked:-1!==E,onCheckboxChange:()=>{-1===E?k[D].push(v):k[D].splice(E,1),w(k)}}})},ia=p.div`
104
+ `,ta=({entityId:i,entityType:n,status:a,faded:o,title:r,subTitle:l,tooltip:s,label:c,icon:d,icons:u,iconSrc:p,iconSrcs:h,monitors:g,isActive:y,raw:v})=>{const b=m(),f=n===B.Source,x="boolean"==typeof y,{setDrawerType:S,setDrawerEntityId:$}=j(),{selectedSources:C,setSelectedSources:w}=Re(),k={...C},{namespace:D,name:T,kind:N}=v;f&&!k[D]&&(k[D]=[]);const E=f?k[D].findIndex(e=>e.name===T&&e.kind===N):-1;return t(Me,{"data-id":n===B.Source?`${i.namespace}-${i.name}-${i.kind}`:i,title:r,subTitle:l,onClick:()=>{S(n),$(i)},renderActions:()=>{const i=f&&(!v.conditions?.length||v.conditions?.some(({status:e})=>"loading"===e)),n=x&&!y?ge(ne.Info,b):a?ge(a,b):void 0,o=i?t(Oe,{scale:.8}):n?t(n,{size:14}):null;return c?e(ea,{$isError:a===ne.Error,children:[t(me,{text:s||"Heads up! The data-flow metrics you see are calculated over 10-second intervals.",children:c}),o]}):o||null},iconProps:{icon:d,icons:u,iconSrc:p,iconSrcs:h},visualProps:{status:a,faded:o||x&&!y,monitors:g||void 0},checkboxProps:{withCheckbox:f,isChecked:-1!==E,onCheckboxChange:()=>{-1===E?k[D].push(v):k[D].splice(E,1),w(k)}}})},ia=p.div`
105
105
  height: calc(${({$height:e})=>e}px - 24px);
106
106
  width: calc(100% - 24px);
107
107
  padding: 12px;
@@ -124,7 +124,7 @@ import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import{useState
124
124
  justify-content: center;
125
125
 
126
126
  pointer-events: none;
127
- `,aa=({height:i,entityType:n,entities:a,metrics:o})=>{const{isVm:r}=Le(),l=s(()=>a.map(e=>{const i=J(e);if(!i)return null;const a=[B.Source,B.Destination].includes(n),l=[B.Destination,B.Action].includes(n),s=[B.Destination,B.Action,B.InstrumentationRule].includes(n),c=l?n==B.Destination?Pe(e.exportedSignals):e.signals:void 0,d=a?o?.[`${n.toLowerCase()}s`]?.find(e=>JSON.stringify(J(e))===JSON.stringify(i)):void 0,u=s?!e.disabled:void 0,p=fe(e,n,{extended:n===B.Source,prioritizeDisplayName:n!==B.Source}),h=((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""}})(n,e,r),m=a?Ke(d?.throughput):void 0,{priorotizedStatus:g,hasDisableds:y}=ce(e.conditions||[]),{icons:v,icon:b,iconSrc:f}=((e,t)=>{switch(e){case B.Source:return{icons:ze(t.containers),icon:we(e)};case B.Destination:return He(t.destinationType.type);case B.Action:return{icon:X(t.type)};case B.InstrumentationRule:return{icon:qe(t.type)};default:return{icon:we(e)}}})(n,e),x=n===B.Source?e.podsAgentInjectionStatus:void 0,S=x?(e=>{switch(e){case Ve.Error:return ne.Error;case Ve.Notice:return ne.Warning;case Ve.Waiting:return ne.Info}})(x.status):void 0,$=x&&S?x.message:void 0;return t(ta,{entityType:n,entityId:i,raw:e,title:p,subTitle:h,faded:y,status:S||g,tooltip:$,label:m,icons:v,icon:b,iconSrc:f,monitors:c,isActive:u},JSON.stringify(i))}),[a,n,o,r]);return e(ia,{$height:i,children:[t(je,{containerHeight:i-24,elementHeight:80,elements:l}),t(na,{$hide:!0})]})},oa=p.div`
127
+ `,aa=({height:i,entityType:n,entities:a,metrics:o})=>{const{isVm:r}=Le(),l=s(()=>a.map(e=>{const i=J(e);if(!i)return null;const a=[B.Source,B.Destination].includes(n),l=[B.Destination,B.Action].includes(n),s=[B.Destination,B.Action,B.InstrumentationRule].includes(n),c=l?n==B.Destination?Pe(e.exportedSignals):e.signals:void 0,d=a?o?.[`${n.toLowerCase()}s`]?.find(e=>JSON.stringify(J(e))===JSON.stringify(i)):void 0,u=s?!e.disabled:void 0,p=fe(e,n,{extended:n===B.Source,prioritizeDisplayName:n!==B.Source}),h=((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""}})(n,e,r),m=a?je(d?.throughput):void 0,{priorotizedStatus:g,hasDisableds:y}=ce(e.conditions||[]),{icons:v,icon:b,iconSrc:f}=((e,t)=>{switch(e){case B.Source:return{icons:ze(t.containers),icon:we(e)};case B.Destination:return He(t.destinationType.type);case B.Action:return{icon:X(t.type)};case B.InstrumentationRule:return{icon:qe(t.type)};default:return{icon:we(e)}}})(n,e),x=n===B.Source?e.podsAgentInjectionStatus:void 0,S=x?(e=>{switch(e){case Ve.Error:return ne.Error;case Ve.Notice:return ne.Warning;case Ve.Waiting:return ne.Info}})(x.status):void 0,$=x&&S?x.message:void 0;return t(ta,{entityType:n,entityId:i,raw:e,title:p,subTitle:h,faded:y,status:S||g,tooltip:$,label:m,icons:v,icon:b,iconSrc:f,monitors:c,isActive:u},JSON.stringify(i))}),[a,n,o,r]);return e(ia,{$height:i,children:[t(Ke,{containerHeight:i-24,elementHeight:80,elements:l}),t(na,{$hide:!0})]})},oa=p.div`
128
128
  width: ${({$isVm:e})=>e?"45vw":"22vw"};
129
129
  display: flex;
130
130
  flex-direction: column;
@@ -153,7 +153,7 @@ import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import{useState
153
153
  display: flex;
154
154
  align-items: center;
155
155
  overflow-x: scroll;
156
- `,ua=({onClose:i})=>{const o=m(),{onClickNode:r}=Qe(),{searchText:l}=ye(),{selectedStreamName:d}=Je(),{sources:u,destinations:p,actions:h,instrumentationRules:g}=W(),{popupRef:y,popupOpen:v,setPopupOpen:b,popupPosition:f,handlePosition:x}=et();a(()=>{v||(x(0,50),b(!0))},[v]);const[S,$]=n("all"),{categories:C,searchResults:w}=s(()=>jn({instrumentationRules:g,sources:Ge(u,d),actions:h,destinations:Ye(p,d),searchText:l,selectedCategory:S}),[g,u,h,p,d,l,S]);return w.length?t(tt,{ref:y,isOpen:v,top:f.top,left:f.left,maxWidth:"420px",header:t(da,{children:C.map(({category:e,label:i,count:n})=>!!n&&t(nt,{label:i,badgeLabel:n,isSelected:S===e,onClick:()=>$(e)},`category-select-${e}`))}),children:w.map(({category:n,label:a,entities:l},s)=>!!l.length&&e(c,{children:[e(it,{style:{maxHeight:"all"!==S?"240px":"140px",padding:"12px 0"},children:[t(P,{size:12,family:"secondary",color:o.text.darker_grey,style:{marginLeft:"16px"},children:a}),l.map((e,a)=>t(nt,{icon:we(n),label:fe(e,n,{extended:!0}),onClick:()=>{const t=J(e);r(null,{data:{type:n,id:t}}),i()},style:{width:"100%",justifyContent:"flex-start"},color:"transparent"},`entity-${s}-${a}`))]}),t(re,{thickness:s===w.length-1?0:1,length:"90%",margin:"8px auto"})]},`category-list-${n}`))}):t(tt,{ref:y,isOpen:v,top:f.top,left:f.left,children:t(Ne,{})})},pa=({preventPopup:i=!1})=>{const{searchText:a,setSearchText:o}=ye(),[l,s]=n(!1),c=!!a||l,d=()=>{o(""),s(!1)},u=r(null);return at(u,d),j({key:"Escape",active:c},d),e(ca,{ref:u,children:[t(C,{placeholder:"Search",icon:Mi,value:a,onChange:e=>o(e.target.value.toLowerCase()),onFocus:()=>s(!0)}),c&&!i?t(ua,{onClose:d}):null]})},ha=({sources:e,title:i="Condition",value:n,onSelect:a,onDeselect:o,...r})=>{const l=s(()=>{const t=[];return e.forEach(({conditions:e})=>{e?.forEach(({type:e,reason:i})=>{t.find(t=>t.id===`${e}#${i}`)||t.push({id:`${e}#${i}`,value:`${ot(e)} - ${ot(i)}`})})}),t.sort((e,t)=>e.id?.localeCompare(t.id||"")||0)},[e]);return t(rt,{disabled:!l?.length,title:i,placeholder:"All",options:l,value:n,onSelect:a,onDeselect:o,...r})},ma=({sources:e,title:i="Error Message",value:n,onSelect:a,onDeselect:o,disabled:r,...l})=>{const c=s(()=>{const t=[];return e.forEach(({conditions:e})=>{he(e||[]).forEach(({status:e,message:i,reason:n})=>{e!==ne.Error||t.find(e=>e.id===i)||(i?t.find(e=>e.id===i)||t.push({id:i,value:i}):n&&(t.find(e=>e.id===n)||t.push({id:n,value:n})))})}),t},[e]);return t(rt,{disabled:r||!c?.length,title:i,placeholder:"All",options:c,value:n,onSelect:a,onDeselect:o,...l})},ga=({sources:e,title:i="Programming Language",value:n,onSelect:a,onDeselect:o,...r})=>{const l=s(()=>{const t=[];return e.forEach(({containers:e})=>{e?.forEach(({language:e})=>{t.find(t=>t.id===e)||t.push({id:e,value:lt[e]||e})})}),t.sort((e,t)=>e.id?.localeCompare(t.id||"")||0)},[e]);return t(rt,{disabled:!l?.length,title:i,placeholder:"All",options:l,value:n,onSelect:a,onDeselect:o,...r})},ya=({title:e="Monitors",value:i,onSelect:n,onDeselect:a,...o})=>{const r=s(()=>{const e=[];return st.forEach(({id:t,value:i})=>{e.find(e=>e.id===t)||e.push({id:t,value:i})}),e},[]);return t(rt,{disabled:!r?.length,title:e,placeholder:"All",options:r,value:i,onSelect:n,onDeselect:a,...o})},va=({namespaces:e,title:i="Namespace",value:n,onSelect:a,onDeselect:o,...r})=>{const l=s(()=>{const t=[];return e?.forEach(({name:e})=>{t.find(t=>t.id===e)||t.push({id:e,value:e})}),t},[e]);return t(rt,{disabled:!l?.length,title:i,placeholder:"Select namespace",options:l,value:n,onSelect:a,onDeselect:o,...r})},ba=({sources:e,title:i="Kind",value:n,onSelect:a,onDeselect:o,...r})=>{const l=s(()=>{const t=[];return e.forEach(({kind:e})=>{t.find(t=>t.id===e)||t.push({id:e,value:e})}),t},[e]);return t(rt,{disabled:!l?.length,title:i,placeholder:"All",options:l,value:n,onSelect:a,onDeselect:o,...r})},fa=({sources:e,title:i="Agent Injection Status",value:n,onSelect:a,onDeselect:o,disabled:r,...l})=>{const c=s(()=>{const t=[];return e.forEach(({podsAgentInjectionStatus:e})=>{const{reasonEnum:i,message:n}=e||{};i?t.find(e=>e.id===i)||t.push({id:i,value:ot(i)}):n&&(t.find(e=>e.id===n)||t.push({id:n,value:n}))}),t},[e]);return t(rt,{disabled:r||!c?.length,title:i,placeholder:"All",options:c,value:n,onSelect:a,onDeselect:o,...l})},xa=p.div`
156
+ `,ua=({onClose:i})=>{const o=m(),{onClickNode:r}=Qe(),{searchText:l}=ye(),{selectedStreamName:d}=Je(),{sources:u,destinations:p,actions:h,instrumentationRules:g}=W(),{popupRef:y,popupOpen:v,setPopupOpen:b,popupPosition:f,handlePosition:x}=et();a(()=>{v||(x(0,50),b(!0))},[v]);const[S,$]=n("all"),{categories:C,searchResults:w}=s(()=>Kn({instrumentationRules:g,sources:Ge(u,d),actions:h,destinations:Ye(p,d),searchText:l,selectedCategory:S}),[g,u,h,p,d,l,S]);return w.length?t(tt,{ref:y,isOpen:v,top:f.top,left:f.left,maxWidth:"420px",header:t(da,{children:C.map(({category:e,label:i,count:n})=>!!n&&t(nt,{label:i,badgeLabel:n,isSelected:S===e,onClick:()=>$(e)},`category-select-${e}`))}),children:w.map(({category:n,label:a,entities:l},s)=>!!l.length&&e(c,{children:[e(it,{style:{maxHeight:"all"!==S?"240px":"140px",padding:"12px 0"},children:[t(P,{size:12,family:"secondary",color:o.text.darker_grey,style:{marginLeft:"16px"},children:a}),l.map((e,a)=>t(nt,{icon:we(n),label:fe(e,n,{extended:!0}),onClick:()=>{const t=J(e);r(null,{data:{type:n,id:t}}),i()},style:{width:"100%",justifyContent:"flex-start"},color:"transparent"},`entity-${s}-${a}`))]}),t(re,{thickness:s===w.length-1?0:1,length:"90%",margin:"8px auto"})]},`category-list-${n}`))}):t(tt,{ref:y,isOpen:v,top:f.top,left:f.left,children:t(Ne,{})})},pa=({preventPopup:i=!1})=>{const{searchText:a,setSearchText:o}=ye(),[l,s]=n(!1),c=!!a||l,d=()=>{o(""),s(!1)},u=r(null);return at(u,d),K({key:"Escape",active:c},d),e(ca,{ref:u,children:[t(C,{placeholder:"Search",icon:Mi,value:a,onChange:e=>o(e.target.value.toLowerCase()),onFocus:()=>s(!0)}),c&&!i?t(ua,{onClose:d}):null]})},ha=({sources:e,title:i="Condition",value:n,onSelect:a,onDeselect:o,...r})=>{const l=s(()=>{const t=[];return e.forEach(({conditions:e})=>{e?.forEach(({type:e,reason:i})=>{t.find(t=>t.id===`${e}#${i}`)||t.push({id:`${e}#${i}`,value:`${ot(e)} - ${ot(i)}`})})}),t.sort((e,t)=>e.id?.localeCompare(t.id||"")||0)},[e]);return t(rt,{disabled:!l?.length,title:i,placeholder:"All",options:l,value:n,onSelect:a,onDeselect:o,...r})},ma=({sources:e,title:i="Error Message",value:n,onSelect:a,onDeselect:o,disabled:r,...l})=>{const c=s(()=>{const t=[];return e.forEach(({conditions:e})=>{he(e||[]).forEach(({status:e,message:i,reason:n})=>{e!==ne.Error||t.find(e=>e.id===i)||(i?t.find(e=>e.id===i)||t.push({id:i,value:i}):n&&(t.find(e=>e.id===n)||t.push({id:n,value:n})))})}),t},[e]);return t(rt,{disabled:r||!c?.length,title:i,placeholder:"All",options:c,value:n,onSelect:a,onDeselect:o,...l})},ga=({sources:e,title:i="Programming Language",value:n,onSelect:a,onDeselect:o,...r})=>{const l=s(()=>{const t=[];return e.forEach(({containers:e})=>{e?.forEach(({language:e})=>{t.find(t=>t.id===e)||t.push({id:e,value:lt[e]||e})})}),t.sort((e,t)=>e.id?.localeCompare(t.id||"")||0)},[e]);return t(rt,{disabled:!l?.length,title:i,placeholder:"All",options:l,value:n,onSelect:a,onDeselect:o,...r})},ya=({title:e="Monitors",value:i,onSelect:n,onDeselect:a,...o})=>{const r=s(()=>{const e=[];return st.forEach(({id:t,value:i})=>{e.find(e=>e.id===t)||e.push({id:t,value:i})}),e},[]);return t(rt,{disabled:!r?.length,title:e,placeholder:"All",options:r,value:i,onSelect:n,onDeselect:a,...o})},va=({namespaces:e,title:i="Namespace",value:n,onSelect:a,onDeselect:o,...r})=>{const l=s(()=>{const t=[];return e?.forEach(({name:e})=>{t.find(t=>t.id===e)||t.push({id:e,value:e})}),t},[e]);return t(rt,{disabled:!l?.length,title:i,placeholder:"Select namespace",options:l,value:n,onSelect:a,onDeselect:o,...r})},ba=({sources:e,title:i="Kind",value:n,onSelect:a,onDeselect:o,...r})=>{const l=s(()=>{const t=[];return e.forEach(({kind:e})=>{t.find(t=>t.id===e)||t.push({id:e,value:e})}),t},[e]);return t(rt,{disabled:!l?.length,title:i,placeholder:"All",options:l,value:n,onSelect:a,onDeselect:o,...r})},fa=({sources:e,title:i="Agent Injection Status",value:n,onSelect:a,onDeselect:o,disabled:r,...l})=>{const c=s(()=>{const t=[];return e.forEach(({podsAgentInjectionStatus:e})=>{const{reasonEnum:i,message:n}=e||{};i?t.find(e=>e.id===i)||t.push({id:i,value:ot(i)}):n&&(t.find(e=>e.id===n)||t.push({id:n,value:n}))}),t},[e]);return t(rt,{disabled:r||!c?.length,title:i,placeholder:"All",options:c,value:n,onSelect:a,onDeselect:o,...l})},xa=p.div`
157
157
  display: flex;
158
158
  flex-direction: column;
159
159
  gap: 12px;
@@ -165,7 +165,7 @@ import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import{useState
165
165
  ${({$color:e})=>`color: ${e};`}
166
166
  `,Ca=p.div`
167
167
  margin-left: auto;
168
- `,wa=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},ka=()=>{const i=m(),{namespaces:o,sources:l}=W(),{selectedStreamName:c}=Je(),{getItemSS:d,setItemSS:u,removeItemSS:p}=dt(),{popupRef:h,popupOpen:g,setPopupOpen:y,popupPosition:v,handlePosition:b}=et(),{namespaces:f,kinds:x,monitors:S,languages:$,conditions:C,errors:w,onlyErrors:k,podsAgentInjectionStatus:D,setAll:N,clearAll:E,getEmptyState:A}=ye(),F=s(()=>Ge(l,c),[l,c]),[O,I]=n({namespaces:f,kinds:x,monitors:S,languages:$,conditions:C,errors:w,onlyErrors:k,podsAgentInjectionStatus:D}),[R,M]=n(wa(O));a(()=>{const e=d(ct.OVERVIEW_FILTERS,A());N(e)},[]),a(()=>{if(!g){const e={namespaces:f,kinds:x,monitors:S,languages:$,conditions:C,errors:w,onlyErrors:k};I(e),M(wa(e))}},[g,f,x,S,$,C,w,k]);const L=()=>{y(!1)},P=r(null);return at(P,L),j({key:"Escape",active:g},L),e(ca,{ref:P,children:[t(nt,{label:"Filters",icon:Li,badgeLabel:R,badgeFilled:!!R,withBorder:!0,color:"transparent",onClick:()=>{b(0,50),y(!0)}}),t(tt,{ref:h,isOpen:g,top:v.top,left:v.left,width:"420px",footer:e(pe,{children:[t($a,{variant:"primary",onClick:()=>{u(ct.OVERVIEW_FILTERS,O),N(O),M(wa(O)),y(!1)},children:"Apply"}),t($a,{variant:"secondary",onClick:L,children:"Cancel"}),t(Ca,{children:t($a,{variant:"tertiary",onClick:()=>{p(ct.OVERVIEW_FILTERS),E(),I(A()),M(0),y(!1)},$color:i.text.error,children:"Reset"})})]}),children:e(xa,{children:[t(va,{namespaces:o,value:O.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}),t(ba,{sources:F,value:O.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}),t(ga,{sources:F,value:O.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}),t(ya,{value:O.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}),t(ha,{sources:F,value:O.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}),t(fa,{sources:F,value:O.podsAgentInjectionStatus,onSelect:e=>I(t=>({...t,podsAgentInjectionStatus:[...t.podsAgentInjectionStatus||[],e]})),onDeselect:e=>I(t=>({...t,podsAgentInjectionStatus:(t.podsAgentInjectionStatus||[]).filter(t=>t.id!==e.id)})),showSearch:!0,required:!0,isMulti:!0}),t(Sa,{children:t(T,{title:"Show only sources with errors",initialValue:O.onlyErrors,onChange:e=>I(t=>({...t,errors:[],onlyErrors:e}))})}),t(ma,{sources:F,value:O.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:!O.onlyErrors,showSearch:!0,required:!0,isMulti:!0})]})})]})},Da=p.div`
168
+ `,wa=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},ka=()=>{const i=m(),{namespaces:o,sources:l}=W(),{selectedStreamName:c}=Je(),{getItemSS:d,setItemSS:u,removeItemSS:p}=dt(),{popupRef:h,popupOpen:g,setPopupOpen:y,popupPosition:v,handlePosition:b}=et(),{namespaces:f,kinds:x,monitors:S,languages:$,conditions:C,errors:w,onlyErrors:k,podsAgentInjectionStatus:D,setAll:N,clearAll:E,getEmptyState:A}=ye(),F=s(()=>Ge(l,c),[l,c]),[O,I]=n({namespaces:f,kinds:x,monitors:S,languages:$,conditions:C,errors:w,onlyErrors:k,podsAgentInjectionStatus:D}),[R,M]=n(wa(O));a(()=>{const e=d(ct.OVERVIEW_FILTERS,A());N(e)},[]),a(()=>{if(!g){const e={namespaces:f,kinds:x,monitors:S,languages:$,conditions:C,errors:w,onlyErrors:k};I(e),M(wa(e))}},[g,f,x,S,$,C,w,k]);const L=()=>{y(!1)},P=r(null);return at(P,L),K({key:"Escape",active:g},L),e(ca,{ref:P,children:[t(nt,{label:"Filters",icon:Li,badgeLabel:R,badgeFilled:!!R,withBorder:!0,color:"transparent",onClick:()=>{b(0,50),y(!0)}}),t(tt,{ref:h,isOpen:g,top:v.top,left:v.left,width:"420px",footer:e(pe,{children:[t($a,{variant:"primary",onClick:()=>{u(ct.OVERVIEW_FILTERS,O),N(O),M(wa(O)),y(!1)},children:"Apply"}),t($a,{variant:"secondary",onClick:L,children:"Cancel"}),t(Ca,{children:t($a,{variant:"tertiary",onClick:()=>{p(ct.OVERVIEW_FILTERS),E(),I(A()),M(0),y(!1)},$color:i.text.error,children:"Reset"})})]}),children:e(xa,{children:[t(va,{namespaces:o,value:O.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}),t(ba,{sources:F,value:O.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}),t(ga,{sources:F,value:O.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}),t(ya,{value:O.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}),t(ha,{sources:F,value:O.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}),t(fa,{sources:F,value:O.podsAgentInjectionStatus,onSelect:e=>I(t=>({...t,podsAgentInjectionStatus:[...t.podsAgentInjectionStatus||[],e]})),onDeselect:e=>I(t=>({...t,podsAgentInjectionStatus:(t.podsAgentInjectionStatus||[]).filter(t=>t.id!==e.id)})),showSearch:!0,required:!0,isMulti:!0}),t(Sa,{children:t(T,{title:"Show only sources with errors",initialValue:O.onlyErrors,onChange:e=>I(t=>({...t,errors:[],onlyErrors:e}))})}),t(ma,{sources:F,value:O.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:!O.onlyErrors,showSearch:!0,required:!0,isMulti:!0})]})})]})},Da=p.div`
169
169
  display: flex;
170
170
  flex-direction: column;
171
171
  gap: 24px;
@@ -200,9 +200,9 @@ import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import{useState
200
200
  margin: 20px 0;
201
201
  padding: 0 16px;
202
202
  gap: 8px;
203
- `,Ka=p.div`
203
+ `,ja=p.div`
204
204
  margin-left: auto;
205
- `,ja=({addEntity:i,preventSearchPopup:n,onClickNewDataStream:a,updateDataStream:o,deleteDataStream:r})=>{const{isVm:l}=Le(),{setCurrentModal:s}=Q();return e(Pa,{children:[!l&&t(La,{onClickNewDataStream:a,updateDataStream:o,deleteDataStream:r}),t(pa,{preventPopup:n}),t(ka,{}),i&&t(Ka,{children:t(yt,{"data-id":`add-${i}`,onClick:()=>s(i),label:`${q.ADD} ${ot(i)}`,variant:"primary",textProps:{weight:900}})})]})},qa=o(({isModal:i,onClickSummary:n},a)=>{const{selectedStreamName:o}=Je(),{formData:r,handleFormChange:s,formErrors:c,validateForm:d}=ut({name:o});return l(a,()=>({validateForm:d,getFormValues:()=>r})),t(te,{$isNotModal:!i,children:e(se,{$gap:24,children:[n&&t(vt,{onClick:n}),t(I,{title:g.NAME_YOUR_STREAM,description:g.STREAM_DESCRIPTION}),t(Ta,{formData:r,handleFormChange:s,formErrors:c})]})})});qa.displayName=qa.name;const Ha=({createDataStream:e})=>{const{currentModal:i,setCurrentModal:n}=Q(),{addDataStreams:a,setSelectedStreamName:o}=Je(),l=i===bt.DataStream,s=()=>n(""),c=async()=>{if(d.current&&d.current.validateForm()){const t=d.current.getFormValues();e?e(t):(a([t]),o(t.name)),s()}},d=r(null);return j({key:"Enter",active:l},c),t(ee,{isOpen:l,onClose:s,header:{title:"Add Data Stream"},actionComponent:t(le,{buttons:[{label:"DONE",variant:"primary",onClick:c}]}),children:t(qa,{ref:d,isModal:!0})})},za=(e,t)=>{const{destinationType:i,disabled:n,exportedSignals:a}=e,o=[{title:g.TYPE,value:i.type},{type:y.ActiveStatus,title:g.STATUS,value:String(!n)},{type:y.Monitors,title:g.MONITORS,value:Pe(a).join(", ")},{title:g.NAME,value:i.displayName}],r=ft(e,t),l=r.map(e=>({name:e.key,value:e.value}));return r.map(({key:e,name:i,value:n})=>{const{secret:r,componentProperties:s,hideFromReadData:c,customReadDataLabels:d}=t.find(t=>t.name===e)||{};if(!c?.length||!xt(c,Pe(a),l)){const{type:e}=St(s,{type:""}),t=(r||"password"===e)&&n.length?new Array(10).fill("•").join(""):"";o.push({type:y.Divider}),d?.length?d.forEach(({condition:e,...t})=>{e==n&&o.push({title:t.title,value:t.value})}):o.push({title:i,value:t||n})}}),o},Va=({signals:e,fields:i,onChange:n,formErrors:a})=>i?.map(o=>{const{componentType:r,renderCondition:l,...s}=o;if(l&&!xt(l,e,i))return null;switch(r){case A.Input:return t(C,{...s,onChange:e=>n(o.name,e.target.value),errorMessage:a[o.name]},o.name);case A.Dropdown:return t(rt,{...s,showSearch:!0,value:{id:s.value||"",value:s.value||""},options:s.options||[],onSelect:e=>n(o.name,e.id),errorMessage:a[o.name]},o.name);case A.MultiInput:return t(E,{...s,value:"string"==typeof s.value?St(s.value,[]):s.value,onChange:e=>n(o.name,JSON.stringify(e)),errorMessage:a[o.name]},o.name);case A.KeyValuePair:return t(N,{...s,value:"string"==typeof s.value?St(s.value,[]):s.value,onChange:e=>n(o.name,JSON.stringify(e)),errorMessage:a[o.name]},o.name);case A.TextArea:return t(L,{...s,onChange:e=>n(o.name,e.target.value),errorMessage:a[o.name]},o.name);case A.Checkbox:return t(S,{...s,value:"true"==s.value,onChange:e=>n(o.name,String(e)),errorMessage:a[o.name]},o.name);default:return null}}),Ba=p(Ie)`
205
+ `,Ka=({addEntity:i,preventSearchPopup:n,onClickNewDataStream:a,updateDataStream:o,deleteDataStream:r})=>{const{isVm:l}=Le(),{setCurrentModal:s}=Q();return e(Pa,{children:[!l&&t(La,{onClickNewDataStream:a,updateDataStream:o,deleteDataStream:r}),t(pa,{preventPopup:n}),t(ka,{}),i&&t(ja,{children:t(yt,{"data-id":`add-${i}`,onClick:()=>s(i),label:`${q.ADD} ${ot(i)}`,variant:"primary",textProps:{weight:900}})})]})},qa=o(({isModal:i,onClickSummary:n},a)=>{const{selectedStreamName:o}=Je(),{formData:r,handleFormChange:s,formErrors:c,validateForm:d}=ut({name:o});return l(a,()=>({validateForm:d,getFormValues:()=>r})),t(te,{$isNotModal:!i,children:e(se,{$gap:24,children:[n&&t(vt,{onClick:n}),t(I,{title:g.NAME_YOUR_STREAM,description:g.STREAM_DESCRIPTION}),t(Ta,{formData:r,handleFormChange:s,formErrors:c})]})})});qa.displayName=qa.name;const Ha=({createDataStream:e})=>{const{currentModal:i,setCurrentModal:n}=Q(),{addDataStreams:a,setSelectedStreamName:o}=Je(),l=i===bt.DataStream,s=()=>n(""),c=async()=>{if(d.current&&d.current.validateForm()){const t=d.current.getFormValues();e?e(t):(a([t]),o(t.name)),s()}},d=r(null);return K({key:"Enter",active:l},c),t(ee,{isOpen:l,onClose:s,header:{title:"Add Data Stream"},actionComponent:t(le,{buttons:[{label:"DONE",variant:"primary",onClick:c}]}),children:t(qa,{ref:d,isModal:!0})})},za=(e,t)=>{const{destinationType:i,disabled:n,exportedSignals:a}=e,o=[{title:g.TYPE,value:i.type},{type:y.ActiveStatus,title:g.STATUS,value:String(!n)},{type:y.Monitors,title:g.MONITORS,value:Pe(a).join(", ")},{title:g.NAME,value:i.displayName}],r=ft(e,t),l=r.map(e=>({name:e.key,value:e.value}));return r.map(({key:e,name:i,value:n})=>{const{secret:r,componentProperties:s,hideFromReadData:c,customReadDataLabels:d}=t.find(t=>t.name===e)||{};if(!c?.length||!xt(c,Pe(a),l)){const{type:e}=St(s,{type:""}),t=(r||"password"===e)&&n.length?new Array(10).fill("•").join(""):"";o.push({type:y.Divider}),d?.length?d.forEach(({condition:e,...t})=>{e==n&&o.push({title:t.title,value:t.value})}):o.push({title:i,value:t||n})}}),o},Va=({signals:e,fields:i,onChange:n,formErrors:a})=>i?.map(o=>{const{componentType:r,renderCondition:l,...s}=o;if(l&&!xt(l,e,i))return null;switch(r){case A.Input:return t(C,{...s,onChange:e=>n(o.name,e.target.value),errorMessage:a[o.name]},o.name);case A.Dropdown:return t(rt,{...s,showSearch:!0,value:{id:s.value||"",value:s.value||""},options:s.options||[],onSelect:e=>n(o.name,e.id),errorMessage:a[o.name]},o.name);case A.MultiInput:return t(E,{...s,value:"string"==typeof s.value?St(s.value,[]):s.value,onChange:e=>n(o.name,JSON.stringify(e)),errorMessage:a[o.name]},o.name);case A.KeyValuePair:return t(N,{...s,value:"string"==typeof s.value?St(s.value,[]):s.value,onChange:e=>n(o.name,JSON.stringify(e)),errorMessage:a[o.name]},o.name);case A.TextArea:return t(L,{...s,onChange:e=>n(o.name,e.target.value),errorMessage:a[o.name]},o.name);case A.Checkbox:return t(S,{...s,value:"true"==s.value,onChange:e=>n(o.name,String(e)),errorMessage:a[o.name]},o.name);default:return null}}),Ba=p(Ie)`
206
206
  display: flex;
207
207
  align-items: center;
208
208
  gap: 8px;
@@ -237,7 +237,7 @@ import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import{useState
237
237
  display: flex;
238
238
  flex-direction: column;
239
239
  gap: 12px;
240
- `,Qa=({categories:i,updateDestination:o,deleteDestination:l,testConnection:c})=>{const{destinations:d}=W(),{selectedStreamName:u}=Je(),{drawerType:p,drawerEntityId:h}=K(),m=s(()=>Ye(d,u),[d,u]),y=r(null),v=p===B.Destination,[b,f]=n(!1),[x,S]=n(!1),{formData:$,formErrors:C,handleFormChange:w,resetFormData:k,validateForm:D,loadFormWithDrawerItem:T,yamlFields:N,setYamlFields:E,dynamicFields:A,setDynamicFields:F}=Ct({}),O=s(()=>{if(h)return m?.find(e=>J(e)===h)},[h,m]);if(a(()=>{v&&O?(E(wt(i,O)),T(O)):k()},[v,O,i]),!O)return null;const I=i.flatMap(e=>e.items).find(e=>e.type===O.destinationType.type),{icon:R,iconSrc:M}=I?He(I?.type):{icon:void 0,iconSrc:void 0};return t(En,{ref:y,title:O.name||O.destinationType.displayName,icons:R?[R]:void 0,iconSrcs:M?[M]:void 0,isEdit:b,isFormDirty:x,onEdit:e=>{f("boolean"!=typeof e||e)},onSave:async e=>{if(D({withAlert:!0,alertTitle:Z.Update})){const t=e!==O.destinationType.displayName?e:"";w("name",t),o(h,{...$,name:t}),f(!1),S(!1)}},onDelete:async()=>{l(h),f(!1),S(!1),y.current?.closeDrawer()},onCancel:()=>{f(!1),S(!1),T(O)},isLastItem:1===m.length,children:b?t(Xa,{children:t(Ya,{isUpdate:!0,categoryItem:I,formData:$,formErrors:C,handleFormChange:(...e)=>{S(!0),w(...e)},dynamicFields:A,setDynamicFields:(...e)=>{S(!0),F(...e)},validateForm:D,testConnection:c})}):e(Za,{children:[O.conditions?.length?t(G,{conditions:O.conditions}):null,t(Y,{title:g.DESTINATION_DETAILS,data:O?za(O,N):[]})]})})},eo=p.div`
240
+ `,Qa=({categories:i,updateDestination:o,deleteDestination:l,testConnection:c})=>{const{destinations:d}=W(),{selectedStreamName:u}=Je(),{drawerType:p,drawerEntityId:h}=j(),m=s(()=>Ye(d,u),[d,u]),y=r(null),v=p===B.Destination,[b,f]=n(!1),[x,S]=n(!1),{formData:$,formErrors:C,handleFormChange:w,resetFormData:k,validateForm:D,loadFormWithDrawerItem:T,yamlFields:N,setYamlFields:E,dynamicFields:A,setDynamicFields:F}=Ct({}),O=s(()=>{if(h)return m?.find(e=>J(e)===h)},[h,m]);if(a(()=>{v&&O?(E(wt(i,O)),T(O)):k()},[v,O,i]),!O)return null;const I=i.flatMap(e=>e.items).find(e=>e.type===O.destinationType.type),{icon:R,iconSrc:M}=I?He(I?.type):{icon:void 0,iconSrc:void 0};return t(En,{ref:y,title:O.name||O.destinationType.displayName,icons:R?[R]:void 0,iconSrcs:M?[M]:void 0,isEdit:b,isFormDirty:x,onEdit:e=>{f("boolean"!=typeof e||e)},onSave:async e=>{if(D({withAlert:!0,alertTitle:Z.Update})){const t=e!==O.destinationType.displayName?e:"";w("name",t),o(h,{...$,name:t}),f(!1),S(!1)}},onDelete:async()=>{l(h),f(!1),S(!1),y.current?.closeDrawer()},onCancel:()=>{f(!1),S(!1),T(O)},isLastItem:1===m.length,children:b?t(Xa,{children:t(Ya,{isUpdate:!0,categoryItem:I,formData:$,formErrors:C,handleFormChange:(...e)=>{S(!0),w(...e)},dynamicFields:A,setDynamicFields:(...e)=>{S(!0),F(...e)},validateForm:D,testConnection:c})}):e(Za,{children:[O.conditions?.length?t(G,{conditions:O.conditions}):null,t(Y,{title:g.DESTINATION_DETAILS,data:O?za(O,N):[]})]})})},eo=p.div`
241
241
  display: flex;
242
242
  flex-direction: column;
243
243
  gap: 12px;
@@ -265,7 +265,7 @@ import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import{useState
265
265
  }
266
266
  `,ro=p(io)`
267
267
  margin-top: 80px;
268
- `,{MANAGED:lo,SELF_HOSTED:so,DETECTED:co,EXISTS:uo}=Tt,po=[{value:"All types",id:"all"},{value:lo.TITLE,id:lo.TITLE},{value:so.TITLE,id:so.TITLE},{value:co.TITLE,id:co.TITLE},{value:uo.TITLE,id:uo.TITLE}],ho=po[0],mo=[$t.Logs,$t.Metrics,$t.Traces],go=(e,t,i)=>e.map(e=>{const{type:n,displayName:a}=e.destinationType,o=e.dataStreamNames?.includes(t),r=i.has(e.id);return{id:e.id,type:n,displayName:a,selected:o||r,fields:[],testConnectionSupported:!1,supportedSignals:{logs:{supported:e.exportedSignals.logs},metrics:{supported:e.exportedSignals.metrics},traces:{supported:e.exportedSignals.traces}}}}),yo=({hidden:i,categories:a,potentialDestinations:o,onSelectNew:r,onSelectConfigured:l,isLoadingForDestinationIds:c})=>{const{destinations:d}=W(),{selectedStreamName:u}=Je(),{configuredDestinations:p,configuredDestinationsUpdateOnly:h}=pt(),[m,g]=n(""),[y,v]=n(ho),[b,f]=n(mo),x=s(()=>{const e=Nt(a);return e.unshift({name:uo.TITLE,description:uo.DESCRIPTION,icon:Ki,items:go(d,u,new Set(p.concat(h).map(e=>e.id)))}),e.unshift({name:co.TITLE,description:co.DESCRIPTION,icon:ji,items:o}),e.map(e=>{const t=e.items.filter(t=>{const i=!m||t.displayName.toLowerCase().includes(m.toLowerCase()),n="all"===y.id||y.id===e.name,a=b.some(e=>t.supportedSignals[Et[e]]?.supported);return i&&n&&a});return{...e,items:t}}).filter(({items:e})=>!!e.length)},[a,o,d,m,y,b,u,p,h]);return i?null:e(io,{children:[t(I,{title:"Choose destination",description:"Add backend destination you want to connect with Odigos."}),e(no,{children:[t(ao,{children:t(C,{placeholder:"Search...",icon:Mi,value:m,onChange:({target:{value:e}})=>g(e)})}),t(ao,{children:t(rt,{options:po,value:y,onSelect:v,onDeselect:()=>{}})}),t(M,{title:"",selectedSignals:b,setSelectedSignals:f})]}),t(re,{}),x.length?t(oo,{children:t(to,{items:x,onSelectNew:e=>r(e,b),onSelectConfigured:l,isLoadingForDestinationIds:c})}):t(ro,{children:t(Ne,{title:"No destinations found"})})]})},vo=p.div`
268
+ `,{MANAGED:lo,SELF_HOSTED:so,DETECTED:co,EXISTS:uo}=Tt,po=[{value:"All types",id:"all"},{value:lo.TITLE,id:lo.TITLE},{value:so.TITLE,id:so.TITLE},{value:co.TITLE,id:co.TITLE},{value:uo.TITLE,id:uo.TITLE}],ho=po[0],mo=[$t.Logs,$t.Metrics,$t.Traces],go=(e,t,i)=>e.map(e=>{const{type:n,displayName:a}=e.destinationType,o=e.dataStreamNames?.includes(t),r=i.has(e.id);return{id:e.id,type:n,displayName:a,selected:o||r,fields:[],testConnectionSupported:!1,supportedSignals:{logs:{supported:e.exportedSignals.logs},metrics:{supported:e.exportedSignals.metrics},traces:{supported:e.exportedSignals.traces}}}}),yo=({hidden:i,categories:a,potentialDestinations:o,onSelectNew:r,onSelectConfigured:l,isLoadingForDestinationIds:c})=>{const{destinations:d}=W(),{selectedStreamName:u}=Je(),{configuredDestinations:p,configuredDestinationsUpdateOnly:h}=pt(),[m,g]=n(""),[y,v]=n(ho),[b,f]=n(mo),x=s(()=>{const e=Nt(a);return e.unshift({name:uo.TITLE,description:uo.DESCRIPTION,icon:ji,items:go(d,u,new Set(p.concat(h).map(e=>e.id)))}),e.unshift({name:co.TITLE,description:co.DESCRIPTION,icon:Ki,items:o}),e.map(e=>{const t=e.items.filter(t=>{const i=!m||t.displayName.toLowerCase().includes(m.toLowerCase()),n="all"===y.id||y.id===e.name,a=b.some(e=>t.supportedSignals[Et[e]]?.supported);return i&&n&&a});return{...e,items:t}}).filter(({items:e})=>!!e.length)},[a,o,d,m,y,b,u,p,h]);return i?null:e(io,{children:[t(I,{title:"Choose destination",description:"Add backend destination you want to connect with Odigos."}),e(no,{children:[t(ao,{children:t(C,{placeholder:"Search...",icon:Mi,value:m,onChange:({target:{value:e}})=>g(e)})}),t(ao,{children:t(rt,{options:po,value:y,onSelect:v,onDeselect:()=>{}})}),t(M,{title:"",selectedSignals:b,setSelectedSignals:f})]}),t(re,{}),x.length?t(oo,{children:t(to,{items:x,onSelectNew:e=>r(e,b),onSelectConfigured:l,isLoadingForDestinationIds:c})}):t(ro,{children:t(Ne,{title:"No destinations found"})})]})},vo=p.div`
269
269
  display: flex;
270
270
  `,bo=p.div`
271
271
  border-right: 1px solid ${({theme:e})=>e.colors.border};
@@ -274,7 +274,7 @@ import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import{useState
274
274
  @media (max-width: 1050px) {
275
275
  display: none;
276
276
  }
277
- `,fo=({isOnboarding:i,categories:a,potentialDestinations:o,createDestination:r,updateDestination:l,deleteDestination:s,testConnection:c})=>{const{destinations:d}=W(),{selectedStreamName:u}=Je(),{currentModal:p,setCurrentModal:h}=Q(),{addConfiguredDestination:m,addConfiguredDestinationUpdateOnly:y,removeConfiguredDestinationUpdateOnly:v,configuredDestinationsUpdateOnly:b}=pt(),f=p===B.Destination,[x,S]=n(void 0),{formData:$,formErrors:C,handleFormChange:w,resetFormData:k,validateForm:D,setYamlFields:T,dynamicFields:N,setDynamicFields:E,loadFormWithDrawerItem:A}=Ct({supportedSignals:x?.supportedSignals,preLoadedFields:x?.fields}),[F,O]=n([]),I=e=>{const t={};return e||N.forEach(e=>t[e.name]=e.value),{id:e?.id||"",name:e?.name||$.name,disabled:e?.disabled||$.disabled,dataStreamNames:e?.dataStreamNames||[],conditions:e?.conditions||[],exportedSignals:e?.exportedSignals||$.exportedSignals,fields:e?.fields||JSON.stringify(t),destinationType:e?.destinationType||{type:x.type,displayName:x.displayName,supportedSignals:{logs:{supported:!1},metrics:{supported:!1},traces:{supported:!1}}}}},R=async e=>{if(i&&!e){const e=I();m(e)}else if(i&&e){const t=I(e);b.some(t=>t.id===e.id)?v(e):y(t)}else if(i||e){if(!i&&e){const t=I(e),i=t.dataStreamNames.some(e=>e===u);O(t=>[...t,e.id]),i?await s(e.id):await l(e.id,A(t)),O(t=>t.filter(t=>t!==e.id))}}else r($)},M=()=>{k(),S(void 0),h("")},L=()=>{k(),S(void 0)},P=async()=>{if(x){if(!D({withAlert:!i,alertTitle:Z.Create}))return null;R()}M()};return j({key:"Enter",active:f},()=>P()),t(ee,{isOpen:f,onClose:M,header:{title:g.ADD_DESTINATION},actionComponent:t(le,{buttons:(()=>{const e=[{label:"DONE",variant:"primary",onClick:P}];return x&&e.unshift({label:"BACK",icon:()=>t(qi,{rotate:-90}),variant:"secondary",onClick:L}),e})()}),children:e(vo,{children:[t(bo,{children:t(At,{currentStep:x?2:1,data:[{stepNumber:1,title:g.DESTINATIONS},{stepNumber:2,title:g.CONNECTION}]})}),e(te,{style:{margin:"32px 24px 12px 24px"},children:[t(yo,{hidden:void 0!==x,categories:a,potentialDestinations:o,onSelectNew:(e,t)=>{k(),w("type",e?.type||""),w("currentStreamName",u);const i={logs:!1,metrics:!1,traces:!1};t.filter(t=>e.supportedSignals[Et[t]].supported).forEach(e=>i[Et[e]]=!0),w("exportedSignals",i),T(e?.fields||[]),S(e)},onSelectConfigured:e=>{const t=d.find(t=>t.id===e);t&&R(t)},isLoadingForDestinationIds:F}),x&&t(Ya,{categoryItem:x,formData:$,formErrors:C,handleFormChange:w,dynamicFields:N,setDynamicFields:E,validateForm:D,testConnection:c})]})]})})},xo=p.div`
277
+ `,fo=({isOnboarding:i,categories:a,potentialDestinations:o,createDestination:r,updateDestination:l,deleteDestination:s,testConnection:c})=>{const{destinations:d}=W(),{selectedStreamName:u}=Je(),{currentModal:p,setCurrentModal:h}=Q(),{addConfiguredDestination:m,addConfiguredDestinationUpdateOnly:y,removeConfiguredDestinationUpdateOnly:v,configuredDestinationsUpdateOnly:b}=pt(),f=p===B.Destination,[x,S]=n(void 0),{formData:$,formErrors:C,handleFormChange:w,resetFormData:k,validateForm:D,setYamlFields:T,dynamicFields:N,setDynamicFields:E,loadFormWithDrawerItem:A}=Ct({supportedSignals:x?.supportedSignals,preLoadedFields:x?.fields}),[F,O]=n([]),I=e=>{const t={};return e||N.forEach(e=>t[e.name]=e.value),{id:e?.id||"",name:e?.name||$.name,disabled:e?.disabled||$.disabled,dataStreamNames:e?.dataStreamNames||[],conditions:e?.conditions||[],exportedSignals:e?.exportedSignals||$.exportedSignals,fields:e?.fields||JSON.stringify(t),destinationType:e?.destinationType||{type:x.type,displayName:x.displayName,supportedSignals:{logs:{supported:!1},metrics:{supported:!1},traces:{supported:!1}}}}},R=async e=>{if(i&&!e){const e=I();m(e)}else if(i&&e){const t=I(e);b.some(t=>t.id===e.id)?v(e):y(t)}else if(i||e){if(!i&&e){const t=I(e),i=t.dataStreamNames.some(e=>e===u);O(t=>[...t,e.id]),i?await s(e.id):await l(e.id,A(t)),O(t=>t.filter(t=>t!==e.id))}}else r($)},M=()=>{k(),S(void 0),h("")},L=()=>{k(),S(void 0)},P=async()=>{if(x){if(!D({withAlert:!i,alertTitle:Z.Create}))return null;R()}M()};return K({key:"Enter",active:f},()=>P()),t(ee,{isOpen:f,onClose:M,header:{title:g.ADD_DESTINATION},actionComponent:t(le,{buttons:(()=>{const e=[{label:"DONE",variant:"primary",onClick:P}];return x&&e.unshift({label:"BACK",icon:()=>t(qi,{rotate:-90}),variant:"secondary",onClick:L}),e})()}),children:e(vo,{children:[t(bo,{children:t(At,{currentStep:x?2:1,data:[{stepNumber:1,title:g.DESTINATIONS},{stepNumber:2,title:g.CONNECTION}]})}),e(te,{style:{margin:"32px 24px 12px 24px"},children:[t(yo,{hidden:void 0!==x,categories:a,potentialDestinations:o,onSelectNew:(e,t)=>{k(),w("type",e?.type||""),w("currentStreamName",u);const i={logs:!1,metrics:!1,traces:!1};t.filter(t=>e.supportedSignals[Et[t]].supported).forEach(e=>i[Et[e]]=!0),w("exportedSignals",i),T(e?.fields||[]),S(e)},onSelectConfigured:e=>{const t=d.find(t=>t.id===e);t&&R(t)},isLoadingForDestinationIds:F}),x&&t(Ya,{categoryItem:x,formData:$,formErrors:C,handleFormChange:w,dynamicFields:N,setDynamicFields:E,validateForm:D,testConnection:c})]})]})})},xo=p.div`
278
278
  display: flex;
279
279
  flex-direction: column;
280
280
  align-items: center;
@@ -292,7 +292,7 @@ import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import{useState
292
292
  padding: 32px;
293
293
  border-radius: 16px;
294
294
  border-style: dashed !important;
295
- `,wo=({isSourcesListEmpty:n,goToSources:a,categories:o,potentialDestinations:r,testConnection:l,onClickSummary:s})=>{const c=m(),{setCurrentModal:d}=Q(),{configuredDestinations:u,configuredDestinationsUpdateOnly:p}=pt();return e(i,{children:[t(te,{$isNotModal:!0,children:e(se,{$gap:12,children:[e(se,{$gap:24,children:[s&&t(vt,{onClick:s}),t(I,{title:g.ADD_DESTINATIONS,badgeLabel:u.length+p.length,description:g.ADD_DESTINATION_DESCRIPTION}),n&&t(ie,{type:ne.Warning,message:g.NO_SOURCES_GO_BACK,action:{label:g.SELECT_SOURCES,onClick:a}}),e(Co,{variant:"secondary",onClick:()=>d(B.Destination),children:[t(Ii,{}),t(P,{color:c.colors.secondary,size:14,decoration:"underline",family:"secondary",children:g.ADD_DESTINATION})]})]}),t(So,{categories:o,withDelete:!0})]})}),t(fo,{isOnboarding:!0,categories:o,potentialDestinations:r,updateDestination:async()=>{},createDestination:async()=>{},deleteDestination:async()=>{},testConnection:l})]})},ko=[{key:"icon",title:""},{key:"name",title:g.NAME,sortable:!0},{key:"type",title:g.TYPE,sortable:!0},{key:"signals",title:g.MONITORS},{key:"active-status",title:g.STATUS},{key:"conditions",title:"Conditions"},{key:"throughput",title:"Throughput",sortable:!0}],Do=({metrics:i,maxHeight:n,maxWidth:a})=>{const o=m(),r=ye(),{selectedStreamName:l}=Je(),{setDrawerType:c,setDrawerEntityId:d}=K(),{destinations:u,destinationsLoading:p}=W(),h=s(()=>Ye(u,l),[u,l]),y=s(()=>jn({instrumentationRules:[],sources:[],actions:[],destinations:Ze(h,r),searchText:r.searchText,selectedCategory:B.Destination}).searchResults.find(({category:e})=>e===B.Destination)?.entities||[],[h,r]),v=s(()=>y.map(e=>{const{hasErrors:n,hasWarnings:a,hasDisableds:r}=ce(e.conditions||[]),{icon:l,iconSrc:s}=He(e.destinationType.type);return{status:n?ne.Error:a?ne.Warning:void 0,faded:r,onClick:()=>{c(B.Destination),d(e.id)},cells:[{columnKey:"icon",component:()=>t(be,{icon:l,src:s})},{columnKey:"name",value:fe(e,B.Destination,{prioritizeDisplayName:!0})},{columnKey:"type",value:e.destinationType.type,textColor:o.text.info},{columnKey:"throughput",value:Ke(Ot(i,B.Destination,e.id).throughput),textColor:o.text.info},{columnKey:"signals",component:()=>t(xe,{withLabels:!0,monitors:Pe(e.exportedSignals)})},{columnKey:"conditions",component:()=>e.conditions?.length?t(Pn,{conditions:e.conditions,id:e.id}):null},{columnKey:"active-status",component:()=>t("div",{style:{lineHeight:1},children:t(de,{status:e.disabled?ne.Error:ne.Success,title:e.disabled?g.DISABLED:g.ENABLED,withIcon:!0,withBorder:!0})})}]}}),[y,i]),{badge:b,badgeTooltip:f}=s(()=>y.length!==h.length?{badge:`${y.length}/${h.length}`,badgeTooltip:g.FILTERED_COUNT_TOOLTIP}:{badge:h.length,badgeTooltip:void 0},[y,h]);return e(Se,{$maxWidth:a,children:[t($e,{children:t(Ce,{icon:we(B.Destination),title:g.DESTINATIONS,badge:b,badgeTooltip:f,loading:p})}),t(ke,{$maxHeight:n,children:t(De,{columns:ko,rows:v})}),!y.length&&t(Te,{style:{marginTop:"2rem"},children:t(Ne,{})})]})},To=e=>{const{type:t,ruleName:i,notes:n,disabled:a,profileName:o,payloadCollection:r,codeAttributes:l,headersCollection:s,customInstrumentations:c}=e,d=[{title:g.TYPE,value:t},{type:y.ActiveStatus,title:g.STATUS,value:String(!a)},{title:g.NAME,value:i},{title:g.NOTES,value:n},{title:g.MANAGED_BY_PROFILE,value:o},{type:y.Divider}];if(r){const e=Object.entries(r).filter(([e,t])=>t).map(([e,t])=>e).join(", ");e&&d.push({title:"Collect",value:e})}if(l){const e=Object.entries(l).filter(([e,t])=>t).map(([e,t])=>e).join(", ");e&&d.push({title:"Collect",value:e})}if(s){const e=(s[It.HeaderKeys]||[]).filter(e=>e).join(", ");e&&d.push({title:"Collect",value:e})}if(c){const e=(c[Mt.Java]||[]).map(e=>new Rt(e.className,e.methodName)).map(e=>`• ${e.toString()}`).join("\r\n");e&&d.push({title:g.JAVA_CUSTOM_PROBES,value:e});const t=(c[Mt.Golang]||[]).map(e=>new Lt(e.packageName,e.functionName,e.receiverName,e.receiverMethodName)).map(e=>`• ${e.toString()}`).join("\r\n");t&&d.push({title:g.GOLANG_CUSTOM_PROBES,value:t})}return d},No=p.div`
295
+ `,wo=({isSourcesListEmpty:n,goToSources:a,categories:o,potentialDestinations:r,testConnection:l,onClickSummary:s})=>{const c=m(),{setCurrentModal:d}=Q(),{configuredDestinations:u,configuredDestinationsUpdateOnly:p}=pt();return e(i,{children:[t(te,{$isNotModal:!0,children:e(se,{$gap:12,children:[e(se,{$gap:24,children:[s&&t(vt,{onClick:s}),t(I,{title:g.ADD_DESTINATIONS,badgeLabel:u.length+p.length,description:g.ADD_DESTINATION_DESCRIPTION}),n&&t(ie,{type:ne.Warning,message:g.NO_SOURCES_GO_BACK,action:{label:g.SELECT_SOURCES,onClick:a}}),e(Co,{variant:"secondary",onClick:()=>d(B.Destination),children:[t(Ii,{}),t(P,{color:c.colors.secondary,size:14,decoration:"underline",family:"secondary",children:g.ADD_DESTINATION})]})]}),t(So,{categories:o,withDelete:!0})]})}),t(fo,{isOnboarding:!0,categories:o,potentialDestinations:r,updateDestination:async()=>{},createDestination:async()=>{},deleteDestination:async()=>{},testConnection:l})]})},ko=[{key:"icon",title:""},{key:"name",title:g.NAME,sortable:!0},{key:"type",title:g.TYPE,sortable:!0},{key:"signals",title:g.MONITORS},{key:"active-status",title:g.STATUS},{key:"conditions",title:"Conditions"},{key:"throughput",title:"Throughput",sortable:!0}],Do=({metrics:i,maxHeight:n,maxWidth:a})=>{const o=m(),r=ye(),{selectedStreamName:l}=Je(),{setDrawerType:c,setDrawerEntityId:d}=j(),{destinations:u,destinationsLoading:p}=W(),h=s(()=>Ye(u,l),[u,l]),y=s(()=>Kn({instrumentationRules:[],sources:[],actions:[],destinations:Ze(h,r),searchText:r.searchText,selectedCategory:B.Destination}).searchResults.find(({category:e})=>e===B.Destination)?.entities||[],[h,r]),v=s(()=>y.map(e=>{const{hasErrors:n,hasWarnings:a,hasDisableds:r}=ce(e.conditions||[]),{icon:l,iconSrc:s}=He(e.destinationType.type);return{status:n?ne.Error:a?ne.Warning:void 0,faded:r,onClick:()=>{c(B.Destination),d(e.id)},cells:[{columnKey:"icon",component:()=>t(be,{icon:l,src:s})},{columnKey:"name",value:fe(e,B.Destination,{prioritizeDisplayName:!0})},{columnKey:"type",value:e.destinationType.type,textColor:o.text.info},{columnKey:"throughput",value:je(Ot(i,B.Destination,e.id).throughput),textColor:o.text.info},{columnKey:"signals",component:()=>t(xe,{withLabels:!0,monitors:Pe(e.exportedSignals)})},{columnKey:"conditions",component:()=>e.conditions?.length?t(Pn,{conditions:e.conditions,id:e.id}):null},{columnKey:"active-status",component:()=>t("div",{style:{lineHeight:1},children:t(de,{status:e.disabled?ne.Error:ne.Success,title:e.disabled?g.DISABLED:g.ENABLED,withIcon:!0,withBorder:!0})})}]}}),[y,i]),{badge:b,badgeTooltip:f}=s(()=>y.length!==h.length?{badge:`${y.length}/${h.length}`,badgeTooltip:g.FILTERED_COUNT_TOOLTIP}:{badge:h.length,badgeTooltip:void 0},[y,h]);return e(Se,{$maxWidth:a,children:[t($e,{children:t(Ce,{icon:we(B.Destination),title:g.DESTINATIONS,badge:b,badgeTooltip:f,loading:p})}),t(ke,{$maxHeight:n,children:t(De,{columns:ko,rows:v})}),!y.length&&t(Te,{style:{marginTop:"2rem"},children:t(Ne,{})})]})},To=e=>{const{type:t,ruleName:i,notes:n,disabled:a,profileName:o,payloadCollection:r,codeAttributes:l,headersCollection:s,customInstrumentations:c}=e,d=[{title:g.TYPE,value:t},{type:y.ActiveStatus,title:g.STATUS,value:String(!a)},{title:g.NAME,value:i},{title:g.NOTES,value:n},{title:g.MANAGED_BY_PROFILE,value:o},{type:y.Divider}];if(r){const e=Object.entries(r).filter(([e,t])=>t).map(([e,t])=>e).join(", ");e&&d.push({title:"Collect",value:e})}if(l){const e=Object.entries(l).filter(([e,t])=>t).map(([e,t])=>e).join(", ");e&&d.push({title:"Collect",value:e})}if(s){const e=(s[It.HeaderKeys]||[]).filter(e=>e).join(", ");e&&d.push({title:"Collect",value:e})}if(c){const e=(c[Mt.Java]||[]).map(e=>new Rt(e.className,e.methodName)).map(e=>`• ${e.toString()}`).join("\r\n");e&&d.push({title:g.JAVA_CUSTOM_PROBES,value:e});const t=(c[Mt.Golang]||[]).map(e=>new Lt(e.packageName,e.functionName,e.receiverName,e.receiverMethodName)).map(e=>`• ${e.toString()}`).join("\r\n");t&&d.push({title:g.GOLANG_CUSTOM_PROBES,value:t})}return d},No=p.div`
296
296
  display: flex;
297
297
  flex-direction: column;
298
298
  gap: 12px;
@@ -312,14 +312,14 @@ import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import{useState
312
312
  border-radius: 16px;
313
313
  padding: 8px;
314
314
  `}
315
- `,Ro=[{id:Kt.HttpRequest,label:"Collect HTTP Request"},{id:Kt.HttpResponse,label:"Collect HTTP Response"},{id:Kt.DbQuery,label:"Collect DB Query"},{id:Kt.Messaging,label:"Collect Messaging"}],Mo={[jt.CodeAttributes]:({value:o,setValue:r,formErrors:l})=>{const c=l.codeAttributes,d=s(()=>Object.entries(o.codeAttributes||{}).filter(([e,t])=>!!t).map(([e])=>e),[o]),[u,p]=n(1===d.length);a(()=>{if(!d.length){const e={[Pt.Column]:null,[Pt.FilePath]:!0,[Pt.Function]:!0,[Pt.LineNumber]:!0,[Pt.Namespace]:null,[Pt.StackTrace]:null};r("codeAttributes",e),p(!1)}},[]);const h=(e,t)=>{const i=t?[...d,e]:d.filter(t=>t!==e),n=Object.values(Pt).reduce((e,t)=>(e[t]=!!i.includes(t)||null,e),{});r("codeAttributes",n),p(1===i.length)};return e(i,{children:[e("div",{children:[t(x,{title:"Recommended data to collect",required:!0}),t(No,{$hasError:!!c,children:Eo.map(({id:e,label:i,tooltip:n})=>t(me,{text:n,withIcon:!0,children:t(S,{title:i,disabled:u&&d.includes(e),value:d.includes(e),onChange:t=>h(e,t)})},e))}),!!c&&t($,{children:c})]}),e("div",{children:[t(x,{title:"Verbose data to collect",required:!0}),t(No,{$hasError:!!c,children:Ao.map(({id:e,label:i,tooltip:n})=>t(me,{text:n,withIcon:!0,children:t(S,{title:i,disabled:u&&d.includes(e),value:d.includes(e),onChange:t=>h(e,t)})},e))}),!!c&&t($,{children:c})]})]})},[jt.CustomInstrumentation]:({value:i,setValue:n,formErrors:o})=>{const r=o.customInstrumentations,l=s(()=>(i?.customInstrumentations?.[Mt.Java]||[]).map(e=>({key:e.className,value:e.methodName})),[i]),c=s(()=>(i?.customInstrumentations?.[Mt.Golang]||[]).map(e=>new Lt(e.packageName,e.functionName,e.receiverName,e.receiverMethodName)),[i]),d=(e,t)=>{const i={};switch(t){case"java":i[Mt.Java]=e.map(e=>new Rt(e.className,e.methodName)),i[Mt.Golang]=c.map(e=>new Lt(e.packageName,e.functionName,e.receiverName,e.receiverMethodName));break;case"golang":i[Mt.Golang]=e.map(e=>new Lt(e.packageName,e.functionName,e.receiverName,e.receiverMethodName)),i[Mt.Java]=l.map(({key:e,value:t})=>new Rt(e,t))}n("customInstrumentations",i)};return a(()=>{i?.customInstrumentations||n("customInstrumentations",{[Mt.Golang]:Fo[Mt.Golang],[Mt.Java]:Fo[Mt.Java]})},[n,i]),e("div",{children:[t(D,{title:"Golang Custom Probes",columns:[{title:"",keyName:"packageName",placeholder:"Package name",required:!0,tooltip:"The full import path of the package containing the function or method to be instrumented."},{title:"",keyName:"functionName",placeholder:"Function name",required:!1,tooltip:"The name of the function to be instrumented. Leave empty if instrumenting a receiver method."},{title:"",keyName:"receiverName",placeholder:"Receiver name",required:!1,tooltip:"The name of the receiver type if instrumenting a method. Leave empty if instrumenting a standalone function."},{title:"",keyName:"receiverMethodName",placeholder:"Receiver method name",required:!1,tooltip:"The name of the method to be instrumented. Leave empty if instrumenting a standalone function."}],value:c,onChange:e=>d(e,"golang"),errorMessage:r,limitFieldsPerRow:2}),t(N,{title:"Java Custom Probes",tooltip:"Specify class name and method name pair to instrument.",value:l,onChange:(e=[])=>d(e.map(({key:e,value:t})=>({className:e,methodName:t})),"java"),errorMessage:r,keyPlaceholder:"Class name",valuePlaceholder:"Method name"})]})},[jt.HeadersCollection]:({value:e,setValue:i,formErrors:n})=>{const o=n.headersCollection,r=s(()=>e?.headersCollection?.[It.HeaderKeys]||[],[e]),l=e=>{const t={[It.HeaderKeys]:e};i("headersCollection",t)};return a(()=>{r.length||l(Oo)},[r]),t("div",{children:r.length>0&&t(E,{title:"Header Keys",tooltip:"Specify which headers you want to collect, asterisk (*) will collect all headers.",value:r,onChange:e=>l(e),errorMessage:o})})},[jt.PayloadCollection]:({value:i,setValue:o,formErrors:r})=>{const l=r.payloadCollection,c=s(()=>Object.entries(i.payloadCollection||{}).filter(([e,t])=>!!t).map(([e])=>e),[i]),[d,u]=n(1===c.length);return a(()=>{if(!c.length){const e={[Kt.HttpRequest]:{},[Kt.HttpResponse]:{},[Kt.DbQuery]:{},[Kt.Messaging]:{}};o("payloadCollection",e),u(!1)}},[]),e("div",{children:[t(x,{title:"Type of data to collect",required:!0}),t(Io,{$hasError:!!l,children:Ro.map(({id:e,label:i})=>t(S,{title:i,disabled:d&&c.includes(e),value:c.includes(e),onChange:t=>((e,t)=>{const i=t?[...c,e]:c.filter(t=>t!==e),n={[Kt.HttpRequest]:i.includes(Kt.HttpRequest)?{}:null,[Kt.HttpResponse]:i.includes(Kt.HttpResponse)?{}:null,[Kt.DbQuery]:i.includes(Kt.DbQuery)?{}:null,[Kt.Messaging]:i.includes(Kt.Messaging)?{}:null};o("payloadCollection",n),u(1===i.length)})(e,t)},e))}),!!l&&t($,{children:l})]})},[jt.UnknownType]:null},Lo=({ruleType:e,value:i,setValue:n,formErrors:a})=>{if(!e)return null;const o=Mo[e];return o?t(o,{value:i,setValue:n,formErrors:a}):null},Po=p.div`
315
+ `,Ro=[{id:jt.HttpRequest,label:"Collect HTTP Request"},{id:jt.HttpResponse,label:"Collect HTTP Response"},{id:jt.DbQuery,label:"Collect DB Query"},{id:jt.Messaging,label:"Collect Messaging"}],Mo={[Kt.CodeAttributes]:({value:o,setValue:r,formErrors:l})=>{const c=l.codeAttributes,d=s(()=>Object.entries(o.codeAttributes||{}).filter(([e,t])=>!!t).map(([e])=>e),[o]),[u,p]=n(1===d.length);a(()=>{if(!d.length){const e={[Pt.Column]:null,[Pt.FilePath]:!0,[Pt.Function]:!0,[Pt.LineNumber]:!0,[Pt.Namespace]:null,[Pt.StackTrace]:null};r("codeAttributes",e),p(!1)}},[]);const h=(e,t)=>{const i=t?[...d,e]:d.filter(t=>t!==e),n=Object.values(Pt).reduce((e,t)=>(e[t]=!!i.includes(t)||null,e),{});r("codeAttributes",n),p(1===i.length)};return e(i,{children:[e("div",{children:[t(x,{title:"Recommended data to collect",required:!0}),t(No,{$hasError:!!c,children:Eo.map(({id:e,label:i,tooltip:n})=>t(me,{text:n,withIcon:!0,children:t(S,{title:i,disabled:u&&d.includes(e),value:d.includes(e),onChange:t=>h(e,t)})},e))}),!!c&&t($,{children:c})]}),e("div",{children:[t(x,{title:"Verbose data to collect",required:!0}),t(No,{$hasError:!!c,children:Ao.map(({id:e,label:i,tooltip:n})=>t(me,{text:n,withIcon:!0,children:t(S,{title:i,disabled:u&&d.includes(e),value:d.includes(e),onChange:t=>h(e,t)})},e))}),!!c&&t($,{children:c})]})]})},[Kt.CustomInstrumentation]:({value:i,setValue:n,formErrors:o})=>{const r=o.customInstrumentations,l=s(()=>(i?.customInstrumentations?.[Mt.Java]||[]).map(e=>({key:e.className,value:e.methodName})),[i]),c=s(()=>(i?.customInstrumentations?.[Mt.Golang]||[]).map(e=>new Lt(e.packageName,e.functionName,e.receiverName,e.receiverMethodName)),[i]),d=(e,t)=>{const i={};switch(t){case"java":i[Mt.Java]=e.map(e=>new Rt(e.className,e.methodName)),i[Mt.Golang]=c.map(e=>new Lt(e.packageName,e.functionName,e.receiverName,e.receiverMethodName));break;case"golang":i[Mt.Golang]=e.map(e=>new Lt(e.packageName,e.functionName,e.receiverName,e.receiverMethodName)),i[Mt.Java]=l.map(({key:e,value:t})=>new Rt(e,t))}n("customInstrumentations",i)};return a(()=>{i?.customInstrumentations||n("customInstrumentations",{[Mt.Golang]:Fo[Mt.Golang],[Mt.Java]:Fo[Mt.Java]})},[n,i]),e("div",{children:[t(D,{title:"Golang Custom Probes",columns:[{title:"",keyName:"packageName",placeholder:"Package name",required:!0,tooltip:"The full import path of the package containing the function or method to be instrumented."},{title:"",keyName:"functionName",placeholder:"Function name",required:!1,tooltip:"The name of the function to be instrumented. Leave empty if instrumenting a receiver method."},{title:"",keyName:"receiverName",placeholder:"Receiver name",required:!1,tooltip:"The name of the receiver type if instrumenting a method. Leave empty if instrumenting a standalone function."},{title:"",keyName:"receiverMethodName",placeholder:"Receiver method name",required:!1,tooltip:"The name of the method to be instrumented. Leave empty if instrumenting a standalone function."}],value:c,onChange:e=>d(e,"golang"),errorMessage:r,limitFieldsPerRow:2}),t(N,{title:"Java Custom Probes",tooltip:"Specify class name and method name pair to instrument.",value:l,onChange:(e=[])=>d(e.map(({key:e,value:t})=>({className:e,methodName:t})),"java"),errorMessage:r,keyPlaceholder:"Class name",valuePlaceholder:"Method name"})]})},[Kt.HeadersCollection]:({value:e,setValue:i,formErrors:n})=>{const o=n.headersCollection,r=s(()=>e?.headersCollection?.[It.HeaderKeys]||[],[e]),l=e=>{const t={[It.HeaderKeys]:e};i("headersCollection",t)};return a(()=>{r.length||l(Oo)},[r]),t("div",{children:r.length>0&&t(E,{title:"Header Keys",tooltip:"Specify which headers you want to collect, asterisk (*) will collect all headers.",value:r,onChange:e=>l(e),errorMessage:o})})},[Kt.PayloadCollection]:({value:i,setValue:o,formErrors:r})=>{const l=r.payloadCollection,c=s(()=>Object.entries(i.payloadCollection||{}).filter(([e,t])=>!!t).map(([e])=>e),[i]),[d,u]=n(1===c.length);return a(()=>{if(!c.length){const e={[jt.HttpRequest]:{},[jt.HttpResponse]:{},[jt.DbQuery]:{},[jt.Messaging]:{}};o("payloadCollection",e),u(!1)}},[]),e("div",{children:[t(x,{title:"Type of data to collect",required:!0}),t(Io,{$hasError:!!l,children:Ro.map(({id:e,label:i})=>t(S,{title:i,disabled:d&&c.includes(e),value:c.includes(e),onChange:t=>((e,t)=>{const i=t?[...c,e]:c.filter(t=>t!==e),n={[jt.HttpRequest]:i.includes(jt.HttpRequest)?{}:null,[jt.HttpResponse]:i.includes(jt.HttpResponse)?{}:null,[jt.DbQuery]:i.includes(jt.DbQuery)?{}:null,[jt.Messaging]:i.includes(jt.Messaging)?{}:null};o("payloadCollection",n),u(1===i.length)})(e,t)},e))}),!!l&&t($,{children:l})]})},[Kt.UnknownType]:null},Lo=({ruleType:e,value:i,setValue:n,formErrors:a})=>{if(!e)return null;const o=Mo[e];return o?t(o,{value:i,setValue:n,formErrors:a}):null},Po=p.div`
316
316
  display: flex;
317
317
  flex-direction: column;
318
318
  gap: 24px;
319
319
  padding: 4px;
320
- `,Ko=p(P)`
320
+ `,jo=p(P)`
321
321
  margin-bottom: 12px;
322
- `,jo=({isUpdate:n,rule:a,formData:o,formErrors:r,handleFormChange:l})=>{const s=m();return e(Po,{children:[t(pe,{children:a.supportedLanguages.map(e=>t(qt,{icon:Ht(e),type:ne.Info,children:lt[e]},e))}),n?e("div",{children:[t(Ko,{children:"Status"}),t(F,{options:[{icon:Ni,label:g.ENABLED,value:!1,selectedBgColor:s.text.success+O["050"]},{icon:Ei,label:g.DISABLED,value:!0,selectedBgColor:s.text.error+O["050"]}],selected:o.disabled,setSelected:e=>l("disabled",e)})]}):e(i,{children:[t(I,{title:"",description:a.docsDescription,actionButton:t(R,{endpoint:a.docsEndpoint})}),t(C,{title:"Rule name",placeholder:"Use a name that describes the rule",value:o.ruleName,onChange:({target:{value:e}})=>l("ruleName",e),errorMessage:r.ruleName})]}),t(Lo,{ruleType:a.type,value:o,setValue:(e,t)=>l(e,t),formErrors:r}),t(L,{title:"Notes",value:o.notes,onChange:({target:{value:e}})=>l("notes",e),errorMessage:r.notes})]})},qo=p.div`
322
+ `,Ko=({isUpdate:n,rule:a,formData:o,formErrors:r,handleFormChange:l})=>{const s=m();return e(Po,{children:[t(pe,{children:a.supportedLanguages.map(e=>t(qt,{icon:Ht(e),type:ne.Info,children:lt[e]},e))}),n?e("div",{children:[t(jo,{children:"Status"}),t(F,{options:[{icon:Ni,label:g.ENABLED,value:!1,selectedBgColor:s.text.success+O["050"]},{icon:Ei,label:g.DISABLED,value:!0,selectedBgColor:s.text.error+O["050"]}],selected:o.disabled,setSelected:e=>l("disabled",e)})]}):e(i,{children:[t(I,{title:"",description:a.docsDescription,actionButton:t(R,{endpoint:a.docsEndpoint})}),t(C,{title:"Rule name",placeholder:"Use a name that describes the rule",value:o.ruleName,onChange:({target:{value:e}})=>l("ruleName",e),errorMessage:r.ruleName})]}),t(Lo,{ruleType:a.type,value:o,setValue:(e,t)=>l(e,t),formErrors:r}),t(L,{title:"Notes",value:o.notes,onChange:({target:{value:e}})=>l("notes",e),errorMessage:r.notes})]})},qo=p.div`
323
323
  width: 100%;
324
324
  height: 100%;
325
325
  max-height: calc(100vh - 220px);
@@ -329,10 +329,10 @@ import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import{useState
329
329
  display: flex;
330
330
  flex-direction: column;
331
331
  gap: 12px;
332
- `,zo=({updateInstrumentationRule:i,deleteInstrumentationRule:o})=>{const{instrumentationRules:l}=W(),{addNotification:c}=zt(),{drawerType:d,drawerEntityId:u}=K(),p=r(null),h=d===B.InstrumentationRule,[m,g]=n(!1),[y,v]=n(!1),{formData:b,formErrors:f,handleFormChange:x,resetFormData:S,validateForm:$,loadFormWithDrawerItem:C}=Vt(),w=s(()=>{if(u)return l?.find(e=>J(e)===u)},[u,l]);if(a(()=>{h&&w?C(w):S()},[h,w]),!w)return null;const k=Bt.find(({type:e})=>e===w.type);return t(En,{ref:p,title:w.ruleName||w.type,icons:[qe(w.type)],isEdit:m,isFormDirty:y,onEdit:e=>{w.mutable||!e&&void 0!==e?g("boolean"!=typeof e||e):c({type:ne.Warning,title:ae.FORBIDDEN,message:ae.CANNOT_EDIT_RULE,crdType:B.InstrumentationRule,target:u,hideFromHistory:!0})},onSave:e=>{if($()){const t=e!==w.type?e:"";x("ruleName",t),i(u,{...b,ruleName:t}),g(!1),v(!1)}},onDelete:()=>{w.mutable?(o(u),g(!1),v(!1),p.current?.closeDrawer()):c({type:ne.Warning,title:ae.FORBIDDEN,message:ae.CANNOT_DELETE_RULE,crdType:B.InstrumentationRule,target:u,hideFromHistory:!0})},onCancel:()=>{g(!1),v(!1),C(w)},children:m&&k?t(qo,{children:t(jo,{isUpdate:!0,rule:k,formData:b,formErrors:f,handleFormChange:(...e)=>{v(!0),x(...e)}})}):e(Ho,{children:[t(G,{conditions:w.conditions||[]}),t(Y,{title:"Instrumentation Rule Details",data:w?To(w):[]})]})})},Vo=p(se)`
332
+ `,zo=({updateInstrumentationRule:i,deleteInstrumentationRule:o})=>{const{instrumentationRules:l}=W(),{addNotification:c}=zt(),{drawerType:d,drawerEntityId:u}=j(),p=r(null),h=d===B.InstrumentationRule,[m,g]=n(!1),[y,v]=n(!1),{formData:b,formErrors:f,handleFormChange:x,resetFormData:S,validateForm:$,loadFormWithDrawerItem:C}=Vt(),w=s(()=>{if(u)return l?.find(e=>J(e)===u)},[u,l]);if(a(()=>{h&&w?C(w):S()},[h,w]),!w)return null;const k=Bt.find(({type:e})=>e===w.type);return t(En,{ref:p,title:w.ruleName||w.type,icons:[qe(w.type)],isEdit:m,isFormDirty:y,onEdit:e=>{w.mutable||!e&&void 0!==e?g("boolean"!=typeof e||e):c({type:ne.Warning,title:ae.FORBIDDEN,message:ae.CANNOT_EDIT_RULE,crdType:B.InstrumentationRule,target:u,hideFromHistory:!0})},onSave:e=>{if($()){const t=e!==w.type?e:"";x("ruleName",t),i(u,{...b,ruleName:t}),g(!1),v(!1)}},onDelete:()=>{w.mutable?(o(u),g(!1),v(!1),p.current?.closeDrawer()):c({type:ne.Warning,title:ae.FORBIDDEN,message:ae.CANNOT_DELETE_RULE,crdType:B.InstrumentationRule,target:u,hideFromHistory:!0})},onCancel:()=>{g(!1),v(!1),C(w)},children:m&&k?t(qo,{children:t(Ko,{isUpdate:!0,rule:k,formData:b,formErrors:f,handleFormChange:(...e)=>{v(!0),x(...e)}})}):e(Ho,{children:[t(G,{conditions:w.conditions||[]}),t(Y,{title:"Instrumentation Rule Details",data:w?To(w):[]})]})})},Vo=p(se)`
333
333
  margin-top: 24px;
334
334
  gap: 12px;
335
- `,Bo=Bt,Wo=({createInstrumentationRule:i})=>{const{tier:a}=Le(),o=a===Wt.Onprem,{currentModal:r,setCurrentModal:l}=Q(),s=r===B.InstrumentationRule,{formData:c,formErrors:d,handleFormChange:u,resetFormData:p,validateForm:h}=Vt(),[m,y]=n(void 0),v=()=>{p(),y(void 0),l("")},b=()=>{if(!h())return null;i(c),v()};return j({key:"Enter",active:s},()=>b()),t(ee,{isOpen:s,onClose:v,header:{title:"Add Instrumentation Rule"},actionComponent:t(le,{buttons:[{variant:"primary",label:"DONE",onClick:b,disabled:!o||!m,tooltip:o?"":ae.ENTERPRISE_ONLY("Instrumentation Rules")}]}),children:e(te,{children:[t(I,{title:"Select Instrumentation Rule",description:"Define how telemetry is recorded from your application. Choose a rule type and configure the details."}),e(Vo,{children:[t(ie,o?{type:ne.Warning,message:ae.DEFINED_FOR_ALL_STREAMS(g.INSTRUMENTATION_RULES)}:{type:ne.Default,message:ae.ENTERPRISE_ONLY(g.INSTRUMENTATION_RULES)}),t(oe,{options:Bo,selectedOption:m,onOptionSelect:e=>{return t=e,p(),void y(t);var t},autoFocus:!m?.type})]}),m?.type?e("div",{children:[t(re,{margin:"16px 0"}),t(jo,{rule:m,formData:c,formErrors:d,handleFormChange:u})]}):null]})})},_o=e=>{const{payloadCollection:t,codeAttributes:i,customInstrumentations:n}=e;let a="";return t&&(a+=Object.entries(t).filter(([e,t])=>!!t).map(([e,t])=>e).join(", ")),i&&(a+=Object.entries(i).filter(([e,t])=>!!t).map(([e,t])=>e).join(", ")),n&&Object.values(Mt).forEach(e=>{const t=(n[e]||[]).filter(e=>e).join(", ");t&&(a+=a?`, ${t}`:t)}),a},Jo=[{key:"icon",title:""},{key:"name",title:g.NAME,sortable:!0},{key:"profile",title:g.MANAGED_BY_PROFILE,sortable:!0},{key:"active-status",title:g.STATUS},{key:"conditions",title:"Conditions"},{key:"source-count",title:"Applicable Source"},{key:"type",title:g.TYPE,sortable:!0},{key:"spec",title:"Spec",sortable:!0},{key:"notes",title:g.NOTES,sortable:!0}],Uo=({maxHeight:i,maxWidth:n})=>{const a=m(),o=ye(),{setDrawerType:r,setDrawerEntityId:l}=K(),{instrumentationRules:c,instrumentationRulesLoading:d}=W(),u=s(()=>jn({instrumentationRules:c,sources:[],actions:[],destinations:[],searchText:o.searchText,selectedCategory:B.InstrumentationRule}).searchResults.find(({category:e})=>e===B.InstrumentationRule)?.entities||[],[c,o]),p=s(()=>u.map(e=>{const{hasErrors:i,hasWarnings:n,hasDisableds:o}=ce(e.conditions||[]);return{status:i?ne.Error:n?ne.Warning:void 0,faded:o,onClick:()=>{r(B.InstrumentationRule),l(e.ruleId)},cells:[{columnKey:"icon",component:()=>t(be,{icon:qe(e.type)})},{columnKey:"name",value:fe(e,B.InstrumentationRule,{prioritizeDisplayName:!0})},{columnKey:"type",value:e.type,textColor:a.text.info},{columnKey:"profile",value:e.profileName,textColor:a.text.info},{columnKey:"notes",value:e.notes,textColor:a.text.info,withTooltip:!0},{columnKey:"spec",value:_o(e),textColor:a.text.info,withTooltip:!0},{columnKey:"conditions",component:()=>t(Pn,{conditions:e.conditions||[],id:e.ruleId})},{columnKey:"active-status",component:()=>t("div",{style:{lineHeight:1},children:t(de,{status:e.disabled?ne.Error:ne.Success,title:e.disabled?g.DISABLED:g.ENABLED,withIcon:!0,withBorder:!0})})},{columnKey:"source-count",component:()=>t("div",{style:{lineHeight:1},children:t(de,{status:ne.Info,title:"all sources",withBorder:!0})})}]}}),[u]),{badge:h,badgeTooltip:y}=s(()=>u.length!==c.length?{badge:`${u.length}/${c.length}`,badgeTooltip:g.FILTERED_COUNT_TOOLTIP}:{badge:c.length,badgeTooltip:void 0},[u,c]);return e(Se,{$maxWidth:n,children:[t($e,{children:t(Ce,{icon:we(B.Action),title:g.INSTRUMENTATION_RULES,badge:h,badgeTooltip:y,loading:d})}),t(ke,{$maxHeight:i,children:t(De,{columns:Jo,rows:p})}),!u.length&&t(Te,{style:{marginTop:"2rem"},children:t(Ne,{})})]})},Go=p.div`
335
+ `,Bo=Bt,Wo=({createInstrumentationRule:i})=>{const{tier:a}=Le(),o=a===Wt.Onprem,{currentModal:r,setCurrentModal:l}=Q(),s=r===B.InstrumentationRule,{formData:c,formErrors:d,handleFormChange:u,resetFormData:p,validateForm:h}=Vt(),[m,y]=n(void 0),v=()=>{p(),y(void 0),l("")},b=()=>{if(!h())return null;i(c),v()};return K({key:"Enter",active:s},()=>b()),t(ee,{isOpen:s,onClose:v,header:{title:"Add Instrumentation Rule"},actionComponent:t(le,{buttons:[{variant:"primary",label:"DONE",onClick:b,disabled:!o||!m,tooltip:o?"":ae.ENTERPRISE_ONLY("Instrumentation Rules")}]}),children:e(te,{children:[t(I,{title:"Select Instrumentation Rule",description:"Define how telemetry is recorded from your application. Choose a rule type and configure the details."}),e(Vo,{children:[t(ie,o?{type:ne.Warning,message:ae.DEFINED_FOR_ALL_STREAMS(g.INSTRUMENTATION_RULES)}:{type:ne.Default,message:ae.ENTERPRISE_ONLY(g.INSTRUMENTATION_RULES)}),t(oe,{options:Bo,selectedOption:m,onOptionSelect:e=>{return t=e,p(),void y(t);var t},autoFocus:!m?.type})]}),m?.type?e("div",{children:[t(re,{margin:"16px 0"}),t(Ko,{rule:m,formData:c,formErrors:d,handleFormChange:u})]}):null]})})},_o=e=>{const{payloadCollection:t,codeAttributes:i,customInstrumentations:n}=e;let a="";return t&&(a+=Object.entries(t).filter(([e,t])=>!!t).map(([e,t])=>e).join(", ")),i&&(a+=Object.entries(i).filter(([e,t])=>!!t).map(([e,t])=>e).join(", ")),n&&Object.values(Mt).forEach(e=>{const t=(n[e]||[]).filter(e=>e).join(", ");t&&(a+=a?`, ${t}`:t)}),a},Jo=[{key:"icon",title:""},{key:"name",title:g.NAME,sortable:!0},{key:"profile",title:g.MANAGED_BY_PROFILE,sortable:!0},{key:"active-status",title:g.STATUS},{key:"conditions",title:"Conditions"},{key:"source-count",title:"Applicable Source"},{key:"type",title:g.TYPE,sortable:!0},{key:"spec",title:"Spec",sortable:!0},{key:"notes",title:g.NOTES,sortable:!0}],Uo=({maxHeight:i,maxWidth:n})=>{const a=m(),o=ye(),{setDrawerType:r,setDrawerEntityId:l}=j(),{instrumentationRules:c,instrumentationRulesLoading:d}=W(),u=s(()=>Kn({instrumentationRules:c,sources:[],actions:[],destinations:[],searchText:o.searchText,selectedCategory:B.InstrumentationRule}).searchResults.find(({category:e})=>e===B.InstrumentationRule)?.entities||[],[c,o]),p=s(()=>u.map(e=>{const{hasErrors:i,hasWarnings:n,hasDisableds:o}=ce(e.conditions||[]);return{status:i?ne.Error:n?ne.Warning:void 0,faded:o,onClick:()=>{r(B.InstrumentationRule),l(e.ruleId)},cells:[{columnKey:"icon",component:()=>t(be,{icon:qe(e.type)})},{columnKey:"name",value:fe(e,B.InstrumentationRule,{prioritizeDisplayName:!0})},{columnKey:"type",value:e.type,textColor:a.text.info},{columnKey:"profile",value:e.profileName,textColor:a.text.info},{columnKey:"notes",value:e.notes,textColor:a.text.info,withTooltip:!0},{columnKey:"spec",value:_o(e),textColor:a.text.info,withTooltip:!0},{columnKey:"conditions",component:()=>t(Pn,{conditions:e.conditions||[],id:e.ruleId})},{columnKey:"active-status",component:()=>t("div",{style:{lineHeight:1},children:t(de,{status:e.disabled?ne.Error:ne.Success,title:e.disabled?g.DISABLED:g.ENABLED,withIcon:!0,withBorder:!0})})},{columnKey:"source-count",component:()=>t("div",{style:{lineHeight:1},children:t(de,{status:ne.Info,title:"all sources",withBorder:!0})})}]}}),[u]),{badge:h,badgeTooltip:y}=s(()=>u.length!==c.length?{badge:`${u.length}/${c.length}`,badgeTooltip:g.FILTERED_COUNT_TOOLTIP}:{badge:c.length,badgeTooltip:void 0},[u,c]);return e(Se,{$maxWidth:n,children:[t($e,{children:t(Ce,{icon:we(B.Action),title:g.INSTRUMENTATION_RULES,badge:h,badgeTooltip:y,loading:d})}),t(ke,{$maxHeight:i,children:t(De,{columns:Jo,rows:p})}),!u.length&&t(Te,{style:{marginTop:"2rem"},children:t(Ne,{})})]})},Go=p.div`
336
336
  position: fixed;
337
337
  bottom: 0;
338
338
  left: 50%;
@@ -469,7 +469,7 @@ import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import{useState
469
469
  width: 100%;
470
470
  align-items: center;
471
471
  justify-content: space-between;
472
- `,Lr=({source:i,fetchSourceLibraries:o})=>{const r=m(),[l,s]=n(!1),[d,u]=n(null);return a(()=>{i&&o({namespace:i.namespace,name:i.name,kind:i.kind}).then(({data:e})=>{e?.instrumentationInstanceComponents?u(Nt(e.instrumentationInstanceComponents).sort((e,t)=>e.name.localeCompare(t.name))):s(!0)})},[i.namespace,i.name,i.kind]),d||l?t(se,{$gap:12,children:l?t(Te,{$height:"70vh",children:t(Ne,{subTitle:"Could not fetch libraries for this source"})}):d?.length?t(Y,{title:"Instrumented Libraries",children:d.map(({name:i,healthy:n,message:a,nonIdentifyingAttributes:o},l)=>e(c,{children:[e(se,{$gap:4,$width:"100%",children:[e(Mr,{$width:"100%",children:[t(P,{size:12,color:r.text.grey,children:i}),e(pe,{$gap:4,children:[o.map(({key:e,value:n})=>ci(n)&&di(n)&&"is_standard_lib"===e?t(de,{status:ne.Default,title:"STANDARD",withBorder:!0},`${i}-${e}`):null),"boolean"==typeof n&&t(de,{status:n?ne.Success:ne.Error,title:n?"HEALTHY":"UNHEALTHY",withBorder:!0})]})]}),a&&t(P,{size:10,color:r.text.error,align:"right",children:a})]}),l!==d.length-1&&t(re,{length:"100%",margin:"0"})]},`library-${i}`))}):e(Te,{$height:"70vh",$gap:12,children:[t(Ne,{title:"No libraries found",subTitle:""}),t(ie,{type:ne.Warning,message:"This feature is in early development, and has very limited support"})]})}):t(Te,{$height:"70vh",children:t(Oe,{})})};var Pr;!function(e){e.Overview="Overview",e.Pods="Pods",e.Libraries="Libraries"}(Pr||(Pr={}));const Kr=[pi.Deployment,pi.StatefulSet,pi.DaemonSet,pi.DeploymentConfig,pi.Rollout,pi.StaticPod],jr=[pi.Deployment,pi.StatefulSet,pi.DaemonSet,pi.DeploymentConfig,pi.Rollout,pi.Pod],qr=[hi.Python,hi.Go,hi.Java],Hr=p.div`
472
+ `,Lr=({source:i,fetchSourceLibraries:o})=>{const r=m(),[l,s]=n(!1),[d,u]=n(null);return a(()=>{i&&o({namespace:i.namespace,name:i.name,kind:i.kind}).then(({data:e})=>{e?.instrumentationInstanceComponents?u(Nt(e.instrumentationInstanceComponents).sort((e,t)=>e.name.localeCompare(t.name))):s(!0)})},[i.namespace,i.name,i.kind]),d||l?t(se,{$gap:12,children:l?t(Te,{$height:"70vh",children:t(Ne,{subTitle:"Could not fetch libraries for this source"})}):d?.length?t(Y,{title:"Instrumented Libraries",children:d.map(({name:i,healthy:n,message:a,nonIdentifyingAttributes:o},l)=>e(c,{children:[e(se,{$gap:4,$width:"100%",children:[e(Mr,{$width:"100%",children:[t(P,{size:12,color:r.text.grey,children:i}),e(pe,{$gap:4,children:[o.map(({key:e,value:n})=>ci(n)&&di(n)&&"is_standard_lib"===e?t(de,{status:ne.Default,title:"STANDARD",withBorder:!0},`${i}-${e}`):null),"boolean"==typeof n&&t(de,{status:n?ne.Success:ne.Error,title:n?"HEALTHY":"UNHEALTHY",withBorder:!0})]})]}),a&&t(P,{size:10,color:r.text.error,align:"right",children:a})]}),l!==d.length-1&&t(re,{length:"100%",margin:"0"})]},`library-${i}`))}):e(Te,{$height:"70vh",$gap:12,children:[t(Ne,{title:"No libraries found",subTitle:""}),t(ie,{type:ne.Warning,message:"This feature is in early development, and has very limited support"})]})}):t(Te,{$height:"70vh",children:t(Oe,{})})};var Pr;!function(e){e.Overview="Overview",e.Pods="Pods",e.Libraries="Libraries"}(Pr||(Pr={}));const jr=[pi.Deployment,pi.StatefulSet,pi.DaemonSet,pi.DeploymentConfig,pi.Rollout,pi.StaticPod],Kr=[pi.Deployment,pi.StatefulSet,pi.DaemonSet,pi.DeploymentConfig,pi.Rollout,pi.Pod],qr=[hi.Python,hi.Go,hi.Java],Hr=p.div`
473
473
  width: 100%;
474
474
  height: 100%;
475
475
  max-height: calc(100vh - 220px);
@@ -479,10 +479,10 @@ import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import{useState
479
479
  display: flex;
480
480
  flex-direction: column;
481
481
  gap: 12px;
482
- `;var Vr;!function(e){e.Workload="Workload",e.Pod="Pod"}(Vr||(Vr={}));const Br=({persistSources:o,updateSource:l,restartWorkloads:c,fetchSourceById:d,fetchSourceDescribe:u,fetchSourceLibraries:p,restartPod:h})=>{const{isVm:m}=Le(),{sources:y}=W(),{selectedStreamName:v}=Je(),{drawerType:b,drawerEntityId:f}=K(),x=s(()=>Ge(y,v),[y,v]),S=r(null),$=b===B.Source,[C,w]=n(!1),[k,D]=n(!1),[T,N]=n(Pr.Overview),[E,A]=n(null);a(()=>{$&&f&&d(f).then(e=>A(e||null))},[$,f]);const{formData:F,handleFormChange:O,resetFormData:I,loadFormWithDrawerItem:R}=ui(),M=s(()=>{if(f)return E&&JSON.stringify(Ut(E))===JSON.stringify(Ut(f))?E:x?.find(e=>JSON.stringify(Ut(e))===JSON.stringify(Ut(f)))},[f,x,E]);a(()=>{$&&M?R(M):I()},[$,M]);const L=s(()=>{const e=M?.conditions?.find(({type:e})=>"RuntimeDetection"===e);return{description:e?.message,isLoading:e?.status===ue.Loading,containers:M?.containers||[]}},[M]),j=s(()=>{const e=[{label:Pr.Overview,onClick:()=>N(Pr.Overview),selected:T===Pr.Overview}];return m||(Kr.includes(M?.kind)&&e.push({label:Pr.Pods,onClick:()=>N(Pr.Pods),selected:T===Pr.Pods}),M?.containers?.some(({language:e})=>qr.includes(e))&&e.push({label:Pr.Libraries,onClick:()=>N(Pr.Libraries),selected:T===Pr.Libraries})),e},[T,M,m]),q=jr.includes(M?.kind),[H,z]=n({openFor:null,workloadId:void 0,podNamespace:void 0,podName:void 0});return M?e(En,{ref:S,onClose:()=>{N(Pr.Overview),A(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:ze(M.containers),isEdit:C,isFormDirty:k,onEdit:T===Pr.Overview?e=>{w("boolean"!=typeof e||e)}:void 0,onSave:async()=>{const e=F.otelServiceName!==M.name?F.otelServiceName:"";O("otelServiceName",e),await l(f,{...F,otelServiceName:e}),A(null),D(!1),w(!1)},onDelete:T===Pr.Overview?async()=>{const{namespace:e}=M;o({[e]:[{...M,selected:!1,currentStreamName:v}]},{}),A(null),D(!1),w(!1),S.current?.closeDrawer()}:void 0,onCancel:()=>{D(!1),w(!1),O("otelServiceName",M.otelServiceName||M.name||"")},isLastItem:1===x.length,tabs:j,headerActionButtons:m?[]:q?[{"data-id":"rollout-restart",variant:"tertiary",onClick:()=>z({openFor:Vr.Workload,workloadId:f}),children:e(i,{children:[t(Hi,{}),t(P,{size:14,family:"secondary",decoration:"underline",children:"Restart"})]})}]:[],children:[T===Pr.Overview?C?t(Hr,{children:t(Or,{formData:F,handleFormChange:(...e)=>{D(!0),O(...e),O("currentStreamName",v)}})}):e(zr,{children:[t(Ir,{workloadOdigosHealthStatus:M.workloadOdigosHealthStatus}),t(G,{conditions:M.conditions||[]}),t(Y,{title:g.SOURCE_DETAILS,data:M?Ar(M,m):[]}),t(Y,{title:m?g.DETECTED_PROCESSES:g.DETECTED_CONTAINERS,titleBadge:L.isLoading?ue.Loading:L.containers.length,description:L.description||(m?g.DETECTED_PROCESSES_DESCRIPTION:g.DETECTED_CONTAINERS_DESCRIPTION),children:L.containers.map(e=>t(mi,{...e,callbackRuntimeOverride:e=>l(f,e)},`source-container-${e.containerName}`))}),M.manifestYAML&&t(rn,{title:`${M.kind} YAML`,yaml:M.manifestYAML,defaultOpen:!M.instrumentationConfigYAML}),M.instrumentationConfigYAML&&t(rn,{title:"Instrumentation Config YAML",yaml:M.instrumentationConfigYAML,defaultOpen:!M.manifestYAML})]}):T===Pr.Pods?t(Rr,{source:M,fetchSourceDescribe:u,onClickRestartPod:q?(e,t)=>z({openFor:Vr.Pod,podNamespace:e,podName:t}):void 0}):t(Lr,{source:M,fetchSourceLibraries:p}),t(_t,{isOpen:!!H.openFor,title:`Rollout Restart ${H.openFor}`,description:`Are you sure you want to rollout restart this ${H.openFor?.toLowerCase()}?`,approveButton:{text:"Confirm",variant:ne.Warning,onClick:()=>{H.openFor===Vr.Workload&&H.workloadId?c([H.workloadId]):H.openFor===Vr.Pod&&H.podNamespace&&H.podName&&h(H.podNamespace,H.podName),z({openFor:null})}},denyButton:{text:"Go Back",onClick:()=>{z({openFor:null})}}})]}):null},Wr=p.div`
482
+ `;var Vr;!function(e){e.Workload="Workload",e.Pod="Pod"}(Vr||(Vr={}));const Br=({persistSources:o,updateSource:l,restartWorkloads:c,fetchSourceById:d,fetchSourceDescribe:u,fetchSourceLibraries:p,restartPod:h})=>{const{isVm:m}=Le(),{sources:y}=W(),{selectedStreamName:v}=Je(),{drawerType:b,drawerEntityId:f}=j(),x=s(()=>Ge(y,v),[y,v]),S=r(null),$=b===B.Source,[C,w]=n(!1),[k,D]=n(!1),[T,N]=n(Pr.Overview),[E,A]=n(null);a(()=>{$&&f&&d(f).then(e=>A(e||null))},[$,f]);const{formData:F,handleFormChange:O,resetFormData:I,loadFormWithDrawerItem:R}=ui(),M=s(()=>{if(f)return E&&JSON.stringify(Ut(E))===JSON.stringify(Ut(f))?E:x?.find(e=>JSON.stringify(Ut(e))===JSON.stringify(Ut(f)))},[f,x,E]);a(()=>{$&&M?R(M):I()},[$,M]);const L=s(()=>{const e=M?.conditions?.find(({type:e})=>"RuntimeDetection"===e);return{description:e?.message,isLoading:e?.status===ue.Loading,containers:M?.containers||[]}},[M]),K=s(()=>{const e=[{label:Pr.Overview,onClick:()=>N(Pr.Overview),selected:T===Pr.Overview}];return m||(jr.includes(M?.kind)&&e.push({label:Pr.Pods,onClick:()=>N(Pr.Pods),selected:T===Pr.Pods}),M?.containers?.some(({language:e})=>qr.includes(e))&&e.push({label:Pr.Libraries,onClick:()=>N(Pr.Libraries),selected:T===Pr.Libraries})),e},[T,M,m]),q=Kr.includes(M?.kind),[H,z]=n({openFor:null,workloadId:void 0,podNamespace:void 0,podName:void 0});return M?e(En,{ref:S,onClose:()=>{N(Pr.Overview),A(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:ze(M.containers),isEdit:C,isFormDirty:k,onEdit:T===Pr.Overview?e=>{w("boolean"!=typeof e||e)}:void 0,onSave:async()=>{const e=F.otelServiceName!==M.name?F.otelServiceName:"";O("otelServiceName",e),await l(f,{...F,otelServiceName:e}),A(null),D(!1),w(!1)},onDelete:T===Pr.Overview?async()=>{const{namespace:e}=M;o({[e]:[{...M,selected:!1,currentStreamName:v}]},{}),A(null),D(!1),w(!1),S.current?.closeDrawer()}:void 0,onCancel:()=>{D(!1),w(!1),O("otelServiceName",M.otelServiceName||M.name||"")},isLastItem:1===x.length,tabs:K,headerActionButtons:m?[]:q?[{"data-id":"rollout-restart",variant:"tertiary",onClick:()=>z({openFor:Vr.Workload,workloadId:f}),children:e(i,{children:[t(Hi,{}),t(P,{size:14,family:"secondary",decoration:"underline",children:"Restart"})]})}]:[],children:[T===Pr.Overview?C?t(Hr,{children:t(Or,{formData:F,handleFormChange:(...e)=>{D(!0),O(...e),O("currentStreamName",v)}})}):e(zr,{children:[t(Ir,{workloadOdigosHealthStatus:M.workloadOdigosHealthStatus}),t(G,{conditions:M.conditions||[]}),t(Y,{title:g.SOURCE_DETAILS,data:M?Ar(M,m):[]}),t(Y,{title:m?g.DETECTED_PROCESSES:g.DETECTED_CONTAINERS,titleBadge:L.isLoading?ue.Loading:L.containers.length,description:L.description||(m?g.DETECTED_PROCESSES_DESCRIPTION:g.DETECTED_CONTAINERS_DESCRIPTION),children:L.containers.map(e=>t(mi,{...e,callbackRuntimeOverride:e=>l(f,e)},`source-container-${e.containerName}`))}),M.manifestYAML&&t(rn,{title:`${M.kind} YAML`,yaml:M.manifestYAML,defaultOpen:!M.instrumentationConfigYAML}),M.instrumentationConfigYAML&&t(rn,{title:"Instrumentation Config YAML",yaml:M.instrumentationConfigYAML,defaultOpen:!M.manifestYAML})]}):T===Pr.Pods?t(Rr,{source:M,fetchSourceDescribe:u,onClickRestartPod:q?(e,t)=>z({openFor:Vr.Pod,podNamespace:e,podName:t}):void 0}):t(Lr,{source:M,fetchSourceLibraries:p}),t(_t,{isOpen:!!H.openFor,title:`Rollout Restart ${H.openFor}`,description:`Are you sure you want to rollout restart this ${H.openFor?.toLowerCase()}?`,approveButton:{text:"Confirm",variant:ne.Warning,onClick:()=>{H.openFor===Vr.Workload&&H.workloadId?c([H.workloadId]):H.openFor===Vr.Pod&&H.podNamespace&&H.podName&&h(H.podNamespace,H.podName),z({openFor:null})}},denyButton:{text:"Go Back",onClick:()=>{z({openFor:null})}}})]}):null},Wr=p.div`
483
483
  max-width: ${({$fullWidth:e})=>e?"unset":"420px"};
484
484
  width: 100%;
485
- `,_r=o(({isModal:i,fetchSingleNamespace:n,onClickSummary:a},o)=>{const r=m(),{isVm:s}=Le(),c=gi({fetchSingleNamespace:n}),{selectedSources:d,fetchingNamespace:u,selectedAllNamespaces:p,onSelectAllNamespaces:h,getApiSourcesPayload:y,getApiFutureAppsPayload:v,searchText:b,setSearchText:f,searchBy:x,setSearchBy:S,showSelectedOnly:$,setShowSelectedOnly:w,showRunningOnly:k,setShowRunningOnly:D}=c;l(o,()=>({getFormValues:()=>({apps:y(),futureApps:v()})}));const N=Object.values(d).reduce((e,t)=>e+t.filter(e=>e.selected).length,0);return t(te,{$isNotModal:!i,children:e(se,{$gap:12,children:[e(se,{$gap:24,children:[a&&t(vt,{onClick:a}),t(I,{title:g.SELECT_SOURCES,badgeLabel:N,description:g.SELECT_SOURCES_DESCRIPTION}),e(pe,{$justifyContent:"space-between",children:[t(Wr,{$fullWidth:s,children:t(C,{placeholder:x===B.Source?g.SEARCH_SOURCES:g.SEARCH_NAMESPACES,icon:Mi,value:b,onChange:e=>f(e.target.value.toLowerCase())})}),!s&&t(F,{options:[{label:g.SOURCE,value:B.Source,selectedBgColor:r.text.secondary,selectedTextColor:r.text.primary},{label:g.NAMESPACE,value:B.Namespace,selectedBgColor:r.text.secondary,selectedTextColor:r.text.primary}],selected:x,setSelected:S})]}),e(pe,{$gap:36,children:[t(T,{title:g.SELECT_ALL,initialValue:p,onChange:h,disabled:!!u}),t(T,{title:g.ONLY_SELECTED,initialValue:$,onChange:w}),t(T,{title:g.ONLY_RUNNING_INSTANCES,initialValue:k,onChange:D})]})]}),t(re,{}),t(Cr,{isModal:i,...c})]})})});_r.displayName=_r.name;const Jr=({fetchSingleNamespace:e,persistSources:i})=>{const{currentModal:n,setCurrentModal:a}=Q(),o=n===B.Source,l=()=>{a("")},s=async()=>{if(c.current){const{apps:e,futureApps:t}=c.current.getFormValues();i(e,t),l()}},c=r(null);return j({key:"Enter",active:o},s),o?t(ee,{isOpen:o,onClose:l,header:{title:"Add Source"},actionComponent:t(le,{buttons:[{label:"DONE",variant:"primary",onClick:s}]}),children:t(_r,{ref:c,isModal:!0,fetchSingleNamespace:e})}):null},Ur=e=>{const t=[{key:"checkbox-and-icon",title:""},{key:"name",title:g.NAME,sortable:!0},{key:"kind",title:"Kind",sortable:!0}];return e||t.push({key:"namespace",title:g.NAMESPACE,sortable:!0}),t.push({key:"containers",title:g.DETECTED_CONTAINERS}),t.push({key:"conditions",title:"Conditions"}),t.push({key:"throughput",title:"Throughput",sortable:!0}),t},Gr=({metrics:i,maxHeight:n,maxWidth:a})=>{const o=m(),{isVm:r}=Le(),l=ye(),{selectedStreamName:c}=Je(),{sources:u,sourcesLoading:p}=W(),{setDrawerType:h,setDrawerEntityId:y}=K(),{selectedSources:v,setSelectedSources:b}=Re(),{progress:f}=Be(),x=s(()=>f[We.Instrumenting]||f[We.Uninstrumenting]?f[We.Instrumenting]?.percentage||f[We.Uninstrumenting]?.percentage||0:void 0,[f[We.Instrumenting],f[We.Uninstrumenting]]),$=s(()=>Ge(u,c),[u,c]),C=s(()=>jn({instrumentationRules:[],sources:Xe($,l),actions:[],destinations:[],searchText:l.searchText,selectedCategory:B.Source}).searchResults.find(({category:e})=>e===B.Source)?.entities||[],[$,l]),[w,k]=s(()=>{let e=0;return Object.values(v).forEach(t=>{e+=t.length}),[0!==e,e]},[v]),D=d(e=>{if(e){const e={};C.forEach(t=>{const{namespace:i}=t;e[i]?e[i].push(t):e[i]=[t]}),b(e)}else b({})},[C]),T=d(e=>{const{namespace:t,name:i,kind:n}=e,a={...v};a[t]||(a[t]=[]);const o=a[t].findIndex(e=>e.name===i&&e.kind===n);-1===o?a[t].push(e):a[t].splice(o,1),b(a)},[v]),N=s(()=>C.map(n=>{const a=Ut(n),r=JSON.stringify(a),{hasErrors:l,hasWarnings:s,hasDisableds:c}=ce(n.conditions||[]),d=!!v[a.namespace]?.find(e=>e.namespace===a.namespace&&e.name===a.name&&e.kind===a.kind);return{status:l?ne.Error:s?ne.Warning:void 0,faded:c,onClick:()=>{h(B.Source),y(a)},cells:[{columnKey:"checkbox-and-icon",component:()=>e(pe,{$gap:16,children:[t(S,{value:d,onChange:()=>T(n)}),t(yi,{icons:ze(n.containers),id:r})]})},{columnKey:"name",value:fe(n,B.Source,{extended:!0})},{columnKey:"kind",value:n.kind,textColor:o.text.info},{columnKey:"namespace",value:n.namespace,textColor:o.text.info},{columnKey:"throughput",value:Ke(Ot(i,B.Source,a).throughput),textColor:o.text.info},{columnKey:"conditions",component:()=>t(Pn,{conditions:n.conditions||[],id:r})},{columnKey:"containers",component:()=>t("div",{style:{lineHeight:1},children:t(de,{status:ne.Info,title:vi(n.containers),withBorder:!0})})}]}}),[C,v,i,T]),{badge:E,badgeTooltip:A}=s(()=>C.length!==$.length?{badge:`${C.length}/${$.length}`,badgeTooltip:g.FILTERED_COUNT_TOOLTIP}:{badge:$.length,badgeTooltip:void 0},[C,$]);return e(Se,{$maxWidth:a,children:[e($e,{children:[t(S,{partiallyChecked:w&&C?.length!==k,value:w&&C?.length===k,onChange:D,disabled:!C?.length}),t(Ce,{icon:we(B.Source),title:g.SOURCES,badge:E,badgeTooltip:A,loading:p||"number"==typeof x})]}),t(ke,{$maxHeight:n,children:t(De,{columns:Ur(r),rows:N})}),"number"!=typeof x||N.length?N.length?null:t(Te,{style:{marginTop:"2rem"},children:t(Ne,{})}):e(Te,{style:{marginTop:"2rem",gap:"24px"},children:[t(Ee,{width:420}),e(pe,{$gap:16,children:[e(P,{color:o.text.info,children:[f[We.Instrumenting]?"Instrumenting":"Uninstrumenting"," workloads..."]}),t(Ae,{label:`${x}%`})]})]})]})},Yr=({expiresAt:t})=>{const i=m(),{formatTimeAgo:n}=Gt(),a=n(t),o=new Date(t).toDateString().split(" ").slice(1).join(" "),r=bi(t,0)?i.text.error:bi(t,6048e5)?i.text.warning:i.text.success;return e(P,{size:14,color:r,children:[a," (",o,")"]})},Xr=p.div`
485
+ `,_r=o(({isModal:i,fetchSingleNamespace:n,onClickSummary:a},o)=>{const r=m(),{isVm:s}=Le(),c=gi({fetchSingleNamespace:n}),{selectedSources:d,fetchingNamespace:u,selectedAllNamespaces:p,onSelectAllNamespaces:h,getApiSourcesPayload:y,getApiFutureAppsPayload:v,searchText:b,setSearchText:f,searchBy:x,setSearchBy:S,showSelectedOnly:$,setShowSelectedOnly:w,showRunningOnly:k,setShowRunningOnly:D}=c;l(o,()=>({getFormValues:()=>({apps:y(),futureApps:v()})}));const N=Object.values(d).reduce((e,t)=>e+t.filter(e=>e.selected).length,0);return t(te,{$isNotModal:!i,children:e(se,{$gap:12,children:[e(se,{$gap:24,children:[a&&t(vt,{onClick:a}),t(I,{title:g.SELECT_SOURCES,badgeLabel:N,description:g.SELECT_SOURCES_DESCRIPTION}),e(pe,{$justifyContent:"space-between",children:[t(Wr,{$fullWidth:s,children:t(C,{placeholder:x===B.Source?g.SEARCH_SOURCES:g.SEARCH_NAMESPACES,icon:Mi,value:b,onChange:e=>f(e.target.value.toLowerCase())})}),!s&&t(F,{options:[{label:g.SOURCE,value:B.Source,selectedBgColor:r.text.secondary,selectedTextColor:r.text.primary},{label:g.NAMESPACE,value:B.Namespace,selectedBgColor:r.text.secondary,selectedTextColor:r.text.primary}],selected:x,setSelected:S})]}),e(pe,{$gap:36,children:[t(T,{title:g.SELECT_ALL,initialValue:p,onChange:h,disabled:!!u}),t(T,{title:g.ONLY_SELECTED,initialValue:$,onChange:w}),t(T,{title:g.ONLY_RUNNING_INSTANCES,initialValue:k,onChange:D})]})]}),t(re,{}),t(Cr,{isModal:i,...c})]})})});_r.displayName=_r.name;const Jr=({fetchSingleNamespace:e,persistSources:i})=>{const{currentModal:n,setCurrentModal:a}=Q(),o=n===B.Source,l=()=>{a("")},s=async()=>{if(c.current){const{apps:e,futureApps:t}=c.current.getFormValues();i(e,t),l()}},c=r(null);return K({key:"Enter",active:o},s),o?t(ee,{isOpen:o,onClose:l,header:{title:"Add Source"},actionComponent:t(le,{buttons:[{label:"DONE",variant:"primary",onClick:s}]}),children:t(_r,{ref:c,isModal:!0,fetchSingleNamespace:e})}):null},Ur=e=>{const t=[{key:"checkbox-and-icon",title:""},{key:"name",title:g.NAME,sortable:!0},{key:"kind",title:"Kind",sortable:!0}];return e||t.push({key:"namespace",title:g.NAMESPACE,sortable:!0}),t.push({key:"containers",title:g.DETECTED_CONTAINERS}),t.push({key:"conditions",title:"Conditions"}),t.push({key:"throughput",title:"Throughput",sortable:!0}),t},Gr=({metrics:i,maxHeight:n,maxWidth:a})=>{const o=m(),{isVm:r}=Le(),l=ye(),{selectedStreamName:c}=Je(),{sources:u,sourcesLoading:p}=W(),{setDrawerType:h,setDrawerEntityId:y}=j(),{selectedSources:v,setSelectedSources:b}=Re(),{progress:f}=Be(),x=s(()=>f[We.Instrumenting]||f[We.Uninstrumenting]?f[We.Instrumenting]?.percentage||f[We.Uninstrumenting]?.percentage||0:void 0,[f[We.Instrumenting],f[We.Uninstrumenting]]),$=s(()=>Ge(u,c),[u,c]),C=s(()=>Kn({instrumentationRules:[],sources:Xe($,l),actions:[],destinations:[],searchText:l.searchText,selectedCategory:B.Source}).searchResults.find(({category:e})=>e===B.Source)?.entities||[],[$,l]),[w,k]=s(()=>{let e=0;return Object.values(v).forEach(t=>{e+=t.length}),[0!==e,e]},[v]),D=d(e=>{if(e){const e={};C.forEach(t=>{const{namespace:i}=t;e[i]?e[i].push(t):e[i]=[t]}),b(e)}else b({})},[C]),T=d(e=>{const{namespace:t,name:i,kind:n}=e,a={...v};a[t]||(a[t]=[]);const o=a[t].findIndex(e=>e.name===i&&e.kind===n);-1===o?a[t].push(e):a[t].splice(o,1),b(a)},[v]),N=s(()=>C.map(n=>{const a=Ut(n),r=JSON.stringify(a),{hasErrors:l,hasWarnings:s,hasDisableds:c}=ce(n.conditions||[]),d=!!v[a.namespace]?.find(e=>e.namespace===a.namespace&&e.name===a.name&&e.kind===a.kind);return{status:l?ne.Error:s?ne.Warning:void 0,faded:c,onClick:()=>{h(B.Source),y(a)},cells:[{columnKey:"checkbox-and-icon",component:()=>e(pe,{$gap:16,children:[t(S,{value:d,onChange:()=>T(n)}),t(yi,{icons:ze(n.containers),id:r})]})},{columnKey:"name",value:fe(n,B.Source,{extended:!0})},{columnKey:"kind",value:n.kind,textColor:o.text.info},{columnKey:"namespace",value:n.namespace,textColor:o.text.info},{columnKey:"throughput",value:je(Ot(i,B.Source,a).throughput),textColor:o.text.info},{columnKey:"conditions",component:()=>t(Pn,{conditions:n.conditions||[],id:r})},{columnKey:"containers",component:()=>t("div",{style:{lineHeight:1},children:t(de,{status:ne.Info,title:vi(n.containers),withBorder:!0})})}]}}),[C,v,i,T]),{badge:E,badgeTooltip:A}=s(()=>C.length!==$.length?{badge:`${C.length}/${$.length}`,badgeTooltip:g.FILTERED_COUNT_TOOLTIP}:{badge:$.length,badgeTooltip:void 0},[C,$]);return e(Se,{$maxWidth:a,children:[e($e,{children:[t(S,{partiallyChecked:w&&C?.length!==k,value:w&&C?.length===k,onChange:D,disabled:!C?.length}),t(Ce,{icon:we(B.Source),title:g.SOURCES,badge:E,badgeTooltip:A,loading:p||"number"==typeof x})]}),t(ke,{$maxHeight:n,children:t(De,{columns:Ur(r),rows:N})}),"number"!=typeof x||N.length?N.length?null:t(Te,{style:{marginTop:"2rem"},children:t(Ne,{})}):e(Te,{style:{marginTop:"2rem",gap:"24px"},children:[t(Ee,{width:420}),e(pe,{$gap:16,children:[e(P,{color:o.text.info,children:[f[We.Instrumenting]?"Instrumenting":"Uninstrumenting"," workloads..."]}),t(Ae,{label:`${x}%`})]})]})]})},Yr=({expiresAt:t})=>{const i=m(),{formatTimeAgo:n}=Gt(),a=n(t),o=new Date(t).toDateString().split(" ").slice(1).join(" "),r=bi(t,0)?i.text.error:bi(t,6048e5)?i.text.warning:i.text.success;return e(P,{size:14,color:r,children:[a," (",o,")"]})},Xr=p.div`
486
486
  position: relative;
487
487
  `,Zr=({token:i,saveToken:a})=>{const{CopyButton:o}=fi(),{formData:r,handleFormChange:l,resetFormData:s}=xi({token:i}),[c,d]=n(!1),u=()=>{d(!1),s()};return e(pe,{$gap:0,children:[t(o,{value:i,size:Si.L}),t(re,{orientation:"vertical",length:"12px"}),e(Xr,{children:[t(mt,{size:32,onClick:()=>{d(!0)},children:t(Ai,{})}),c&&t($i,{flipX:!0,clientX:36,isOpen:c,onClose:u,onSave:()=>{a(r.token).then(u)},title:"Enter a new API Token",titleTooltip:"Contact us to generate a new one",children:t(C,{placeholder:"API Token",type:"password",value:r.token,onChange:e=>l("token",e.target.value)})})]})]})},Qr=({tokens:e,saveToken:i})=>t(Y,{title:"Authorization Tokens",titleBadge:e.length,data:[{type:y.Table,value:{columns:[{key:"icon",title:""},{key:"name",title:"Name"},{key:"expires_at",title:"Expires"},{key:"token",title:"Token"},{key:"actions",title:""}],rows:e.map(({name:e,token:n,expiresAt:a})=>({cells:[{columnKey:"icon",icon:Xi},{columnKey:"name",value:e},{columnKey:"token",value:`${new Array(15).fill("•").join("")}`},{columnKey:"expires_at",component:()=>t(Yr,{expiresAt:a})},{columnKey:"actions",component:()=>t(Zr,{token:n,saveToken:i})}]}))}}]}),el=({fetchDescribeOdigos:o})=>{const[r,l]=n(null);if(a(()=>{o().then(({data:e})=>l(e?.describeOdigos||null))},[]),!r)return t(Te,{children:t(Oe,{})});const s=e=>e?.name?[t(re,{},`divider-${e.name}`),t(oi,{title:e.name,subTitle:e.explain||void 0,value:{status:e.status||(ci(e.value)?di(e.value)?ne.Success:ne.Error:ne.Default),text:e.value}},`describe-row-${e.name}`)]:[];return e(i,{children:[t(Y,{title:"General Information",withExtend:!0,initialExtended:!0,data:[{title:r?.odigosVersion?.name,value:r?.odigosVersion?.value},{title:r?.kubernetesVersion?.name,value:r?.kubernetesVersion?.value},{title:r?.installationMethod?.name,value:r?.installationMethod?.value},{title:r?.tier?.name,value:r?.tier?.value},{title:"# of sources",value:r?.numberOfSources?.toString()},{title:"# of destinations",value:r?.numberOfDestinations?.toString()}]}),t(Y,{title:"Cluster Collector",withExtend:!0,children:Object.values(r?.clusterCollector||{}).map(s)}),t(Y,{title:"Node Collector",withExtend:!0,children:Object.values(r?.nodeCollector||{}).map(s)})]})},tl=p.div`
488
488
  display: flex;
@@ -597,4 +597,4 @@ import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import{useState
597
597
  padding-top: 12px;
598
598
  padding-left: 12px;
599
599
  white-space: nowrap;
600
- `,Fl=({heightToRemove:a,traces:o,isLoading:r})=>{const[l,c]=n([]),[d,u]=n(null),p=s(()=>Nt(o).sort((e,t)=>t.spans[0].startTime-e.spans[0].startTime).map(e=>({...e,spans:dl(e)})),[o]),h=s(()=>p.reduce((e,t)=>Math.max(e,t.spans.reduce((e,t)=>e+t.duration,0)),0),[p]),m=s(()=>{const e=p.find(e=>e.spans.some(e=>e.spanID===d?.spanID)),t=e?.processes.find(e=>e.serviceName===d?.processID);return t},[p,d]);return e(i,{children:[t(Dl,{$heightToRemove:a,children:r?t(Te,{$height:"50vh",children:t(Oe,{scale:1.5})}):p.length?e(Tl,{$heightToRemove:a,children:[t(Nl,{children:t(P,{children:"Service & operation"})}),new Array(5).fill(null).map((e,i)=>t(El,{$heightToRemove:a,index:i,children:t(Al,{children:wi(h/5*i)})},`${i}-divider`)),p.map((e,i)=>{const{spans:n}=e,a=n.reduce((e,t)=>Math.min(e,t.startTime),Number.MAX_SAFE_INTEGER),o=n.reduce((e,t)=>Math.max(e,t.startTime+t.duration),0);return t(kl,{spans:n,logs:[],depth:1,indexInMatrix:i,maxDuration:h,minStartTime:a,maxEndTime:o,openSpanIdsState:{value:l,set:c},selectedSpanState:{value:d,set:u}},`recursive-spans-${e.traceID}`)})]}):t(Te,{$height:"50vh",children:t(Ne,{title:g.NO_TRACES_FOUND,subTitle:g.ARE_SERVICES_INSTRUMENTED_AND_PRODUCING_TRAFFIC})})}),d&&t(yl,{span:d,process:m,onClose:()=>u(null)})]})};export{In as ActionDrawer,Nn as ActionForm,Mn as ActionModal,Hn as ActionTable,_n as AwaitPipeline,ha as ConditionDropdown,sa as DataFlow,ja as DataFlowActionsMenu,Ea as DataStreamDrawer,Ta as DataStreamForm,Ha as DataStreamModal,qa as DataStreamSelectionForm,Qa as DestinationDrawer,Ya as DestinationForm,fo as DestinationModal,wo as DestinationSelectionForm,Do as DestinationTable,ma as ErrorDropdown,zo as InstrumentationRuleDrawer,jo as InstrumentationRuleForm,Wo as InstrumentationRuleModal,Uo as InstrumentationRuleTable,ba as KindDropdown,ga as LanguageDropdown,ya as MonitorDropdown,Yo as MultiSourceControl,va as NamespaceDropdown,Tr as NavIconIds,ir as NotificationManager,En as OverviewDrawer,fa as PodsAgentInjectionStatusDropdown,hr as ServiceMap,Dr as SetupSummary,Nr as SideNav,Er as SlackInvite,Br as SourceDrawer,Or as SourceForm,Jr as SourceModal,_r as SourceSelectionForm,Gr as SourceTable,nl as SystemOverview,Pn as TableCellConditions,ol as ToastList,cl as ToggleDarkMode,Fl as TraceView};
600
+ `,Fl=({heightToRemove:a,traces:o,isLoading:r})=>{const[l,c]=n([]),[d,u]=n(null),p=s(()=>Nt(o).sort((e,t)=>t.spans[0].startTime-e.spans[0].startTime).map(e=>({...e,spans:dl(e)})),[o]),h=s(()=>p.reduce((e,t)=>Math.max(e,t.spans.reduce((e,t)=>e+t.duration,0)),0),[p]),m=s(()=>{const e=p.find(e=>e.spans.some(e=>e.spanID===d?.spanID)),t=e?.processes.find(e=>e.serviceName===d?.processID);return t},[p,d]);return e(i,{children:[t(Dl,{$heightToRemove:a,children:r?t(Te,{$height:"50vh",children:t(Oe,{scale:1.5})}):p.length?e(Tl,{$heightToRemove:a,children:[t(Nl,{children:t(P,{children:"Service & operation"})}),new Array(5).fill(null).map((e,i)=>t(El,{$heightToRemove:a,index:i,children:t(Al,{children:wi(h/5*i)})},`${i}-divider`)),p.map((e,i)=>{const{spans:n}=e,a=n.reduce((e,t)=>Math.min(e,t.startTime),Number.MAX_SAFE_INTEGER),o=n.reduce((e,t)=>Math.max(e,t.startTime+t.duration),0);return t(kl,{spans:n,logs:[],depth:1,indexInMatrix:i,maxDuration:h,minStartTime:a,maxEndTime:o,openSpanIdsState:{value:l,set:c},selectedSpanState:{value:d,set:u}},`recursive-spans-${e.traceID}`)})]}):t(Te,{$height:"50vh",children:t(Ne,{title:g.NO_TRACES_FOUND,subTitle:g.ARE_SERVICES_INSTRUMENTED_AND_PRODUCING_TRAFFIC})})}),d&&t(yl,{span:d,process:m,onClose:()=>u(null)})]})};export{In as ActionDrawer,Nn as ActionForm,Mn as ActionModal,Hn as ActionTable,_n as AwaitPipeline,ha as ConditionDropdown,sa as DataFlow,Ka as DataFlowActionsMenu,Ea as DataStreamDrawer,Ta as DataStreamForm,Ha as DataStreamModal,qa as DataStreamSelectionForm,Qa as DestinationDrawer,Ya as DestinationForm,fo as DestinationModal,wo as DestinationSelectionForm,Do as DestinationTable,ma as ErrorDropdown,zo as InstrumentationRuleDrawer,Ko as InstrumentationRuleForm,Wo as InstrumentationRuleModal,Uo as InstrumentationRuleTable,ba as KindDropdown,ga as LanguageDropdown,ya as MonitorDropdown,Yo as MultiSourceControl,va as NamespaceDropdown,Tr as NavIconIds,ir as NotificationManager,En as OverviewDrawer,fa as PodsAgentInjectionStatusDropdown,hr as ServiceMap,Dr as SetupSummary,Nr as SideNav,Er as SlackInvite,Br as SourceDrawer,Or as SourceForm,Jr as SourceModal,_r as SourceSelectionForm,Gr as SourceTable,nl as SystemOverview,Pn as TableCellConditions,ol as ToastList,cl as ToggleDarkMode,Fl as TraceView};
package/lib/contexts.js CHANGED
@@ -1 +1 @@
1
- export{dq as OdigosProvider,dr as StorybookProvider,a9 as checkVersionSupport,a6 as useOdigos,ds as useStorybook}from"./chunks/ui-components-B4OMCuIf.js";import"./icons.js";import"react/jsx-runtime";import"styled-components";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-C-kwkNJP.js";import"react-dom";import"@xyflow/react";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";
1
+ export{dt as OdigosProvider,du as StorybookProvider,ak as checkVersionSupport,ah as useOdigos,dv as useStorybook}from"./chunks/ui-components-ymRfS19x.js";import"./icons.js";import"react/jsx-runtime";import"styled-components";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-C-kwkNJP.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{bZ as capitalizeFirstLetter,cY as cleanObjectEmptyStringsValues,bU as compareCondition,v as deepClone,b8 as filterActions,bA as filterDestinations,by as filterDestinationsByStream,bz as filterSources,bx as filterSourcesByStream,cZ as flattenObjectKeys,bp as formatBytes,cz as formatDuration,a8 as generateId,aU as getActionIcon,b2 as getConditionsBooleans,bt as getContainersIcons,cv as getContainersInstrumentedCount,bs as getDestinationIcon,bf as getEntityIcon,aQ as getEntityId,ba as getEntityLabel,c_ as getIdFromSseTarget,br as getInstrumentationRuleIcon,c$ as getMainContainerLanguage,c3 as getMetricForEntity,d0 as getMonitorIcon,d1 as getPlatformIcon,d2 as getPlatformLabel,n as getProgrammingLanguageIcon,cB as getRecursiveValues,d3 as getSseTargetFromId,d4 as getStatusColor,ag as getStatusFromPodStatus,b6 as getStatusIcon,ch as getStatusTypeFromOdigosHealth,d5 as getValueForRange,ca as getWorkloadId,bY as getYamlFieldsForDestination,ci as hasUnhealthyInstances,ay as isEmpty,d6 as isLegalK8sLabel,a0 as isOverTime,cn as isStringABoolean,d7 as isTimeElapsed,d8 as isValidVersion,b5 as mapConditions,bT as mapDestinationFieldsForDisplay,bo as mapExportedSignals,b_ as mapSupportedSignals,d9 as numbersOnly,co as parseBooleanFromString,da as parseJsonStringToPrettyString,db as removeEmptyValuesFromObject,bV as safeJsonParse,dc as safeJsonStringify,bk as sleep,bH as splitCamelString,dd as stringifyNonStringValues,de as trimVersion}from"./chunks/ui-components-B4OMCuIf.js";import"./icons.js";import"react/jsx-runtime";import"styled-components";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-C-kwkNJP.js";import"react-dom";import"@xyflow/react";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";
1
+ export{c0 as capitalizeFirstLetter,c$ as cleanObjectEmptyStringsValues,bX as compareCondition,j as deepClone,bc as filterActions,bE as filterDestinations,bC as filterDestinationsByStream,bD as filterSources,bB as filterSourcesByStream,d0 as flattenObjectKeys,bt as formatBytes,cC as formatDuration,aj as generateId,aY as getActionIcon,b6 as getConditionsBooleans,bx as getContainersIcons,cy as getContainersInstrumentedCount,bw as getDestinationIcon,bj as getEntityIcon,aU as getEntityId,be as getEntityLabel,d1 as getIdFromSseTarget,bv as getInstrumentationRuleIcon,d2 as getMainContainerLanguage,c6 as getMetricForEntity,d3 as getMonitorIcon,d4 as getPlatformIcon,d5 as getPlatformLabel,O as getProgrammingLanguageIcon,cE as getRecursiveValues,d6 as getSseTargetFromId,d7 as getStatusColor,ar as getStatusFromPodStatus,ba as getStatusIcon,ck as getStatusTypeFromOdigosHealth,d8 as getValueForRange,cd as getWorkloadId,b$ as getYamlFieldsForDestination,cl as hasUnhealthyInstances,i as isEmpty,d9 as isLegalK8sLabel,ab as isOverTime,cq as isStringABoolean,da as isTimeElapsed,db as isValidVersion,b9 as mapConditions,bW as mapDestinationFieldsForDisplay,bs as mapExportedSignals,c1 as mapSupportedSignals,dc as numbersOnly,cr as parseBooleanFromString,dd as parseJsonStringToPrettyString,de as removeEmptyValuesFromObject,bY as safeJsonParse,df as safeJsonStringify,bo as sleep,bL as splitCamelString,dg as stringifyNonStringValues,dh as trimVersion}from"./chunks/ui-components-ymRfS19x.js";import"./icons.js";import"react/jsx-runtime";import"styled-components";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-C-kwkNJP.js";import"react-dom";import"@xyflow/react";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";
package/lib/hooks.js CHANGED
@@ -1 +1 @@
1
- export{aP as useActionFormData,dn as useBodyScroll,bB as useClickNode,cb as useClickNotification,bw as useContainerSize,Y as useCopy,bM as useDataStreamFormData,bX as useDestinationFormData,x as useGenericForm,dp as useInfiniteScroll,c6 as useInstrumentationRuleFormData,Z as useKeyDown,bG as useOnClickOutside,bC as usePopup,bL as useSessionStorage,cp as useSourceFormData,ct as useSourceSelectionFormData,$ as useTimeAgo}from"./chunks/ui-components-B4OMCuIf.js";import"./icons.js";import"react/jsx-runtime";import"styled-components";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-C-kwkNJP.js";import"react-dom";import"@xyflow/react";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";
1
+ export{aT as useActionFormData,dr as useBodyScroll,bF as useClickNode,ce as useClickNotification,bA as useContainerSize,a7 as useCopy,bP as useDataStreamFormData,b_ as useDestinationFormData,Y as useGenericForm,ds as useInfiniteScroll,c9 as useInstrumentationRuleFormData,a8 as useKeyDown,bK as useOnClickOutside,bG as usePopup,bO as useSessionStorage,cs as useSourceFormData,cw as useSourceSelectionFormData,aa as useTimeAgo}from"./chunks/ui-components-ymRfS19x.js";import"./icons.js";import"react/jsx-runtime";import"styled-components";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-C-kwkNJP.js";import"react-dom";import"@xyflow/react";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";
@@ -6,6 +6,5 @@ export interface ColumnProps {
6
6
  width: CSSProperties['width'];
7
7
  header?: ReactNode;
8
8
  list: ReactNode[];
9
- listGap?: number;
10
9
  }
11
10
  export declare const Column: FC<ColumnProps>;
@@ -0,0 +1,7 @@
1
+ import { type ReactNode, type FC } from 'react';
2
+ export interface ColumnListCollapseProps {
3
+ title: string;
4
+ tooltip?: string;
5
+ list: ReactNode[];
6
+ }
7
+ export declare const ColumnListCollapse: FC<ColumnListCollapseProps>;
@@ -1,5 +1,7 @@
1
1
  import { type ReactNode, type FC } from 'react';
2
+ import type { SVG } from '@/types';
2
3
  export interface ColumnListItemProps {
4
+ icon?: SVG;
3
5
  title: string;
4
6
  description?: string;
5
7
  withCarret?: boolean;
@@ -9,24 +9,24 @@ export interface WideDrawerProps {
9
9
  error?: string;
10
10
  } | undefined>;
11
11
  disableSave?: boolean;
12
- connectionIds: {
12
+ connectionIds?: {
13
13
  value: string[];
14
14
  setValue: Dispatch<SetStateAction<string[]>>;
15
15
  };
16
- search: Pick<SearchProps, 'value' | 'onChange' | 'placeholder' | 'segment' | 'width'>;
16
+ search: Pick<SearchProps, 'value' | 'onChange' | 'placeholder' | 'segment'>;
17
17
  filters?: ReactNode;
18
18
  isFormDirty?: boolean;
19
19
  isFetching?: boolean;
20
20
  progress?: Pick<LoaderProps, 'title' | 'subTitle' | 'percentage'>;
21
- header: Pick<DrawerProps['header'], 'icon' | 'title'>;
21
+ header: Pick<DrawerProps['header'], 'icon' | 'title' | 'subTitle'>;
22
22
  subHeader?: {
23
23
  icon: SVG;
24
24
  title: string;
25
25
  description: string;
26
26
  badge: BadgeProps;
27
27
  };
28
- leftColumn: Pick<ColumnProps, 'width' | 'header' | 'list' | 'listGap'>;
29
- rightColumn: Pick<ColumnProps, 'width' | 'header' | 'list' | 'listGap'>;
28
+ leftColumn: Pick<ColumnProps, 'width' | 'header' | 'list'>;
29
+ rightColumn: Pick<ColumnProps, 'width' | 'header' | 'list'>;
30
30
  }
31
31
  export interface WideDrawerRef {
32
32
  clearErrors: () => void;
package/lib/snippets.js CHANGED
@@ -1 +1 @@
1
- export{bQ as AddButton,cj as CopyText,cf as EditButton,cd as Flow,dt as MapItemNode,du as NoDataNode,bR as NoteBackToSummary,cl as PodContainer,cs as SourceContainer}from"./chunks/ui-components-B4OMCuIf.js";import"./icons.js";import"react/jsx-runtime";import"styled-components";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-C-kwkNJP.js";import"react-dom";import"@xyflow/react";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";
1
+ export{bT as AddButton,cm as CopyText,ci as EditButton,cg as Flow,dw as MapItemNode,dx as NoDataNode,bU as NoteBackToSummary,co as PodContainer,cv as SourceContainer}from"./chunks/ui-components-ymRfS19x.js";import"./icons.js";import"react/jsx-runtime";import"styled-components";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-C-kwkNJP.js";import"react-dom";import"@xyflow/react";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";
package/lib/store.js CHANGED
@@ -1 +1 @@
1
- export{X as ProgressKeys,di as useActiveNodeStore,cy as useDarkMode,K as useDataStreamStore,aL as useDrawerStore,a2 as useEntityStore,b7 as useFilterStore,aW as useModalStore,c5 as useNotificationStore,M as useProgressStore,bm as useSelectedStore,bN as useSetupStore}from"./chunks/ui-components-B4OMCuIf.js";import"./icons.js";import"react/jsx-runtime";import"styled-components";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-C-kwkNJP.js";import"react-dom";import"@xyflow/react";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";
1
+ export{a6 as ProgressKeys,dl as useActiveNodeStore,cB as useDarkMode,a2 as useDataStreamStore,aP as useDrawerStore,ad as useEntityStore,bb as useFilterStore,a_ as useModalStore,c8 as useNotificationStore,a3 as useProgressStore,bq as useSelectedStore,bQ as useSetupStore}from"./chunks/ui-components-ymRfS19x.js";import"./icons.js";import"react/jsx-runtime";import"styled-components";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-C-kwkNJP.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{dj as Provider,dk as animations,dl as opacity,dm as palettes}from"./chunks/ui-components-B4OMCuIf.js";import"./icons.js";import"react/jsx-runtime";import"styled-components";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-C-kwkNJP.js";import"react-dom";import"@xyflow/react";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";
1
+ export{dm as Provider,dn as animations,dp as opacity,dq as palettes}from"./chunks/ui-components-ymRfS19x.js";import"./icons.js";import"react/jsx-runtime";import"styled-components";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-C-kwkNJP.js";import"react-dom";import"@xyflow/react";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";