@odigos/ui-kit 0.0.200 → 0.0.201
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/lib/chunks/index-Bi_rpSHV.js +3 -0
- package/lib/chunks/ui-components-BxG2GlHM.js +2382 -0
- package/lib/components/scroll-y/index.d.ts +1 -0
- package/lib/components/v2.js +1 -1
- package/lib/components.js +1 -1
- package/lib/constants.js +1 -1
- package/lib/containers/_v2/_drawers/add-source-drawer/index.d.ts +1 -2
- package/lib/containers/_v2/_forms/add-action-form/custom-fields/url-templatization/index.d.ts +5 -0
- package/lib/containers/action-form/custom-fields/url-templatization.d.ts +5 -0
- package/lib/containers/data-flow/column/namespace-divider.d.ts +7 -0
- package/lib/containers/data-flow/column/source-visual-state.d.ts +9 -0
- package/lib/containers/v2.js +26 -26
- package/lib/containers.js +150 -115
- package/lib/contexts.js +1 -1
- package/lib/functions/get-containers-icons/index.d.ts +3 -1
- package/lib/functions.js +1 -1
- package/lib/hooks.js +1 -1
- package/lib/snippets.js +1 -1
- package/lib/store.js +1 -1
- package/lib/theme.js +1 -1
- package/lib/types/actions/index.d.ts +25 -2
- package/lib/types/sources/index.d.ts +1 -0
- package/lib/types.js +1 -1
- package/lib/visuals.js +1 -1
- package/package.json +1 -1
- package/lib/chunks/index-COFnKh_j.js +0 -3
- package/lib/chunks/ui-components-Bw_jKy4u.js +0 -2382
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,
|
|
1
|
+
import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import{useState as n,useEffect as a,Fragment as o,forwardRef as r,useRef as l,useImperativeHandle as s,useMemo as c,useCallback as d,Children as u}from"react";import p,{css as h,useTheme as m}from"styled-components";import{a5 as g,aO as y,l as v,K as f,A as b,aP as x,aQ as $,aR as S,aS as C,c as k,i as w,aT as T,aU as D,aV as N,aW as E,D as A,F,g as O,aX as I,aY as R,k as M,aZ as K,a1 as L,a_ as P,a$ as j,b0 as z,b1 as q,b2 as B,b3 as H,an as V,aA as W,b4 as _,b5 as U,b6 as J,ak as G,ar as Y,b7 as X,b8 as Z,b9 as Q,ba as ee,bb as te,bc as ie,bd as ne,be as ae,bf as oe,bg as re,bh as le,s as se,a6 as ce,bi as de,bj as ue,bk as pe,bl as he,bm as me,bn as ge,O as ye,bo as ve,bp as fe,bq as be,br as xe,bs as $e,bt as Se,bu as Ce,bv as ke,bw as we,bx as Te,by as De,bz as Ne,n as Ee,bA as Ae,bB as Fe,bC as Oe,bD as Ie,aG as Re,bE as Me,bF as Ke,bG as Le,bH as Pe,av as je,S as ze,H as qe,bI as Be,bJ as He,ab as Ve,bK as We,ai as _e,al as Ue,bL as Je,ad as Ge,bM as Ye,bN as Xe,bO as Ze,bP as Qe,bQ as et,bR as tt,bS as it,bT as nt,bU as at,bV as ot,bW as rt,bX as lt,bY as st,$ as ct,M as dt,bZ as ut,b_ as pt,b$ as ht,c0 as mt,aj as gt,c1 as yt,c2 as vt,c3 as ft,c4 as bt,x as xt,z as $t,G as St,c5 as Ct,c6 as kt,c7 as wt,E as Tt,aa as Dt,a9 as Nt,m as Et,c8 as At,c9 as Ft,ca as Ot,cb as It,P as Rt,X as Mt,Y as Kt,U as Lt,J as Pt,Q as jt,Z as zt,cc as qt,a0 as Bt,cd as Ht,ce as Vt,ae as Wt,cf as _t,cg as Ut,ch as Jt,ci as Gt,ao as Yt,cj as Xt,ck as Zt,cl as Qt,cm as ei,cn as ti,co as ii,cp as ni,cq as ai,cr as oi,cs as ri,ct as li,ax as si,cu as ci,cv as di,cw as ui,cx as pi,cy as hi,cz as mi,cA as gi,cB as yi,cC as vi,ap as fi,am as bi,a4 as xi,a8 as $i,cD as Si,cE as Ci,cF as ki,cG as wi,cH as Ti,cI as Di}from"./chunks/ui-components-BxG2GlHM.js";import{TrashIcon as Ni,VSquareIcon as Ei,XSquareIcon as Ai,EditIcon as Fi,OdigosLogoText as Oi,PlusIcon as Ii,RefreshIcon as Ri,SearchIcon as Mi,FilterIcon as Ki,DataStreamIcon as Li,VIcon as Pi,OdigosLogo as ji,ArrowIcon as zi,RefreshLeftArrowIcon as qi,NotificationIcon as Bi,UserIcon as Hi,ImageErrorIcon as Vi,OverviewIcon as Wi,SourceIcon as _i,DestinationIcon as Ui,InstrumentationRuleIcon as Ji,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-Bi_rpSHV.js";import"zustand";import"javascript-time-ago";import"./chunks/vendor-DUWBN0Mg.js";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";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:b,piiCategories:x,fallbackSamplingRatio:$,samplingPercentage:S,endpointsFilters:C,servicesNameFilters:k,attributeFilters:w,urlTemplatizationRulesGroups:T}}=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||f.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||f.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(b||{});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($)}),t===v.ProbabilisticSampler&&D.push({title:"Sampling Percentage",value:String(S)}),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&&k?.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"+(k.length>1?` #${n+1}`:""),value:a})}),t===v.SpanAttributeSampler&&w?.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"+(w.length>1?` #${a+1}`:""),value:o})}),t===v.URLTemplatization&&T?.forEach((e,t)=>{let i="";e.filterK8sNamespace&&(i+=`Namespace: ${e.filterK8sNamespace}\n`),e.workloadFilters?.length&&e.workloadFilters.forEach(e=>{const t=[e.kind,e.name].filter(Boolean).join("/");t&&(i+=`Workload: ${t}\n`)});const n=e.templatizationRules?.map(e=>e.template).filter(Boolean).join(", ");i+=`Templates: ${n}`,e.notes&&(i+=`\nNotes: ${e.notes}`),D.push({title:"Group"+(T.length>1?` #${t+1}`:""),value:i})}),D},sn=b.PiiCategories,cn=p.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: row;
|
|
4
4
|
gap: 32px;
|
|
@@ -7,45 +7,45 @@ import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import{useState
|
|
|
7
7
|
border-radius: 32px;
|
|
8
8
|
padding: 8px;
|
|
9
9
|
`}
|
|
10
|
-
`,dn=[{id:"CREDIT_CARD",label:"Credit Card"}],un=f.FallbackSamplingRatio,pn=[{value:b.Pod,id:b.Pod},{value:b.Namespace,id:b.Namespace},{value:b.Node,id:b.Node}],hn=[{title:"Label Key",keyName:"labelKey",placeholder:"app.kubernetes.io/name",required:!0},{title:"Attribute Key",keyName:"attributeKey",placeholder:"app.kubernetes.name",required:!0},{title:"From Sources",keyName:"fromSources",placeholder:"pod, namespace",componentType:"multi-dropdown",options:pn,required:!0,tooltip:"Select multiple sources. Higher precedence sources (pod > namespace > node) will override lower ones."}],mn=[{title:"Annotation Key",keyName:"annotationKey",placeholder:"kubectl.kubernetes.io/restartedAt",required:!0},{title:"Attribute Key",keyName:"attributeKey",placeholder:"kubectl.kubernetes.restartedAt",required:!0},{title:"From Sources",keyName:"fromSources",placeholder:"pod, namespace",componentType:"multi-dropdown",options:pn,required:!1,tooltip:"Select multiple sources. Higher precedence sources (pod > namespace > node) will override lower ones."}],gn=f.EndpointsFilters,yn=[{title:"Service",keyName:"serviceName",placeholder:"e.g. my-service",tooltip:"Service name: The rule applies to a specific service name. Only traces originating from this service’s root span will be considered.",required:!0},{title:"HTTP route",keyName:"httpRoute",placeholder:"e.g. /api/v1/users",tooltip:"HTTP route: The specific HTTP route prefix to match for sampling. Only traces with routes beginning with this prefix will be considered. For instance, configuring /buy will also match /buy/product.",required:!0},{title:"Threshold",keyName:"minimumLatencyThreshold",placeholder:"e.g. 1000",tooltip:"Minimum latency threshold (ms): Specifies the minimum latency in milliseconds; traces with latency below this threshold are ignored.",required:!0,type:k.Number},{title:"Fallback",keyName:"fallbackSamplingRatio",placeholder:"e.g. 100",tooltip:"Fallback sampling ratio: Specifies the percentage of traces that meet the service/http_route filter but fall below the threshold that you still want to retain. For example, if a rule is set for service A and http_route B with a minimum latency threshold of 1 second, you might still want to keep some traces below this threshold. Setting the ratio to 20% ensures that 20% of these traces will be retained.",required:!0,type:k.Number}],vn=f.AttributeNamesToDelete,bn=f.Renames,fn=f.ServicesNameFilters,xn=[{title:"Service Name",keyName:"serviceName",placeholder:"e.g. my-service",tooltip:"Specifies the service name to search within the trace (Across all available spans).",required:!0},{title:"Sampling Ratio",keyName:"samplingRatio",placeholder:"e.g. 10",tooltip:"Specifies the sample rate for all traces.",required:!0,type:k.Number},{title:"Fallback Sampling Ratio",keyName:"fallbackSamplingRatio",placeholder:"e.g. 100",tooltip:"Specifies the percentage of traces that don’t meet the service name filter and that you still like to retain.",required:!0,type:k.Number}],$n=f.SamplingPercentage,Sn=f.AttributeFilters,Cn=[{title:"Service Name",keyName:"serviceName",placeholder:"e.g. my-service",tooltip:"Specifies the service name to search within the trace (across all available spans).",required:!0},{title:"Attribute Key",keyName:"attributeKey",placeholder:"e.g. http.request.method",tooltip:"Specifies the attribute key inside of the span.",required:!0},{title:"Fallback Sampling Ratio",keyName:"fallbackSamplingRatio",placeholder:"e.g. 100",tooltip:"Specifies the percentage of traces that don’t meet the service name filter and that you still like to retain.",required:!0,type:k.Number},{title:"Condition",keyName:"condition",tooltip:"An object representing the filters for span attributes filters.",required:!0,componentType:F.Dropdown,options:[{id:"stringCondition",value:"String Condition"},{id:"numberCondition",value:"Number Condition"},{id:"booleanCondition",value:"Boolean Condition"},{id:"jsonCondition",value:"JSON Condition"}]},{title:"Operation",keyName:"operation",tooltip:"Specifies the operation to run against the attribute.",required:!0,componentType:F.Dropdown,options:[{id:"exists",value:"Exists"},{id:"equals",value:"Equals"},{id:"not_equals",value:"Not Equals"},{id:"contains",value:"Contains"},{id:"not_contains",value:"Not Contains"},{id:"regex",value:"Regex"},{id:"greater_than",value:"Greater Than"},{id:"less_than",value:"Less Than"},{id:"greater_than_or_equal",value:"Greater Than Or Equal"},{id:"less_than_or_equal",value:"Less Than Or Equal"},{id:"is_valid_json",value:"Is Valid JSON"},{id:"is_invalid_json",value:"Is Invalid JSON"},{id:"jsonpath_exists",value:"JSON Path Exists"},{id:"key_equals",value:"Key Equals"},{id:"key_not_equals",value:"Key Not Equals"}]},{title:"Expected Value",keyName:"expectedValue",placeholder:"e.g. GET",tooltip:"The values to test the attribute against.",required:!0},{title:"JSON Path",keyName:"jsonPath",placeholder:"e.g. $.user.role",tooltip:"An expression used to navigate the JSON structure.",required:!1,renderCondition:e=>"jsonCondition"===e.condition}],kn={[v.K8sAttributes]:({value:n,setValue:o,formErrors:r})=>(a(()=>{n[f.CollectContainerAttributes]||n[f.CollectReplicaSetAttributes]||n[f.CollectWorkloadId]||n[f.CollectClusterId]||n[f.LabelsAttributes]?.length||n[f.AnnotationsAttributes]?.length||(o(f.CollectContainerAttributes,!0),o(f.CollectReplicaSetAttributes,!0),o(f.CollectWorkloadId,!0),o(f.CollectClusterId,!0),o(f.LabelsAttributes,[]),o(f.AnnotationsAttributes,[]))},[]),e(i,{children:[t($,{title:"Collect Container Attributes",value:n[f.CollectContainerAttributes]||!1,onChange:e=>o(f.CollectContainerAttributes,e),errorMessage:r[f.CollectContainerAttributes]}),t($,{title:"Collect ReplicaSet Attributes",value:n[f.CollectReplicaSetAttributes]||!1,onChange:e=>o(f.CollectReplicaSetAttributes,e),errorMessage:r[f.CollectReplicaSetAttributes]}),t($,{title:"Collect Workload ID",value:n[f.CollectWorkloadId]||!1,onChange:e=>o(f.CollectWorkloadId,e),errorMessage:r[f.CollectWorkloadId]}),t($,{title:"Collect Cluster ID",value:n[f.CollectClusterId]||!1,onChange:e=>o(f.CollectClusterId,e),errorMessage:r[f.CollectClusterId]}),t(D,{columns:hn,value:n[f.LabelsAttributes]||[],onChange:e=>o(f.LabelsAttributes,e),errorMessage:r[f.LabelsAttributes]}),t(D,{columns:mn,value:n[f.AnnotationsAttributes]||[],onChange:e=>o(f.AnnotationsAttributes,e),errorMessage:r[f.AnnotationsAttributes]})]})),[v.AddClusterInfo]:({value:n,setValue:a,formErrors:o})=>e(i,{children:[t(T,{title:"Overwrite Existing Values",tooltip:"If enabled, the resource attributes will overwrite any existing attributes with the same name.",initialValue:n[f.OverwriteExistingValues]||!1,onChange:e=>a(f.OverwriteExistingValues,e)}),t(N,{title:"Resource Attributes",value:n[f.ClusterAttributes]?.map(e=>({key:e.attributeName,value:e.attributeStringValue}))||[],onChange:e=>a(f.ClusterAttributes,e.map(e=>({attributeName:e.key,attributeStringValue:e.value}))),required:!0,errorMessage:o[f.ClusterAttributes]})]}),[v.DeleteAttributes]:({value:e,setValue:i,formErrors:n})=>{const a=n[vn],o=e[vn]||[];return t(E,{title:"Attributes to delete",value:o,onChange:e=>i(vn,e),required:!0,errorMessage:a})},[v.RenameAttributes]:({value:e,setValue:i,formErrors:n})=>{const a=n[bn],o=Object.entries(e[bn]||{}).map(([e,t])=>({key:e,value:t}));return t(N,{title:"Attributes to rename",value:o,onChange:e=>{const t={};e.forEach(e=>t[e.key]=e.value),i(bn,t)},required:!0,errorMessage:a})},[v.PiiMasking]:({value:i,setValue:o,formErrors:r})=>{const l=r[sn],s=i[sn]||[],[c,d]=n(1===s.length);return a(()=>{if(!s.length){const e=dn.map(({id:e})=>e);o(sn,e),d(1===dn.length)}},[]),e("div",{children:[t(x,{title:"Attributes to mask",required:!0}),t(cn,{$hasError:!!l,children:dn.map(({id:e,label:i})=>t($,{title:i,disabled:c&&s.includes(e),value:s.includes(e),onChange:t=>((e,t)=>{const i=t?[...s,e]:s.filter(t=>t!==e);o(sn,i),d(1===i.length)})(e,t)},e))}),!!l&&t(S,{children:l})]})},[v.ErrorSampler]:({value:e,setValue:i,formErrors:n})=>{const a=n[un],o=e[un];return t(C,{title:"Fallback sampling ratio",required:!0,type:k.Number,min:0,max:100,value:w(o)?"":String(o),onChange:({target:{value:e}})=>{return t=e,i(un,Math.max(0,Math.min(Number(t),100))||0);var t},errorMessage:a})},[v.ProbabilisticSampler]:({value:e,setValue:i,formErrors:n})=>{const a=n[$n],o=e[$n];return t(C,{title:"Sampling percentage",required:!0,type:k.Number,min:0,max:100,value:w(o)?"":String(o),onChange:({target:{value:e}})=>{return t=e,i($n,Math.max(0,Math.min(Number(t),100))||0);var t},errorMessage:a})},[v.LatencySampler]:({value:e,setValue:i,formErrors:n})=>{const a=n[gn],o=e[gn]||[];return t(D,{columns:yn,value:o,onChange:e=>{const t=e.map(({serviceName:e,httpRoute:t,minimumLatencyThreshold:i,fallbackSamplingRatio:n})=>({serviceName:e,httpRoute:t,minimumLatencyThreshold:Number(i),fallbackSamplingRatio:Number(n)}));i(gn,t)},errorMessage:a})},[v.ServiceNameSampler]:({value:e,setValue:i,formErrors:n})=>{const a=n[fn],o=e[fn]||[];return t(D,{columns:xn,value:o,onChange:e=>{const t=e.map(({serviceName:e,samplingRatio:t,fallbackSamplingRatio:i})=>({serviceName:e,samplingRatio:Number(t),fallbackSamplingRatio:Number(i)}));i(fn,t)},errorMessage:a})},[v.SpanAttributeSampler]:({value:e,setValue:i,formErrors:n})=>{const a=n[Sn],o=(e[Sn]||[]).map(({serviceName:e,attributeKey:t,fallbackSamplingRatio:i,condition:n})=>{const a=Object.entries(n).filter(([e,t])=>t)[0][0];return{serviceName:e,attributeKey:t,fallbackSamplingRatio:i,condition:a,operation:n[a]?.operation,expectedValue:n[a]?.expectedValue,jsonPath:n[a]?.jsonPath}});return t(D,{columns:Cn,value:o,onChange:e=>{const t=e.map(({serviceName:e,attributeKey:t,fallbackSamplingRatio:i,condition:n,operation:a,expectedValue:o,jsonPath:r})=>{const l={serviceName:e,attributeKey:t,fallbackSamplingRatio:Number(i),condition:{[n]:{operation:a,expectedValue:o}}};return r&&(l.condition[n].jsonPath=r),l});i(Sn,t)},errorMessage:a,limitFieldsPerRow:3})}},wn=({actionType:e,value:i,setValue:n,formErrors:a})=>{if(!e)return null;const o=kn[e];return o?t(o,{value:i,setValue:n,formErrors:a}):null},Dn=p.div`
|
|
10
|
+
`,dn=[{id:"CREDIT_CARD",label:"Credit Card"}],un=b.FallbackSamplingRatio,pn=[{value:f.Pod,id:f.Pod},{value:f.Namespace,id:f.Namespace},{value:f.Node,id:f.Node}],hn=[{title:"Label Key",keyName:"labelKey",placeholder:"app.kubernetes.io/name",required:!0},{title:"Attribute Key",keyName:"attributeKey",placeholder:"app.kubernetes.name",required:!0},{title:"From Sources",keyName:"fromSources",placeholder:"pod, namespace",componentType:"multi-dropdown",options:pn,required:!0,tooltip:"Select multiple sources. Higher precedence sources (pod > namespace > node) will override lower ones."}],mn=[{title:"Annotation Key",keyName:"annotationKey",placeholder:"kubectl.kubernetes.io/restartedAt",required:!0},{title:"Attribute Key",keyName:"attributeKey",placeholder:"kubectl.kubernetes.restartedAt",required:!0},{title:"From Sources",keyName:"fromSources",placeholder:"pod, namespace",componentType:"multi-dropdown",options:pn,required:!1,tooltip:"Select multiple sources. Higher precedence sources (pod > namespace > node) will override lower ones."}],gn=b.EndpointsFilters,yn=[{title:"Service",keyName:"serviceName",placeholder:"e.g. my-service",tooltip:"Service name: The rule applies to a specific service name. Only traces originating from this service’s root span will be considered.",required:!0},{title:"HTTP route",keyName:"httpRoute",placeholder:"e.g. /api/v1/users",tooltip:"HTTP route: The specific HTTP route prefix to match for sampling. Only traces with routes beginning with this prefix will be considered. For instance, configuring /buy will also match /buy/product.",required:!0},{title:"Threshold",keyName:"minimumLatencyThreshold",placeholder:"e.g. 1000",tooltip:"Minimum latency threshold (ms): Specifies the minimum latency in milliseconds; traces with latency below this threshold are ignored.",required:!0,type:k.Number},{title:"Fallback",keyName:"fallbackSamplingRatio",placeholder:"e.g. 100",tooltip:"Fallback sampling ratio: Specifies the percentage of traces that meet the service/http_route filter but fall below the threshold that you still want to retain. For example, if a rule is set for service A and http_route B with a minimum latency threshold of 1 second, you might still want to keep some traces below this threshold. Setting the ratio to 20% ensures that 20% of these traces will be retained.",required:!0,type:k.Number}],vn=b.AttributeNamesToDelete,fn=b.Renames,bn=b.UrlTemplatizationRulesGroups,xn=[{keyName:"kind",title:"Kind",placeholder:"Any kind",componentType:"dropdown",options:[{id:"Deployment",value:"Deployment"},{id:"StatefulSet",value:"StatefulSet"},{id:"DaemonSet",value:"DaemonSet"}]},{keyName:"name",title:"Name",placeholder:"Any name"}],$n=b.ServicesNameFilters,Sn=[{title:"Service Name",keyName:"serviceName",placeholder:"e.g. my-service",tooltip:"Specifies the service name to search within the trace (Across all available spans).",required:!0},{title:"Sampling Ratio",keyName:"samplingRatio",placeholder:"e.g. 10",tooltip:"Specifies the sample rate for all traces.",required:!0,type:k.Number},{title:"Fallback Sampling Ratio",keyName:"fallbackSamplingRatio",placeholder:"e.g. 100",tooltip:"Specifies the percentage of traces that don’t meet the service name filter and that you still like to retain.",required:!0,type:k.Number}],Cn=b.SamplingPercentage,kn=b.AttributeFilters,wn=[{title:"Service Name",keyName:"serviceName",placeholder:"e.g. my-service",tooltip:"Specifies the service name to search within the trace (across all available spans).",required:!0},{title:"Attribute Key",keyName:"attributeKey",placeholder:"e.g. http.request.method",tooltip:"Specifies the attribute key inside of the span.",required:!0},{title:"Fallback Sampling Ratio",keyName:"fallbackSamplingRatio",placeholder:"e.g. 100",tooltip:"Specifies the percentage of traces that don’t meet the service name filter and that you still like to retain.",required:!0,type:k.Number},{title:"Condition",keyName:"condition",tooltip:"An object representing the filters for span attributes filters.",required:!0,componentType:M.Dropdown,options:[{id:"stringCondition",value:"String Condition"},{id:"numberCondition",value:"Number Condition"},{id:"booleanCondition",value:"Boolean Condition"},{id:"jsonCondition",value:"JSON Condition"}]},{title:"Operation",keyName:"operation",tooltip:"Specifies the operation to run against the attribute.",required:!0,componentType:M.Dropdown,options:[{id:"exists",value:"Exists"},{id:"equals",value:"Equals"},{id:"not_equals",value:"Not Equals"},{id:"contains",value:"Contains"},{id:"not_contains",value:"Not Contains"},{id:"regex",value:"Regex"},{id:"greater_than",value:"Greater Than"},{id:"less_than",value:"Less Than"},{id:"greater_than_or_equal",value:"Greater Than Or Equal"},{id:"less_than_or_equal",value:"Less Than Or Equal"},{id:"is_valid_json",value:"Is Valid JSON"},{id:"is_invalid_json",value:"Is Invalid JSON"},{id:"jsonpath_exists",value:"JSON Path Exists"},{id:"key_equals",value:"Key Equals"},{id:"key_not_equals",value:"Key Not Equals"}]},{title:"Expected Value",keyName:"expectedValue",placeholder:"e.g. GET",tooltip:"The values to test the attribute against.",required:!0},{title:"JSON Path",keyName:"jsonPath",placeholder:"e.g. $.user.role",tooltip:"An expression used to navigate the JSON structure.",required:!1,renderCondition:e=>"jsonCondition"===e.condition}],Tn={[v.K8sAttributes]:({value:n,setValue:o,formErrors:r})=>(a(()=>{n[b.CollectContainerAttributes]||n[b.CollectReplicaSetAttributes]||n[b.CollectWorkloadId]||n[b.CollectClusterId]||n[b.LabelsAttributes]?.length||n[b.AnnotationsAttributes]?.length||(o(b.CollectContainerAttributes,!0),o(b.CollectReplicaSetAttributes,!0),o(b.CollectWorkloadId,!0),o(b.CollectClusterId,!0),o(b.LabelsAttributes,[]),o(b.AnnotationsAttributes,[]))},[]),e(i,{children:[t($,{title:"Collect Container Attributes",value:n[b.CollectContainerAttributes]||!1,onChange:e=>o(b.CollectContainerAttributes,e),errorMessage:r[b.CollectContainerAttributes]}),t($,{title:"Collect ReplicaSet Attributes",value:n[b.CollectReplicaSetAttributes]||!1,onChange:e=>o(b.CollectReplicaSetAttributes,e),errorMessage:r[b.CollectReplicaSetAttributes]}),t($,{title:"Collect Workload ID",value:n[b.CollectWorkloadId]||!1,onChange:e=>o(b.CollectWorkloadId,e),errorMessage:r[b.CollectWorkloadId]}),t($,{title:"Collect Cluster ID",value:n[b.CollectClusterId]||!1,onChange:e=>o(b.CollectClusterId,e),errorMessage:r[b.CollectClusterId]}),t(T,{columns:hn,value:n[b.LabelsAttributes]||[],onChange:e=>o(b.LabelsAttributes,e),errorMessage:r[b.LabelsAttributes]}),t(T,{columns:mn,value:n[b.AnnotationsAttributes]||[],onChange:e=>o(b.AnnotationsAttributes,e),errorMessage:r[b.AnnotationsAttributes]})]})),[v.AddClusterInfo]:({value:n,setValue:a,formErrors:o})=>e(i,{children:[t(D,{title:"Overwrite Existing Values",tooltip:"If enabled, the resource attributes will overwrite any existing attributes with the same name.",initialValue:n[b.OverwriteExistingValues]||!1,onChange:e=>a(b.OverwriteExistingValues,e)}),t(N,{title:"Resource Attributes",value:n[b.ClusterAttributes]?.map(e=>({key:e.attributeName,value:e.attributeStringValue}))||[],onChange:e=>a(b.ClusterAttributes,e.map(e=>({attributeName:e.key,attributeStringValue:e.value}))),required:!0,errorMessage:o[b.ClusterAttributes]})]}),[v.DeleteAttributes]:({value:e,setValue:i,formErrors:n})=>{const a=n[vn],o=e[vn]||[];return t(E,{title:"Attributes to delete",value:o,onChange:e=>i(vn,e),required:!0,errorMessage:a})},[v.RenameAttributes]:({value:e,setValue:i,formErrors:n})=>{const a=n[fn],o=Object.entries(e[fn]||{}).map(([e,t])=>({key:e,value:t}));return t(N,{title:"Attributes to rename",value:o,onChange:e=>{const t={};e.forEach(e=>t[e.key]=e.value),i(fn,t)},required:!0,errorMessage:a})},[v.PiiMasking]:({value:i,setValue:o,formErrors:r})=>{const l=r[sn],s=i[sn]||[],[c,d]=n(1===s.length);return a(()=>{if(!s.length){const e=dn.map(({id:e})=>e);o(sn,e),d(1===dn.length)}},[]),e("div",{children:[t(x,{title:"Attributes to mask",required:!0}),t(cn,{$hasError:!!l,children:dn.map(({id:e,label:i})=>t($,{title:i,disabled:c&&s.includes(e),value:s.includes(e),onChange:t=>((e,t)=>{const i=t?[...s,e]:s.filter(t=>t!==e);o(sn,i),d(1===i.length)})(e,t)},e))}),!!l&&t(S,{children:l})]})},[v.ErrorSampler]:({value:e,setValue:i,formErrors:n})=>{const a=n[un],o=e[un];return t(C,{title:"Fallback sampling ratio",required:!0,type:k.Number,min:0,max:100,value:w(o)?"":String(o),onChange:({target:{value:e}})=>{return t=e,i(un,Math.max(0,Math.min(Number(t),100))||0);var t},errorMessage:a})},[v.ProbabilisticSampler]:({value:e,setValue:i,formErrors:n})=>{const a=n[Cn],o=e[Cn];return t(C,{title:"Sampling percentage",required:!0,type:k.Number,min:0,max:100,value:w(o)?"":String(o),onChange:({target:{value:e}})=>{return t=e,i(Cn,Math.max(0,Math.min(Number(t),100))||0);var t},errorMessage:a})},[v.LatencySampler]:({value:e,setValue:i,formErrors:n})=>{const a=n[gn],o=e[gn]||[];return t(T,{columns:yn,value:o,onChange:e=>{const t=e.map(({serviceName:e,httpRoute:t,minimumLatencyThreshold:i,fallbackSamplingRatio:n})=>({serviceName:e,httpRoute:t,minimumLatencyThreshold:Number(i),fallbackSamplingRatio:Number(n)}));i(gn,t)},errorMessage:a})},[v.ServiceNameSampler]:({value:e,setValue:i,formErrors:n})=>{const a=n[$n],o=e[$n]||[];return t(T,{columns:Sn,value:o,onChange:e=>{const t=e.map(({serviceName:e,samplingRatio:t,fallbackSamplingRatio:i})=>({serviceName:e,samplingRatio:Number(t),fallbackSamplingRatio:Number(i)}));i($n,t)},errorMessage:a})},[v.SpanAttributeSampler]:({value:e,setValue:i,formErrors:n})=>{const a=n[kn],o=(e[kn]||[]).map(({serviceName:e,attributeKey:t,fallbackSamplingRatio:i,condition:n})=>{const a=Object.entries(n).filter(([e,t])=>t)[0][0];return{serviceName:e,attributeKey:t,fallbackSamplingRatio:i,condition:a,operation:n[a]?.operation,expectedValue:n[a]?.expectedValue,jsonPath:n[a]?.jsonPath}});return t(T,{columns:wn,value:o,onChange:e=>{const t=e.map(({serviceName:e,attributeKey:t,fallbackSamplingRatio:i,condition:n,operation:a,expectedValue:o,jsonPath:r})=>{const l={serviceName:e,attributeKey:t,fallbackSamplingRatio:Number(i),condition:{[n]:{operation:a,expectedValue:o}}};return r&&(l.condition[n].jsonPath=r),l});i(kn,t)},errorMessage:a,limitFieldsPerRow:3})},[v.URLTemplatization]:({value:n,setValue:a,formErrors:r})=>{const l=r[bn],s=n[bn]||[{filterK8sNamespace:"",workloadFilters:[],templatizationRules:[{template:""}],notes:""}],c=e=>a(bn,e),d=(e,t)=>c(s.map((i,n)=>n===e?{...i,...t}:i));return e(i,{children:[s.map((i,n)=>e(o,{children:[t(A,{}),e(F,{$gap:12,children:[e(O,{$justifyContent:"space-between",$alignItems:"center",children:[t(x,{title:`Rule Group ${n+1}`}),s.length>1&&t(I,{size:30,onClick:()=>{return e=n,c(s.filter((t,i)=>i!==e));var e},children:t(Ni,{})})]}),t(C,{title:"Namespace",placeholder:"All namespaces",tooltip:"Filter rules to a specific Kubernetes namespace.",value:i.filterK8sNamespace||"",onChange:e=>d(n,{filterK8sNamespace:e.target.value})}),t(T,{title:"Workload Filters",columns:xn,value:i.workloadFilters||[],onChange:e=>d(n,{workloadFilters:e})}),t(E,{title:"Templates",required:!0,value:i.templatizationRules.map(e=>e.template),onChange:e=>d(n,{templatizationRules:e.map(e=>({template:e}))})})]}),!!l&&t(S,{children:l})]},`url-templatization-group-${n}`)),t(R,{label:"Add Rule Group",onClick:()=>c([...s,{filterK8sNamespace:"",workloadFilters:[],templatizationRules:[{template:""}],notes:""}])}),t(A,{})]})}},Dn=({actionType:e,value:i,setValue:n,formErrors:a})=>{if(!e)return null;const o=Tn[e];return o?t(o,{value:i,setValue:n,formErrors:a}):null},Nn=p.div`
|
|
11
11
|
display: flex;
|
|
12
12
|
flex-direction: column;
|
|
13
13
|
gap: 24px;
|
|
14
14
|
padding: 4px;
|
|
15
|
-
`,
|
|
15
|
+
`,En=p(B)`
|
|
16
16
|
margin-bottom: 12px;
|
|
17
|
-
`,
|
|
17
|
+
`,An=({isUpdate:i,action:n,formData:a,formErrors:o,handleFormChange:r})=>{const l=m();return e(Nn,{children:[i&&e("div",{children:[t(En,{children:"Status"}),t(K,{options:[{icon:Ei,label:g.ENABLED,value:!1,selectedBgColor:l.text.success+L["050"]},{icon:Ai,label:g.DISABLED,value:!0,selectedBgColor:l.text.error+L["050"]}],selected:a.disabled,setSelected:e=>r("disabled",e)})]}),!i&&t(P,{title:"",description:n.docsDescription,actionButton:t(j,{endpoint:n.docsEndpoint})}),t(z,{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(Dn,{actionType:n.type,value:a.fields,setValue:(e,t)=>r(`fields.${e}`,t),formErrors:o}),t(q,{title:"Notes",value:a.notes||"",onChange:({target:{value:e}})=>r("notes",e),errorMessage:o.notes})]})},Fn=r(({children:a,width:o=640,title:r,titleTooltip:c,hideEditTitleFromEdit:d,icons:u,iconSrcs:p,isEdit:h=!1,isFormDirty:g=!1,isLastItem:y=!1,onClose:v,onEdit:f,onSave:b,onDelete:x,onCancel:$,tabs:S,headerActionButtons:C},k)=>{const w=m(),{drawerType:T,setDrawerType:D,setDrawerEntityId:N}=H();V({key:"Enter",active:h},()=>z());const[E,A]=n(!1),[F,O]=n(!1),I=l(null),R=T===G.Source,M=()=>{A(!1),O(!1)},K=()=>{M(),f&&f(!1),D(null),N(null),v?.()};s(k,()=>({closeDrawer:K}));const L=()=>{I.current?.clearTitle(),$&&$(),M()},P=()=>{const e=I.current?.isTitleDirty();g||e?O(!0):L()},j=()=>{A(!0)},z=()=>{b&&b(I.current?.getTitle()||"")},q=C||[];return f&&!h&&q.push({"data-id":"drawer-edit",variant:"tertiary",onClick:()=>f(!0),children:e(i,{children:[t(Fi,{}),t(B,{size:14,family:"secondary",decoration:"underline",children:"Edit"})]})}),x&&!h&&q.push({"data-id":"drawer-delete",variant:"tertiary",onClick:j,children:e(i,{children:[t(Ni,{}),t(B,{color:w.text.error,size:14,family:"secondary",decoration:"underline",children:R?W.UNINSTRUMENT:W.DELETE})]})}),e(i,{children:[t(_,{isOpen:!0,onClose:h?P:K,closeOnEscape:!E&&!F,width:`${o+64}px`,header:{icons:u,iconSrcs:p,title:r,titleTooltip:c,replaceTitleWith:!d&&h?t(On,{ref:I,title:r}):void 0,actionButtons:q,tabs:S},footer:{isOpen:h,leftButtons:[{"data-id":"drawer-save",variant:"primary",onClick:z,children:W.SAVE},{"data-id":"drawer-cancel",variant:"secondary",onClick:P,children:W.CANCEL}],rightButtons:x?[{"data-id":"drawer-delete",variant:"tertiary",onClick:j,children:e(i,{children:[t(Ni,{}),t(B,{size:14,color:w.text.error,family:"secondary",decoration:"underline",children:W.DELETE})]})}]:[]},children:a}),t(U,{isOpen:E,noOverlay:!0,name:`${T}${r?` (${r})`:""}`,type:T,isLastItem:y,onApprove:()=>{x&&x(),M()},onDeny:M}),t(J,{isOpen:F,noOverlay:!0,name:"edit mode",onApprove:L,onDeny:M})]})}),On=r(({title:e},i)=>{const[o,r]=n(e);return a(()=>{r(e)},[e]),s(i,()=>({getTitle:()=>o||e,isTitleDirty:()=>o!==e,clearTitle:()=>r(e)})),t(C,{"data-id":"title",value:o,onChange:e=>r(e.target.value)})});On.displayName=On.name,Fn.displayName=Fn.name;const In=p.div`
|
|
18
18
|
width: 100%;
|
|
19
19
|
height: 100%;
|
|
20
20
|
max-height: calc(100vh - 220px);
|
|
21
21
|
overflow: overlay;
|
|
22
22
|
overflow-y: auto;
|
|
23
|
-
`,
|
|
23
|
+
`,Rn=p.div`
|
|
24
24
|
display: flex;
|
|
25
25
|
flex-direction: column;
|
|
26
26
|
gap: 12px;
|
|
27
|
-
`,
|
|
27
|
+
`,Mn=({updateAction:i,deleteAction:o})=>{const{actions:r}=Y(),{drawerType:s,drawerEntityId:d}=H(),u=l(null),p=s===G.Action,[h,m]=n(!1),[y,v]=n(!1),{formData:f,formErrors:b,handleFormChange:x,resetFormData:$,validateForm:S,loadFormWithDrawerItem:C}=X(),k=c(()=>{if(d)return r?.find(e=>Z(e)===d)},[d,r]);if(a(()=>{p&&k?C(k):$()},[p,k]),!k)return null;const w=Q.find(({type:e})=>e===k.type)||Q.find(({label:e})=>"Attributes"===e)?.items?.find(({type:e})=>e===k.type)||Q.find(({label:e})=>"Samplers"===e)?.items?.find(({type:e})=>e===k.type);return t(Fn,{ref:u,title:k.name||k.type,icons:[ie(k.type)],isEdit:h,isFormDirty:y,onEdit:e=>{m("boolean"!=typeof e||e)},onSave:e=>{if(S({withAlert:!0,alertTitle:ne.Update})){const t=e!==k.type?e:"";x("name",t),i(d,{...f,name:t}),m(!1),v(!1)}},onDelete:()=>{o(d,k.type),m(!1),v(!1),u.current?.closeDrawer()},onCancel:()=>{m(!1),v(!1),C(k)},children:h&&w?t(In,{children:t(An,{isUpdate:!0,action:w,formData:f,formErrors:b,handleFormChange:(...e)=>{v(!0),x(...e)}})}):e(Rn,{children:[t(ee,{conditions:k.conditions||[]}),t(te,{title:g.ACTION_DETAILS,data:k?ln(k):[]})]})})},Kn=p(F)`
|
|
28
28
|
margin-top: 24px;
|
|
29
29
|
gap: 12px;
|
|
30
|
-
`,
|
|
30
|
+
`,Ln=({createAction:i})=>{const{currentModal:a,setCurrentModal:o}=ae(),r=a===G.Action,{formData:l,formErrors:s,handleFormChange:c,resetFormData:d,validateForm:u}=X(),[p,h]=n(void 0),m=()=>{d(),h(void 0),o("")},y=()=>{if(!u({withAlert:!0,alertTitle:ne.Create}))return null;i(l),m()};return V({key:"Enter",active:r},()=>y()),t(oe,{isOpen:r,onClose:m,header:{title:"Add Action"},actionComponent:t(ue,{buttons:[{variant:"primary",label:"DONE",onClick:y,disabled:!p}]}),children:e(re,{children:[t(P,{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(Kn,{children:[t(le,{type:se.Warning,message:ce.DEFINED_FOR_ALL_STREAMS(g.ACTIONS)}),t(de,{options:Q,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(A,{margin:"16px 0"}),t(An,{action:p,formData:l,formErrors:s,handleFormChange:c})]}):null]})})},Pn=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:b,urlTemplatizationRulesGroups:x}}=e;let $="";if(t===v.K8sAttributes&&(i&&($+="Container Attributes, "),n&&($+="ReplicaSet Attributes, "),a&&($+="Workload ID, "),o&&($+="Cluster ID, "),r?.forEach(({labelKey:e,attributeKey:t,from:i,fromSources:n},a)=>{const o=n?.length?n.join(","):i||f.Pod;$+=`Label: ${e} ${t} ${o} `,a===r.length-1&&($+=", ")}),l?.forEach(({annotationKey:e,attributeKey:t,from:i,fromSources:n},a)=>{const o=n?.length?n.join(","):i||f.Pod;$+=`Annotation: ${e} ${t} ${o} `,a===l.length-1&&($+=", ")})),t===v.AddClusterInfo&&($+=`Overwrite Existing: ${c}\n`,s?.forEach(({attributeName:e,attributeStringValue:t},i)=>{$+=`${e}: ${t}`,i<s.length-1&&($+=", ")})),t===v.DeleteAttributes&&d?.forEach((e,t)=>{$+=e,t<d.length-1&&($+=", ")}),t===v.RenameAttributes){const e=Object.entries(u||{});e.forEach(([t,i],n)=>{$+=`${t}: ${i}`,n<e.length-1&&($+=", ")})}return t===v.PiiMasking&&p?.forEach((e,t)=>{$+=e,t<p.length-1&&($+=", ")}),t===v.ErrorSampler&&($+=String(h)),t===v.ProbabilisticSampler&&($+=String(m),$+="%"),t===v.LatencySampler&&g?.forEach(({serviceName:e,httpRoute:t,minimumLatencyThreshold:i,fallbackSamplingRatio:n},a)=>{$+=`Endpoint${g.length>1?` #${a+1}`:""}=${e}${t}\n`,$+=` Latency=${i}`,$+=` Sampling=${n}`,a<g.length-1&&($+=", ")}),t===v.ServiceNameSampler&&b?.forEach(({serviceName:e,samplingRatio:t,fallbackSamplingRatio:i})=>{$+=`Service Name: ${e}, `,$+=`Sampling Ratio: ${t}, `,$+=`Fallback Sampling Ratio: ${i}\n`}),t===v.SpanAttributeSampler&&y?.forEach(({serviceName:e,attributeKey:t,fallbackSamplingRatio:i})=>{$+=`Service Name: ${e}, `,$+=`Attribute Key: ${t}, `,$+=`Fallback Sampling Ratio: ${i}\n`}),t===v.URLTemplatization&&x?.forEach((e,t)=>{const i=e.templatizationRules?.map(e=>e.template).filter(Boolean).join(", ");$+=`Group ${t+1}: ${i}`,t<x.length-1&&($+="; ")}),$},jn=({conditions:e,id:i})=>{const{errors:n,warnings:a,disableds:o,hasLoadings:r}=c(()=>pe(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(zn,{conditions:l,id:i})});const s=r?me.Loading:se.Success;return t("div",{style:{lineHeight:1},children:t(he,{status:s,title:s,withBorder:!0,withIcon:!0})})},zn=({conditions:e,id:i})=>{const n=m();return t(O,{children:ge(e).map(({status:e,type:a,reason:o,message:r,lastTransitionTime:l},s)=>{"loading"!==e&&"disabled"!==e||(e=se.Info);const c=ve(e,n);return t(ye,{titleIcon:c,title:a,text:r||o||"",timestamp:l,children:t(he,{status:e,title:o||a,withBorder:!0,withIcon:!0})},`condition-${i}-${e}-${a}-${s}`)})})},qn=({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:G.Source,label:"Sources",count:l.length,entities:[]},{category:G.Action,label:"Actions",count:s.length,entities:[]},{category:G.Destination,label:"Destinations",count:c.length,entities:[]},{category:G.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===G.InstrumentationRule?r:e.category===G.Source?l:e.category===G.Action?s:e.category===G.Destination?c:[]}));return{categories:d,searchResults:u}},Bn=[{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=fe(),{actions:r,actionsLoading:l}=Y(),{setDrawerType:s,setDrawerEntityId:d}=H(),u=c(()=>qn({instrumentationRules:[],sources:[],actions:be(r,o),destinations:[],searchText:o.searchText,selectedCategory:G.Action}).searchResults.find(({category:e})=>e===G.Action)?.entities||[],[r,o]),p=c(()=>u.map(e=>{const{hasErrors:i,hasWarnings:n,hasDisableds:o}=pe(e.conditions||[]);return{status:i?se.Error:n?se.Warning:void 0,faded:o,onClick:()=>{s(G.Action),d(e.id)},cells:[{columnKey:"icon",component:()=>t(xe,{icon:ie(e.type)})},{columnKey:"name",value:$e(e,G.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:Pn(e),textColor:a.text.info,withTooltip:!0},{columnKey:"signals",component:()=>t(Se,{withLabels:!0,monitors:e.signals||[]})},{columnKey:"conditions",component:()=>t(jn,{conditions:e.conditions||[],id:e.id})},{columnKey:"active-status",component:()=>t("div",{style:{lineHeight:1},children:t(he,{status:e.disabled?se.Error:se.Success,title:e.disabled?g.DISABLED:g.ENABLED,withIcon:!0,withBorder:!0})})}]}}),[u]),{badge:h,badgeTooltip:y}=c(()=>u.length!==r.length?{badge:`${u.length}/${r.length}`,badgeTooltip:g.FILTERED_COUNT_TOOLTIP}:{badge:r.length,badgeTooltip:void 0},[u,r]);return e(Ce,{$maxWidth:n,children:[t(ke,{children:t(we,{icon:Te(G.Action),title:g.ACTIONS,badge:h,badgeTooltip:y,loading:l})}),t(De,{$maxHeight:i,children:t(Ne,{columns:Bn,rows:p})}),!u.length&&t(Ee,{style:{marginTop:"2rem"},children:t(Ae,{})})]})},Vn=p(F)`
|
|
31
31
|
// width: 100vw;
|
|
32
32
|
// height: 100vh;
|
|
33
33
|
gap: 64px;
|
|
34
34
|
align-items: center;
|
|
35
35
|
justify-content: center;
|
|
36
|
-
`,
|
|
36
|
+
`,Wn=p(F)`
|
|
37
37
|
max-width: 400px;
|
|
38
38
|
gap: 12px;
|
|
39
39
|
align-items: center;
|
|
40
40
|
justify-content: center;
|
|
41
|
-
`,
|
|
41
|
+
`,_n=p(B)`
|
|
42
42
|
text-align: center;
|
|
43
43
|
font-size: 24px;
|
|
44
|
-
`,
|
|
44
|
+
`,Un=p(B)`
|
|
45
45
|
text-align: center;
|
|
46
46
|
line-height: 26px;
|
|
47
47
|
color: ${({theme:e})=>e.text.info};
|
|
48
|
-
`,
|
|
48
|
+
`,Jn=()=>{const[i,o]=n(0);return a(()=>{(async()=>{for(let e=0;e<=100;e+=5)await Ie(500),o(e)})()},[]),e(Vn,{children:[t(Oi,{size:100}),t(Fe,{width:400}),e(Wn,{children:[e(O,{$gap:16,children:[t(_n,{children:"Preparing your workspace..."}),t(Oe,{label:`${i}%`})]}),t(Un,{children:"It can take up to a few minutes. Grab a cup of coffee, look out a window, and enjoy your free moment!"})]})]})},Gn=p(F)`
|
|
49
49
|
align-items: center !important;
|
|
50
50
|
justify-content: center !important;
|
|
51
51
|
align-self: stretch;
|
|
@@ -61,9 +61,9 @@ import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import{useState
|
|
|
61
61
|
cursor: pointer;
|
|
62
62
|
|
|
63
63
|
&:hover {
|
|
64
|
-
background-color: ${({theme:e})=>e.colors.dropdown_bg_2+
|
|
64
|
+
background-color: ${({theme:e})=>e.colors.dropdown_bg_2+L["030"]};
|
|
65
65
|
}
|
|
66
|
-
`,
|
|
66
|
+
`,Yn=({entityType:i,description:n})=>{const{setCurrentModal:a}=ae();return e(Gn,{onClick:()=>a(i),children:[e(O,{$gap:4,children:[t(Ii,{}),e(B,{size:14,weight:600,family:"secondary",decoration:"underline",children:["Add ",i]})]}),t(B,{size:12,align:"center",children:n})]})},Xn=p.div`
|
|
67
67
|
position: relative;
|
|
68
68
|
width: 100%;
|
|
69
69
|
padding: 12px 0;
|
|
@@ -71,13 +71,13 @@ import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import{useState
|
|
|
71
71
|
display: flex;
|
|
72
72
|
align-items: center;
|
|
73
73
|
border-bottom: 1px solid ${({theme:e})=>e.colors.border};
|
|
74
|
-
`,
|
|
74
|
+
`,Zn=p(O)`
|
|
75
75
|
margin-left: ${({$marginLeft:e})=>e};
|
|
76
|
-
`,
|
|
76
|
+
`,Qn=p(Me)`
|
|
77
77
|
width: 24px;
|
|
78
78
|
height: 24px;
|
|
79
79
|
padding: 0;
|
|
80
|
-
`,
|
|
80
|
+
`,ea=p.div`
|
|
81
81
|
position: absolute;
|
|
82
82
|
bottom: -2px;
|
|
83
83
|
left: 0;
|
|
@@ -86,7 +86,7 @@ import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import{useState
|
|
|
86
86
|
height: 4px;
|
|
87
87
|
width: ${({percent:e})=>`${e}%`};
|
|
88
88
|
transition: width 0.3s;
|
|
89
|
-
`,
|
|
89
|
+
`,ta=({entityType:i,badge:n,badgeTooltip:a,isLoading:o,refetch:r,partiallySelected:l,allSelected:s,onSelectAll:c,progressPercent:d})=>{const u=m(),{setCurrentModal:p}=ae(),h=Te(i);return e(Xn,{children:[c&&t(Zn,{$marginLeft:"28px",children:t($,{partiallyChecked:l,value:s,onChange:c})}),t(Zn,{$marginLeft:i===G.Source?"0":"28px",children:t(we,{icon:h,title:`${i}s`,badge:n,badgeTooltip:a,loading:!1})}),e(Zn,{$marginLeft:"auto",children:[t(Qn,{"data-id":`refresh-${i}`,variant:"secondary",onClick:r,disabled:o,children:o?t(Re,{scale:.8}):t(Ri,{fill:u.colors.secondary,size:18})}),t(Qn,{"data-id":`add-${i}`,variant:"primary",onClick:()=>p(i),children:t(Ii,{fill:u.colors.primary,size:18})})]}),"number"==typeof d&&t(ea,{percent:d})]})},ia=p.div`
|
|
90
90
|
padding: 2px 6px;
|
|
91
91
|
background-color: ${({theme:e})=>e.colors.primary};
|
|
92
92
|
border-radius: 360px;
|
|
@@ -101,7 +101,42 @@ 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
|
-
`,
|
|
104
|
+
`,na=({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 f=m(),b=n===G.Source,x="boolean"==typeof y,{setDrawerType:$,setDrawerEntityId:S}=H(),{selectedSources:C,setSelectedSources:k}=Ke(),w={...C},{namespace:T,name:D,kind:N}=v;b&&!w[T]&&(w[T]=[]);const E=b?w[T].findIndex(e=>e.name===D&&e.kind===N):-1;return t(Le,{"data-id":n===G.Source?`${i.namespace}-${i.name}-${i.kind}`:i,title:r,subTitle:l,onClick:()=>{$(n),S(i)},renderActions:()=>{const i=b&&(!v.conditions?.length||v.conditions?.some(({status:e})=>"loading"===e)),n=x&&!y?ve(se.Info,f):a?ve(a,f):void 0,o=i?t(Re,{scale:.8}):n?t(n,{size:14}):null;return c?e(ia,{$isError:a===se.Error,children:[t(ye,{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:b,isChecked:-1!==E,onCheckboxChange:()=>{-1===E?w[T].push(v):w[T].splice(E,1),k(w)}}})};function aa(e){const t=e.conditions?.some(({status:e})=>e===me.Loading);return t?e:{...e,conditions:[{status:me.Loading,type:"Pending",message:"",lastTransitionTime:""}]}}function oa(e){const t=e.conditions?.filter(({status:e})=>e!==me.Loading);return t?.length===e.conditions?.length?e:{...e,conditions:t?.length?t:[{status:se.Success,type:"Healthy",message:"",lastTransitionTime:""}]}}const ra=p.div`
|
|
105
|
+
position: absolute;
|
|
106
|
+
top: 12px;
|
|
107
|
+
left: 12px;
|
|
108
|
+
right: 12px;
|
|
109
|
+
z-index: 1;
|
|
110
|
+
padding: 4px 12px;
|
|
111
|
+
background: ${({theme:e})=>e.colors.primary};
|
|
112
|
+
border-bottom: 1px solid ${({theme:e})=>e.colors.border};
|
|
113
|
+
border-radius: 12px 12px 0 0;
|
|
114
|
+
pointer-events: none;
|
|
115
|
+
`,la=p.span`
|
|
116
|
+
font-family: ${({theme:e})=>e.font_family.primary};
|
|
117
|
+
font-size: 11px;
|
|
118
|
+
font-weight: 600;
|
|
119
|
+
color: ${({theme:e})=>e.text.grey};
|
|
120
|
+
text-transform: uppercase;
|
|
121
|
+
letter-spacing: 0.5px;
|
|
122
|
+
`,sa=p.div`
|
|
123
|
+
display: flex;
|
|
124
|
+
align-items: center;
|
|
125
|
+
gap: 8px;
|
|
126
|
+
padding: 4px 8px 0;
|
|
127
|
+
`,ca=p.div`
|
|
128
|
+
flex: 1;
|
|
129
|
+
height: 1px;
|
|
130
|
+
background: ${({theme:e})=>e.colors.border};
|
|
131
|
+
`,da=p.span`
|
|
132
|
+
font-family: ${({theme:e})=>e.font_family.secondary};
|
|
133
|
+
font-size: 10px;
|
|
134
|
+
font-weight: 600;
|
|
135
|
+
color: ${({theme:e})=>e.text.grey};
|
|
136
|
+
text-transform: uppercase;
|
|
137
|
+
letter-spacing: 0.5px;
|
|
138
|
+
white-space: nowrap;
|
|
139
|
+
`,ua=({namespace:e})=>t(ra,{children:t(la,{children:e})}),pa=({namespace:i})=>e(sa,{children:[t(ca,{}),t(da,{children:i}),t(ca,{})]}),ha=p.div`
|
|
105
140
|
height: calc(${({$height:e})=>e}px - 24px);
|
|
106
141
|
width: calc(100% - 24px);
|
|
107
142
|
padding: 12px;
|
|
@@ -109,7 +144,7 @@ import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import{useState
|
|
|
109
144
|
border: 1px dashed ${({theme:e})=>e.colors.border};
|
|
110
145
|
border-radius: 24px;
|
|
111
146
|
position: relative;
|
|
112
|
-
`,
|
|
147
|
+
`,ma=p.div`
|
|
113
148
|
position: absolute;
|
|
114
149
|
bottom: 0;
|
|
115
150
|
left: 0;
|
|
@@ -124,18 +159,18 @@ import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import{useState
|
|
|
124
159
|
justify-content: center;
|
|
125
160
|
|
|
126
161
|
pointer-events: none;
|
|
127
|
-
`,
|
|
162
|
+
`,ga={[G.Source]:{subTitle:(e,t)=>t?e.kind:`${e.namespace} • ${e.kind}`,icons:e=>({icons:We(e),icon:Te(G.Source)}),withMetrics:!0},[G.Destination]:{subTitle:e=>e.destinationType.displayName,icons:e=>Ve(e.destinationType.type),withMetrics:!0,withMonitors:!0,withActive:!0},[G.Action]:{subTitle:e=>e.type,icons:e=>({icon:ie(e.type)}),withMonitors:!0,withActive:!0},[G.InstrumentationRule]:{subTitle:e=>e.type,icons:e=>({icon:He(e.type)}),withActive:!0},[G.Namespace]:{subTitle:()=>"",icons:()=>({icon:Te(G.Namespace)})}};const ya=({height:i,entityType:o,entities:r,metrics:l})=>{const{isVm:s}=je(),u=o===G.Source,[p,h]=n(""),m=c(()=>r.map(e=>function(e,t,i,n){const a=Z(e);if(!a)return null;const o=ga[t],r=t===G.Source,l=o.withMonitors?t===G.Destination?qe(e.exportedSignals):e.signals:void 0,s=o.withMetrics?n?.[`${t.toLowerCase()}s`]?.find(e=>JSON.stringify(Z(e))===JSON.stringify(a)):void 0,c=o.withActive?!e.disabled:void 0;let d,u,p=!1,h=e;if(r){const t=function(e){const t=e.workloadOdigosHealthStatus?.status;switch(t){case Pe.Failure:return{status:se.Error,faded:!1,tooltip:e.workloadOdigosHealthStatus?.message??void 0,displaySource:e};case Pe.Notice:return{status:se.Warning,faded:!1,tooltip:e.workloadOdigosHealthStatus?.message??void 0,displaySource:e};case Pe.Pending:case Pe.Waiting:return{status:void 0,faded:!1,displaySource:aa(e)};case Pe.Unsupported:case Pe.Disabled:return{status:void 0,faded:!0,displaySource:e};default:return{status:void 0,faded:!1,displaySource:oa(e)}}}(e);d=t.status,p=t.faded,u=t.tooltip,h=t.displaySource}else{const{priorotizedStatus:t,hasDisableds:i}=pe(e.conditions||[]);d=t,p=i}return{entityId:a,namespace:r?e.namespace:void 0,title:$e(e,t,{extended:r,prioritizeDisplayName:!r}),subTitle:o.subTitle(e,i),status:d,faded:p,tooltip:u,label:o.withMetrics?Be(s?.throughput):void 0,...o.icons(e),monitors:l,isActive:c,raw:h}}(e,o,s,l)).filter(Boolean),[r,o,l,s]),{elements:g,indexToNamespace:y,multipleNs:v}=c(()=>{const e=[],i=[],n=new Set(m.map(e=>e.namespace).filter(Boolean)).size>1;n&&(i.push(""),e.push(t("div",{style:{height:28}},"ns-spacer")));let a="";for(const n of m)u&&n.namespace&&n.namespace!==a&&(""!==a&&(i.push(n.namespace),e.push(t(pa,{namespace:n.namespace},`ns-divider-${n.namespace}`))),a=n.namespace),i.push(n.namespace||""),e.push(t(na,{entityType:o,entityId:n.entityId,raw:n.raw,title:n.title,subTitle:n.subTitle,faded:n.faded,status:n.status,tooltip:n.tooltip,label:n.label,icons:n.icons,icon:n.icon,iconSrc:n.iconSrc,monitors:n.monitors,isActive:n.isActive},JSON.stringify(n.entityId)));return{elements:e,indexToNamespace:i,multipleNs:n}},[m,o,u]);a(()=>{if(u&&y.length&&!p){const e=y.find(Boolean);e&&h(e)}},[u,y]);const f=d(e=>{if(!y.length)return;const t=y[Math.min(e,y.length-1)];t&&t!==p&&h(t)},[y,p]);return e(ha,{$height:i,children:[v&&p&&t(ua,{namespace:p}),t(ze,{gap:8,elements:g,onTopIndexChange:v?f:void 0}),t(ma,{$hide:!0})]})},va=p.div`
|
|
128
163
|
width: ${({$isVm:e})=>e?"45vw":"22vw"};
|
|
129
164
|
display: flex;
|
|
130
165
|
flex-direction: column;
|
|
131
166
|
gap: 12px;
|
|
132
|
-
`,
|
|
167
|
+
`,fa=({entityType:i,entities:n,unfilteredCount:a,metrics:o,loading:r,maxHeight:l,refetch:s})=>{const{isVm:d}=je(),{frameHeight:u,hasFiltersApplied:p,isSources:h}=c(()=>({frameHeight:Math.min(l,80*n.length+12),hasFiltersApplied:n.length!==a,isSources:i===G.Source}),[i,n.length,l,a]),{progress:m}=_e(),y=c(()=>h&&(m[Ue.Instrumenting]||m[Ue.Uninstrumenting])?m[Ue.Instrumenting]?.percentage||m[Ue.Uninstrumenting]?.percentage||0:void 0,[h,m[Ue.Instrumenting],m[Ue.Uninstrumenting]]),{selectedSources:v,setSelectedSources:f}=Ke(),b=c(()=>h?Object.values(v).reduce((e,t)=>e+t.length,0):0,[h,v]);return d&&[G.InstrumentationRule,G.Action].includes(i)?null:e(va,{$isVm:d,children:[t(ta,{entityType:i,badge:"number"==typeof y?`${y}%`:p?`${n.length}/${a}`:a,badgeTooltip:p?g.FILTERED_COUNT_TOOLTIP:void 0,isLoading:r,refetch:s,partiallySelected:b>0&&n?.length!==b,allSelected:b>0&&n?.length===b,onSelectAll:h?e=>{if(h)if(e){const e={};n?.forEach(t=>{const{namespace:i}=t;e[i]?e[i].push(t):e[i]=[t]}),f(e)}else f({})}:void 0,progressPercent:y}),n.length?t(ya,{height:u,entityType:i,entities:n,metrics:o}):r?t(Je,{size:3}):t(Yn,{entityType:i,description:g.TO_COLLECT_OTEL_DATA})]})},ba=p.div`
|
|
133
168
|
width: 100%;
|
|
134
169
|
height: ${({$height:e})=>e};
|
|
135
170
|
display: flex;
|
|
136
171
|
justify-content: space-evenly;
|
|
137
172
|
gap: 24px;
|
|
138
|
-
`,
|
|
173
|
+
`,xa=({height:i,metrics:o,refetchSources:r,refetchDestinations:l,refetchActions:s,refetchInstrumentationRules:d})=>{const u=fe(),{selectedStreamName:p}=Ge(),{containerRef:h,containerHeight:m}=Ye(),{sources:g,sourcesLoading:y,destinations:v,destinationsLoading:f,actions:b,actionsLoading:x,instrumentationRules:$,instrumentationRulesLoading:S}=Y(),C=c(()=>Xe(g,p),[g,p]),k=c(()=>Ze(v,p),[v,p]),[w,T]=n([]),[D,N]=n([]),[E,A]=n([]),[F,O]=n([]);return a(()=>{T(Qe(C,u))},[C,u]),a(()=>{N(et(k,u))},[k,u]),a(()=>{A(be(b,u))},[b,u]),a(()=>{O($)},[$]),e(ba,{ref:h,$height:i,children:[t(fa,{entityType:G.InstrumentationRule,entities:F,unfilteredCount:$.length,loading:S,maxHeight:m,refetch:d}),t(fa,{entityType:G.Source,entities:w,unfilteredCount:C.length,metrics:o,loading:y,maxHeight:m,refetch:r}),t(fa,{entityType:G.Action,entities:E,unfilteredCount:b.length,loading:x,maxHeight:m,refetch:s}),t(fa,{entityType:G.Destination,entities:D,unfilteredCount:k.length,metrics:o,loading:f,maxHeight:m,refetch:l})]})},$a=p.div`
|
|
139
174
|
position: relative;
|
|
140
175
|
max-width: 200px;
|
|
141
176
|
`;p.div`
|
|
@@ -149,65 +184,65 @@ import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import{useState
|
|
|
149
184
|
background-color: ${({theme:e})=>e.colors.dropdown_bg};
|
|
150
185
|
border: ${({theme:e})=>`1px solid ${e.colors.border}`};
|
|
151
186
|
border-radius: 24px;
|
|
152
|
-
`;const
|
|
187
|
+
`;const Sa=p.div`
|
|
153
188
|
display: flex;
|
|
154
189
|
align-items: center;
|
|
155
190
|
overflow-x: scroll;
|
|
156
|
-
`,
|
|
191
|
+
`,Ca=({onClose:i})=>{const r=m(),{onClickNode:l}=tt(),{searchText:s}=fe(),{selectedStreamName:d}=Ge(),{sources:u,destinations:p,actions:h,instrumentationRules:g}=Y(),{popupRef:y,popupOpen:v,setPopupOpen:f,popupPosition:b,handlePosition:x}=it();a(()=>{v||(x(0,50),f(!0))},[v]);const[$,S]=n("all"),{categories:C,searchResults:k}=c(()=>qn({instrumentationRules:g,sources:Xe(u,d),actions:h,destinations:Ze(p,d),searchText:s,selectedCategory:$}),[g,u,h,p,d,s,$]);return k.length?t(nt,{ref:y,isOpen:v,top:b.top,left:b.left,maxWidth:"420px",header:t(Sa,{children:C.map(({category:e,label:i,count:n})=>!!n&&t(ot,{label:i,badgeLabel:n,isSelected:$===e,onClick:()=>S(e)},`category-select-${e}`))}),children:k.map(({category:n,label:a,entities:s},c)=>!!s.length&&e(o,{children:[e(at,{style:{maxHeight:"all"!==$?"240px":"140px",padding:"12px 0"},children:[t(B,{size:12,family:"secondary",color:r.text.darker_grey,style:{marginLeft:"16px"},children:a}),s.map((e,a)=>t(ot,{icon:Te(n),label:$e(e,n,{extended:!0}),onClick:()=>{const t=Z(e);l(null,{data:{type:n,id:t}}),i()},style:{width:"100%",justifyContent:"flex-start"},color:"transparent"},`entity-${c}-${a}`))]}),t(A,{thickness:c===k.length-1?0:1,length:"90%",margin:"8px auto"})]},`category-list-${n}`))}):t(nt,{ref:y,isOpen:v,top:b.top,left:b.left,children:t(Ae,{})})},ka=({preventPopup:i=!1})=>{const{searchText:a,setSearchText:o}=fe(),[r,s]=n(!1),c=!!a||r,d=()=>{o(""),s(!1)},u=l(null);return rt(u,d),V({key:"Escape",active:c},d),e($a,{ref:u,children:[t(C,{placeholder:"Search",icon:Mi,value:a,onChange:e=>o(e.target.value.toLowerCase()),onFocus:()=>s(!0)}),c&&!i?t(Ca,{onClose:d}):null]})},wa=({sources:e,title:i="Condition",value:n,onSelect:a,onDeselect:o,...r})=>{const l=c(()=>{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:`${lt(e)} - ${lt(i)}`})})}),t.sort((e,t)=>e.id?.localeCompare(t.id||"")||0)},[e]);return t(st,{disabled:!l?.length,title:i,placeholder:"All",options:l,value:n,onSelect:a,onDeselect:o,...r})},Ta=({sources:e,title:i="Error Message",value:n,onSelect:a,onDeselect:o,disabled:r,...l})=>{const s=c(()=>{const t=[];return e.forEach(({conditions:e})=>{ge(e||[]).forEach(({status:e,message:i,reason:n})=>{e!==se.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(st,{disabled:r||!s?.length,title:i,placeholder:"All",options:s,value:n,onSelect:a,onDeselect:o,...l})},Da=({sources:e,title:i="Programming Language",value:n,onSelect:a,onDeselect:o,...r})=>{const l=c(()=>{const t=[];return e.forEach(({containers:e})=>{e?.forEach(({language:e})=>{t.find(t=>t.id===e)||t.push({id:e,value:ct[e]||e})})}),t.sort((e,t)=>e.id?.localeCompare(t.id||"")||0)},[e]);return t(st,{disabled:!l?.length,title:i,placeholder:"All",options:l,value:n,onSelect:a,onDeselect:o,...r})},Na=({title:e="Monitors",value:i,onSelect:n,onDeselect:a,...o})=>{const r=c(()=>{const e=[];return dt.forEach(({id:t,value:i})=>{e.find(e=>e.id===t)||e.push({id:t,value:i})}),e},[]);return t(st,{disabled:!r?.length,title:e,placeholder:"All",options:r,value:i,onSelect:n,onDeselect:a,...o})},Ea=({namespaces:e,title:i="Namespace",value:n,onSelect:a,onDeselect:o,...r})=>{const l=c(()=>{const t=[];return e?.forEach(({name:e})=>{t.find(t=>t.id===e)||t.push({id:e,value:e})}),t},[e]);return t(st,{disabled:!l?.length,title:i,placeholder:"Select namespace",options:l,value:n,onSelect:a,onDeselect:o,...r})},Aa=({sources:e,title:i="Kind",value:n,onSelect:a,onDeselect:o,...r})=>{const l=c(()=>{const t=[];return e.forEach(({kind:e})=>{t.find(t=>t.id===e)||t.push({id:e,value:e})}),t},[e]);return t(st,{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 s=c(()=>{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:lt(i)}):n&&(t.find(e=>e.id===n)||t.push({id:n,value:n}))}),t},[e]);return t(st,{disabled:r||!s?.length,title:i,placeholder:"All",options:s,value:n,onSelect:a,onDeselect:o,...l})},Oa=p.div`
|
|
157
192
|
display: flex;
|
|
158
193
|
flex-direction: column;
|
|
159
194
|
gap: 12px;
|
|
160
195
|
padding: 12px;
|
|
161
|
-
|
|
196
|
+
`,Ia=p.div`
|
|
162
197
|
padding: 12px 6px 6px 6px;
|
|
163
|
-
`,
|
|
198
|
+
`,Ra=p(Me)`
|
|
164
199
|
font-size: 14px;
|
|
165
200
|
${({$color:e})=>`color: ${e};`}
|
|
166
|
-
`,
|
|
201
|
+
`,Ma=p.div`
|
|
167
202
|
margin-left: auto;
|
|
168
|
-
`,
|
|
203
|
+
`,Ka=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},La=()=>{const i=m(),{namespaces:o,sources:r}=Y(),{selectedStreamName:s}=Ge(),{getItemSS:d,setItemSS:u,removeItemSS:p}=pt(),{popupRef:h,popupOpen:g,setPopupOpen:y,popupPosition:v,handlePosition:f}=it(),{namespaces:b,kinds:x,monitors:$,languages:S,conditions:C,errors:k,onlyErrors:w,podsAgentInjectionStatus:T,setAll:N,clearAll:E,getEmptyState:A}=fe(),F=c(()=>Xe(r,s),[r,s]),[I,R]=n({namespaces:b,kinds:x,monitors:$,languages:S,conditions:C,errors:k,onlyErrors:w,podsAgentInjectionStatus:T}),[M,K]=n(Ka(I));a(()=>{const e=d(ut.OVERVIEW_FILTERS,A());N(e)},[]),a(()=>{if(!g){const e={namespaces:b,kinds:x,monitors:$,languages:S,conditions:C,errors:k,onlyErrors:w,podsAgentInjectionStatus:T};R(e),K(Ka(e))}},[g,b,x,$,S,C,k,w,T]);const L=()=>{y(!1)},P=l(null);return rt(P,L),V({key:"Escape",active:g},L),e($a,{ref:P,children:[t(ot,{label:"Filters",icon:Ki,badgeLabel:M,badgeFilled:!!M,withBorder:!0,color:"transparent",onClick:()=>{f(0,50),y(!0)}}),t(nt,{ref:h,isOpen:g,top:v.top,left:v.left,width:"420px",footer:e(O,{children:[t(Ra,{variant:"primary",onClick:()=>{u(ut.OVERVIEW_FILTERS,I),N(I),K(Ka(I)),y(!1)},children:"Apply"}),t(Ra,{variant:"secondary",onClick:L,children:"Cancel"}),t(Ma,{children:t(Ra,{variant:"tertiary",onClick:()=>{p(ut.OVERVIEW_FILTERS),E(),R(A()),K(0),y(!1)},$color:i.text.error,children:"Reset"})})]}),children:e(Oa,{children:[t(Ea,{namespaces:o,value:I.namespaces,onSelect:e=>R(t=>({...t,namespaces:[...t.namespaces||[],e]})),onDeselect:e=>R(t=>({...t,namespaces:(t.namespaces||[]).filter(t=>t.id!==e.id)})),showSearch:!0,required:!0,isMulti:!0}),t(Aa,{sources:F,value:I.kinds,onSelect:e=>R(t=>({...t,kinds:[...t.kinds||[],e]})),onDeselect:e=>R(t=>({...t,kinds:(t.kinds||[]).filter(t=>t.id!==e.id)})),showSearch:!0,required:!0,isMulti:!0}),t(Da,{sources:F,value:I.languages,onSelect:e=>R(t=>({...t,languages:[...t.languages||[],e]})),onDeselect:e=>R(t=>({...t,languages:(t.languages||[]).filter(t=>t.id!==e.id)})),showSearch:!0,required:!0,isMulti:!0}),t(Na,{value:I.monitors,onSelect:e=>R(t=>({...t,monitors:[...t.monitors||[],e]})),onDeselect:e=>R(t=>({...t,monitors:(t.monitors||[]).filter(t=>t.id!==e.id)})),showSearch:!0,required:!0,isMulti:!0}),t(wa,{sources:F,value:I.conditions,onSelect:e=>R(t=>({...t,conditions:[...t.conditions||[],e]})),onDeselect:e=>R(t=>({...t,conditions:(t.conditions||[]).filter(t=>t.id!==e.id)})),showSearch:!0,required:!0,isMulti:!0}),t(Fa,{sources:F,value:I.podsAgentInjectionStatus,onSelect:e=>R(t=>({...t,podsAgentInjectionStatus:[...t.podsAgentInjectionStatus||[],e]})),onDeselect:e=>R(t=>({...t,podsAgentInjectionStatus:(t.podsAgentInjectionStatus||[]).filter(t=>t.id!==e.id)})),showSearch:!0,required:!0,isMulti:!0}),t(Ia,{children:t(D,{title:"Show only sources with errors",initialValue:I.onlyErrors,onChange:e=>R(t=>({...t,errors:[],onlyErrors:e}))})}),t(Ta,{sources:F,value:I.errors,onSelect:e=>R(t=>({...t,errors:[...t.errors||[],e]})),onDeselect:e=>R(t=>({...t,errors:(t.errors||[]).filter(t=>t.id!==e.id)})),disabled:!I.onlyErrors,showSearch:!0,required:!0,isMulti:!0})]})})]})},Pa=p.div`
|
|
169
204
|
display: flex;
|
|
170
205
|
flex-direction: column;
|
|
171
206
|
gap: 24px;
|
|
172
207
|
padding: 4px;
|
|
173
|
-
`,
|
|
208
|
+
`,ja=({formData:i,handleFormChange:n,formErrors:a,editingStreamName:o})=>{const{dataStreams:r,selectedStreamName:l}=Ge(),s=o||l,d=c(()=>r.find(e=>e.name===i.name&&e.name!==s),[r,i.name,s]);return e(Pa,{children:[t(C,{name:"name",title:g.STREAM_NAME,placeholder:g.NAME_YOUR_STREAM_PLACEHOLDER,required:!0,value:i.name,onChange:({target:{value:e}})=>n("name",e),errorMessage:a.name}),d&&t(le,{type:se.Warning,message:g.DATA_STREAM_EXISTS_WARNING(s,d.name)})]})},za=p.div`
|
|
174
209
|
width: 100%;
|
|
175
210
|
height: 100%;
|
|
176
211
|
max-height: calc(100vh - 220px);
|
|
177
212
|
overflow: overlay;
|
|
178
213
|
overflow-y: auto;
|
|
179
|
-
`,
|
|
214
|
+
`,qa=({isOpen:e,onClose:i,dataStreamName:a,updateDataStream:o})=>{const{dataStreams:r}=Ge(),s=l(null),[u,p]=n(!1),{formData:h,handleFormChange:m,formErrors:g,validateForm:y,resetFormData:v,loadFormWithDrawerItem:f}=ht({name:a}),b=c(()=>{if(!e)return v();const t=r?.find(e=>e.name===a);return t?f(t):v(),t},[e,r,a]),x=d((e,t)=>{m(e,t),p(!0)},[m]);return b?t(Fn,{ref:s,title:b.name,icons:[Li],hideEditTitleFromEdit:!0,isEdit:!0,isFormDirty:u,onSave:()=>{y({withAlert:!0,alertTitle:ne.Update})&&(o(a,h),p(!1),i())},onCancel:()=>{v(),p(!1),i()},children:t(za,{children:t(ja,{formData:h,handleFormChange:x,formErrors:g,editingStreamName:a})})}):null},Ba=p.div`
|
|
180
215
|
position: relative;
|
|
181
|
-
`,
|
|
216
|
+
`,Ha=p(O)`
|
|
182
217
|
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
183
218
|
border-radius: 32px;
|
|
184
219
|
|
|
185
220
|
& button {
|
|
186
221
|
max-height: 28px;
|
|
187
222
|
}
|
|
188
|
-
`,
|
|
223
|
+
`,Va=p(B)`
|
|
189
224
|
text-wrap: nowrap;
|
|
190
|
-
`,
|
|
225
|
+
`,Wa=p(at)`
|
|
191
226
|
max-height: 240px;
|
|
192
227
|
padding: 0px !important;
|
|
193
|
-
`,
|
|
228
|
+
`,_a=p(O)`
|
|
194
229
|
width: 100%;
|
|
195
|
-
`,
|
|
230
|
+
`,Ua=p.div`
|
|
196
231
|
width: 100%;
|
|
197
|
-
`,
|
|
232
|
+
`,Ja=({onClickNewDataStream:a,updateDataStream:o,deleteDataStream:r})=>{const l=m(),{clearStore:s}=mt(),{popupRef:d,popupOpen:u,setPopupOpen:p,popupPosition:h,handlePosition:g}=it(),{dataStreams:y,selectedStreamName:v,setSelectedStreamName:f}=Ge(),[b,x]=n(""),[$,S]=n(""),[k,w]=n(""),T=c(()=>y.filter(({name:e})=>!k||e.toLowerCase().includes(k.toLowerCase())).map(({name:i})=>e(_a,{children:[t(Ua,{children:t(ot,{label:i,isSelected:v===i,onClick:()=>{s(),f(i),p(!1)},color:"transparent",style:{width:"100%",justifyContent:"flex-start"}})}),i!==gt&&t(I,{onClick:()=>S(i),tooltip:W.DELETE,children:t(Ni,{})}),t(I,{onClick:()=>x(i),tooltip:W.EDIT,children:t(Fi,{})})]},`stream-${i}`)),[y,v,k]);return e(i,{children:[e(Ba,{children:[e(Ha,{$gap:0,children:[e(Me,{variant:"tertiary",onClick:()=>{g(0,50),p(e=>!e)},children:[t(Li,{fill:l.text.info}),e(Va,{children:["Data Stream: ",v]}),t(yt,{extend:u}),t(Oe,{label:y.length})]}),t(A,{orientation:"vertical",length:"32px",thickness:2,margin:"0"}),t(R,{onClick:()=>{s(),a()},label:W.NEW})]}),t(nt,{ref:d,isOpen:u,top:h.top,left:h.left,header:t(C,{placeholder:"Search...",icon:Mi,value:k,onChange:e=>w(e.target.value)}),children:t(Wa,{children:T})})]}),t(U,{isOpen:""!==$,name:$,onApprove:()=>{r($),S("")},onDeny:()=>{S("")}}),t(qa,{isOpen:""!==b,onClose:()=>{x("")},dataStreamName:b,updateDataStream:o})]})},Ga=p.div`
|
|
198
233
|
display: flex;
|
|
199
234
|
align-items: center;
|
|
200
235
|
margin: 20px 0;
|
|
201
236
|
padding: 0 16px;
|
|
202
237
|
gap: 8px;
|
|
203
|
-
`,
|
|
238
|
+
`,Ya=p.div`
|
|
204
239
|
margin-left: auto;
|
|
205
|
-
`,
|
|
240
|
+
`,Xa=({addEntity:i,preventSearchPopup:n,onClickNewDataStream:a,updateDataStream:o,deleteDataStream:r})=>{const{isVm:l}=je(),{setCurrentModal:s}=ae();return e(Ga,{children:[!l&&t(Ja,{onClickNewDataStream:a,updateDataStream:o,deleteDataStream:r}),t(ka,{preventPopup:n}),t(La,{}),i&&t(Ya,{children:t(R,{"data-id":`add-${i}`,onClick:()=>s(i),label:`${W.ADD} ${lt(i)}`,variant:"primary",textProps:{weight:900}})})]})},Za=r(({isModal:i,onClickSummary:n},a)=>{const{selectedStreamName:o}=Ge(),{formData:r,handleFormChange:l,formErrors:c,validateForm:d}=ht({name:o});return s(a,()=>({validateForm:d,getFormValues:()=>r})),t(re,{$isNotModal:!i,children:e(F,{$gap:24,children:[n&&t(vt,{onClick:n}),t(P,{title:g.NAME_YOUR_STREAM,description:g.STREAM_DESCRIPTION}),t(ja,{formData:r,handleFormChange:l,formErrors:c})]})})});Za.displayName=Za.name;const Qa=({createDataStream:e})=>{const{currentModal:i,setCurrentModal:n}=ae(),{addDataStreams:a,setSelectedStreamName:o}=Ge(),r=i===ft.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=l(null);return V({key:"Enter",active:r},c),t(oe,{isOpen:r,onClose:s,header:{title:"Add Data Stream"},actionComponent:t(ue,{buttons:[{label:"DONE",variant:"primary",onClick:c}]}),children:t(Za,{ref:d,isModal:!0})})},eo=(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:qe(a).join(", ")},{title:g.NAME,value:i.displayName}],r=bt(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,qe(a),l)){const{type:e}=$t(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},to=({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 M.Input:return t(C,{...s,onChange:e=>n(o.name,e.target.value),errorMessage:a[o.name]},o.name);case M.Dropdown:return t(st,{...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 M.MultiInput:return t(E,{...s,value:"string"==typeof s.value?$t(s.value,[]):s.value,onChange:e=>n(o.name,JSON.stringify(e)),errorMessage:a[o.name]},o.name);case M.KeyValuePair:return t(N,{...s,value:"string"==typeof s.value?$t(s.value,[]):s.value,onChange:e=>n(o.name,JSON.stringify(e)),errorMessage:a[o.name]},o.name);case M.TextArea:return t(q,{...s,onChange:e=>n(o.name,e.target.value),errorMessage:a[o.name]},o.name);case M.Checkbox:return t($,{...s,value:"true"==s.value,onChange:e=>n(o.name,String(e)),errorMessage:a[o.name]},o.name);default:return null}}),io=p(Me)`
|
|
206
241
|
display: flex;
|
|
207
242
|
align-items: center;
|
|
208
243
|
gap: 8px;
|
|
209
244
|
|
|
210
|
-
${({$status:e,theme:t})=>e===
|
|
245
|
+
${({$status:e,theme:t})=>e===se.Success?h`
|
|
211
246
|
border-color: transparent;
|
|
212
247
|
background-color: ${t.colors.success};
|
|
213
248
|
`:"error"===e?h`
|
|
@@ -216,43 +251,43 @@ import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import{useState
|
|
|
216
251
|
`:h`
|
|
217
252
|
background-color: transparent;
|
|
218
253
|
`}
|
|
219
|
-
`,
|
|
254
|
+
`,no=({destination:i,validateForm:a,status:o,testConnection:r,onSuccess:l,onError:s})=>{const c=m(),{selectedStreamName:d}=Ge(),[u,p]=n(!1),h=o?ve(o,c):void 0;return e(io,{$status:o,variant:"secondary",onClick:async()=>{if(a()){p(!0);const e=await r({...i,currentStreamName:d});e&&(e.succeeded?l(e):s(e)),p(!1)}},children:[u?t(Re,{}):h?t(h,{}):null,t(B,{family:"secondary",decoration:"underline",size:14,color:o?c.text[o]:void 0,children:u?"Checking":o===se.Success?"Connection OK":"error"===o?"Connection Failed":"Test Connection"})]})},ao=p(F)`
|
|
220
255
|
align-items: unset;
|
|
221
256
|
padding: 0 4px;
|
|
222
|
-
`,
|
|
257
|
+
`,oo=p.div`
|
|
223
258
|
display: flex;
|
|
224
259
|
flex-direction: column;
|
|
225
260
|
gap: 12px;
|
|
226
|
-
`,
|
|
261
|
+
`,ro=p(O)`
|
|
227
262
|
justify-content: space-between;
|
|
228
|
-
`,
|
|
263
|
+
`,lo=p(B)`
|
|
229
264
|
margin-bottom: 12px;
|
|
230
|
-
`,
|
|
265
|
+
`,so=({isUpdate:i,categoryItem:o,formData:r,formErrors:s,validateForm:d,handleFormChange:u,dynamicFields:p,setDynamicFields:h,testConnection:y})=>{const{type:v,displayName:f,supportedSignals:b,testConnectionSupported:x}=o||{},$=m(),[S,k]=n(!1),[w,T]=n(!1),[D,N]=n(void 0),E=l(!1);a(()=>{if(p.length&&!E.current){E.current=!0;let e=!1;for(let t=0;t<p.length;t++){const{required:i,value:n}=p[t];if(i){if([void 0,null,""].includes(n)){e=!1;break}e=!0}}k(e)}},[p,w]);const F=c(()=>{const{logs:e,metrics:t,traces:i}=b||{},n=[];return e?.supported&&n.push(St.Logs),t?.supported&&n.push(St.Metrics),i?.supported&&n.push(St.Traces),n},[b]),O=c(()=>{const{logs:e,metrics:t,traces:i}=r.exportedSignals||{},n=[];return e&&n.push(St.Logs),t&&n.push(St.Metrics),i&&n.push(St.Traces),n},[r.exportedSignals]),I=()=>{k(!1),T(!0),N(void 0)};return e(ao,{$gap:24,children:[e(ao,{$gap:12,children:[t(P,{title:i?"Update destination":"Create destination",description:`Connect ${f} with Odigos.`,actionButton:x&&t(no,{destination:r,validateForm:d,status:D?.type,testConnection:y,onError:e=>{T(!1),N({type:se.Error,title:e?.reason||"Connection failed",message:e?.message||"Please check your input and try again."})},onSuccess:e=>{T(!1),N({type:se.Success,title:e?.reason||"Connection succeeded",message:e?.message||""})}})}),e(oo,{children:[x&&D&&t(le,{type:D.type,title:D.title,message:D.message}),S&&!D&&!i&&t(le,{type:se.Default,message:`Odigos autocompleted ${f} destination details.`})]}),t(A,{})]}),e(ro,{children:[t(z,{title:i?"":"This connection will monitor:",required:!0,allowedSignals:F,selectedSignals:O,setSelectedSignals:e=>{I(),u("exportedSignals",{logs:e.includes(St.Logs),metrics:e.includes(St.Metrics),traces:e.includes(St.Traces)})},errorMessage:s.exportedSignals}),!i&&t(j,{endpoint:`/backends/${v}`})]}),i&&e("div",{children:[t(lo,{children:"Status"}),t(K,{options:[{icon:Ei,label:g.ENABLED,value:!1,selectedBgColor:$.text.success+L["050"]},{icon:Ai,label:g.DISABLED,value:!0,selectedBgColor:$.text.error+L["050"]}],selected:r.disabled,setSelected:e=>u("disabled",e)})]}),!i&&t(C,{title:"Destination name",placeholder:"Enter destination name",value:r.name,onChange:e=>{I(),u("name",e.target.value)},errorMessage:s.name}),t(to,{signals:O,fields:p,onChange:(e,t)=>{I(),h(i=>{const n=[...i],a=n.findIndex(t=>t.name===e);return-1!==a&&(n[a]={...n[a],value:t}),n})},formErrors:s})]})},co=p.div`
|
|
231
266
|
width: 100%;
|
|
232
267
|
height: 100%;
|
|
233
268
|
max-height: calc(100vh - 220px);
|
|
234
269
|
overflow: overlay;
|
|
235
270
|
overflow-y: auto;
|
|
236
|
-
`,
|
|
271
|
+
`,uo=p.div`
|
|
237
272
|
display: flex;
|
|
238
273
|
flex-direction: column;
|
|
239
274
|
gap: 12px;
|
|
240
|
-
`,
|
|
275
|
+
`,po=({categories:i,updateDestination:o,deleteDestination:r,testConnection:s})=>{const{destinations:d}=Y(),{selectedStreamName:u}=Ge(),{drawerType:p,drawerEntityId:h}=H(),m=c(()=>Ze(d,u),[d,u]),y=l(null),v=p===G.Destination,[f,b]=n(!1),[x,$]=n(!1),{formData:S,formErrors:C,handleFormChange:k,resetFormData:w,validateForm:T,loadFormWithDrawerItem:D,yamlFields:N,setYamlFields:E,dynamicFields:A,setDynamicFields:F}=Ct({}),O=c(()=>{if(h)return m?.find(e=>Z(e)===h)},[h,m]);if(a(()=>{v&&O?(E(kt(i,O)),D(O)):w()},[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?Ve(I?.type):{icon:void 0,iconSrc:void 0};return t(Fn,{ref:y,title:O.name||O.destinationType.displayName,icons:R?[R]:void 0,iconSrcs:M?[M]:void 0,isEdit:f,isFormDirty:x,onEdit:e=>{b("boolean"!=typeof e||e)},onSave:async e=>{if(T({withAlert:!0,alertTitle:ne.Update})){const t=e!==O.destinationType.displayName?e:"";k("name",t),o(h,{...S,name:t}),b(!1),$(!1)}},onDelete:async()=>{r(h),b(!1),$(!1),y.current?.closeDrawer()},onCancel:()=>{b(!1),$(!1),D(O)},isLastItem:1===m.length,children:f?t(co,{children:t(so,{isUpdate:!0,categoryItem:I,formData:S,formErrors:C,handleFormChange:(...e)=>{$(!0),k(...e)},dynamicFields:A,setDynamicFields:(...e)=>{$(!0),F(...e)},validateForm:T,testConnection:s})}):e(uo,{children:[O.conditions?.length?t(ee,{conditions:O.conditions}):null,t(te,{title:g.DESTINATION_DETAILS,data:O?eo(O,N):[]})]})})},ho=p.div`
|
|
241
276
|
display: flex;
|
|
242
277
|
flex-direction: column;
|
|
243
278
|
gap: 12px;
|
|
244
|
-
`,
|
|
279
|
+
`,mo=({items:i,onSelectNew:n,onSelectConfigured:a,isLoadingForDestinationIds:o})=>{const{configuredDestinationsUpdateOnly:r}=mt();return i.map(i=>{const l=i.name===Dt[Nt.EXISTS].TITLE;return e(ho,{children:[t(P,{size:"small",icon:i.icon,title:wt(i.name),description:i.description}),i.items.map(e=>{const s=`select-${i.name.replaceAll(" ","")}-destination-${e.type}`,c=Tt(e.supportedSignals),{icon:d,iconSrc:u}=Ve(e.type),p=e.selected||r.some(t=>t.id===e.id),h=!!o.find(t=>t===e.id),m=l?()=>a(e.id):()=>n(e);return t(Le,{"data-id":s,title:e.displayName,hoverText:W.SELECT,onClick:m,iconProps:{icon:d,iconSrc:u},visualProps:{monitors:c,monitorsWithLabels:!0},checkboxProps:{withCheckbox:l,isChecked:p,isLoading:h,onCheckboxChange:()=>a(e.id)}},s)})]},`category-${i.name}`)})},go=p.div`
|
|
245
280
|
display: flex;
|
|
246
281
|
flex-direction: column;
|
|
247
282
|
gap: 24px;
|
|
248
|
-
`,
|
|
283
|
+
`,yo=p.div`
|
|
249
284
|
display: flex;
|
|
250
285
|
align-items: center;
|
|
251
286
|
gap: 12px;
|
|
252
|
-
`,
|
|
287
|
+
`,vo=p.div`
|
|
253
288
|
width: 170px;
|
|
254
289
|
margin-right: 8px;
|
|
255
|
-
`,
|
|
290
|
+
`,fo=p.div`
|
|
256
291
|
display: flex;
|
|
257
292
|
flex-direction: column;
|
|
258
293
|
align-self: stretch;
|
|
@@ -263,18 +298,18 @@ import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import{useState
|
|
|
263
298
|
@media (height < 800px) {
|
|
264
299
|
max-height: calc(100vh - 400px);
|
|
265
300
|
}
|
|
266
|
-
`,
|
|
301
|
+
`,bo=p(go)`
|
|
267
302
|
margin-top: 80px;
|
|
268
|
-
`,
|
|
303
|
+
`,xo=Object.values(Nt).map(e=>({value:Dt[e].TITLE,id:e})),$o=xo[0],So=[St.Logs,St.Metrics,St.Traces],Co=(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}}}}),ko=({hidden:i,categories:a,potentialDestinations:o,onSelectNew:r,onSelectConfigured:l,isLoadingForDestinationIds:s})=>{const{destinations:d}=Y(),{selectedStreamName:u}=Ge(),{configuredDestinations:p,configuredDestinationsUpdateOnly:h}=mt(),[m,g]=n(""),[y,v]=n($o),[f,b]=n(So),x=c(()=>{const e=Et(a);return e.unshift({name:Nt.EXISTS,description:Dt[Nt.EXISTS].DESCRIPTION,icon:Pi,items:Co(d,u,new Set(p.concat(h).map(e=>e.id)))}),e.unshift({name:Nt.DETECTED,description:Dt[Nt.DETECTED].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?.toLowerCase()?.replaceAll("-"," ")===e.name.toLowerCase()?.replaceAll("-"," "),a=f.some(e=>t.supportedSignals[At[e]]?.supported);return i&&n&&a});return{...e,items:t}}).filter(({items:e})=>!!e.length)},[a,o,d,m,y,f,u,p,h]);return i?null:e(go,{children:[t(P,{title:"Choose destination",description:"Add backend destination you want to connect with Odigos."}),e(yo,{children:[t(vo,{children:t(C,{placeholder:"Search...",icon:Mi,value:m,onChange:({target:{value:e}})=>g(e)})}),t(vo,{children:t(st,{options:xo,value:y,onSelect:v,onDeselect:()=>{}})}),t(z,{title:"",selectedSignals:f,setSelectedSignals:b})]}),t(A,{}),x.length?t(fo,{children:t(mo,{items:x,onSelectNew:e=>r(e,f),onSelectConfigured:l,isLoadingForDestinationIds:s})}):t(bo,{children:t(Ae,{title:"No destinations found"})})]})},wo=p.div`
|
|
269
304
|
display: flex;
|
|
270
|
-
`,
|
|
305
|
+
`,To=p.div`
|
|
271
306
|
border-right: 1px solid ${({theme:e})=>e.colors.border};
|
|
272
307
|
padding: 32px;
|
|
273
308
|
width: 200px;
|
|
274
309
|
@media (max-width: 1050px) {
|
|
275
310
|
display: none;
|
|
276
311
|
}
|
|
277
|
-
`,
|
|
312
|
+
`,Do=({isOnboarding:i,categories:a,potentialDestinations:o,createDestination:r,updateDestination:l,deleteDestination:s,testConnection:c})=>{const{destinations:d}=Y(),{selectedStreamName:u}=Ge(),{currentModal:p,setCurrentModal:h}=ae(),{addConfiguredDestination:m,addConfiguredDestinationUpdateOnly:y,removeConfiguredDestinationUpdateOnly:v,configuredDestinationsUpdateOnly:f}=mt(),b=p===G.Destination,[x,$]=n(void 0),{formData:S,formErrors:C,handleFormChange:k,resetFormData:w,validateForm:T,setYamlFields:D,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||S.name,disabled:e?.disabled||S.disabled,dataStreamNames:e?.dataStreamNames||[],conditions:e?.conditions||[],exportedSignals:e?.exportedSignals||S.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);f.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(S)},M=()=>{w(),$(void 0),h("")},K=()=>{w(),$(void 0)},L=async()=>{if(x){if(!T({withAlert:!i,alertTitle:ne.Create}))return null;R()}M()};return V({key:"Enter",active:b},()=>L()),t(oe,{isOpen:b,onClose:M,header:{title:g.ADD_DESTINATION},actionComponent:t(ue,{buttons:(()=>{const e=[{label:"DONE",variant:"primary",onClick:L}];return x&&e.unshift({label:"BACK",icon:()=>t(zi,{rotate:-90}),variant:"secondary",onClick:K}),e})()}),children:e(wo,{children:[t(To,{children:t(Ft,{currentStep:x?2:1,data:[{stepNumber:1,title:g.DESTINATIONS},{stepNumber:2,title:g.CONNECTION}]})}),e(re,{style:{margin:"32px 24px 12px 24px"},children:[t(ko,{hidden:void 0!==x,categories:a,potentialDestinations:o,onSelectNew:(e,t)=>{w(),k("type",e?.type||""),k("currentStreamName",u);const i={logs:!1,metrics:!1,traces:!1};t.filter(t=>e.supportedSignals[At[t]].supported).forEach(e=>i[At[e]]=!0),k("exportedSignals",i),D(e?.fields||[]),$(e)},onSelectConfigured:e=>{const t=d.find(t=>t.id===e);t&&R(t)},isLoadingForDestinationIds:F}),x&&t(so,{categoryItem:x,formData:S,formErrors:C,handleFormChange:k,dynamicFields:N,setDynamicFields:E,validateForm:T,testConnection:c})]})]})})},No=p.div`
|
|
278
313
|
display: flex;
|
|
279
314
|
flex-direction: column;
|
|
280
315
|
align-items: center;
|
|
@@ -283,7 +318,7 @@ import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import{useState
|
|
|
283
318
|
max-height: calc(100vh - 310px);
|
|
284
319
|
height: fit-content;
|
|
285
320
|
overflow-y: scroll;
|
|
286
|
-
`,
|
|
321
|
+
`,Eo=({categories:e,withDelete:i})=>{const{configuredDestinations:n,configuredDestinationsUpdateOnly:a}=mt();return n.length||a.length?t(No,{children:n.concat(a).map((o,r)=>t(Ao,{"data-id":`configured-destination-${o.destinationType.type}`,item:o,yamlFields:kt(e,o),isLastItem:n.length+a.length===1,withDelete:i},`configured-destination-${o.destinationType.type}-${r}`))}):t(Ee,{children:t(Ae,{title:"No destinations",subTitle:"Please add a destination"})})},Ao=({item:a,yamlFields:o,isLastItem:r,withDelete:l})=>{const[s,d]=n(!1),{icon:u,iconSrc:p}=Ve(a.destinationType.type),{removeConfiguredDestination:h,removeConfiguredDestinationUpdateOnly:m}=mt(),g=c(()=>bt(a,o).map(e=>({title:e.name,value:e.value})),[a,o]);return e(i,{children:[t(Le,{title:a.name||a.destinationType.displayName,subTitle:a.destinationType.type,iconProps:{icon:u,iconSrc:p},visualProps:{monitors:qe(a.exportedSignals),monitorsWithLabels:!0},extendableProps:{withExtend:!0,renderExtended:()=>t(Ot,{data:g})},renderActions:l?()=>t(I,{onClick:()=>d(!0),children:t(Ni,{})}):void 0}),l&&t(U,{isOpen:s,name:a.destinationType.displayName||a.name,type:G.Destination,isLastItem:r,onApprove:()=>{a.id?m(a):h(a)},onDeny:()=>d(!1)})]})},Fo=p(Me)`
|
|
287
322
|
display: flex;
|
|
288
323
|
align-items: center;
|
|
289
324
|
justify-content: center;
|
|
@@ -292,7 +327,7 @@ import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import{useState
|
|
|
292
327
|
padding: 32px;
|
|
293
328
|
border-radius: 16px;
|
|
294
329
|
border-style: dashed !important;
|
|
295
|
-
`,
|
|
330
|
+
`,Oo=({isSourcesListEmpty:n,goToSources:a,categories:o,potentialDestinations:r,testConnection:l,onClickSummary:s})=>{const c=m(),{setCurrentModal:d}=ae(),{configuredDestinations:u,configuredDestinationsUpdateOnly:p}=mt();return e(i,{children:[t(re,{$isNotModal:!0,children:e(F,{$gap:12,children:[e(F,{$gap:24,children:[s&&t(vt,{onClick:s}),t(P,{title:g.ADD_DESTINATIONS,badgeLabel:u.length+p.length,description:g.ADD_DESTINATION_DESCRIPTION}),n&&t(le,{type:se.Warning,message:g.NO_SOURCES_GO_BACK,action:{label:g.SELECT_SOURCES,onClick:a}}),e(Fo,{variant:"secondary",onClick:()=>d(G.Destination),children:[t(Ii,{}),t(B,{color:c.colors.secondary,size:14,decoration:"underline",family:"secondary",children:g.ADD_DESTINATION})]})]}),t(Eo,{categories:o,withDelete:!0})]})}),t(Do,{isOnboarding:!0,categories:o,potentialDestinations:r,updateDestination:async()=>{},createDestination:async()=>{},deleteDestination:async()=>{},testConnection:l})]})},Io=[{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}],Ro=({metrics:i,maxHeight:n,maxWidth:a})=>{const o=m(),r=fe(),{selectedStreamName:l}=Ge(),{setDrawerType:s,setDrawerEntityId:d}=H(),{destinations:u,destinationsLoading:p}=Y(),h=c(()=>Ze(u,l),[u,l]),y=c(()=>qn({instrumentationRules:[],sources:[],actions:[],destinations:et(h,r),searchText:r.searchText,selectedCategory:G.Destination}).searchResults.find(({category:e})=>e===G.Destination)?.entities||[],[h,r]),v=c(()=>y.map(e=>{const{hasErrors:n,hasWarnings:a,hasDisableds:r}=pe(e.conditions||[]),{icon:l,iconSrc:c}=Ve(e.destinationType.type);return{status:n?se.Error:a?se.Warning:void 0,faded:r,onClick:()=>{s(G.Destination),d(e.id)},cells:[{columnKey:"icon",component:()=>t(xe,{icon:l,src:c})},{columnKey:"name",value:$e(e,G.Destination,{prioritizeDisplayName:!0})},{columnKey:"type",value:e.destinationType.type,textColor:o.text.info},{columnKey:"throughput",value:Be(It(i,G.Destination,e.id).throughput),textColor:o.text.info},{columnKey:"signals",component:()=>t(Se,{withLabels:!0,monitors:qe(e.exportedSignals)})},{columnKey:"conditions",component:()=>e.conditions?.length?t(jn,{conditions:e.conditions,id:e.id}):null},{columnKey:"active-status",component:()=>t("div",{style:{lineHeight:1},children:t(he,{status:e.disabled?se.Error:se.Success,title:e.disabled?g.DISABLED:g.ENABLED,withIcon:!0,withBorder:!0})})}]}}),[y,i]),{badge:f,badgeTooltip:b}=c(()=>y.length!==h.length?{badge:`${y.length}/${h.length}`,badgeTooltip:g.FILTERED_COUNT_TOOLTIP}:{badge:h.length,badgeTooltip:void 0},[y,h]);return e(Ce,{$maxWidth:a,children:[t(ke,{children:t(we,{icon:Te(G.Destination),title:g.DESTINATIONS,badge:f,badgeTooltip:b,loading:p})}),t(De,{$maxHeight:n,children:t(Ne,{columns:Io,rows:v})}),!y.length&&t(Ee,{style:{marginTop:"2rem"},children:t(Ae,{})})]})},Mo=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[Rt.HeaderKeys]||[]).filter(e=>e).join(", ");e&&d.push({title:"Collect",value:e})}if(c){const e=(c[Kt.Java]||[]).map(e=>new Mt(e.className,e.methodName)).map(e=>`• ${e.toString()}`).join("\r\n");e&&d.push({title:g.JAVA_CUSTOM_PROBES,value:e});const t=(c[Kt.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},Ko=p.div`
|
|
296
331
|
display: flex;
|
|
297
332
|
flex-direction: column;
|
|
298
333
|
gap: 12px;
|
|
@@ -302,7 +337,7 @@ import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import{useState
|
|
|
302
337
|
border-radius: 16px;
|
|
303
338
|
padding: 8px;
|
|
304
339
|
`}
|
|
305
|
-
`,
|
|
340
|
+
`,Lo=[{id:Pt.FilePath,label:"Collect File Path",tooltip:"Indicates whether to record the `code.filepath` attribute."},{id:Pt.Function,label:"Collect Function",tooltip:"Indicates whether to record the `code.function` attribute."},{id:Pt.LineNumber,label:"Collect Line Number",tooltip:"Indicates whether to record the `code.lineno` attribute."}],Po=[{id:Pt.Column,label:"Collect Column",tooltip:"Indicates whether to record the `code.column` attribute."},{id:Pt.Namespace,label:"Collect Namespace",tooltip:"Indicates whether to record the `code.namespace` attribute."},{id:Pt.StackTrace,label:"Collect Stacktrace",tooltip:"Indicates whether to record the `code.stacktrace` attribute."}],jo={[Kt.Java]:[new Mt("","")],[Kt.Golang]:[new Lt("")]},zo=["*"],qo=p.div`
|
|
306
341
|
display: flex;
|
|
307
342
|
flex-direction: column;
|
|
308
343
|
gap: 12px;
|
|
@@ -312,27 +347,27 @@ import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import{useState
|
|
|
312
347
|
border-radius: 16px;
|
|
313
348
|
padding: 8px;
|
|
314
349
|
`}
|
|
315
|
-
`,
|
|
350
|
+
`,Bo=[{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"}],Ho={[zt.CodeAttributes]:({value:o,setValue:r,formErrors:l})=>{const s=l.codeAttributes,d=c(()=>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(Ko,{$hasError:!!s,children:Lo.map(({id:e,label:i,tooltip:n})=>t(ye,{text:n,withIcon:!0,children:t($,{title:i,disabled:u&&d.includes(e),value:d.includes(e),onChange:t=>h(e,t)})},e))}),!!s&&t(S,{children:s})]}),e("div",{children:[t(x,{title:"Verbose data to collect",required:!0}),t(Ko,{$hasError:!!s,children:Po.map(({id:e,label:i,tooltip:n})=>t(ye,{text:n,withIcon:!0,children:t($,{title:i,disabled:u&&d.includes(e),value:d.includes(e),onChange:t=>h(e,t)})},e))}),!!s&&t(S,{children:s})]})]})},[zt.CustomInstrumentation]:({value:i,setValue:n,formErrors:o})=>{const r=o.customInstrumentations,l=c(()=>(i?.customInstrumentations?.[Kt.Java]||[]).map(e=>({key:e.className,value:e.methodName})),[i]),s=c(()=>(i?.customInstrumentations?.[Kt.Golang]||[]).map(e=>new Lt(e.packageName,e.functionName,e.receiverName,e.receiverMethodName)),[i]),d=(e,t)=>{const i={};switch(t){case"java":i[Kt.Java]=e.map(e=>new Mt(e.className,e.methodName)),i[Kt.Golang]=s.map(e=>new Lt(e.packageName,e.functionName,e.receiverName,e.receiverMethodName));break;case"golang":i[Kt.Golang]=e.map(e=>new Lt(e.packageName,e.functionName,e.receiverName,e.receiverMethodName)),i[Kt.Java]=l.map(({key:e,value:t})=>new Mt(e,t))}n("customInstrumentations",i)};return a(()=>{i?.customInstrumentations||n("customInstrumentations",{[Kt.Golang]:jo[Kt.Golang],[Kt.Java]:jo[Kt.Java]})},[n,i]),e("div",{children:[t(T,{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:s,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"})]})},[zt.HeadersCollection]:({value:e,setValue:i,formErrors:n})=>{const o=n.headersCollection,r=c(()=>e?.headersCollection?.[Rt.HeaderKeys]||[],[e]),l=e=>{const t={[Rt.HeaderKeys]:e};i("headersCollection",t)};return a(()=>{r.length||l(zo)},[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})})},[zt.PayloadCollection]:({value:i,setValue:o,formErrors:r})=>{const l=r.payloadCollection,s=c(()=>Object.entries(i.payloadCollection||{}).filter(([e,t])=>!!t).map(([e])=>e),[i]),[d,u]=n(1===s.length);return a(()=>{if(!s.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(qo,{$hasError:!!l,children:Bo.map(({id:e,label:i})=>t($,{title:i,disabled:d&&s.includes(e),value:s.includes(e),onChange:t=>((e,t)=>{const i=t?[...s,e]:s.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(S,{children:l})]})},[zt.UnknownType]:null},Vo=({ruleType:e,value:i,setValue:n,formErrors:a})=>{if(!e)return null;const o=Ho[e];return o?t(o,{value:i,setValue:n,formErrors:a}):null},Wo=p.div`
|
|
316
351
|
display: flex;
|
|
317
352
|
flex-direction: column;
|
|
318
353
|
gap: 24px;
|
|
319
354
|
padding: 4px;
|
|
320
|
-
`,
|
|
355
|
+
`,_o=p(B)`
|
|
321
356
|
margin-bottom: 12px;
|
|
322
|
-
`,
|
|
357
|
+
`,Uo=({isUpdate:n,rule:a,formData:o,formErrors:r,handleFormChange:l})=>{const s=m();return e(Wo,{children:[t(O,{children:a.supportedLanguages.map(e=>t(qt,{icon:Bt(e),type:se.Info,children:ct[e]},e))}),n?e("div",{children:[t(_o,{children:"Status"}),t(K,{options:[{icon:Ei,label:g.ENABLED,value:!1,selectedBgColor:s.text.success+L["050"]},{icon:Ai,label:g.DISABLED,value:!0,selectedBgColor:s.text.error+L["050"]}],selected:o.disabled,setSelected:e=>l("disabled",e)})]}):e(i,{children:[t(P,{title:"",description:a.docsDescription,actionButton:t(j,{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(Vo,{ruleType:a.type,value:o,setValue:(e,t)=>l(e,t),formErrors:r}),t(q,{title:"Notes",value:o.notes,onChange:({target:{value:e}})=>l("notes",e),errorMessage:r.notes})]})},Jo=p.div`
|
|
323
358
|
width: 100%;
|
|
324
359
|
height: 100%;
|
|
325
360
|
max-height: calc(100vh - 220px);
|
|
326
361
|
overflow: overlay;
|
|
327
362
|
overflow-y: auto;
|
|
328
|
-
`,
|
|
363
|
+
`,Go=p.div`
|
|
329
364
|
display: flex;
|
|
330
365
|
flex-direction: column;
|
|
331
366
|
gap: 12px;
|
|
332
|
-
`,
|
|
367
|
+
`,Yo=({updateInstrumentationRule:i,deleteInstrumentationRule:o})=>{const{instrumentationRules:r}=Y(),{addNotification:s}=Ht(),{drawerType:d,drawerEntityId:u}=H(),p=l(null),h=d===G.InstrumentationRule,[m,g]=n(!1),[y,v]=n(!1),{formData:f,formErrors:b,handleFormChange:x,resetFormData:$,validateForm:S,loadFormWithDrawerItem:C}=Vt(),k=c(()=>{if(u)return r?.find(e=>Z(e)===u)},[u,r]);if(a(()=>{h&&k?C(k):$()},[h,k]),!k)return null;const w=Wt.find(({type:e})=>e===k.type);return t(Fn,{ref:p,title:k.ruleName||k.type,icons:[He(k.type)],isEdit:m,isFormDirty:y,onEdit:e=>{k.mutable||!e&&void 0!==e?g("boolean"!=typeof e||e):s({type:se.Warning,title:ce.FORBIDDEN,message:ce.CANNOT_EDIT_RULE,crdType:G.InstrumentationRule,target:u,hideFromHistory:!0})},onSave:e=>{if(S()){const t=e!==k.type?e:"";x("ruleName",t),i(u,{...f,ruleName:t}),g(!1),v(!1)}},onDelete:()=>{k.mutable?(o(u),g(!1),v(!1),p.current?.closeDrawer()):s({type:se.Warning,title:ce.FORBIDDEN,message:ce.CANNOT_DELETE_RULE,crdType:G.InstrumentationRule,target:u,hideFromHistory:!0})},onCancel:()=>{g(!1),v(!1),C(k)},children:m&&w?t(Jo,{children:t(Uo,{isUpdate:!0,rule:w,formData:f,formErrors:b,handleFormChange:(...e)=>{v(!0),x(...e)}})}):e(Go,{children:[t(ee,{conditions:k.conditions||[]}),t(te,{title:"Instrumentation Rule Details",data:k?Mo(k):[]})]})})},Xo=p(F)`
|
|
333
368
|
margin-top: 24px;
|
|
334
369
|
gap: 12px;
|
|
335
|
-
`,
|
|
370
|
+
`,Zo=Wt,Qo=({createInstrumentationRule:i})=>{const{tier:a}=je(),o=a===_t.Onprem,{currentModal:r,setCurrentModal:l}=ae(),s=r===G.InstrumentationRule,{formData:c,formErrors:d,handleFormChange:u,resetFormData:p,validateForm:h}=Vt(),[m,y]=n(void 0),v=()=>{p(),y(void 0),l("")},f=()=>{if(!h())return null;i(c),v()};return V({key:"Enter",active:s},()=>f()),t(oe,{isOpen:s,onClose:v,header:{title:"Add Instrumentation Rule"},actionComponent:t(ue,{buttons:[{variant:"primary",label:"DONE",onClick:f,disabled:!o||!m,tooltip:o?"":ce.ENTERPRISE_ONLY("Instrumentation Rules")}]}),children:e(re,{children:[t(P,{title:"Select Instrumentation Rule",description:"Define how telemetry is recorded from your application. Choose a rule type and configure the details."}),e(Xo,{children:[t(le,o?{type:se.Warning,message:ce.DEFINED_FOR_ALL_STREAMS(g.INSTRUMENTATION_RULES)}:{type:se.Default,message:ce.ENTERPRISE_ONLY(g.INSTRUMENTATION_RULES)}),t(de,{options:Zo,selectedOption:m,onOptionSelect:e=>{return t=e,p(),void y(t);var t},autoFocus:!m?.type})]}),m?.type?e("div",{children:[t(A,{margin:"16px 0"}),t(Uo,{rule:m,formData:c,formErrors:d,handleFormChange:u})]}):null]})})},er=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(Kt).forEach(e=>{const t=(n[e]||[]).filter(e=>e).join(", ");t&&(a+=a?`, ${t}`:t)}),a},tr=[{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}],ir=({maxHeight:i,maxWidth:n})=>{const a=m(),o=fe(),{setDrawerType:r,setDrawerEntityId:l}=H(),{instrumentationRules:s,instrumentationRulesLoading:d}=Y(),u=c(()=>qn({instrumentationRules:s,sources:[],actions:[],destinations:[],searchText:o.searchText,selectedCategory:G.InstrumentationRule}).searchResults.find(({category:e})=>e===G.InstrumentationRule)?.entities||[],[s,o]),p=c(()=>u.map(e=>{const{hasErrors:i,hasWarnings:n,hasDisableds:o}=pe(e.conditions||[]);return{status:i?se.Error:n?se.Warning:void 0,faded:o,onClick:()=>{r(G.InstrumentationRule),l(e.ruleId)},cells:[{columnKey:"icon",component:()=>t(xe,{icon:He(e.type)})},{columnKey:"name",value:$e(e,G.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:er(e),textColor:a.text.info,withTooltip:!0},{columnKey:"conditions",component:()=>t(jn,{conditions:e.conditions||[],id:e.ruleId})},{columnKey:"active-status",component:()=>t("div",{style:{lineHeight:1},children:t(he,{status:e.disabled?se.Error:se.Success,title:e.disabled?g.DISABLED:g.ENABLED,withIcon:!0,withBorder:!0})})},{columnKey:"source-count",component:()=>t("div",{style:{lineHeight:1},children:t(he,{status:se.Info,title:"all sources",withBorder:!0})})}]}}),[u]),{badge:h,badgeTooltip:y}=c(()=>u.length!==s.length?{badge:`${u.length}/${s.length}`,badgeTooltip:g.FILTERED_COUNT_TOOLTIP}:{badge:s.length,badgeTooltip:void 0},[u,s]);return e(Ce,{$maxWidth:n,children:[t(ke,{children:t(we,{icon:Te(G.Action),title:g.INSTRUMENTATION_RULES,badge:h,badgeTooltip:y,loading:d})}),t(De,{$maxHeight:i,children:t(Ne,{columns:tr,rows:p})}),!u.length&&t(Ee,{style:{marginTop:"2rem"},children:t(Ae,{})})]})},nr=p.div`
|
|
336
371
|
position: fixed;
|
|
337
372
|
bottom: 0;
|
|
338
373
|
left: 50%;
|
|
@@ -346,17 +381,17 @@ import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import{useState
|
|
|
346
381
|
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
347
382
|
background-color: ${({theme:e})=>e.colors.dropdown_bg};
|
|
348
383
|
animation-name: ${Jt.in.center};
|
|
349
|
-
`,
|
|
384
|
+
`,ar=({totalSourceCount:i,uninstrumentSources:a,restartWorkloads:r})=>{const l=m(),{selectedSources:s,setSelectedSources:d}=Ke(),[u,p]=n(!1),[h,g]=n(!1),y=c(()=>{let e=0;return Object.values(s).forEach(t=>{e+=t.length}),e},[s]),v=()=>{d({})};return y?e(o,{children:[e(nr,{"data-id":"multi-source-control",children:[t(B,{children:"Selected sources"}),t(Oe,{label:y,filled:!0}),t(A,{orientation:"vertical",length:"16px"}),t(Me,{variant:"tertiary",onClick:v,children:t(B,{family:"secondary",decoration:"underline",children:"Deselect"})}),e(Me,{variant:"tertiary",onClick:()=>g(!0),children:[t(qi,{}),t(B,{family:"secondary",decoration:"underline",children:"Restart"})]}),e(Me,{variant:"tertiary",onClick:()=>p(!0),children:[t(Ni,{}),t(B,{family:"secondary",decoration:"underline",color:l.text.error,children:"Uninstrument"})]})]}),t(U,{isOpen:u,name:`${y} sources`,type:G.Source,isLastItem:y===i,onApprove:()=>{const e={};Object.entries(s).forEach(([t,i])=>{e[t]=i.map(e=>({...e,selected:!1}))}),a(e),p(!1),v()},onDeny:()=>p(!1)}),t(Ut,{isOpen:h,title:"Rollout Restart Workloads",description:"Are you sure you want to rollout restart these workloads?",approveButton:{text:"Confirm",variant:se.Warning,onClick:()=>{const e=[];Object.values(s).forEach(t=>{e.push(...t.map(e=>Gt(e)))}),r(e),v()}},denyButton:{text:"Go Back",onClick:()=>g(!1)}})]}):null},or=p.div`
|
|
350
385
|
position: relative;
|
|
351
386
|
width: fit-content;
|
|
352
|
-
`,
|
|
387
|
+
`,rr=p(O)`
|
|
353
388
|
gap: 12px;
|
|
354
389
|
padding: 0 12px;
|
|
355
|
-
`,
|
|
390
|
+
`,lr=p(F)`
|
|
356
391
|
gap: 12px;
|
|
357
392
|
max-height: 400px;
|
|
358
393
|
overflow-y: auto;
|
|
359
|
-
`,
|
|
394
|
+
`,sr=p.div`
|
|
360
395
|
position: absolute;
|
|
361
396
|
bottom: 0;
|
|
362
397
|
left: 0;
|
|
@@ -365,19 +400,19 @@ import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import{useState
|
|
|
365
400
|
border-radius: 0 0 24px 24px;
|
|
366
401
|
background: ${({theme:e})=>`linear-gradient(to top, ${e.colors.dropdown_bg}, transparent)`};
|
|
367
402
|
pointer-events: none;
|
|
368
|
-
`,
|
|
403
|
+
`,cr=p(B)`
|
|
369
404
|
background-color: ${({theme:e})=>e.colors.orange_soft};
|
|
370
405
|
color: ${({theme:e})=>e.text.primary};
|
|
371
406
|
border-radius: 32px;
|
|
372
407
|
width: fit-content;
|
|
373
408
|
padding: 2px 8px;
|
|
374
|
-
`,
|
|
409
|
+
`,dr=()=>{const i=m(),{notifications:n,markAsSeen:a}=Ht(),o=n.filter(({hideFromHistory:e})=>!e),r=o.filter(({seen:e})=>!e),l=r.length,{popupRef:s,popupOpen:c,setPopupOpen:d,popupPosition:u,handlePosition:p}=it({defaultClientHeight:420,defaultClientwidth:400,onClickOutside:()=>{l&&r.forEach(({id:e})=>a(e))}});return e(or,{children:[t(I,{onClick:()=>{p(0,0),d(e=>!e)},tooltip:"Notifications",withPing:!!l,pingColor:i.colors.orange_og,children:t(Bi,{size:18})}),e(nt,{ref:s,isOpen:c,right:u.left,maxWidth:"400px",header:e(rr,{children:[t(B,{size:20,children:"Notifications"}),!!l&&e(cr,{size:12,family:"secondary",children:[l," new"]})]}),children:[t(lr,{children:o.length?o.map(e=>t(yr,{...e,onClick:()=>d(!1)},`notification-${e.id}`)):t(Ae,{title:"No notifications",subTitle:""})}),t(sr,{})]})]})},ur=p.div`
|
|
375
410
|
display: flex;
|
|
376
411
|
align-items: flex-start;
|
|
377
412
|
gap: 12px;
|
|
378
413
|
padding: 16px;
|
|
379
414
|
border-radius: 16px;
|
|
380
|
-
background-color: ${({theme:e})=>e.colors.dropdown_bg_2+
|
|
415
|
+
background-color: ${({theme:e})=>e.colors.dropdown_bg_2+L["080"]};
|
|
381
416
|
cursor: not-allowed;
|
|
382
417
|
&.click-enabled {
|
|
383
418
|
cursor: pointer;
|
|
@@ -385,32 +420,32 @@ import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import{useState
|
|
|
385
420
|
background-color: ${({theme:e})=>e.colors.dropdown_bg_2};
|
|
386
421
|
}
|
|
387
422
|
}
|
|
388
|
-
`,
|
|
389
|
-
background-color: ${({$type:e,theme:t})=>t.text[e]+
|
|
423
|
+
`,pr=p.div`
|
|
424
|
+
background-color: ${({$type:e,theme:t})=>t.text[e]+L["015"]};
|
|
390
425
|
border-radius: 8px;
|
|
391
426
|
width: 36px;
|
|
392
427
|
height: 36px;
|
|
393
428
|
display: flex;
|
|
394
429
|
align-items: center;
|
|
395
430
|
justify-content: center;
|
|
396
|
-
`,
|
|
431
|
+
`,hr=p.div`
|
|
397
432
|
width: 290px;
|
|
398
|
-
`,
|
|
433
|
+
`,mr=p.div`
|
|
399
434
|
margin-bottom: 6px;
|
|
400
|
-
`,
|
|
435
|
+
`,gr=p.div`
|
|
401
436
|
display: flex;
|
|
402
437
|
align-items: center;
|
|
403
438
|
gap: 6px;
|
|
404
|
-
`,
|
|
439
|
+
`,yr=({id:n,seen:a,type:o,title:r,message:l,time:s,crdType:c,target:d,onClick:u})=>{const p=m(),{formatTimeAgo:h}=Yt(),{onClickNotification:g}=Xt(),y=!!c&&!!d,v=r?.toLowerCase().includes(ne.Delete.toLowerCase())||!1,f=ve(o,p);return e(ur,{className:y?"click-enabled":"",onClick:()=>{y&&(u(),g({id:n,crdType:c,target:d}))},children:[t(pr,{$type:v?se.Error:o,children:t(v?Ni:f,{})}),e(hr,{children:[t(mr,{children:t(B,{size:14,children:l})}),e(gr,{children:[t(B,{size:10,color:p.text.grey,children:h(s)}),!a&&e(i,{children:[t(B,{size:10,children:"·"}),t(B,{size:10,color:p.colors.orange_soft,children:"new"})]})]})]})]},`notification-${n}`)},vr=(e,t,i)=>{const n=e?.serviceName||t?.otelServiceName||t?.name,a=i?[Hi]:t?We(t):[],{priorotizedStatus:o}=pe(t?.conditions||[]);return{id:n,title:n,icons:a.length?a:[Vi],status:o,serviceMapEntry:e}},fr=e=>"user"===e?.otelServiceName&&!e?.namespace&&!e?.name&&!e?.kind,br=p.div`
|
|
405
440
|
width: 100%;
|
|
406
441
|
height: ${({$heightToRemove:e})=>`calc(100vh - ${e}px)`};
|
|
407
442
|
position: relative;
|
|
408
|
-
`,
|
|
443
|
+
`,xr={namespace:"",name:"",kind:"",otelServiceName:"user",selected:!0,numberOfInstances:0,dataStreamNames:[],containers:[],conditions:[]},$r=({heightToRemove:e,serviceMap:i})=>{const n=m(),{sources:o,sourcesLoading:r}=Y(),{containerRef:l,containerHeight:s,containerWidth:c}=Ye(),[d,u,p]=nn([]),[h,y,v]=an([]);return a(()=>{if(s&&c){const t=(({sources:e,serviceMap:t,containerHeight:i,containerWidth:n})=>{const a=[],o=new Map,r=((e,t)=>{const i=new Map,n=new Map,a=new Map,o=new Set;e.forEach(e=>{o.add(e.serviceName),e.services.forEach(e=>{o.add(e.serviceName)})}),o.forEach(e=>{n.set(e,[]),a.set(e,0)}),e.forEach(e=>{e.services.forEach(t=>{n.get(e.serviceName)?.push(t.serviceName);const i=a.get(t.serviceName)||0;a.set(t.serviceName,i+1)})});const r=[],l=[];for(o.forEach(e=>{0===(a.get(e)||0)&&l.push(e)});l.length>0;){const e=[],t=l.length;for(let i=0;i<t;i++){const t=l.shift();e.push(t),n.get(t)?.forEach(e=>{const t=a.get(e)||0;a.set(e,t-1),t-1==0&&l.push(e)})}e.length>0&&r.push(e)}return o.forEach(e=>{r.flat().includes(e)||(0===r.length?r.push([e]):r[r.length-1].push(e))}),r.forEach((e,n)=>{const a=100+150*n,o=150*(e.length-1),r=(t-o)/2;e.forEach((e,t)=>{const n=r+150*t,o=a;i.set(e,{x:n,y:o})})}),i})(t,n);if(t.length&&e.length){t.forEach(t=>{const i=t.serviceName;if(a.find(e=>e.id===`${G.Source}-${i}-${Zt.MapItem}`))return;const n=e.find(e=>i===e.otelServiceName||i===e.name);o.set(i,t),t.services.forEach(e=>o.set(e.serviceName,{serviceName:e.serviceName,services:[]})),a.push({id:`${G.Source}-${i}-${Zt.MapItem}`,type:Zt.MapItem,position:r.get(i),data:vr(t,n,fr(n))})}),o.forEach((t,i)=>{if(a.find(e=>e.id===`${G.Source}-${i}-${Zt.MapItem}`))return;const n=e.find(e=>i===e.otelServiceName||i===e.name);a.push({id:`${G.Source}-${i}-${Zt.MapItem}`,type:Zt.MapItem,position:r.get(i),data:vr(t,n,fr(n))})});let i=50;e.forEach(e=>{const t=e.otelServiceName||e.name;a.find(e=>e.id===`${G.Source}-${t}-${Zt.MapItem}`)||(a.push({id:`${G.Source}-${t}-${Zt.MapItem}`,type:Zt.MapItem,position:{x:i,y:10},data:vr(void 0,e,fr(e))}),i+=110)})}else a.push({id:`${G.Source}-${Zt.NoData}`,type:Zt.NoData,position:{x:n/2-150,y:i/4},data:{subTitle:g.ARE_SERVICES_INSTRUMENTED_AND_PRODUCING_TRAFFIC}});return a})({serviceMap:i,sources:[xr].concat(o),containerHeight:s,containerWidth:c});d.length>1?(e=t,u(t=>{const i=e.map(e=>{const i=t.find(t=>t.id===e.id);return e.position=i?.position||e.position,{id:e.id,item:e,type:i?"replace":"add"}});return t.find(e=>e.id===`${G.Source}-${Zt.NoData}`)&&i.push({id:`${G.Source}-${Zt.NoData}`,type:"remove"}),on(i,t)})):u(t)}var e},[i,o,r,s,c]),a(()=>{y((({theme:e,nodes:t,serviceMap:i})=>{const n=[];return t.forEach(({id:t,data:{id:a,status:o}})=>{const{services:r}=i.find(e=>e.serviceName===a)||{services:[]};r.forEach(i=>{const a=t,r=`${G.Source}-${i.serviceName}-${Zt.MapItem}`,l=o===se.Error;n.push({id:`${a}-to-${r}`,source:a,target:r,markerEnd:{type:tn.ArrowClosed},style:{stroke:l?e?.colors.dark_red:e?.colors.border}})})}),n})({theme:n,nodes:d,serviceMap:i}))},[n,d,i]),t(br,{ref:l,$heightToRemove:e,children:t(Qt,{nodes:d,edges:h,onNodesChange:p,onEdgesChange:v,zoomOnScroll:!0})})},Sr=p.div`
|
|
409
444
|
width: 100%;
|
|
410
445
|
padding-bottom: ${({$isOpen:e})=>e?"18px":"0"};
|
|
411
446
|
border-radius: 16px;
|
|
412
|
-
background-color: ${({$selected:e,theme:t})=>e?t.colors.majestic_blue+
|
|
413
|
-
`,
|
|
447
|
+
background-color: ${({$selected:e,theme:t})=>e?t.colors.majestic_blue+L["024"]:t.colors.dropdown_bg_2+L["040"]};
|
|
448
|
+
`,Cr=p.div`
|
|
414
449
|
display: flex;
|
|
415
450
|
justify-content: space-between;
|
|
416
451
|
gap: 12px;
|
|
@@ -419,29 +454,29 @@ import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import{useState
|
|
|
419
454
|
border-radius: 16px;
|
|
420
455
|
cursor: ${({$withClick:e})=>e?"pointer":"unset"};
|
|
421
456
|
&:hover {
|
|
422
|
-
background-color: ${({$withClick:e,$selected:t,theme:i})=>e&&(t?i.colors.majestic_blue+
|
|
457
|
+
background-color: ${({$withClick:e,$selected:t,theme:i})=>e&&(t?i.colors.majestic_blue+L["040"]:i.colors.dropdown_bg_2+L["080"])};
|
|
423
458
|
transition: background-color 0.3s;
|
|
424
459
|
}
|
|
425
|
-
`,
|
|
460
|
+
`,kr=p(Cr)`
|
|
426
461
|
width: calc(100% - 100px);
|
|
427
462
|
margin: 0 auto;
|
|
428
463
|
padding: 8px;
|
|
429
|
-
`,
|
|
464
|
+
`,wr=p.div`
|
|
430
465
|
position: relative;
|
|
431
466
|
padding-bottom: ${({$addPadding:e})=>e?"16px":"0"};
|
|
432
|
-
`,
|
|
467
|
+
`,Tr=p.div`
|
|
433
468
|
position: absolute;
|
|
434
469
|
top: 6px;
|
|
435
470
|
left: 18px;
|
|
436
|
-
`,
|
|
471
|
+
`,Dr=p(Ee)`
|
|
437
472
|
padding-bottom: ${({$addPadding:e})=>e?"16px":"0"};
|
|
438
|
-
`,
|
|
473
|
+
`,Nr=p.div`
|
|
439
474
|
width: ${({$width:e})=>`${e||42}px`};
|
|
440
475
|
display: flex;
|
|
441
476
|
align-items: center;
|
|
442
477
|
justify-content: flex-end;
|
|
443
478
|
text-align: right;
|
|
444
|
-
`,
|
|
479
|
+
`,Er=Te(G.Namespace),Ar=({isModal:i=!1,withInstances:n=!0,loading:a,filteredNamespacesAndSources:o,selectedNamespace:r,onSelectNamespace:l,selectedSources:s,onSelectSource:c,selectedFutureApps:d,onSelectFutureApps:u})=>{const p=m(),{isVm:h}=je(),{namespacesLoading:y}=Y(),v=Object.entries(o||{});return v?.length?t(ze,{height:i?"calc(100vh - 510px)":"calc(100vh - 310px)",gap:12,noAnimation:!0,elements:v.map(([i,o])=>{const m=s?.[i]||[],v=d?.[i]?.selected||!1,f=m.filter(({selected:e})=>e),b=m.length>0,x=r===i,S=f.length>0&&f.length===o.length,C=f.length>0&&f.length!==o.length,k=o.length>0,w=1===o.length;return l||k?e(Sr,{"data-id":`namespace-${i}`,$selected:S,$isOpen:x,children:[e(Cr,{$selected:S,$withClick:!!l,onClick:()=>l?.(i),children:[e(O,{$gap:12,children:[l&&t($,{partiallyChecked:C,value:S,onChange:e=>l(i,e)}),t(Er,{}),t(B,{children:i})]}),e(O,{$gap:24,children:[!h&&u&&t(D,{title:g.FUTURE_APPS_TITLE,tooltip:g.FUTURE_APPS_DESCRIPTION,initialValue:v,onChange:e=>u(e,i),flipHorizontally:!0}),t(Nr,{children:t(B,{size:10,color:p.text.grey,children:b?`${f.length}/${o.length}`:null})}),l&&t(yt,{extend:x})]})]}),(x||!l)&&(k?e(wr,{$addPadding:!c,children:[t(Tr,{children:t(A,{orientation:"vertical",length:(w?24:34*o.length)+"px"})}),o.map(e=>{const a=f.some(({name:t})=>t===e.name);return t(Fr,{withInstances:n,source:e,namespace:i,isSelected:a,onSelect:c},`source-${e.name}`)})]}):t(Dr,{$addPadding:!c,children:y||a?t(Re,{}):t(Ae,{title:g.NO_SOURCES_NAMESPACE,subTitle:g.TRY_SEARCH_OR_OTHER_NAMESPACE})}))]},`namespace-${i}`):null})}):t(Ee,{children:y||a?t(Re,{}):t(Ae,{title:g.NO_SOURCES,subTitle:!h&&l?g.PLEASE_MAKE_SURE_UNIGNORED_NAMESPACES:g.PLEASE_ADD_SOURCE})})},Fr=({withInstances:i,source:n,namespace:a,isSelected:o,onSelect:r})=>t(kr,{"data-id":`source-${n.name}`,$selected:o,$withClick:!!r,onClick:()=>r?.(n),children:e(O,{$gap:12,children:[r&&t($,{value:o,onChange:()=>r(n,a)}),e(O,{$gap:4,children:[t(B,{children:n.name}),e(B,{opacity:.8,size:10,children:[i?` • ${n.numberOfInstances||0} running instance${1!==n.numberOfInstances?"s":""}`:"",` • ${n.kind}`]})]})]})}),Or=p.div`
|
|
445
480
|
display: flex;
|
|
446
481
|
flex-direction: column;
|
|
447
482
|
align-items: center;
|
|
@@ -450,35 +485,35 @@ import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import{useState
|
|
|
450
485
|
max-height: calc(100vh - 200px);
|
|
451
486
|
height: fit-content;
|
|
452
487
|
overflow-y: scroll;
|
|
453
|
-
|
|
488
|
+
`,Ir=({onEditStream:i,onEditSources:n,onEditDestinations:a,categories:o})=>{const{selectedStreamName:r}=Ge(),{configuredSources:l,configuredDestinations:s,configuredDestinationsUpdateOnly:d}=mt(),u=c(()=>Object.values(l).reduce((e,t)=>e+t.filter(e=>e.selected).length,0),[l]);return t(re,{$isNotModal:!0,children:e(F,{$gap:12,children:[t(P,{title:g.SUMMARY,description:g.STREAM_CONFIRM}),e(Or,{children:[t(te,{title:g.STREAM_NAME,action:()=>t(ei,{onClick:i}),data:[{title:"",value:r}]}),t(te,{title:g.SELECTED_SOURCES,titleBadge:u,action:()=>t(ei,{onClick:n}),children:t(Ar,{filteredNamespacesAndSources:l,withInstances:!1})}),t(te,{title:g.SELECTED_DESTINATIONS,titleBadge:s.length+d.length,action:()=>t(ei,{onClick:a}),children:t(Eo,{categories:o})})]})]})})};var Rr;!function(e){e.Overview="overview",e.InstrumentationRules="InstrumentationRule",e.Sources="Source",e.Actions="Action",e.Destinations="Destination"}(Rr||(Rr={}));const Mr=({onClickId:e,defaultSelectedId:i,extendedNavIcons:a})=>{const{isVm:o}=je(),[r,l]=n(i||""),s=c(()=>[{id:Rr.Overview,icon:Wi,selected:r===Rr.Overview,onClick:()=>{l(Rr.Overview),e(Rr.Overview)},tooltip:"Overview"},...(a||[]).map(e=>({...e,selected:r===e.id,onClick:()=>{l(e.id),e.onClick()}}))],[r]),d=c(()=>{const t=[{id:Rr.Sources,icon:_i,selected:r===Rr.Sources,onClick:()=>{l(Rr.Sources),e(Rr.Sources)},tooltip:"Sources"},{id:Rr.Destinations,icon:Ui,selected:r===Rr.Destinations,onClick:()=>{l(Rr.Destinations),e(Rr.Destinations)},tooltip:"Destinations"}];return o||(t.push({id:Rr.InstrumentationRules,icon:Ji,selected:r===Rr.InstrumentationRules,onClick:()=>{l(Rr.InstrumentationRules),e(Rr.InstrumentationRules)},tooltip:"Instrumentation Rules"}),t.push({id:Rr.Actions,icon:Gi,selected:r===Rr.Actions,onClick:()=>{l(Rr.Actions),e(Rr.Actions)},tooltip:"Actions"})),t},[o,r]);return t(ti,{orientation:"vertical",mainIcons:s,subIcons:d})},Kr=({})=>t(I,{onClick:()=>window.open("https://join.slack.com/t/odigos/shared_invite/zt-2wc6gm4j9-EhcVFYrLwHqvcIErO9sVzw","_blank","noopener noreferrer"),tooltip:"Join our Slack community",children:t(Yi,{})}),Lr=(e,t)=>{const{name:i,kind:n,namespace:a}=e,o=[{title:g.KIND,value:n},{title:g.NAME,value:i,tooltip:"Resource name"}];return t||(o.unshift({title:g.NAMESPACE,value:a}),o.push({type:y.Divider}),o.push({type:y.CopyText,value:`kubectl get ${n} ${i} -n ${a}`.toLowerCase()})),o},Pr=p.div`
|
|
454
489
|
display: flex;
|
|
455
490
|
flex-direction: column;
|
|
456
491
|
gap: 24px;
|
|
457
492
|
padding: 4px;
|
|
458
|
-
`,
|
|
493
|
+
`,jr=({formData:e,handleFormChange:i})=>t(Pr,{children:t(C,{name:"sourceName",title:"Source name",tooltip:"This overrides the default service name that runs in your cluster.",placeholder:"Use a name that overrides the source name",value:e.otelServiceName,onChange:({target:{value:e}})=>i("otelServiceName",e)})}),zr=({workloadOdigosHealthStatus:e})=>{if(!e)return null;const i=ii(e?.status),n=lt(e?.reasonEnum),a=e?.message;return t(O,{$alignItems:"center",$justifyContent:"center",children:t(he,{status:i,title:n,subtitle:a,withBackground:i!==me.Disabled,withBorder:!0,withIcon:!0,width:"calc(100% - 24px)"})})},qr=({source:i,fetchSourceDescribe:o,onClickRestartPod:r})=>{const[l,s]=n(!1),[c,d]=n(null);return a(()=>{i&&o({namespace:i.namespace,name:i.name,kind:i.kind}).then(({data:e})=>{e?.describeSource?d(e.describeSource):s(!0)})},[i.namespace,i.name,i.kind]),c||l?t(F,{$gap:12,children:l?t(Ee,{$height:"70vh",children:t(Ae,{subTitle:"Could not fetch describe for this source"})}):c?.pods?.length?c.pods.map(({podName:n,nodeName:a,phase:o,agentInjected:l,runningLatestWorkloadRevision:s,containers:d,manifestYAML:p})=>{const h=o.status!==se.Success||ni(d)?se.Error:se.Success,m=[];return m.push(t(ai,{value:`kubectl get pod ${n.value} -n ${c?.namespace?.value||i.namespace}`.toLowerCase()},"copy-text")),m.push(t(A,{length:"100%",margin:"0"},"divider-1")),m.push(t(oi,{title:a.name,tooltip:a.explain||"",value:{status:a.status||void 0,text:a.value}},"describe-row-1")),m.push(t(A,{length:"100%",margin:"0"},"divider-2")),m.push(t(oi,{title:o.name,tooltip:o.explain||"",value:{status:o.status||void 0,text:o.value}},"describe-row-2")),m.push(t(A,{length:"100%",margin:"0"},"divider-3")),m.push(t(oi,{title:l.name,tooltip:l.explain||"",value:{status:l.status||void 0,text:l.value}},"describe-row-3")),m.push(t(A,{length:"100%",margin:"0"},"divider-4")),s?.name&&(m.push(t(oi,{title:s.name,tooltip:s.explain||void 0,value:{status:s.status||void 0,text:s.value}},"describe-row-4")),m.push(t(A,{length:"100%",margin:"0"},"divider-5"))),d.forEach(e=>{m.push(t(ri,{...e},`pod-container-${e.containerName.value}`))}),p&&(m.push(t(A,{length:"100%",margin:"0"},"divider-6")),m.push(t(rn,{yaml:p},"yaml-section-card"))),t(te,{title:`Pod: ${n.value}`,withExtend:!0,action:({hovered:a})=>e("div",{style:{position:"relative"},children:[t(he,{status:h,title:h,withIcon:!0,withBorder:!0},"status"),a&&t(li,{isOpen:!0,positionRight:"calc(100% + 12px)",actions:r?[{id:si(),label:"Restart",rightIcon:Ri,onClick:()=>r(c?.namespace?.value||i.namespace,n.value)}]:[]},"hover-actions")]}),children:u.toArray(m)},`pod-${n.value}`)}):t(Ee,{$height:"70vh",children:t(Ae,{subTitle:"Check if you have any running pods and try again"})})}):t(Ee,{$height:"70vh",children:t(Re,{})})},Br=p(O)`
|
|
459
494
|
width: 100%;
|
|
460
495
|
align-items: center;
|
|
461
496
|
justify-content: space-between;
|
|
462
|
-
`,
|
|
497
|
+
`,Hr=({source:i,fetchSourceLibraries:r})=>{const l=m(),[s,c]=n(!1),[d,u]=n(null);return a(()=>{i&&r({namespace:i.namespace,name:i.name,kind:i.kind}).then(({data:e})=>{e?.instrumentationInstanceComponents?u(Et(e.instrumentationInstanceComponents).sort((e,t)=>e.name.localeCompare(t.name))):c(!0)})},[i.namespace,i.name,i.kind]),d||s?t(F,{$gap:12,children:s?t(Ee,{$height:"70vh",children:t(Ae,{subTitle:"Could not fetch libraries for this source"})}):d?.length?t(te,{title:"Instrumented Libraries",children:d.map(({name:i,healthy:n,message:a,nonIdentifyingAttributes:r},s)=>e(o,{children:[e(F,{$gap:4,$width:"100%",children:[e(Br,{$width:"100%",children:[t(B,{size:12,color:l.text.grey,children:i}),e(O,{$gap:4,children:[r.map(({key:e,value:n})=>ci(n)&&di(n)&&"is_standard_lib"===e?t(he,{status:se.Default,title:"STANDARD",withBorder:!0},`${i}-${e}`):null),"boolean"==typeof n&&t(he,{status:n?se.Success:se.Error,title:n?"HEALTHY":"UNHEALTHY",withBorder:!0})]})]}),a&&t(B,{size:10,color:l.text.error,align:"right",children:a})]}),s!==d.length-1&&t(A,{length:"100%",margin:"0"})]},`library-${i}`))}):e(Ee,{$height:"70vh",$gap:12,children:[t(Ae,{title:"No libraries found",subTitle:""}),t(le,{type:se.Warning,message:"This feature is in early development, and has very limited support"})]})}):t(Ee,{$height:"70vh",children:t(Re,{})})};var Vr;!function(e){e.Overview="Overview",e.Pods="Pods",e.Libraries="Libraries"}(Vr||(Vr={}));const Wr=[pi.Deployment,pi.StatefulSet,pi.DaemonSet,pi.DeploymentConfig,pi.Rollout,pi.StaticPod],_r=[pi.Deployment,pi.StatefulSet,pi.DaemonSet,pi.DeploymentConfig,pi.Rollout,pi.Pod],Ur=[hi.Python,hi.Go,hi.Java],Jr=p.div`
|
|
463
498
|
width: 100%;
|
|
464
499
|
height: 100%;
|
|
465
500
|
max-height: calc(100vh - 220px);
|
|
466
501
|
overflow: overlay;
|
|
467
502
|
overflow-y: auto;
|
|
468
|
-
`,
|
|
503
|
+
`,Gr=p.div`
|
|
469
504
|
display: flex;
|
|
470
505
|
flex-direction: column;
|
|
471
506
|
gap: 12px;
|
|
472
|
-
`;var
|
|
507
|
+
`;var Yr;!function(e){e.Workload="Workload",e.Pod="Pod"}(Yr||(Yr={}));const Xr=({persistSources:o,updateSource:r,restartWorkloads:s,fetchSourceById:d,fetchSourceDescribe:u,fetchSourceLibraries:p,restartPod:h,recoverFromRollback:m})=>{const{isVm:y}=je(),{sources:v}=Y(),{selectedStreamName:f}=Ge(),{drawerType:b,drawerEntityId:x}=H(),$=c(()=>Xe(v,f),[v,f]),S=l(null),C=b===G.Source,[k,w]=n(!1),[T,D]=n(!1),[N,E]=n(Vr.Overview),[A,F]=n(null);a(()=>{C&&x&&d(x).then(e=>F(e||null))},[C,x]);const{formData:O,handleFormChange:I,resetFormData:R,loadFormWithDrawerItem:M}=ui(),K=c(()=>{if(x)return A&&JSON.stringify(Gt(A))===JSON.stringify(Gt(x))?A:$?.find(e=>JSON.stringify(Gt(e))===JSON.stringify(Gt(x)))},[x,$,A]);a(()=>{C&&K?M(K):R()},[C,K]);const L=c(()=>{const e=K?.conditions?.find(({type:e})=>"RuntimeDetection"===e);return{description:e?.message,isLoading:e?.status===me.Loading,containers:K?.containers||[]}},[K]),P=c(()=>!!K?.rollbackOccurred,[K?.rollbackOccurred]),j=c(()=>{const e=[{label:Vr.Overview,onClick:()=>E(Vr.Overview),selected:N===Vr.Overview}];return y||(Wr.includes(K?.kind)&&e.push({label:Vr.Pods,onClick:()=>E(Vr.Pods),selected:N===Vr.Pods}),K?.containers?.some(({language:e})=>Ur.includes(e))&&e.push({label:Vr.Libraries,onClick:()=>E(Vr.Libraries),selected:N===Vr.Libraries})),e},[N,K,y]),z=_r.includes(K?.kind),[q,V]=n({openFor:null,workloadId:void 0,podNamespace:void 0,podName:void 0});return K?e(Fn,{ref:S,onClose:()=>{E(Vr.Overview),F(null)},title:K.otelServiceName||K.name,titleTooltip:"This attribute is used to identify the name of the service (service.name) that is generating telemetry data.",hideEditTitleFromEdit:!0,icons:We(K),isEdit:k,isFormDirty:T,onEdit:N===Vr.Overview?e=>{w("boolean"!=typeof e||e)}:void 0,onSave:async()=>{const e=O.otelServiceName!==K.name?O.otelServiceName:"";I("otelServiceName",e),await r(x,{...O,otelServiceName:e}),F(null),D(!1),w(!1)},onDelete:N===Vr.Overview?async()=>{const{namespace:e}=K;o({[e]:[{...K,selected:!1,currentStreamName:f}]},{}),F(null),D(!1),w(!1),S.current?.closeDrawer()}:void 0,onCancel:()=>{D(!1),w(!1),I("otelServiceName",K.otelServiceName||K.name||"")},isLastItem:1===$.length,tabs:j,headerActionButtons:y?[]:z?[{"data-id":"rollout-restart",variant:"tertiary",onClick:()=>V({openFor:Yr.Workload,workloadId:x}),children:e(i,{children:[t(qi,{}),t(B,{size:14,family:"secondary",decoration:"underline",children:"Restart"})]})}]:[],children:[N===Vr.Overview?k?t(Jr,{children:t(jr,{formData:O,handleFormChange:(...e)=>{D(!0),I(...e),I("currentStreamName",f)}})}):e(Gr,{children:[t(zr,{workloadOdigosHealthStatus:K.workloadOdigosHealthStatus}),P&&t(le,{type:se.Warning,message:g.ROLLBACK_OCCURRED_MESSAGE,action:{label:g.ROLLBACK_RECOVER,onClick:async()=>{await m(x);const e=await d(x);e&&F(e)}}}),t(ee,{conditions:K.conditions||[]}),t(te,{title:g.SOURCE_DETAILS,data:K?Lr(K,y):[]}),t(te,{title:y?g.DETECTED_PROCESSES:g.DETECTED_CONTAINERS,titleBadge:L.isLoading?me.Loading:L.containers.length,description:L.description||(y?g.DETECTED_PROCESSES_DESCRIPTION:g.DETECTED_CONTAINERS_DESCRIPTION),children:L.containers.map(e=>t(mi,{...e,callbackRuntimeOverride:e=>r(x,e)},`source-container-${e.containerName}`))}),K.manifestYAML&&t(rn,{title:`${K.kind} YAML`,yaml:K.manifestYAML,defaultOpen:!K.instrumentationConfigYAML}),K.instrumentationConfigYAML&&t(rn,{title:"Instrumentation Config YAML",yaml:K.instrumentationConfigYAML,defaultOpen:!K.manifestYAML})]}):N===Vr.Pods?t(qr,{source:K,fetchSourceDescribe:u,onClickRestartPod:z?(e,t)=>V({openFor:Yr.Pod,podNamespace:e,podName:t}):void 0}):t(Hr,{source:K,fetchSourceLibraries:p}),t(Ut,{isOpen:!!q.openFor,title:`Rollout Restart ${q.openFor}`,description:`Are you sure you want to rollout restart this ${q.openFor?.toLowerCase()}?`,approveButton:{text:"Confirm",variant:se.Warning,onClick:()=>{q.openFor===Yr.Workload&&q.workloadId?s([q.workloadId]):q.openFor===Yr.Pod&&q.podNamespace&&q.podName&&h(q.podNamespace,q.podName),V({openFor:null})}},denyButton:{text:"Go Back",onClick:()=>{V({openFor:null})}}})]}):null},Zr=p.div`
|
|
473
508
|
max-width: ${({$fullWidth:e})=>e?"unset":"420px"};
|
|
474
509
|
width: 100%;
|
|
475
|
-
`,
|
|
510
|
+
`,Qr=r(({isModal:i,fetchNamespacesWithWorkloads:n,onClickSummary:a},o)=>{const r=m(),{isVm:l}=je(),c=gi({fetchNamespacesWithWorkloads:n}),{selectedSources:d,loading:u,selectedAllNamespaces:p,onSelectAllNamespaces:h,getApiSourcesPayload:y,getApiFutureAppsPayload:v,searchText:f,setSearchText:b,searchBy:x,setSearchBy:$,showSelectedOnly:S,setShowSelectedOnly:k,showRunningOnly:w,setShowRunningOnly:T}=c;s(o,()=>({getFormValues:()=>({apps:y(),futureApps:v()})}));const N=Object.values(d).reduce((e,t)=>e+t.filter(e=>e.selected).length,0);return t(re,{$isNotModal:!i,children:e(F,{$gap:12,children:[e(F,{$gap:24,children:[a&&t(vt,{onClick:a}),t(P,{title:g.SELECT_SOURCES,badgeLabel:N,description:g.SELECT_SOURCES_DESCRIPTION}),e(O,{$justifyContent:"space-between",children:[t(Zr,{$fullWidth:l,children:t(C,{placeholder:x===G.Source?g.SEARCH_SOURCES:g.SEARCH_NAMESPACES,icon:Mi,value:f,onChange:e=>b(e.target.value.toLowerCase())})}),!l&&t(K,{options:[{label:g.SOURCE,value:G.Source,selectedBgColor:r.text.secondary,selectedTextColor:r.text.primary},{label:g.NAMESPACE,value:G.Namespace,selectedBgColor:r.text.secondary,selectedTextColor:r.text.primary}],selected:x,setSelected:$})]}),e(O,{$gap:36,children:[t(D,{title:g.SELECT_ALL,initialValue:p,onChange:h,disabled:u}),t(D,{title:g.ONLY_SELECTED,initialValue:S,onChange:k}),t(D,{title:g.ONLY_RUNNING_INSTANCES,initialValue:w,onChange:T})]})]}),t(A,{}),t(Ar,{isModal:i,...c})]})})});Qr.displayName=Qr.name;const el=({fetchNamespacesWithWorkloads:e,persistSources:i})=>{const{currentModal:n,setCurrentModal:a}=ae(),o=n===G.Source,r=()=>{a("")},s=async()=>{if(c.current){const{apps:e,futureApps:t}=c.current.getFormValues();i(e,t),r()}},c=l(null);return V({key:"Enter",active:o},s),o?t(oe,{isOpen:o,onClose:r,header:{title:"Add Source"},actionComponent:t(ue,{buttons:[{label:"DONE",variant:"primary",onClick:s}]}),children:t(Qr,{ref:c,isModal:!0,fetchNamespacesWithWorkloads:e})}):null},tl=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},il=({metrics:i,maxHeight:n,maxWidth:a})=>{const o=m(),{isVm:r}=je(),l=fe(),{selectedStreamName:s}=Ge(),{sources:u,sourcesLoading:p}=Y(),{setDrawerType:h,setDrawerEntityId:y}=H(),{selectedSources:v,setSelectedSources:f}=Ke(),{progress:b}=_e(),x=c(()=>b[Ue.Instrumenting]||b[Ue.Uninstrumenting]?b[Ue.Instrumenting]?.percentage||b[Ue.Uninstrumenting]?.percentage||0:void 0,[b[Ue.Instrumenting],b[Ue.Uninstrumenting]]),S=c(()=>Xe(u,s),[u,s]),C=c(()=>qn({instrumentationRules:[],sources:Qe(S,l),actions:[],destinations:[],searchText:l.searchText,selectedCategory:G.Source}).searchResults.find(({category:e})=>e===G.Source)?.entities||[],[S,l]),[k,w]=c(()=>{let e=0;return Object.values(v).forEach(t=>{e+=t.length}),[0!==e,e]},[v]),T=d(e=>{if(e){const e={};C.forEach(t=>{const{namespace:i}=t;e[i]?e[i].push(t):e[i]=[t]}),f(e)}else f({})},[C]),D=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),f(a)},[v]),N=c(()=>C.map(n=>{const a=Gt(n),r=JSON.stringify(a),{hasErrors:l,hasWarnings:s,hasDisableds:c}=pe(n.conditions||[]),d=!!v[a.namespace]?.find(e=>e.namespace===a.namespace&&e.name===a.name&&e.kind===a.kind);return{status:l?se.Error:s?se.Warning:void 0,faded:c,onClick:()=>{h(G.Source),y(a)},cells:[{columnKey:"checkbox-and-icon",component:()=>e(O,{$gap:16,children:[t($,{value:d,onChange:()=>D(n)}),t(yi,{icons:We(n),id:r})]})},{columnKey:"name",value:$e(n,G.Source,{extended:!0})},{columnKey:"kind",value:n.kind,textColor:o.text.info},{columnKey:"namespace",value:n.namespace,textColor:o.text.info},{columnKey:"throughput",value:Be(It(i,G.Source,a).throughput),textColor:o.text.info},{columnKey:"conditions",component:()=>t(jn,{conditions:n.conditions||[],id:r})},{columnKey:"containers",component:()=>t("div",{style:{lineHeight:1},children:t(he,{status:se.Info,title:vi(n.containers),withBorder:!0})})}]}}),[C,v,i,D]),{badge:E,badgeTooltip:A}=c(()=>C.length!==S.length?{badge:`${C.length}/${S.length}`,badgeTooltip:g.FILTERED_COUNT_TOOLTIP}:{badge:S.length,badgeTooltip:void 0},[C,S]);return e(Ce,{$maxWidth:a,children:[e(ke,{children:[t($,{partiallyChecked:k&&C?.length!==w,value:k&&C?.length===w,onChange:T,disabled:!C?.length}),t(we,{icon:Te(G.Source),title:g.SOURCES,badge:E,badgeTooltip:A,loading:p||"number"==typeof x})]}),t(De,{$maxHeight:n,children:t(Ne,{columns:tl(r),rows:N})}),"number"!=typeof x||N.length?N.length?null:t(Ee,{style:{marginTop:"2rem"},children:t(Ae,{})}):e(Ee,{style:{marginTop:"2rem",gap:"24px"},children:[t(Fe,{width:420}),e(O,{$gap:16,children:[e(B,{color:o.text.info,children:[b[Ue.Instrumenting]?"Instrumenting":"Uninstrumenting"," workloads..."]}),t(Oe,{label:`${x}%`})]})]})]})},nl=({expiresAt:t})=>{const i=m(),{formatTimeAgo:n}=Yt(),a=n(t),o=new Date(t).toDateString().split(" ").slice(1).join(" "),r=fi(t,0)?i.text.error:fi(t,6048e5)?i.text.warning:i.text.success;return e(B,{size:14,color:r,children:[a," (",o,")"]})},al=p.div`
|
|
476
511
|
position: relative;
|
|
477
|
-
`,
|
|
512
|
+
`,ol=({token:i,saveToken:a})=>{const{CopyButton:o}=bi(),{formData:r,handleFormChange:l,resetFormData:s}=xi({token:i}),[c,d]=n(!1),u=()=>{d(!1),s()};return e(O,{$gap:0,children:[t(o,{value:i,size:$i.L}),t(A,{orientation:"vertical",length:"12px"}),e(al,{children:[t(I,{size:32,onClick:()=>{d(!0)},children:t(Fi,{})}),c&&t(Si,{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)})})]})]})},rl=({tokens:e,saveToken:i})=>t(te,{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(nl,{expiresAt:a})},{columnKey:"actions",component:()=>t(ol,{token:n,saveToken:i})}]}))}}]}),ll=({fetchDescribeOdigos:o})=>{const[r,l]=n(null);if(a(()=>{o().then(({data:e})=>l(e?.describeOdigos||null))},[]),!r)return t(Ee,{children:t(Re,{})});const s=e=>e?.name?[t(A,{},`divider-${e.name}`),t(oi,{title:e.name,subTitle:e.explain||void 0,value:{status:e.status||(ci(e.value)?di(e.value)?se.Success:se.Error:se.Default),text:e.value}},`describe-row-${e.name}`)]:[];return e(i,{children:[t(te,{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(te,{title:"Cluster Collector",withExtend:!0,children:Object.values(r?.clusterCollector||{}).map(s)}),t(te,{title:"Node Collector",withExtend:!0,children:Object.values(r?.nodeCollector||{}).map(s)})]})},sl=p.div`
|
|
478
513
|
display: flex;
|
|
479
514
|
flex-direction: column;
|
|
480
515
|
gap: 12px;
|
|
481
|
-
`,
|
|
516
|
+
`,cl="System Overview",dl=({tokens:a,saveToken:o,fetchDescribeOdigos:r})=>{const[l,s]=n(!1),c=()=>s(e=>!e);return e(i,{children:[t(I,{onClick:c,tooltip:cl,children:t(Zi,{size:18})},cl),t(_,{width:"750px",isOpen:l,onClose:c,header:{icons:[Zi],title:cl},footer:{isOpen:!1},children:e(sl,{children:[!!a?.length&&t(rl,{tokens:a,saveToken:o}),t(ll,{fetchDescribeOdigos:r})]})})]})},ul=p.div`
|
|
482
517
|
position: fixed;
|
|
483
518
|
bottom: 12px;
|
|
484
519
|
left: 12px;
|
|
@@ -487,7 +522,7 @@ import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import{useState
|
|
|
487
522
|
flex-direction: column-reverse;
|
|
488
523
|
gap: 6px;
|
|
489
524
|
max-width: 600px;
|
|
490
|
-
`,
|
|
525
|
+
`,pl=()=>{const{notifications:e,markAsDismissed:i,markAsSeen:n}=Ht(),{onClickNotification:a}=Xt();return t(ul,{children:e.filter(({dismissed:e})=>!e).map(({id:e,type:o,title:r,message:l,crdType:s,target:c})=>t(le,{id:e,type:o,title:r,message:l,action:s&&c?{label:"go to details",onClick:()=>a({id:e,crdType:s,target:c},{dismissToast:!0})}:void 0,onClose:()=>(({id:e,asSeen:t})=>{i(e),n(e)})({id:e,asSeen:!0})},`toast-${e}`))})},hl=p.div`
|
|
491
526
|
position: relative;
|
|
492
527
|
display: flex;
|
|
493
528
|
align-items: center;
|
|
@@ -506,7 +541,7 @@ import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import{useState
|
|
|
506
541
|
stroke: ${({theme:e})=>e.text.secondary};
|
|
507
542
|
}
|
|
508
543
|
}
|
|
509
|
-
`,
|
|
544
|
+
`,ml=p.div`
|
|
510
545
|
position: absolute;
|
|
511
546
|
top: 2px;
|
|
512
547
|
left: ${({$darkMode:e})=>e?"2px":"calc(100% - 2px - 24px)"};
|
|
@@ -516,50 +551,50 @@ import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import{useState
|
|
|
516
551
|
background-color: ${({theme:e})=>e.colors.border};
|
|
517
552
|
border-radius: 100%;
|
|
518
553
|
transition: all 0.3s;
|
|
519
|
-
`,
|
|
554
|
+
`,gl=({path:e})=>t("svg",{width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"none",children:t("path",{strokeLinecap:"round",strokeLinejoin:"round",d:e})}),yl=()=>{const{darkMode:i,setDarkMode:n}=Ci();return e(hl,{onClick:()=>n(!i),children:[t(gl,{path:"M14 7.977A4.333 4.333 0 1 1 8.023 2H8a6 6 0 1 0 6 6v-.023Z"}),t(gl,{path:"M8 15.333v-.666m-5.185-1.482.471-.471M.666 8h.667m1.482-5.185.471.47M8 1.334V.667m4.714 2.619.471-.471M14.667 8h.666m-2.619 4.714.471.471M12 8a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z"}),t(ml,{$darkMode:i})]})},vl=e=>{const{spans:t}=e,i=new Map;t.forEach(e=>{i.set(e.spanID,{...e,spans:[]})});const n=[];return t.forEach(e=>{const t=i.get(e.spanID);let a=!1;if(e.references.length){const t=e.references.find(e=>"CHILD_OF"===e.refType);t&&t.spanID&&i.has(t.spanID)||(a=!0)}else a=!0;if(a)n.push(t);else{const n=e.references.find(e=>"CHILD_OF"===e.refType);if(n){const e=i.get(n.spanID);e&&(e.spans=e.spans||[],e.spans.push(t),e.spans=e.spans.sort((e,t)=>e.startTime-t.startTime))}}}),n.sort((e,t)=>e.startTime-t.startTime)},fl=(e,t)=>{const{tags:i}=e,n={},a=[];return i.forEach(e=>{n[e.key]=e.value}),a.push({type:y.Code,value:{language:"json",code:JSON.stringify(n,null,2),pretty:t}}),a},bl=e=>{const{logs:t}=e,i=[];return t.forEach((e,n)=>{e.fields.forEach(e=>{i.push({title:e.key,value:e.value})}),n!==t.length-1&&i.push({type:y.Divider})}),i},xl=e=>{const{traceID:t,spanID:i,processID:n,operationName:a,duration:o,startTime:r,warnings:l}=e,s=[];return s.push({type:y.CopyText,title:"Trace ID",value:t}),s.push({type:y.CopyText,title:"Span ID",value:i}),s.push({type:y.Divider}),s.push({title:"Service",value:n}),s.push({title:"Operation",value:a}),s.push({title:"Duration",value:ki(o)}),s.push({title:"Start time",value:new Date(r/1e3).toLocaleString()}),l.length&&(s.push({type:y.Divider}),s.push({title:"Warnings",titleIcon:Qi,value:l})),s},$l=(e,t)=>{const{tags:i}=e,n={},a=[];return i.forEach(e=>{n[e.key]=e.value}),a.push({type:y.Code,value:{language:"json",code:JSON.stringify(n,null,2),pretty:t}}),a},Sl=p.div`
|
|
520
555
|
display: flex;
|
|
521
556
|
flex-direction: column;
|
|
522
557
|
gap: 12px;
|
|
523
558
|
max-height: 100vh;
|
|
524
559
|
overflow-y: auto;
|
|
525
|
-
`,
|
|
560
|
+
`,Cl=({span:i,process:a,onClose:o})=>{const[r,l]=n(!0),[s,c]=n(!0);return t(_,{width:"750px",isOpen:!0,onClose:o,header:{icons:[en],title:i.operationName},footer:{isOpen:!1},children:e(Sl,{children:[t(te,{title:"Details",data:xl(i)}),i.logs.length>0&&t(te,{title:"Errors",titleBadge:i.logs.length,titleIcon:Qi,data:bl(i)}),t(te,{title:"Tags",data:fl(i,r),action:t(wi,{isPrettyMode:r,setIsPrettyMode:l})}),a&&t(te,{title:`Process (${a.serviceName})`,data:$l(a,s),action:t(wi,{isPrettyMode:s,setIsPrettyMode:c})})]})})},kl=370,wl=["#33DCA7","#50F6E8","#444AD9","#8B55FF","#FF7CA9"].reverse(),Tl=p.div`
|
|
526
561
|
display: flex;
|
|
527
562
|
align-items: center;
|
|
528
|
-
width: ${
|
|
529
|
-
background-color: ${({$withErrors:e,theme:t})=>e?t.colors.error+
|
|
563
|
+
width: ${kl}px;
|
|
564
|
+
background-color: ${({$withErrors:e,theme:t})=>e?t.colors.error+L["042"]:t.colors.dark_grey};
|
|
530
565
|
&:hover {
|
|
531
|
-
${({$withErrors:e,$preventHover:t,theme:i})=>!t&&`background-color: ${e?i.colors.error:i.colors.secondary+
|
|
566
|
+
${({$withErrors:e,$preventHover:t,theme:i})=>!t&&`background-color: ${e?i.colors.error:i.colors.secondary+L["010"]};`}
|
|
532
567
|
cursor: ${({$preventHover:e})=>e?"default":"pointer"};
|
|
533
568
|
}
|
|
534
|
-
`,
|
|
569
|
+
`,Dl=p(O)`
|
|
535
570
|
align-items: center;
|
|
536
571
|
justify-content: space-between;
|
|
537
572
|
gap: 4px;
|
|
538
573
|
padding: 12px;
|
|
539
574
|
padding-left: ${({$depth:e})=>12*e||12}px;
|
|
540
|
-
width: calc(${
|
|
541
|
-
`,
|
|
575
|
+
width: calc(${kl}px - ${({$depth:e})=>12*e}px);
|
|
576
|
+
`,Nl=p(O)`
|
|
542
577
|
align-items: center;
|
|
543
578
|
gap: 4px;
|
|
544
579
|
position: absolute;
|
|
545
580
|
right: 56px;
|
|
546
581
|
width: calc(100% - ${434}px);
|
|
547
|
-
`,
|
|
582
|
+
`,El=p.div`
|
|
548
583
|
position: absolute;
|
|
549
584
|
left: ${({$startTime:e,$minStartTime:t,$maxEndTime:i})=>(e-t)/(i-t)*100+"%"};
|
|
550
585
|
width: ${({$duration:e,$maxDuration:t})=>e/t*100+"%"};
|
|
551
586
|
height: 12px;
|
|
552
587
|
border-radius: 32px;
|
|
553
|
-
background-color: ${({$indexInMatrix:e})=>
|
|
554
|
-
`,
|
|
588
|
+
background-color: ${({$indexInMatrix:e})=>wl[e%wl.length]};
|
|
589
|
+
`,Al=p(B)`
|
|
555
590
|
padding-left: calc(100% + 8px);
|
|
556
591
|
font-size: 10px;
|
|
557
592
|
color: ${({theme:e})=>e.text.darker_grey};
|
|
558
593
|
font-family: ${({theme:e})=>e.font_family.secondary};
|
|
559
594
|
white-space: nowrap;
|
|
560
|
-
`,
|
|
595
|
+
`,Fl=({span:i,depth:a,indexInMatrix:o,maxDuration:r,minStartTime:l,maxEndTime:s,withErrors:c,errorTooltip:d,isOpen:u,withToggle:p,onToggleOpen:h,onSelect:g})=>{const y=m(),[v,f]=n(!1),b=kl-12*a-20-(c?12:0),x=c&&(1===a||i.logs.length>0);return e(Tl,{className:"span-container",$withErrors:c,$preventHover:v,onClick:g,children:[e(Dl,{$depth:a,className:"span-left",children:[e(O,{$gap:4,$alignItems:"center",children:[t("div",p?{onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),children:t(I,{onClick:e=>{e.stopPropagation(),h?.()},size:24,children:t(yt,{extend:u??!1})})}:{style:{width:"24px"}}),t(Di,{maxWidth:b/2,text:i.processID,textSize:14}),t(B,{size:12,color:y.text.darker_grey,children:"•"}),t(Di,{maxWidth:b/2,text:i.operationName,textSize:12,textColor:y.text.darker_grey})]}),c&&(x?t(ye,{...d,children:t(Qi,{fill:y.text.error})}):t("div",{style:{position:"relative"},children:t("div",{style:{position:"absolute",top:"-24px",right:"8px"},children:t(A,{type:se.Error,orientation:"vertical",thickness:1,length:"48px",margin:"0",opacity:.5})})}))]}),t(Nl,{className:"span-right",children:t(El,{$indexInMatrix:o,$duration:i.duration,$maxDuration:r,$startTime:i.startTime,$minStartTime:l,$maxEndTime:s,children:t(Al,{children:ki(i.duration)})})})]})},Ol=({spans:i,logs:n,depth:a,indexInMatrix:o,maxDuration:r,minStartTime:l,maxEndTime:s,openSpanIdsState:c,selectedSpanState:d})=>{const u=m();return i.map((i,p)=>{const h=i.spanID,m=c.value.includes(h),g=!!i.spans?.length,y=n.length?n:Ti(i,"spans","logs"),v=y.length>0,f=v?y.length>1?`(${y.length}) errors`:y[0].fields.find(e=>"exception.message"===e.key)?.value:void 0,b=v?y.length>1?void 0:y[0].fields.find(e=>"exception.stacktrace"===e.key)?.value:void 0;return e("div",{style:{borderBottom:1===a?`1px dotted ${u.colors.border}`:"none"},children:[t(Fl,{span:i,depth:a,indexInMatrix:o+p+a,maxDuration:r,minStartTime:l,maxEndTime:s,withErrors:v,errorTooltip:{titleIcon:Qi,title:f,text:b},isOpen:m,withToggle:g,onToggleOpen:()=>c.set(e=>e.some(e=>e===h)?e.filter(e=>e!=h):[...e,h,...Ti(i,"spans","spanID")]),onSelect:()=>d.set(e=>e?.spanID===h?null:i)}),m&&g?t(Ol,{spans:i.spans||[],logs:y,depth:a+1,indexInMatrix:o+p,maxDuration:r,minStartTime:l,maxEndTime:s,openSpanIdsState:c,selectedSpanState:d}):null]},`span-${h}`)})},Il=p.div`
|
|
561
596
|
width: 100%;
|
|
562
|
-
`,
|
|
597
|
+
`,Rl=p.div`
|
|
563
598
|
max-height: ${({$heightToRemove:e})=>`calc(100vh - ${e}px + 2px)`};
|
|
564
599
|
overflow: auto;
|
|
565
600
|
|
|
@@ -569,22 +604,22 @@ import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import{useState
|
|
|
569
604
|
border-radius: 24px;
|
|
570
605
|
border: 1px solid ${({theme:e})=>e.colors.dropdown_bg_2};
|
|
571
606
|
position: relative;
|
|
572
|
-
`,
|
|
607
|
+
`,Ml=p.div`
|
|
573
608
|
padding: 12px 12px 12px 24px;
|
|
574
|
-
width: calc(${
|
|
609
|
+
width: calc(${kl}px - 36px);
|
|
575
610
|
background-color: ${({theme:e})=>e.colors.dark_grey};
|
|
576
|
-
`,
|
|
611
|
+
`,Kl=p.div`
|
|
577
612
|
width: 1px;
|
|
578
613
|
height: ${({$heightToRemove:e})=>`calc(100vh - ${e}px + 2px)`};
|
|
579
614
|
background: ${({theme:e})=>`linear-gradient(to bottom, ${e.colors.border}, transparent)`};
|
|
580
615
|
|
|
581
616
|
position: absolute;
|
|
582
|
-
left: calc(${
|
|
583
|
-
`,
|
|
617
|
+
left: calc(${kl}px + ((100% - ${kl}px) / ${5}) * ${({index:e})=>e});
|
|
618
|
+
`,Ll=p(B)`
|
|
584
619
|
color: ${({theme:e})=>e.text.darker_grey};
|
|
585
620
|
font-size: 12px;
|
|
586
621
|
font-family: ${({theme:e})=>e.font_family.secondary};
|
|
587
622
|
padding-top: 12px;
|
|
588
623
|
padding-left: 12px;
|
|
589
624
|
white-space: nowrap;
|
|
590
|
-
`,
|
|
625
|
+
`,Pl=({heightToRemove:a,traces:o,isLoading:r})=>{const[l,s]=n([]),[d,u]=n(null),p=c(()=>Et(o).sort((e,t)=>t.spans[0].startTime-e.spans[0].startTime).map(e=>({...e,spans:vl(e)})),[o]),h=c(()=>p.reduce((e,t)=>Math.max(e,t.spans.reduce((e,t)=>e+t.duration,0)),0),[p]),m=c(()=>{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(Il,{$heightToRemove:a,children:r?t(Ee,{$height:"50vh",children:t(Re,{scale:1.5})}):p.length?e(Rl,{$heightToRemove:a,children:[t(Ml,{children:t(B,{children:"Service & operation"})}),new Array(5).fill(null).map((e,i)=>t(Kl,{$heightToRemove:a,index:i,children:t(Ll,{children:ki(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(Ol,{spans:n,logs:[],depth:1,indexInMatrix:i,maxDuration:h,minStartTime:a,maxEndTime:o,openSpanIdsState:{value:l,set:s},selectedSpanState:{value:d,set:u}},`recursive-spans-${e.traceID}`)})]}):t(Ee,{$height:"50vh",children:t(Ae,{title:g.NO_TRACES_FOUND,subTitle:g.ARE_SERVICES_INSTRUMENTED_AND_PRODUCING_TRAFFIC})})}),d&&t(Cl,{span:d,process:m,onClose:()=>u(null)})]})};export{Mn as ActionDrawer,An as ActionForm,Ln as ActionModal,Hn as ActionTable,Jn as AwaitPipeline,wa as ConditionDropdown,xa as DataFlow,Xa as DataFlowActionsMenu,qa as DataStreamDrawer,ja as DataStreamForm,Qa as DataStreamModal,Za as DataStreamSelectionForm,po as DestinationDrawer,so as DestinationForm,Do as DestinationModal,Oo as DestinationSelectionForm,Ro as DestinationTable,Ta as ErrorDropdown,Yo as InstrumentationRuleDrawer,Uo as InstrumentationRuleForm,Qo as InstrumentationRuleModal,ir as InstrumentationRuleTable,Aa as KindDropdown,Da as LanguageDropdown,Na as MonitorDropdown,ar as MultiSourceControl,Ea as NamespaceDropdown,Rr as NavIconIds,dr as NotificationManager,Fn as OverviewDrawer,Fa as PodsAgentInjectionStatusDropdown,$r as ServiceMap,Ir as SetupSummary,Mr as SideNav,Kr as SlackInvite,Xr as SourceDrawer,jr as SourceForm,el as SourceModal,Qr as SourceSelectionForm,il as SourceTable,dl as SystemOverview,jn as TableCellConditions,pl as ToastList,yl as ToggleDarkMode,Pl as TraceView};
|