@odigos/ui-kit 0.0.111 → 0.0.114
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/.devcontainer/devcontainer.json +3 -1
- package/CHANGELOG.md +27 -0
- package/VERSIONING.md +228 -0
- package/lib/chunks/{ui-components-152ce1ee.js → ui-components-f1517f30.js} +33 -32
- package/lib/components/input-table/index.d.ts +1 -0
- package/lib/components.js +1 -1
- package/lib/constants/strings/index.d.ts +2 -2
- package/lib/constants.js +1 -1
- package/lib/containers/data-stream-modal/index.d.ts +4 -1
- package/lib/containers/index.d.ts +1 -0
- package/lib/containers.js +105 -101
- package/lib/functions.js +1 -1
- package/lib/hooks/useInstrumentationRuleFormData.d.ts +1 -1
- package/lib/hooks.js +1 -1
- package/lib/icons.js +1 -1
- package/lib/snippets.js +1 -1
- package/lib/store.js +1 -1
- package/lib/theme.js +1 -1
- package/lib/types/instrumentation-rules/index.d.ts +13 -5
- package/lib/types.js +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{SamplerIcon as e,PiiMaskingIcon as t,ImageErrorIcon as n,K8sLogo as o,AddClusterInfoIcon as i,DeleteAttributeIcon as a,RenameAttributeIcon as r,CodeAttributesIcon as s,CustomInstrumentationIcon as l,HeadersCollectionIcon as d,PayloadCollectionIcon as c,JavaLogo as p,GoLogo as u,NodejsLogo as m,PythonLogo as h,DotnetLogo as g,CSharpLogo as x,CPlusPlusLogo as f,PhpLogo as $,RubyLogo as y,RustLogo as b,SwiftLogo as w,ElixirLogo as k,MysqlLogo as v,NginxLogo as E,PostgresLogo as S,RedisLogo as C,KafkaLogo as T,AlaudaLogo as A,AlibabaCloudLogo as D,AppDynamicsLogo as N,AxiomLogo as I,AzureBlobLogo as O,AzureMonitorLogo as _,BetterStackLogo as z,BonreeLogo as R,CauselyLogo as F,ChecklyLogo as L,ChronosphereLogo as M,ClickhouseLogo as P,AwsCloudwatchLogo as B,CoralogixLogo as j,Dash0Logo as U,DatadogLogo as W,OpenTelemetryLogo as V,DynatraceLogo as H,ElasticApmLogo as q,ElasticSearchLogo as G,GoogleCloudPlatformLogo as Y,GrafanaLogo as J,GreptimeLogo as K,GroundcoverLogo as X,HoneycombLogo as Q,HyperDxLogo as Z,InstanaLogo as ee,JaegerLogo as te,KloudmateLogo as ne,Last9Logo as oe,LightstepLogo as ie,LogzioLogo as ae,LokiLogo as re,LumigoLogo as se,MiddlewareLogo as le,NewRelicLogo as de,ObserveLogo as ce,OdigosLogo as pe,OneUptimeLogo as ue,OpenObserveLogo as me,OpsVerseLogo as he,OracleLogo as ge,PrometheusLogo as xe,QrynLogo as fe,GigapipeLogo as $e,QuickwitLogo as ye,AwsS3Logo as be,SeqLogo as we,SignozLogo as ke,SplunkLogo as ve,SumoLogicLogo as Ee,TelemetryHubLogo as Se,TempoLogo as Ce,TingyunLogo as Te,TraceloopLogo as Ae,UptraceLogo as De,VictoriaMetricsLogo as Ne,AwsXrayLogo as Ie,NamespacesIcon as Oe,SourcesIcon as _e,DestinationsIcon as ze,ActionsIcon as Re,RulesIcon as Fe,LogsIcon as Le,MetricsIcon as Me,TracesIcon as Pe,VmLogo as Be,CheckCircledIcon as je,ErrorTriangleIcon as Ue,WarningTriangleIcon as We,InfoIcon as Ve,MinusIcon as He,CheckIcon as qe,ListIcon as Ge,CodeIcon as Ye,ExtendArrowIcon as Je,PlusIcon as Ke,CopyIcon as Xe,EditIcon as Qe,EditedIcon as Ze,SortArrowsIcon as et,NotebookIcon as tt,XIcon as nt,EyeClosedIcon as ot,EyeOpenIcon as it,NoDataIcon as at,CrossIcon as rt,SearchIcon as st,TrashIcon as lt}from"../icons.js";import{create as dt}from"zustand";import ct,{Fragment as pt,useMemo as ut,useState as mt,useEffect as ht,useRef as gt,forwardRef as xt,useCallback as ft,memo as $t}from"react";import yt from"javascript-time-ago";import{p as bt,c as wt,s as kt,e as vt}from"./vendor-1dea551d.js";import Et,{ThemeProvider as St,keyframes as Ct,useTheme as Tt,css as At}from"styled-components";import{Handle as Dt,Position as Nt,getSmoothStepPath as It,BaseEdge as Ot,EdgeLabelRenderer as _t,ReactFlow as zt,Controls as Rt}from"@xyflow/react";import Ft from"react-dom";import{Highlight as Lt,themes as Mt}from"prism-react-renderer";import{ErrorBoundary as Pt}from"react-error-boundary";import Bt from"lottie-react";const jt=dt(e=>({activeNodeType:null,activeNodeId:null,setActiveNodeType:t=>e({activeNodeType:t}),setActiveNodeId:t=>e({activeNodeId:t})}));var Ut,Wt,Vt,Ht,qt,Gt,Yt,Jt,Kt,Xt,Qt,Zt,en,tn,nn,on,an,rn,sn,ln,dn,cn,pn,un,mn,hn,gn,xn,fn,$n,yn,bn,wn,kn,vn,En;!function(e){e.Attributes="attributes",e.Samplers="samplers"}(Ut||(Ut={})),function(e){e.K8sAttributes="K8sAttributesResolver",e.AddClusterInfo="AddClusterInfo",e.DeleteAttributes="DeleteAttribute",e.RenameAttributes="RenameAttribute",e.PiiMasking="PiiMasking",e.ErrorSampler="ErrorSampler",e.ProbabilisticSampler="ProbabilisticSampler",e.LatencySampler="LatencySampler",e.ServiceNameSampler="ServiceNameSampler",e.SpanAttributeSampler="SpanAttributeSampler"}(Wt||(Wt={})),function(e){e.CollectContainerAttributes="collectContainerAttributes",e.CollectReplicaSetAttributes="collectReplicaSetAttributes",e.CollectWorkloadId="collectWorkloadId",e.CollectClusterId="collectClusterId",e.LabelsAttributes="labelsAttributes",e.AnnotationsAttributes="annotationsAttributes",e.ClusterAttributes="clusterAttributes",e.OverwriteExistingValues="overwriteExistingValues",e.AttributeNamesToDelete="attributeNamesToDelete",e.Renames="renames",e.PiiCategories="piiCategories",e.FallbackSamplingRatio="fallbackSamplingRatio",e.SamplingPercentage="samplingPercentage",e.EndpointsFilters="endpointsFilters",e.ServicesNameFilters="servicesNameFilters",e.AttributeFilters="attributeFilters"}(Vt||(Vt={})),function(e){e.Pod="pod",e.Namespace="namespace"}(Ht||(Ht={})),function(e){e.EXISTS="exists",e.EQUALS="equals",e.NOT_EQUALS="not_equals",e.CONTAINS="contains",e.NOT_CONTAINS="not_contains",e.REGEX="regex"}(qt||(qt={})),function(e){e.EXISTS="exists",e.EQUALS="equals",e.NOT_EQUALS="not_equals",e.GREATER_THAN="greater_than",e.LESS_THAN="less_than",e.GREATER_THAN_OR_EQUAL="greater_than_or_equal",e.LESS_THAN_OR_EQUAL="less_than_or_equal"}(Gt||(Gt={})),function(e){e.EXISTS="exists",e.EQUALS="equals"}(Yt||(Yt={})),function(e){e.EXISTS="exists",e.EQUALS="equals",e.NOT_EQUALS="not_equals",e.IS_VALID_JSON="is_valid_json",e.IS_INVALID_JSON="is_invalid_json",e.JSONPATH_EXISTS="jsonpath_exists",e.KEY_EQUALS="key_equals",e.KEY_NOT_EQUALS="key_not_equals"}(Jt||(Jt={})),function(e){e.Community="community",e.Cloud="cloud",e.Onprem="onprem"}(Kt||(Kt={})),function(e){e.K8s="k8s",e.Vm="vm"}(Xt||(Xt={})),function(e){e.Cli="odigos-cli",e.Helm="helm",e.Operator="odigos-operator"}(Qt||(Qt={})),function(e){e.Go="go",e.JavaScript="javascript",e.Python="python",e.Java="java",e.DotNet="dotnet",e.CSharp="csharp",e.CPlusPlus="cplusplus",e.Php="php",e.Ruby="ruby",e.Rust="rust",e.Swift="swift",e.Elixir="elixir",e.MySql="mysql",e.Nginx="nginx",e.Postgres="postgres",e.Redis="redis",e.Kafka="kafka",e.Ignored="ignored",e.Unknown="unknown",e.Processing="processing",e.NoContainers="no containers",e.NoRunningPods="no running pods"}(Zt||(Zt={})),function(e){e.Create="Create",e.Read="Read",e.Update="Update",e.Delete="Delete"}(en||(en={})),function(e){e.Namespace="Namespace",e.Source="Source",e.Destination="Destination",e.Action="Action",e.InstrumentationRule="InstrumentationRule"}(tn||(tn={})),function(e){e.DataStream="DataStream"}(nn||(nn={})),function(e){e.Input="input",e.MultiInput="multiInput",e.MultiTabledInput="multiTabledInput",e.KeyValuePair="keyValuePairs",e.TextArea="textarea",e.Dropdown="dropdown",e.Checkbox="checkbox",e.Toggle="toggle"}(on||(on={})),function(e){e.Text="text",e.Password="password",e.Number="number"}(an||(an={})),function(e){e.Warning="warning",e.Error="error",e.Success="success",e.Info="info",e.Default="default"}(rn||(rn={})),function(e){e.INSTRUMENTED="Instrumented",e.INSTRUMENTING="Instrumenting",e.UNINSTRUMENTED="Uninstrumented",e.NOT_INSTRUMENTED="Not Instrumented"}(sn||(sn={})),function(e){e.Loading="loading",e.Disabled="disabled"}(ln||(ln={})),function(e){e.Ascending="asc",e.Descending="desc"}(dn||(dn={})),function(e){e.CodeAttributes="code-attributes",e.FullPayloadCollection="full-payload-collection",e.DbPayloadCollection="db-payload-collection",e.QueryOperationDetector="query-operation-detector",e.AllowConcurrentAgents="allow_concurrent_agents",e.JavaEbpfInstrumentations="java-ebpf-instrumentations",e.JavaNativeInstrumentations="java-native-instrumentations",e.SizeS="size_s",e.SizeM="size_m",e.SizeL="size_l"}(cn||(cn={})),function(e){e.VirtualDevice="VirtualDevice",e.HostPath="HostPath",e.InitContainer="InitContainer"}(pn||(pn={})),function(e){e.Loader="loader",e.PodManifest="pod-manifest",e.LoaderFallbackToPodManifest="loader-fallback-to-pod-manifest"}(un||(un={})),function(e){e.Header="header",e.Add="add",e.Base="base",e.Edged="edged",e.Frame="frame",e.Scroll="scroll",e.Skeleton="skeleton",e.MapItem="map-item",e.NoData="no-data"}(mn||(mn={})),function(e){e.Labeled="labeled"}(hn||(hn={})),function(e){e.AddRule="addRule",e.AddSource="addSource",e.AddAction="addAction",e.AddDestination="addDestination"}(gn||(gn={})),function(e){e.Alauda="alauda",e.AlibabaCloud="alibabacloud",e.AppDynamics="appdynamics",e.Axiom="axiom",e.AzureBlob="azureblob",e.AzureMonitor="azuremonitor",e.BetterStack="betterstack",e.Bonree="bonree",e.Causely="causely",e.Checkly="checkly",e.Chronosphere="chronosphere",e.ClickHouse="clickhouse",e.CloudWatch="cloudwatch",e.Coralogix="coralogix",e.Dash0="dash0",e.Datadog="datadog",e.Dynamic="dynamic",e.Dynatrace="dynatrace",e.ElasticApm="elasticapm",e.ElasticSearch="elasticsearch",e.GoogleCloud="googlecloud",e.GoogleCloudOTLP="googlecloudotlp",e.GrafanaCloudLoki="grafanacloudloki",e.GrafanaCloudPrometheus="grafanacloudprometheus",e.GrafanaCloudTempo="grafanacloudtempo",e.Greptime="greptime",e.Groundcover="groundcover",e.Honeycomb="honeycomb",e.HyperDX="hyperdx",e.Instana="instana",e.Jaeger="jaeger",e.Kafka="kafka",e.Kloudmate="kloudmate",e.Last9="last9",e.Lightstep="lightstep",e.LogzIo="logzio",e.Loki="loki",e.Lumigo="lumigo",e.Middleware="middleware",e.NewRelic="newrelic",e.Observe="observe",e.Odigos="odigos",e.OneUptime="oneuptime",e.OpenObserve="openobserve",e.Opsverse="opsverse",e.Oracle="oracle",e.OTLP="otlp",e.OTLPHttp="otlphttp",e.Prometheus="prometheus",e.Qryn="qryn",e.QrynOss="qryn-oss",e.Quickwit="quickwit",e.S3="s3",e.Seq="seq",e.Signoz="signoz",e.Splunk="splunk",e.SplunkSapm="splunksapm",e.SplunkOtlp="splunkotlp",e.SumoLogic="sumologic",e.TelemetryHub="telemetryhub",e.Tempo="tempo",e.Tingyun="tingyun",e.Traceloop="traceloop",e.Uptrace="uptrace",e.VictoriaMetrics="victoriametrics",e.VictoriaMetricsCloud="victoriametricscloud",e.XRay="xray"}(xn||(xn={})),function(e){e.CodeAttributes="CodeAttributes",e.HeadersCollection="HeadersCollection",e.PayloadCollection="PayloadCollection",e.CustomInstrumentation="CustomInstrumentation",e.UnknownType="UnknownType"}(fn||(fn={})),function(e){e.Column="column",e.FilePath="filePath",e.Function="function",e.LineNumber="lineNumber",e.Namespace="namespace",e.StackTrace="stacktrace"}($n||($n={})),function(e){e.HeaderKeys="headerKeys"}(yn||(yn={})),function(e){e.Probes="probes"}(bn||(bn={})),function(e){e.HttpRequest="httpRequest",e.HttpResponse="httpResponse",e.DbQuery="dbQuery",e.Messaging="messaging"}(wn||(wn={})),function(e){e.Logs="logs",e.Metrics="metrics",e.Traces="traces"}(kn||(kn={})),function(e){e.Deployment="Deployment",e.DaemonSet="DaemonSet",e.StatefulSet="StatefulSet",e.CronJob="CronJob"}(vn||(vn={})),function(e){e.Error="Error",e.Failure="Failure",e.Notice="Notice",e.Pending="Pending",e.Waiting="Waiting",e.Unsupported="Unsupported",e.Disabled="Disabled",e.Success="Success",e.Irrelevant="Irrelevant",e.Unknown="Unknown"}(En||(En={}));const Sn=s=>{const l=s?.toLowerCase(),d=l?.includes(Ut.Samplers),c=l===Ut.Attributes;return d?e:c?t:{[Wt.K8sAttributes]:o,[Wt.AddClusterInfo]:i,[Wt.DeleteAttributes]:a,[Wt.PiiMasking]:t,[Wt.RenameAttributes]:r,[Wt.ErrorSampler]:e,[Wt.ProbabilisticSampler]:e,[Wt.LatencySampler]:e,[Wt.ServiceNameSampler]:e,[Wt.SpanAttributeSampler]:e}[s]||n},Cn=[{label:"Attributes",icon:Sn(Ut.Attributes),items:[{type:Wt.K8sAttributes,icon:Sn(Wt.K8sAttributes),label:"Kubernetes Attributes",description:"Add dynamic k8s resource attributes to your data.",allowedSignals:[kn.Traces,kn.Metrics,kn.Logs],docsEndpoint:"/pipeline/actions/attributes/k8sattributes",docsDescription:"This action adds kubernetes related resource attributes to spans, metrics data points and log records."},{type:Wt.AddClusterInfo,icon:Sn(Wt.AddClusterInfo),label:"Add Cluster Info",description:"Add static cluster-scoped attributes to your data.",allowedSignals:[kn.Traces,kn.Metrics,kn.Logs],docsEndpoint:"/pipeline/actions/attributes/addclusterinfo",docsDescription:"This action adds static resource attributes to spans, metrics data points and log records. It is useful to add cluster-wide attributes to all telemetry signals."},{type:Wt.DeleteAttributes,icon:Sn(Wt.DeleteAttributes),label:"Delete Attribute",description:"Delete attributes from logs, metrics, and traces.",allowedSignals:[kn.Traces,kn.Metrics,kn.Logs],docsEndpoint:"/pipeline/actions/attributes/deleteattribute",docsDescription:"This action will delete the specified attributes from all telemetry signals that are specified in the signals field, regardless of the source, or any other condition."},{type:Wt.RenameAttributes,icon:Sn(Wt.RenameAttributes),label:"Rename Attribute",description:"Rename attributes in logs, metrics, and traces.",allowedSignals:[kn.Traces,kn.Metrics,kn.Logs],docsEndpoint:"/pipeline/actions/attributes/renameattribute",docsDescription:"This action will rename the specified attributes from all telemetry signals that are specified in the signals field, regardless of the source, or any other condition."},{type:Wt.PiiMasking,icon:Sn(Wt.PiiMasking),label:"PII Masking",description:"Mask PII data in your traces.",allowedSignals:[kn.Traces],docsEndpoint:"/pipeline/actions/attributes/piimasking",docsDescription:"This action processes a list of PII categories to be masked from the traces."}]},{label:"Samplers",icon:Sn(Ut.Samplers),items:[{type:Wt.ErrorSampler,icon:Sn(Ut.Samplers),label:"Error Sampler",description:"Sample errors based on percentage.",allowedSignals:[kn.Traces],docsEndpoint:"/pipeline/actions/sampling/errorsampler",docsDescription:"This action is a Global Action that supports error sampling by filtering out non-error traces."},{type:Wt.LatencySampler,icon:Sn(Ut.Samplers),label:"Latency Sampler",description:"Add latency to your traces.",allowedSignals:[kn.Traces],docsEndpoint:"/pipeline/actions/sampling/latencysampler",docsDescription:"This action is an Endpoint Action that samples traces based on their duration for a specific service and endpoint (HTTP route) filter."},{type:Wt.ProbabilisticSampler,icon:Sn(Ut.Samplers),label:"Probabilistic Sampler",description:"Sample traces based on percentage.",allowedSignals:[kn.Traces],docsEndpoint:"/pipeline/actions/sampling/probabilisticsampler",docsDescription:"This action supports probabilistic sampling based on a configured sampling percentage applied to the TraceID."},{type:Wt.ServiceNameSampler,icon:Sn(Ut.Samplers),label:"Service Name Sampler",description:"Sample traces based on the presence of specified services within a trace.",allowedSignals:[kn.Traces],docsEndpoint:"/pipeline/actions/sampling/servicenamesampler",docsDescription:"This action supports service name sampling based on the presence of specified services within a trace."},{type:Wt.SpanAttributeSampler,icon:Sn(Ut.Samplers),label:"Span Attributes Sampler",description:"Sample traces based on the presence or value of specific attributes within a trace.",allowedSignals:[kn.Traces],docsEndpoint:"/pipeline/actions/sampling/spanattributesampler",docsDescription:"This action supports service name sampling based on the presence or value of specific attributes within a trace."}]}],Tn={DETECTED:{TITLE:"Detected by Odigos",DESCRIPTION:"Odigos found these destinations in your cluster and pre-filled their details. Review and enable them to start sending data."},EXISTS:{TITLE:"Already configured",DESCRIPTION:"These are destinations that you have already configured in other data-streams and can reuse them."},MANAGED:{TITLE:"Managed",DESCRIPTION:"Effortless monitoring with scalable performance management."},SELF_HOSTED:{TITLE:"Self-hosted",DESCRIPTION:"Full control and customization for advanced application monitoring."}},An=e=>({[fn.CodeAttributes]:s,[fn.CustomInstrumentation]:l,[fn.HeadersCollection]:d,[fn.PayloadCollection]:c,[fn.UnknownType]:n}[e]||n),Dn=[{type:fn.CodeAttributes,icon:An(fn.CodeAttributes),label:"Code Attributes",description:"Collect code attributes containing payload data to traces.",docsEndpoint:"/pipeline/rules/codeattributes",docsDescription:'The "Code Attributes" Rule can be used to add code attributes containing payload data to traces.',supportedLanguages:[Zt.Go,Zt.Python]},{type:fn.CustomInstrumentation,icon:An(fn.CustomInstrumentation),label:"Custom Instrumentation",description:"Define custom instrumentation for specific class and methods(i.e for Java) or explicit symbol(i.e. Golang).",docsEndpoint:"/pipeline/rules/custominstrumentation",docsDescription:'The "Custom Instrumentation" Rule can be used to instrument a specific symbol(i.e for Golang), or a class and method combination (i.e. for Java) for detailed tracing.',supportedLanguages:[Zt.Go,Zt.Java]},{type:fn.HeadersCollection,icon:An(fn.HeadersCollection),label:"Headers Collection",description:"Collect span attributes containing HTTP Headers data to traces.",docsEndpoint:"/pipeline/rules/headerscollection",docsDescription:'The "Headers Collection" Rule can be used to add span attributes containing HTTP Headers data to traces.',supportedLanguages:[Zt.Go,Zt.Java]},{type:fn.PayloadCollection,icon:An(fn.PayloadCollection),label:"Payload Collection",description:"Collect span attributes containing payload data to traces.",docsEndpoint:"/pipeline/rules/payloadcollection",docsDescription:'The "Payload Collection" Rule can be used to add span attributes containing payload data to traces.',supportedLanguages:[Zt.Go]}],Nn=[{id:kn.Logs,value:"Logs"},{id:kn.Metrics,value:"Metrics"},{id:kn.Traces,value:"Traces"}],In=e=>e.charAt(0).toUpperCase()+e.slice(1),On=e=>{const t=e=>e.filter(e=>"object"==typeof e&&null!==e?""!==e.key&&""!==e.value:""!==e),n=e=>Object.fromEntries(Object.entries(e).filter(([e,t])=>""!==e&&""!==t).map(([e,o])=>Array.isArray(o)?[e,t(o)]:"object"==typeof o&&null!==o?[e,n(o)]:[e,o]));return Object.entries(e).reduce((e,[o,i])=>{try{const a=JSON.parse(i);Array.isArray(a)?e[o]=JSON.stringify(t(a)):e[o]="object"==typeof a&&null!==a?JSON.stringify(n(a)):i}catch(a){"object"==typeof i&&null!==i?Array.isArray(i)?e[o]=JSON.stringify(t(i)):e[o]=JSON.stringify(n(i)):e[o]=i}return e},{})};var _n;!function(e){e.SIGNALS="SIGNALS"}(_n||(_n={}));const zn=(e,t,n)=>{if(!e||!e.length)return!0;if(1===e.length)return"true"==e[0];const[o,i,a]=e;if(o===_n.SIGNALS)switch(i){case"INCLUDES":return t?.includes(a);case"EXCLUDES":return!t?.includes(a);default:return!0}const r=n.find(e=>e.name===o);if(!r)return!0;switch(i){case"===":case"==":return r.value===a;case"!==":case"!=":return r.value!==a;case">":return Number(r.value)>Number(a);case"<":return Number(r.value)<Number(a);case">=":return Number(r.value)>=Number(a);case"<=":return Number(r.value)<=Number(a);default:return!0}},Rn=e=>JSON.parse(JSON.stringify(e)),Fn=(e,t)=>{let n=[...e];return t.monitors?.length&&(n=n.filter(e=>!!t.monitors?.find(t=>e.signals?.find(e=>e.toLowerCase()===t.id)))),n},Ln=(e,t)=>{let n=[...e];return t.monitors?.length&&(n=n.filter(e=>!!t.monitors?.find(t=>e.exportedSignals[t.id]))),n},Mn=(e,t)=>t?e.filter(e=>e.dataStreamNames.includes(t)||!e.dataStreamNames.length):[],Pn=(e,t)=>{let n=[...e];return t.namespaces?.length&&(n=n.filter(({namespace:e})=>!!t.namespaces?.find(({id:t})=>t===e))),t.kinds?.length&&(n=n.filter(({kind:e})=>!!t.kinds?.find(({id:t})=>t===e))),t.languages?.length&&(n=n.filter(({containers:e})=>!!t.languages?.find(({id:t})=>!!e?.find(({language:e})=>t===e)))),t.conditions?.length&&(n=n.filter(({conditions:e})=>!!t.conditions?.find(({id:t})=>!!e?.find(({type:e,reason:n})=>t===`${e}#${n}`)))),t.onlyErrors&&(n=n.filter(e=>!!e.conditions?.find(e=>e.status===rn.Error))),t.errors?.length&&(n=n.filter(e=>!!t.errors?.find(t=>!!e.conditions?.find(e=>e.message===t.id)))),n},Bn=(e,t)=>t?e.filter(e=>e.dataStreamNames.includes(t)||t===zo&&!e.dataStreamNames.length):[],jn=(e,t="",n={})=>{for(const o in e)if(e.hasOwnProperty(o)){const i=e[o],a=t?`${t}.${o}`:o;null===i||"object"!=typeof i||Array.isArray(i)?Array.isArray(i)?i.forEach((e,t)=>{const o=`${a}[${t}]`;null!==e&&"object"==typeof e?jn(e,o,n):n[o]=e}):n[a]=i:jn(i,a,n)}return n},Un=e=>{if(!e)return"0 KB/s";const t=Math.floor(Math.log(e)/Math.log(1024));return`${(e/Math.pow(1024,t)).toFixed(0===t?0:1)} ${["Bytes/s","KB/s","MB/s","GB/s","TB/s"][t]}`},Wn=e=>{if(!e)return"0 ns";if(e<1e3)return`${e.toFixed(0)} ns`;if(e<1e6){const t=e/1e3;return`${t.toFixed(t<10?2:0)} μs`}if(e<1e9){const t=e/1e6;return`${t.toFixed(t<10?2:0)} ms`}if(e<6e10){const t=e/1e9;return`${t.toFixed(t<10?2:0)} s`}if(e<36e11){const t=e/6e10;return`${t.toFixed(t<10?2:0)} m`}if(e<864e11){const t=e/36e11;return`${t.toFixed(t<10?2:0)} h`}{const t=e/864e11;return`${t.toFixed(t<10?2:0)} d`}},Vn=e=>{const t=e?.filter(({status:e})=>e===rn.Error),n=e?.filter(({status:e})=>e===rn.Warning),o=e?.filter(({status:e})=>e===ln.Disabled),i=e?.filter(({status:e})=>e===ln.Loading),a=t.length>0,r=n.length>0,s=o.length>0;return{errors:t,hasErrors:a,warnings:n,hasWarnings:r,disableds:o,hasDisableds:s,loadings:i,hasLoadings:i.length>0,priorotizedStatus:a?rn.Error:r?rn.Warning:s?rn.Info:void 0}},Hn=e=>{const t=e?.reduce((e,t)=>t.instrumented?e+1:e,0);return`${t}/${e?.length||0} instrumented`},qn=e=>({[Zt.Java]:p,[Zt.Go]:u,[Zt.JavaScript]:m,[Zt.Python]:h,[Zt.DotNet]:g,[Zt.CSharp]:x,[Zt.CPlusPlus]:f,[Zt.Php]:$,[Zt.Ruby]:y,[Zt.Rust]:b,[Zt.Swift]:w,[Zt.Elixir]:k,[Zt.MySql]:v,[Zt.Nginx]:E,[Zt.Postgres]:S,[Zt.Redis]:C,[Zt.Kafka]:T,[Zt.Ignored]:n,[Zt.Unknown]:n,[Zt.Processing]:n,[Zt.NoContainers]:n,[Zt.NoRunningPods]:n}[e]||n),Gn=e=>e?.map(({language:e})=>qn(e))||[],Yn=(e,t)=>{const n={[xn.Alauda]:A,[xn.AlibabaCloud]:D,[xn.AppDynamics]:N,[xn.Axiom]:I,[xn.AzureBlob]:O,[xn.AzureMonitor]:_,[xn.BetterStack]:z,[xn.Bonree]:R,[xn.Causely]:F,[xn.Checkly]:L,[xn.Chronosphere]:M,[xn.ClickHouse]:P,[xn.CloudWatch]:B,[xn.Coralogix]:j,[xn.Dash0]:U,[xn.Datadog]:W,[xn.Dynamic]:V,[xn.Dynatrace]:H,[xn.ElasticApm]:q,[xn.ElasticSearch]:G,[xn.GoogleCloud]:Y,[xn.GoogleCloudOTLP]:Y,[xn.GrafanaCloudLoki]:J,[xn.GrafanaCloudPrometheus]:J,[xn.GrafanaCloudTempo]:J,[xn.Greptime]:K,[xn.Groundcover]:X,[xn.Honeycomb]:Q,[xn.HyperDX]:Z,[xn.Instana]:ee,[xn.Jaeger]:te,[xn.Kafka]:T,[xn.Kloudmate]:ne,[xn.Last9]:oe,[xn.Lightstep]:ie,[xn.LogzIo]:ae,[xn.Loki]:re,[xn.Lumigo]:se,[xn.Middleware]:le,[xn.NewRelic]:de,[xn.Observe]:ce,[xn.Odigos]:pe,[xn.OneUptime]:ue,[xn.OpenObserve]:me,[xn.Opsverse]:he,[xn.Oracle]:ge,[xn.OTLP]:V,[xn.OTLPHttp]:V,[xn.Prometheus]:xe,[xn.Qryn]:fe,[xn.QrynOss]:$e,[xn.Quickwit]:ye,[xn.S3]:be,[xn.Seq]:we,[xn.Signoz]:ke,[xn.Splunk]:ve,[xn.SplunkSapm]:ve,[xn.SplunkOtlp]:ve,[xn.SumoLogic]:Ee,[xn.TelemetryHub]:Se,[xn.Tempo]:Ce,[xn.Tingyun]:Te,[xn.Traceloop]:Ae,[xn.Uptrace]:De,[xn.VictoriaMetrics]:Ne,[xn.VictoriaMetricsCloud]:Ne,[xn.XRay]:Ie}[e];return n&&!t?{icon:n}:{iconSrc:`https://d15jtxgb40qetw.cloudfront.net/${e}.svg`}},Jn=e=>({[tn.Namespace]:Oe,[tn.Source]:_e,[tn.Destination]:ze,[tn.Action]:Re,[tn.InstrumentationRule]:Fe}[e]),Kn=e=>"ruleId"in e&&e.ruleId?e.ruleId:"id"in e&&e.id?e.id:"namespace"in e&&e.namespace&&"kind"in e&&e.kind&&"name"in e&&e.name?{namespace:e.namespace,name:e.name,kind:e.kind}:"name"in e&&e.name?e.name:void 0,Xn=(e,t,n)=>{const{extended:o,prioritizeDisplayName:i}=n||{};let a="",r="";switch(t){case tn.InstrumentationRule:const t=e;a=t.type,r=t.ruleName;break;case tn.Source:const n=e;a=n.name,r=n.otelServiceName;break;case tn.Action:const o=e;a=o.type,r=o.name;break;case tn.Destination:const i=e;a=i.destinationType.displayName,r=i.name;break;case tn.Namespace:const s=e;a=s.name,r=s.name}return o?a+(r&&r!==a?` (${r})`:""):i&&r||a},Qn=(e,t)=>{if(t===tn.Source){const t={namespace:"",name:"",kind:""};return e.split("&").forEach(e=>{const[n,o]=e.split("=");t[n]=o}),t}return e},Zn=e=>{const{numberOfInstances:t,containers:n}=e;if(!n)return t&&t>0?Zt.Processing:Zt.NoRunningPods;const o=n?.filter(e=>e.language!==Zt.Ignored);if(!o.length)return Zt.NoContainers;const i=o.find(e=>e.language!==Zt.Unknown);return i?i.language:Zt.Unknown},eo=(e,t,n)=>(t===tn.Source?e?.sources.find(e=>e.kind===n.kind&&e.name===n.name&&e.namespace===n.namespace):e?.destinations.find(e=>e.id===n))||{throughput:0},to=e=>({[kn.Logs]:Le,[kn.Metrics]:Me,[kn.Traces]:Pe}[e]),no=e=>e?{[Xt.K8s]:o,[Xt.Vm]:Be}[e]:pe,oo=e=>e?{[Xt.K8s]:"Kubernetes Cluster",[Xt.Vm]:"Virtual Machine"}[e]:"Unknown",io=(e,t,n)=>{const o=e[t];return o?o.flatMap(e=>{const o=e[n],i=[];return void 0!==o&&(Array.isArray(o)?i.push(...o):i.push(o)),i.push(...io(e,t,n)),i}):[]},ao=(e,t)=>{if(t===tn.Source){let t="";return Object.entries(e).forEach(([e,n])=>{t+=`${e}=${n}&`}),t.slice(0,-1),t}return e},ro=(e,t)=>({[rn.Success]:n=>je({fill:t.text[e],...n}),[rn.Error]:n=>Ue({fill:t.text[e],...n}),[rn.Warning]:n=>We({fill:t.text[e],...n}),[rn.Info]:n=>Ve({fill:t.text[e],...n}),[rn.Default]:n=>pe({fill:t.text[e],...n})}[e]),so=e=>{switch(e){case En.Success:return rn.Success;case En.Error:case En.Failure:return rn.Error;case En.Notice:return rn.Warning;case En.Unsupported:case En.Unknown:return rn.Info;case En.Irrelevant:case En.Disabled:return ln.Disabled;case En.Waiting:return ln.Loading;case En.Pending:default:return rn.Default}},lo=(e,t)=>{const n=t.find(([t,n])=>e>=t&&(null===n||e<=n));return n?.[2]||null},co=({namespace:e,name:t,kind:n})=>({namespace:e,name:t,kind:n});function po(e,t){if(!e)return t;if("object"==typeof e)return e;try{return JSON.parse(e)}catch(e){return t}}const uo=(e,t)=>{const n=[],o=JSON.parse(JSON.stringify(e));for(const e of o){const o=po(t.fields,{}),i=e.items.findIndex(e=>e.type===t.destinationType.type);-1!==i&&n.push(...e.items[i].fields.map(e=>({...e,initialValue:o[e.name]})))}return n},mo=(e,t)=>{const n=e=>e?.some(({healthy:e})=>e.status!==rn.Success);return e?.length?e.some(({instrumentationInstances:e})=>n(e)):n(t)??!1},ho=e=>Array.isArray(e)?!e?.length:"object"==typeof e?!Object.keys(e||{}).length:[void 0,null,""].includes(e),go=e=>!!e&&(!(e.length>63)&&/^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$/.test(e)),xo=(e,t=0)=>{const n=(new Date).getTime();return new Date(e).getTime()-n<=t},fo=e=>{const t=String(e).trim().toLowerCase();return["true","false","1","0"].includes(t)},$o=(e,t=0)=>(new Date).getTime()-new Date(e).getTime()>=t,yo=/^(\d+\.)?(\d+\.)?(\*|\d+)$/,bo=e=>yo.test(e),wo=e=>e?e.replace(/([a-z0-9])([A-Z])/g,"$1 $2"):"",ko=e=>e?.map(({status:e,type:t,reason:n,message:o,lastTransitionTime:i})=>({status:e,type:wo(t),reason:n?wo(n):"",message:o,lastTransitionTime:i}))||[],vo=(e,t)=>{const n=po(e.fields,{});return t.length?t.map(e=>({key:e.name,name:e.displayName||e.name,value:n[e.name]??null})).filter(e=>null!==e.value):Object.entries(n).map(([e,t])=>({key:e,name:e,value:t}))},Eo=e=>e?Object.keys(e).filter(t=>e[t]):[],So=e=>e.replace(/[^\d]/g,""),Co=e=>{const t=String(e).trim().toLowerCase();return"true"===t||"1"===t},To=e=>{let t="";try{const n=JSON.parse(e);t=Array.isArray(n)?n.map(e=>"object"==typeof e&&null!==e?`${e.key}: ${e.value}`:e).join(", "):"object"==typeof n&&null!==n?Object.entries(n).map(([e,t])=>`${e}: ${t}`).join(", "):e}catch(n){t=e}return t},Ao=e=>{if("object"!=typeof e)return e;const t=Array.isArray(e)?[]:{};return Object.keys(e).forEach(n=>{const o=e[n];if(Array.isArray(o)){const e=o.filter(e=>null!=e&&""!==e);e.length>0&&(t[n]=e.map(e=>Ao(e)))}else if("object"==typeof o&&null!==o){const e=Ao(o);Object.keys(e).length>0&&(t[n]=e)}else[void 0,null,""].includes(o)||(t[n]=o)}),t},Do=(e,t=2)=>JSON.stringify(e||{},null,t),No=async(e=1e3)=>new Promise(t=>setTimeout(t,e)),Io=e=>Object.entries(e).reduce((e,[t,n])=>(e[t]="string"==typeof n?n:JSON.stringify(n),e),{}),Oo={[Zt.Go]:"Go",[Zt.Java]:"Java",[Zt.JavaScript]:"Node.js",[Zt.Python]:"Python",[Zt.DotNet]:".NET",[Zt.CSharp]:"C#",[Zt.CPlusPlus]:"C++",[Zt.Php]:"PHP",[Zt.Ruby]:"Ruby",[Zt.Rust]:"Rust",[Zt.Swift]:"Swift",[Zt.Elixir]:"Elixir",[Zt.MySql]:"MySQL",[Zt.Nginx]:"Nginx",[Zt.Postgres]:"PostgreSQL",[Zt.Redis]:"Redis",[Zt.Kafka]:"Kafka",[Zt.Ignored]:"Ignored",[Zt.Unknown]:"Unknown",[Zt.Processing]:"Processing",[Zt.NoContainers]:"No Containers",[Zt.NoRunningPods]:"No Running Pods"},_o=[{id:Zt.Go,value:Oo[Zt.Go],icon:qn(Zt.Go)},{id:Zt.Java,value:Oo[Zt.Java],icon:qn(Zt.Java)},{id:Zt.JavaScript,value:Oo[Zt.JavaScript],icon:qn(Zt.JavaScript)},{id:Zt.Python,value:Oo[Zt.Python],icon:qn(Zt.Python)},{id:Zt.Php,value:Oo[Zt.Php],icon:qn(Zt.Php)},{id:Zt.Ruby,value:Oo[Zt.Ruby],icon:qn(Zt.Ruby)},{id:Zt.Rust,value:Oo[Zt.Rust],icon:qn(Zt.Rust)},{id:Zt.DotNet,value:Oo[Zt.DotNet],icon:qn(Zt.DotNet)},{id:Zt.CSharp,value:Oo[Zt.CSharp],icon:qn(Zt.CSharp)},{id:Zt.CPlusPlus,value:Oo[Zt.CPlusPlus],icon:qn(Zt.CPlusPlus)},{id:Zt.Swift,value:Oo[Zt.Swift],icon:qn(Zt.Swift)},{id:Zt.Elixir,value:Oo[Zt.Elixir],icon:qn(Zt.Elixir)}],zo="default",Ro={SELECTED_DATA_STREAM:"SELECTED_DATA_STREAM",SELECTED_DATA_STREAM_WITH_PROXY:e=>`SELECTED_DATA_STREAM_${e}`,OVERVIEW_FILTERS:"OVERVIEW_FILTERS",DARK_MODE:"DARK_MODE"},Fo={REQUIRED_FIELDS:"Required fields are missing",FIELD_IS_REQUIRED:"This field is required",FORBIDDEN:"Forbidden",ENTERPRISE_ONLY:(e="This")=>`${e} is an Enterprise feature. Please upgrade your plan.`,DEFINED_FOR_ALL_STREAMS:e=>`${e} are defined for all Data Streams.`,CANNOT_EDIT_RULE:"Cannot edit a system-managed instrumentation rule",CANNOT_DELETE_RULE:"Cannot delete a system-managed instrumentation rule",LATENCY_HTTP_ROUTE:'HTTP route must start with a forward slash "/"',READONLY_WARNING:"You're not allowed to create/update/delete in readonly mode",ILLEGAL_K8S_LABEL:'Must be 63 characters or less, must consist of alphanumeric characters, "-", "_", or ".", and must start & end with an alphanumeric character (e.g., my-name, 123.abc).',INVALID_VERSION:'Invalid version format, must be in the format of "major.minor.patch" (e.g. 1.0.0)'},Lo={NAMESPACE:"Namespace",NAME:"Name",KIND:"Kind",CONNECTION:"Connection",CONNECTIONS:"Connections",DATA_STREAM:"Data Stream",DATA_STREAMS:"Data Streams",STREAM_NAME:"Data Stream Name",NAME_YOUR_STREAM:"Name your Data Stream",NAME_YOUR_STREAM_PLACEHOLDER:"e.g. Highest priority",STREAM_DESCRIPTION:"Provide a clear and descriptive name for your pipeline to ensure its purpose is easily understood by you and your team.",STREAM_CONFIRM:"Confirm your new Data Stream",DATA_STREAM_EXISTS_WARNING:(e,t)=>`A Data Stream with this name already exists, you can still rename the current "${e}", but it will merge into the existing "${t}".`,ACTION:"Action",ACTIONS:"Actions",ADD_ACTION:"Add Action",ACTION_DETAILS:"Action Details",INSTRUMENTATION_RULE:"Instrumentation Rule",INSTRUMENTATION_RULES:"Instrumentation Rules",ADD_INSTRUMENTATION_RULE:"Add Instrumentation Rule",INSTRUMENTATION_RULE_DETAILS:"Instrumentation Rule Details",DESTINATION:"Destination",DESTINATIONS:"Destinations",ADD_DESTINATION:"Add Destination",ADD_DESTINATIONS:"Add Destinations",ADD_DESTINATION_DESCRIPTION:"Add a destination to send your telemetry data to. You can add multiple destinations.",DESTINATION_DETAILS:"Destination Details",SELECTED_DESTINATIONS:"Selected Destinations",SOURCE:"Source",SOURCES:"Sources",ADD_SOURCE:"Add Source",SOURCE_DETAILS:"Source Details",SELECT_SOURCES:"Select Sources",SELECTED_SOURCES:"Selected Sources",SELECT_SOURCES_DESCRIPTION:"Choose which sources to monitor in your pipeline by searching by source name or namespace.",NO_SOURCES:"No sources",NO_SOURCES_GO_BACK:"No sources selected. Please go back to select sources.",PLEASE_ADD_SOURCE:"Please add a source",NO_SOURCES_NAMESPACE:"No sources available in this namespace",TRY_SEARCH_OR_OTHER_NAMESPACE:"Try searching again or select another namespace.",PLEASE_MAKE_SURE_UNIGNORED_NAMESPACES:"Please make sure your cluster has unignored namespaces",INSTALLATION:"Installation",SUMMARY:"Summary",TYPE:"Type",NOTES:"Notes",STATUS:"Status",READONLY:"Readonly",LANGUAGE:"Language",VERSION:"Version",RUNTIME_VERSION:"Runtime Version",VERSION_PLACEHOLDER:"1.0.0",MONITORS:"Monitors",SIGNALS_FOR_PROCESSING:"Signals for Processing",MANAGED_BY_PROFILE:"Managed by Profile",TIER:"Tier",ENTERPRISE:"Enterprise",ENTERPRISE_TIER:"Enterprise Tier",COMMUNITY:"Community",COMMUNITY_TIER:"Community Tier",API_TOKEN:"API Token",API_TOKENS:"API Tokens",DESCRIBE_ODIGOS:"Describe Odigos",DESCRIBE_SOURCE:"Describe Source",DETECTED_CONTAINERS:"Detected Containers",DETECTED_CONTAINERS_DESCRIPTION:"The system automatically instruments the containers it detects with a supported programming language.",CONTAINER_NAME:"Container Name",FILTERED_COUNT_TOOLTIP:"Represents filtered amount, out of total amount",SEARCH_NAMESPACES:"Search Namespaces",SEARCH_SOURCES:"Search Sources",SELECT_ALL:"Select All",ONLY_SELECTED:"Only selected",ONLY_RUNNING_INSTANCES:"Only running instances",TO_COLLECT_OTEL_DATA:"To collect OpenTelemetry data",TO_MONITOR_OTEL_DATA:"To monitor OpenTelemetry data",TO_MODIFY_OTEL_DATA:"To modify OpenTelemetry data",QUICK_BACK_TO_SUMMARY:"When you finish editing you can quickly go back to the summary.",GO_TO_SUMMARY:"Go to summary",FUTURE_APPS_TITLE:"Auto-instrument new apps",FUTURE_APPS_DESCRIPTION:"When enabled, new applications will be instrumented automatically and included in the current data stream.",OVERIDE:"Override",OVERIDDEN:"Overridden",OVERRIDE_RUNTIME_DETAILS:"Override Runtime Details",OVERRIDE_RUNTIME_WARNING:"This is an advanced configuration. If the selected programming language is incorrect, data collection may be incomplete or may not occur at all.",ACTIVE:"Active",INACTIVE:"Inactive",ENABLED:"Enabled",DISABLED:"Disabled",NO_TRACES_FOUND:"No traces found",ARE_SERVICES_INSTRUMENTED_AND_PRODUCING_TRAFFIC:"Are your services instrumented & producing traffic?",INSTRUMENTED_METHODS:"Instrumented Methods",INSTRUMENTED_SYMBOLS:"Instrumented Symbols"},Mo={ADD:"Add",ADD_NEW:"Add New",NEW:"New",SELECT:"Select",CREATE:"Create",UPDATE:"Update",EDIT:"Edit",DELETE:"Delete",CANCEL:"Cancel",DONE:"Done",SAVE:"Save",BACK:"Back",NEXT:"Next",TEST:"Test",TEST_CONNECTION:"Test Connection",INSTRUMENT:"Instrument",UNINSTRUMENT:"Uninstrument"},Po=6048e5,Bo=dt()(bt(e=>({darkMode:!0,setDarkMode:t=>e({darkMode:t})}),{name:Ro.DARK_MODE,storage:"undefined"!=typeof window?wt(()=>localStorage):void 0})),jo={dataStreamsLoading:!1,dataStreams:[],selectedStreamName:""},Uo=dt(e=>({...jo,setDataStreamsLoading:t=>e({dataStreamsLoading:t}),setDataStreams:t=>e({dataStreams:t}),addDataStreams:t=>e(e=>{const n=[...e.dataStreams,...t].map(e=>[e.name,e]);return{dataStreams:Array.from(new Map(n).values())}}),removeDataStreams:t=>e(e=>({dataStreams:e.dataStreams.filter(e=>!t.find(t=>t.name===e.name))})),setSelectedStreamName:t=>e({selectedStreamName:t}),resetDataStreamStore:()=>e(jo)})),Wo=dt(e=>({drawerType:null,drawerEntityId:null,setDrawerType:t=>e({drawerType:t}),setDrawerEntityId:t=>e({drawerEntityId:t})})),Vo=dt(e=>({namespacesLoading:!1,namespaces:[],sourcesLoading:!1,sources:[],destinationsLoading:!1,destinations:[],actionsLoading:!1,actions:[],instrumentationRulesLoading:!1,instrumentationRules:[],setEntitiesLoading:(t,n)=>{const o=t===tn.Namespace?"namespacesLoading":t===tn.Source?"sourcesLoading":t===tn.Destination?"destinationsLoading":t===tn.Action?"actionsLoading":t===tn.InstrumentationRule?"instrumentationRulesLoading":"NONE";"NONE"!==o&&e({[o]:n})},setEntities:(t,n)=>{const o=t===tn.Namespace?"namespaces":t===tn.Source?"sources":t===tn.Destination?"destinations":t===tn.Action?"actions":t===tn.InstrumentationRule?"instrumentationRules":"NONE";"NONE"!==o&&e({[o]:n})},addEntities:(t,n)=>{const o=t===tn.Namespace?"namespaces":t===tn.Source?"sources":t===tn.Destination?"destinations":t===tn.Action?"actions":t===tn.InstrumentationRule?"instrumentationRules":"NONE";"NONE"!==o&&e(e=>{const t=[...e[o]];return n.forEach(e=>{const n=t.findIndex(t=>JSON.stringify(Kn(t))===JSON.stringify(Kn(e)));-1!==n?t[n]={...t[n],...e}:t.push(e)}),{[o]:t}})},removeEntities:(t,n)=>{const o=t===tn.Namespace?"namespaces":t===tn.Source?"sources":t===tn.Destination?"destinations":t===tn.Action?"actions":t===tn.InstrumentationRule?"instrumentationRules":"NONE";"NONE"!==o&&e(e=>{const i=[...e[o]];return n.forEach(e=>{const n=i.findIndex(n=>t===tn.Source?JSON.stringify(Kn(n))===JSON.stringify(Kn(e)):Kn(n)===e);-1!==n&&i.splice(n,1)}),{[o]:i}})},resetEntityStore:()=>{e({namespacesLoading:!1,namespaces:[],sourcesLoading:!1,sources:[],destinationsLoading:!1,destinations:[],actionsLoading:!1,actions:[],instrumentationRulesLoading:!1,instrumentationRules:[]})}})),Ho=()=>({searchText:"",statuses:[],platformTypes:[],namespaces:[],kinds:[],monitors:[],languages:[],conditions:[],errors:[],onlyErrors:!1}),qo=dt(e=>({searchText:"",setSearchText:t=>e({searchText:t}),statuses:[],setStatuses:t=>e({statuses:t}),platformTypes:[],setPlatformTypes:t=>e({platformTypes:t}),namespaces:[],setNamespaces:t=>e({namespaces:t}),kinds:[],setKinds:t=>e({kinds:t}),monitors:[],setMonitors:t=>e({monitors:t}),languages:[],setLanguages:t=>e({languages:t}),conditions:[],setConditions:t=>e({conditions:t}),errors:[],setErrors:t=>e({errors:t}),onlyErrors:!1,setOnlyErrors:t=>e({onlyErrors:t}),setAll:t=>e(t),clearAll:()=>e({searchText:"",statuses:[],platformTypes:[],namespaces:[],kinds:[],monitors:[],languages:[],conditions:[],errors:[],onlyErrors:!1}),getEmptyState:Ho})),Go=dt(e=>({isAwaitingInstrumentation:!1,sourcesToCreate:0,sourcesCreated:0,sourcesToDelete:0,sourcesDeleted:0,setInstrumentAwait:t=>e({isAwaitingInstrumentation:t}),setInstrumentCount:(t,n)=>e({[t]:n})})),Yo=dt(e=>({currentModal:"",setCurrentModal:t=>e({currentModal:t})})),Jo=dt((e,t)=>({notifications:[],addNotification:n=>{const o=new Date,i=`${o.getTime().toString()}${n.target?`#${n.target}`:""}`,{notifications:a}=t();a.some(e=>e.type===n.type&&e.title===n.title&&e.message===n.message&&!e.dismissed)||e(e=>({notifications:[{...n,id:i,time:o.toISOString(),dismissed:!1,seen:!1},...e.notifications]}))},markAsDismissed:t=>{e(e=>{const n=e.notifications.findIndex(e=>e.id===t);return-1!==n&&(e.notifications[n].dismissed=!0),{notifications:e.notifications}})},markAsSeen:t=>{e(e=>{const n=e.notifications.findIndex(e=>e.id===t);return-1!==n&&(e.notifications[n].seen=!0),{notifications:e.notifications}})},removeNotification:t=>{e(e=>{const n=e.notifications.findIndex(e=>e.id===t);return-1!==n&&e.notifications.splice(n,1),{notifications:e.notifications}})},removeNotifications:t=>{t&&e(e=>({notifications:e.notifications.filter(e=>e.id.split("#")[1]!==t)}))}})),Ko=(e,t)=>{const n=e.entityType===t.entityType,o="string"==typeof e.entityId&&"string"==typeof t.entityId?e.entityId===t.entityId:"object"==typeof e.entityId&&"object"==typeof t.entityId?e.entityId.namespace===t.entityId.namespace&&e.entityId.name===t.entityId.name&&e.entityId.kind===t.entityId.kind:!e.entityId&&!t.entityId;return n&&o},Xo=dt((e,t)=>({pendingItems:[],setPendingItems:t=>e({pendingItems:t}),addPendingItems:t=>e(e=>({pendingItems:e.pendingItems.concat(t.filter(t=>!e.pendingItems.some(e=>Ko(e,t))))})),removePendingItems:t=>e(e=>({pendingItems:e.pendingItems.filter(e=>!t.find(t=>Ko(e,t)))})),isThisPending:e=>{const{pendingItems:n}=t();let o=!1;for(let t=0;t<n.length;t++){const i=n[t];if(i.entityType===e.entityType&&(!e.entityId||(i.entityType===tn.Source?i.entityId&&e.entityId&&i.entityId.namespace===e.entityId.namespace&&i.entityId.name===e.entityId.name&&i.entityId.kind===e.entityId.kind:i.entityId===e.entityId))){o=!0;break}}return o}})),Qo=dt(e=>({selectedSources:{},setSelectedSources:t=>e({selectedSources:t}),resetSelectedState:()=>e(()=>({selectedSources:{}}))})),Zo={availableSources:{},configuredSources:{},configuredFutureApps:{},configuredDestinations:[],configuredDestinationsUpdateOnly:[]},ei=(e,t)=>e.destinationType.type!==t.destinationType.type,ti=dt(e=>({...Zo,setAvailableSources:t=>e({availableSources:t}),setConfiguredSources:t=>e({configuredSources:t}),setConfiguredFutureApps:t=>e({configuredFutureApps:t}),setConfiguredDestinations:t=>e({configuredDestinations:t}),addConfiguredDestination:t=>e(e=>({configuredDestinations:[...e.configuredDestinations,t]})),removeConfiguredDestination:t=>e(e=>({configuredDestinations:e.configuredDestinations.filter(e=>ei(e,t))})),setConfiguredDestinationsUpdateOnly:t=>e({configuredDestinationsUpdateOnly:t}),addConfiguredDestinationUpdateOnly:t=>e(e=>{const n=[...e.configuredDestinationsUpdateOnly,t].map(e=>[e.id,e]);return{configuredDestinationsUpdateOnly:Array.from(new Map(n).values())}}),removeConfiguredDestinationUpdateOnly:t=>e(e=>({configuredDestinationsUpdateOnly:e.configuredDestinationsUpdateOnly.filter(e=>ei(e,t))})),resetState:()=>e(()=>({...Zo}))})),ni={colors:{majestic_blue:"#444AD9",majestic_blue_soft:"#6C7AE8",orange_og:"#FE9239",orange_soft:"#FFB160",dark_red:"#802828",darker_red:"#611F1F",darkest_red:"#281515",darkest_red_hover:"#351515",dark_green:"#2D4323"},text:{},font_family:{primary:"Inter, sans-serif",secondary:"Kode Mono, sans-serif",code:"IBM Plex Mono, monospace"}},oi={darkMode:!0,colors:{...ni.colors,primary:"#111111",secondary:"#F9F9F9",border:"#525252",dark_grey:"#151515",translucent_bg:"#1A1A1A",dropdown_bg:"#242424",dropdown_bg_2:"#333333",warning:"#472300",error:"#431919",success:"#172013",info:"#242424",default:"#181944"},text:{white:"#FFFFFF",primary:"#111111",secondary:"#F9F9F9",grey:"#B8B8B8",dark_grey:"#8F8F8F",darker_grey:"#7A7A7A",light_grey:"#CCD0D2",dark_button:"#0A1824",warning:"#E9CF35",warning_secondary:"#FFA349",error:"#EF7676",error_secondary:"#DB5151",success:"#81AF65",success_secondary:"#51DB51",info:"#B8B8B8",info_secondary:"#CCDDDD",default:"#AABEF7",default_secondary:"#8CBEFF"},font_family:ni.font_family},ii={darkMode:!1,colors:{...ni.colors,primary:"#EEEEEE",secondary:"#060606",border:"#ADADAD",dark_grey:"#EAEAEA",translucent_bg:"#E5E5E5",dropdown_bg:"#DBDBDB",dropdown_bg_2:"#CCCCCC",warning:"#F6F092",error:"#FACECE",success:"#C8DEB8",info:"#E0E0E0",default:"#CAD9FB"},text:{white:"#FFFFFF",primary:"#EEEEEE",secondary:"#060606",grey:"#474747",dark_grey:"#707070",darker_grey:"#858585",light_grey:"#332F2D",dark_button:"#F5E7DB",warning:"#A56F12",warning_secondary:"#CA9416",error:"#B63A3A",error_secondary:"#DB5151",success:"#4E763A",success_secondary:"#67964C",info:"#525252",info_secondary:"#7A7A7A",default:"#444AD9",default_secondary:"#6C7AE8"},font_family:ni.font_family},ai=e=>e?oi:ii;kt('@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap");@import url("https://fonts.googleapis.com/css2?family=Kode+Mono:wght@100;200;300;400;500;600;700&display=swap");@import url("https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;700&display=swap");@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&display=swap");*{-ms-overflow-style:none;scrollbar-width:none}::-webkit-scrollbar{display:none}svg{transition:all .3s}input{all:unset}input:-webkit-autofill,input:-webkit-autofill:active,input:-webkit-autofill:focus,input:-webkit-autofill:hover{-webkit-transition:all 50000s ease-in-out 0s;transition:all 50000s ease-in-out 0s}');const ri={in:{left:Ct`
|
|
1
|
+
import{SamplerIcon as e,PiiMaskingIcon as t,ImageErrorIcon as n,K8sLogo as o,AddClusterInfoIcon as i,DeleteAttributeIcon as a,RenameAttributeIcon as r,CodeAttributesIcon as s,CustomInstrumentationIcon as l,HeadersCollectionIcon as d,PayloadCollectionIcon as c,JavaLogo as p,GoLogo as u,NodejsLogo as m,PythonLogo as h,DotnetLogo as g,CSharpLogo as x,CPlusPlusLogo as f,PhpLogo as $,RubyLogo as y,RustLogo as b,SwiftLogo as w,ElixirLogo as k,MysqlLogo as v,NginxLogo as E,PostgresLogo as S,RedisLogo as C,KafkaLogo as T,AlaudaLogo as A,AlibabaCloudLogo as D,AppDynamicsLogo as N,AxiomLogo as I,AzureBlobLogo as O,AzureMonitorLogo as _,BetterStackLogo as z,BonreeLogo as R,CauselyLogo as F,ChecklyLogo as L,ChronosphereLogo as P,ClickhouseLogo as M,AwsCloudwatchLogo as B,CoralogixLogo as j,Dash0Logo as U,DatadogLogo as W,OpenTelemetryLogo as V,DynatraceLogo as H,ElasticApmLogo as q,ElasticSearchLogo as G,GoogleCloudPlatformLogo as Y,GrafanaLogo as J,GreptimeLogo as K,GroundcoverLogo as X,HoneycombLogo as Q,HyperDxLogo as Z,InstanaLogo as ee,JaegerLogo as te,KloudmateLogo as ne,Last9Logo as oe,LightstepLogo as ie,LogzioLogo as ae,LokiLogo as re,LumigoLogo as se,MiddlewareLogo as le,NewRelicLogo as de,ObserveLogo as ce,OdigosLogo as pe,OneUptimeLogo as ue,OpenObserveLogo as me,OpsVerseLogo as he,OracleLogo as ge,PrometheusLogo as xe,QrynLogo as fe,GigapipeLogo as $e,QuickwitLogo as ye,AwsS3Logo as be,SeqLogo as we,SignozLogo as ke,SplunkLogo as ve,SumoLogicLogo as Ee,TelemetryHubLogo as Se,TempoLogo as Ce,TingyunLogo as Te,TraceloopLogo as Ae,UptraceLogo as De,VictoriaMetricsLogo as Ne,AwsXrayLogo as Ie,NamespacesIcon as Oe,SourcesIcon as _e,DestinationsIcon as ze,ActionsIcon as Re,RulesIcon as Fe,LogsIcon as Le,MetricsIcon as Pe,TracesIcon as Me,VmLogo as Be,CheckCircledIcon as je,ErrorTriangleIcon as Ue,WarningTriangleIcon as We,InfoIcon as Ve,MinusIcon as He,CheckIcon as qe,ListIcon as Ge,CodeIcon as Ye,ExtendArrowIcon as Je,PlusIcon as Ke,CopyIcon as Xe,EditIcon as Qe,EditedIcon as Ze,SortArrowsIcon as et,NotebookIcon as tt,XIcon as nt,EyeClosedIcon as ot,EyeOpenIcon as it,NoDataIcon as at,CrossIcon as rt,SearchIcon as st,TrashIcon as lt}from"../icons.js";import{create as dt}from"zustand";import ct,{Fragment as pt,useMemo as ut,useState as mt,useEffect as ht,useRef as gt,forwardRef as xt,useCallback as ft,memo as $t}from"react";import yt from"javascript-time-ago";import{p as bt,c as wt,s as kt,e as vt}from"./vendor-1dea551d.js";import Et,{ThemeProvider as St,keyframes as Ct,useTheme as Tt,css as At}from"styled-components";import{Handle as Dt,Position as Nt,getSmoothStepPath as It,BaseEdge as Ot,EdgeLabelRenderer as _t,ReactFlow as zt,Controls as Rt}from"@xyflow/react";import Ft from"react-dom";import{Highlight as Lt,themes as Pt}from"prism-react-renderer";import{ErrorBoundary as Mt}from"react-error-boundary";import Bt from"lottie-react";const jt=dt(e=>({activeNodeType:null,activeNodeId:null,setActiveNodeType:t=>e({activeNodeType:t}),setActiveNodeId:t=>e({activeNodeId:t})}));var Ut,Wt,Vt,Ht,qt,Gt,Yt,Jt,Kt,Xt,Qt,Zt,en,tn,nn,on,an,rn,sn,ln,dn,cn,pn,un,mn,hn,gn,xn,fn,$n,yn,bn,wn,kn,vn,En;!function(e){e.Attributes="attributes",e.Samplers="samplers"}(Ut||(Ut={})),function(e){e.K8sAttributes="K8sAttributesResolver",e.AddClusterInfo="AddClusterInfo",e.DeleteAttributes="DeleteAttribute",e.RenameAttributes="RenameAttribute",e.PiiMasking="PiiMasking",e.ErrorSampler="ErrorSampler",e.ProbabilisticSampler="ProbabilisticSampler",e.LatencySampler="LatencySampler",e.ServiceNameSampler="ServiceNameSampler",e.SpanAttributeSampler="SpanAttributeSampler"}(Wt||(Wt={})),function(e){e.CollectContainerAttributes="collectContainerAttributes",e.CollectReplicaSetAttributes="collectReplicaSetAttributes",e.CollectWorkloadId="collectWorkloadId",e.CollectClusterId="collectClusterId",e.LabelsAttributes="labelsAttributes",e.AnnotationsAttributes="annotationsAttributes",e.ClusterAttributes="clusterAttributes",e.OverwriteExistingValues="overwriteExistingValues",e.AttributeNamesToDelete="attributeNamesToDelete",e.Renames="renames",e.PiiCategories="piiCategories",e.FallbackSamplingRatio="fallbackSamplingRatio",e.SamplingPercentage="samplingPercentage",e.EndpointsFilters="endpointsFilters",e.ServicesNameFilters="servicesNameFilters",e.AttributeFilters="attributeFilters"}(Vt||(Vt={})),function(e){e.Pod="pod",e.Namespace="namespace"}(Ht||(Ht={})),function(e){e.EXISTS="exists",e.EQUALS="equals",e.NOT_EQUALS="not_equals",e.CONTAINS="contains",e.NOT_CONTAINS="not_contains",e.REGEX="regex"}(qt||(qt={})),function(e){e.EXISTS="exists",e.EQUALS="equals",e.NOT_EQUALS="not_equals",e.GREATER_THAN="greater_than",e.LESS_THAN="less_than",e.GREATER_THAN_OR_EQUAL="greater_than_or_equal",e.LESS_THAN_OR_EQUAL="less_than_or_equal"}(Gt||(Gt={})),function(e){e.EXISTS="exists",e.EQUALS="equals"}(Yt||(Yt={})),function(e){e.EXISTS="exists",e.EQUALS="equals",e.NOT_EQUALS="not_equals",e.IS_VALID_JSON="is_valid_json",e.IS_INVALID_JSON="is_invalid_json",e.JSONPATH_EXISTS="jsonpath_exists",e.KEY_EQUALS="key_equals",e.KEY_NOT_EQUALS="key_not_equals"}(Jt||(Jt={})),function(e){e.Community="community",e.Cloud="cloud",e.Onprem="onprem"}(Kt||(Kt={})),function(e){e.K8s="k8s",e.Vm="vm"}(Xt||(Xt={})),function(e){e.Cli="odigos-cli",e.Helm="helm",e.Operator="odigos-operator"}(Qt||(Qt={})),function(e){e.Go="go",e.JavaScript="javascript",e.Python="python",e.Java="java",e.DotNet="dotnet",e.CSharp="csharp",e.CPlusPlus="cplusplus",e.Php="php",e.Ruby="ruby",e.Rust="rust",e.Swift="swift",e.Elixir="elixir",e.MySql="mysql",e.Nginx="nginx",e.Postgres="postgres",e.Redis="redis",e.Kafka="kafka",e.Ignored="ignored",e.Unknown="unknown",e.Processing="processing",e.NoContainers="no containers",e.NoRunningPods="no running pods"}(Zt||(Zt={})),function(e){e.Create="Create",e.Read="Read",e.Update="Update",e.Delete="Delete"}(en||(en={})),function(e){e.Namespace="Namespace",e.Source="Source",e.Destination="Destination",e.Action="Action",e.InstrumentationRule="InstrumentationRule"}(tn||(tn={})),function(e){e.DataStream="DataStream"}(nn||(nn={})),function(e){e.Input="input",e.MultiInput="multiInput",e.MultiTabledInput="multiTabledInput",e.KeyValuePair="keyValuePairs",e.TextArea="textarea",e.Dropdown="dropdown",e.Checkbox="checkbox",e.Toggle="toggle"}(on||(on={})),function(e){e.Text="text",e.Password="password",e.Number="number"}(an||(an={})),function(e){e.Warning="warning",e.Error="error",e.Success="success",e.Info="info",e.Default="default"}(rn||(rn={})),function(e){e.INSTRUMENTED="Instrumented",e.INSTRUMENTING="Instrumenting",e.UNINSTRUMENTED="Uninstrumented",e.NOT_INSTRUMENTED="Not Instrumented"}(sn||(sn={})),function(e){e.Loading="loading",e.Disabled="disabled"}(ln||(ln={})),function(e){e.Ascending="asc",e.Descending="desc"}(dn||(dn={})),function(e){e.CodeAttributes="code-attributes",e.FullPayloadCollection="full-payload-collection",e.DbPayloadCollection="db-payload-collection",e.QueryOperationDetector="query-operation-detector",e.AllowConcurrentAgents="allow_concurrent_agents",e.JavaEbpfInstrumentations="java-ebpf-instrumentations",e.JavaNativeInstrumentations="java-native-instrumentations",e.SizeS="size_s",e.SizeM="size_m",e.SizeL="size_l"}(cn||(cn={})),function(e){e.VirtualDevice="VirtualDevice",e.HostPath="HostPath",e.InitContainer="InitContainer"}(pn||(pn={})),function(e){e.Loader="loader",e.PodManifest="pod-manifest",e.LoaderFallbackToPodManifest="loader-fallback-to-pod-manifest"}(un||(un={})),function(e){e.Header="header",e.Add="add",e.Base="base",e.Edged="edged",e.Frame="frame",e.Scroll="scroll",e.Skeleton="skeleton",e.MapItem="map-item",e.NoData="no-data"}(mn||(mn={})),function(e){e.Labeled="labeled"}(hn||(hn={})),function(e){e.AddRule="addRule",e.AddSource="addSource",e.AddAction="addAction",e.AddDestination="addDestination"}(gn||(gn={})),function(e){e.Alauda="alauda",e.AlibabaCloud="alibabacloud",e.AppDynamics="appdynamics",e.Axiom="axiom",e.AzureBlob="azureblob",e.AzureMonitor="azuremonitor",e.BetterStack="betterstack",e.Bonree="bonree",e.Causely="causely",e.Checkly="checkly",e.Chronosphere="chronosphere",e.ClickHouse="clickhouse",e.CloudWatch="cloudwatch",e.Coralogix="coralogix",e.Dash0="dash0",e.Datadog="datadog",e.Dynamic="dynamic",e.Dynatrace="dynatrace",e.ElasticApm="elasticapm",e.ElasticSearch="elasticsearch",e.GoogleCloud="googlecloud",e.GoogleCloudOTLP="googlecloudotlp",e.GrafanaCloudLoki="grafanacloudloki",e.GrafanaCloudPrometheus="grafanacloudprometheus",e.GrafanaCloudTempo="grafanacloudtempo",e.Greptime="greptime",e.Groundcover="groundcover",e.Honeycomb="honeycomb",e.HyperDX="hyperdx",e.Instana="instana",e.Jaeger="jaeger",e.Kafka="kafka",e.Kloudmate="kloudmate",e.Last9="last9",e.Lightstep="lightstep",e.LogzIo="logzio",e.Loki="loki",e.Lumigo="lumigo",e.Middleware="middleware",e.NewRelic="newrelic",e.Observe="observe",e.Odigos="odigos",e.OneUptime="oneuptime",e.OpenObserve="openobserve",e.Opsverse="opsverse",e.Oracle="oracle",e.OTLP="otlp",e.OTLPHttp="otlphttp",e.Prometheus="prometheus",e.Qryn="qryn",e.QrynOss="qryn-oss",e.Quickwit="quickwit",e.S3="s3",e.Seq="seq",e.Signoz="signoz",e.Splunk="splunk",e.SplunkSapm="splunksapm",e.SplunkOtlp="splunkotlp",e.SumoLogic="sumologic",e.TelemetryHub="telemetryhub",e.Tempo="tempo",e.Tingyun="tingyun",e.Traceloop="traceloop",e.Uptrace="uptrace",e.VictoriaMetrics="victoriametrics",e.VictoriaMetricsCloud="victoriametricscloud",e.XRay="xray"}(xn||(xn={})),function(e){e.CodeAttributes="CodeAttributes",e.HeadersCollection="HeadersCollection",e.PayloadCollection="PayloadCollection",e.CustomInstrumentation="CustomInstrumentation",e.UnknownType="UnknownType"}(fn||(fn={})),function(e){e.Column="column",e.FilePath="filePath",e.Function="function",e.LineNumber="lineNumber",e.Namespace="namespace",e.StackTrace="stacktrace"}($n||($n={})),function(e){e.HeaderKeys="headerKeys"}(yn||(yn={})),function(e){e.Java="java",e.Golang="golang"}(bn||(bn={})),function(e){e.HttpRequest="httpRequest",e.HttpResponse="httpResponse",e.DbQuery="dbQuery",e.Messaging="messaging"}(wn||(wn={})),function(e){e.Logs="logs",e.Metrics="metrics",e.Traces="traces"}(kn||(kn={})),function(e){e.Deployment="Deployment",e.DaemonSet="DaemonSet",e.StatefulSet="StatefulSet",e.CronJob="CronJob"}(vn||(vn={})),function(e){e.Error="Error",e.Failure="Failure",e.Notice="Notice",e.Pending="Pending",e.Waiting="Waiting",e.Unsupported="Unsupported",e.Disabled="Disabled",e.Success="Success",e.Irrelevant="Irrelevant",e.Unknown="Unknown"}(En||(En={}));const Sn=s=>{const l=s?.toLowerCase(),d=l?.includes(Ut.Samplers),c=l===Ut.Attributes;return d?e:c?t:{[Wt.K8sAttributes]:o,[Wt.AddClusterInfo]:i,[Wt.DeleteAttributes]:a,[Wt.PiiMasking]:t,[Wt.RenameAttributes]:r,[Wt.ErrorSampler]:e,[Wt.ProbabilisticSampler]:e,[Wt.LatencySampler]:e,[Wt.ServiceNameSampler]:e,[Wt.SpanAttributeSampler]:e}[s]||n},Cn=[{label:"Attributes",icon:Sn(Ut.Attributes),items:[{type:Wt.K8sAttributes,icon:Sn(Wt.K8sAttributes),label:"Kubernetes Attributes",description:"Add dynamic k8s resource attributes to your data.",allowedSignals:[kn.Traces,kn.Metrics,kn.Logs],docsEndpoint:"/pipeline/actions/attributes/k8sattributes",docsDescription:"This action adds kubernetes related resource attributes to spans, metrics data points and log records."},{type:Wt.AddClusterInfo,icon:Sn(Wt.AddClusterInfo),label:"Add Cluster Info",description:"Add static cluster-scoped attributes to your data.",allowedSignals:[kn.Traces,kn.Metrics,kn.Logs],docsEndpoint:"/pipeline/actions/attributes/addclusterinfo",docsDescription:"This action adds static resource attributes to spans, metrics data points and log records. It is useful to add cluster-wide attributes to all telemetry signals."},{type:Wt.DeleteAttributes,icon:Sn(Wt.DeleteAttributes),label:"Delete Attribute",description:"Delete attributes from logs, metrics, and traces.",allowedSignals:[kn.Traces,kn.Metrics,kn.Logs],docsEndpoint:"/pipeline/actions/attributes/deleteattribute",docsDescription:"This action will delete the specified attributes from all telemetry signals that are specified in the signals field, regardless of the source, or any other condition."},{type:Wt.RenameAttributes,icon:Sn(Wt.RenameAttributes),label:"Rename Attribute",description:"Rename attributes in logs, metrics, and traces.",allowedSignals:[kn.Traces,kn.Metrics,kn.Logs],docsEndpoint:"/pipeline/actions/attributes/renameattribute",docsDescription:"This action will rename the specified attributes from all telemetry signals that are specified in the signals field, regardless of the source, or any other condition."},{type:Wt.PiiMasking,icon:Sn(Wt.PiiMasking),label:"PII Masking",description:"Mask PII data in your traces.",allowedSignals:[kn.Traces],docsEndpoint:"/pipeline/actions/attributes/piimasking",docsDescription:"This action processes a list of PII categories to be masked from the traces."}]},{label:"Samplers",icon:Sn(Ut.Samplers),items:[{type:Wt.ErrorSampler,icon:Sn(Ut.Samplers),label:"Error Sampler",description:"Sample errors based on percentage.",allowedSignals:[kn.Traces],docsEndpoint:"/pipeline/actions/sampling/errorsampler",docsDescription:"This action is a Global Action that supports error sampling by filtering out non-error traces."},{type:Wt.LatencySampler,icon:Sn(Ut.Samplers),label:"Latency Sampler",description:"Add latency to your traces.",allowedSignals:[kn.Traces],docsEndpoint:"/pipeline/actions/sampling/latencysampler",docsDescription:"This action is an Endpoint Action that samples traces based on their duration for a specific service and endpoint (HTTP route) filter."},{type:Wt.ProbabilisticSampler,icon:Sn(Ut.Samplers),label:"Probabilistic Sampler",description:"Sample traces based on percentage.",allowedSignals:[kn.Traces],docsEndpoint:"/pipeline/actions/sampling/probabilisticsampler",docsDescription:"This action supports probabilistic sampling based on a configured sampling percentage applied to the TraceID."},{type:Wt.ServiceNameSampler,icon:Sn(Ut.Samplers),label:"Service Name Sampler",description:"Sample traces based on the presence of specified services within a trace.",allowedSignals:[kn.Traces],docsEndpoint:"/pipeline/actions/sampling/servicenamesampler",docsDescription:"This action supports service name sampling based on the presence of specified services within a trace."},{type:Wt.SpanAttributeSampler,icon:Sn(Ut.Samplers),label:"Span Attributes Sampler",description:"Sample traces based on the presence or value of specific attributes within a trace.",allowedSignals:[kn.Traces],docsEndpoint:"/pipeline/actions/sampling/spanattributesampler",docsDescription:"This action supports service name sampling based on the presence or value of specific attributes within a trace."}]}],Tn={DETECTED:{TITLE:"Detected by Odigos",DESCRIPTION:"Odigos found these destinations in your cluster and pre-filled their details. Review and enable them to start sending data."},EXISTS:{TITLE:"Already configured",DESCRIPTION:"These are destinations that you have already configured in other data-streams and can reuse them."},MANAGED:{TITLE:"Managed",DESCRIPTION:"Effortless monitoring with scalable performance management."},SELF_HOSTED:{TITLE:"Self-hosted",DESCRIPTION:"Full control and customization for advanced application monitoring."}},An=e=>({[fn.CodeAttributes]:s,[fn.CustomInstrumentation]:l,[fn.HeadersCollection]:d,[fn.PayloadCollection]:c,[fn.UnknownType]:n}[e]||n),Dn=[{type:fn.CodeAttributes,icon:An(fn.CodeAttributes),label:"Code Attributes",description:"Collect code attributes containing payload data to traces.",docsEndpoint:"/pipeline/rules/codeattributes",docsDescription:'The "Code Attributes" Rule can be used to add code attributes containing payload data to traces.',supportedLanguages:[Zt.Go,Zt.Python]},{type:fn.CustomInstrumentation,icon:An(fn.CustomInstrumentation),label:"Custom Instrumentation",description:"Define custom instrumentation for specific class and methods(i.e for Java) or explicit symbol(i.e. Golang).",docsEndpoint:"/pipeline/rules/custominstrumentation",docsDescription:'The "Custom Instrumentation" Rule can be used to instrument a specific symbol(i.e for Golang), or a class and method combination (i.e. for Java) for detailed tracing.',supportedLanguages:[Zt.Go,Zt.Java]},{type:fn.HeadersCollection,icon:An(fn.HeadersCollection),label:"Headers Collection",description:"Collect span attributes containing HTTP Headers data to traces.",docsEndpoint:"/pipeline/rules/headerscollection",docsDescription:'The "Headers Collection" Rule can be used to add span attributes containing HTTP Headers data to traces.',supportedLanguages:[Zt.Go,Zt.Java,Zt.JavaScript]},{type:fn.PayloadCollection,icon:An(fn.PayloadCollection),label:"Payload Collection",description:"Collect span attributes containing payload data to traces.",docsEndpoint:"/pipeline/rules/payloadcollection",docsDescription:'The "Payload Collection" Rule can be used to add span attributes containing payload data to traces.',supportedLanguages:[Zt.Go]}],Nn=[{id:kn.Logs,value:"Logs"},{id:kn.Metrics,value:"Metrics"},{id:kn.Traces,value:"Traces"}],In=e=>e.charAt(0).toUpperCase()+e.slice(1),On=e=>{const t=e=>e.filter(e=>"object"==typeof e&&null!==e?""!==e.key&&""!==e.value:""!==e),n=e=>Object.fromEntries(Object.entries(e).filter(([e,t])=>""!==e&&""!==t).map(([e,o])=>Array.isArray(o)?[e,t(o)]:"object"==typeof o&&null!==o?[e,n(o)]:[e,o]));return Object.entries(e).reduce((e,[o,i])=>{try{const a=JSON.parse(i);Array.isArray(a)?e[o]=JSON.stringify(t(a)):e[o]="object"==typeof a&&null!==a?JSON.stringify(n(a)):i}catch(a){"object"==typeof i&&null!==i?Array.isArray(i)?e[o]=JSON.stringify(t(i)):e[o]=JSON.stringify(n(i)):e[o]=i}return e},{})};var _n;!function(e){e.SIGNALS="SIGNALS"}(_n||(_n={}));const zn=(e,t,n)=>{if(!e||!e.length)return!0;if(1===e.length)return"true"==e[0];const[o,i,a]=e;if(o===_n.SIGNALS)switch(i){case"INCLUDES":return t?.includes(a);case"EXCLUDES":return!t?.includes(a);default:return!0}const r=n.find(e=>e.name===o);if(!r)return!0;switch(i){case"===":case"==":return r.value===a;case"!==":case"!=":return r.value!==a;case">":return Number(r.value)>Number(a);case"<":return Number(r.value)<Number(a);case">=":return Number(r.value)>=Number(a);case"<=":return Number(r.value)<=Number(a);default:return!0}},Rn=e=>JSON.parse(JSON.stringify(e)),Fn=(e,t)=>{let n=[...e];return t.monitors?.length&&(n=n.filter(e=>!!t.monitors?.find(t=>e.signals?.find(e=>e.toLowerCase()===t.id)))),n},Ln=(e,t)=>{let n=[...e];return t.monitors?.length&&(n=n.filter(e=>!!t.monitors?.find(t=>e.exportedSignals[t.id]))),n},Pn=(e,t)=>t?e.filter(e=>e.dataStreamNames.includes(t)||!e.dataStreamNames.length):[],Mn=(e,t)=>{let n=[...e];return t.namespaces?.length&&(n=n.filter(({namespace:e})=>!!t.namespaces?.find(({id:t})=>t===e))),t.kinds?.length&&(n=n.filter(({kind:e})=>!!t.kinds?.find(({id:t})=>t===e))),t.languages?.length&&(n=n.filter(({containers:e})=>!!t.languages?.find(({id:t})=>!!e?.find(({language:e})=>t===e)))),t.conditions?.length&&(n=n.filter(({conditions:e})=>!!t.conditions?.find(({id:t})=>!!e?.find(({type:e,reason:n})=>t===`${e}#${n}`)))),t.onlyErrors&&(n=n.filter(e=>!!e.conditions?.find(e=>e.status===rn.Error))),t.errors?.length&&(n=n.filter(e=>!!t.errors?.find(t=>!!e.conditions?.find(e=>e.message===t.id)))),n},Bn=(e,t)=>t?e.filter(e=>e.dataStreamNames.includes(t)||t===zo&&!e.dataStreamNames.length):[],jn=(e,t="",n={})=>{for(const o in e)if(e.hasOwnProperty(o)){const i=e[o],a=t?`${t}.${o}`:o;null===i||"object"!=typeof i||Array.isArray(i)?Array.isArray(i)?i.forEach((e,t)=>{const o=`${a}[${t}]`;null!==e&&"object"==typeof e?jn(e,o,n):n[o]=e}):n[a]=i:jn(i,a,n)}return n},Un=e=>{if(!e)return"0 KB/s";const t=Math.floor(Math.log(e)/Math.log(1024));return`${(e/Math.pow(1024,t)).toFixed(0===t?0:1)} ${["Bytes/s","KB/s","MB/s","GB/s","TB/s"][t]}`},Wn=e=>{if(!e)return"0 ns";if(e<1e3)return`${e.toFixed(0)} ns`;if(e<1e6){const t=e/1e3;return`${t.toFixed(t<10?2:0)} μs`}if(e<1e9){const t=e/1e6;return`${t.toFixed(t<10?2:0)} ms`}if(e<6e10){const t=e/1e9;return`${t.toFixed(t<10?2:0)} s`}if(e<36e11){const t=e/6e10;return`${t.toFixed(t<10?2:0)} m`}if(e<864e11){const t=e/36e11;return`${t.toFixed(t<10?2:0)} h`}{const t=e/864e11;return`${t.toFixed(t<10?2:0)} d`}},Vn=e=>{const t=e?.filter(({status:e})=>e===rn.Error),n=e?.filter(({status:e})=>e===rn.Warning),o=e?.filter(({status:e})=>e===ln.Disabled),i=e?.filter(({status:e})=>e===ln.Loading),a=t.length>0,r=n.length>0,s=o.length>0;return{errors:t,hasErrors:a,warnings:n,hasWarnings:r,disableds:o,hasDisableds:s,loadings:i,hasLoadings:i.length>0,priorotizedStatus:a?rn.Error:r?rn.Warning:s?rn.Info:void 0}},Hn=e=>{const t=e?.reduce((e,t)=>t.instrumented?e+1:e,0);return`${t}/${e?.length||0} instrumented`},qn=e=>({[Zt.Java]:p,[Zt.Go]:u,[Zt.JavaScript]:m,[Zt.Python]:h,[Zt.DotNet]:g,[Zt.CSharp]:x,[Zt.CPlusPlus]:f,[Zt.Php]:$,[Zt.Ruby]:y,[Zt.Rust]:b,[Zt.Swift]:w,[Zt.Elixir]:k,[Zt.MySql]:v,[Zt.Nginx]:E,[Zt.Postgres]:S,[Zt.Redis]:C,[Zt.Kafka]:T,[Zt.Ignored]:n,[Zt.Unknown]:n,[Zt.Processing]:n,[Zt.NoContainers]:n,[Zt.NoRunningPods]:n}[e]||n),Gn=e=>e?.map(({language:e})=>qn(e))||[],Yn=(e,t)=>{const n={[xn.Alauda]:A,[xn.AlibabaCloud]:D,[xn.AppDynamics]:N,[xn.Axiom]:I,[xn.AzureBlob]:O,[xn.AzureMonitor]:_,[xn.BetterStack]:z,[xn.Bonree]:R,[xn.Causely]:F,[xn.Checkly]:L,[xn.Chronosphere]:P,[xn.ClickHouse]:M,[xn.CloudWatch]:B,[xn.Coralogix]:j,[xn.Dash0]:U,[xn.Datadog]:W,[xn.Dynamic]:V,[xn.Dynatrace]:H,[xn.ElasticApm]:q,[xn.ElasticSearch]:G,[xn.GoogleCloud]:Y,[xn.GoogleCloudOTLP]:Y,[xn.GrafanaCloudLoki]:J,[xn.GrafanaCloudPrometheus]:J,[xn.GrafanaCloudTempo]:J,[xn.Greptime]:K,[xn.Groundcover]:X,[xn.Honeycomb]:Q,[xn.HyperDX]:Z,[xn.Instana]:ee,[xn.Jaeger]:te,[xn.Kafka]:T,[xn.Kloudmate]:ne,[xn.Last9]:oe,[xn.Lightstep]:ie,[xn.LogzIo]:ae,[xn.Loki]:re,[xn.Lumigo]:se,[xn.Middleware]:le,[xn.NewRelic]:de,[xn.Observe]:ce,[xn.Odigos]:pe,[xn.OneUptime]:ue,[xn.OpenObserve]:me,[xn.Opsverse]:he,[xn.Oracle]:ge,[xn.OTLP]:V,[xn.OTLPHttp]:V,[xn.Prometheus]:xe,[xn.Qryn]:fe,[xn.QrynOss]:$e,[xn.Quickwit]:ye,[xn.S3]:be,[xn.Seq]:we,[xn.Signoz]:ke,[xn.Splunk]:ve,[xn.SplunkSapm]:ve,[xn.SplunkOtlp]:ve,[xn.SumoLogic]:Ee,[xn.TelemetryHub]:Se,[xn.Tempo]:Ce,[xn.Tingyun]:Te,[xn.Traceloop]:Ae,[xn.Uptrace]:De,[xn.VictoriaMetrics]:Ne,[xn.VictoriaMetricsCloud]:Ne,[xn.XRay]:Ie}[e];return n&&!t?{icon:n}:{iconSrc:`https://d15jtxgb40qetw.cloudfront.net/${e}.svg`}},Jn=e=>({[tn.Namespace]:Oe,[tn.Source]:_e,[tn.Destination]:ze,[tn.Action]:Re,[tn.InstrumentationRule]:Fe}[e]),Kn=e=>"ruleId"in e&&e.ruleId?e.ruleId:"id"in e&&e.id?e.id:"namespace"in e&&e.namespace&&"kind"in e&&e.kind&&"name"in e&&e.name?{namespace:e.namespace,name:e.name,kind:e.kind}:"name"in e&&e.name?e.name:void 0,Xn=(e,t,n)=>{const{extended:o,prioritizeDisplayName:i}=n||{};let a="",r="";switch(t){case tn.InstrumentationRule:const t=e;a=t.type,r=t.ruleName;break;case tn.Source:const n=e;a=n.name,r=n.otelServiceName;break;case tn.Action:const o=e;a=o.type,r=o.name;break;case tn.Destination:const i=e;a=i.destinationType.displayName,r=i.name;break;case tn.Namespace:const s=e;a=s.name,r=s.name}return o?a+(r&&r!==a?` (${r})`:""):i&&r||a},Qn=(e,t)=>{if(t===tn.Source){const t={namespace:"",name:"",kind:""};return e.split("&").forEach(e=>{const[n,o]=e.split("=");t[n]=o}),t}return e},Zn=e=>{const{numberOfInstances:t,containers:n}=e;if(!n)return t&&t>0?Zt.Processing:Zt.NoRunningPods;const o=n?.filter(e=>e.language!==Zt.Ignored);if(!o.length)return Zt.NoContainers;const i=o.find(e=>e.language!==Zt.Unknown);return i?i.language:Zt.Unknown},eo=(e,t,n)=>(t===tn.Source?e?.sources.find(e=>e.kind===n.kind&&e.name===n.name&&e.namespace===n.namespace):e?.destinations.find(e=>e.id===n))||{throughput:0},to=e=>({[kn.Logs]:Le,[kn.Metrics]:Pe,[kn.Traces]:Me}[e]),no=e=>e?{[Xt.K8s]:o,[Xt.Vm]:Be}[e]:pe,oo=e=>e?{[Xt.K8s]:"Kubernetes Cluster",[Xt.Vm]:"Virtual Machine"}[e]:"Unknown",io=(e,t,n)=>{const o=e[t];return o?o.flatMap(e=>{const o=e[n],i=[];return void 0!==o&&(Array.isArray(o)?i.push(...o):i.push(o)),i.push(...io(e,t,n)),i}):[]},ao=(e,t)=>{if(t===tn.Source){let t="";return Object.entries(e).forEach(([e,n])=>{t+=`${e}=${n}&`}),t.slice(0,-1),t}return e},ro=(e,t)=>({[rn.Success]:n=>je({fill:t.text[e],...n}),[rn.Error]:n=>Ue({fill:t.text[e],...n}),[rn.Warning]:n=>We({fill:t.text[e],...n}),[rn.Info]:n=>Ve({fill:t.text[e],...n}),[rn.Default]:n=>pe({fill:t.text[e],...n})}[e]),so=e=>{switch(e){case En.Success:return rn.Success;case En.Error:case En.Failure:return rn.Error;case En.Notice:return rn.Warning;case En.Unsupported:case En.Unknown:return rn.Info;case En.Irrelevant:case En.Disabled:return ln.Disabled;case En.Waiting:return ln.Loading;case En.Pending:default:return rn.Default}},lo=(e,t)=>{const n=t.find(([t,n])=>e>=t&&(null===n||e<=n));return n?.[2]||null},co=({namespace:e,name:t,kind:n})=>({namespace:e,name:t,kind:n});function po(e,t){if(!e)return t;if("object"==typeof e)return e;try{return JSON.parse(e)}catch(e){return t}}const uo=(e,t)=>{const n=[],o=JSON.parse(JSON.stringify(e));for(const e of o){const o=po(t.fields,{}),i=e.items.findIndex(e=>e.type===t.destinationType.type);-1!==i&&n.push(...e.items[i].fields.map(e=>({...e,initialValue:o[e.name]})))}return n},mo=(e,t)=>{const n=e=>e?.some(({healthy:e})=>e.status!==rn.Success);return e?.length?e.some(({instrumentationInstances:e})=>n(e)):n(t)??!1},ho=e=>Array.isArray(e)?!e?.length:"object"==typeof e?!Object.keys(e||{}).length:[void 0,null,""].includes(e),go=e=>!!e&&(!(e.length>63)&&/^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$/.test(e)),xo=(e,t=0)=>{const n=(new Date).getTime();return new Date(e).getTime()-n<=t},fo=e=>{const t=String(e).trim().toLowerCase();return["true","false","1","0"].includes(t)},$o=(e,t=0)=>(new Date).getTime()-new Date(e).getTime()>=t,yo=/^(\d+\.)?(\d+\.)?(\*|\d+)$/,bo=e=>yo.test(e),wo=e=>e?e.replace(/([a-z0-9])([A-Z])/g,"$1 $2"):"",ko=e=>e?.map(({status:e,type:t,reason:n,message:o,lastTransitionTime:i})=>({status:e,type:wo(t),reason:n?wo(n):"",message:o,lastTransitionTime:i}))||[],vo=(e,t)=>{const n=po(e.fields,{});return t.length?t.map(e=>({key:e.name,name:e.displayName||e.name,value:n[e.name]??null})).filter(e=>null!==e.value):Object.entries(n).map(([e,t])=>({key:e,name:e,value:t}))},Eo=e=>e?Object.keys(e).filter(t=>e[t]):[],So=e=>e.replace(/[^\d]/g,""),Co=e=>{const t=String(e).trim().toLowerCase();return"true"===t||"1"===t},To=e=>{let t="";try{const n=JSON.parse(e);t=Array.isArray(n)?n.map(e=>"object"==typeof e&&null!==e?`${e.key}: ${e.value}`:e).join(", "):"object"==typeof n&&null!==n?Object.entries(n).map(([e,t])=>`${e}: ${t}`).join(", "):e}catch(n){t=e}return t},Ao=e=>{if("object"!=typeof e)return e;const t=Array.isArray(e)?[]:{};return Object.keys(e).forEach(n=>{const o=e[n];if(Array.isArray(o)){const e=o.filter(e=>null!=e&&""!==e);e.length>0&&(t[n]=e.map(e=>Ao(e)))}else if("object"==typeof o&&null!==o){const e=Ao(o);Object.keys(e).length>0&&(t[n]=e)}else[void 0,null,""].includes(o)||(t[n]=o)}),t},Do=(e,t=2)=>JSON.stringify(e||{},null,t),No=async(e=1e3)=>new Promise(t=>setTimeout(t,e)),Io=e=>Object.entries(e).reduce((e,[t,n])=>(e[t]="string"==typeof n?n:JSON.stringify(n),e),{}),Oo={[Zt.Go]:"Go",[Zt.Java]:"Java",[Zt.JavaScript]:"Node.js",[Zt.Python]:"Python",[Zt.DotNet]:".NET",[Zt.CSharp]:"C#",[Zt.CPlusPlus]:"C++",[Zt.Php]:"PHP",[Zt.Ruby]:"Ruby",[Zt.Rust]:"Rust",[Zt.Swift]:"Swift",[Zt.Elixir]:"Elixir",[Zt.MySql]:"MySQL",[Zt.Nginx]:"Nginx",[Zt.Postgres]:"PostgreSQL",[Zt.Redis]:"Redis",[Zt.Kafka]:"Kafka",[Zt.Ignored]:"Ignored",[Zt.Unknown]:"Unknown",[Zt.Processing]:"Processing",[Zt.NoContainers]:"No Containers",[Zt.NoRunningPods]:"No Running Pods"},_o=[{id:Zt.Go,value:Oo[Zt.Go],icon:qn(Zt.Go)},{id:Zt.Java,value:Oo[Zt.Java],icon:qn(Zt.Java)},{id:Zt.JavaScript,value:Oo[Zt.JavaScript],icon:qn(Zt.JavaScript)},{id:Zt.Python,value:Oo[Zt.Python],icon:qn(Zt.Python)},{id:Zt.Php,value:Oo[Zt.Php],icon:qn(Zt.Php)},{id:Zt.Ruby,value:Oo[Zt.Ruby],icon:qn(Zt.Ruby)},{id:Zt.Rust,value:Oo[Zt.Rust],icon:qn(Zt.Rust)},{id:Zt.DotNet,value:Oo[Zt.DotNet],icon:qn(Zt.DotNet)},{id:Zt.CSharp,value:Oo[Zt.CSharp],icon:qn(Zt.CSharp)},{id:Zt.CPlusPlus,value:Oo[Zt.CPlusPlus],icon:qn(Zt.CPlusPlus)},{id:Zt.Swift,value:Oo[Zt.Swift],icon:qn(Zt.Swift)},{id:Zt.Elixir,value:Oo[Zt.Elixir],icon:qn(Zt.Elixir)}],zo="default",Ro={SELECTED_DATA_STREAM:"SELECTED_DATA_STREAM",SELECTED_DATA_STREAM_WITH_PROXY:e=>`SELECTED_DATA_STREAM_${e}`,OVERVIEW_FILTERS:"OVERVIEW_FILTERS",DARK_MODE:"DARK_MODE"},Fo={REQUIRED_FIELDS:"Required fields are missing",FIELD_IS_REQUIRED:"This field is required",FORBIDDEN:"Forbidden",ENTERPRISE_ONLY:(e="This")=>`${e} is an Enterprise feature. Please upgrade your plan.`,DEFINED_FOR_ALL_STREAMS:e=>`${e} are defined for all Data Streams.`,CANNOT_EDIT_RULE:"Cannot edit a system-managed instrumentation rule",CANNOT_DELETE_RULE:"Cannot delete a system-managed instrumentation rule",LATENCY_HTTP_ROUTE:'HTTP route must start with a forward slash "/"',READONLY_WARNING:"You're not allowed to create/update/delete in readonly mode",ILLEGAL_K8S_LABEL:'Must be 63 characters or less, must consist of alphanumeric characters, "-", "_", or ".", and must start & end with an alphanumeric character (e.g., my-name, 123.abc).',INVALID_VERSION:'Invalid version format, must be in the format of "major.minor.patch" (e.g. 1.0.0)'},Lo={NAMESPACE:"Namespace",NAME:"Name",KIND:"Kind",CONNECTION:"Connection",CONNECTIONS:"Connections",DATA_STREAM:"Data Stream",DATA_STREAMS:"Data Streams",STREAM_NAME:"Data Stream Name",NAME_YOUR_STREAM:"Name your Data Stream",NAME_YOUR_STREAM_PLACEHOLDER:"e.g. Highest priority",STREAM_DESCRIPTION:"Provide a clear and descriptive name for your pipeline to ensure its purpose is easily understood by you and your team.",STREAM_CONFIRM:"Confirm your new Data Stream",DATA_STREAM_EXISTS_WARNING:(e,t)=>`A Data Stream with this name already exists, you can still rename the current "${e}", but it will merge into the existing "${t}".`,ACTION:"Action",ACTIONS:"Actions",ADD_ACTION:"Add Action",ACTION_DETAILS:"Action Details",INSTRUMENTATION_RULE:"Instrumentation Rule",INSTRUMENTATION_RULES:"Instrumentation Rules",ADD_INSTRUMENTATION_RULE:"Add Instrumentation Rule",INSTRUMENTATION_RULE_DETAILS:"Instrumentation Rule Details",DESTINATION:"Destination",DESTINATIONS:"Destinations",ADD_DESTINATION:"Add Destination",ADD_DESTINATIONS:"Add Destinations",ADD_DESTINATION_DESCRIPTION:"Add a destination to send your telemetry data to. You can add multiple destinations.",DESTINATION_DETAILS:"Destination Details",SELECTED_DESTINATIONS:"Selected Destinations",SOURCE:"Source",SOURCES:"Sources",ADD_SOURCE:"Add Source",SOURCE_DETAILS:"Source Details",SELECT_SOURCES:"Select Sources",SELECTED_SOURCES:"Selected Sources",SELECT_SOURCES_DESCRIPTION:"Choose which sources to monitor in your pipeline by searching by source name or namespace.",NO_SOURCES:"No sources",NO_SOURCES_GO_BACK:"No sources selected. Please go back to select sources.",PLEASE_ADD_SOURCE:"Please add a source",NO_SOURCES_NAMESPACE:"No sources available in this namespace",TRY_SEARCH_OR_OTHER_NAMESPACE:"Try searching again or select another namespace.",PLEASE_MAKE_SURE_UNIGNORED_NAMESPACES:"Please make sure your cluster has unignored namespaces",INSTALLATION:"Installation",SUMMARY:"Summary",TYPE:"Type",NOTES:"Notes",STATUS:"Status",READONLY:"Readonly",LANGUAGE:"Language",VERSION:"Version",RUNTIME_VERSION:"Runtime Version",VERSION_PLACEHOLDER:"1.0.0",MONITORS:"Monitors",SIGNALS_FOR_PROCESSING:"Signals for Processing",MANAGED_BY_PROFILE:"Managed by Profile",TIER:"Tier",ENTERPRISE:"Enterprise",ENTERPRISE_TIER:"Enterprise Tier",COMMUNITY:"Community",COMMUNITY_TIER:"Community Tier",API_TOKEN:"API Token",API_TOKENS:"API Tokens",DESCRIBE_ODIGOS:"Describe Odigos",DESCRIBE_SOURCE:"Describe Source",DETECTED_CONTAINERS:"Detected Containers",DETECTED_CONTAINERS_DESCRIPTION:"The system automatically instruments the containers it detects with a supported programming language.",CONTAINER_NAME:"Container Name",FILTERED_COUNT_TOOLTIP:"Represents filtered amount, out of total amount",SEARCH_NAMESPACES:"Search Namespaces",SEARCH_SOURCES:"Search Sources",SELECT_ALL:"Select All",ONLY_SELECTED:"Only selected",ONLY_RUNNING_INSTANCES:"Only running instances",TO_COLLECT_OTEL_DATA:"To collect OpenTelemetry data",TO_MONITOR_OTEL_DATA:"To monitor OpenTelemetry data",TO_MODIFY_OTEL_DATA:"To modify OpenTelemetry data",QUICK_BACK_TO_SUMMARY:"When you finish editing you can quickly go back to the summary.",GO_TO_SUMMARY:"Go to summary",FUTURE_APPS_TITLE:"Auto-instrument new apps",FUTURE_APPS_DESCRIPTION:"When enabled, new applications will be instrumented automatically and included in the current data stream.",OVERIDE:"Override",OVERIDDEN:"Overridden",OVERRIDE_RUNTIME_DETAILS:"Override Runtime Details",OVERRIDE_RUNTIME_WARNING:"This is an advanced configuration. If the selected programming language is incorrect, data collection may be incomplete or may not occur at all.",ACTIVE:"Active",INACTIVE:"Inactive",ENABLED:"Enabled",DISABLED:"Disabled",NO_TRACES_FOUND:"No traces found",ARE_SERVICES_INSTRUMENTED_AND_PRODUCING_TRAFFIC:"Are your services instrumented & producing traffic?",JAVA_CUSTOM_PROBES:"Java Custom Probes",GOLANG_CUSTOM_PROBES:"Golang Custom Probes"},Po={ADD:"Add",ADD_NEW:"Add New",NEW:"New",SELECT:"Select",CREATE:"Create",UPDATE:"Update",EDIT:"Edit",DELETE:"Delete",CANCEL:"Cancel",DONE:"Done",SAVE:"Save",BACK:"Back",NEXT:"Next",TEST:"Test",TEST_CONNECTION:"Test Connection",INSTRUMENT:"Instrument",UNINSTRUMENT:"Uninstrument"},Mo=6048e5,Bo=dt()(bt(e=>({darkMode:!0,setDarkMode:t=>e({darkMode:t})}),{name:Ro.DARK_MODE,storage:"undefined"!=typeof window?wt(()=>localStorage):void 0})),jo={dataStreamsLoading:!1,dataStreams:[],selectedStreamName:""},Uo=dt(e=>({...jo,setDataStreamsLoading:t=>e({dataStreamsLoading:t}),setDataStreams:t=>e({dataStreams:t}),addDataStreams:t=>e(e=>{const n=[...e.dataStreams,...t].map(e=>[e.name,e]);return{dataStreams:Array.from(new Map(n).values())}}),removeDataStreams:t=>e(e=>({dataStreams:e.dataStreams.filter(e=>!t.find(t=>t.name===e.name))})),setSelectedStreamName:t=>e({selectedStreamName:t}),resetDataStreamStore:()=>e(jo)})),Wo=dt(e=>({drawerType:null,drawerEntityId:null,setDrawerType:t=>e({drawerType:t}),setDrawerEntityId:t=>e({drawerEntityId:t})})),Vo=dt(e=>({namespacesLoading:!1,namespaces:[],sourcesLoading:!1,sources:[],destinationsLoading:!1,destinations:[],actionsLoading:!1,actions:[],instrumentationRulesLoading:!1,instrumentationRules:[],setEntitiesLoading:(t,n)=>{const o=t===tn.Namespace?"namespacesLoading":t===tn.Source?"sourcesLoading":t===tn.Destination?"destinationsLoading":t===tn.Action?"actionsLoading":t===tn.InstrumentationRule?"instrumentationRulesLoading":"NONE";"NONE"!==o&&e({[o]:n})},setEntities:(t,n)=>{const o=t===tn.Namespace?"namespaces":t===tn.Source?"sources":t===tn.Destination?"destinations":t===tn.Action?"actions":t===tn.InstrumentationRule?"instrumentationRules":"NONE";"NONE"!==o&&e({[o]:n})},addEntities:(t,n)=>{const o=t===tn.Namespace?"namespaces":t===tn.Source?"sources":t===tn.Destination?"destinations":t===tn.Action?"actions":t===tn.InstrumentationRule?"instrumentationRules":"NONE";"NONE"!==o&&e(e=>{const t=[...e[o]];return n.forEach(e=>{const n=t.findIndex(t=>JSON.stringify(Kn(t))===JSON.stringify(Kn(e)));-1!==n?t[n]={...t[n],...e}:t.push(e)}),{[o]:t}})},removeEntities:(t,n)=>{const o=t===tn.Namespace?"namespaces":t===tn.Source?"sources":t===tn.Destination?"destinations":t===tn.Action?"actions":t===tn.InstrumentationRule?"instrumentationRules":"NONE";"NONE"!==o&&e(e=>{const i=[...e[o]];return n.forEach(e=>{const n=i.findIndex(n=>t===tn.Source?JSON.stringify(Kn(n))===JSON.stringify(Kn(e)):Kn(n)===e);-1!==n&&i.splice(n,1)}),{[o]:i}})},resetEntityStore:()=>{e({namespacesLoading:!1,namespaces:[],sourcesLoading:!1,sources:[],destinationsLoading:!1,destinations:[],actionsLoading:!1,actions:[],instrumentationRulesLoading:!1,instrumentationRules:[]})}})),Ho=()=>({searchText:"",statuses:[],platformTypes:[],namespaces:[],kinds:[],monitors:[],languages:[],conditions:[],errors:[],onlyErrors:!1}),qo=dt(e=>({searchText:"",setSearchText:t=>e({searchText:t}),statuses:[],setStatuses:t=>e({statuses:t}),platformTypes:[],setPlatformTypes:t=>e({platformTypes:t}),namespaces:[],setNamespaces:t=>e({namespaces:t}),kinds:[],setKinds:t=>e({kinds:t}),monitors:[],setMonitors:t=>e({monitors:t}),languages:[],setLanguages:t=>e({languages:t}),conditions:[],setConditions:t=>e({conditions:t}),errors:[],setErrors:t=>e({errors:t}),onlyErrors:!1,setOnlyErrors:t=>e({onlyErrors:t}),setAll:t=>e(t),clearAll:()=>e({searchText:"",statuses:[],platformTypes:[],namespaces:[],kinds:[],monitors:[],languages:[],conditions:[],errors:[],onlyErrors:!1}),getEmptyState:Ho})),Go=dt(e=>({isAwaitingInstrumentation:!1,sourcesToCreate:0,sourcesCreated:0,sourcesToDelete:0,sourcesDeleted:0,setInstrumentAwait:t=>e({isAwaitingInstrumentation:t}),setInstrumentCount:(t,n)=>e({[t]:n})})),Yo=dt(e=>({currentModal:"",setCurrentModal:t=>e({currentModal:t})})),Jo=dt((e,t)=>({notifications:[],addNotification:n=>{const o=new Date,i=`${o.getTime().toString()}${n.target?`#${n.target}`:""}`,{notifications:a}=t();a.some(e=>e.type===n.type&&e.title===n.title&&e.message===n.message&&!e.dismissed)||e(e=>({notifications:[{...n,id:i,time:o.toISOString(),dismissed:!1,seen:!1},...e.notifications]}))},markAsDismissed:t=>{e(e=>{const n=e.notifications.findIndex(e=>e.id===t);return-1!==n&&(e.notifications[n].dismissed=!0),{notifications:e.notifications}})},markAsSeen:t=>{e(e=>{const n=e.notifications.findIndex(e=>e.id===t);return-1!==n&&(e.notifications[n].seen=!0),{notifications:e.notifications}})},removeNotification:t=>{e(e=>{const n=e.notifications.findIndex(e=>e.id===t);return-1!==n&&e.notifications.splice(n,1),{notifications:e.notifications}})},removeNotifications:t=>{t&&e(e=>({notifications:e.notifications.filter(e=>e.id.split("#")[1]!==t)}))}})),Ko=(e,t)=>{const n=e.entityType===t.entityType,o="string"==typeof e.entityId&&"string"==typeof t.entityId?e.entityId===t.entityId:"object"==typeof e.entityId&&"object"==typeof t.entityId?e.entityId.namespace===t.entityId.namespace&&e.entityId.name===t.entityId.name&&e.entityId.kind===t.entityId.kind:!e.entityId&&!t.entityId;return n&&o},Xo=dt((e,t)=>({pendingItems:[],setPendingItems:t=>e({pendingItems:t}),addPendingItems:t=>e(e=>({pendingItems:e.pendingItems.concat(t.filter(t=>!e.pendingItems.some(e=>Ko(e,t))))})),removePendingItems:t=>e(e=>({pendingItems:e.pendingItems.filter(e=>!t.find(t=>Ko(e,t)))})),isThisPending:e=>{const{pendingItems:n}=t();let o=!1;for(let t=0;t<n.length;t++){const i=n[t];if(i.entityType===e.entityType&&(!e.entityId||(i.entityType===tn.Source?i.entityId&&e.entityId&&i.entityId.namespace===e.entityId.namespace&&i.entityId.name===e.entityId.name&&i.entityId.kind===e.entityId.kind:i.entityId===e.entityId))){o=!0;break}}return o}})),Qo=dt(e=>({selectedSources:{},setSelectedSources:t=>e({selectedSources:t}),resetSelectedState:()=>e(()=>({selectedSources:{}}))})),Zo={availableSources:{},configuredSources:{},configuredFutureApps:{},configuredDestinations:[],configuredDestinationsUpdateOnly:[]},ei=(e,t)=>e.destinationType.type!==t.destinationType.type,ti=dt(e=>({...Zo,setAvailableSources:t=>e({availableSources:t}),setConfiguredSources:t=>e({configuredSources:t}),setConfiguredFutureApps:t=>e({configuredFutureApps:t}),setConfiguredDestinations:t=>e({configuredDestinations:t}),addConfiguredDestination:t=>e(e=>({configuredDestinations:[...e.configuredDestinations,t]})),removeConfiguredDestination:t=>e(e=>({configuredDestinations:e.configuredDestinations.filter(e=>ei(e,t))})),setConfiguredDestinationsUpdateOnly:t=>e({configuredDestinationsUpdateOnly:t}),addConfiguredDestinationUpdateOnly:t=>e(e=>{const n=[...e.configuredDestinationsUpdateOnly,t].map(e=>[e.id,e]);return{configuredDestinationsUpdateOnly:Array.from(new Map(n).values())}}),removeConfiguredDestinationUpdateOnly:t=>e(e=>({configuredDestinationsUpdateOnly:e.configuredDestinationsUpdateOnly.filter(e=>ei(e,t))})),resetState:()=>e(()=>({...Zo}))})),ni={colors:{majestic_blue:"#444AD9",majestic_blue_soft:"#6C7AE8",orange_og:"#FE9239",orange_soft:"#FFB160",dark_red:"#802828",darker_red:"#611F1F",darkest_red:"#281515",darkest_red_hover:"#351515",dark_green:"#2D4323"},text:{},font_family:{primary:"Inter, sans-serif",secondary:"Kode Mono, sans-serif",code:"IBM Plex Mono, monospace"}},oi={darkMode:!0,colors:{...ni.colors,primary:"#111111",secondary:"#F9F9F9",border:"#525252",dark_grey:"#151515",translucent_bg:"#1A1A1A",dropdown_bg:"#242424",dropdown_bg_2:"#333333",warning:"#472300",error:"#431919",success:"#172013",info:"#242424",default:"#181944"},text:{white:"#FFFFFF",primary:"#111111",secondary:"#F9F9F9",grey:"#B8B8B8",dark_grey:"#8F8F8F",darker_grey:"#7A7A7A",light_grey:"#CCD0D2",dark_button:"#0A1824",warning:"#E9CF35",warning_secondary:"#FFA349",error:"#EF7676",error_secondary:"#DB5151",success:"#81AF65",success_secondary:"#51DB51",info:"#B8B8B8",info_secondary:"#CCDDDD",default:"#AABEF7",default_secondary:"#8CBEFF"},font_family:ni.font_family},ii={darkMode:!1,colors:{...ni.colors,primary:"#EEEEEE",secondary:"#060606",border:"#ADADAD",dark_grey:"#EAEAEA",translucent_bg:"#E5E5E5",dropdown_bg:"#DBDBDB",dropdown_bg_2:"#CCCCCC",warning:"#F6F092",error:"#FACECE",success:"#C8DEB8",info:"#E0E0E0",default:"#CAD9FB"},text:{white:"#FFFFFF",primary:"#EEEEEE",secondary:"#060606",grey:"#474747",dark_grey:"#707070",darker_grey:"#858585",light_grey:"#332F2D",dark_button:"#F5E7DB",warning:"#A56F12",warning_secondary:"#CA9416",error:"#B63A3A",error_secondary:"#DB5151",success:"#4E763A",success_secondary:"#67964C",info:"#525252",info_secondary:"#7A7A7A",default:"#444AD9",default_secondary:"#6C7AE8"},font_family:ni.font_family},ai=e=>e?oi:ii;kt('@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap");@import url("https://fonts.googleapis.com/css2?family=Kode+Mono:wght@100;200;300;400;500;600;700&display=swap");@import url("https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;700&display=swap");@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&display=swap");*{-ms-overflow-style:none;scrollbar-width:none}::-webkit-scrollbar{display:none}svg{transition:all .3s}input{all:unset}input:-webkit-autofill,input:-webkit-autofill:active,input:-webkit-autofill:focus,input:-webkit-autofill:hover{-webkit-transition:all 50000s ease-in-out 0s;transition:all 50000s ease-in-out 0s}');const ri={in:{left:Ct`
|
|
2
2
|
from { transform: translateX(-100%); }
|
|
3
3
|
to { transform: translateX(0); }
|
|
4
4
|
`,right:Ct`
|
|
@@ -236,7 +236,7 @@ import{SamplerIcon as e,PiiMaskingIcon as t,ImageErrorIcon as n,K8sLogo as o,Add
|
|
|
236
236
|
&:active {
|
|
237
237
|
background: ${({theme:e})=>e.text.warning+ci.opacity.hex["080"]};
|
|
238
238
|
}
|
|
239
|
-
`},
|
|
239
|
+
`},Pi=Et.button`
|
|
240
240
|
height: 36px;
|
|
241
241
|
border-radius: 32px;
|
|
242
242
|
cursor: pointer;
|
|
@@ -263,7 +263,7 @@ import{SamplerIcon as e,PiiMaskingIcon as t,ImageErrorIcon as n,K8sLogo as o,Add
|
|
|
263
263
|
}
|
|
264
264
|
`:""}
|
|
265
265
|
`}
|
|
266
|
-
`,
|
|
266
|
+
`,Mi=({children:e,variant:t="primary",onClick:n,...o})=>{const i=gt(null);return ct.createElement(Fi,{$variant:t},ct.createElement(Pi,{ref:i,$variant:t,onClick:e=>{n&&n(e),i.current?.blur()},...o},e))},Bi=({isOpen:e,noOverlay:t,name:n,onApprove:o,onDeny:i})=>ct.createElement(tp,{isOpen:e,noOverlay:t,title:"Cancel"+(n?` ${n}`:""),description:"Are you sure you want to cancel?",approveButton:{text:"Confirm",variant:rn.Warning,onClick:o},denyButton:{text:"Go Back",onClick:i}}),ji=Et.div`
|
|
267
267
|
position: absolute;
|
|
268
268
|
${({$top:e})=>void 0!==e&&`top: ${e}px;`}
|
|
269
269
|
${({$bottom:e})=>void 0!==e&&`bottom: ${e}px;`}
|
|
@@ -286,7 +286,7 @@ import{SamplerIcon as e,PiiMaskingIcon as t,ImageErrorIcon as n,K8sLogo as o,Add
|
|
|
286
286
|
`,Vi=Et.div`
|
|
287
287
|
padding: ${({$padding:e})=>void 0!==e?e:"12px"};
|
|
288
288
|
border-top: 1px solid ${({theme:e})=>e.colors.border};
|
|
289
|
-
`,Hi=xt(({isOpen:e,asPortal:t,...n},o)=>{const i=ut(()=>{const{children:e,top:i,bottom:a,left:r,right:s,borderRadius:l,padding:d,maxWidth:c,width:p,header:u,footer:m,withPointerEvents:h,...g}=n;return ct.createElement(ji,{ref:o,$top:i,$bottom:a,$left:r,$right:s,$borderRadius:l,$padding:d,$maxWidth:c,$width:p,$asPortal:t,$withPointerEvents:h,...g},u&&ct.createElement(Ui,{$padding:d},u),ct.createElement(Wi,{$padding:d},e),m&&ct.createElement(Vi,{$padding:d},m))},[o,n,t]);return e?t?Ft.createPortal(i,document.body):i:null});Hi.displayName=Hi.name;const qi=e=>{function t(){return void 0===e?{}:Rn(e)}const[n,o]=mt(t()),[i,a]=mt({}),r=ut(()=>void 0!==e&&JSON.stringify(n)!==JSON.stringify(e),[e,n]);return ht(()=>{void 0!==e&&"{}"===JSON.stringify(n)&&o(t())},[e,n]),{formData:n,formErrors:i,isFormDirty:r,handleFormChange:(e,t,n)=>{if(e){const n=e.toString().split(".");1===n.length?o(n=>({...n,[e]:t})):o(e=>{const o=Rn(e);let i=o;for(let e=0;e<n.length-1;e++){const t=n[e];i[t]&&"object"==typeof i[t]||(i[t]={}),i=i[t]}return i[n[n.length-1]]=t,o})}else n&&o({...n})},handleErrorChange:(e,t,n)=>{e?a(n=>({...n,[e]:t})):n&&a({...n})},resetFormData:()=>{o(t()),a({})}}},Gi={type:"",name:"",notes:"",signals:[],disabled:!1,fields:{clusterAttributes:null,overwriteExistingValues:null,renames:null,attributeNamesToDelete:null,piiCategories:null,fallbackSamplingRatio:null,samplingPercentage:null,endpointsFilters:null,servicesNameFilters:null,attributeFilters:null}},Yi=()=>{const{addNotification:e}=Jo(),{formData:t,formErrors:n,handleFormChange:o,handleErrorChange:i,resetFormData:a}=qi(Gi);return{formData:t,formErrors:n,handleFormChange:o,resetFormData:a,validateForm:n=>{const o={};let a=!0;return Object.entries(t).forEach(([e,t])=>{switch(e){case"type":case"signals":ho(t)&&(o[e]=Fo.FIELD_IS_REQUIRED)}}),a=!Object.values(o).length,!a&&n?.withAlert&&e({type:rn.Warning,title:n.alertTitle,message:Fo.REQUIRED_FIELDS,hideFromHistory:!0}),i(void 0,void 0,o),a},loadFormWithDrawerItem:({type:e,fields:t})=>{const n={...Rn(Gi),type:e};Object.entries(t).forEach(([e,t])=>{if(t)switch(e){case"actionName":n.name=t;break;case"type":case"notes":case"signals":case"disabled":n[e]=t;break;case Vt.CollectContainerAttributes:case Vt.CollectReplicaSetAttributes:case Vt.CollectWorkloadId:case Vt.CollectClusterId:case Vt.LabelsAttributes:case Vt.AnnotationsAttributes:case Vt.ClusterAttributes:case Vt.OverwriteExistingValues:case Vt.AttributeNamesToDelete:case Vt.Renames:case Vt.PiiCategories:case Vt.FallbackSamplingRatio:case Vt.SamplingPercentage:case Vt.EndpointsFilters:case Vt.ServicesNameFilters:case Vt.AttributeFilters:n.fields||(n.fields={}),n.fields[e]=t}}),o(void 0,void 0,n)}}},Ji=()=>{const{setCurrentModal:e}=Yo(),{setDrawerType:t,setDrawerEntityId:n}=Wo(),{setActiveNodeType:o,setActiveNodeId:i,activeNodeId:a}=jt();return{onClickNode:(r,s)=>{const{id:l,type:d,data:{id:c,type:p}}=s;switch(a===l?(o(null),i(null)):(o(d),i(l)),p){case tn.Source:case tn.Destination:case tn.Action:case tn.InstrumentationRule:t(p),n(c);break;case gn.AddSource:e(tn.Source);break;case gn.AddDestination:e(tn.Destination);break;case gn.AddAction:e(tn.Action);break;case gn.AddRule:e(tn.InstrumentationRule)}}}},Ki=()=>{const{setDrawerType:e,setDrawerEntityId:t}=Wo(),{markAsDismissed:n,markAsSeen:o}=Jo();return{onClickNotification:(i,a)=>{const{id:r,crdType:s,target:l}=i,{dismissToast:d}=a||{};if(s&&l)switch(s){case tn.InstrumentationRule:e(tn.InstrumentationRule),t(Qn(l,tn.InstrumentationRule));break;case tn.Source:case"InstrumentationConfig":case"InstrumentationInstance":e(tn.Source),t(Qn(l,tn.Source));break;case tn.Action:e(tn.Action),t(Qn(l,tn.Action));break;case tn.Destination:case"Destination":e(tn.Destination),t(Qn(l,tn.Destination))}o(r),d&&n(r)}}},Xi=()=>{const e=gt(null),[t,n]=mt(0),[o,i]=mt(0);return ht(()=>{const t=()=>{if(e.current){const{width:t,height:o}=e.current.getBoundingClientRect();n(t),i(o)}};return t(),window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[]),{containerRef:e,containerWidth:t,containerHeight:o}},Qi=()=>{const[e,t]=mt(!1),[n,o]=mt(-1);return{isCopied:e,copiedIndex:n,clickCopy:async(n,i)=>{if(!e){if(t(!0),void 0!==i&&o(i),navigator?.clipboard&&navigator.clipboard.writeText)try{await navigator.clipboard.writeText(n)}catch(e){}else{const e=document.createElement("textarea");e.value=n,document.body.appendChild(e),e.select();try{document.execCommand("copy")}catch(e){}document.body.removeChild(e)}setTimeout(()=>{t(!1),o(-1)},1e3)}}}},Zi=e=>{const{addNotification:t}=Jo(),{formData:n,handleFormChange:o,formErrors:i,handleErrorChange:a,resetFormData:r}=qi(e);return{formData:n,formErrors:i,handleFormChange:o,resetFormData:r,validateForm:e=>{const o={};let i=!0;return n.name?go(n.name)?o.name=void 0:(i=!1,o.name=Fo.ILLEGAL_K8S_LABEL):(i=!1,o.name=Fo.FIELD_IS_REQUIRED),!i&&e?.withAlert&&t({type:rn.Warning,title:e.alertTitle,message:Fo.REQUIRED_FIELDS,hideFromHistory:!0}),a(void 0,void 0,o),i},loadFormWithDrawerItem:({name:t})=>{const n={...Rn(e),name:t};o(void 0,void 0,n)}}},ea={type:"",name:"",exportedSignals:{logs:!1,metrics:!1,traces:!1},fields:[],disabled:!1},ta=e=>{const{supportedSignals:t,preLoadedFields:n}=e||{},{addNotification:o}=Jo(),{formData:i,formErrors:a,handleFormChange:r,handleErrorChange:s,resetFormData:l}=qi(ea),[d,c]=mt([]),[p,u]=mt([]);return ht(()=>{var e;u(d?(e=d,e.filter(e=>!!e).map(e=>{const{name:t,componentType:n,componentProperties:o,displayName:i,initialValue:a,renderCondition:r}=e;if(n===on.Dropdown){const e=po(o,{}),s=Array.isArray(e.values)?e.values.map(e=>({id:e,value:e})):Object.entries(e.values).map(([e,t])=>({id:e,value:t}));return{name:t,componentType:n,title:i,value:a,placeholder:e.placeholder||"Select an option",options:s,renderCondition:r,...e}}return{name:t,componentType:n,title:i,value:a,renderCondition:r,...po(o,{})}})).map(e=>{if(n){const t="string"==typeof n?po(n,{}):n;if(e.name in t)return{...e,value:t[e.name]}}return e}):[])},[d,n]),ht(()=>{if(p){const e=p.map(e=>({key:e.name,value:e.value}));r("fields",e)}},[p]),ht(()=>{if(t&&0===Eo(i.exportedSignals).length){const{logs:e,metrics:n,traces:o}=t;r("exportedSignals",{logs:e.supported,metrics:n.supported,traces:o.supported})}},[t,i]),{formData:i,formErrors:a,handleFormChange:r,resetFormData:l,validateForm:e=>{const t={};let n=!0;return p.forEach(({name:e,value:o,required:i})=>{i&&!o&&(n=!1,t[e]=Fo.FIELD_IS_REQUIRED)}),!n&&e?.withAlert&&o({type:rn.Warning,title:e.alertTitle,message:Fo.REQUIRED_FIELDS,hideFromHistory:!0}),s(void 0,void 0,t),n},loadFormWithDrawerItem:({destinationType:{type:e},name:t,disabled:n,exportedSignals:o,fields:i})=>{const a={...Rn(ea),type:e,name:t,disabled:n,exportedSignals:o,fields:Object.entries(po(i,{})).map(([e,t])=>({key:e,value:t}))};return r(void 0,void 0,a),a},yamlFields:d,setYamlFields:c,dynamicFields:p,setDynamicFields:u}},na={ruleName:"",notes:"",disabled:!1,workloads:null,instrumentationLibraries:null,payloadCollection:{[wn.HttpRequest]:null,[wn.HttpResponse]:null,[wn.DbQuery]:null,[wn.Messaging]:null},codeAttributes:{[$n.Column]:null,[$n.FilePath]:null,[$n.Function]:null,[$n.LineNumber]:null,[$n.Namespace]:null,[$n.StackTrace]:null},headersCollection:null,customInstrumentations:{[bn.Probes]:null}},oa=()=>{const{formData:e,formErrors:t,handleFormChange:n,handleErrorChange:o,resetFormData:i}=qi(na);return{formData:e,formErrors:t,handleFormChange:n,resetFormData:i,validateForm:()=>(o(void 0,void 0,{}),!0),loadFormWithDrawerItem:({ruleName:e,notes:t,disabled:o,payloadCollection:i,codeAttributes:a,headersCollection:r,customInstrumentations:s})=>{const l={...Rn(na),ruleName:e,notes:t,disabled:o};i&&(l.payloadCollection={[wn.HttpRequest]:i[wn.HttpRequest]?{}:null,[wn.HttpResponse]:i[wn.HttpResponse]?{}:null,[wn.DbQuery]:i[wn.DbQuery]?{}:null,[wn.Messaging]:i[wn.Messaging]?{}:null}),a&&(l.codeAttributes={[$n.Column]:a[$n.Column]||null,[$n.FilePath]:a[$n.FilePath]||null,[$n.Function]:a[$n.Function]||null,[$n.LineNumber]:a[$n.LineNumber]||null,[$n.Namespace]:a[$n.Namespace]||null,[$n.StackTrace]:a[$n.StackTrace]||null}),r&&(l.headersCollection=r),s&&(l.customInstrumentations={[bn.Probes]:s[bn.Probes]||null}),n(void 0,void 0,l)}}},ia=({active:e,key:t,withAltKey:n,withCtrlKey:o,withShiftKey:i,withMetaKey:a},r)=>(ht(()=>{const s=s=>{e&&t===s.key&&(!n||n&&s.altKey)&&(!o||o&&s.ctrlKey)&&(!i||i&&s.shiftKey)&&(!a||a&&s.metaKey)&&(s.preventDefault(),s.stopPropagation(),r(s))};return window.addEventListener("keydown",s),()=>{window.removeEventListener("keydown",s)}},[t,e,n,o,i,a,r]),null),aa=(e,t)=>{ht(()=>{const n=n=>{e.current&&!e.current.contains(n.target)&&t()};return document.addEventListener("mousedown",n),document.addEventListener("touchstart",n),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("touchstart",n)}},[e,t])},ra=({defaultClientHeight:e=0,defaultClientwidth:t=0,onClickOutside:n}={})=>{const o=gt(null),[i,a]=mt(!1),[r,s]=mt({top:0,left:0});return aa(o,()=>{i&&(a(!1),n?.())}),{popupRef:o,popupOpen:i,setPopupOpen:a,popupPosition:r,handlePosition:(n,i)=>{const{innerWidth:a,innerHeight:r}=window;let l=i,d=n;l>=r/2&&(l+=-(o.current?.clientHeight||e)),d>=a/2&&(d+=-(o.current?.clientWidth||t)),s({top:l,left:d})}}},sa=()=>({getItemSS:(e,t)=>{const n=sessionStorage.getItem(e);return n?po(n,t):t},setItemSS:(e,t)=>{sessionStorage.setItem(e,JSON.stringify(t))},removeItemSS:e=>{sessionStorage.removeItem(e)}}),la={otelServiceName:"",currentStreamName:""},da=()=>{const{formData:e,formErrors:t,handleFormChange:n,handleErrorChange:o,resetFormData:i}=qi(la);return{formData:e,formErrors:t,handleFormChange:n,resetFormData:i,validateForm:()=>(o(void 0,void 0,{}),!0),loadFormWithDrawerItem:({otelServiceName:e,name:t})=>{const o={...Rn(la),otelServiceName:e||t||""};n(void 0,void 0,o)}}},ca=(e,t,n)=>{const o="boolean"==typeof n,i=e.dataStreamNames?.includes(t)||e.currentStreamName===t,a=(o?n:e.selected)||!1;return{namespace:e.namespace,name:e.name,kind:e.kind,selected:!(!i&&!o)&&a,numberOfInstances:e.numberOfInstances}},pa=(e,t,n)=>({...ca(e,t,n),currentStreamName:t}),ua=(e,t,n)=>{const o="boolean"==typeof n,i=e.dataStreamNames?.includes(t),a=(o?n:e.selected)||!1;return{namespace:e.name,selected:!(!i&&!o)&&a,currentStreamName:t}},ma=e=>{const{fetchSingleNamespace:t}=e||{},{namespaces:n}=Vo(),{selectedStreamName:o}=Uo(),i=gt(!1),{configuredSources:a,configuredFutureApps:r,availableSources:s}=ti(),[l,d]=mt(s),[c,p]=mt(!1),[u,m]=mt(!1),[h,g]=mt([]),[x,f]=mt(""),[$,y]=mt(r),[b,w]=mt(((e,t,n)=>{const o={};return Object.entries(e).forEach(([e,t])=>{o[e]=t.map(e=>pa(e,n))}),Object.entries(t).forEach(([e,t])=>{t.forEach(t=>{const i=o[e].findIndex(e=>e.name===t.name&&e.kind===t.kind),a=pa(t,n);-1!==i?o[e][i]=a:o[e].push(a)})}),o})(s,a,o)),k=async(e,n)=>{if(t)if(h.includes(e.name))w(t=>({...t,[e.name]:t[e.name].map(e=>({...e,selected:"boolean"==typeof n?n:e.selected,currentStreamName:o}))}));else{const{data:i}=await t({variables:{namespaceName:e.name}}),{name:a,sources:r=[]}=i?.computePlatform?.k8sActualNamespace||{};if(!a)return;g(e=>[...e,a]),d(e=>({...e,[a]:r.map(e=>ca(e,o))})),w(e=>({...e,[a]:"boolean"!=typeof n&&e[a]?.length?e[a]:r.map(e=>pa(e,o,n))}))}};ht(()=>(i.current=!0,n?.length&&(d(e=>{const t={...e};return n.forEach(({name:e})=>t[e]=t[e]||[]),t}),w(e=>{const t={...e};return n.forEach(({name:e})=>t[e]=t[e]||[]),t}),y(e=>{const t={...e};return n.forEach(e=>t[e.name]=t[e.name]||ua(e,o)),t}),(async()=>{p(!0);for await(const e of n)i.current&&await k(e);p(!1)})()),()=>{i.current=!1}),[n,o]);const[v,E]=mt(""),[S,C]=mt(tn.Source),[T,A]=mt(!1),[D,N]=mt(!1),I=ut(()=>{const e=(e,t)=>!v||S!==t||S===t&&e.toLowerCase().includes(v),t={};return Object.entries(b).filter(([t])=>e(t,tn.Namespace)).forEach(([n,o])=>{const i=o.filter(t=>e(t.name,tn.Source)&&(!T||t.selected)&&(e=>!D||(e.numberOfInstances||0)>0)(t));i.length&&(t[n]=i)}),t},[b,v,S,T,D]);return{isFetchingEachNamespace:c,fetchedNamespaces:h,availableSources:l,filteredNamespacesAndSources:I,getApiSourcesPayload:()=>{const e={};return Object.entries(b).forEach(([t,n])=>{n.forEach(n=>{const o=l[t]?.find(e=>e.name===n.name&&e.kind===n.kind);o?.selected!==n.selected&&(e[t]||(e[t]=[]),e[t].push(n))})}),e},getApiFutureAppsPayload:()=>{const e={};return Object.entries($).forEach(([t,i])=>{const a=n?.find(e=>e.name===t);(i.selected&&!a?.dataStreamNames?.includes(o)||!i.selected&&a?.dataStreamNames?.includes(o))&&(e[t]=i)}),e},selectedNamespace:x,onSelectNamespace:(e,t)=>{const o=n.find(t=>t.name===e);if(o){const n="boolean"==typeof t;f(t=>t!==e||n?e:""),k(o,t),n&&m(!1)}},selectedAllNamespaces:u,onSelectAllNamespaces:e=>{m(e),n.forEach(t=>k(t,e))},selectedSources:b,onSelectSource:(e,t)=>{const n=t||x;if(!n)return;const i=[...b[n]||[]],a=i.findIndex(({name:t,kind:n})=>t===e.name&&n===e.kind);if(-1!==a){const e={...i[a],selected:!i[a].selected,currentStreamName:o};i[a]=e}else i.push({...e,selected:!0,currentStreamName:o});w(e=>({...e,[n]:i})),m(!1)},selectedFutureApps:$,onSelectFutureApps:(e,t)=>{const i=t||x;if(!i)return;const a=n.find(e=>e.name===t);a&&y(t=>({...t,[i]:ua(a,o,e)}))},searchText:v,setSearchText:E,searchBy:S,setSearchBy:C,showSelectedOnly:T,setShowSelectedOnly:A,showRunningOnly:D,setShowRunningOnly:N}};yt.addDefaultLocale(vt);const ha=()=>new yt("en-US"),ga=({container:e,animateIn:t,animateOut:n,duration:o=300})=>{const i=Et(e)`
|
|
289
|
+
`,Hi=xt(({isOpen:e,asPortal:t,...n},o)=>{const i=ut(()=>{const{children:e,top:i,bottom:a,left:r,right:s,borderRadius:l,padding:d,maxWidth:c,width:p,header:u,footer:m,withPointerEvents:h,...g}=n;return ct.createElement(ji,{ref:o,$top:i,$bottom:a,$left:r,$right:s,$borderRadius:l,$padding:d,$maxWidth:c,$width:p,$asPortal:t,$withPointerEvents:h,...g},u&&ct.createElement(Ui,{$padding:d},u),ct.createElement(Wi,{$padding:d},e),m&&ct.createElement(Vi,{$padding:d},m))},[o,n,t]);return e?t?Ft.createPortal(i,document.body):i:null});Hi.displayName=Hi.name;const qi=e=>{function t(){return void 0===e?{}:Rn(e)}const[n,o]=mt(t()),[i,a]=mt({}),r=ut(()=>void 0!==e&&JSON.stringify(n)!==JSON.stringify(e),[e,n]);return ht(()=>{void 0!==e&&"{}"===JSON.stringify(n)&&o(t())},[e,n]),{formData:n,formErrors:i,isFormDirty:r,handleFormChange:(e,t,n)=>{if(e){const n=e.toString().split(".");1===n.length?o(n=>({...n,[e]:t})):o(e=>{const o=Rn(e);let i=o;for(let e=0;e<n.length-1;e++){const t=n[e];i[t]&&"object"==typeof i[t]||(i[t]={}),i=i[t]}return i[n[n.length-1]]=t,o})}else n&&o({...n})},handleErrorChange:(e,t,n)=>{e?a(n=>({...n,[e]:t})):n&&a({...n})},resetFormData:()=>{o(t()),a({})}}},Gi={type:"",name:"",notes:"",signals:[],disabled:!1,fields:{clusterAttributes:null,overwriteExistingValues:null,renames:null,attributeNamesToDelete:null,piiCategories:null,fallbackSamplingRatio:null,samplingPercentage:null,endpointsFilters:null,servicesNameFilters:null,attributeFilters:null}},Yi=()=>{const{addNotification:e}=Jo(),{formData:t,formErrors:n,handleFormChange:o,handleErrorChange:i,resetFormData:a}=qi(Gi);return{formData:t,formErrors:n,handleFormChange:o,resetFormData:a,validateForm:n=>{const o={};let a=!0;return Object.entries(t).forEach(([e,t])=>{switch(e){case"type":case"signals":ho(t)&&(o[e]=Fo.FIELD_IS_REQUIRED)}}),a=!Object.values(o).length,!a&&n?.withAlert&&e({type:rn.Warning,title:n.alertTitle,message:Fo.REQUIRED_FIELDS,hideFromHistory:!0}),i(void 0,void 0,o),a},loadFormWithDrawerItem:({type:e,fields:t})=>{const n={...Rn(Gi),type:e};Object.entries(t).forEach(([e,t])=>{if(t)switch(e){case"actionName":n.name=t;break;case"type":case"notes":case"signals":case"disabled":n[e]=t;break;case Vt.CollectContainerAttributes:case Vt.CollectReplicaSetAttributes:case Vt.CollectWorkloadId:case Vt.CollectClusterId:case Vt.LabelsAttributes:case Vt.AnnotationsAttributes:case Vt.ClusterAttributes:case Vt.OverwriteExistingValues:case Vt.AttributeNamesToDelete:case Vt.Renames:case Vt.PiiCategories:case Vt.FallbackSamplingRatio:case Vt.SamplingPercentage:case Vt.EndpointsFilters:case Vt.ServicesNameFilters:case Vt.AttributeFilters:n.fields||(n.fields={}),n.fields[e]=t}}),o(void 0,void 0,n)}}},Ji=()=>{const{setCurrentModal:e}=Yo(),{setDrawerType:t,setDrawerEntityId:n}=Wo(),{setActiveNodeType:o,setActiveNodeId:i,activeNodeId:a}=jt();return{onClickNode:(r,s)=>{const{id:l,type:d,data:{id:c,type:p}}=s;switch(a===l?(o(null),i(null)):(o(d),i(l)),p){case tn.Source:case tn.Destination:case tn.Action:case tn.InstrumentationRule:t(p),n(c);break;case gn.AddSource:e(tn.Source);break;case gn.AddDestination:e(tn.Destination);break;case gn.AddAction:e(tn.Action);break;case gn.AddRule:e(tn.InstrumentationRule)}}}},Ki=()=>{const{setDrawerType:e,setDrawerEntityId:t}=Wo(),{markAsDismissed:n,markAsSeen:o}=Jo();return{onClickNotification:(i,a)=>{const{id:r,crdType:s,target:l}=i,{dismissToast:d}=a||{};if(s&&l)switch(s){case tn.InstrumentationRule:e(tn.InstrumentationRule),t(Qn(l,tn.InstrumentationRule));break;case tn.Source:case"InstrumentationConfig":case"InstrumentationInstance":e(tn.Source),t(Qn(l,tn.Source));break;case tn.Action:e(tn.Action),t(Qn(l,tn.Action));break;case tn.Destination:case"Destination":e(tn.Destination),t(Qn(l,tn.Destination))}o(r),d&&n(r)}}},Xi=()=>{const e=gt(null),[t,n]=mt(0),[o,i]=mt(0);return ht(()=>{const t=()=>{if(e.current){const{width:t,height:o}=e.current.getBoundingClientRect();n(t),i(o)}};return t(),window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[]),{containerRef:e,containerWidth:t,containerHeight:o}},Qi=()=>{const[e,t]=mt(!1),[n,o]=mt(-1);return{isCopied:e,copiedIndex:n,clickCopy:async(n,i)=>{if(!e){if(t(!0),void 0!==i&&o(i),navigator?.clipboard&&navigator.clipboard.writeText)try{await navigator.clipboard.writeText(n)}catch(e){}else{const e=document.createElement("textarea");e.value=n,document.body.appendChild(e),e.select();try{document.execCommand("copy")}catch(e){}document.body.removeChild(e)}setTimeout(()=>{t(!1),o(-1)},1e3)}}}},Zi=e=>{const{addNotification:t}=Jo(),{formData:n,handleFormChange:o,formErrors:i,handleErrorChange:a,resetFormData:r}=qi(e);return{formData:n,formErrors:i,handleFormChange:o,resetFormData:r,validateForm:e=>{const o={};let i=!0;return n.name?go(n.name)?o.name=void 0:(i=!1,o.name=Fo.ILLEGAL_K8S_LABEL):(i=!1,o.name=Fo.FIELD_IS_REQUIRED),!i&&e?.withAlert&&t({type:rn.Warning,title:e.alertTitle,message:Fo.REQUIRED_FIELDS,hideFromHistory:!0}),a(void 0,void 0,o),i},loadFormWithDrawerItem:({name:t})=>{const n={...Rn(e),name:t};o(void 0,void 0,n)}}},ea={type:"",name:"",exportedSignals:{logs:!1,metrics:!1,traces:!1},fields:[],disabled:!1},ta=e=>{const{supportedSignals:t,preLoadedFields:n}=e||{},{addNotification:o}=Jo(),{formData:i,formErrors:a,handleFormChange:r,handleErrorChange:s,resetFormData:l}=qi(ea),[d,c]=mt([]),[p,u]=mt([]);return ht(()=>{var e;u(d?(e=d,e.filter(e=>!!e).map(e=>{const{name:t,componentType:n,componentProperties:o,displayName:i,initialValue:a,renderCondition:r}=e;if(n===on.Dropdown){const e=po(o,{}),s=Array.isArray(e.values)?e.values.map(e=>({id:e,value:e})):Object.entries(e.values).map(([e,t])=>({id:e,value:t}));return{name:t,componentType:n,title:i,value:a,placeholder:e.placeholder||"Select an option",options:s,renderCondition:r,...e}}return{name:t,componentType:n,title:i,value:a,renderCondition:r,...po(o,{})}})).map(e=>{if(n){const t="string"==typeof n?po(n,{}):n;if(e.name in t)return{...e,value:t[e.name]}}return e}):[])},[d,n]),ht(()=>{if(p){const e=p.map(e=>({key:e.name,value:e.value}));r("fields",e)}},[p]),ht(()=>{if(t&&0===Eo(i.exportedSignals).length){const{logs:e,metrics:n,traces:o}=t;r("exportedSignals",{logs:e.supported,metrics:n.supported,traces:o.supported})}},[t,i]),{formData:i,formErrors:a,handleFormChange:r,resetFormData:l,validateForm:e=>{const t={};let n=!0;return p.forEach(({name:e,value:o,required:i})=>{i&&!o&&(n=!1,t[e]=Fo.FIELD_IS_REQUIRED)}),!n&&e?.withAlert&&o({type:rn.Warning,title:e.alertTitle,message:Fo.REQUIRED_FIELDS,hideFromHistory:!0}),s(void 0,void 0,t),n},loadFormWithDrawerItem:({destinationType:{type:e},name:t,disabled:n,exportedSignals:o,fields:i})=>{const a={...Rn(ea),type:e,name:t,disabled:n,exportedSignals:o,fields:Object.entries(po(i,{})).map(([e,t])=>({key:e,value:t}))};return r(void 0,void 0,a),a},yamlFields:d,setYamlFields:c,dynamicFields:p,setDynamicFields:u}},na={ruleName:"",notes:"",disabled:!1,workloads:null,instrumentationLibraries:null,payloadCollection:{[wn.HttpRequest]:null,[wn.HttpResponse]:null,[wn.DbQuery]:null,[wn.Messaging]:null},codeAttributes:{[$n.Column]:null,[$n.FilePath]:null,[$n.Function]:null,[$n.LineNumber]:null,[$n.Namespace]:null,[$n.StackTrace]:null},headersCollection:null,customInstrumentations:{[bn.Java]:null,[bn.Golang]:null}},oa=()=>{const{formData:e,formErrors:t,handleFormChange:n,handleErrorChange:o,resetFormData:i}=qi(na);return{formData:e,formErrors:t,handleFormChange:n,resetFormData:i,validateForm:()=>(o(void 0,void 0,{}),!0),loadFormWithDrawerItem:({ruleName:e,notes:t,disabled:o,payloadCollection:i,codeAttributes:a,headersCollection:r,customInstrumentations:s})=>{const l={...Rn(na),ruleName:e,notes:t,disabled:o};i&&(l.payloadCollection={[wn.HttpRequest]:i[wn.HttpRequest]?{}:null,[wn.HttpResponse]:i[wn.HttpResponse]?{}:null,[wn.DbQuery]:i[wn.DbQuery]?{}:null,[wn.Messaging]:i[wn.Messaging]?{}:null}),a&&(l.codeAttributes={[$n.Column]:a[$n.Column]||null,[$n.FilePath]:a[$n.FilePath]||null,[$n.Function]:a[$n.Function]||null,[$n.LineNumber]:a[$n.LineNumber]||null,[$n.Namespace]:a[$n.Namespace]||null,[$n.StackTrace]:a[$n.StackTrace]||null}),r&&(l.headersCollection=r),s&&(l.customInstrumentations={[bn.Java]:s[bn.Java]||null,[bn.Golang]:s[bn.Golang]||null}),n(void 0,void 0,l)}}},ia=({active:e,key:t,withAltKey:n,withCtrlKey:o,withShiftKey:i,withMetaKey:a},r)=>(ht(()=>{const s=s=>{e&&t===s.key&&(!n||n&&s.altKey)&&(!o||o&&s.ctrlKey)&&(!i||i&&s.shiftKey)&&(!a||a&&s.metaKey)&&(s.preventDefault(),s.stopPropagation(),r(s))};return window.addEventListener("keydown",s),()=>{window.removeEventListener("keydown",s)}},[t,e,n,o,i,a,r]),null),aa=(e,t)=>{ht(()=>{const n=n=>{e.current&&!e.current.contains(n.target)&&t()};return document.addEventListener("mousedown",n),document.addEventListener("touchstart",n),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("touchstart",n)}},[e,t])},ra=({defaultClientHeight:e=0,defaultClientwidth:t=0,onClickOutside:n}={})=>{const o=gt(null),[i,a]=mt(!1),[r,s]=mt({top:0,left:0});return aa(o,()=>{i&&(a(!1),n?.())}),{popupRef:o,popupOpen:i,setPopupOpen:a,popupPosition:r,handlePosition:(n,i)=>{const{innerWidth:a,innerHeight:r}=window;let l=i,d=n;l>=r/2&&(l+=-(o.current?.clientHeight||e)),d>=a/2&&(d+=-(o.current?.clientWidth||t)),s({top:l,left:d})}}},sa=()=>({getItemSS:(e,t)=>{const n=sessionStorage.getItem(e);return n?po(n,t):t},setItemSS:(e,t)=>{sessionStorage.setItem(e,JSON.stringify(t))},removeItemSS:e=>{sessionStorage.removeItem(e)}}),la={otelServiceName:"",currentStreamName:""},da=()=>{const{formData:e,formErrors:t,handleFormChange:n,handleErrorChange:o,resetFormData:i}=qi(la);return{formData:e,formErrors:t,handleFormChange:n,resetFormData:i,validateForm:()=>(o(void 0,void 0,{}),!0),loadFormWithDrawerItem:({otelServiceName:e,name:t})=>{const o={...Rn(la),otelServiceName:e||t||""};n(void 0,void 0,o)}}},ca=(e,t,n)=>{const o="boolean"==typeof n,i=e.dataStreamNames?.includes(t)||e.currentStreamName===t,a=(o?n:e.selected)||!1;return{namespace:e.namespace,name:e.name,kind:e.kind,selected:!(!i&&!o)&&a,numberOfInstances:e.numberOfInstances}},pa=(e,t,n)=>({...ca(e,t,n),currentStreamName:t}),ua=(e,t,n)=>{const o="boolean"==typeof n,i=e.dataStreamNames?.includes(t),a=(o?n:e.selected)||!1;return{namespace:e.name,selected:!(!i&&!o)&&a,currentStreamName:t}},ma=e=>{const{fetchSingleNamespace:t}=e||{},{namespaces:n}=Vo(),{selectedStreamName:o}=Uo(),i=gt(!1),{configuredSources:a,configuredFutureApps:r,availableSources:s}=ti(),[l,d]=mt(s),[c,p]=mt(!1),[u,m]=mt(!1),[h,g]=mt([]),[x,f]=mt(""),[$,y]=mt(r),[b,w]=mt(((e,t,n)=>{const o={};return Object.entries(e).forEach(([e,t])=>{o[e]=t.map(e=>pa(e,n))}),Object.entries(t).forEach(([e,t])=>{t.forEach(t=>{const i=o[e].findIndex(e=>e.name===t.name&&e.kind===t.kind),a=pa(t,n);-1!==i?o[e][i]=a:o[e].push(a)})}),o})(s,a,o)),k=async(e,n)=>{if(t)if(h.includes(e.name))w(t=>({...t,[e.name]:t[e.name].map(e=>({...e,selected:"boolean"==typeof n?n:e.selected,currentStreamName:o}))}));else{const{data:i}=await t({variables:{namespaceName:e.name}}),{name:a,sources:r=[]}=i?.computePlatform?.k8sActualNamespace||{};if(!a)return;g(e=>[...e,a]),d(e=>({...e,[a]:r.map(e=>ca(e,o))})),w(e=>({...e,[a]:"boolean"!=typeof n&&e[a]?.length?e[a]:r.map(e=>pa(e,o,n))}))}};ht(()=>(i.current=!0,n?.length&&(d(e=>{const t={...e};return n.forEach(({name:e})=>t[e]=t[e]||[]),t}),w(e=>{const t={...e};return n.forEach(({name:e})=>t[e]=t[e]||[]),t}),y(e=>{const t={...e};return n.forEach(e=>t[e.name]=t[e.name]||ua(e,o)),t}),(async()=>{p(!0);for await(const e of n)i.current&&await k(e);p(!1)})()),()=>{i.current=!1}),[n,o]);const[v,E]=mt(""),[S,C]=mt(tn.Source),[T,A]=mt(!1),[D,N]=mt(!1),I=ut(()=>{const e=(e,t)=>!v||S!==t||S===t&&e.toLowerCase().includes(v),t={};return Object.entries(b).filter(([t])=>e(t,tn.Namespace)).forEach(([n,o])=>{const i=o.filter(t=>e(t.name,tn.Source)&&(!T||t.selected)&&(e=>!D||(e.numberOfInstances||0)>0)(t));i.length&&(t[n]=i)}),t},[b,v,S,T,D]);return{isFetchingEachNamespace:c,fetchedNamespaces:h,availableSources:l,filteredNamespacesAndSources:I,getApiSourcesPayload:()=>{const e={};return Object.entries(b).forEach(([t,n])=>{n.forEach(n=>{const o=l[t]?.find(e=>e.name===n.name&&e.kind===n.kind);o?.selected!==n.selected&&(e[t]||(e[t]=[]),e[t].push(n))})}),e},getApiFutureAppsPayload:()=>{const e={};return Object.entries($).forEach(([t,i])=>{const a=n?.find(e=>e.name===t);(i.selected&&!a?.dataStreamNames?.includes(o)||!i.selected&&a?.dataStreamNames?.includes(o))&&(e[t]=i)}),e},selectedNamespace:x,onSelectNamespace:(e,t)=>{const o=n.find(t=>t.name===e);if(o){const n="boolean"==typeof t;f(t=>t!==e||n?e:""),k(o,t),n&&m(!1)}},selectedAllNamespaces:u,onSelectAllNamespaces:e=>{m(e),n.forEach(t=>k(t,e))},selectedSources:b,onSelectSource:(e,t)=>{const n=t||x;if(!n)return;const i=[...b[n]||[]],a=i.findIndex(({name:t,kind:n})=>t===e.name&&n===e.kind);if(-1!==a){const e={...i[a],selected:!i[a].selected,currentStreamName:o};i[a]=e}else i.push({...e,selected:!0,currentStreamName:o});w(e=>({...e,[n]:i})),m(!1)},selectedFutureApps:$,onSelectFutureApps:(e,t)=>{const i=t||x;if(!i)return;const a=n.find(e=>e.name===t);a&&y(t=>({...t,[i]:ua(a,o,e)}))},searchText:v,setSearchText:E,searchBy:S,setSearchBy:C,showSelectedOnly:T,setShowSelectedOnly:A,showRunningOnly:D,setShowRunningOnly:N}};yt.addDefaultLocale(vt);const ha=()=>new yt("en-US"),ga=({container:e,animateIn:t,animateOut:n,duration:o=300})=>{const i=Et(e)`
|
|
290
290
|
animation-name: ${({$isEntering:e,$isLeaving:o})=>e?t:o?n:"none"};
|
|
291
291
|
animation-duration: ${o}ms;
|
|
292
292
|
animation-fill-mode: forwards;
|
|
@@ -396,9 +396,9 @@ import{SamplerIcon as e,PiiMaskingIcon as t,ImageErrorIcon as n,K8sLogo as o,Add
|
|
|
396
396
|
`,La=Et.td`
|
|
397
397
|
vertical-align: top;
|
|
398
398
|
padding: 4px 6px;
|
|
399
|
-
`,
|
|
399
|
+
`,Pa=Et(gi)`
|
|
400
400
|
white-space: nowrap;
|
|
401
|
-
`,
|
|
401
|
+
`,Ma=Et.span`
|
|
402
402
|
white-space: ${({$noWrap:e})=>e?"nowrap":"pre-wrap"};
|
|
403
403
|
overflow-wrap: break-word;
|
|
404
404
|
word-break: break-word;
|
|
@@ -406,7 +406,7 @@ import{SamplerIcon as e,PiiMaskingIcon as t,ImageErrorIcon as n,K8sLogo as o,Add
|
|
|
406
406
|
/* Fallback for older browsers */
|
|
407
407
|
-ms-word-break: break-all;
|
|
408
408
|
font-size: 12px;
|
|
409
|
-
`,Ba=({language:e,code:t,flatten:n,pretty:o})=>{const{darkMode:i}=ci.useTheme();let a="";if("json"===e){const e=po(t,{}),o=Ao(e);a=Do(n?jn(o):o)}else a=t;return o&&"json"===e?ct.createElement(ja,{darkMode:i,str:a}):ct.createElement(Lt,{theme:i?
|
|
409
|
+
`,Ba=({language:e,code:t,flatten:n,pretty:o})=>{const{darkMode:i}=ci.useTheme();let a="";if("json"===e){const e=po(t,{}),o=Ao(e);a=Do(n?jn(o):o)}else a=t;return o&&"json"===e?ct.createElement(ja,{darkMode:i,str:a}):ct.createElement(Lt,{theme:i?Pt.palenight:Pt.vsLight,language:e,code:a},({getLineProps:e,getTokenProps:t,tokens:n})=>ct.createElement("pre",null,n.map((n,o)=>ct.createElement("div",{key:`line-${o}`,...e({line:n})},n.map((e,n)=>ct.createElement(Ma,{key:`line-${o}-token-${n}`,...t({token:e})}))))))},ja=({darkMode:e,str:t})=>{const n=ci.useTheme();return ct.createElement(Lt,{theme:e?Pt.palenight:Pt.vsLight,language:"json",code:t},({getLineProps:e,getTokenProps:t,tokens:o})=>ct.createElement(za,null,ct.createElement(Ra,null,o.map((o,i)=>{const a=(e=>{const t=["punctuation","plain","operator"];return e.filter(e=>!t.includes(e.types[0])).map(({types:e,content:t})=>{const n=[...e],o=["property","string"].includes(n[0])?t.replace(/"/g,""):t;return"string"===n[0]&&(["true","false"].includes(o.split("@")[0])&&(n[0]="boolean"),o.split("@")[0].match(/^[0-9]+$/)&&(n[0]="number")),{types:n,content:o}})})(o),r=e({line:a});return 1===a.length&&"property"===a[0].types[0]?ct.createElement(pt,{key:`line-${i}`},((e,t)=>{const o=new Array(2).fill(e=>ct.createElement(Fa,{...e},ct.createElement(La,null),ct.createElement(La,null)));return ct.createElement(pt,null,o.map((e,o)=>ct.createElement(e,{key:`empty-row-${t}-${o}`,style:0===o?{borderBottom:`1px solid ${n.colors.border}`}:{}})))})(0,i),ct.createElement(Fa,{...r},ct.createElement(La,null,ct.createElement(Pa,null,a[0].content)),ct.createElement(La,null))):2===a.length?ct.createElement(Fa,{key:`line-${i}`,...r},a.map((e,o)=>{const{text:a,components:r}=((e,t)=>{const[n,...o]=e.split("@");return{text:n,components:o?.map((e,n)=>{if(!e.includes("="))return null;const[o,i]=e.split("=");switch(o){case"tooltip":return ct.createElement(Ta,{key:`${o}-${i}-${n}`,withIcon:!0,text:i});case"status":if("none"===i)return ct.createElement("div",{key:`${o}-${i}-${n}`,style:{width:16,height:16}});let e=ro(i,t);return e||(e=ro(rn.Warning,t)),ct.createElement(e,{key:`${o}-${i}-${n}`});default:return null}})?.filter(e=>!!e)||[]}})(e.content,n),s=0===o;return ct.createElement(La,{key:`line-${i}-token-${o}`},ct.createElement(xa,null,ct.createElement(xa,null,r),ct.createElement(Ma,{$noWrap:s,...t({token:e})},a)))})):(a.length,null)}))))},Ua={cm:!0,mm:!0,in:!0,px:!0,pt:!0,pc:!0,em:!0,ex:!0,ch:!0,rem:!0,vw:!0,vh:!0,vmin:!0,vmax:!0,"%":!0};function Wa(e){if("number"==typeof e)return{value:e,unit:"px"};let t;const n=(e.match(/^[0-9.]*/)||"").toString();t=n.includes(".")?parseFloat(n):parseInt(n,10);const o=(e.match(/[^0-9]*$/)||"").toString();return Ua[o]?{value:t,unit:o}:{value:t,unit:"px"}}function Va(e){const t=Wa(e);return`${t.value}${t.unit}`}const Ha=(()=>{const e="react-spinners-FadeLoader-fade";if("undefined"==typeof window||!window.document)return e;const t=document.createElement("style");document.head.appendChild(t);const n=t.sheet,o=`\n @keyframes ${e} {\n 50% {opacity: 0.3} 100% {opacity: 1}\n }\n `;return n&&n.insertRule(o,0),e})(),qa=({loading:e=!0,color:t,scale:n=1,speedMultiplier:o=1,cssOverride:i={},style:a={},...r})=>{const s=ci.useTheme(),l=t||s.text.secondary;if(!e)return null;const{value:d}=Wa(2),c=d+4.2,p=c/2+c/5.5,u=4*c*n,m={position:"relative",width:`${u}px`,height:`${u}px`,scale:n,...a,...i},h=(e,t)=>({position:"absolute",width:Va(1.5),height:Va(4),borderRadius:Va(2),backgroundColor:l,transition:"2s",animationFillMode:"both",animation:`${Ha} ${1.2/o}s ${.12*e}s infinite ease-in-out`,transform:`translate(-50%, -50%) rotate(${t}deg)`});return ct.createElement("span",{style:m,...r},ct.createElement("span",{style:{...h(1,0),top:`calc(50% + ${c}px)`,left:"50%"}}),ct.createElement("span",{style:{...h(2,-45),top:`calc(50% + ${p}px)`,left:`calc(50% + ${p}px)`}}),ct.createElement("span",{style:{...h(3,90),top:"50%",left:`calc(50% + ${c}px)`}}),ct.createElement("span",{style:{...h(4,45),top:`calc(50% + ${-1*p}px)`,left:`calc(50% + ${p}px)`}}),ct.createElement("span",{style:{...h(5,0),top:`calc(50% + ${-1*c}px)`,left:"50%"}}),ct.createElement("span",{style:{...h(6,-45),top:`calc(50% + ${-1*p}px)`,left:`calc(50% + ${-1*p}px)`}}),ct.createElement("span",{style:{...h(7,90),top:"50%",left:`calc(50% + ${-1*c}px)`}}),ct.createElement("span",{style:{...h(8,45),top:`calc(50% + ${p}px)`,left:`calc(50% + ${-1*p}px)`}}))},Ga=Et.div`
|
|
410
410
|
margin: ${({$align:e})=>"right"===e?"auto 6px auto auto":"left"===e?"auto auto auto 6px":"auto"};
|
|
411
411
|
display: flex;
|
|
412
412
|
align-items: center;
|
|
@@ -458,7 +458,7 @@ import{SamplerIcon as e,PiiMaskingIcon as t,ImageErrorIcon as n,K8sLogo as o,Add
|
|
|
458
458
|
`,rr=Et.div`
|
|
459
459
|
display: flex;
|
|
460
460
|
align-items: center;
|
|
461
|
-
`,sr=({title:e,subtitle:t,status:n=rn.Default,forceIcon:o,withIcon:i,withBorder:a,withBackground:r,width:s,size:l=12,family:d="secondary",nowrap:c=!1})=>{const p=ci.useTheme(),u=[ln.Loading,ln.Disabled].includes(n)?rn.Info:n,m=o?()=>ct.createElement(o,{size:l+2,fill:p.text[u]}):n===ln.Loading?()=>ct.createElement(qa,{scale:.8}):()=>ro(u,p)?.({size:l+2});return ct.createElement(ir,{$status:u,$width:s,$size:l,$withIcon:i,$withBorder:a,$withBackground:r},i&&ct.createElement(ar,null,ct.createElement(m,null)),(!!e||!!t)&&ct.createElement(rr,null,!!e&&ct.createElement(gi,{size:l,family:d,color:p.text[u],nowrap:c},e),!!e&&!!t&&ct.createElement(or,{orientation:"vertical",length:l-2+"px",type:u}),!!t&&ct.createElement(gi,{size:l-2,family:d,color:p.text[`${u}_secondary`],nowrap:c},t)))},lr=({label:e,onClick:t,variant:n="tertiary",textProps:o,...i})=>{const a=ci.useTheme();return ct.createElement(
|
|
461
|
+
`,sr=({title:e,subtitle:t,status:n=rn.Default,forceIcon:o,withIcon:i,withBorder:a,withBackground:r,width:s,size:l=12,family:d="secondary",nowrap:c=!1})=>{const p=ci.useTheme(),u=[ln.Loading,ln.Disabled].includes(n)?rn.Info:n,m=o?()=>ct.createElement(o,{size:l+2,fill:p.text[u]}):n===ln.Loading?()=>ct.createElement(qa,{scale:.8}):()=>ro(u,p)?.({size:l+2});return ct.createElement(ir,{$status:u,$width:s,$size:l,$withIcon:i,$withBorder:a,$withBackground:r},i&&ct.createElement(ar,null,ct.createElement(m,null)),(!!e||!!t)&&ct.createElement(rr,null,!!e&&ct.createElement(gi,{size:l,family:d,color:p.text[u],nowrap:c},e),!!e&&!!t&&ct.createElement(or,{orientation:"vertical",length:l-2+"px",type:u}),!!t&&ct.createElement(gi,{size:l-2,family:d,color:p.text[`${u}_secondary`],nowrap:c},t)))},lr=({label:e,onClick:t,variant:n="tertiary",textProps:o,...i})=>{const a=ci.useTheme();return ct.createElement(Mi,{onClick:t,variant:n,...i},ct.createElement(Ke,{fill:"primary"===n?a.text.primary:a.text.info}),ct.createElement(gi,{size:14,family:"secondary",decoration:"underline",color:"primary"===n?a.text.primary:void 0,...o},e||Po.ADD))},dr=Et.button`
|
|
462
462
|
position: relative;
|
|
463
463
|
width: ${({$size:e})=>e}px;
|
|
464
464
|
height: ${({$size:e})=>e}px;
|
|
@@ -500,7 +500,7 @@ import{SamplerIcon as e,PiiMaskingIcon as t,ImageErrorIcon as n,K8sLogo as o,Add
|
|
|
500
500
|
width: 100%;
|
|
501
501
|
padding-left: 12px;
|
|
502
502
|
}
|
|
503
|
-
`,mr=({value:e,callbackCopyDone:t})=>{const{clickCopy:n,isCopied:o}=Qi();return ct.createElement(ur,null,ct.createElement("pre",null,e),ct.createElement(pr,{onClick:o=>{o.stopPropagation(),n(e),t?.()},tooltip:o?"Copied!":"Copy"},o?ct.createElement(qe,null):ct.createElement(Xe,null)))},hr=({label:e,onClick:t,variant:n="tertiary",...o})=>{const i=ci.useTheme();return ct.createElement(
|
|
503
|
+
`,mr=({value:e,callbackCopyDone:t})=>{const{clickCopy:n,isCopied:o}=Qi();return ct.createElement(ur,null,ct.createElement("pre",null,e),ct.createElement(pr,{onClick:o=>{o.stopPropagation(),n(e),t?.()},tooltip:o?"Copied!":"Copy"},o?ct.createElement(qe,null):ct.createElement(Xe,null)))},hr=({label:e,onClick:t,variant:n="tertiary",...o})=>{const i=ci.useTheme();return ct.createElement(Mi,{onClick:t,variant:n,...o},ct.createElement(Qe,{fill:"primary"===n?i.text.primary:i.text.info}),ct.createElement(gi,{size:14,family:"secondary",decoration:"underline",color:"primary"===n?i.text.primary:void 0},e||Po.EDIT))},gr=({onClick:e})=>ct.createElement(cc,{type:rn.Default,icon:Ve,message:Lo.QUICK_BACK_TO_SUMMARY,action:{label:Lo.GO_TO_SUMMARY,onClick:e}}),xr=Et(gi)`
|
|
504
504
|
max-width: ${({$maxWidth:e})=>e?`${e}px`:"unset"};
|
|
505
505
|
white-space: nowrap;
|
|
506
506
|
overflow-x: auto;
|
|
@@ -587,9 +587,9 @@ import{SamplerIcon as e,PiiMaskingIcon as t,ImageErrorIcon as n,K8sLogo as o,Add
|
|
|
587
587
|
`,Fr=Et(gi)`
|
|
588
588
|
font-size: 12px;
|
|
589
589
|
text-align: right;
|
|
590
|
-
`,Lr=({title:e,subTitle:t,tooltip:n,value:o})=>ct.createElement(Or,null,ct.createElement(fa,{$gap:4},ct.createElement(Ta,{text:n||""},e&&ct.createElement(_r,null,e),t&&ct.createElement(zr,null,t))),ct.createElement(Rr,null,o?.status?ct.createElement(sr,{status:"transitioning"===o.status?ln.Loading:o.status,title:o.text||o.status,withBorder:!0,withIcon:!0}):ct.createElement(Fr,null,o?.text||"-"))),
|
|
590
|
+
`,Lr=({title:e,subTitle:t,tooltip:n,value:o})=>ct.createElement(Or,null,ct.createElement(fa,{$gap:4},ct.createElement(Ta,{text:n||""},e&&ct.createElement(_r,null,e),t&&ct.createElement(zr,null,t))),ct.createElement(Rr,null,o?.status?ct.createElement(sr,{status:"transitioning"===o.status?ln.Loading:o.status,title:o.text||o.status,withBorder:!0,withIcon:!0}):ct.createElement(Fr,null,o?.text||"-"))),Pr=Et(fa)`
|
|
591
591
|
width: 100%;
|
|
592
|
-
`,
|
|
592
|
+
`,Mr=({containerName:e,actualDevices:t,started:n,ready:o,instrumentationInstances:i})=>{const a=ut(()=>{const e=[];return n?.name&&e.push(ct.createElement(sr,{status:fo(n.value)?Co(n.value)?rn.Success:rn.Error:rn.Default,title:n.name,withIcon:!0,withBorder:!0,size:8})),o?.name&&e.push(ct.createElement(sr,{status:fo(o.value)?Co(o.value)?rn.Success:rn.Error:rn.Default,title:o.name,withIcon:!0,withBorder:!0,size:8})),e},[n?.name,n?.value,o?.name,o?.value]);return ct.createElement(Ir,{title:e.value,subTitle:i.length?`${i.length} Instrumented Processes`:void 0,visualProps:{componentsUnderTitles:a},renderActions:()=>ct.createElement(sr,{status:rn.Info,title:"Instrumentation Device",subtitle:t.value&&"[]"!==t.value?t.value:"none",withBorder:!0}),extendableProps:{isExtended:!!i.length,renderExtended:()=>ct.createElement(Pr,{$gap:24},i.map((e,t)=>ct.createElement(Pr,{key:`process-${t}`,$gap:8},ct.createElement(Lr,{title:`Instrumented Process #${t+1}`,subTitle:e.message?.value||"",value:{status:e.healthy.status,text:e.healthy.status===rn.Success?"healthy":"unhealthy"}}),e.identifyingAttributes?.map(({name:e,value:t})=>ct.createElement(Lr,{key:`describe-${e}-${t}`,title:e,subTitle:"",value:{text:t,status:void 0}})))))}})};var Br={nodeWidth:295,nodeHeight:80,framePadding:12};const jr=Et(fa)`
|
|
593
593
|
align-items: center !important;
|
|
594
594
|
justify-content: center !important;
|
|
595
595
|
align-self: stretch;
|
|
@@ -619,7 +619,7 @@ import{SamplerIcon as e,PiiMaskingIcon as t,ImageErrorIcon as n,K8sLogo as o,Add
|
|
|
619
619
|
text-align: center;
|
|
620
620
|
`,Hr=$t(({id:e,data:t})=>{const{nodeWidth:n,title:o,subTitle:i}=t,{isThisPending:a}=Xo(),r=e.split("-")[0],s=a({entityType:r});return ct.createElement(jr,{$nodeWidth:n,className:"nowheel nodrag"},s?ct.createElement(pt,null,ct.createElement(Ur,null,ct.createElement(qa,null),ct.createElement(Wr,{family:"secondary"},"adding ",r,"s")),ct.createElement(Vr,null,"Just a few more seconds...")):ct.createElement(pt,null,ct.createElement(Ur,null,ct.createElement(Ke,null),ct.createElement(Wr,{family:"secondary",decoration:"underline"},o)),ct.createElement(Vr,null,i)),ct.createElement(Dt,{type:"target",position:Nt.Left,style:{visibility:"hidden"}}),ct.createElement(Dt,{type:"source",position:Nt.Right,style:{visibility:"hidden"}}))});Hr.displayName=Hr.name;const qr=Et.div`
|
|
621
621
|
width: ${({$nodeWidth:e})=>`${e}px`};
|
|
622
|
-
`,Gr=$t(({id:e,data:t})=>{const n=ci.useTheme(),{nodeWidth:o,id:i,type:a,status:r,faded:s,title:l,subTitle:d,icon:c,icons:p,iconSrc:u,iconSrcs:m,monitors:h,isActive:g,raw:x}=t,f=a===tn.Source,$="boolean"==typeof g,{isThisPending:y}=Xo(),b=y({entityType:a,entityId:i}),{selectedSources:w,setSelectedSources:k}=Qo(),v={...w},{namespace:E,name:S,kind:C}=x;f&&!v[E]&&(v[E]=[]);const T=f?v[E].findIndex(e=>e.name===S&&e.kind===C):-1;return ct.createElement(qr,{"data-id":e,$nodeWidth:o,className:"nowheel nodrag"},ct.createElement(Ir,{title:l,subTitle:d,onClick:()=>{},renderActions:()=>{const e
|
|
622
|
+
`,Gr=$t(({id:e,data:t})=>{const n=ci.useTheme(),{nodeWidth:o,id:i,type:a,status:r,faded:s,title:l,subTitle:d,icon:c,icons:p,iconSrc:u,iconSrcs:m,monitors:h,isActive:g,raw:x}=t,f=a===tn.Source,$="boolean"==typeof g,{isThisPending:y}=Xo(),b=y({entityType:a,entityId:i}),{selectedSources:w,setSelectedSources:k}=Qo(),v={...w},{namespace:E,name:S,kind:C}=x;f&&!v[E]&&(v[E]=[]);const T=f?v[E].findIndex(e=>e.name===S&&e.kind===C):-1;return ct.createElement(qr,{"data-id":e,$nodeWidth:o,className:"nowheel nodrag"},ct.createElement(Ir,{title:l,subTitle:d,onClick:()=>{},renderActions:()=>{const e=$&&!g?ro(rn.Info,n):r?ro(r,n):void 0,t=f&&(!x.conditions?.length||x.conditions?.some(({status:e})=>"loading"===e));return b?ct.createElement(qa,null):e?ct.createElement(e,{size:20}):t?ct.createElement(qa,null):null},iconProps:{icon:c,icons:p,iconSrc:u,iconSrcs:m},visualProps:{status:r,faded:s||$&&!g,monitors:h},checkboxProps:{withCheckbox:f,isChecked:-1!==T,onCheckboxChange:()=>{-1===T?v[E].push(x):v[E].splice(T,1),k(v)},isCheckboxDisabled:b}}),ct.createElement(Dt,{type:"target",position:Nt.Left,style:{visibility:"hidden"}}),ct.createElement(Dt,{type:"source",position:Nt.Right,style:{visibility:"hidden"}}))});Gr.displayName=Gr.name;const Yr=Et.div`
|
|
623
623
|
width: ${({$nodeWidth:e})=>`${e}px`};
|
|
624
624
|
height: ${({$nodeHeight:e})=>`${e}px`};
|
|
625
625
|
opacity: 0;
|
|
@@ -670,7 +670,7 @@ import{SamplerIcon as e,PiiMaskingIcon as t,ImageErrorIcon as n,K8sLogo as o,Add
|
|
|
670
670
|
margin-left: 16px;
|
|
671
671
|
`,ss=Et(xa)`
|
|
672
672
|
margin-left: auto;
|
|
673
|
-
`,ls=Et(
|
|
673
|
+
`,ls=Et(Mi)`
|
|
674
674
|
width: 24px;
|
|
675
675
|
height: 24px;
|
|
676
676
|
padding: 0;
|
|
@@ -780,7 +780,7 @@ import{SamplerIcon as e,PiiMaskingIcon as t,ImageErrorIcon as n,K8sLogo as o,Add
|
|
|
780
780
|
`,Fs=({defaultLanguage:e=Zt.Unknown,defaultVersion:t="",handleSave:n})=>{const{addNotification:o}=Jo(),{formData:i,handleFormChange:a,resetFormData:r}=qi({language:e,version:t}),[s,l]=mt(!1),d=()=>{l(!1),r()};return ct.createElement(Rs,null,ct.createElement(pr,{tooltip:Lo.OVERRIDE_RUNTIME_DETAILS,size:32,onClick:()=>{l(!0)}},ct.createElement(Qe,null)),ct.createElement(mc,{flipX:!0,clientX:36,isOpen:s,onClose:d,onSave:()=>{!i.version||bo(i.version)?(n(i),d()):o({type:rn.Warning,message:Fo.INVALID_VERSION,hideFromHistory:!0})},withDelete:!0,onDelete:()=>{n({language:null,version:""}),d()},title:Lo.OVERRIDE_RUNTIME_DETAILS,warning:Lo.OVERRIDE_RUNTIME_WARNING},ct.createElement(ad,{title:Lo.LANGUAGE,options:_o,value:_o.find(e=>e.id===i.language),onSelect:e=>a("language",e.id),required:!0}),ct.createElement(Jl,{title:Lo.RUNTIME_VERSION,placeholder:Lo.VERSION_PLACEHOLDER,value:i.version,onChange:e=>a("version",e.target.value),required:!1})))},Ls=Et(xa)`
|
|
781
781
|
width: 100%;
|
|
782
782
|
justify-content: center;
|
|
783
|
-
`,
|
|
783
|
+
`,Ps=({containerName:e,language:t,runtimeVersion:n,overriden:o,instrumented:i,instrumentationMessage:a,otelDistroName:r,callbackRuntimeOverride:s})=>{const l=ci.useTheme(),d=i?rn.Success:a?rn.Info:rn.Warning,c=i?sn.INSTRUMENTED:a?sn.NOT_INSTRUMENTED:sn.INSTRUMENTING;return ct.createElement(Ir,{title:e,subTitle:`${t?Oo[t]:"no runtime info"}`+(n?` • Runtime Version: ${n}`:""),iconProps:{icon:qn(t)},extendableProps:{isExtended:!!a,renderExtended:()=>ct.createElement(Ls,null,ct.createElement(gi,{size:12,family:"secondary",color:l.text.info},wo(a)))},renderActions:()=>ct.createElement(ct.Fragment,null,ct.createElement(sr,{status:d,title:c,subtitle:r||void 0,withIcon:!0,withBorder:!0}),o&&ct.createElement(sr,{status:rn.Default,forceIcon:Ze,title:Lo.OVERIDDEN,withIcon:!0,withBorder:!0}),s&&ct.createElement(Fs,{defaultLanguage:t,defaultVersion:n,handleSave:t=>s({...t,containerName:e})}))})},Ms=Et.tr`
|
|
784
784
|
cursor: ${({$withHover:e})=>e?"pointer":"default"};
|
|
785
785
|
opacity: ${({$faded:e})=>e?.5:1};
|
|
786
786
|
`,Bs=Et.td`
|
|
@@ -813,7 +813,7 @@ import{SamplerIcon as e,PiiMaskingIcon as t,ImageErrorIcon as n,K8sLogo as o,Add
|
|
|
813
813
|
height: ${({$height:e})=>e}px;
|
|
814
814
|
border-radius: 16px;
|
|
815
815
|
background-color: ${({theme:e,$hovered:t,$status:n})=>t?n?e.text[n]+ci.opacity.hex["020"]:e.colors.majestic_blue+ci.opacity.hex["030"]:n?e.text[n]+ci.opacity.hex["010"]:e.colors.secondary+ci.opacity.hex["005"]};
|
|
816
|
-
`,Ws=({index:e,columns:t,cells:n,onClick:o,status:i,faded:a})=>{const{containerRef:r,containerHeight:s,containerWidth:l}=Xi(),[d,c]=mt(!1);return ct.createElement(
|
|
816
|
+
`,Ws=({index:e,columns:t,cells:n,onClick:o,status:i,faded:a})=>{const{containerRef:r,containerHeight:s,containerWidth:l}=Xi(),[d,c]=mt(!1);return ct.createElement(Ms,{ref:r,onMouseEnter:()=>!!o&&c(!0),onMouseLeave:()=>!!o&&c(!1),onClick:()=>!!o&&o(),$withHover:!!o,$faded:a},t.map(({key:t},o)=>{const a=n.find(({columnKey:e})=>e===t);if(!a)return null;const{value:r,textColor:c,withTooltip:p,icon:u,component:m}=a;return ct.createElement(Bs,{key:`table-row-${t}-${r}-${e}-${o}`,$isFirst:0===o},u?ct.createElement(br,{icon:u}):m?ct.createElement(m,null):ct.createElement(Ta,{text:p&&r?String(r):""},ct.createElement(js,{$color:c},ho(r)?"-":r)),0===o&&ct.createElement(Us,{$height:s,$width:l,$top:s*e,$hovered:d,$status:i}))}))},Vs=Et.div`
|
|
817
817
|
width: 100%;
|
|
818
818
|
`,Hs=Et.table`
|
|
819
819
|
position: relative;
|
|
@@ -914,7 +914,7 @@ import{SamplerIcon as e,PiiMaskingIcon as t,ImageErrorIcon as n,K8sLogo as o,Add
|
|
|
914
914
|
`,hl=Et(gi)`
|
|
915
915
|
font-size: 10px;
|
|
916
916
|
color: ${({theme:e})=>e.text.grey};
|
|
917
|
-
`,gl=({title:e,subTitle:t,icons:n,iconSrcs:o,onClick:i,renderActions:a})=>{const r=ci.useTheme(),[s,l]=mt(0),d=gt(null),c=gt(null);return ht(()=>{if(d.current){const e=d.current.clientWidth,t=c.current?.clientWidth||0;l(e-(85+t))}},[]),ct.createElement(ul,{ref:d,$gap:8,$withClick:!!i,onClick:i},ct.createElement(vr,{id:`${e}-${t}`,icons:n,iconSrcs:o}),e&&ct.createElement(fr,{maxWidth:s/2,text:e,textSize:14}),e&&t&&ct.createElement(hl,null,"•"),t&&ct.createElement(fr,{maxWidth:s/2,text:t,textSize:10,textColor:r.text.grey}),ct.createElement(ml,{ref:c},a&&ct.createElement(ct.Fragment,null,ct.createElement(or,{orientation:"vertical",length:"24px",margin:"0"}),a())))},xl=({isOpen:e,noOverlay:t,name:n,type:o,isLastItem:i,onApprove:a,onDeny:r})=>{const s=o===tn.Source?"uninstrument":"delete";return ct.createElement(tp,{isOpen:e,noOverlay:t,title:`${s.charAt(0).toUpperCase()+s.substring(1)}${n?` ${n}`:""}`,description:`Are you sure you want to ${s}?`,note:i?{type:rn.Warning,title:`You're about to ${s} the last ${o||n}`,message:""}:void 0,approveButton:{text:"Confirm",variant:"danger",onClick:a},denyButton:{text:"Go Back",onClick:r}})},fl=Et(
|
|
917
|
+
`,gl=({title:e,subTitle:t,icons:n,iconSrcs:o,onClick:i,renderActions:a})=>{const r=ci.useTheme(),[s,l]=mt(0),d=gt(null),c=gt(null);return ht(()=>{if(d.current){const e=d.current.clientWidth,t=c.current?.clientWidth||0;l(e-(85+t))}},[]),ct.createElement(ul,{ref:d,$gap:8,$withClick:!!i,onClick:i},ct.createElement(vr,{id:`${e}-${t}`,icons:n,iconSrcs:o}),e&&ct.createElement(fr,{maxWidth:s/2,text:e,textSize:14}),e&&t&&ct.createElement(hl,null,"•"),t&&ct.createElement(fr,{maxWidth:s/2,text:t,textSize:10,textColor:r.text.grey}),ct.createElement(ml,{ref:c},a&&ct.createElement(ct.Fragment,null,ct.createElement(or,{orientation:"vertical",length:"24px",margin:"0"}),a())))},xl=({isOpen:e,noOverlay:t,name:n,type:o,isLastItem:i,onApprove:a,onDeny:r})=>{const s=o===tn.Source?"uninstrument":"delete";return ct.createElement(tp,{isOpen:e,noOverlay:t,title:`${s.charAt(0).toUpperCase()+s.substring(1)}${n?` ${n}`:""}`,description:`Are you sure you want to ${s}?`,note:i?{type:rn.Warning,title:`You're about to ${s} the last ${o||n}`,message:""}:void 0,approveButton:{text:"Confirm",variant:"danger",onClick:a},denyButton:{text:"Go Back",onClick:r}})},fl=Et(Mi)`
|
|
918
918
|
display: flex;
|
|
919
919
|
align-items: center;
|
|
920
920
|
justify-content: center;
|
|
@@ -952,9 +952,9 @@ import{SamplerIcon as e,PiiMaskingIcon as t,ImageErrorIcon as n,K8sLogo as o,Add
|
|
|
952
952
|
overflow: hidden;
|
|
953
953
|
white-space: nowrap;
|
|
954
954
|
text-overflow: ellipsis;
|
|
955
|
-
`,Cl=Et(
|
|
955
|
+
`,Cl=Et(Mi)`
|
|
956
956
|
gap: 8px;
|
|
957
|
-
`,Tl=Et(
|
|
957
|
+
`,Tl=Et(Mi)``,Al=({onClose:e,width:t,icons:n,iconSrcs:o,title:i,titleTooltip:a,replaceTitleWith:r,actions:s,actionButtons:l=[],tabs:d})=>ct.createElement(kl,null,ct.createElement(vl,null,ct.createElement(El,null,n?.length||o?.length?ct.createElement(vr,{icons:n,iconSrcs:o,id:`drawer-header-${i}`}):null,("function"==typeof r?ct.createElement(r,null):r||null)||ct.createElement(Ta,{text:a||i,withIcon:!!a},i&&ct.createElement(Sl,{$maxWidth:`calc(${t} ${s||l.length?"/ 5":"- 192px"})`},i))),ct.createElement(El,{$gap:2},s,l.map((e,t)=>ct.createElement(Cl,{key:`header-action-button-${t}`,...e})),ct.createElement(Tl,{"data-id":"drawer-close",variant:"secondary",onClick:e},ct.createElement(nt,{size:12})))),ct.createElement(wl,{tabs:d,hideBorder:!0})),Dl=Et.div`
|
|
958
958
|
display: flex;
|
|
959
959
|
justify-content: space-between;
|
|
960
960
|
gap: 8px;
|
|
@@ -968,7 +968,7 @@ import{SamplerIcon as e,PiiMaskingIcon as t,ImageErrorIcon as n,K8sLogo as o,Add
|
|
|
968
968
|
margin: 0 auto;
|
|
969
969
|
`,Ol=Et(xa)`
|
|
970
970
|
margin-left: auto;
|
|
971
|
-
`,_l=Et(
|
|
971
|
+
`,_l=Et(Mi)`
|
|
972
972
|
min-width: 140px;
|
|
973
973
|
font-size: 14px;
|
|
974
974
|
`,zl=({isOpen:e,leftButtons:t=[],centerButtons:n=[],rightButtons:o=[]})=>{const i=ga({container:Dl,animateIn:ci.animations.slide.in.bottom,animateOut:ci.animations.slide.out.bottom});return ct.createElement(i,{enter:e},ct.createElement(Nl,null,t.map((e,t)=>ct.createElement(_l,{key:`footer-left-button-${t}`,...e}))),ct.createElement(Il,null,n.map((e,t)=>ct.createElement(_l,{key:`footer-center-button-${t}`,...e}))),ct.createElement(Ol,null,o.map((e,t)=>ct.createElement(_l,{key:`footer-right-button-${t}`,...e}))))},Rl=Et.div`
|
|
@@ -989,8 +989,9 @@ import{SamplerIcon as e,PiiMaskingIcon as t,ImageErrorIcon as n,K8sLogo as o,Add
|
|
|
989
989
|
flex-grow: 1;
|
|
990
990
|
padding: 24px 32px;
|
|
991
991
|
overflow-y: auto;
|
|
992
|
-
`,
|
|
992
|
+
`,Pl=({isOpen:e,onClose:t,closeOnEscape:n=!0,position:o="right",width:i="300px",children:a,header:r,footer:s})=>{ia({key:"Escape",active:e&&n},()=>t());const l=ga({container:Rl,animateIn:ci.animations.slide.in[o],animateOut:ci.animations.slide.out[o]});return e?Ft.createPortal(ct.createElement(ct.Fragment,null,ct.createElement(ba,{hidden:!e,onClick:t}),ct.createElement(l,{"data-id":"drawer",enter:e,$position:o,$width:i},ct.createElement(Fl,null,ct.createElement(Al,{onClose:t,width:i,...r}),ct.createElement(Ll,null,a),ct.createElement(zl,{...s})))),document.body):null},Ml=Et.div`
|
|
993
993
|
display: flex;
|
|
994
|
+
|
|
994
995
|
align-items: center;
|
|
995
996
|
gap: 6px;
|
|
996
997
|
margin-bottom: 4px;
|
|
@@ -1006,7 +1007,7 @@ import{SamplerIcon as e,PiiMaskingIcon as t,ImageErrorIcon as n,K8sLogo as o,Add
|
|
|
1006
1007
|
font-size: 12px;
|
|
1007
1008
|
color: ${({theme:e})=>e.text.darker_grey};
|
|
1008
1009
|
opacity: 0.8;
|
|
1009
|
-
`,Ul=({title:e,required:t,tooltip:n,style:o,status:i})=>e?ct.createElement(
|
|
1010
|
+
`,Ul=({title:e,required:t,tooltip:n,style:o,status:i})=>e?ct.createElement(Ml,{style:o},ct.createElement(Ta,{text:n,withIcon:!0},ct.createElement(Bl,{$status:i},e),!t&&ct.createElement(jl,null,"(optional)"))):null,Wl=Et.div`
|
|
1010
1011
|
display: flex;
|
|
1011
1012
|
flex-direction: column;
|
|
1012
1013
|
position: relative;
|
|
@@ -1189,7 +1190,7 @@ import{SamplerIcon as e,PiiMaskingIcon as t,ImageErrorIcon as n,K8sLogo as o,Add
|
|
|
1189
1190
|
&.selected {
|
|
1190
1191
|
background: ${({theme:e})=>e.colors.majestic_blue+ci.opacity.hex["024"]};
|
|
1191
1192
|
}
|
|
1192
|
-
`,hd=({option:e,value:t,isMulti:n,onSelect:o,onDeselect:i})=>{const a=ci.useTheme(),r=Array.isArray(t)?!!t?.find(t=>t.id===e.id):t?.id===e.id,s=t=>t?o?.(e):i?.(e);return n?ct.createElement(md,{className:r?"selected":"",onClick:()=>s(!r)},ct.createElement(Na,{title:e.value||"",titleColor:a.text.secondary,value:r,onChange:s,style:{width:"100%"}})):ct.createElement(md,{className:r?"selected":"",onClick:()=>r?i?.(e):o?.(e)},ct.createElement(xa,{$gap:8},e.icon&&ct.createElement(e.icon,null),ct.createElement(gi,{size:14},e.value)),r&&ct.createElement(qe,null))},gd=({error:e})=>{const t=ci.useTheme(),n={container:{display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center",color:t.text.error,fontFamily:t.font_family.primary},errorMessage:{padding:10,borderRadius:5,whiteSpace:"pre-wrap",background:t.colors.error},errorStack:{whiteSpace:"pre-wrap",fontSize:"12px"},errorStackWrapper:{textAlign:"left",marginTop:10},infoText:{marginTop:100,color:t.text.secondary,fontSize:"14px"}};return ct.createElement("div",{style:n.container},ct.createElement("h2",null,"Something went wrong!"),ct.createElement("pre",{style:n.errorMessage},e?.message||"Unknown Error"),ct.createElement("details",{style:n.errorStackWrapper},ct.createElement("summary",null,"Stack Trace"),ct.createElement("pre",{style:n.errorStack},e?.stack||"Unknown Stack")),ct.createElement("p",{style:n.infoText},"Try refreshing the page or contact support"),ct.createElement(
|
|
1193
|
+
`,hd=({option:e,value:t,isMulti:n,onSelect:o,onDeselect:i})=>{const a=ci.useTheme(),r=Array.isArray(t)?!!t?.find(t=>t.id===e.id):t?.id===e.id,s=t=>t?o?.(e):i?.(e);return n?ct.createElement(md,{className:r?"selected":"",onClick:()=>s(!r)},ct.createElement(Na,{title:e.value||"",titleColor:a.text.secondary,value:r,onChange:s,style:{width:"100%"}})):ct.createElement(md,{className:r?"selected":"",onClick:()=>r?i?.(e):o?.(e)},ct.createElement(xa,{$gap:8},e.icon&&ct.createElement(e.icon,null),ct.createElement(gi,{size:14},e.value)),r&&ct.createElement(qe,null))},gd=({error:e})=>{const t=ci.useTheme(),n={container:{display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center",color:t.text.error,fontFamily:t.font_family.primary},errorMessage:{padding:10,borderRadius:5,whiteSpace:"pre-wrap",background:t.colors.error},errorStack:{whiteSpace:"pre-wrap",fontSize:"12px"},errorStackWrapper:{textAlign:"left",marginTop:10},infoText:{marginTop:100,color:t.text.secondary,fontSize:"14px"}};return ct.createElement("div",{style:n.container},ct.createElement("h2",null,"Something went wrong!"),ct.createElement("pre",{style:n.errorMessage},e?.message||"Unknown Error"),ct.createElement("details",{style:n.errorStackWrapper},ct.createElement("summary",null,"Stack Trace"),ct.createElement("pre",{style:n.errorStack},e?.stack||"Unknown Stack")),ct.createElement("p",{style:n.infoText},"Try refreshing the page or contact support"),ct.createElement(Mi,{variant:"secondary",onClick:()=>window.location.reload(),style:{fontSize:"1rem"}},"Reload"))},xd=({children:e})=>ct.createElement(Mt,{FallbackComponent:e=>ct.createElement(ci.Provider,null,ct.createElement(gd,{...e}))},e),fd=Et(xa)`
|
|
1193
1194
|
position: relative;
|
|
1194
1195
|
width: calc(100% - 24px);
|
|
1195
1196
|
padding: 12px;
|
|
@@ -1258,7 +1259,7 @@ import{SamplerIcon as e,PiiMaskingIcon as t,ImageErrorIcon as n,K8sLogo as o,Add
|
|
|
1258
1259
|
border: none;
|
|
1259
1260
|
cursor: ${({disabled:e})=>e?"not-allowed":"pointer"};
|
|
1260
1261
|
opacity: ${({disabled:e})=>e?.5:1};
|
|
1261
|
-
`,_d=({columns:e,initialValues:t=[],value:n,onChange:o,errorMessage:i,limitFieldsPerRow:a})=>{const[
|
|
1262
|
+
`,_d=({columns:e,initialValues:t=[],value:n,onChange:o,errorMessage:i,limitFieldsPerRow:a,title:r=""})=>{const[s,l]=mt({}),[d,c]=mt(n||t),p=ut(()=>new Map(e.map(e=>[e.keyName,e])),[e]);ht(()=>{if(!d.length){const t={};e.forEach(({keyName:e})=>t[e]=""),l(t),c([t])}},[]);const u=d.filter(e=>{for(const[t,n]of Object.entries(e)){const o=p.get(t);if((!o?.renderCondition||o.renderCondition(e))&&o?.required&&ho(n))return!1}return!0}),m=gt(JSON.stringify(u)),h=u.length!==d.length,g=`${Math.floor(640/((a||e.length)+.4))}px`;ht(()=>{const e=JSON.stringify(u);m.current!==e&&(m.current=e,o&&o(u))},[u,o]);const x=(e,t,n)=>{c(o=>{const i=Rn(o);return i[n][e]=t,i})},f=ut(()=>{if(a){const t=[];for(let n=0;;n+=a){const o=e.slice(n,n+a);if(!o.length)break;t.push(o)}return t}return[e]},[a,e]);return ct.createElement(Id,null,ct.createElement(Ul,{title:r}),ct.createElement("table",{style:{borderCollapse:"collapse"}},!a&&ct.createElement("thead",null,ct.createElement("tr",null,e.map(({title:e,tooltip:t,required:n})=>ct.createElement("th",{key:`input-table-head-${e}`,style:{maxWidth:g}},ct.createElement(Ul,{title:e,required:n,tooltip:t}))),ct.createElement("th",null))),ct.createElement("tbody",null,d.map((t,n)=>ct.createElement(pt,{key:`input-table-row-${n}`},a&&n>0?ct.createElement("tr",null,ct.createElement("td",{colSpan:f.length},ct.createElement(or,null))):null,f.map((o,r)=>ct.createElement("tr",{key:`input-table-matrix-${n}-${r}`},o.map((e,o)=>ct.createElement(Nd,{key:`input-table-row-${n}-col-${o}`,col:e,colIdx:o,row:t,rowIdx:n,rowsLength:d.length,maxWidth:g,limitFieldsPerRow:a,errorMessage:i,handleChange:x})),0===r&&ct.createElement("td",null,ct.createElement(Od,{$marginTop:a?"24px":"0",onClick:()=>{return t=n,void(d.length>1?c(e=>e.filter((e,n)=>n!==t)):e.forEach(({keyName:e,type:n})=>x(e,n===an.Number?"0":"",t)));var t}},ct.createElement(lt,null))))))))),!!i&&ct.createElement($i,null,i),ct.createElement(lr,{onClick:()=>{c(e=>{const t=Rn(e);return t.push(Rn(s)),t})},disabled:h}))},zd=Et.div`
|
|
1262
1263
|
display: flex;
|
|
1263
1264
|
flex-direction: column;
|
|
1264
1265
|
width: 100%;
|
|
@@ -1273,10 +1274,10 @@ import{SamplerIcon as e,PiiMaskingIcon as t,ImageErrorIcon as n,K8sLogo as o,Add
|
|
|
1273
1274
|
`,Ld=Et.div`
|
|
1274
1275
|
width: 100%;
|
|
1275
1276
|
max-width: ${({$maxWidth:e})=>e?`${e}px`:"unset"};
|
|
1276
|
-
`,
|
|
1277
|
+
`,Pd=Et(pr)`
|
|
1277
1278
|
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
1278
1279
|
opacity: ${({$disabled:e})=>e?.5:1};
|
|
1279
|
-
`,
|
|
1280
|
+
`,Md={key:"",value:""},Bd=({initialKeyValuePairs:e=[],value:t,onChange:n,title:o,tooltip:i,disabled:a,required:r,errorMessage:s,keyPlaceholder:l="Key",valuePlaceholder:d="Value",inputMaxWidth:c=300})=>{const[p,u]=mt(t||e);ht(()=>{p.length||u([{...Md}])},[]);const m=p.filter(({key:e,value:t})=>!ho(e.trim())&&!ho(t.trim())),h=gt(JSON.stringify(m));ht(()=>{const e=JSON.stringify(m);h.current!==e&&(h.current=e,n&&n(m))},[m,n]);const g=(e,t,n)=>{u(o=>{const i=[...o];return i[n][e]=t,i})},x=p.length<=1,f=a||p.some(({key:e,value:t})=>""===e.trim()||""===t.trim()),$=a||x&&f;return ct.createElement(zd,null,ct.createElement(Ul,{title:o,required:r,tooltip:i}),ct.createElement(Rd,null,p.map(({key:e,value:t},n)=>ct.createElement(Fd,{key:`key-value-input-list-${n}`},ct.createElement(Ld,{$maxWidth:c},ct.createElement(Jl,{placeholder:l,disabled:a,value:e,onChange:e=>g("key",e.target.value,n),hasError:!!s&&(!r||r&&!e),autoFocus:ho(t)&&!x&&n===p.length-1})),ct.createElement(Ld,{$maxWidth:n===p.length-1?c-38:c},ct.createElement(Jl,{placeholder:d,disabled:a,value:t,onChange:e=>g("value",e.target.value,n),hasError:!!s&&(!r||r&&ho(t)),autoFocus:!1})),n===p.length-1&&ct.createElement(Pd,{withBorder:!0,size:30,$disabled:f,onClick:f?void 0:()=>{u(e=>{const t=[...e];return t.push({...Md}),t})}},ct.createElement(Ke,null)),ct.createElement(Pd,{size:30,$disabled:$,onClick:$?void 0:()=>(e=>{x?(g("key","",e),g("value","",e)):u(t=>t.filter((t,n)=>n!==e))})(n)},ct.createElement(lt,null))))),!!s&&ct.createElement($i,null,s))},jd=Et.div`
|
|
1280
1281
|
position: fixed;
|
|
1281
1282
|
top: 50%;
|
|
1282
1283
|
left: 50%;
|
|
@@ -1339,7 +1340,7 @@ import{SamplerIcon as e,PiiMaskingIcon as t,ImageErrorIcon as n,K8sLogo as o,Add
|
|
|
1339
1340
|
display: flex;
|
|
1340
1341
|
gap: 8px;
|
|
1341
1342
|
align-items: center;
|
|
1342
|
-
`,ec=Et(
|
|
1343
|
+
`,ec=Et(Mi)`
|
|
1343
1344
|
display: flex;
|
|
1344
1345
|
align-items: center;
|
|
1345
1346
|
justify-content: center;
|
|
@@ -1444,7 +1445,7 @@ import{SamplerIcon as e,PiiMaskingIcon as t,ImageErrorIcon as n,K8sLogo as o,Add
|
|
|
1444
1445
|
background-color: ${({theme:e,$bgColor:t})=>t||e.colors.dropdown_bg_2};
|
|
1445
1446
|
border-radius: ${({$isFirstItem:e,$isLastItem:t})=>e?"32px 0px 0px 32px":t?"0px 32px 32px 0px":"0"};
|
|
1446
1447
|
transition: all 0.3s;
|
|
1447
|
-
`,vc=({options:e=[],selected:t,setSelected:n})=>{const o=e.findIndex(e=>e.value===t),[i,a]=mt(e[o]?.selectedBgColor||""),[r,s]=mt({width:0,height:0}),[l,d]=mt({x:0,y:0}),c=gt(null);return ht(()=>{c.current&&(s({width:c.current.offsetWidth,height:c.current.offsetHeight}),d({x:c.current.offsetWidth*o,y:0}))},[t,o]),ct.createElement(bc,{$count:e.length},e.map(({icon:o,label:i,value:r,selectedBgColor:s,selectedTextColor:l},d)=>{const p=t===r;return ct.createElement(wc,{key:`segment-${i||d}-${r}`,ref:p?c:void 0,$isFirstItem:0===d,$isLastItem:d===e.length-1,onClick:()=>{n(r),a(s||"")}},o&&ct.createElement(o,null),i&&ct.createElement(gi,{size:12,family:"secondary",decoration:"underline",color:p?l:void 0},i))}),ct.createElement(kc,{$bgColor:i,$width:r.width,$height:r.height,$x:l.x,$y:l.y,$isFirstItem:0===o,$isLastItem:o===e.length-1}))},Ec=Et(
|
|
1448
|
+
`,vc=({options:e=[],selected:t,setSelected:n})=>{const o=e.findIndex(e=>e.value===t),[i,a]=mt(e[o]?.selectedBgColor||""),[r,s]=mt({width:0,height:0}),[l,d]=mt({x:0,y:0}),c=gt(null);return ht(()=>{c.current&&(s({width:c.current.offsetWidth,height:c.current.offsetHeight}),d({x:c.current.offsetWidth*o,y:0}))},[t,o]),ct.createElement(bc,{$count:e.length},e.map(({icon:o,label:i,value:r,selectedBgColor:s,selectedTextColor:l},d)=>{const p=t===r;return ct.createElement(wc,{key:`segment-${i||d}-${r}`,ref:p?c:void 0,$isFirstItem:0===d,$isLastItem:d===e.length-1,onClick:()=>{n(r),a(s||"")}},o&&ct.createElement(o,null),i&&ct.createElement(gi,{size:12,family:"secondary",decoration:"underline",color:p?l:void 0},i))}),ct.createElement(kc,{$bgColor:i,$width:r.width,$height:r.height,$x:l.x,$y:l.y,$isFirstItem:0===o,$isLastItem:o===e.length-1}))},Ec=Et(Mi)`
|
|
1448
1449
|
gap: 8px;
|
|
1449
1450
|
text-transform: none;
|
|
1450
1451
|
text-decoration: none;
|
|
@@ -1491,12 +1492,12 @@ import{SamplerIcon as e,PiiMaskingIcon as t,ImageErrorIcon as n,K8sLogo as o,Add
|
|
|
1491
1492
|
background-color: ${({$type:e,theme:t})=>t.colors[e]};
|
|
1492
1493
|
`,Fc=Et(gi)`
|
|
1493
1494
|
color: ${({$type:e,theme:t})=>t.text[e]};
|
|
1494
|
-
`,Lc=({type:e=rn.Info,icon:t,title:n,size:o,family:i,children:a,...r})=>ct.createElement(Rc,{$type:e},t&&ct.createElement(t,null),ct.createElement(Fc,{$type:e,size:o||12,family:i||"secondary",...r},a||n)),
|
|
1495
|
+
`,Lc=({type:e=rn.Info,icon:t,title:n,size:o,family:i,children:a,...r})=>ct.createElement(Rc,{$type:e},t&&ct.createElement(t,null),ct.createElement(Fc,{$type:e,size:o||12,family:i||"secondary",...r},a||n)),Pc=Et.div`
|
|
1495
1496
|
display: flex;
|
|
1496
1497
|
flex-direction: column;
|
|
1497
1498
|
position: relative;
|
|
1498
1499
|
width: 100%;
|
|
1499
|
-
`,
|
|
1500
|
+
`,Mc=Et.div`
|
|
1500
1501
|
width: 100%;
|
|
1501
1502
|
display: flex;
|
|
1502
1503
|
align-items: center;
|
|
@@ -1548,7 +1549,7 @@ import{SamplerIcon as e,PiiMaskingIcon as t,ImageErrorIcon as n,K8sLogo as o,Add
|
|
|
1548
1549
|
background-color: ${({theme:e})=>e.colors.border};
|
|
1549
1550
|
cursor: not-allowed;
|
|
1550
1551
|
}
|
|
1551
|
-
`,jc=({errorMessage:e,title:t,tooltip:n,required:o,onChange:i,name:a,...r})=>{const s=gt(null),l=e=>{s.current&&(s.current.style.height="auto",e&&(s.current.style.height=`${s.current.scrollHeight}px`))};return ct.createElement(
|
|
1552
|
+
`,jc=({errorMessage:e,title:t,tooltip:n,required:o,onChange:i,name:a,...r})=>{const s=gt(null),l=e=>{s.current&&(s.current.style.height="auto",e&&(s.current.style.height=`${s.current.scrollHeight}px`))};return ct.createElement(Pc,null,ct.createElement(Ul,{title:t,required:o,tooltip:n}),ct.createElement(Mc,{$disabled:r.disabled,$hasError:!!e,$isActive:!!r.autoFocus},ct.createElement(Bc,{ref:s,"data-id":a,name:a,onFocus:()=>l(!0),onBlur:()=>l(!1),onChange:e=>{e.stopPropagation(),l(!0),i?.(e)},onKeyDown:e=>{e.stopPropagation()},...r})),!!e&&ct.createElement($i,null,e))},Uc=Et.div`
|
|
1552
1553
|
display: flex;
|
|
1553
1554
|
align-items: center;
|
|
1554
1555
|
gap: 12px;
|
|
@@ -1597,8 +1598,8 @@ import{SamplerIcon as e,PiiMaskingIcon as t,ImageErrorIcon as n,K8sLogo as o,Add
|
|
|
1597
1598
|
display: flex;
|
|
1598
1599
|
justify-content: space-between;
|
|
1599
1600
|
gap: 12px;
|
|
1600
|
-
`,Zc=Et(
|
|
1601
|
+
`,Zc=Et(Mi)`
|
|
1601
1602
|
width: 250px;
|
|
1602
1603
|
`,ep=Et.div`
|
|
1603
1604
|
margin-bottom: 12px;
|
|
1604
|
-
`,tp=({isOpen:e,noOverlay:t,title:n="",description:o="",note:i,approveButton:a,denyButton:r,closeOnEscape:s=!0})=>{ia({key:"Enter",active:e&&s},()=>a.onClick());const l=()=>r.onClick();return ct.createElement(Jd,{isOpen:e,noOverlay:t,onClose:l},ct.createElement(Yc,null,ct.createElement(Kc,null,n),ct.createElement(Jc,{$withNote:!!i},ct.createElement(Xc,null,o)),!!i&&ct.createElement(ep,null,ct.createElement(cc,{type:i.type,title:i.title,message:i.message})),ct.createElement(Qc,null,ct.createElement(Zc,{"data-id":"approve",variant:a.variant||"primary",onClick:()=>a.onClick()},a.text),ct.createElement(Zc,{"data-id":"deny",variant:r.variant||"secondary",onClick:l},r.text))))};export{Ta as $,Wt as A,
|
|
1605
|
+
`,tp=({isOpen:e,noOverlay:t,title:n="",description:o="",note:i,approveButton:a,denyButton:r,closeOnEscape:s=!0})=>{ia({key:"Enter",active:e&&s},()=>a.onClick());const l=()=>r.onClick();return ct.createElement(Jd,{isOpen:e,noOverlay:t,onClose:l},ct.createElement(Yc,null,ct.createElement(Kc,null,n),ct.createElement(Jc,{$withNote:!!i},ct.createElement(Xc,null,o)),!!i&&ct.createElement(ep,null,ct.createElement(cc,{type:i.type,title:i.title,message:i.message})),ct.createElement(Qc,null,ct.createElement(Zc,{"data-id":"approve",variant:a.variant||"primary",onClick:()=>a.onClick()},a.text),ct.createElement(Zc,{"data-id":"deny",variant:r.variant||"secondary",onClick:l},r.text))))};export{Ta as $,Wt as A,Po as B,Na as C,Lo as D,tn as E,Ul as F,tr as G,cl as H,Jl as I,en as J,Ht as K,fa as L,Qd as M,Yo as N,Jd as O,tc as P,wa as Q,cc as R,vc as S,ci as T,Fo as U,Oi as V,or as W,Vn as X,sr as Y,xa as Z,ko as _,Qs as a,uo as a$,ln as a0,ro as a1,qo as a2,Fn as a3,br as a4,Xn as a5,Sr as a6,ka as a7,va as a8,is as a9,Ji as aA,ra as aB,Hi as aC,Cc as aD,ya as aE,Kn as aF,aa as aG,wo as aH,ad as aI,Oo as aJ,Nn as aK,Mi as aL,Ro as aM,sa as aN,Zi as aO,zo as aP,pr as aQ,Ya as aR,lr as aS,gr as aT,nn as aU,vo as aV,zn as aW,po as aX,qa as aY,kn as aZ,ta as a_,Jn as aa,Ea as ab,Xs as ac,$a as ad,ed as ae,Gc as af,Ri as ag,No as ah,mn as ai,Un as aj,hn as ak,Br as al,gn as am,An as an,Gn as ao,lo as ap,Eo as aq,Yn as ar,Uo as as,Go as at,Xi as au,Bn as av,Mn as aw,Pn as ax,Ln as ay,zs as az,$i as b,jn as b$,ti as b0,In as b1,Ir as b2,Tn as b3,Rn as b4,zc as b5,ol as b6,eo as b7,yn as b8,bn as b9,vr as bA,Hn as bB,xo as bC,Qi as bD,qi as bE,mc as bF,pn as bG,un as bH,cn as bI,Qt as bJ,Bo as bK,Wn as bL,_a as bM,io as bN,fr as bO,Ut as bP,qt as bQ,Gt as bR,Yt as bS,Jt as bT,Kt as bU,Xt as bV,sn as bW,dn as bX,xn as bY,En as bZ,On as b_,$n as ba,wn as bb,fn as bc,Lc as bd,qn as be,oa as bf,Dn as bg,ga as bh,Qo as bi,co as bj,ha as bk,Ki as bl,hr as bm,Ed as bn,so as bo,mo as bp,mr as bq,Lr as br,Mr as bs,fo as bt,Co as bu,da as bv,Ps as bw,vn as bx,Zt as by,ma as bz,Vt as c,Qn as c0,Zn as c1,to as c2,no as c3,oo as c4,ao as c5,go as c6,$o as c7,bo as c8,So as c9,ui as cA,mi as cB,hi as cC,tp as cD,ba as cE,To as ca,Ao as cb,Do as cc,Io as cd,_o as ce,Mo as cf,jt as cg,Hr as ch,Gr as ci,Jr as cj,Xr as ck,cs as cl,ws as cm,ms as cn,ns as co,Ds as cp,gs as cq,Ba as cr,gl as cs,Al as ct,zl as cu,xd as cv,wd as cw,$r as cx,Ts as cy,wl as cz,an as d,_d as e,Vc as f,Bd as g,Dd as h,ho as i,on as j,gi as k,yc as l,$l as m,jc as n,Jo as o,Wo as p,ia as q,Pl as r,xl as s,Bi as t,Xo as u,rn as v,Vo as w,Yi as x,Cn as y,Sn as z};
|