@odigos/ui-kit 0.0.226 → 0.0.227

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 (36) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/lib/chunks/index-B0b5lJH3.js +3 -0
  3. package/lib/chunks/{index-BWi3du_1.js → index-C-Z4QHpA.js} +9 -9
  4. package/lib/chunks/{ui-components-B4LvruCJ.js → ui-components-C7i9zbc-.js} +415 -383
  5. package/lib/components/_v2/charts/gauge-chart/index.d.ts +18 -0
  6. package/lib/components/_v2/charts/index.d.ts +1 -0
  7. package/lib/components/_v2/index.d.ts +1 -0
  8. package/lib/components/v2.js +1 -1
  9. package/lib/components.js +1 -1
  10. package/lib/constants.js +1 -1
  11. package/lib/containers/_v2/pipeline-collectors/enum.d.ts +4 -0
  12. package/lib/containers/_v2/pipeline-collectors/{helpers → general-info/helpers}/get-general-badge.d.ts +1 -1
  13. package/lib/containers/_v2/pipeline-collectors/general-info/helpers/get-general-gauge-cards.d.ts +4 -0
  14. package/lib/containers/_v2/pipeline-collectors/{helpers → general-info/helpers}/get-general-status-card.d.ts +1 -1
  15. package/lib/containers/_v2/pipeline-collectors/{helpers → general-info/helpers}/get-general-text-cards.d.ts +1 -1
  16. package/lib/containers/_v2/pipeline-collectors/{helpers → general-info/helpers}/get-general-title.d.ts +1 -1
  17. package/lib/containers/_v2/pipeline-collectors/{helpers → general-info/helpers}/index.d.ts +2 -1
  18. package/lib/containers/_v2/pipeline-collectors/general-info/index.d.ts +7 -6
  19. package/lib/containers/_v2/pipeline-collectors/index.d.ts +5 -0
  20. package/lib/containers/_v2/pipeline-collectors/toolbar/index.d.ts +1 -11
  21. package/lib/containers/source-drawer/profiling/flamebearer.d.ts +5 -0
  22. package/lib/containers/v2.js +32 -45
  23. package/lib/containers.js +4 -4
  24. package/lib/contexts.js +1 -1
  25. package/lib/functions.js +1 -1
  26. package/lib/hooks.js +1 -1
  27. package/lib/snippets/_v2/yaml-section-card/index.d.ts +2 -0
  28. package/lib/snippets/v2.js +1 -1
  29. package/lib/snippets.js +1 -1
  30. package/lib/store.js +1 -1
  31. package/lib/theme.js +1 -1
  32. package/lib/types/common/index.d.ts +36 -0
  33. package/lib/types.js +1 -1
  34. package/lib/visuals.js +1 -1
  35. package/package.json +1 -1
  36. package/lib/chunks/index-BYYemmZD.js +0 -3
package/lib/containers.js CHANGED
@@ -1,4 +1,4 @@
1
- import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import{useState as i,useEffect as o,Fragment as a,forwardRef as r,useRef as l,useImperativeHandle as s,useMemo as c,useCallback as d,useLayoutEffect as u,Children as p}from"react";import h,{css as m,useTheme as g}from"styled-components";import{ae as f,cc as v,p as y,K as b,c as S,cd as x,ce as C,cf as w,cg as k,h as T,i as E,ch as $,ci as N,cj as D,ck as I,D as A,F as R,m as O,cl as M,cm as F,o as L,cn as P,ab as _,co as z,cp as K,cq as j,cr as V,cs as B,ct as W,bg as U,aI as H,cu as q,cv as G,cw as Y,aC as J,ap as X,cx as Q,aG as Z,cy as ee,cz as te,cA as ne,aM as ie,cB as oe,ar as ae,cC as re,cD as le,cE as se,cF as ce,cG as de,E as ue,aU as pe,cH as he,cI as me,cJ as ge,cK as fe,cL as ve,cM as ye,O as be,cN as Se,cO as xe,cP as Ce,cQ as we,cR as ke,cS as Te,cT as Ee,cU as $e,cV as Ne,cW as De,cX as Ie,cY as Ae,b as Re,cZ as Oe,c_ as Me,c$ as Fe,d0 as Le,bx as Pe,d1 as _e,d2 as ze,d3 as Ke,d4 as je,d5 as Ve,d6 as Be,d7 as We,H as Ue,d8 as He,aW as qe,ak as Ge,d9 as Ye,aA as Je,aD as Xe,da as Qe,aP as Ze,db as et,dc as tt,aQ as nt,dd as it,de as ot,df as at,dg as rt,dh as lt,di as st,dj as ct,dk as dt,aS as ut,dl as pt,Z as ht,dm as mt,dn as gt,dp as ft,dq as vt,dr as yt,ds as bt,dt as St,du as xt,dv as Ct,aO as wt,x as kt,ao as Tt,G as Et,dw as $t,aR as Nt,dx as Dt,J as It,ah as At,an as Rt,aj as Ot,dy as Mt,dz as Ft,dA as Lt,dB as Pt,P as _t,U as zt,V as Kt,R as jt,M as Vt,Q as Bt,W as Wt,dC as Ut,_ as Ht,aT as qt,dD as Gt,aq as Yt,av as Jt,dE as Xt,dF as Qt,dG as Zt,bh as en,dH as tn,dI as nn,dJ as on,aH as an,dK as rn,dL as ln,at as sn,dM as cn,dN as dn,dO as un,bo as pn,bp as hn,r as mn,s as gn,n as fn,B as vn,a as yn,v as bn,c3 as Sn,am as xn,ai as Cn,dP as wn,N as kn,Y as Tn,T as En,aw as $n,k as Nn,dQ as Dn,dR as In,dS as An,dT as Rn,dU as On,dV as Mn,g as Fn,dW as Ln,dX as Pn,dY as _n,dZ as zn,d_ as Kn,d$ as jn,e0 as Vn,e1 as Bn,e2 as Wn,bi as Un,u as Hn,aN as qn,ag as Gn,e3 as Yn,e4 as Jn,e5 as Xn,e6 as Qn,e7 as Zn,e8 as ei}from"./chunks/ui-components-B4LvruCJ.js";import{TrashIcon as ti,VSquareIcon as ni,XSquareIcon as ii,EditIcon as oi,OdigosLogoText as ai,PlusIcon as ri,RefreshIcon as li,SearchIcon as si,FilterIcon as ci,DataStreamIcon as di,VIcon as ui,OdigosLogo as pi,ArrowIcon as hi,RefreshLeftArrowIcon as mi,NotificationIcon as gi,UserIcon as fi,ImageErrorIcon as vi,ChevronDownIcon as yi,ChevronRightIcon as bi,OverviewIcon as Si,SourceIcon as xi,DestinationIcon as Ci,InstrumentationRuleIcon as wi,ActionIcon as ki,SlackLogo as Ti,CopyIcon as Ei,MinusIcon as $i,XIcon as Ni,ExpandIcon as Di,DotIcon as Ii,DownloadIcon as Ai,KeyIcon as Ri,TerminalIcon as Oi,ExclamationTriangleIcon as Mi,TraceViewIcon as Fi}from"./icons.js";import{MarkerType as Li,useNodesState as Pi,useEdgesState as _i}from"@xyflow/react";import{E as zi}from"./chunks/vendor-C150cdxb.js";import{Y as Ki}from"./chunks/index-BYYemmZD.js";import"zustand";import"javascript-time-ago";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";const ji=e=>{const{type:t,name:n,notes:i,signals:o,disabled:a,fields:{collectContainerAttributes:r,collectReplicaSetAttributes:l,collectWorkloadId:s,collectClusterId:c,labelsAttributes:d,annotationsAttributes:u,clusterAttributes:p,overwriteExistingValues:h,attributeNamesToDelete:m,renames:g,piiCategories:S,fallbackSamplingRatio:x,samplingPercentage:C,endpointsFilters:w,servicesNameFilters:k,attributeFilters:T,urlTemplatizationRulesGroups:E}}=e,$=[{title:f.TYPE,value:t},{type:v.ActiveStatus,title:f.STATUS,value:String(!a)},{type:v.Monitors,title:f.SIGNALS_FOR_PROCESSING,value:o?.join(", ")||""},{title:f.NAME,value:n||""},{title:f.NOTES,value:i||""},{type:v.Divider}];if(t===y.K8sAttributes&&($.push({title:"Collect Container Attributes",value:String(r)}),$.push({title:"Collect ReplicaSet Attributes",value:String(l)}),$.push({title:"Collect Workload ID",value:String(s)}),$.push({title:"Collect Cluster ID",value:String(c)}),d?.length&&$.push({type:v.Divider}),d?.forEach(({labelKey:e,attributeKey:t,from:n,fromSources:i},o)=>{let a="";a+=`Label Key: ${e}\n`,a+=`Attribute Key: ${t}\n`;a+=`From: ${i?.length?i.join(", "):n||b.Pod}\n`,$.push({title:"Label"+(d.length>1?` #${o+1}`:""),value:a})}),u?.length&&$.push({type:v.Divider}),u?.forEach(({annotationKey:e,attributeKey:t,from:n,fromSources:i},o)=>{let a="";a+=`Annotation Key: ${e}\n`,a+=`Attribute Key: ${t}\n`;a+=`From: ${i?.length?i.join(", "):n||b.Pod}\n`,$.push({title:"Annotation"+(u.length>1?` #${o+1}`:""),value:a})})),t===y.AddClusterInfo){$.push({title:"Overwrite Existing Values",value:String(h||!1)});let e="";p?.forEach(({attributeName:t,attributeStringValue:n},i)=>{e+=`${t}: ${n}`,i<p.length-1&&(e+=", ")}),$.push({title:"Attributes",value:e})}if(t===y.DeleteAttributes){let e="";m?.forEach((t,n)=>{e+=t,n<m.length-1&&(e+=", ")}),$.push({title:"Attributes",value:e})}if(t===y.RenameAttributes){let e="";const t=Object.entries(g||{});t.forEach(([n,i],o)=>{e+=`${n}: ${i}`,o<t.length-1&&(e+=", ")}),$.push({title:"Attributes",value:e})}if(t===y.PiiMasking){let e="";S?.forEach((t,n)=>{e+=t,n<S.length-1&&(e+=", ")}),$.push({title:"Categories",value:e})}return t===y.ErrorSampler&&$.push({title:"Sampling Ratio",value:String(x)}),t===y.ProbabilisticSampler&&$.push({title:"Sampling Percentage",value:String(C)}),t===y.LatencySampler&&w?.forEach(({serviceName:e,httpRoute:t,minimumLatencyThreshold:n,fallbackSamplingRatio:i},o)=>{let a="";a+=`Service Name: ${e}\n`,a+=`HTTP Route: ${t}\n`,a+=`Min. Latency: ${n}\n`,a+=`Fallback Sampling Ratio: ${i}`,$.push({title:"Endpoint"+(w.length>1?` #${o+1}`:""),value:a})}),t===y.ServiceNameSampler&&k?.forEach(({serviceName:e,samplingRatio:t,fallbackSamplingRatio:n},i)=>{let o="";o+=`Service Name: ${e}\n`,o+=`Sampling Ratio: ${t}\n`,o+=`Fallback Sampling Ratio: ${n}`,$.push({title:"Filter"+(k.length>1?` #${i+1}`:""),value:o})}),t===y.SpanAttributeSampler&&T?.forEach(({serviceName:e,attributeKey:t,fallbackSamplingRatio:n,condition:i},o)=>{let a="";a+=`Service Name: ${e}\n`,a+=`Attribute Key: ${t}\n`,a+=`Fallback Sampling Ratio: ${n}\n`;const r=Object.keys(i)[0];a+=`Condition: ${r}\n`,a+=`Operation: ${i[r]?.operation}\n`,a+=`Expected Value: ${i[r]?.expectedValue}`,"jsonCondition"===r&&(a+=`\nJSON Path: ${i[r].jsonPath}`),$.push({title:"Filter"+(T.length>1?` #${o+1}`:""),value:a})}),t===y.URLTemplatization&&E?.forEach((e,t)=>{let n="";e.filterK8sNamespace&&(n+=`Namespace: ${e.filterK8sNamespace}\n`),e.workloadFilters?.length&&e.workloadFilters.forEach(e=>{const t=[e.kind,e.name].filter(Boolean).join("/");t&&(n+=`Workload: ${t}\n`)});const i=e.templatizationRules?.map(e=>e.template).filter(Boolean).join(", ");n+=`Templates: ${i}`,e.notes&&(n+=`\nNotes: ${e.notes}`),$.push({title:"Group"+(E.length>1?` #${t+1}`:""),value:n})}),$},Vi=S.PiiCategories,Bi=h.div`
1
+ import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import{useState as i,useEffect as o,Fragment as a,forwardRef as r,useRef as l,useImperativeHandle as s,useMemo as c,useCallback as d,useLayoutEffect as u,Children as p}from"react";import h,{css as m,useTheme as g}from"styled-components";import{af as f,cb as v,q as y,K as b,c as S,cc as x,cd as C,ce as w,cf as k,h as T,i as E,cg as $,ch as N,ci as D,cj as I,m as A,F as R,n as O,ck as M,cl as F,p as L,cm as P,ac as _,cn as z,co as K,cp as j,cq as V,cr as B,cs as W,bg as U,aJ as H,ct as q,cu as G,cv as Y,aD as J,aq as X,cw as Q,aH as Z,cx as ee,cy as te,cz as ne,aM as ie,cA as oe,as as ae,cB as re,cC as le,cD as se,cE as ce,cF as de,E as ue,aU as pe,cG as he,cH as me,cI as ge,cJ as fe,cK as ve,cL as ye,O as be,cM as Se,cN as xe,cO as Ce,cP as we,cQ as ke,cR as Te,cS as Ee,cT as $e,cU as Ne,cV as De,cW as Ie,cX as Ae,b as Re,cY as Oe,cZ as Me,c_ as Fe,c$ as Le,d0 as Pe,d1 as _e,d2 as ze,d3 as Ke,d4 as je,d5 as Ve,d6 as Be,d7 as We,H as Ue,d8 as He,aW as qe,al as Ge,d9 as Ye,aB as Je,aE as Xe,da as Qe,aP as Ze,db as et,dc as tt,aQ as nt,dd as it,de as ot,df as at,dg as rt,dh as lt,di as st,dj as ct,dk as dt,aS as ut,dl as pt,Z as ht,dm as mt,dn as gt,dp as ft,dq as vt,dr as yt,ds as bt,dt as St,du as xt,dv as Ct,aO as wt,x as kt,ap as Tt,G as Et,dw as $t,aR as Nt,dx as Dt,J as It,ai as At,ao as Rt,ak as Ot,dy as Mt,dz as Ft,dA as Lt,dB as Pt,P as _t,U as zt,V as Kt,R as jt,M as Vt,Q as Bt,W as Wt,dC as Ut,_ as Ht,aT as qt,dD as Gt,ar as Yt,aw as Jt,dE as Xt,dF as Qt,dG as Zt,bh as en,dH as tn,dI as nn,dJ as on,aI as an,dK as rn,dL as ln,au as sn,dM as cn,dN as dn,dO as un,bo as pn,bp as hn,s as mn,t as gn,o as fn,B as vn,a as yn,S as bn,bF as Sn,an as xn,aj as Cn,dP as wn,N as kn,Y as Tn,T as En,ax as $n,k as Nn,dQ as Dn,dR as In,dS as An,dT as Rn,dU as On,dV as Mn,g as Fn,dW as Ln,dX as Pn,dY as _n,dZ as zn,d_ as Kn,d$ as jn,e0 as Vn,e1 as Bn,e2 as Wn,bi as Un,u as Hn,aN as qn,ah as Gn,e3 as Yn,e4 as Jn,e5 as Xn,e6 as Qn,e7 as Zn,e8 as ei}from"./chunks/ui-components-C7i9zbc-.js";import{TrashIcon as ti,VSquareIcon as ni,XSquareIcon as ii,EditIcon as oi,OdigosLogoText as ai,PlusIcon as ri,RefreshIcon as li,SearchIcon as si,FilterIcon as ci,DataStreamIcon as di,VIcon as ui,OdigosLogo as pi,ArrowIcon as hi,RefreshLeftArrowIcon as mi,NotificationIcon as gi,UserIcon as fi,ImageErrorIcon as vi,ChevronDownIcon as yi,ChevronRightIcon as bi,OverviewIcon as Si,SourceIcon as xi,DestinationIcon as Ci,InstrumentationRuleIcon as wi,ActionIcon as ki,SlackLogo as Ti,CopyIcon as Ei,MinusIcon as $i,XIcon as Ni,ExpandIcon as Di,DotIcon as Ii,DownloadIcon as Ai,KeyIcon as Ri,TerminalIcon as Oi,ExclamationTriangleIcon as Mi,TraceViewIcon as Fi}from"./icons.js";import{MarkerType as Li,useNodesState as Pi,useEdgesState as _i}from"@xyflow/react";import{E as zi}from"./chunks/vendor-C150cdxb.js";import{Y as Ki}from"./chunks/index-B0b5lJH3.js";import"zustand";import"javascript-time-ago";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";const ji=e=>{const{type:t,name:n,notes:i,signals:o,disabled:a,fields:{collectContainerAttributes:r,collectReplicaSetAttributes:l,collectWorkloadId:s,collectClusterId:c,labelsAttributes:d,annotationsAttributes:u,clusterAttributes:p,overwriteExistingValues:h,attributeNamesToDelete:m,renames:g,piiCategories:S,fallbackSamplingRatio:x,samplingPercentage:C,endpointsFilters:w,servicesNameFilters:k,attributeFilters:T,urlTemplatizationRulesGroups:E}}=e,$=[{title:f.TYPE,value:t},{type:v.ActiveStatus,title:f.STATUS,value:String(!a)},{type:v.Monitors,title:f.SIGNALS_FOR_PROCESSING,value:o?.join(", ")||""},{title:f.NAME,value:n||""},{title:f.NOTES,value:i||""},{type:v.Divider}];if(t===y.K8sAttributes&&($.push({title:"Collect Container Attributes",value:String(r)}),$.push({title:"Collect ReplicaSet Attributes",value:String(l)}),$.push({title:"Collect Workload ID",value:String(s)}),$.push({title:"Collect Cluster ID",value:String(c)}),d?.length&&$.push({type:v.Divider}),d?.forEach(({labelKey:e,attributeKey:t,from:n,fromSources:i},o)=>{let a="";a+=`Label Key: ${e}\n`,a+=`Attribute Key: ${t}\n`;a+=`From: ${i?.length?i.join(", "):n||b.Pod}\n`,$.push({title:"Label"+(d.length>1?` #${o+1}`:""),value:a})}),u?.length&&$.push({type:v.Divider}),u?.forEach(({annotationKey:e,attributeKey:t,from:n,fromSources:i},o)=>{let a="";a+=`Annotation Key: ${e}\n`,a+=`Attribute Key: ${t}\n`;a+=`From: ${i?.length?i.join(", "):n||b.Pod}\n`,$.push({title:"Annotation"+(u.length>1?` #${o+1}`:""),value:a})})),t===y.AddClusterInfo){$.push({title:"Overwrite Existing Values",value:String(h||!1)});let e="";p?.forEach(({attributeName:t,attributeStringValue:n},i)=>{e+=`${t}: ${n}`,i<p.length-1&&(e+=", ")}),$.push({title:"Attributes",value:e})}if(t===y.DeleteAttributes){let e="";m?.forEach((t,n)=>{e+=t,n<m.length-1&&(e+=", ")}),$.push({title:"Attributes",value:e})}if(t===y.RenameAttributes){let e="";const t=Object.entries(g||{});t.forEach(([n,i],o)=>{e+=`${n}: ${i}`,o<t.length-1&&(e+=", ")}),$.push({title:"Attributes",value:e})}if(t===y.PiiMasking){let e="";S?.forEach((t,n)=>{e+=t,n<S.length-1&&(e+=", ")}),$.push({title:"Categories",value:e})}return t===y.ErrorSampler&&$.push({title:"Sampling Ratio",value:String(x)}),t===y.ProbabilisticSampler&&$.push({title:"Sampling Percentage",value:String(C)}),t===y.LatencySampler&&w?.forEach(({serviceName:e,httpRoute:t,minimumLatencyThreshold:n,fallbackSamplingRatio:i},o)=>{let a="";a+=`Service Name: ${e}\n`,a+=`HTTP Route: ${t}\n`,a+=`Min. Latency: ${n}\n`,a+=`Fallback Sampling Ratio: ${i}`,$.push({title:"Endpoint"+(w.length>1?` #${o+1}`:""),value:a})}),t===y.ServiceNameSampler&&k?.forEach(({serviceName:e,samplingRatio:t,fallbackSamplingRatio:n},i)=>{let o="";o+=`Service Name: ${e}\n`,o+=`Sampling Ratio: ${t}\n`,o+=`Fallback Sampling Ratio: ${n}`,$.push({title:"Filter"+(k.length>1?` #${i+1}`:""),value:o})}),t===y.SpanAttributeSampler&&T?.forEach(({serviceName:e,attributeKey:t,fallbackSamplingRatio:n,condition:i},o)=>{let a="";a+=`Service Name: ${e}\n`,a+=`Attribute Key: ${t}\n`,a+=`Fallback Sampling Ratio: ${n}\n`;const r=Object.keys(i)[0];a+=`Condition: ${r}\n`,a+=`Operation: ${i[r]?.operation}\n`,a+=`Expected Value: ${i[r]?.expectedValue}`,"jsonCondition"===r&&(a+=`\nJSON Path: ${i[r].jsonPath}`),$.push({title:"Filter"+(T.length>1?` #${o+1}`:""),value:a})}),t===y.URLTemplatization&&E?.forEach((e,t)=>{let n="";e.filterK8sNamespace&&(n+=`Namespace: ${e.filterK8sNamespace}\n`),e.workloadFilters?.length&&e.workloadFilters.forEach(e=>{const t=[e.kind,e.name].filter(Boolean).join("/");t&&(n+=`Workload: ${t}\n`)});const i=e.templatizationRules?.map(e=>e.template).filter(Boolean).join(", ");n+=`Templates: ${i}`,e.notes&&(n+=`\nNotes: ${e.notes}`),$.push({title:"Group"+(E.length>1?` #${t+1}`:""),value:n})}),$},Vi=S.PiiCategories,Bi=h.div`
2
2
  display: flex;
3
3
  flex-direction: row;
4
4
  gap: 32px;
@@ -381,7 +381,7 @@ import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import{useState
381
381
  border: 1px solid ${({theme:e})=>e.colors.border};
382
382
  background-color: ${({theme:e})=>e.colors.dropdown_bg};
383
383
  animation-name: ${Qt.in.center};
384
- `,zr=({totalSourceCount:n,uninstrumentSources:o,restartWorkloads:r})=>{const l=g(),{selectedSources:s,setSelectedSources:d}=ze(),[u,p]=i(!1),[h,m]=i(!1),f=c(()=>{let e=0;return Object.values(s).forEach(t=>{e+=t.length}),e},[s]),v=()=>{d({})};return f?e(a,{children:[e(_r,{"data-id":"multi-source-control",children:[t(B,{children:"Selected sources"}),t(Fe,{label:f,filled:!0}),t(A,{orientation:"vertical",length:"16px"}),t(_e,{variant:"tertiary",onClick:v,children:t(B,{family:"secondary",decoration:"underline",children:"Deselect"})}),e(_e,{variant:"tertiary",onClick:()=>m(!0),children:[t(mi,{}),t(B,{family:"secondary",decoration:"underline",children:"Restart"})]}),e(_e,{variant:"tertiary",onClick:()=>p(!0),children:[t(ti,{}),t(B,{family:"secondary",decoration:"underline",color:l.text.error,children:"Uninstrument"})]})]}),t(G,{isOpen:u,name:`${f} sources`,type:J.Source,isLastItem:f===n,onApprove:()=>{const e={};Object.entries(s).forEach(([t,n])=>{e[t]=n.map(e=>({...e,selected:!1}))}),o(e),p(!1),v()},onDeny:()=>p(!1)}),t(Xt,{isOpen:h,title:"Rollout Restart Workloads",description:"Are you sure you want to rollout restart these workloads?",approveButton:{text:"Confirm",variant:ue.Warning,onClick:()=>{const e=[];Object.values(s).forEach(t=>{e.push(...t.map(e=>Zt(e)))}),r(e),v()}},denyButton:{text:"Go Back",onClick:()=>m(!1)}})]}):null},Kr=h.div`
384
+ `,zr=({totalSourceCount:n,uninstrumentSources:o,restartWorkloads:r})=>{const l=g(),{selectedSources:s,setSelectedSources:d}=ze(),[u,p]=i(!1),[h,m]=i(!1),f=c(()=>{let e=0;return Object.values(s).forEach(t=>{e+=t.length}),e},[s]),v=()=>{d({})};return f?e(a,{children:[e(_r,{"data-id":"multi-source-control",children:[t(B,{children:"Selected sources"}),t(Fe,{label:f,filled:!0}),t(A,{orientation:"vertical",length:"16px"}),t(_e,{variant:"tertiary",onClick:v,children:t(B,{family:"secondary",decoration:"underline",children:"Deselect"})}),e(_e,{variant:"tertiary",onClick:()=>m(!0),children:[t(mi,{}),t(B,{family:"secondary",decoration:"underline",children:"Restart"})]}),e(_e,{variant:"tertiary",onClick:()=>p(!0),children:[t(ti,{}),t(B,{family:"secondary",decoration:"underline",color:l.text.error,children:"Uninstrument"})]})]}),t(G,{isOpen:u,name:`${f} sources`,type:J.Source,isLastItem:f===n,onApprove:()=>{const e={};Object.entries(s).forEach(([t,n])=>{e[t]=n.map(e=>({...e,selected:!1}))}),o(e),p(!1),v()},onDeny:()=>p(!1)}),t(Xt,{isOpen:h,title:"Rollout Restart Workloads",description:"Are you sure you want to rollout restart these workloads?",approveButton:{text:"Confirm",variant:ue.Warning,onClick:()=>{const e=[];Object.values(s).forEach(t=>{e.push(...t.map(e=>Zt(e)))}),r(e),m(!1),v()}},denyButton:{text:"Go Back",onClick:()=>m(!1)}})]}):null},Kr=h.div`
385
385
  position: relative;
386
386
  width: fit-content;
387
387
  `,jr=h(O)`
@@ -508,7 +508,7 @@ import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import{useState
508
508
  max-height: calc(100vh - 200px);
509
509
  height: fit-content;
510
510
  overflow-y: scroll;
511
- `,Rl=({onEditStream:n,onEditSources:i,onEditDestinations:o,categories:a})=>{const{selectedStreamName:r}=Ze(),{configuredSources:l,configuredDestinations:s,configuredDestinationsUpdateOnly:d}=yt(),u=c(()=>Object.values(l).reduce((e,t)=>e+t.filter(e=>e.selected).length,0),[l]);return t(ce,{$isNotModal:!0,children:e(R,{$gap:12,children:[t(z,{title:f.SUMMARY,description:f.STREAM_CONFIRM}),e(Al,{children:[t(ne,{title:f.STREAM_NAME,action:()=>t(cn,{onClick:n}),data:[{title:"",value:r}]}),t(ne,{title:f.SELECTED_SOURCES,titleBadge:u,action:()=>t(cn,{onClick:i}),children:t(Dl,{filteredNamespacesAndSources:l,withInstances:!1})}),t(ne,{title:f.SELECTED_DESTINATIONS,titleBadge:s.length+d.length,action:()=>t(cn,{onClick:o}),children:t(dr,{categories:a})})]})]})})};var Ol;!function(e){e.Overview="overview",e.InstrumentationRules="InstrumentationRule",e.Sources="Source",e.Actions="Action",e.Destinations="Destination"}(Ol||(Ol={}));const Ml=({onClickId:e,defaultSelectedId:n,extendedNavIcons:o})=>{const{isVm:a}=ae(),[r,l]=i(n||""),s=c(()=>[{id:Ol.Overview,icon:Si,selected:r===Ol.Overview,onClick:()=>{l(Ol.Overview),e(Ol.Overview)},tooltip:"Overview"},...(o||[]).map(e=>({...e,selected:r===e.id,onClick:()=>{l(e.id),e.onClick()}}))],[r]),d=c(()=>{const t=[{id:Ol.Sources,icon:xi,selected:r===Ol.Sources,onClick:()=>{l(Ol.Sources),e(Ol.Sources)},tooltip:"Sources"},{id:Ol.Destinations,icon:Ci,selected:r===Ol.Destinations,onClick:()=>{l(Ol.Destinations),e(Ol.Destinations)},tooltip:"Destinations"}];return a||(t.push({id:Ol.InstrumentationRules,icon:wi,selected:r===Ol.InstrumentationRules,onClick:()=>{l(Ol.InstrumentationRules),e(Ol.InstrumentationRules)},tooltip:"Instrumentation Rules"}),t.push({id:Ol.Actions,icon:ki,selected:r===Ol.Actions,onClick:()=>{l(Ol.Actions),e(Ol.Actions)},tooltip:"Actions"})),t},[a,r]);return t(dn,{orientation:"vertical",mainIcons:s,subIcons:d})},Fl=({})=>t(M,{onClick:()=>window.open("https://join.slack.com/t/odigos/shared_invite/zt-2wc6gm4j9-EhcVFYrLwHqvcIErO9sVzw","_blank","noopener noreferrer"),tooltip:"Join our Slack community",children:t(Ti,{})});function Ll(e,t){const n=e.names[t];if(null==n)return"";if("string"==typeof n)return n;if("object"==typeof n&&"name"in n){const e=n.name;if("string"==typeof e)return e}return"number"==typeof n||"boolean"==typeof n?String(n):""}function Pl(e){const t=Math.abs(e);return t>=1e9?`${_l(e/1e9)} Bil`:t>=1e6?`${_l(e/1e6)} Mil`:t>=1e3?`${_l(e/1e3)}K`:String(Math.round(e))}function _l(e){return e.toFixed(2).replace(/\.?0+$/,"")}function zl(e){const t=[];for(let n=0;n<e.levels.length;n++){const i=e.levels[n];for(let e=0;e+3<i.length;e+=4)t.push({level:n,offset:i[e],size:i[e+1],self:i[e+2],nameIndex:i[e+3]})}return t}function Kl(e){return`${e.level}:${e.offset}:${e.size}:${e.nameIndex}`}function jl(e,t){const n=t.trim().toLowerCase();return!n||e.toLowerCase().includes(n)}function Vl(e,t,n,i,o,a=null){if(0===e.levels.length||t<2||n<2)return null;const r=zl(e),l=a?function(e,t){const n=e.reduce((e,t)=>Math.max(e,t.level),t.level),i=new Map;for(const t of e){const e=i.get(t.level);e?e.push(t):i.set(t.level,[t])}const o=[t];for(let e=t.level+1;e<=n;e++){const t=o.filter(t=>t.level===e-1);if(0===t.length)break;const n=i.get(e);if(n?.length)for(const e of n)for(const n of t)if(e.offset>=n.offset&&e.offset+e.size<=n.offset+n.size){o.push(e);break}}return o}(r,a):r;if(0===l.length)return null;const s=a?.level??0,c=a?.offset??0,d=a?.size??e.numTicks;if(d<=0)return null;const u=a?Math.max(...l.map(e=>e.level-s))+1:e.levels.length,p=i??Number.POSITIVE_INFINITY,h=Math.max(1,Math.min(n/u,p)),m=o.trim(),g=h>8?1:0;return l.map(n=>{const i=n.level-s,o=(n.offset-c)/d*t,r=Math.max(n.size/d*t,1),l=(a?i:n.level)*h,u=Math.max(h-g,1),p=Ll(e,n.nameIndex);return{...n,x:o,y:l,w:r,h:u,name:p,matchesSearch:jl(p,m)}})}function Bl(e,t){let n=0;for(let t=0;t<e.length;t++)n=31*n+e.charCodeAt(t)>>>0;const i=t.v2.colors.black[500],o=[{fill:t.v2.colors.purple[300],text:i},{fill:t.v2.colors.green[300],text:i},{fill:t.v2.colors.red[300],text:i},{fill:t.v2.colors.blue[300],text:i},{fill:t.v2.colors.yellow[300],text:i}];return o[n%o.length]}var Wl,Ul;!function(e){e.Symbol="symbol",e.Self="self",e.Total="total"}(Wl||(Wl={})),function(e){e.FilterOutVoid="filter-out-void",e.OnlyWithReturnValues="only-with-return-values"}(Ul||(Ul={}));const Hl=/^[A-Za-z_$][A-Za-z0-9_$]*(\[\])*$/;const ql={options:[{id:Ul.FilterOutVoid,label:"Filter out void symbols"},{id:Ul.OnlyWithReturnValues,label:"Only show functions with return values"}],filterRow:(e,t)=>{const n=e.cells.find(e=>e.key===Wl.Symbol)?.rawValue?.toString()??"",i=function(e){return e.split(" ")[0]??""}(n);if(t.includes(Ul.FilterOutVoid)&&"void"===i)return!1;if(t.includes(Ul.OnlyWithReturnValues)){if(!(n.includes(" ")&&"void"!==i&&Hl.test(i)))return!1}return!0}},Gl=({rows:e,languages:n})=>{const i=c(()=>[{key:Wl.Symbol,label:"Symbol",flex:"0 0 160px",filterOverride:n?.includes(un.Java)?ql:void 0,noFilter:!n?.includes(un.Java)},{key:Wl.Self,label:"Self",tooltip:"Samples where this function was running directly, excluding any functions it called.",textAlign:"right",noFilter:!0},{key:Wl.Total,label:"Total",tooltip:"Samples where this function appeared anywhere on the stack, including functions it called.",textAlign:"right",noFilter:!0}],[n]),o=c(()=>e.map(e=>({cells:[{key:Wl.Symbol,rawValue:e.name},{key:Wl.Self,rawValue:Pl(e.self)},{key:Wl.Total,rawValue:Pl(e.total)}]})),[e]);return t(pn,{variant:hn.Data,maxHeight:"calc(100vh - 340px)",columns:i,rows:o,rowActionsPushLeftPosition:"12px",getRowActions:e=>[{id:`copy-${e.cells[0].rawValue}`,label:"",rightIcon:Ei,onClick:()=>{navigator.clipboard.writeText(e.cells[0].rawValue)}}]})};var Yl;function Jl(e,t){return t<=0?"0":(100*e/t).toFixed(e/t<.001?2:1)}function Xl(e,t,n){for(const i of n)if(e>=i.x&&e<i.x+i.w&&t>=i.y&&t<i.y+i.h)return i;return null}!function(e){e[e.Fit=1]="Fit",e[e.X2=2]="X2",e[e.X3=3]="X3",e[e.X5=5]="X5"}(Yl||(Yl={}));const Ql=({flamebearer:n,maxRowPx:a,searchQuery:r="",minHostHeight:s=200,onFullscreenChange:p})=>{const h=g(),m=l(null),f=l(null),v=l({x:0,y:0}),y=l(n.numTicks),[b,S]=i({w:0,h:0}),[x,C]=i(""),[w,k]=i(null),[T,E]=i([]),[$,N]=i(!1),[D,I]=i(Yl.Fit),A=Math.max(1,Math.floor(b.w*D)),R=T.length>0?T[T.length-1]:null,O=R?.size??n.numTicks;o(()=>{y.current!==n.numTicks&&(y.current=n.numTicks,E([]))},[n.numTicks]),u(()=>{const e=m.current;if(!e)return;const t=new ResizeObserver(()=>{const t=e.getBoundingClientRect();S({w:Math.floor(t.width),h:Math.floor(t.height)})});return t.observe(e),()=>t.disconnect()},[]),o(()=>{if(!$)return;const e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}},[$]),o(()=>(p?.($),()=>{$&&p?.(!1)}),[$,p]);const M=c(()=>Vl(n,A,b.h,a,r,R),[n,a,r,b.h,A,R]),F=c(()=>function(e){return[...e].sort((e,t)=>t.level-e.level)}(M?.length?r.trim()?M.filter(e=>e.matchesSearch):M:[]),[M,r]),L=d(e=>{if(A<2||b.h<2)return;const t=e.currentTarget.getBoundingClientRect();if(t.width<1||t.height<1)return;const i=Xl((e.clientX-t.left)/t.width*A,(e.clientY-t.top)/t.height*b.h,F);if(i){const e=Kl(i);k(e);const t=O>0?(100*i.size/O).toFixed(1):"0",o=n.numTicks>0?(100*i.size/n.numTicks).toFixed(1):"0";C(`${i.name}\ntotal ${Pl(i.size)} (${t}% of view, ${o}% of profile) · self ${Pl(i.self)}`)}else k(null),C("")},[F,n.numTicks,b.h,A,O]),P=d(e=>{L(e)},[L]),_=d(()=>{k(null),C("")},[]),z=d(e=>{v.current={x:e.clientX,y:e.clientY}},[]),K=d(e=>{const{x:t,y:n}=v.current;if(Math.abs(e.clientX-t)>3||Math.abs(e.clientY-n)>3)return;if(A<2||b.h<2)return;const i=e.currentTarget.getBoundingClientRect();if(i.width<1||i.height<1)return;const o=Xl((e.clientX-i.left)/i.width*A,(e.clientY-i.top)/i.height*b.h,F);if(!o)return;const a=function(e){return{level:e.level,offset:e.offset,size:e.size,self:e.self,nameIndex:e.nameIndex}}(o);E(e=>{const t=e.length>0?e[e.length-1]:null;return t&&function(e,t){return e.level===t.level&&e.offset===t.offset&&e.size===t.size&&e.nameIndex===t.nameIndex}(a,t)?e.slice(0,-1):[...e,a]})},[F,b.h,A]);u(()=>{const e=f.current;if(!e||A<2||b.h<2)return;const t="undefined"!=typeof window&&window.devicePixelRatio||1;e.width=Math.floor(A*t),e.height=Math.floor(b.h*t),e.style.width=`${A}px`,e.style.height=`${b.h}px`;const i=e.getContext("2d");i&&(i.setTransform(t,0,0,t,0,0),i.clearRect(0,0,A,b.h),M?.length?function(e,t,n,i,o,a,r,l){const s=a.v2.colors.silver[900];e.fillStyle=s,e.fillRect(0,0,t,n);const c=o.trim().length>0;for(const t of i){const{x:n,y:i,w:o,h:r,name:s,size:d,matchesSearch:u}=t;if(c&&!u)continue;const{fill:p,text:h}=Bl(s,a);e.fillStyle=p,e.fillRect(n,i,o,r),e.strokeStyle="rgba(255,255,255,0.14)",e.lineWidth=1,e.beginPath(),e.moveTo(n+.5,i+.5),e.lineTo(n+o-.5,i+.5),e.stroke(),e.strokeStyle="rgba(0,0,0,0.45)",e.lineWidth=1,e.strokeRect(n+.5,i+.5,Math.max(o-1,0),Math.max(r-1,0));const m=Jl(d,l),g=`${s} (${Pl(d)}, ${m}%)`,f=a.v2.text.size.xxs,v=3,y=22,b=Math.min(f,Math.floor(r-2));if(o>=y&&b>=5){e.font=`${b}px ${a.font_family.code}, ui-monospace, monospace`,e.textBaseline="middle",e.textAlign="left",e.fillStyle=h;let t=g;for(;t.length>2&&e.measureText(t).width>o-2*v;)t=`${t.slice(0,-2)}…`;e.measureText(t).width<=o-2*v&&e.fillText(t,n+v,i+r/2)}}if(r)for(const t of i){if(Kl(t)!==r)continue;if(c&&!t.matchesSearch)continue;const{x:n,y:i,w:o,h:a}=t;e.strokeStyle="rgba(255,255,255,0.88)",e.lineWidth=2,e.strokeRect(n+1,i+1,Math.max(o-2,0),Math.max(a-2,0));break}}(i,A,b.h,M,r,h,w,n.numTicks):(i.fillStyle=h.v2.colors.silver[900],i.fillRect(0,0,A,b.h)))},[M,n.numTicks,w,r,b.h,A,h]);const j=d(()=>N(e=>!e),[]),V=n.numTicks>0?Math.max(0,Math.min(100,Math.round(O/n.numTicks*100))):100,B=c(()=>function(e,t){const n=zl(e),i=t?.offset??0,o=i+(t?.size??e.numTicks),a=(t?.level??-1)+1,r=t?.size??e.numTicks;let l=null;for(const e of n)e.level<a||e.offset<i||e.offset+e.size>o||e.size>=r||(!l||e.size>l.size||e.size===l.size&&e.level<l.level)&&(l=e);return l}(n,R),[n,R]),W=null!==B,U=T.length>0,H=R?Ll(n,R.nameIndex):"",q=d(()=>E([]),[]),G=d(()=>E(e=>e.slice(0,-1)),[]),Y=d(()=>{B&&E(e=>[...e,B])},[B]);return e("div",{style:$?{position:"fixed",inset:0,zIndex:9999,display:"flex",flexDirection:"column",gap:8,padding:16,background:h.v2.colors.silver[900]}:{flex:1,minHeight:s,minWidth:0,width:"100%",display:"flex",flexDirection:"column",gap:8,position:"relative"},children:[e("div",{style:{display:"flex",alignItems:"center",gap:10,flexWrap:"wrap",minHeight:32,flexShrink:0,padding:"0 2px"},children:[t("div",{style:{flex:"1 1 120px",minWidth:0},children:t(mn,R?{size:gn.XXS,color:h.v2.colors.silver[200],nowrap:!0,children:`Zoomed: ${H} • ${Pl(O)} samples in view`}:{size:gn.XXS,color:h.v2.colors.silver[200],children:"Click a frame to zoom into its subtree (pprof-style)."})}),e("div",{style:{display:"flex",gap:8,flexShrink:0,alignItems:"center"},children:[T.length>0&&t(fn,{variant:yn.Secondary,size:vn.S,label:"Reset zoom",leftIcon:si,onClick:q}),t(fn,{variant:yn.Secondary,size:vn.S,iconSize:20,leftIcon:$i,tooltip:"Zoom out",hideTooltipIcon:!0,disabled:!U,onClick:G}),t("div",{style:{minWidth:36,textAlign:"center",fontVariantNumeric:"tabular-nums"},children:t(mn,{size:gn.XXS,color:h.v2.colors.silver[200],nowrap:!0,align:"center",children:`${V}%`})}),t(fn,{variant:yn.Secondary,size:vn.S,iconSize:20,leftIcon:ri,tooltip:"Zoom in",hideTooltipIcon:!0,disabled:!W,onClick:Y}),t(bn,{size:xn.S,variant:Sn.Filled,options:[{value:Yl.Fit,label:"Fit"},{value:Yl.X2,label:"2x"},{value:Yl.X3,label:"3x"},{value:Yl.X5,label:"5x"}],selected:D,setSelected:I}),t(fn,{variant:yn.Secondary,size:vn.S,iconSize:24,leftIcon:$?Ni:Di,tooltip:$?"Exit fullscreen (Esc)":"Fullscreen",hideTooltipIcon:!0,onClick:j})]})]}),t(be,{fullWidth:!0,keepAlive:!0,text:x,children:t("div",{ref:m,style:{flex:1,minWidth:0,width:"100%",height:$?"calc(100vh - 80px)":"calc(100vh - 370px)",position:"relative",overflowX:D>1?"auto":"hidden",overflowY:"hidden"},children:t("div",{style:{width:A||"100%",height:"100%",position:"relative"},children:t("canvas",{ref:f,style:{display:"block",position:"absolute",left:0,top:0,width:"100%",height:"100%",borderRadius:8,cursor:w?"pointer":"default"},onPointerDown:z,onPointerMove:P,onPointerLeave:_,onClick:K})})})})]})};var Zl;!function(e){e.Table="table",e.Flame="flame",e.Both="both"}(Zl||(Zl={}));const es=h(R)`
511
+ `,Rl=({onEditStream:n,onEditSources:i,onEditDestinations:o,categories:a})=>{const{selectedStreamName:r}=Ze(),{configuredSources:l,configuredDestinations:s,configuredDestinationsUpdateOnly:d}=yt(),u=c(()=>Object.values(l).reduce((e,t)=>e+t.filter(e=>e.selected).length,0),[l]);return t(ce,{$isNotModal:!0,children:e(R,{$gap:12,children:[t(z,{title:f.SUMMARY,description:f.STREAM_CONFIRM}),e(Al,{children:[t(ne,{title:f.STREAM_NAME,action:()=>t(cn,{onClick:n}),data:[{title:"",value:r}]}),t(ne,{title:f.SELECTED_SOURCES,titleBadge:u,action:()=>t(cn,{onClick:i}),children:t(Dl,{filteredNamespacesAndSources:l,withInstances:!1})}),t(ne,{title:f.SELECTED_DESTINATIONS,titleBadge:s.length+d.length,action:()=>t(cn,{onClick:o}),children:t(dr,{categories:a})})]})]})})};var Ol;!function(e){e.Overview="overview",e.InstrumentationRules="InstrumentationRule",e.Sources="Source",e.Actions="Action",e.Destinations="Destination"}(Ol||(Ol={}));const Ml=({onClickId:e,defaultSelectedId:n,extendedNavIcons:o})=>{const{isVm:a}=ae(),[r,l]=i(n||""),s=c(()=>[{id:Ol.Overview,icon:Si,selected:r===Ol.Overview,onClick:()=>{l(Ol.Overview),e(Ol.Overview)},tooltip:"Overview"},...(o||[]).map(e=>({...e,selected:r===e.id,onClick:()=>{l(e.id),e.onClick()}}))],[r]),d=c(()=>{const t=[{id:Ol.Sources,icon:xi,selected:r===Ol.Sources,onClick:()=>{l(Ol.Sources),e(Ol.Sources)},tooltip:"Sources"},{id:Ol.Destinations,icon:Ci,selected:r===Ol.Destinations,onClick:()=>{l(Ol.Destinations),e(Ol.Destinations)},tooltip:"Destinations"}];return a||(t.push({id:Ol.InstrumentationRules,icon:wi,selected:r===Ol.InstrumentationRules,onClick:()=>{l(Ol.InstrumentationRules),e(Ol.InstrumentationRules)},tooltip:"Instrumentation Rules"}),t.push({id:Ol.Actions,icon:ki,selected:r===Ol.Actions,onClick:()=>{l(Ol.Actions),e(Ol.Actions)},tooltip:"Actions"})),t},[a,r]);return t(dn,{orientation:"vertical",mainIcons:s,subIcons:d})},Fl=({})=>t(M,{onClick:()=>window.open("https://join.slack.com/t/odigos/shared_invite/zt-2wc6gm4j9-EhcVFYrLwHqvcIErO9sVzw","_blank","noopener noreferrer"),tooltip:"Join our Slack community",children:t(Ti,{})});function Ll(e,t){const n=e.names[t];if(null==n)return"";if("string"==typeof n)return n;if("object"==typeof n&&"name"in n){const e=n.name;if("string"==typeof e)return e}return"number"==typeof n||"boolean"==typeof n?String(n):""}function Pl(e){const t=Math.abs(e);return t>=1e9?`${_l(e/1e9)}s`:t>=1e6?`${_l(e/1e6)}ms`:t>=1e3?`${_l(e/1e3)}μs`:String(Math.round(e))}function _l(e){return e.toFixed(2).replace(/\.?0+$/,"")}function zl(e){const t=[];for(let n=0;n<e.levels.length;n++){const i=e.levels[n];let o=0;for(let e=0;e+3<i.length;e+=4){const a=i[e],r=i[e+1],l=i[e+2],s=i[e+3],c=o+a;t.push({level:n,offset:c,size:r,self:l,nameIndex:s}),o=c+r}}return t}function Kl(e){return`${e.level}:${e.offset}:${e.size}:${e.nameIndex}`}function jl(e,t){const n=t.trim().toLowerCase();return!n||e.toLowerCase().includes(n)}function Vl(e,t,n,i,o,a=null){if(0===e.levels.length||t<2||n<2)return null;const r=zl(e),l=a?function(e,t){const n=e.reduce((e,t)=>Math.max(e,t.level),t.level),i=new Map;for(const t of e){const e=i.get(t.level);e?e.push(t):i.set(t.level,[t])}const o=[t];for(let e=t.level+1;e<=n;e++){const t=o.filter(t=>t.level===e-1);if(0===t.length)break;const n=i.get(e);if(n?.length)for(const e of n)for(const n of t)if(e.offset>=n.offset&&e.offset+e.size<=n.offset+n.size){o.push(e);break}}return o}(r,a):r;if(0===l.length)return null;const s=a?.level??0,c=a?.offset??0,d=a?.size??e.numTicks;if(d<=0)return null;const u=a?Math.max(...l.map(e=>e.level-s))+1:e.levels.length,p=i??Number.POSITIVE_INFINITY,h=Math.max(1,Math.min(n/u,p)),m=o.trim(),g=h>8?1:0;return l.map(n=>{const i=n.level-s,o=(n.offset-c)/d*t,r=Math.max(n.size/d*t,1),l=(a?i:n.level)*h,u=Math.max(h-g,1),p=Ll(e,n.nameIndex);return{...n,x:o,y:l,w:r,h:u,name:p,matchesSearch:jl(p,m)}})}function Bl(e,t){let n=0;for(let t=0;t<e.length;t++)n=31*n+e.charCodeAt(t)>>>0;const i=t.v2.colors.black[500],o=[{fill:t.v2.colors.purple[300],text:i},{fill:t.v2.colors.green[300],text:i},{fill:t.v2.colors.red[300],text:i},{fill:t.v2.colors.blue[300],text:i},{fill:t.v2.colors.yellow[300],text:i}];return o[n%o.length]}var Wl,Ul;!function(e){e.Symbol="symbol",e.Self="self",e.Total="total"}(Wl||(Wl={})),function(e){e.FilterOutVoid="filter-out-void",e.OnlyWithReturnValues="only-with-return-values"}(Ul||(Ul={}));const Hl=/^[A-Za-z_$][A-Za-z0-9_$]*(\[\])*$/;const ql={options:[{id:Ul.FilterOutVoid,label:"Filter out void symbols"},{id:Ul.OnlyWithReturnValues,label:"Only show functions with return values"}],filterRow:(e,t)=>{const n=e.cells.find(e=>e.key===Wl.Symbol)?.rawValue?.toString()??"",i=function(e){return e.split(" ")[0]??""}(n);if(t.includes(Ul.FilterOutVoid)&&"void"===i)return!1;if(t.includes(Ul.OnlyWithReturnValues)){if(!(n.includes(" ")&&"void"!==i&&Hl.test(i)))return!1}return!0}},Gl=({rows:e,languages:n})=>{const i=c(()=>[{key:Wl.Symbol,label:"Symbol",flex:"0 0 160px",filterOverride:n?.includes(un.Java)?ql:void 0,noFilter:!n?.includes(un.Java)},{key:Wl.Self,label:"Self",tooltip:"Time spent in this function itself, excluding time in functions it calls.",textAlign:"right",noFilter:!0},{key:Wl.Total,label:"Total",tooltip:"Time spent in this function and all functions it calls (inclusive).",textAlign:"right",noFilter:!0}],[n]),o=c(()=>e.map(e=>({cells:[{key:Wl.Symbol,rawValue:e.name},{key:Wl.Self,rawValue:Pl(e.self)},{key:Wl.Total,rawValue:Pl(e.total)}]})),[e]);return t(pn,{variant:hn.Data,maxHeight:"calc(100vh - 340px)",columns:i,rows:o,rowActionsPushLeftPosition:"12px",getRowActions:e=>[{id:`copy-${e.cells[0].rawValue}`,label:"",rightIcon:Ei,onClick:()=>{navigator.clipboard.writeText(e.cells[0].rawValue)}}]})};var Yl;function Jl(e,t){return t<=0?"0":(100*e/t).toFixed(e/t<.001?2:1)}function Xl(e,t,n){for(const i of n)if(e>=i.x&&e<i.x+i.w&&t>=i.y&&t<i.y+i.h)return i;return null}!function(e){e[e.Fit=1]="Fit",e[e.X2=2]="X2",e[e.X5=5]="X5",e[e.X10=10]="X10"}(Yl||(Yl={}));const Ql=({flamebearer:n,maxRowPx:a,searchQuery:r="",minHostHeight:s=200,onFullscreenChange:p})=>{const h=g(),m=l(null),f=l(null),v=l({x:0,y:0}),y=l(n.numTicks),[b,S]=i({w:0,h:0}),[x,C]=i(""),[w,k]=i(null),[T,E]=i([]),[$,N]=i(!1),[D,I]=i(Yl.Fit),A=Math.max(1,Math.floor(b.w*D)),R=T.length>0?T[T.length-1]:null,O=R?.size??n.numTicks;o(()=>{y.current!==n.numTicks&&(y.current=n.numTicks,E([]))},[n.numTicks]),u(()=>{const e=m.current;if(!e)return;const t=new ResizeObserver(()=>{const t=e.getBoundingClientRect();S({w:Math.floor(t.width),h:Math.floor(t.height)})});return t.observe(e),()=>t.disconnect()},[]),o(()=>{if(!$)return;const e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}},[$]),o(()=>(p?.($),()=>{$&&p?.(!1)}),[$,p]);const M=c(()=>Vl(n,A,b.h,a,r,R),[n,a,r,b.h,A,R]),F=c(()=>function(e){return[...e].sort((e,t)=>t.level-e.level)}(M?.length?r.trim()?M.filter(e=>e.matchesSearch):M:[]),[M,r]),L=d(e=>{if(A<2||b.h<2)return;const t=e.currentTarget.getBoundingClientRect();if(t.width<1||t.height<1)return;const i=Xl((e.clientX-t.left)/t.width*A,(e.clientY-t.top)/t.height*b.h,F);if(i){const e=Kl(i);k(e);const t=O>0?(100*i.size/O).toFixed(1):"0",o=n.numTicks>0?(100*i.size/n.numTicks).toFixed(1):"0";C(`${i.name}\ntotal ${Pl(i.size)} (${t}% of view, ${o}% of profile) · self ${Pl(i.self)}`)}else k(null),C("")},[F,n.numTicks,b.h,A,O]),P=d(e=>{L(e)},[L]),_=d(()=>{k(null),C("")},[]),z=d(e=>{v.current={x:e.clientX,y:e.clientY}},[]),K=d(e=>{const{x:t,y:n}=v.current;if(Math.abs(e.clientX-t)>3||Math.abs(e.clientY-n)>3)return;if(A<2||b.h<2)return;const i=e.currentTarget.getBoundingClientRect();if(i.width<1||i.height<1)return;const o=Xl((e.clientX-i.left)/i.width*A,(e.clientY-i.top)/i.height*b.h,F);if(!o)return;const a=function(e){return{level:e.level,offset:e.offset,size:e.size,self:e.self,nameIndex:e.nameIndex}}(o);E(e=>{const t=e.length>0?e[e.length-1]:null;return t&&function(e,t){return e.level===t.level&&e.offset===t.offset&&e.size===t.size&&e.nameIndex===t.nameIndex}(a,t)?e.slice(0,-1):[...e,a]})},[F,b.h,A]);u(()=>{const e=f.current;if(!e||A<2||b.h<2)return;const t="undefined"!=typeof window&&window.devicePixelRatio||1;e.width=Math.floor(A*t),e.height=Math.floor(b.h*t),e.style.width=`${A}px`,e.style.height=`${b.h}px`;const i=e.getContext("2d");i&&(i.setTransform(t,0,0,t,0,0),i.clearRect(0,0,A,b.h),M?.length?function(e,t,n,i,o,a,r,l){const s=a.v2.colors.silver[900];e.fillStyle=s,e.fillRect(0,0,t,n);const c=o.trim().length>0;for(const t of i){const{x:n,y:i,w:o,h:r,name:s,size:d,matchesSearch:u}=t;if(c&&!u)continue;const{fill:p,text:h}=Bl(s,a);e.fillStyle=p,e.fillRect(n,i,o,r),e.strokeStyle="rgba(255,255,255,0.14)",e.lineWidth=1,e.beginPath(),e.moveTo(n+.5,i+.5),e.lineTo(n+o-.5,i+.5),e.stroke(),e.strokeStyle="rgba(0,0,0,0.45)",e.lineWidth=1,e.strokeRect(n+.5,i+.5,Math.max(o-1,0),Math.max(r-1,0));const m=Jl(d,l),g=`${s} (${Pl(d)}, ${m}%)`,f=a.v2.text.size.xxs,v=3,y=22,b=Math.min(f,Math.floor(r-2));if(o>=y&&b>=5){e.font=`${b}px ${a.font_family.code}, ui-monospace, monospace`,e.textBaseline="middle",e.textAlign="left",e.fillStyle=h;let t=g;for(;t.length>2&&e.measureText(t).width>o-2*v;)t=`${t.slice(0,-2)}…`;e.measureText(t).width<=o-2*v&&e.fillText(t,n+v,i+r/2)}}if(r)for(const t of i){if(Kl(t)!==r)continue;if(c&&!t.matchesSearch)continue;const{x:n,y:i,w:o,h:a}=t;e.strokeStyle="rgba(255,255,255,0.88)",e.lineWidth=2,e.strokeRect(n+1,i+1,Math.max(o-2,0),Math.max(a-2,0));break}}(i,A,b.h,M,r,h,w,n.numTicks):(i.fillStyle=h.v2.colors.silver[900],i.fillRect(0,0,A,b.h)))},[M,n.numTicks,w,r,b.h,A,h]);const j=d(()=>N(e=>!e),[]),V=n.numTicks>0?Math.max(0,Math.min(100,Math.round(O/n.numTicks*100))):100,B=c(()=>function(e,t){const n=zl(e),i=t?.offset??0,o=i+(t?.size??e.numTicks),a=(t?.level??-1)+1,r=t?.size??e.numTicks;let l=null;for(const e of n)e.level<a||e.offset<i||e.offset+e.size>o||e.size>=r||(!l||e.size>l.size||e.size===l.size&&e.level<l.level)&&(l=e);return l}(n,R),[n,R]),W=null!==B,U=T.length>0,H=R?Ll(n,R.nameIndex):"",q=d(()=>E([]),[]),G=d(()=>E(e=>e.slice(0,-1)),[]),Y=d(()=>{B&&E(e=>[...e,B])},[B]);return e("div",{style:$?{position:"fixed",inset:0,zIndex:9999,display:"flex",flexDirection:"column",gap:8,padding:16,background:h.v2.colors.silver[900]}:{flex:1,minHeight:s,minWidth:0,width:"100%",display:"flex",flexDirection:"column",gap:8,position:"relative"},children:[e("div",{style:{display:"flex",alignItems:"center",gap:10,flexWrap:"wrap",minHeight:32,flexShrink:0,padding:"0 2px"},children:[t("div",{style:{flex:"1 1 120px",minWidth:0},children:t(mn,R?{size:gn.XXS,color:h.v2.colors.silver[200],nowrap:!0,children:`Zoomed: ${H} • ${Pl(O)} samples in view`}:{size:gn.XXS,color:h.v2.colors.silver[200],children:"Click a frame to zoom into its subtree (pprof-style)."})}),e("div",{style:{display:"flex",gap:8,flexShrink:0,alignItems:"center"},children:[T.length>0&&t(fn,{variant:yn.Secondary,size:vn.S,label:"Reset zoom",leftIcon:si,onClick:q}),t(fn,{variant:yn.Secondary,size:vn.S,iconSize:20,leftIcon:$i,tooltip:"Zoom out",hideTooltipIcon:!0,disabled:!U,onClick:G}),t("div",{style:{minWidth:36,textAlign:"center",fontVariantNumeric:"tabular-nums"},children:t(mn,{size:gn.XXS,color:h.v2.colors.silver[200],nowrap:!0,align:"center",children:`${V}%`})}),t(fn,{variant:yn.Secondary,size:vn.S,iconSize:20,leftIcon:ri,tooltip:"Zoom in",hideTooltipIcon:!0,disabled:!W,onClick:Y}),t(bn,{size:xn.S,variant:Sn.Filled,options:[{value:Yl.Fit,label:"Fit"},{value:Yl.X2,label:"2x"},{value:Yl.X5,label:"5x"},{value:Yl.X10,label:"10x"}],selected:D,setSelected:I}),t(fn,{variant:yn.Secondary,size:vn.S,iconSize:24,leftIcon:$?Ni:Di,tooltip:$?"Exit fullscreen (Esc)":"Fullscreen",hideTooltipIcon:!0,onClick:j})]})]}),t(be,{fullWidth:!0,keepAlive:!0,text:x,children:t("div",{ref:m,style:{flex:1,minWidth:0,width:"100%",height:$?"calc(100vh - 80px)":"calc(100vh - 370px)",position:"relative",overflowX:D>1?"auto":"hidden",overflowY:"hidden"},children:t("div",{style:{width:A||"100%",height:"100%",position:"relative"},children:t("canvas",{ref:f,style:{display:"block",position:"absolute",left:0,top:0,width:"100%",height:"100%",borderRadius:8,cursor:w?"pointer":"default"},onPointerDown:z,onPointerMove:P,onPointerLeave:_,onClick:K})})})})]})};var Zl;!function(e){e.Table="table",e.Flame="flame",e.Both="both"}(Zl||(Zl={}));const es=h(R)`
512
512
  width: 100%;
513
513
  min-height: 0;
514
514
  flex: 1;
@@ -556,7 +556,7 @@ import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import{useState
556
556
  flex-shrink: 0;
557
557
  `,ls=h.div`
558
558
  padding: 12px;
559
- `;function ss(e){return e>=1073741824?`${(e/1073741824).toFixed(1)} GiB`:e>=1048576?`${(e/1048576).toFixed(1)} MiB`:e>=1024?`${(e/1024).toFixed(1)} KiB`:`${e} B`}const cs=({source:n,fetchProfilingSlots:r,enableProfiling:s,releaseProfiling:u,fetchSourceProfiling:p,onFlameFullscreenChange:h})=>{const m=g(),f={namespace:n.namespace,kind:n.kind,name:n.name},[v,y]=i(!0),[b,S]=i(null),[x,C]=i(null),[w,k]=i(0),[T,E]=i(Zl.Both),[$,N]=i(""),D=l(null),I=d(async()=>{try{const[e,t]=await Promise.all([r(),p(f)]);e&&S(e),t?.profileJson&&C(t.profileJson)}finally{k(e=>e+1)}},[r,p,n.namespace,n.kind,n.name]);o(()=>{if(!v)return;let e=!1;return(async()=>{await s(f),e||(await I(),e||(D.current=setInterval(I,3e3)))})(),()=>{e=!0,D.current&&clearInterval(D.current),u(f)}},[s,u,I,n.namespace,n.kind,n.name,v]);const A=c(()=>function(e){if(!e?.trim())return null;try{const t=JSON.parse(e),n=t.flamebearer;return!n?.names?.length||!Array.isArray(n.levels)||"number"!=typeof n.numTicks||n.numTicks<=0?null:{flamebearer:n,units:t.metadata?.units}}catch{return null}}(x),[x]),R=c(()=>A?function(e){const t=new Map;for(let n=0;n<e.levels.length;n++){const i=e.levels[n];for(let n=0;n+3<i.length;n+=4){const o=i[n+1],a=i[n+2],r=Ll(e,i[n+3]);if(!r)continue;const l=t.get(r);(!l||o>l.total)&&t.set(r,{self:a,total:o})}}return[...t.entries()].map(([e,t])=>({name:e,self:t.self,total:t.total})).sort((e,t)=>t.self-e.self)}(A.flamebearer):[],[A]),M=c(()=>{const e=$.trim().toLowerCase();return e?R.filter(t=>t.name.toLowerCase().includes(e)):R},[R,$]),F=T===Zl.Table||T===Zl.Both,L=T===Zl.Flame||T===Zl.Both,P=F&&L;return w<2?t(Re,{$height:"70vh",children:t(Cn,{withSpinner:!0})}):e(es,{$gap:0,$width:"100%",children:[e(ts,{children:[t(be,{text:"Live CPU profile collected from the workload agent. Search symbols, switch between the table and flame graph, or download a JSON snapshot.",withIcon:!0,children:t(ns,{children:t(mn,{size:gn.S,weight:500,color:m.v2.colors.white[500],nowrap:!0,children:"CPU Profiling"})})}),e(O,{style:{flex:1,minWidth:200,gap:10,alignItems:"center",flexWrap:"wrap"},children:[t("div",{style:{flex:"1 1 220px",minWidth:180},children:t(wn,{value:$,onChange:N,placeholder:"Search by symbol name",width:"100%",idleBackgroundColor:m.v2.colors.silver[900],emphasizeBackgroundColor:m.v2.colors.silver[800]})}),t(bn,{size:xn.S,variant:Sn.Filled,options:[{value:Zl.Table,label:"Top table"},{value:Zl.Flame,label:"Flame graph"},{value:Zl.Both,label:"Both"}],selected:T,setSelected:E}),t(fn,v?{variant:yn.Secondary,size:vn.S,label:"Live",tooltip:"Odigos profiler works in-memory and doesn't store any data on disk, to keep minimum memory footprint we store only last 10 minutes of data on demand",leftIcon:e=>t(Ii,{...e,size:8,fill:m.v2.colors.green[500]})}:{variant:yn.Secondary,size:vn.S,label:"Paused",tooltip:"Odigos profiler is still collecting data, but the UI is not updating in real time",leftIcon:e=>t(Ii,{...e,size:8,fill:m.v2.colors.red[500]})})]})]}),t(is,{$gap:F&&L?16:0,children:A?e(a,{children:[F&&e(os,{$splitWithFlame:P,children:[t(rs,{$justifyContent:"flex-end",children:t(fn,{variant:yn.Secondary,size:vn.S,label:"Download Snapshot",rightIcon:Ai,onClick:()=>{if(!x)return;const e=new Blob([x],{type:"application/json"}),t=URL.createObjectURL(e),i=document.createElement("a");i.href=t,i.download=`cpu-profile-${n.namespace}-${n.kind}-${n.name}.json`,i.click(),URL.revokeObjectURL(t)},disabled:!x})}),t(Gl,{rows:M,languages:n.detectedLanguages||n.containers?.map(e=>e.overrides?.runtimeInfo?.language??e.runtimeInfo?.language??"")})]}),L&&e(as,{$splitWithTable:P,children:[e(rs,{$justifyContent:"space-between",children:[t(Tn,{label:A?`Total samples in view ${Pl(A.flamebearer.numTicks)}`:"No profile sample yet",backgroundColor:m.v2.colors.silver[750],textColor:m.v2.colors.silver[200],textSize:gn.XXS}),e(O,{$gap:12,children:[!v&&t(fn,{variant:yn.Secondary,size:vn.S,label:"Refresh",leftIcon:li,onClick:I}),t(En,{label:"Auto refresh",labelAlign:Nn.Left,size:$n.S,value:v,onChange:y})]})]}),t(Ql,{flamebearer:A.flamebearer,maxRowPx:22,searchQuery:$,minHostHeight:280,onFullscreenChange:h},T)]})]}):t(Re,{children:t(kn,{title:"No profile samples yet",subTitle:"Keep this tab open while the agent collects a sample."})})}),b&&t(ls,{children:t(mn,{size:gn.XXXS,color:m.v2.colors.silver[300],children:`${b.activeKeys.length} / ${b.maxSlots} profiling slots · ${ss(b.totalBytesUsed)} / ${ss(b.maxTotalBytesBudget)} budget · TTL ${b.slotTtlSeconds}s`})})]})},ds=(e,t)=>{const{name:n,kind:i,namespace:o}=e,a=[{title:f.KIND,value:i},{title:f.NAME,value:n,tooltip:"Resource name"}];return t||(a.unshift({title:f.NAMESPACE,value:o}),a.push({type:v.Divider}),a.push({type:v.CopyText,value:`kubectl get ${i} ${n} -n ${o}`.toLowerCase()})),a},us=h.div`
559
+ `;function ss(e){return e>=1073741824?`${(e/1073741824).toFixed(1)} GiB`:e>=1048576?`${(e/1048576).toFixed(1)} MiB`:e>=1024?`${(e/1024).toFixed(1)} KiB`:`${e} B`}const cs=({source:n,fetchProfilingSlots:r,enableProfiling:s,releaseProfiling:u,fetchSourceProfiling:p,onFlameFullscreenChange:h})=>{const m=g(),f=c(()=>({namespace:n.namespace,kind:n.kind,name:n.name}),[n.namespace,n.kind,n.name]),[v,y]=i(!0),[b,S]=i(null),[x,C]=i(null),[w,k]=i(0),[T,E]=i(Zl.Both),[$,N]=i(""),D=l(null),I=d(async()=>{try{const e=[r()];v&&e.push(p(f));const[t,n]=await Promise.all(e);t&&S(t),n?.profileJson&&C(n.profileJson)}finally{k(e=>e+1)}},[r,p,f]);o(()=>{let e=!1;return(async()=>{await s(f),e||(await I(),e||(D.current=setInterval(I,3e3)))})(),()=>{e=!0,D.current&&clearInterval(D.current),u(f)}},[s,u,I,f]);const A=c(()=>function(e){if(!e?.trim())return null;try{const t=JSON.parse(e),n=t.flamebearer;return!n?.names?.length||!Array.isArray(n.levels)||"number"!=typeof n.numTicks||n.numTicks<=0?null:{flamebearer:n,units:t.metadata?.units}}catch{return null}}(x),[x]),R=c(()=>A?function(e){const t=new Map;for(let n=0;n<e.levels.length;n++){const i=e.levels[n];for(let n=0;n+3<i.length;n+=4){const o=i[n+1],a=i[n+2],r=Ll(e,i[n+3]);if(!r)continue;const l=t.get(r);(!l||o>l.total)&&t.set(r,{self:a,total:o})}}return[...t.entries()].map(([e,t])=>({name:e,self:t.self,total:t.total})).sort((e,t)=>t.self-e.self)}(A.flamebearer):[],[A]),M=c(()=>{const e=$.trim().toLowerCase();return e?R.filter(t=>t.name.toLowerCase().includes(e)):R},[R,$]),F=T===Zl.Table||T===Zl.Both,L=T===Zl.Flame||T===Zl.Both,P=F&&L;return w<2?t(Re,{$height:"70vh",children:t(Cn,{withSpinner:!0})}):e(es,{$gap:0,$width:"100%",children:[e(ts,{children:[t(be,{text:"Live CPU profile collected from the workload agent. Search symbols, switch between the table and flame graph, or download a JSON snapshot.",withIcon:!0,children:t(ns,{children:t(mn,{size:gn.S,weight:500,color:m.v2.colors.white[500],nowrap:!0,children:"CPU Profiling"})})}),e(O,{style:{flex:1,minWidth:200,gap:10,alignItems:"center",flexWrap:"wrap"},children:[t("div",{style:{flex:"1 1 220px",minWidth:180},children:t(wn,{value:$,onChange:N,placeholder:"Search by symbol name",width:"100%",idleBackgroundColor:m.v2.colors.silver[900],emphasizeBackgroundColor:m.v2.colors.silver[800]})}),t(bn,{size:xn.S,variant:Sn.Filled,options:[{value:Zl.Table,label:"Top table"},{value:Zl.Flame,label:"Flame graph"},{value:Zl.Both,label:"Both"}],selected:T,setSelected:E}),t(fn,v?{variant:yn.Secondary,size:vn.S,label:"Live",tooltip:"Odigos profiler works in-memory and doesn't store any data on disk, to keep minimum memory footprint we store only last 10 minutes of data on demand",leftIcon:e=>t(Ii,{...e,size:8,fill:m.v2.colors.green[500]})}:{variant:yn.Secondary,size:vn.S,label:"Paused",tooltip:"Odigos profiler is still collecting data, but the UI is not updating in real time",leftIcon:e=>t(Ii,{...e,size:8,fill:m.v2.colors.red[500]})})]})]}),t(is,{$gap:F&&L?16:0,children:A?e(a,{children:[F&&e(os,{$splitWithFlame:P,children:[t(rs,{$justifyContent:"flex-end",children:t(fn,{variant:yn.Secondary,size:vn.S,label:"Download snapshot",rightIcon:Ai,onClick:()=>{if(!x)return;const e=new Blob([x],{type:"application/json"}),t=URL.createObjectURL(e),i=document.createElement("a");i.href=t,i.download=`cpu-profile-${n.namespace}-${n.kind}-${n.name}.json`,i.click(),URL.revokeObjectURL(t)},disabled:!x})}),t(Gl,{rows:M,languages:n.detectedLanguages||n.containers?.map(e=>e.overrides?.runtimeInfo?.language??e.runtimeInfo?.language??"")})]}),L&&e(as,{$splitWithTable:P,children:[e(rs,{$justifyContent:"space-between",children:[t(Tn,{label:A?`Total in view ${Pl(A.flamebearer.numTicks)}`:"No profile sample yet",backgroundColor:m.v2.colors.silver[750],textColor:m.v2.colors.silver[200],textSize:gn.XXS}),e(O,{$gap:12,children:[!v&&t(fn,{variant:yn.Secondary,size:vn.S,label:"Refresh",leftIcon:li,onClick:I}),t(En,{label:"Auto refresh",labelAlign:Nn.Left,size:$n.S,value:v,onChange:y})]})]}),t(Ql,{flamebearer:A.flamebearer,maxRowPx:24,searchQuery:$,minHostHeight:280,onFullscreenChange:h},T)]})]}):t(Re,{children:t(kn,{title:"No profile samples yet",subTitle:"Dynamically collecting profiling samples — keep this tab open while the agent sends OTLP profiles."})})}),b&&t(ls,{children:t(mn,{size:gn.XXXS,color:m.v2.colors.silver[300],children:`${b.activeKeys.length} / ${b.maxSlots} profiling slots · ${ss(b.totalBytesUsed)} / ${ss(b.maxTotalBytesBudget)} budget · TTL ${b.slotTtlSeconds}s`})})]})},ds=(e,t)=>{const{name:n,kind:i,namespace:o}=e,a=[{title:f.KIND,value:i},{title:f.NAME,value:n,tooltip:"Resource name"}];return t||(a.unshift({title:f.NAMESPACE,value:o}),a.push({type:v.Divider}),a.push({type:v.CopyText,value:`kubectl get ${i} ${n} -n ${o}`.toLowerCase()})),a},us=h.div`
560
560
  display: flex;
561
561
  flex-direction: column;
562
562
  gap: 24px;
package/lib/contexts.js CHANGED
@@ -1 +1 @@
1
- export{bs as ActionFormContextProvider,br as DestinationFormContextProvider,fY as OdigosProvider,bt as RuleFormContextProvider,a0 as SamplingRuleFormType,a$ as SamplingRulesFormProvider,bq as SourceInstrumentFormContextProvider,fZ as StorybookProvider,bm as checkVersionSupport,q as useActionFormContext,y as useDestinationFormContext,ar as useOdigos,X as useRuleFormContext,$ as useSamplingRulesFormContext,aB as useSourceInstrumentFormContext,f_ as useStorybook}from"./chunks/ui-components-B4LvruCJ.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-C150cdxb.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
1
+ export{bs as ActionFormContextProvider,br as DestinationFormContextProvider,fY as OdigosProvider,bt as RuleFormContextProvider,a0 as SamplingRuleFormType,a$ as SamplingRulesFormProvider,bq as SourceInstrumentFormContextProvider,fZ as StorybookProvider,bm as checkVersionSupport,r as useActionFormContext,y as useDestinationFormContext,as as useOdigos,X as useRuleFormContext,$ as useSamplingRulesFormContext,aC as useSourceInstrumentFormContext,f_ as useStorybook}from"./chunks/ui-components-C7i9zbc-.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-C150cdxb.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
package/lib/functions.js CHANGED
@@ -1 +1 @@
1
- export{dx as capitalizeFirstLetter,fq as cleanObjectEmptyStringsValues,x as compareCondition,an as deepClone,d6 as entityIdKey,cP as filterActions,de as filterDestinations,aQ as filterDestinationsByStream,dd as filterSources,dc as filterSourcesByStream,fr as flattenObjectKeys,d8 as formatBytes,e5 as formatDuration,g as generateId,aM as getActionIcon,cJ as getConditionsBooleans,d$ as getContainersIcons,e2 as getContainersInstrumentedCount,fs as getDeepValue,ak as getDestinationIcon,ft as getDetectedLanguageIcons,cW as getEntityIcon,aG as getEntityId,d5 as getEntityIdKey,cR as getEntityLabel,fu as getIdFromSseTarget,aW as getInstrumentationRuleIcon,fv as getMainContainerLanguage,dB as getMetricForEntity,fw as getMonitorIcon,fx as getPlatformIcon,fy as getPlatformLabel,_ as getProgrammingLanguageIcon,e7 as getRecursiveValues,d9 as getSourceLanguageIcons,fz as getSseTargetFromId,fA as getStatusColor,bw as getStatusFromPodStatus,cN as getStatusIcon,dQ as getStatusTypeFromOdigosHealth,fB as getValueForRange,dJ as getVirtualServiceIcon,dG as getWorkloadId,aR as getYamlFieldsForDestination,dR as hasUnhealthyInstances,i as isEmpty,fC as isLegalK8sLabel,bi as isOverTime,dW as isStringABoolean,fD as isTimeElapsed,fE as isValidVersion,cM as mapConditions,aO as mapDestinationFieldsForDisplay,H as mapExportedSignals,J as mapSupportedSignals,fF as numbersOnly,dX as parseBooleanFromString,fG as parseJsonStringToPrettyString,L as prepareDestinationFormData,fH as removeEmptyValuesFromObject,ao as safeJsonParse,fI as safeJsonStringify,fJ as setDeepValue,d0 as sleep,aS as splitCamelString,fK as stringifyNonStringValues,cD as trimVersion}from"./chunks/ui-components-B4LvruCJ.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-C150cdxb.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
1
+ export{dx as capitalizeFirstLetter,fq as cleanObjectEmptyStringsValues,x as compareCondition,ao as deepClone,d6 as entityIdKey,cO as filterActions,de as filterDestinations,aQ as filterDestinationsByStream,dd as filterSources,dc as filterSourcesByStream,fr as flattenObjectKeys,d8 as formatBytes,e5 as formatDuration,g as generateId,aM as getActionIcon,cI as getConditionsBooleans,d$ as getContainersIcons,e2 as getContainersInstrumentedCount,fs as getDeepValue,al as getDestinationIcon,ft as getDetectedLanguageIcons,cV as getEntityIcon,aH as getEntityId,d5 as getEntityIdKey,cQ as getEntityLabel,fu as getIdFromSseTarget,aW as getInstrumentationRuleIcon,fv as getMainContainerLanguage,dB as getMetricForEntity,fw as getMonitorIcon,fx as getPlatformIcon,fy as getPlatformLabel,_ as getProgrammingLanguageIcon,e7 as getRecursiveValues,d9 as getSourceLanguageIcons,fz as getSseTargetFromId,fA as getStatusColor,by as getStatusFromPodStatus,cM as getStatusIcon,dQ as getStatusTypeFromOdigosHealth,fB as getValueForRange,dJ as getVirtualServiceIcon,dG as getWorkloadId,aR as getYamlFieldsForDestination,dR as hasUnhealthyInstances,i as isEmpty,fC as isLegalK8sLabel,bi as isOverTime,dW as isStringABoolean,fD as isTimeElapsed,fE as isValidVersion,cL as mapConditions,aO as mapDestinationFieldsForDisplay,H as mapExportedSignals,J as mapSupportedSignals,fF as numbersOnly,dX as parseBooleanFromString,fG as parseJsonStringToPrettyString,L as prepareDestinationFormData,fH as removeEmptyValuesFromObject,ap as safeJsonParse,fI as safeJsonStringify,fJ as setDeepValue,c$ as sleep,aS as splitCamelString,fK as stringifyNonStringValues,cC as trimVersion}from"./chunks/ui-components-C7i9zbc-.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-C150cdxb.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
package/lib/hooks.js CHANGED
@@ -1 +1 @@
1
- export{cx as useActionFormData,fX as useBodyScroll,df as useClickNode,dH as useClickNotification,db as useContainerSize,u as useCopy,dq as useDataStreamFormData,dw as useDestinationFormData,aN as useGenericForm,dD as useInstrumentationRuleFormData,bg as useKeyDown,dk as useOnClickOutside,dg as usePopup,cb as useScrollTo,dp as useSessionStorage,dY as useSourceFormData,e0 as useSourceSelectionFormData,bh as useTimeAgo}from"./chunks/ui-components-B4LvruCJ.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-C150cdxb.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
1
+ export{cw as useActionFormData,fX as useBodyScroll,df as useClickNode,dH as useClickNotification,db as useContainerSize,u as useCopy,dq as useDataStreamFormData,dw as useDestinationFormData,aN as useGenericForm,dD as useInstrumentationRuleFormData,bg as useKeyDown,dk as useOnClickOutside,dg as usePopup,ca as useScrollTo,dp as useSessionStorage,dY as useSourceFormData,e0 as useSourceSelectionFormData,bh as useTimeAgo}from"./chunks/ui-components-C7i9zbc-.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-C150cdxb.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
@@ -1,8 +1,10 @@
1
1
  import { type FC } from 'react';
2
+ import { type DataCardProps } from '@/components/_v2';
2
3
  export interface YamlSectionCardProps {
3
4
  title?: string;
4
5
  yaml?: string | null;
5
6
  defaultOpen?: boolean;
6
7
  fullHeight?: boolean;
8
+ bgTint?: DataCardProps['bgTint'];
7
9
  }
8
10
  export declare const YamlSectionCard: FC<YamlSectionCardProps>;
@@ -1 +1 @@
1
- export{A as ActionType,bB as Actions,bG as ColoredSpan,eN as ColoredSpanVariant,bA as RichTitle}from"../chunks/ui-components-B4LvruCJ.js";export{C as CancelModal,i as DURATION_OPTIONS,f as DeleteModal,e as DurationErrorsSection,D as DynamicField,N as NOISY_PERCENTAGE_OPTIONS,h as OdigosLogoTextByTier,O as OperationSection,a as PERCENTAGE_OPTIONS,d as PercentageSection,P as PresetWithCustomInput,R as RuleInfoSection,b as SamplingPreviewSection,S as SignalsCheckboxList,c as SourceScopeSection,U as UpgradeModal,g as WIDE_DRAWER_WIDTH,W as WideDrawer}from"../chunks/index-BWi3du_1.js";export{Y as YamlSectionCard}from"../chunks/index-BYYemmZD.js";import"react/jsx-runtime";import"styled-components";import"../icons.js";import"zustand";import"react";import"javascript-time-ago";import"../chunks/vendor-C150cdxb.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
1
+ export{A as ActionType,bx as Actions,bG as ColoredSpan,eN as ColoredSpanVariant,bw as RichTitle}from"../chunks/ui-components-C7i9zbc-.js";export{C as CancelModal,i as DURATION_OPTIONS,f as DeleteModal,e as DurationErrorsSection,D as DynamicField,N as NOISY_PERCENTAGE_OPTIONS,h as OdigosLogoTextByTier,O as OperationSection,a as PERCENTAGE_OPTIONS,d as PercentageSection,P as PresetWithCustomInput,R as RuleInfoSection,b as SamplingPreviewSection,S as SignalsCheckboxList,c as SourceScopeSection,U as UpgradeModal,g as WIDE_DRAWER_WIDTH,W as WideDrawer}from"../chunks/index-C-Z4QHpA.js";export{Y as YamlSectionCard}from"../chunks/index-B0b5lJH3.js";import"react/jsx-runtime";import"styled-components";import"../icons.js";import"zustand";import"react";import"javascript-time-ago";import"../chunks/vendor-C150cdxb.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
package/lib/snippets.js CHANGED
@@ -1 +1 @@
1
- export{cm as AddButton,dS as CopyText,dM as EditButton,dL as Flow,f$ as MapItemNode,g0 as NoDataNode,du as NoteBackToSummary,dU as PodContainer,d_ as SourceContainer}from"./chunks/ui-components-B4LvruCJ.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-C150cdxb.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
1
+ export{cl as AddButton,dS as CopyText,dM as EditButton,dL as Flow,f$ as MapItemNode,g0 as NoDataNode,du as NoteBackToSummary,dU as PodContainer,d_ as SourceContainer}from"./chunks/ui-components-C7i9zbc-.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-C150cdxb.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
package/lib/store.js CHANGED
@@ -1 +1 @@
1
- export{aD as ProgressKeys,dK as useActiveNodeStore,e4 as useDarkMode,aP as useDataStreamStore,ct as useDrawerStore,ap as useEntityStore,cO as useFilterStore,cC as useModalStore,aT as useNotificationStore,aA as useProgressStore,d2 as useSelectedStore,dr as useSetupStore}from"./chunks/ui-components-B4LvruCJ.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-C150cdxb.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
1
+ export{aE as ProgressKeys,dK as useActiveNodeStore,e4 as useDarkMode,aP as useDataStreamStore,cs as useDrawerStore,aq as useEntityStore,cN as useFilterStore,cB as useModalStore,aT as useNotificationStore,aB as useProgressStore,d2 as useSelectedStore,dr as useSetupStore}from"./chunks/ui-components-C7i9zbc-.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-C150cdxb.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
package/lib/theme.js CHANGED
@@ -1 +1 @@
1
- export{fT as Provider,fU as animations,fV as opacity,fW as palettes}from"./chunks/ui-components-B4LvruCJ.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-C150cdxb.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
1
+ export{fT as Provider,fU as animations,fV as opacity,fW as palettes}from"./chunks/ui-components-C7i9zbc-.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-C150cdxb.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
@@ -232,6 +232,7 @@ export interface EffectiveConfig {
232
232
  } | null;
233
233
  rollout?: {
234
234
  automaticRolloutDisabled?: boolean | null;
235
+ maxConcurrentRollouts?: number | null;
235
236
  } | null;
236
237
  autoRollback?: {
237
238
  disabled?: boolean | null;
@@ -311,6 +312,23 @@ export interface EffectiveConfig {
311
312
  ui?: string | null;
312
313
  collector?: string | null;
313
314
  } | null;
315
+ sampling?: {
316
+ dryRun?: boolean | null;
317
+ spanSamplingAttributes?: {
318
+ disabled?: boolean | null;
319
+ samplingCategoryDisabled?: boolean | null;
320
+ traceDecidingRuleDisabled?: boolean | null;
321
+ spanDecisionAttributesDisabled?: boolean | null;
322
+ } | null;
323
+ tailSampling?: {
324
+ disabled?: boolean | null;
325
+ traceAggregationWaitDuration?: string | null;
326
+ } | null;
327
+ k8sHealthProbesSampling?: {
328
+ enabled?: boolean | null;
329
+ keepPercentage?: number | null;
330
+ } | null;
331
+ } | null;
314
332
  provenance?: ProvenanceEntry[] | null;
315
333
  manifestYAML?: string | null;
316
334
  }
@@ -385,6 +403,7 @@ export interface EffectiveConfigInput {
385
403
  } | null;
386
404
  rollout?: {
387
405
  automaticRolloutDisabled?: boolean | null;
406
+ maxConcurrentRollouts?: number | null;
388
407
  } | null;
389
408
  autoRollback?: {
390
409
  disabled?: boolean | null;
@@ -464,6 +483,23 @@ export interface EffectiveConfigInput {
464
483
  ui?: string | null;
465
484
  collector?: string | null;
466
485
  } | null;
486
+ sampling?: {
487
+ dryRun?: boolean | null;
488
+ spanSamplingAttributes?: {
489
+ disabled?: boolean | null;
490
+ samplingCategoryDisabled?: boolean | null;
491
+ traceDecidingRuleDisabled?: boolean | null;
492
+ spanDecisionAttributesDisabled?: boolean | null;
493
+ } | null;
494
+ tailSampling?: {
495
+ disabled?: boolean | null;
496
+ traceAggregationWaitDuration?: string | null;
497
+ } | null;
498
+ k8sHealthProbesSampling?: {
499
+ enabled?: boolean | null;
500
+ keepPercentage?: number | null;
501
+ } | null;
502
+ } | null;
467
503
  manifestYAML?: string | null;
468
504
  }
469
505
  export type GetEffectiveConfigFunc = (id: string) => Promise<EffectiveConfig | undefined>;
package/lib/types.js CHANGED
@@ -1 +1 @@
1
- export{f3 as ActionCategory,c as ActionKeyTypes,p as ActionType,f4 as AddNodeTypes,f5 as BooleanOperation,M as CodeAttributesKeyTypes,cB as Crud,V as CustomInstrumentationsKeyTypes,d4 as DesiredStateProgress,f6 as DestinationTypes,f7 as EdgeTypes,aC as EntityTypes,o as FieldTypes,R as GolangCustomProbe,P as HeadersCollectionKeyTypes,h as InputTypes,f8 as InstallationMethod,W as InstrumentationRuleType,f9 as IntrumentationStatus,U as JavaCustomProbe,fa as JsonOperation,K as K8sAttributesFrom,dZ as K8sResourceKind,fb as ListDirection,dI as NodeTypes,fc as NumberOperation,fd as OtelDistroName,dv as OtherEntityTypes,cL as OtherStatus,au as OtherStatusType,Q as PayloadCollectionKeyTypes,fe as PlatformType,ff as PodContainerLifecycleStatus,fg as PodContainerStatus,fh as PodPhase,fi as Profile,dO as ProgrammingLanguages,fj as SIGNAL_KEY_TO_TYPE,dy as SIGNAL_TYPE_TO_KEY,fk as SignalKey,G as SignalType,fl as SortDirection,E as StatusType,fm as StringOperation,av as Tier,bE as WorkloadRolloutStatus}from"./chunks/ui-components-B4LvruCJ.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-C150cdxb.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
1
+ export{f3 as ActionCategory,c as ActionKeyTypes,q as ActionType,f4 as AddNodeTypes,f5 as BooleanOperation,M as CodeAttributesKeyTypes,cA as Crud,V as CustomInstrumentationsKeyTypes,d4 as DesiredStateProgress,f6 as DestinationTypes,f7 as EdgeTypes,aD as EntityTypes,p as FieldTypes,R as GolangCustomProbe,P as HeadersCollectionKeyTypes,h as InputTypes,f8 as InstallationMethod,W as InstrumentationRuleType,f9 as IntrumentationStatus,U as JavaCustomProbe,fa as JsonOperation,K as K8sAttributesFrom,dZ as K8sResourceKind,fb as ListDirection,dI as NodeTypes,fc as NumberOperation,fd as OtelDistroName,dv as OtherEntityTypes,cK as OtherStatus,av as OtherStatusType,Q as PayloadCollectionKeyTypes,fe as PlatformType,ff as PodContainerLifecycleStatus,fg as PodContainerStatus,fh as PodPhase,fi as Profile,dO as ProgrammingLanguages,fj as SIGNAL_KEY_TO_TYPE,dy as SIGNAL_TYPE_TO_KEY,fk as SignalKey,G as SignalType,fl as SortDirection,E as StatusType,fm as StringOperation,aw as Tier,bA as WorkloadRolloutStatus}from"./chunks/ui-components-C7i9zbc-.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-C150cdxb.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
package/lib/visuals.js CHANGED
@@ -1 +1 @@
1
- export{fn as VISUAL_ODIGOS_LOGO_HEIGHT,fo as VISUAL_ODIGOS_LOGO_WIDTH,f2 as VisualGreenRings,fp as VisualOdigosLogo}from"./chunks/ui-components-B4LvruCJ.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-C150cdxb.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
1
+ export{fn as VISUAL_ODIGOS_LOGO_HEIGHT,fo as VISUAL_ODIGOS_LOGO_WIDTH,f2 as VisualGreenRings,fp as VisualOdigosLogo}from"./chunks/ui-components-C7i9zbc-.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-C150cdxb.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odigos/ui-kit",
3
- "version": "0.0.226",
3
+ "version": "0.0.227",
4
4
  "author": "Odigos",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,3 +0,0 @@
1
- import{jsx as t}from"react/jsx-runtime";import{useState as o,useMemo as e}from"react";import i from"styled-components";import{u as n,B as a,a as r,A as s,g as l,S as c,C as d,b as p,N as m}from"./ui-components-B4LvruCJ.js";import{VIcon as u,CopyIcon as f,ChevronUpIcon as h,ChevronDownIcon as y,YamlIcon as b}from"../icons.js";const g=i.div`
2
- padding: 0 12px;
3
- `,C=({title:i="YAML",yaml:C,defaultOpen:S,fullHeight:k})=>{const{clickCopy:v,isCopied:A}=n(),[Y,j]=o(S??!1),x=e(()=>C?[{id:l(),type:s.Button,buttonProps:{variant:r.Secondary,size:a.S,leftIcon:A?u:f,onClick:()=>v(C||""),disabled:A}},{id:l(),type:s.Button,buttonProps:{variant:r.Secondary,size:a.S,leftIcon:Y?h:y,onClick:()=>j(t=>!t)}}]:[],[C,A,Y]);return t(c,{richTitle:{icon:b,title:i},actions:x,fullHeight:k,children:Y&&t(g,{children:C?t(d,{code:C,language:"yaml",theme:"duotoneDark"}):t(p,{children:t(m,{title:"YAML not found",subTitle:"The YAML for this resource is not available"})})})})};export{C as Y};