@odigos/ui-kit 0.0.168 → 0.0.170

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.0.170](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.169...ui-kit-v0.0.170) (2026-01-11)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * refine source filtering logic in useSourceSelectionFormData hook ([#595](https://github.com/odigos-io/ui-kit/issues/595)) ([ec3f107](https://github.com/odigos-io/ui-kit/commit/ec3f10726a46ac0757c6363230ddbadcdc1b0b28))
9
+ * update pods agent injection status handling in dropdown and filter logic ([#597](https://github.com/odigos-io/ui-kit/issues/597)) ([0d5e5f1](https://github.com/odigos-io/ui-kit/commit/0d5e5f16fbc55188b1c6c30e8a6885da29720755))
10
+
11
+ ## [0.0.169](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.168...ui-kit-v0.0.169) (2026-01-08)
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * bulk instrumentation diffs ([#593](https://github.com/odigos-io/ui-kit/issues/593)) ([4a3db0f](https://github.com/odigos-io/ui-kit/commit/4a3db0f7de3b03ee091e4c4cb2dcca1ec058bb64))
17
+
3
18
  ## [0.0.168](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.167...ui-kit-v0.0.168) (2026-01-08)
4
19
 
5
20
 
@@ -1,4 +1,4 @@
1
- import{SamplerIcon as e,PiiMaskingIcon as t,ImageErrorIcon as o,K8sLogo as n,AddClusterInfoIcon as i,DeleteAttributeIcon as a,RenameAttributeIcon as r,JavaLogo as s,GoLogo as l,NodejsLogo as c,PythonLogo as d,DotnetLogo as p,CSharpLogo as u,CPlusPlusLogo as h,PhpLogo as m,RubyLogo as g,RustLogo as $,SwiftLogo as x,ElixirLogo as f,MysqlLogo as b,NginxLogo as y,PostgresLogo as w,RedisLogo as k,KafkaLogo as v,AlaudaLogo as C,AlibabaCloudLogo as E,AppDynamicsLogo as S,AxiomLogo as A,AzureBlobLogo as D,AzureMonitorLogo as T,BetterStackLogo as z,BonreeLogo as F,CauselyLogo as O,ChecklyLogo as I,ChronosphereLogo as N,ClickhouseLogo as _,AwsCloudwatchLogo as B,CoralogixLogo as R,Dash0Logo as L,DatadogLogo as M,OpenTelemetryLogo as P,DynatraceLogo as j,ElasticApmLogo as U,ElasticSearchLogo as W,GoogleCloudPlatformLogo as V,GrafanaLogo as H,GreptimeLogo as q,GroundcoverLogo as G,HoneycombLogo as K,HyperDxLogo as Y,InstanaLogo as J,JaegerLogo as X,KloudmateLogo as Z,Last9Logo as Q,LightstepLogo as ee,LogzioLogo as te,LokiLogo as oe,LumigoLogo as ne,MiddlewareLogo as ie,NewRelicLogo as ae,ObserveLogo as re,OdigosLogo as se,OneUptimeLogo as le,OpenObserveLogo as ce,OpsVerseLogo as de,OracleLogo as pe,PrometheusLogo as ue,QrynLogo as he,GigapipeLogo as me,QuickwitLogo as ge,AwsS3Logo as $e,SeqLogo as xe,SplunkLogo as fe,SignozLogo as be,SumoLogicLogo as ye,TelemetryHubLogo as we,TempoLogo as ke,TingyunLogo as ve,TraceloopLogo as Ce,UptraceLogo as Ee,VictoriaMetricsLogo as Se,AwsXrayLogo as Ae,NamespacesIcon as De,SourceIcon as Te,DestinationIcon as ze,ActionIcon as Fe,InstrumentationRuleIcon as Oe,CodeAttributesIcon as Ie,CustomInstrumentationIcon as Ne,HeadersCollectionIcon as _e,PayloadCollectionIcon as Be,LogsIcon as Re,MetricsIcon as Le,TracesIcon as Me,VmLogo as Pe,ISquareIcon as je,ExclamationCircleIcon as Ue,ExclamationTriangleIcon as We,VSquareIcon as Ve,XSquareIcon as He,QuestionCircleIcon as qe,VIcon as Ge,CopyIcon as Ke,XIcon as Ye,MinusIcon as Je,ListIcon as Xe,CodeIcon as Ze,ExtendArrowIcon as Qe,PlusIcon as et,EditIcon as tt,NoDataIcon as ot,EyeClosedIcon as nt,EyeOpenIcon as it,SearchIcon as at,TrashIcon as rt,EditedIcon as st,SortArrowsIcon as lt,NotebookIcon as ct,ArrowIcon as dt,ChevronUpIcon as pt,ChevronDownIcon as ut,DotsVerticalIcon as ht,YamlIcon as mt,DotIcon as gt,FilterIcon as $t}from"../icons.js";import{create as xt}from"zustand";import ft,{Fragment as bt,useMemo as yt,useState as wt,useEffect as kt,useRef as vt,createContext as Ct,useContext as Et,useCallback as St,forwardRef as At,memo as Dt}from"react";import Tt from"javascript-time-ago";import{p as zt,c as Ft,s as Ot,u as It,e as Nt}from"./vendor-0965fadc.js";import _t,{css as Bt,useTheme as Rt,ThemeProvider as Lt,keyframes as Mt}from"styled-components";import{Handle as Pt,Position as jt,ReactFlow as Ut,Controls as Wt}from"@xyflow/react";import Vt,{createPortal as Ht}from"react-dom";import{ErrorBoundary as qt}from"react-error-boundary";import Gt from"lottie-react";import{Highlight as Kt,themes as Yt}from"prism-react-renderer";const Jt=e=>e.charAt(0).toUpperCase()+e.slice(1),Xt=e=>{const t=e=>e.filter(e=>"object"==typeof e&&null!==e?""!==e.key&&""!==e.value:""!==e),o=e=>Object.fromEntries(Object.entries(e).filter(([e,t])=>""!==e&&""!==t).map(([e,n])=>Array.isArray(n)?[e,t(n)]:"object"==typeof n&&null!==n?[e,o(n)]:[e,n]));return Object.entries(e).reduce((e,[n,i])=>{try{const a=JSON.parse(i);Array.isArray(a)?e[n]=JSON.stringify(t(a)):e[n]="object"==typeof a&&null!==a?JSON.stringify(o(a)):i}catch(a){"object"==typeof i&&null!==i?Array.isArray(i)?e[n]=JSON.stringify(t(i)):e[n]=JSON.stringify(o(i)):e[n]=i}return e},{})};var Zt;!function(e){e.SIGNALS="SIGNALS"}(Zt||(Zt={}));const Qt=(e,t,o)=>{if(!e||!e.length)return!0;if(1===e.length)return"true"==e[0];const[n,i,a]=e;if(n===Zt.SIGNALS)switch(i){case"INCLUDES":return t?.includes(a);case"EXCLUDES":return!t?.includes(a);default:return!0}const r=o.find(e=>e.name===n);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}},eo=e=>JSON.parse(JSON.stringify(e)),to=(e,t)=>{let o=[...e];return t.monitors?.length&&(o=o.filter(e=>!!t.monitors?.find(t=>e.signals?.find(e=>e.toLowerCase()===t.id)))),o},oo=(e,t)=>{let o=[...e];return t.monitors?.length&&(o=o.filter(e=>!!t.monitors?.find(t=>e.exportedSignals[t.id]))),o},no=(e,t)=>t?e.filter(e=>e.dataStreamNames.includes(t)||!e.dataStreamNames.length):[];var io,ao,ro,so,lo,co,po,uo,ho,mo,go,$o,xo,fo,bo,yo,wo,ko,vo,Co,Eo,So,Ao,Do,To,zo,Fo,Oo,Io,No,_o,Bo,Ro,Lo,Mo,Po,jo,Uo,Wo,Vo;!function(e){e.Attributes="attributes",e.Samplers="samplers"}(io||(io={})),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"}(ao||(ao={})),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"}(ro||(ro={})),function(e){e.Pod="pod",e.Namespace="namespace",e.Node="node"}(so||(so={})),function(e){e.EXISTS="exists",e.EQUALS="equals",e.NOT_EQUALS="not_equals",e.CONTAINS="contains",e.NOT_CONTAINS="not_contains",e.REGEX="regex"}(lo||(lo={})),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"}(co||(co={})),function(e){e.EXISTS="exists",e.EQUALS="equals"}(po||(po={})),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"}(uo||(uo={})),function(e){e.Horizontal="horizontal",e.Vertical="vertical"}(ho||(ho={})),function(e){e.Ascending="ascending",e.Descending="descending"}(mo||(mo={})),function(e){e.Community="community",e.Cloud="cloud",e.Onprem="onprem"}(go||(go={})),function(e){e.K8s="k8s",e.Vm="vm"}($o||($o={})),function(e){e.Cli="odigos-cli",e.Helm="helm",e.Operator="odigos-operator"}(xo||(xo={})),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"}(fo||(fo={})),function(e){e.Create="Create",e.Read="Read",e.Update="Update",e.Delete="Delete"}(bo||(bo={})),function(e){e.Namespace="Namespace",e.Source="Source",e.Destination="Destination",e.Action="Action",e.InstrumentationRule="InstrumentationRule"}(yo||(yo={})),function(e){e.DataStream="DataStream"}(wo||(wo={})),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"}(ko||(ko={})),function(e){e.Text="text",e.Password="password",e.Number="number"}(vo||(vo={})),function(e){e.Warning="warning",e.Error="error",e.Success="success",e.Info="info",e.Default="default"}(Co||(Co={})),function(e){e.INSTRUMENTED="Instrumented",e.INSTRUMENTING="Instrumenting",e.UNINSTRUMENTED="Uninstrumented",e.NOT_INSTRUMENTED="Not Instrumented"}(Eo||(Eo={})),function(e){e.Loading="loading",e.Disabled="disabled"}(So||(So={})),function(e){e.Disabled="disabled",e.Unknown="unknown"}(Ao||(Ao={})),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"}(Do||(Do={})),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",e.OdiLogo="odilogo"}(To||(To={})),function(e){e.Labeled="labeled"}(zo||(zo={})),function(e){e.AddRule="addRule",e.AddSource="addSource",e.AddAction="addAction",e.AddDestination="addDestination"}(Fo||(Fo={})),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.Signalfx="signalfx",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"}(Oo||(Oo={})),function(e){e.Deployment="Deployment",e.DaemonSet="DaemonSet",e.StatefulSet="StatefulSet",e.CronJob="CronJob",e.ConfigMap="ConfigMap",e.Pod="Pod",e.DeploymentConfig="DeploymentConfig"}(Io||(Io={})),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"}(No||(No={})),function(e){e.CodeAttributes="CodeAttributes",e.HeadersCollection="HeadersCollection",e.PayloadCollection="PayloadCollection",e.CustomInstrumentation="CustomInstrumentation",e.UnknownType="UnknownType"}(_o||(_o={})),function(e){e.Column="column",e.FilePath="filePath",e.Function="function",e.LineNumber="lineNumber",e.Namespace="namespace",e.StackTrace="stacktrace"}(Bo||(Bo={})),function(e){e.HeaderKeys="headerKeys"}(Ro||(Ro={})),function(e){e.Java="java",e.Golang="golang"}(Lo||(Lo={}));class Ho{className;methodName;constructor(e,t){this.className=e,this.methodName=t}Verify(){return!!this.className&&!!this.methodName}toString(){return this.Verify()?`${this.className}.${this.methodName}`:"[Faulty Java Probe]"}}class qo{packageName;functionName;receiverName;receiverMethodName;constructor(e,t,o,n){this.packageName=e,this.functionName=t||"",this.receiverName=o||"",this.receiverMethodName=n||""}Verify(){return!(!this.packageName||(this.functionName?this.receiverMethodName||this.receiverName:!this.receiverMethodName||!this.receiverName))}toString(){return this.Verify()?this.functionName?`${this.packageName}.${this.functionName}`:this.receiverName&&this.receiverMethodName?`${this.packageName}.(${this.receiverName}).${this.receiverMethodName}`:"":"[Faulty Golang Probe]"}}!function(e){e.HttpRequest="httpRequest",e.HttpResponse="httpResponse",e.DbQuery="dbQuery",e.Messaging="messaging"}(Mo||(Mo={})),function(e){e.Healthy="Healthy",e.Updating="Updating",e.Degraded="Degraded",e.Failed="Failed",e.Down="Down",e.Unknown="Unknown"}(Po||(Po={})),function(e){e.Pending="Pending",e.Running="Running",e.Succeeded="Succeeded",e.Failed="Failed",e.Unknown="Unknown"}(jo||(jo={})),function(e){e.ContainerCreating="ContainerCreating",e.CrashLoopBackOff="CrashLoopBackOff",e.CreateContainerError="CreateContainerError",e.CreateContainerConfigError="CreateContainerConfigError",e.ErrImagePull="ErrImagePull",e.ErrImageNeverPull="ErrImageNeverPull",e.ImagePullBackOff="ImagePullBackOff",e.InvalidImageName="InvalidImageName",e.RegistryUnavailable="RegistryUnavailable",e.NetworkNotReady="NetworkNotReady",e.Running="Running",e.Completed="Completed",e.Error="Error",e.OOMKilled="OOMKilled",e.ContainerCannotRun="ContainerCannotRun",e.DeadlineExceeded="DeadlineExceeded",e.StartError="StartError"}(Uo||(Uo={})),function(e){e.Running="Running",e.Waiting="Waiting",e.Terminated="Terminated"}(Wo||(Wo={})),function(e){e.Logs="logs",e.Metrics="metrics",e.Traces="traces"}(Vo||(Vo={}));const Go=(e,t)=>{let o=[...e];return t.namespaces?.length&&(o=o.filter(({namespace:e})=>!!t.namespaces?.find(({id:t})=>t===e))),t.kinds?.length&&(o=o.filter(({kind:e})=>!!t.kinds?.find(({id:t})=>t===e))),t.languages?.length&&(o=o.filter(({containers:e})=>!!t.languages?.find(({id:t})=>!!e?.find(({language:e})=>t===e)))),t.conditions?.length&&(o=o.filter(({conditions:e})=>!!t.conditions?.find(({id:t})=>!!e?.find(({type:e,reason:o})=>t===`${e}#${o}`)))),t.podsAgentInjectionStatus?.length&&(o=o.filter(({podsAgentInjectionStatus:e})=>!!t.podsAgentInjectionStatus?.find(({id:t})=>t===e?.message))),t.onlyErrors&&(o=o.filter(e=>!!e.conditions?.find(e=>e.status===Co.Error))),t.errors?.length&&(o=o.filter(e=>!!t.errors?.find(t=>!!e.conditions?.find(e=>e.message===t.id)))),o},Ko="default",Yo={SELECTED_DATA_STREAM:"SELECTED_DATA_STREAM",SELECTED_DATA_STREAM_WITH_PROXY:e=>`SELECTED_DATA_STREAM_${e}`,OVERVIEW_FILTERS:"OVERVIEW_FILTERS",DARK_MODE:"DARK_MODE"},Jo={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)'},Xo={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.",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.",DETECTED_PROCESSES:"Detected Processes",DETECTED_PROCESSES_DESCRIPTION:"The system automatically instruments the processes 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:"Instrument entire namespace",FUTURE_APPS_DESCRIPTION:"When enabled, all applications in the namespace and new applications will be instrumented automatically and included in the current data stream using a Namespace Source.",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"},Zo={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"},Qo=(e,t)=>t?e.filter(e=>e.dataStreamNames.includes(t)||t===Ko&&!e.dataStreamNames.length):[],en=(e,t="",o={})=>{for(const n in e)if(e.hasOwnProperty(n)){const i=e[n],a=t?`${t}.${n}`:n;null===i||"object"!=typeof i||Array.isArray(i)?Array.isArray(i)?i.forEach((e,t)=>{const n=`${a}[${t}]`;null!==e&&"object"==typeof e?en(e,n,o):o[n]=e}):o[a]=i:en(i,a,o)}return o},tn=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]}`},on=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`}},nn=()=>{const e=crypto.getRandomValues(new Uint8Array(16));let t=0;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,o=>{const n=e[t%16];return t++,("1"===o?n:"0"===o?63&n|128:15&n|64).toString(16)})},an=s=>{const l=s?.toLowerCase(),c=l?.includes(io.Samplers),d=l===io.Attributes;return c?e:d?t:{[ao.K8sAttributes]:n,[ao.AddClusterInfo]:i,[ao.DeleteAttributes]:a,[ao.PiiMasking]:t,[ao.RenameAttributes]:r,[ao.ErrorSampler]:e,[ao.ProbabilisticSampler]:e,[ao.LatencySampler]:e,[ao.ServiceNameSampler]:e,[ao.SpanAttributeSampler]:e}[s]||o},rn=e=>{const t=e?.filter(({status:e})=>e===Co.Error),o=e?.filter(({status:e})=>e===Co.Warning),n=e?.filter(({status:e})=>e===So.Disabled),i=e?.filter(({status:e})=>e===So.Loading),a=t.length>0,r=o.length>0,s=n.length>0;return{errors:t,hasErrors:a,warnings:o,hasWarnings:r,disableds:n,hasDisableds:s,loadings:i,hasLoadings:i.length>0,priorotizedStatus:a?Co.Error:r?Co.Warning:s?Co.Info:void 0}},sn=e=>{const t=e?.reduce((e,t)=>t.instrumented?e+1:e,0);return`${t}/${e?.length||0} instrumented`},ln=e=>({[fo.Java]:s,[fo.Go]:l,[fo.JavaScript]:c,[fo.Python]:d,[fo.DotNet]:p,[fo.CSharp]:u,[fo.CPlusPlus]:h,[fo.Php]:m,[fo.Ruby]:g,[fo.Rust]:$,[fo.Swift]:x,[fo.Elixir]:f,[fo.MySql]:b,[fo.Nginx]:y,[fo.Postgres]:w,[fo.Redis]:k,[fo.Kafka]:v,[fo.Ignored]:o,[fo.Unknown]:o,[fo.Processing]:o,[fo.NoContainers]:o,[fo.NoRunningPods]:o}[e]||o),cn=e=>e?.map(({language:e})=>ln(e))||[],dn=(e,t)=>{const o={[Oo.Alauda]:C,[Oo.AlibabaCloud]:E,[Oo.AppDynamics]:S,[Oo.Axiom]:A,[Oo.AzureBlob]:D,[Oo.AzureMonitor]:T,[Oo.BetterStack]:z,[Oo.Bonree]:F,[Oo.Causely]:O,[Oo.Checkly]:I,[Oo.Chronosphere]:N,[Oo.ClickHouse]:_,[Oo.CloudWatch]:B,[Oo.Coralogix]:R,[Oo.Dash0]:L,[Oo.Datadog]:M,[Oo.Dynamic]:P,[Oo.Dynatrace]:j,[Oo.ElasticApm]:U,[Oo.ElasticSearch]:W,[Oo.GoogleCloud]:V,[Oo.GoogleCloudOTLP]:V,[Oo.GrafanaCloudLoki]:H,[Oo.GrafanaCloudPrometheus]:H,[Oo.GrafanaCloudTempo]:H,[Oo.Greptime]:q,[Oo.Groundcover]:G,[Oo.Honeycomb]:K,[Oo.HyperDX]:Y,[Oo.Instana]:J,[Oo.Jaeger]:X,[Oo.Kafka]:v,[Oo.Kloudmate]:Z,[Oo.Last9]:Q,[Oo.Lightstep]:ee,[Oo.LogzIo]:te,[Oo.Loki]:oe,[Oo.Lumigo]:ne,[Oo.Middleware]:ie,[Oo.NewRelic]:ae,[Oo.Observe]:re,[Oo.Odigos]:se,[Oo.OneUptime]:le,[Oo.OpenObserve]:ce,[Oo.Opsverse]:de,[Oo.Oracle]:pe,[Oo.OTLP]:P,[Oo.OTLPHttp]:P,[Oo.Prometheus]:ue,[Oo.Qryn]:he,[Oo.QrynOss]:me,[Oo.Quickwit]:ge,[Oo.S3]:$e,[Oo.Seq]:xe,[Oo.Signalfx]:fe,[Oo.Signoz]:be,[Oo.Splunk]:fe,[Oo.SplunkSapm]:fe,[Oo.SplunkOtlp]:fe,[Oo.SumoLogic]:ye,[Oo.TelemetryHub]:we,[Oo.Tempo]:ke,[Oo.Tingyun]:ve,[Oo.Traceloop]:Ce,[Oo.Uptrace]:Ee,[Oo.VictoriaMetrics]:Se,[Oo.VictoriaMetricsCloud]:Se,[Oo.XRay]:Ae}[e];return o&&!t?{icon:o}:{iconSrc:`https://d15jtxgb40qetw.cloudfront.net/${e}.svg`}},pn=e=>({[yo.Namespace]:De,[yo.Source]:Te,[yo.Destination]:ze,[yo.Action]:Fe,[yo.InstrumentationRule]:Oe}[e]),un=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,hn=(e,t,o)=>{const{extended:n,prioritizeDisplayName:i}=o||{};let a="",r="";switch(t){case yo.InstrumentationRule:const t=e;a=t.type,r=t.ruleName;break;case yo.Source:const o=e;a=o.name,r=o.otelServiceName;break;case yo.Action:const n=e;a=n.type,r=n.name;break;case yo.Destination:const i=e;a=i.destinationType.displayName,r=i.name;break;case yo.Namespace:const s=e;a=s.name,r=s.name}return n?a+(r&&r!==a?` (${r})`:""):i&&r||a},mn=(e,t)=>{if(t===yo.Source){const t={namespace:"",name:"",kind:""};return e.split("&").forEach(e=>{const[o,n]=e.split("=");t[o]=n}),t}return e},gn=e=>({[_o.CodeAttributes]:Ie,[_o.CustomInstrumentation]:Ne,[_o.HeadersCollection]:_e,[_o.PayloadCollection]:Be,[_o.UnknownType]:o}[e]||o),$n=e=>{const{numberOfInstances:t,containers:o}=e;if(!o)return t&&t>0?fo.Processing:fo.NoRunningPods;const n=o?.filter(e=>e.language!==fo.Ignored);if(!n.length)return fo.NoContainers;const i=n.find(e=>e.language!==fo.Unknown);return i?i.language:fo.Unknown},xn=(e,t,o)=>(t===yo.Source?e?.sources.find(e=>e.kind===o.kind&&e.name===o.name&&e.namespace===o.namespace):e?.destinations.find(e=>e.id===o))||{throughput:0},fn=e=>({[Vo.Logs]:Re,[Vo.Metrics]:Le,[Vo.Traces]:Me}[e]),bn=e=>e?{[$o.K8s]:n,[$o.Vm]:Pe}[e]:se,yn=e=>e?{[$o.K8s]:"Kubernetes Cluster",[$o.Vm]:"Virtual Machine"}[e]:"Unknown",wn=(e,t,o)=>{const n=e[t];return n?n.flatMap(e=>{const n=e[o],i=[];return void 0!==n&&(Array.isArray(n)?i.push(...n):i.push(n)),i.push(...wn(e,t,o)),i}):[]},kn=(e,t)=>{if(t===yo.Source){let t="";return Object.entries(e).forEach(([e,o])=>{t+=`${e}=${o}&`}),t.slice(0,-1),t}return e},vn=(e,t,o)=>{switch(t){case Co.Default:return e.v2.colors.purple[o];case Co.Info:return e.v2.colors.blue[o];case Co.Error:return e.v2.colors.red[o];case Co.Warning:return e.v2.colors.yellow[o];case Co.Success:return e.v2.colors.green[o];case Ao.Disabled:case Ao.Unknown:return e.v2.colors.silver[o];default:return e.v2.colors.white[500]}},Cn=e=>{switch(e){case Po.Updating:case jo.Pending:case Uo.ContainerCreating:case Wo.Waiting:return Co.Info;case Po.Healthy:case jo.Succeeded:case jo.Running:case Uo.Running:case Wo.Running:return Co.Success;case Po.Degraded:return Co.Warning;case Po.Failed:case jo.Failed:case Uo.Error:case Uo.CrashLoopBackOff:case Uo.CreateContainerError:case Uo.CreateContainerConfigError:case Uo.ErrImagePull:case Uo.ErrImageNeverPull:case Uo.ImagePullBackOff:case Uo.InvalidImageName:case Uo.RegistryUnavailable:case Uo.NetworkNotReady:case Uo.OOMKilled:case Uo.ContainerCannotRun:case Wo.Terminated:case Uo.DeadlineExceeded:case Uo.StartError:return Co.Error;case Po.Down:case Uo.Completed:return Ao.Disabled;case Po.Unknown:case jo.Unknown:default:return Ao.Unknown}},En=(e,t)=>({[Co.Default]:o=>se({fill:vn(t,e,"300"),...o}),[Co.Info]:o=>je({fill:vn(t,e,"400"),...o}),[Co.Error]:o=>Ue({fill:vn(t,e,"500"),...o}),[Co.Warning]:o=>We({fill:vn(t,e,"500"),...o}),[Co.Success]:o=>Ve({fill:vn(t,e,"500"),...o}),[Ao.Disabled]:o=>He({fill:vn(t,e,"400"),...o}),[Ao.Unknown]:o=>qe({fill:vn(t,e,"300"),...o})}[e]),Sn=e=>{switch(e){case No.Success:return Co.Success;case No.Error:case No.Failure:return Co.Error;case No.Notice:return Co.Warning;case No.Unsupported:case No.Unknown:return Co.Info;case No.Irrelevant:case No.Disabled:return So.Disabled;case No.Waiting:return So.Loading;case No.Pending:default:return Co.Default}},An=(e,t)=>{const o=t.find(([t,o])=>e>=t&&(null===o||e<=o));return o?.[2]||null},Dn=({namespace:e,name:t,kind:o})=>({namespace:e,name:t,kind:o});function Tn(e,t){if(!e)return t;if("object"==typeof e)return e;try{return JSON.parse(e)}catch(e){return t}}const zn=(e,t)=>{const o=[],n=JSON.parse(JSON.stringify(e));for(const e of n){const n=Tn(t.fields,{}),i=e.items.findIndex(e=>e.type===t.destinationType.type);-1!==i&&o.push(...e.items[i].fields.map(e=>({...e,initialValue:n[e.name]})))}return o},Fn=(e,t)=>{const o=e=>e?.some(({healthy:e})=>e.status!==Co.Success);return e?.length?e.some(({instrumentationInstances:e})=>o(e)):o(t)??!1},On=e=>Array.isArray(e)?!e?.length:"object"==typeof e?!Object.keys(e||{}).length:[void 0,null,""].includes(e),In=e=>!!e&&(!(e.length>63)&&/^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$/.test(e)),Nn=(e,t=0)=>{const o=(new Date).getTime();return new Date(e).getTime()-o<=t},_n=e=>{const t=String(e).trim().toLowerCase();return["true","false","1","0"].includes(t)},Bn=(e,t=0)=>(new Date).getTime()-new Date(e).getTime()>=t,Rn=/^(\d+\.)?(\d+\.)?(\*|\d+)$/,Ln=e=>Rn.test(e),Mn=e=>e?e.replace(/([a-z0-9])([A-Z])/g,"$1 $2"):"",Pn=e=>e?.map(({status:e,type:t,reason:o,message:n,lastTransitionTime:i})=>({status:e,type:Mn(t),reason:o?Mn(o):"",message:n,lastTransitionTime:i}))||[],jn=(e,t)=>{const o=Tn(e.fields,{});return t.length?t.map(e=>({key:e.name,name:e.displayName||e.name,value:o[e.name]??null})).filter(e=>null!==e.value):Object.entries(o).map(([e,t])=>({key:e,name:e,value:t}))},Un=e=>e?Object.keys(e).filter(t=>e[t]):[],Wn=e=>e.replace(/[^\d]/g,""),Vn=e=>{const t=String(e).trim().toLowerCase();return"true"===t||"1"===t},Hn=e=>{let t="";try{const o=JSON.parse(e);t=Array.isArray(o)?o.map(e=>"object"==typeof e&&null!==e?`${e.key}: ${e.value}`:e).join(", "):"object"==typeof o&&null!==o?Object.entries(o).map(([e,t])=>`${e}: ${t}`).join(", "):e}catch(o){t=e}return t},qn=e=>{if("object"!=typeof e)return e;const t=Array.isArray(e)?[]:{};return Object.keys(e).forEach(o=>{const n=e[o];if(Array.isArray(n)){const e=n.filter(e=>null!=e&&""!==e);e.length>0&&(t[o]=e.map(e=>qn(e)))}else if("object"==typeof n&&null!==n){const e=qn(n);Object.keys(e).length>0&&(t[o]=e)}else[void 0,null,""].includes(n)||(t[o]=n)}),t},Gn=(e,t=2)=>JSON.stringify(e||{},null,t),Kn=async(e=1e3)=>new Promise(t=>setTimeout(t,e)),Yn=e=>Object.entries(e).reduce((e,[t,o])=>(e[t]="string"==typeof o?o:JSON.stringify(o),e),{}),Jn=e=>{let t=e.toString().replace("v","").split("-")[0];t=t.match(/[\d.]+/)?.[0]||"";const o=t.split(".");return o.length>2&&(t=o.slice(0,2).join(".")),Number(t)};var Xn,Zn;!function(e){e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.P="p",e.Span="span"}(Xn||(Xn={})),function(e){e.XXXS="xxxs",e.XXS="xxs",e.XS="xs",e.S="s",e.M="m",e.L="l",e.XL="xl",e.XXL="xxl",e.XXXL="xxxl"}(Zn||(Zn={}));const Qn=_t.p`
1
+ import{SamplerIcon as e,PiiMaskingIcon as t,ImageErrorIcon as o,K8sLogo as n,AddClusterInfoIcon as i,DeleteAttributeIcon as a,RenameAttributeIcon as r,JavaLogo as s,GoLogo as l,NodejsLogo as c,PythonLogo as d,DotnetLogo as p,CSharpLogo as u,CPlusPlusLogo as h,PhpLogo as m,RubyLogo as g,RustLogo as $,SwiftLogo as x,ElixirLogo as f,MysqlLogo as b,NginxLogo as y,PostgresLogo as w,RedisLogo as k,KafkaLogo as v,AlaudaLogo as C,AlibabaCloudLogo as E,AppDynamicsLogo as S,AxiomLogo as A,AzureBlobLogo as D,AzureMonitorLogo as T,BetterStackLogo as z,BonreeLogo as F,CauselyLogo as O,ChecklyLogo as I,ChronosphereLogo as N,ClickhouseLogo as _,AwsCloudwatchLogo as B,CoralogixLogo as R,Dash0Logo as L,DatadogLogo as M,OpenTelemetryLogo as P,DynatraceLogo as j,ElasticApmLogo as U,ElasticSearchLogo as W,GoogleCloudPlatformLogo as V,GrafanaLogo as H,GreptimeLogo as q,GroundcoverLogo as G,HoneycombLogo as K,HyperDxLogo as Y,InstanaLogo as J,JaegerLogo as X,KloudmateLogo as Z,Last9Logo as Q,LightstepLogo as ee,LogzioLogo as te,LokiLogo as oe,LumigoLogo as ne,MiddlewareLogo as ie,NewRelicLogo as ae,ObserveLogo as re,OdigosLogo as se,OneUptimeLogo as le,OpenObserveLogo as ce,OpsVerseLogo as de,OracleLogo as pe,PrometheusLogo as ue,QrynLogo as he,GigapipeLogo as me,QuickwitLogo as ge,AwsS3Logo as $e,SeqLogo as xe,SplunkLogo as fe,SignozLogo as be,SumoLogicLogo as ye,TelemetryHubLogo as we,TempoLogo as ke,TingyunLogo as ve,TraceloopLogo as Ce,UptraceLogo as Ee,VictoriaMetricsLogo as Se,AwsXrayLogo as Ae,NamespacesIcon as De,SourceIcon as Te,DestinationIcon as ze,ActionIcon as Fe,InstrumentationRuleIcon as Oe,CodeAttributesIcon as Ie,CustomInstrumentationIcon as Ne,HeadersCollectionIcon as _e,PayloadCollectionIcon as Be,LogsIcon as Re,MetricsIcon as Le,TracesIcon as Me,VmLogo as Pe,ISquareIcon as je,ExclamationCircleIcon as Ue,ExclamationTriangleIcon as We,VSquareIcon as Ve,XSquareIcon as He,QuestionCircleIcon as qe,VIcon as Ge,CopyIcon as Ke,XIcon as Ye,MinusIcon as Je,ListIcon as Xe,CodeIcon as Ze,ExtendArrowIcon as Qe,PlusIcon as et,EditIcon as tt,NoDataIcon as ot,EyeClosedIcon as nt,EyeOpenIcon as it,SearchIcon as at,TrashIcon as rt,EditedIcon as st,SortArrowsIcon as lt,NotebookIcon as ct,ArrowIcon as dt,ChevronUpIcon as pt,ChevronDownIcon as ut,DotsVerticalIcon as ht,YamlIcon as mt,DotIcon as gt,FilterIcon as $t}from"../icons.js";import{create as xt}from"zustand";import ft,{Fragment as bt,useMemo as yt,useState as wt,useEffect as kt,useRef as vt,createContext as Ct,useContext as Et,useCallback as St,forwardRef as At,memo as Dt}from"react";import Tt from"javascript-time-ago";import{p as zt,c as Ft,s as Ot,u as It,e as Nt}from"./vendor-0965fadc.js";import _t,{css as Bt,useTheme as Rt,ThemeProvider as Lt,keyframes as Mt}from"styled-components";import{Handle as Pt,Position as jt,ReactFlow as Ut,Controls as Wt}from"@xyflow/react";import Vt,{createPortal as Ht}from"react-dom";import{ErrorBoundary as qt}from"react-error-boundary";import Gt from"lottie-react";import{Highlight as Kt,themes as Yt}from"prism-react-renderer";const Jt=e=>e.charAt(0).toUpperCase()+e.slice(1),Xt=e=>{const t=e=>e.filter(e=>"object"==typeof e&&null!==e?""!==e.key&&""!==e.value:""!==e),o=e=>Object.fromEntries(Object.entries(e).filter(([e,t])=>""!==e&&""!==t).map(([e,n])=>Array.isArray(n)?[e,t(n)]:"object"==typeof n&&null!==n?[e,o(n)]:[e,n]));return Object.entries(e).reduce((e,[n,i])=>{try{const a=JSON.parse(i);Array.isArray(a)?e[n]=JSON.stringify(t(a)):e[n]="object"==typeof a&&null!==a?JSON.stringify(o(a)):i}catch(a){"object"==typeof i&&null!==i?Array.isArray(i)?e[n]=JSON.stringify(t(i)):e[n]=JSON.stringify(o(i)):e[n]=i}return e},{})};var Zt;!function(e){e.SIGNALS="SIGNALS"}(Zt||(Zt={}));const Qt=(e,t,o)=>{if(!e||!e.length)return!0;if(1===e.length)return"true"==e[0];const[n,i,a]=e;if(n===Zt.SIGNALS)switch(i){case"INCLUDES":return t?.includes(a);case"EXCLUDES":return!t?.includes(a);default:return!0}const r=o.find(e=>e.name===n);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}},eo=e=>JSON.parse(JSON.stringify(e)),to=(e,t)=>{let o=[...e];return t.monitors?.length&&(o=o.filter(e=>!!t.monitors?.find(t=>e.signals?.find(e=>e.toLowerCase()===t.id)))),o},oo=(e,t)=>{let o=[...e];return t.monitors?.length&&(o=o.filter(e=>!!t.monitors?.find(t=>e.exportedSignals[t.id]))),o},no=(e,t)=>t?e.filter(e=>e.dataStreamNames.includes(t)||!e.dataStreamNames.length):[];var io,ao,ro,so,lo,co,po,uo,ho,mo,go,$o,xo,fo,bo,yo,wo,ko,vo,Co,Eo,So,Ao,Do,To,zo,Fo,Oo,Io,No,_o,Bo,Ro,Lo,Mo,Po,jo,Uo,Wo,Vo;!function(e){e.Attributes="attributes",e.Samplers="samplers"}(io||(io={})),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"}(ao||(ao={})),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"}(ro||(ro={})),function(e){e.Pod="pod",e.Namespace="namespace",e.Node="node"}(so||(so={})),function(e){e.EXISTS="exists",e.EQUALS="equals",e.NOT_EQUALS="not_equals",e.CONTAINS="contains",e.NOT_CONTAINS="not_contains",e.REGEX="regex"}(lo||(lo={})),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"}(co||(co={})),function(e){e.EXISTS="exists",e.EQUALS="equals"}(po||(po={})),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"}(uo||(uo={})),function(e){e.Horizontal="horizontal",e.Vertical="vertical"}(ho||(ho={})),function(e){e.Ascending="ascending",e.Descending="descending"}(mo||(mo={})),function(e){e.Community="community",e.Cloud="cloud",e.Onprem="onprem"}(go||(go={})),function(e){e.K8s="k8s",e.Vm="vm"}($o||($o={})),function(e){e.Cli="odigos-cli",e.Helm="helm",e.Operator="odigos-operator"}(xo||(xo={})),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"}(fo||(fo={})),function(e){e.Create="Create",e.Read="Read",e.Update="Update",e.Delete="Delete"}(bo||(bo={})),function(e){e.Namespace="Namespace",e.Source="Source",e.Destination="Destination",e.Action="Action",e.InstrumentationRule="InstrumentationRule"}(yo||(yo={})),function(e){e.DataStream="DataStream"}(wo||(wo={})),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"}(ko||(ko={})),function(e){e.Text="text",e.Password="password",e.Number="number"}(vo||(vo={})),function(e){e.Warning="warning",e.Error="error",e.Success="success",e.Info="info",e.Default="default"}(Co||(Co={})),function(e){e.INSTRUMENTED="Instrumented",e.INSTRUMENTING="Instrumenting",e.UNINSTRUMENTED="Uninstrumented",e.NOT_INSTRUMENTED="Not Instrumented"}(Eo||(Eo={})),function(e){e.Loading="loading",e.Disabled="disabled"}(So||(So={})),function(e){e.Disabled="disabled",e.Unknown="unknown"}(Ao||(Ao={})),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"}(Do||(Do={})),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",e.OdiLogo="odilogo"}(To||(To={})),function(e){e.Labeled="labeled"}(zo||(zo={})),function(e){e.AddRule="addRule",e.AddSource="addSource",e.AddAction="addAction",e.AddDestination="addDestination"}(Fo||(Fo={})),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.Signalfx="signalfx",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"}(Oo||(Oo={})),function(e){e.Deployment="Deployment",e.DaemonSet="DaemonSet",e.StatefulSet="StatefulSet",e.CronJob="CronJob",e.ConfigMap="ConfigMap",e.Pod="Pod",e.DeploymentConfig="DeploymentConfig"}(Io||(Io={})),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"}(No||(No={})),function(e){e.CodeAttributes="CodeAttributes",e.HeadersCollection="HeadersCollection",e.PayloadCollection="PayloadCollection",e.CustomInstrumentation="CustomInstrumentation",e.UnknownType="UnknownType"}(_o||(_o={})),function(e){e.Column="column",e.FilePath="filePath",e.Function="function",e.LineNumber="lineNumber",e.Namespace="namespace",e.StackTrace="stacktrace"}(Bo||(Bo={})),function(e){e.HeaderKeys="headerKeys"}(Ro||(Ro={})),function(e){e.Java="java",e.Golang="golang"}(Lo||(Lo={}));class Ho{className;methodName;constructor(e,t){this.className=e,this.methodName=t}Verify(){return!!this.className&&!!this.methodName}toString(){return this.Verify()?`${this.className}.${this.methodName}`:"[Faulty Java Probe]"}}class qo{packageName;functionName;receiverName;receiverMethodName;constructor(e,t,o,n){this.packageName=e,this.functionName=t||"",this.receiverName=o||"",this.receiverMethodName=n||""}Verify(){return!(!this.packageName||(this.functionName?this.receiverMethodName||this.receiverName:!this.receiverMethodName||!this.receiverName))}toString(){return this.Verify()?this.functionName?`${this.packageName}.${this.functionName}`:this.receiverName&&this.receiverMethodName?`${this.packageName}.(${this.receiverName}).${this.receiverMethodName}`:"":"[Faulty Golang Probe]"}}!function(e){e.HttpRequest="httpRequest",e.HttpResponse="httpResponse",e.DbQuery="dbQuery",e.Messaging="messaging"}(Mo||(Mo={})),function(e){e.Healthy="Healthy",e.Updating="Updating",e.Degraded="Degraded",e.Failed="Failed",e.Down="Down",e.Unknown="Unknown"}(Po||(Po={})),function(e){e.Pending="Pending",e.Running="Running",e.Succeeded="Succeeded",e.Failed="Failed",e.Unknown="Unknown"}(jo||(jo={})),function(e){e.ContainerCreating="ContainerCreating",e.CrashLoopBackOff="CrashLoopBackOff",e.CreateContainerError="CreateContainerError",e.CreateContainerConfigError="CreateContainerConfigError",e.ErrImagePull="ErrImagePull",e.ErrImageNeverPull="ErrImageNeverPull",e.ImagePullBackOff="ImagePullBackOff",e.InvalidImageName="InvalidImageName",e.RegistryUnavailable="RegistryUnavailable",e.NetworkNotReady="NetworkNotReady",e.Running="Running",e.Completed="Completed",e.Error="Error",e.OOMKilled="OOMKilled",e.ContainerCannotRun="ContainerCannotRun",e.DeadlineExceeded="DeadlineExceeded",e.StartError="StartError"}(Uo||(Uo={})),function(e){e.Running="Running",e.Waiting="Waiting",e.Terminated="Terminated"}(Wo||(Wo={})),function(e){e.Logs="logs",e.Metrics="metrics",e.Traces="traces"}(Vo||(Vo={}));const Go=(e,t)=>{let o=[...e];return t.namespaces?.length&&(o=o.filter(({namespace:e})=>!!t.namespaces?.find(({id:t})=>t===e))),t.kinds?.length&&(o=o.filter(({kind:e})=>!!t.kinds?.find(({id:t})=>t===e))),t.languages?.length&&(o=o.filter(({containers:e})=>!!t.languages?.find(({id:t})=>!!e?.find(({language:e})=>t===e)))),t.conditions?.length&&(o=o.filter(({conditions:e})=>!!t.conditions?.find(({id:t})=>!!e?.find(({type:e,reason:o})=>t===`${e}#${o}`)))),t.podsAgentInjectionStatus?.length&&(o=o.filter(({podsAgentInjectionStatus:e})=>!!t.podsAgentInjectionStatus?.find(({id:t})=>t===e?.reasonEnum||t===e?.message))),t.onlyErrors&&(o=o.filter(e=>!!e.conditions?.find(e=>e.status===Co.Error))),t.errors?.length&&(o=o.filter(e=>!!t.errors?.find(t=>!!e.conditions?.find(e=>e.message===t.id)))),o},Ko="default",Yo={SELECTED_DATA_STREAM:"SELECTED_DATA_STREAM",SELECTED_DATA_STREAM_WITH_PROXY:e=>`SELECTED_DATA_STREAM_${e}`,OVERVIEW_FILTERS:"OVERVIEW_FILTERS",DARK_MODE:"DARK_MODE"},Jo={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)'},Xo={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.",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.",DETECTED_PROCESSES:"Detected Processes",DETECTED_PROCESSES_DESCRIPTION:"The system automatically instruments the processes 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:"Instrument entire namespace",FUTURE_APPS_DESCRIPTION:"When enabled, all applications in the namespace and new applications will be instrumented automatically and included in the current data stream using a Namespace Source.",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"},Zo={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"},Qo=(e,t)=>t?e.filter(e=>e.dataStreamNames.includes(t)||t===Ko&&!e.dataStreamNames.length):[],en=(e,t="",o={})=>{for(const n in e)if(e.hasOwnProperty(n)){const i=e[n],a=t?`${t}.${n}`:n;null===i||"object"!=typeof i||Array.isArray(i)?Array.isArray(i)?i.forEach((e,t)=>{const n=`${a}[${t}]`;null!==e&&"object"==typeof e?en(e,n,o):o[n]=e}):o[a]=i:en(i,a,o)}return o},tn=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]}`},on=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`}},nn=()=>{const e=crypto.getRandomValues(new Uint8Array(16));let t=0;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,o=>{const n=e[t%16];return t++,("1"===o?n:"0"===o?63&n|128:15&n|64).toString(16)})},an=s=>{const l=s?.toLowerCase(),c=l?.includes(io.Samplers),d=l===io.Attributes;return c?e:d?t:{[ao.K8sAttributes]:n,[ao.AddClusterInfo]:i,[ao.DeleteAttributes]:a,[ao.PiiMasking]:t,[ao.RenameAttributes]:r,[ao.ErrorSampler]:e,[ao.ProbabilisticSampler]:e,[ao.LatencySampler]:e,[ao.ServiceNameSampler]:e,[ao.SpanAttributeSampler]:e}[s]||o},rn=e=>{const t=e?.filter(({status:e})=>e===Co.Error),o=e?.filter(({status:e})=>e===Co.Warning),n=e?.filter(({status:e})=>e===So.Disabled),i=e?.filter(({status:e})=>e===So.Loading),a=t.length>0,r=o.length>0,s=n.length>0;return{errors:t,hasErrors:a,warnings:o,hasWarnings:r,disableds:n,hasDisableds:s,loadings:i,hasLoadings:i.length>0,priorotizedStatus:a?Co.Error:r?Co.Warning:s?Co.Info:void 0}},sn=e=>{const t=e?.reduce((e,t)=>t.instrumented?e+1:e,0);return`${t}/${e?.length||0} instrumented`},ln=e=>({[fo.Java]:s,[fo.Go]:l,[fo.JavaScript]:c,[fo.Python]:d,[fo.DotNet]:p,[fo.CSharp]:u,[fo.CPlusPlus]:h,[fo.Php]:m,[fo.Ruby]:g,[fo.Rust]:$,[fo.Swift]:x,[fo.Elixir]:f,[fo.MySql]:b,[fo.Nginx]:y,[fo.Postgres]:w,[fo.Redis]:k,[fo.Kafka]:v,[fo.Ignored]:o,[fo.Unknown]:o,[fo.Processing]:o,[fo.NoContainers]:o,[fo.NoRunningPods]:o}[e]||o),cn=e=>e?.map(({language:e})=>ln(e))||[],dn=(e,t)=>{const o={[Oo.Alauda]:C,[Oo.AlibabaCloud]:E,[Oo.AppDynamics]:S,[Oo.Axiom]:A,[Oo.AzureBlob]:D,[Oo.AzureMonitor]:T,[Oo.BetterStack]:z,[Oo.Bonree]:F,[Oo.Causely]:O,[Oo.Checkly]:I,[Oo.Chronosphere]:N,[Oo.ClickHouse]:_,[Oo.CloudWatch]:B,[Oo.Coralogix]:R,[Oo.Dash0]:L,[Oo.Datadog]:M,[Oo.Dynamic]:P,[Oo.Dynatrace]:j,[Oo.ElasticApm]:U,[Oo.ElasticSearch]:W,[Oo.GoogleCloud]:V,[Oo.GoogleCloudOTLP]:V,[Oo.GrafanaCloudLoki]:H,[Oo.GrafanaCloudPrometheus]:H,[Oo.GrafanaCloudTempo]:H,[Oo.Greptime]:q,[Oo.Groundcover]:G,[Oo.Honeycomb]:K,[Oo.HyperDX]:Y,[Oo.Instana]:J,[Oo.Jaeger]:X,[Oo.Kafka]:v,[Oo.Kloudmate]:Z,[Oo.Last9]:Q,[Oo.Lightstep]:ee,[Oo.LogzIo]:te,[Oo.Loki]:oe,[Oo.Lumigo]:ne,[Oo.Middleware]:ie,[Oo.NewRelic]:ae,[Oo.Observe]:re,[Oo.Odigos]:se,[Oo.OneUptime]:le,[Oo.OpenObserve]:ce,[Oo.Opsverse]:de,[Oo.Oracle]:pe,[Oo.OTLP]:P,[Oo.OTLPHttp]:P,[Oo.Prometheus]:ue,[Oo.Qryn]:he,[Oo.QrynOss]:me,[Oo.Quickwit]:ge,[Oo.S3]:$e,[Oo.Seq]:xe,[Oo.Signalfx]:fe,[Oo.Signoz]:be,[Oo.Splunk]:fe,[Oo.SplunkSapm]:fe,[Oo.SplunkOtlp]:fe,[Oo.SumoLogic]:ye,[Oo.TelemetryHub]:we,[Oo.Tempo]:ke,[Oo.Tingyun]:ve,[Oo.Traceloop]:Ce,[Oo.Uptrace]:Ee,[Oo.VictoriaMetrics]:Se,[Oo.VictoriaMetricsCloud]:Se,[Oo.XRay]:Ae}[e];return o&&!t?{icon:o}:{iconSrc:`https://d15jtxgb40qetw.cloudfront.net/${e}.svg`}},pn=e=>({[yo.Namespace]:De,[yo.Source]:Te,[yo.Destination]:ze,[yo.Action]:Fe,[yo.InstrumentationRule]:Oe}[e]),un=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,hn=(e,t,o)=>{const{extended:n,prioritizeDisplayName:i}=o||{};let a="",r="";switch(t){case yo.InstrumentationRule:const t=e;a=t.type,r=t.ruleName;break;case yo.Source:const o=e;a=o.name,r=o.otelServiceName;break;case yo.Action:const n=e;a=n.type,r=n.name;break;case yo.Destination:const i=e;a=i.destinationType.displayName,r=i.name;break;case yo.Namespace:const s=e;a=s.name,r=s.name}return n?a+(r&&r!==a?` (${r})`:""):i&&r||a},mn=(e,t)=>{if(t===yo.Source){const t={namespace:"",name:"",kind:""};return e.split("&").forEach(e=>{const[o,n]=e.split("=");t[o]=n}),t}return e},gn=e=>({[_o.CodeAttributes]:Ie,[_o.CustomInstrumentation]:Ne,[_o.HeadersCollection]:_e,[_o.PayloadCollection]:Be,[_o.UnknownType]:o}[e]||o),$n=e=>{const{numberOfInstances:t,containers:o}=e;if(!o)return t&&t>0?fo.Processing:fo.NoRunningPods;const n=o?.filter(e=>e.language!==fo.Ignored);if(!n.length)return fo.NoContainers;const i=n.find(e=>e.language!==fo.Unknown);return i?i.language:fo.Unknown},xn=(e,t,o)=>(t===yo.Source?e?.sources.find(e=>e.kind===o.kind&&e.name===o.name&&e.namespace===o.namespace):e?.destinations.find(e=>e.id===o))||{throughput:0},fn=e=>({[Vo.Logs]:Re,[Vo.Metrics]:Le,[Vo.Traces]:Me}[e]),bn=e=>e?{[$o.K8s]:n,[$o.Vm]:Pe}[e]:se,yn=e=>e?{[$o.K8s]:"Kubernetes Cluster",[$o.Vm]:"Virtual Machine"}[e]:"Unknown",wn=(e,t,o)=>{const n=e[t];return n?n.flatMap(e=>{const n=e[o],i=[];return void 0!==n&&(Array.isArray(n)?i.push(...n):i.push(n)),i.push(...wn(e,t,o)),i}):[]},kn=(e,t)=>{if(t===yo.Source){let t="";return Object.entries(e).forEach(([e,o])=>{t+=`${e}=${o}&`}),t.slice(0,-1),t}return e},vn=(e,t,o)=>{switch(t){case Co.Default:return e.v2.colors.purple[o];case Co.Info:return e.v2.colors.blue[o];case Co.Error:return e.v2.colors.red[o];case Co.Warning:return e.v2.colors.yellow[o];case Co.Success:return e.v2.colors.green[o];case Ao.Disabled:case Ao.Unknown:return e.v2.colors.silver[o];default:return e.v2.colors.white[500]}},Cn=e=>{switch(e){case Po.Updating:case jo.Pending:case Uo.ContainerCreating:case Wo.Waiting:return Co.Info;case Po.Healthy:case jo.Succeeded:case jo.Running:case Uo.Running:case Wo.Running:return Co.Success;case Po.Degraded:return Co.Warning;case Po.Failed:case jo.Failed:case Uo.Error:case Uo.CrashLoopBackOff:case Uo.CreateContainerError:case Uo.CreateContainerConfigError:case Uo.ErrImagePull:case Uo.ErrImageNeverPull:case Uo.ImagePullBackOff:case Uo.InvalidImageName:case Uo.RegistryUnavailable:case Uo.NetworkNotReady:case Uo.OOMKilled:case Uo.ContainerCannotRun:case Wo.Terminated:case Uo.DeadlineExceeded:case Uo.StartError:return Co.Error;case Po.Down:case Uo.Completed:return Ao.Disabled;case Po.Unknown:case jo.Unknown:default:return Ao.Unknown}},En=(e,t)=>({[Co.Default]:o=>se({fill:vn(t,e,"300"),...o}),[Co.Info]:o=>je({fill:vn(t,e,"400"),...o}),[Co.Error]:o=>Ue({fill:vn(t,e,"500"),...o}),[Co.Warning]:o=>We({fill:vn(t,e,"500"),...o}),[Co.Success]:o=>Ve({fill:vn(t,e,"500"),...o}),[Ao.Disabled]:o=>He({fill:vn(t,e,"400"),...o}),[Ao.Unknown]:o=>qe({fill:vn(t,e,"300"),...o})}[e]),Sn=e=>{switch(e){case No.Success:return Co.Success;case No.Error:case No.Failure:return Co.Error;case No.Notice:return Co.Warning;case No.Unsupported:case No.Unknown:return Co.Info;case No.Irrelevant:case No.Disabled:return So.Disabled;case No.Waiting:return So.Loading;case No.Pending:default:return Co.Default}},An=(e,t)=>{const o=t.find(([t,o])=>e>=t&&(null===o||e<=o));return o?.[2]||null},Dn=({namespace:e,name:t,kind:o})=>({namespace:e,name:t,kind:o});function Tn(e,t){if(!e)return t;if("object"==typeof e)return e;try{return JSON.parse(e)}catch(e){return t}}const zn=(e,t)=>{const o=[],n=JSON.parse(JSON.stringify(e));for(const e of n){const n=Tn(t.fields,{}),i=e.items.findIndex(e=>e.type===t.destinationType.type);-1!==i&&o.push(...e.items[i].fields.map(e=>({...e,initialValue:n[e.name]})))}return o},Fn=(e,t)=>{const o=e=>e?.some(({healthy:e})=>e.status!==Co.Success);return e?.length?e.some(({instrumentationInstances:e})=>o(e)):o(t)??!1},On=e=>Array.isArray(e)?!e?.length:"object"==typeof e?!Object.keys(e||{}).length:[void 0,null,""].includes(e),In=e=>!!e&&(!(e.length>63)&&/^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$/.test(e)),Nn=(e,t=0)=>{const o=(new Date).getTime();return new Date(e).getTime()-o<=t},_n=e=>{const t=String(e).trim().toLowerCase();return["true","false","1","0"].includes(t)},Bn=(e,t=0)=>(new Date).getTime()-new Date(e).getTime()>=t,Rn=/^(\d+\.)?(\d+\.)?(\*|\d+)$/,Ln=e=>Rn.test(e),Mn=e=>e?e.replace(/([a-z0-9])([A-Z])/g,"$1 $2"):"",Pn=e=>e?.map(({status:e,type:t,reason:o,message:n,lastTransitionTime:i})=>({status:e,type:Mn(t),reason:o?Mn(o):"",message:n,lastTransitionTime:i}))||[],jn=(e,t)=>{const o=Tn(e.fields,{});return t.length?t.map(e=>({key:e.name,name:e.displayName||e.name,value:o[e.name]??null})).filter(e=>null!==e.value):Object.entries(o).map(([e,t])=>({key:e,name:e,value:t}))},Un=e=>e?Object.keys(e).filter(t=>e[t]):[],Wn=e=>e.replace(/[^\d]/g,""),Vn=e=>{const t=String(e).trim().toLowerCase();return"true"===t||"1"===t},Hn=e=>{let t="";try{const o=JSON.parse(e);t=Array.isArray(o)?o.map(e=>"object"==typeof e&&null!==e?`${e.key}: ${e.value}`:e).join(", "):"object"==typeof o&&null!==o?Object.entries(o).map(([e,t])=>`${e}: ${t}`).join(", "):e}catch(o){t=e}return t},qn=e=>{if("object"!=typeof e)return e;const t=Array.isArray(e)?[]:{};return Object.keys(e).forEach(o=>{const n=e[o];if(Array.isArray(n)){const e=n.filter(e=>null!=e&&""!==e);e.length>0&&(t[o]=e.map(e=>qn(e)))}else if("object"==typeof n&&null!==n){const e=qn(n);Object.keys(e).length>0&&(t[o]=e)}else[void 0,null,""].includes(n)||(t[o]=n)}),t},Gn=(e,t=2)=>JSON.stringify(e||{},null,t),Kn=async(e=1e3)=>new Promise(t=>setTimeout(t,e)),Yn=e=>Object.entries(e).reduce((e,[t,o])=>(e[t]="string"==typeof o?o:JSON.stringify(o),e),{}),Jn=e=>{let t=e.toString().replace("v","").split("-")[0];t=t.match(/[\d.]+/)?.[0]||"";const o=t.split(".");return o.length>2&&(t=o.slice(0,2).join(".")),Number(t)};var Xn,Zn;!function(e){e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.P="p",e.Span="span"}(Xn||(Xn={})),function(e){e.XXXS="xxxs",e.XXS="xxs",e.XS="xs",e.S="s",e.M="m",e.L="l",e.XL="xl",e.XXL="xxl",e.XXXL="xxxl"}(Zn||(Zn={}));const Qn=_t.p`
2
2
  margin: 0;
3
3
  color: ${({$color:e,theme:t})=>e||t.v2.colors.white[500]};
4
4
  font-family: ${({theme:e})=>e.font_family.primary};
@@ -326,7 +326,7 @@ import{SamplerIcon as e,PiiMaskingIcon as t,ImageErrorIcon as o,K8sLogo as n,Add
326
326
  &:hover {
327
327
  background: ${({theme:e})=>e.v2.colors.silver[800]};
328
328
  }
329
- `,Aa=({icon:e,size:t=Ea.S,onClick:o,disabled:n})=>ft.createElement(Sa,{$size:t,$disabled:n,onClick:e=>{o&&!n&&(e.stopPropagation(),o(e))}},ft.createElement(e,{size:t})),Da=({onDone:e}={})=>{const[t,o]=wt(!1),[n,i]=wt(-1),a=St(async(n,a)=>{if(!t){if(o(!0),void 0!==a&&i(a),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)}e?.(),setTimeout(()=>{o(!1),i(-1)},1e3)}},[t,e]);return{CopyButton:St(({value:e,size:o})=>{const n=t?Ge:Ke;return ft.createElement(Aa,{icon:n,size:o,onClick:()=>a(e)})},[t]),isCopied:t,copiedIndex:n,clickCopy:a}},Ta=e=>{const{addNotification:t}=bi(),{formData:o,handleFormChange:n,formErrors:i,handleErrorChange:a,resetFormData:r}=ma(e);return{formData:o,formErrors:i,handleFormChange:n,resetFormData:r,validateForm:e=>{const n={};let i=!0;return o.name?In(o.name)?n.name=void 0:(i=!1,n.name=Jo.ILLEGAL_K8S_LABEL):(i=!1,n.name=Jo.FIELD_IS_REQUIRED),!i&&e?.withAlert&&t({type:Co.Warning,title:e.alertTitle,message:Jo.REQUIRED_FIELDS,hideFromHistory:!0}),a(void 0,void 0,n),i},loadFormWithDrawerItem:({name:t})=>{const o={...eo(e),name:t};n(void 0,void 0,o)}}},za={type:"",name:"",exportedSignals:{logs:!1,metrics:!1,traces:!1},fields:[],disabled:!1},Fa=e=>{const{supportedSignals:t,preLoadedFields:o}=e||{},{addNotification:n}=bi(),{formData:i,formErrors:a,handleFormChange:r,handleErrorChange:s,resetFormData:l}=ma(za),[c,d]=wt([]),[p,u]=wt([]);return kt(()=>{var e;u(c?(e=c,e.filter(e=>!!e).map(e=>{const{name:t,componentType:o,componentProperties:n,displayName:i,initialValue:a,renderCondition:r}=e;if(o===ko.Dropdown){const e=Tn(n,{}),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:o,title:i,value:a,placeholder:e.placeholder||"Select an option",options:s,renderCondition:r,...e}}return{name:t,componentType:o,title:i,value:a,renderCondition:r,...Tn(n,{})}})).map(e=>{if(o){const t="string"==typeof o?Tn(o,{}):o;if(e.name in t)return{...e,value:t[e.name]}}return e}):[])},[c,o]),kt(()=>{if(p){const e=p.map(e=>({key:e.name,value:e.value}));r("fields",e)}},[p]),kt(()=>{if(t&&0===Un(i.exportedSignals).length){const{logs:e,metrics:o,traces:n}=t;r("exportedSignals",{logs:e.supported,metrics:o.supported,traces:n.supported})}},[t,i.exportedSignals]),{formData:i,formErrors:a,handleFormChange:r,resetFormData:l,validateForm:e=>{const t={};let o=!0;return p.forEach(({name:e,value:n,required:i})=>{i&&!n&&(o=!1,t[e]=Jo.FIELD_IS_REQUIRED)}),!o&&e?.withAlert&&n({type:Co.Warning,title:e.alertTitle,message:Jo.REQUIRED_FIELDS,hideFromHistory:!0}),s(void 0,void 0,t),o},loadFormWithDrawerItem:({destinationType:{type:e},name:t,disabled:o,exportedSignals:n,fields:i})=>{const a={...eo(za),type:e,name:t,disabled:o,exportedSignals:n,fields:Object.entries(Tn(i,{})).map(([e,t])=>({key:e,value:t}))};return r(void 0,void 0,a),a},yamlFields:c,setYamlFields:d,dynamicFields:p,setDynamicFields:u}},Oa=({items:e,rowHeight:t})=>{const o=vt(null),n=It({enabled:e.length>0,horizontal:!1,count:e.length,getScrollElement:()=>o.current,estimateSize:()=>t,overscan:Math.ceil(.05*e.length)});return{overflowRef:o,listHeight:n.getTotalSize(),listItems:n.getVirtualItems()}},Ia={ruleName:"",notes:"",disabled:!1,workloads:null,instrumentationLibraries:null,payloadCollection:{[Mo.HttpRequest]:null,[Mo.HttpResponse]:null,[Mo.DbQuery]:null,[Mo.Messaging]:null},codeAttributes:{[Bo.Column]:null,[Bo.FilePath]:null,[Bo.Function]:null,[Bo.LineNumber]:null,[Bo.Namespace]:null,[Bo.StackTrace]:null},headersCollection:null,customInstrumentations:{[Lo.Java]:null,[Lo.Golang]:null}},Na=()=>{const{formData:e,formErrors:t,handleFormChange:o,handleErrorChange:n,resetFormData:i}=ma(Ia);return{formData:e,formErrors:t,handleFormChange:o,resetFormData:i,validateForm:()=>(n(void 0,void 0,{}),!0),loadFormWithDrawerItem:({ruleName:e,notes:t,disabled:n,payloadCollection:i,codeAttributes:a,headersCollection:r,customInstrumentations:s})=>{const l={...eo(Ia),ruleName:e,notes:t,disabled:n};i&&(l.payloadCollection={[Mo.HttpRequest]:i[Mo.HttpRequest]?{}:null,[Mo.HttpResponse]:i[Mo.HttpResponse]?{}:null,[Mo.DbQuery]:i[Mo.DbQuery]?{}:null,[Mo.Messaging]:i[Mo.Messaging]?{}:null}),a&&(l.codeAttributes={[Bo.Column]:a[Bo.Column]||null,[Bo.FilePath]:a[Bo.FilePath]||null,[Bo.Function]:a[Bo.Function]||null,[Bo.LineNumber]:a[Bo.LineNumber]||null,[Bo.Namespace]:a[Bo.Namespace]||null,[Bo.StackTrace]:a[Bo.StackTrace]||null}),r&&(l.headersCollection=r),s&&(l.customInstrumentations={[Lo.Java]:s[Lo.Java]||null,[Lo.Golang]:s[Lo.Golang]||null}),o(void 0,void 0,l)}}},_a=({active:e,key:t,withAltKey:o,withCtrlKey:n,withShiftKey:i,withMetaKey:a},r)=>(kt(()=>{const s=s=>{e&&t===s.key&&(!o||o&&s.altKey)&&(!n||n&&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,o,n,i,a,r]),null),Ba=(e,t)=>{kt(()=>{const o=o=>{e.current&&!e.current.contains(o.target)&&t()};return document.addEventListener("mousedown",o),document.addEventListener("touchstart",o),()=>{document.removeEventListener("mousedown",o),document.removeEventListener("touchstart",o)}},[e,t])},Ra=({defaultClientHeight:e=0,defaultClientwidth:t=0,onClickOutside:o}={})=>{const n=vt(null),[i,a]=wt(!1),[r,s]=wt({top:0,left:0});return Ba(n,()=>{i&&(a(!1),o?.())}),{popupRef:n,popupOpen:i,setPopupOpen:a,popupPosition:r,handlePosition:(o,i)=>{const{innerWidth:a,innerHeight:r}=window;let l=i,c=o;l>=r/2&&(l+=-(n.current?.clientHeight||e)),c>=a/2&&(c+=-(n.current?.clientWidth||t)),s({top:l,left:c})}}},La=()=>({getItemSS:(e,t)=>{const o=sessionStorage.getItem(e);return o?Tn(o,t):t},setItemSS:(e,t)=>{sessionStorage.setItem(e,JSON.stringify(t))},removeItemSS:e=>{sessionStorage.removeItem(e)}}),Ma={otelServiceName:"",currentStreamName:""},Pa=()=>{const{formData:e,formErrors:t,handleFormChange:o,handleErrorChange:n,resetFormData:i}=ma(Ma);return{formData:e,formErrors:t,handleFormChange:o,resetFormData:i,validateForm:()=>(n(void 0,void 0,{}),!0),loadFormWithDrawerItem:({otelServiceName:e,name:t})=>{const n={...eo(Ma),otelServiceName:e||t||""};o(void 0,void 0,n)}}},ja=(e,t,o)=>{const n="boolean"==typeof o,i=!!e.dataStreamNames?.length||!!e.currentStreamName?.length,a=i&&e.dataStreamNames?.includes(t)||e.currentStreamName===t,r=(n?o:e.selected&&(!i||a))||!1;return{namespace:e.namespace,name:e.name,kind:e.kind,selected:r,numberOfInstances:e.numberOfInstances}},Ua=(e,t,o)=>({...ja(e,t,o),currentStreamName:t}),Wa=(e,t,o)=>{const n="boolean"==typeof o,i=e.dataStreamNames?.includes(t),a=(n?o:e.selected)||!1;return{namespace:e.name,selected:!(!i&&!n)&&a,currentStreamName:t}},Va=e=>{const{fetchSingleNamespace:t}=e||{},{namespaces:o}=gi(),{selectedStreamName:n}=hi(),i=vt(!1),{configuredSources:a,configuredFutureApps:r,availableSources:s,setAvailableSources:l,setFetchedAllNamespaces:c}=Ai(),[d,p]=wt(s),[u,h]=wt(""),[m,g]=wt(!1),[$,x]=wt([]),[f,b]=wt(""),[y,w]=wt(r),[k,v]=wt(((e,t,o)=>{const n={};return Object.entries(e).forEach(([e,t])=>{n[e]=t.map(e=>Ua(e,o))}),Object.entries(t).forEach(([e,t])=>{t.forEach(t=>{const i=n[e].findIndex(e=>e.name===t.name&&e.kind===t.kind),a=Ua(t,o);-1!==i?n[e][i]=a:n[e].push(a)})}),n})(s,a,n)),C=async(e,o)=>{if(t){if(h(e.name),$.includes(e.name))v(t=>({...t,[e.name]:t[e.name].map(e=>({...e,selected:"boolean"==typeof o?o:e.selected,currentStreamName:n}))}));else{const{data:i}=await t({namespaceName:e.name}),{name:a,sources:r=[]}=i?.computePlatform?.k8sActualNamespace||{};if(!a)return;const s=r.map(e=>ja(e,n));x(e=>[...e,a]),l({...Ai.getState().availableSources,[a]:s}),p(e=>({...e,[a]:s})),v(e=>({...e,[a]:"boolean"!=typeof o&&e[a]?.length?e[a]:r.map(e=>Ua(e,n,o))}))}h("")}};kt(()=>(i.current=!0,o?.length&&!Ai.getState().fetchedAllNamespaces&&(p(e=>{const t={...e};return o.forEach(({name:e})=>t[e]=t[e]||[]),t}),v(e=>{const t={...e};return o.forEach(({name:e})=>t[e]=t[e]||[]),t}),w(e=>{const t={...e};return o.forEach(e=>t[e.name]=t[e.name]||Wa(e,n)),t}),(async()=>{for await(const e of o)i.current&&await C(e)})(),i.current&&c(!0)),()=>{i.current=!1}),[o,n]);const[E,S]=wt(""),[A,D]=wt(yo.Source),[T,z]=wt(!1),[F,O]=wt(!1),I=yt(()=>{const e=(e,t)=>!E||A!==t||A===t&&e.toLowerCase().includes(E),t={};return Object.entries(k).filter(([t])=>e(t,yo.Namespace)).forEach(([o,n])=>{const i=n.filter(t=>e(t.name,yo.Source)&&(!T||t.selected)&&(e=>!F||(e.numberOfInstances||0)>0)(t));(!E||E&&i.length)&&(t[o]=i)}),t},[k,E,A,T,F]);return{fetchingNamespace:u,fetchedNamespaces:$,availableSources:d,filteredNamespacesAndSources:I,getApiSourcesPayload:()=>{const e={};return Object.entries(k).forEach(([t,o])=>{o.forEach(o=>{const n=d[t]?.find(e=>e.name===o.name&&e.kind===o.kind);n?.selected!==o.selected&&(e[t]||(e[t]=[]),e[t].push(o))})}),e},getApiFutureAppsPayload:()=>{const e={};return Object.entries(y).forEach(([t,i])=>{const a=o?.find(e=>e.name===t);(i.selected&&!a?.dataStreamNames?.includes(n)||!i.selected&&a?.dataStreamNames?.includes(n))&&(e[t]=i)}),e},selectedNamespace:f,onSelectNamespace:(e,t)=>{const n=o.find(t=>t.name===e);if(n){const o="boolean"==typeof t;b(t=>t!==e||o?e:""),C(n,t),o&&g(!1)}},selectedAllNamespaces:m,onSelectAllNamespaces:e=>{g(e),o.forEach(t=>C(t,e))},selectedSources:k,onSelectSource:(e,t)=>{const o=t||f;if(!o)return;const i=[...k[o]||[]],a=i.findIndex(({name:t,kind:o})=>t===e.name&&o===e.kind);if(-1!==a){const e={...i[a],selected:!i[a].selected,currentStreamName:n};i[a]=e}else i.push({...e,selected:!0,currentStreamName:n});v(e=>({...e,[o]:i})),g(!1)},selectedFutureApps:y,onSelectFutureApps:(e,t)=>{const i=t||f;if(!i)return;const a=o.find(e=>e.name===t);a&&w(t=>({...t,[i]:Wa(a,n,e)}))},searchText:E,setSearchText:S,searchBy:A,setSearchBy:D,showSelectedOnly:T,setShowSelectedOnly:z,showRunningOnly:F,setShowRunningOnly:O}};try{Tt.addDefaultLocale(Nt)}catch(e){}const Ha=()=>{const e=vt(new Tt(Nt.locale));return{formatTimeAgo:St(t=>{try{return"string"==typeof t&&(t=t.replace("t","T").replace("z","Z")),e.current.format(new Date(t))}catch(e){return"-"}},[])}},qa=_t.div`
329
+ `,Aa=({icon:e,size:t=Ea.S,onClick:o,disabled:n})=>ft.createElement(Sa,{$size:t,$disabled:n,onClick:e=>{o&&!n&&(e.stopPropagation(),o(e))}},ft.createElement(e,{size:t})),Da=({onDone:e}={})=>{const[t,o]=wt(!1),[n,i]=wt(-1),a=St(async(n,a)=>{if(!t){if(o(!0),void 0!==a&&i(a),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)}e?.(),setTimeout(()=>{o(!1),i(-1)},1e3)}},[t,e]);return{CopyButton:St(({value:e,size:o})=>{const n=t?Ge:Ke;return ft.createElement(Aa,{icon:n,size:o,onClick:()=>a(e)})},[t]),isCopied:t,copiedIndex:n,clickCopy:a}},Ta=e=>{const{addNotification:t}=bi(),{formData:o,handleFormChange:n,formErrors:i,handleErrorChange:a,resetFormData:r}=ma(e);return{formData:o,formErrors:i,handleFormChange:n,resetFormData:r,validateForm:e=>{const n={};let i=!0;return o.name?In(o.name)?n.name=void 0:(i=!1,n.name=Jo.ILLEGAL_K8S_LABEL):(i=!1,n.name=Jo.FIELD_IS_REQUIRED),!i&&e?.withAlert&&t({type:Co.Warning,title:e.alertTitle,message:Jo.REQUIRED_FIELDS,hideFromHistory:!0}),a(void 0,void 0,n),i},loadFormWithDrawerItem:({name:t})=>{const o={...eo(e),name:t};n(void 0,void 0,o)}}},za={type:"",name:"",exportedSignals:{logs:!1,metrics:!1,traces:!1},fields:[],disabled:!1},Fa=e=>{const{supportedSignals:t,preLoadedFields:o}=e||{},{addNotification:n}=bi(),{formData:i,formErrors:a,handleFormChange:r,handleErrorChange:s,resetFormData:l}=ma(za),[c,d]=wt([]),[p,u]=wt([]);return kt(()=>{var e;u(c?(e=c,e.filter(e=>!!e).map(e=>{const{name:t,componentType:o,componentProperties:n,displayName:i,initialValue:a,renderCondition:r}=e;if(o===ko.Dropdown){const e=Tn(n,{}),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:o,title:i,value:a,placeholder:e.placeholder||"Select an option",options:s,renderCondition:r,...e}}return{name:t,componentType:o,title:i,value:a,renderCondition:r,...Tn(n,{})}})).map(e=>{if(o){const t="string"==typeof o?Tn(o,{}):o;if(e.name in t)return{...e,value:t[e.name]}}return e}):[])},[c,o]),kt(()=>{if(p){const e=p.map(e=>({key:e.name,value:e.value}));r("fields",e)}},[p]),kt(()=>{if(t&&0===Un(i.exportedSignals).length){const{logs:e,metrics:o,traces:n}=t;r("exportedSignals",{logs:e.supported,metrics:o.supported,traces:n.supported})}},[t,i.exportedSignals]),{formData:i,formErrors:a,handleFormChange:r,resetFormData:l,validateForm:e=>{const t={};let o=!0;return p.forEach(({name:e,value:n,required:i})=>{i&&!n&&(o=!1,t[e]=Jo.FIELD_IS_REQUIRED)}),!o&&e?.withAlert&&n({type:Co.Warning,title:e.alertTitle,message:Jo.REQUIRED_FIELDS,hideFromHistory:!0}),s(void 0,void 0,t),o},loadFormWithDrawerItem:({destinationType:{type:e},name:t,disabled:o,exportedSignals:n,fields:i})=>{const a={...eo(za),type:e,name:t,disabled:o,exportedSignals:n,fields:Object.entries(Tn(i,{})).map(([e,t])=>({key:e,value:t}))};return r(void 0,void 0,a),a},yamlFields:c,setYamlFields:d,dynamicFields:p,setDynamicFields:u}},Oa=({items:e,rowHeight:t})=>{const o=vt(null),n=It({enabled:e.length>0,horizontal:!1,count:e.length,getScrollElement:()=>o.current,estimateSize:()=>t,overscan:Math.ceil(.05*e.length)});return{overflowRef:o,listHeight:n.getTotalSize(),listItems:n.getVirtualItems()}},Ia={ruleName:"",notes:"",disabled:!1,workloads:null,instrumentationLibraries:null,payloadCollection:{[Mo.HttpRequest]:null,[Mo.HttpResponse]:null,[Mo.DbQuery]:null,[Mo.Messaging]:null},codeAttributes:{[Bo.Column]:null,[Bo.FilePath]:null,[Bo.Function]:null,[Bo.LineNumber]:null,[Bo.Namespace]:null,[Bo.StackTrace]:null},headersCollection:null,customInstrumentations:{[Lo.Java]:null,[Lo.Golang]:null}},Na=()=>{const{formData:e,formErrors:t,handleFormChange:o,handleErrorChange:n,resetFormData:i}=ma(Ia);return{formData:e,formErrors:t,handleFormChange:o,resetFormData:i,validateForm:()=>(n(void 0,void 0,{}),!0),loadFormWithDrawerItem:({ruleName:e,notes:t,disabled:n,payloadCollection:i,codeAttributes:a,headersCollection:r,customInstrumentations:s})=>{const l={...eo(Ia),ruleName:e,notes:t,disabled:n};i&&(l.payloadCollection={[Mo.HttpRequest]:i[Mo.HttpRequest]?{}:null,[Mo.HttpResponse]:i[Mo.HttpResponse]?{}:null,[Mo.DbQuery]:i[Mo.DbQuery]?{}:null,[Mo.Messaging]:i[Mo.Messaging]?{}:null}),a&&(l.codeAttributes={[Bo.Column]:a[Bo.Column]||null,[Bo.FilePath]:a[Bo.FilePath]||null,[Bo.Function]:a[Bo.Function]||null,[Bo.LineNumber]:a[Bo.LineNumber]||null,[Bo.Namespace]:a[Bo.Namespace]||null,[Bo.StackTrace]:a[Bo.StackTrace]||null}),r&&(l.headersCollection=r),s&&(l.customInstrumentations={[Lo.Java]:s[Lo.Java]||null,[Lo.Golang]:s[Lo.Golang]||null}),o(void 0,void 0,l)}}},_a=({active:e,key:t,withAltKey:o,withCtrlKey:n,withShiftKey:i,withMetaKey:a},r)=>(kt(()=>{const s=s=>{e&&t===s.key&&(!o||o&&s.altKey)&&(!n||n&&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,o,n,i,a,r]),null),Ba=(e,t)=>{kt(()=>{const o=o=>{e.current&&!e.current.contains(o.target)&&t()};return document.addEventListener("mousedown",o),document.addEventListener("touchstart",o),()=>{document.removeEventListener("mousedown",o),document.removeEventListener("touchstart",o)}},[e,t])},Ra=({defaultClientHeight:e=0,defaultClientwidth:t=0,onClickOutside:o}={})=>{const n=vt(null),[i,a]=wt(!1),[r,s]=wt({top:0,left:0});return Ba(n,()=>{i&&(a(!1),o?.())}),{popupRef:n,popupOpen:i,setPopupOpen:a,popupPosition:r,handlePosition:(o,i)=>{const{innerWidth:a,innerHeight:r}=window;let l=i,c=o;l>=r/2&&(l+=-(n.current?.clientHeight||e)),c>=a/2&&(c+=-(n.current?.clientWidth||t)),s({top:l,left:c})}}},La=()=>({getItemSS:(e,t)=>{const o=sessionStorage.getItem(e);return o?Tn(o,t):t},setItemSS:(e,t)=>{sessionStorage.setItem(e,JSON.stringify(t))},removeItemSS:e=>{sessionStorage.removeItem(e)}}),Ma={otelServiceName:"",currentStreamName:""},Pa=()=>{const{formData:e,formErrors:t,handleFormChange:o,handleErrorChange:n,resetFormData:i}=ma(Ma);return{formData:e,formErrors:t,handleFormChange:o,resetFormData:i,validateForm:()=>(n(void 0,void 0,{}),!0),loadFormWithDrawerItem:({otelServiceName:e,name:t})=>{const n={...eo(Ma),otelServiceName:e||t||""};o(void 0,void 0,n)}}},ja=(e,t,o)=>{const n="boolean"==typeof o,i=!!e.dataStreamNames?.length||!!e.currentStreamName?.length,a=i&&e.dataStreamNames?.includes(t)||e.currentStreamName===t,r=(n?o:e.selected&&(!i||a))||!1;return{namespace:e.namespace,name:e.name,kind:e.kind,selected:r,numberOfInstances:e.numberOfInstances}},Ua=(e,t,o)=>({...ja(e,t,o),currentStreamName:t}),Wa=(e,t,o)=>{const n="boolean"==typeof o,i=e.dataStreamNames?.includes(t),a=(n?o:e.selected)||!1;return{namespace:e.name,selected:!(!i&&!n)&&a,currentStreamName:t}},Va=e=>{const{fetchSingleNamespace:t}=e||{},{namespaces:o}=gi(),{selectedStreamName:n}=hi(),i=vt(!1),{configuredSources:a,configuredFutureApps:r,availableSources:s,setAvailableSources:l,setFetchedAllNamespaces:c}=Ai(),[d,p]=wt(s),[u,h]=wt(""),[m,g]=wt(!1),[$,x]=wt([]),[f,b]=wt(""),[y,w]=wt(r),[k,v]=wt(((e,t,o)=>{const n={};return Object.entries(e).forEach(([e,t])=>{n[e]=t.map(e=>Ua(e,o))}),Object.entries(t).forEach(([e,t])=>{t.forEach(t=>{const i=n[e].findIndex(e=>e.name===t.name&&e.kind===t.kind),a=Ua(t,o);-1!==i?n[e][i]=a:n[e].push(a)})}),n})(s,a,n)),C=async(e,o)=>{if(t){if(h(e.name),$.includes(e.name))v(t=>({...t,[e.name]:t[e.name].map(e=>({...e,selected:"boolean"==typeof o?o:e.selected,currentStreamName:n}))}));else{const{data:i}=await t({namespaceName:e.name}),{name:a,sources:r=[]}=i?.computePlatform?.k8sActualNamespace||{};if(!a)return;const s=r.map(e=>ja(e,n));x(e=>[...e,a]),l({...Ai.getState().availableSources,[a]:s}),p(e=>({...e,[a]:s})),v(e=>({...e,[a]:"boolean"!=typeof o&&e[a]?.length?e[a]:r.map(e=>Ua(e,n,o))}))}h("")}};kt(()=>(i.current=!0,o?.length&&!Ai.getState().fetchedAllNamespaces&&(p(e=>{const t={...e};return o.forEach(({name:e})=>t[e]=t[e]||[]),t}),v(e=>{const t={...e};return o.forEach(({name:e})=>t[e]=t[e]||[]),t}),w(e=>{const t={...e};return o.forEach(e=>t[e.name]=t[e.name]||Wa(e,n)),t}),(async()=>{for await(const e of o)i.current&&await C(e)})(),i.current&&c(!0)),()=>{i.current=!1}),[o,n]);const[E,S]=wt(""),[A,D]=wt(yo.Source),[T,z]=wt(!1),[F,O]=wt(!1),I=yt(()=>{const e=(e,t)=>!E||A!==t||A===t&&e.toLowerCase().includes(E),t={};return Object.entries(k).filter(([t])=>e(t,yo.Namespace)).forEach(([o,n])=>{const i=n.filter(t=>e(t.name,yo.Source)&&(!T||t.selected)&&(e=>!F||(e.numberOfInstances||0)>0)(t));(!E||E&&(A===yo.Namespace||A===yo.Source&&i.length))&&(t[o]=i)}),t},[k,E,A,T,F]);return{fetchingNamespace:u,fetchedNamespaces:$,availableSources:d,filteredNamespacesAndSources:I,getApiSourcesPayload:()=>{const e={};return Object.entries(k).forEach(([t,o])=>{o.forEach(o=>{const n=d[t]?.find(e=>e.name===o.name&&e.kind===o.kind);n?.selected!==o.selected&&(e[t]||(e[t]=[]),e[t].push(o))})}),e},getApiFutureAppsPayload:()=>{const e={};return Object.entries(y).forEach(([t,i])=>{const a=o?.find(e=>e.name===t);(i.selected&&!a?.dataStreamNames?.includes(n)||!i.selected&&a?.dataStreamNames?.includes(n))&&(e[t]=i)}),e},selectedNamespace:f,onSelectNamespace:(e,t)=>{const n=o.find(t=>t.name===e);if(n){const o="boolean"==typeof t;b(t=>t!==e||o?e:""),C(n,t),o&&g(!1)}},selectedAllNamespaces:m,onSelectAllNamespaces:e=>{g(e),o.forEach(t=>C(t,e))},selectedSources:k,onSelectSource:(e,t)=>{const o=t||f;if(!o)return;const i=[...k[o]||[]],a=i.findIndex(({name:t,kind:o})=>t===e.name&&o===e.kind);if(-1!==a){const e={...i[a],selected:!i[a].selected,currentStreamName:n};i[a]=e}else i.push({...e,selected:!0,currentStreamName:n});v(e=>({...e,[o]:i})),g(!1)},selectedFutureApps:y,onSelectFutureApps:(e,t)=>{const i=t||f;if(!i)return;const a=o.find(e=>e.name===t);a&&w(t=>({...t,[i]:Wa(a,n,e)}))},searchText:E,setSearchText:S,searchBy:A,setSearchBy:D,showSelectedOnly:T,setShowSelectedOnly:z,showRunningOnly:F,setShowRunningOnly:O}};try{Tt.addDefaultLocale(Nt)}catch(e){}const Ha=()=>{const e=vt(new Tt(Nt.locale));return{formatTimeAgo:St(t=>{try{return"string"==typeof t&&(t=t.replace("t","T").replace("z","Z")),e.current.format(new Date(t))}catch(e){return"-"}},[])}},qa=_t.div`
330
330
  flex: 1;
331
331
  align-self: stretch;
332
332
  display: flex;
@@ -1 +1 @@
1
- export{B as Badge,m as Button,w as ButtonSize,dq as ButtonTab,dr as ButtonTabList,n as ButtonVariants,C as Checkbox,du as CheckboxList,dt as CheckboxSize,Q as CliCommand,K as DataCard,i as Drawer,dw as DropData,G as DropDataAlignX,dv as DropDataAlignY,dx as Header,c7 as HoverActions,M as IconButton,cj as IconButtonSize,dy as Input,I as Island,L as Loader,dz as Modal,dA as Navbar,l as Note,dC as Radio,dD as RadioGroup,dB as RadioSize,k as Search,t as SectionCard,ds as SectionCardSize,U as Segment,dE as SegmentSize,W as StatusCard,x as Table,y as TableVariant,dF as Tag,X as TextCard,d as Toggle,dH as ToggleLabelAlign,dI as ToggleList,e as ToggleSize,dG as ToggleVariant,T as Typography,b as TypographySize,f as TypographyVariants,dJ as WarningModal}from"../chunks/ui-components-e54e1ba5.js";import"../icons.js";import"react";import"styled-components";import"zustand";import"javascript-time-ago";import"../chunks/vendor-0965fadc.js";import"react-dom";import"@xyflow/react";import"react-error-boundary";import"lottie-react";import"prism-react-renderer";
1
+ export{B as Badge,m as Button,w as ButtonSize,dq as ButtonTab,dr as ButtonTabList,n as ButtonVariants,C as Checkbox,du as CheckboxList,dt as CheckboxSize,Q as CliCommand,K as DataCard,i as Drawer,dw as DropData,G as DropDataAlignX,dv as DropDataAlignY,dx as Header,c7 as HoverActions,M as IconButton,cj as IconButtonSize,dy as Input,I as Island,L as Loader,dz as Modal,dA as Navbar,l as Note,dC as Radio,dD as RadioGroup,dB as RadioSize,k as Search,t as SectionCard,ds as SectionCardSize,U as Segment,dE as SegmentSize,W as StatusCard,x as Table,y as TableVariant,dF as Tag,X as TextCard,d as Toggle,dH as ToggleLabelAlign,dI as ToggleList,e as ToggleSize,dG as ToggleVariant,T as Typography,b as TypographySize,f as TypographyVariants,dJ as WarningModal}from"../chunks/ui-components-917db301.js";import"../icons.js";import"react";import"styled-components";import"zustand";import"javascript-time-ago";import"../chunks/vendor-0965fadc.js";import"react-dom";import"@xyflow/react";import"react-error-boundary";import"lottie-react";import"prism-react-renderer";
package/lib/components.js CHANGED
@@ -1 +1 @@
1
- export{aH as AutocompleteInput,a_ as Badge,b0 as Button,as as CancelWarning,j as CenterThis,a6 as Checkbox,d7 as Code,ay as ConditionDetails,az as DataCard,a2 as DataCardFieldTypes,bJ as DataCardFields,d8 as DataFinger,b2 as DataTab,ar as DeleteWarning,c5 as DescribeRow,aI as Divider,ak as DocsButton,aq as Drawer,da as DrawerFooter,d9 as DrawerHeader,bo as Dropdown,db as ErrorBoundary,bw as ExtendArrow,q as FadeLoader,a7 as FieldError,a5 as FieldLabel,F as FlexColumn,a as FlexRow,dc as Header,bv as IconButton,cf as IconGroup,aV as IconTitleBadge,aQ as IconWrapped,c1 as IconsNav,dd as ImageControlled,a9 as Input,af as InputList,ac as InputTable,aY as InteractiveTable,ae as KeyValueInputsList,b$ as LoadingText,aC as Modal,aE as ModalBody,al as MonitorsCheckboxes,aS as MonitorsIcons,aD as NavigationButtons,N as NoDataFound,aF as NotificationNote,dj as Overlay,s as PageContent,bj as Popup,ck as PopupForm,cp as ScrollX,b5 as ScrollY,aj as SectionTitle,ai as Segment,bk as SelectionButton,ba as SkeletonLoader,aK as Status,bI as Stepper,de as TabList,aT as TableContainer,aU as TableTitleWrap,aX as TableWrap,bS as Tag,ah as Text,am as TextArea,ad as Toggle,cn as ToggleCodeComponent,c as Tooltip,aZ as TraceLoader,$ as UpgradeRequiredWrapper,bl as VerticalScroll,di as WarningModal,df as getLinksFromText,dg as getStrongsFromText,dh as renderText}from"./chunks/ui-components-e54e1ba5.js";import"./icons.js";import"react";import"styled-components";import"zustand";import"javascript-time-ago";import"./chunks/vendor-0965fadc.js";import"react-dom";import"@xyflow/react";import"react-error-boundary";import"lottie-react";import"prism-react-renderer";
1
+ export{aH as AutocompleteInput,a_ as Badge,b0 as Button,as as CancelWarning,j as CenterThis,a6 as Checkbox,d7 as Code,ay as ConditionDetails,az as DataCard,a2 as DataCardFieldTypes,bJ as DataCardFields,d8 as DataFinger,b2 as DataTab,ar as DeleteWarning,c5 as DescribeRow,aI as Divider,ak as DocsButton,aq as Drawer,da as DrawerFooter,d9 as DrawerHeader,bo as Dropdown,db as ErrorBoundary,bw as ExtendArrow,q as FadeLoader,a7 as FieldError,a5 as FieldLabel,F as FlexColumn,a as FlexRow,dc as Header,bv as IconButton,cf as IconGroup,aV as IconTitleBadge,aQ as IconWrapped,c1 as IconsNav,dd as ImageControlled,a9 as Input,af as InputList,ac as InputTable,aY as InteractiveTable,ae as KeyValueInputsList,b$ as LoadingText,aC as Modal,aE as ModalBody,al as MonitorsCheckboxes,aS as MonitorsIcons,aD as NavigationButtons,N as NoDataFound,aF as NotificationNote,dj as Overlay,s as PageContent,bj as Popup,ck as PopupForm,cp as ScrollX,b5 as ScrollY,aj as SectionTitle,ai as Segment,bk as SelectionButton,ba as SkeletonLoader,aK as Status,bI as Stepper,de as TabList,aT as TableContainer,aU as TableTitleWrap,aX as TableWrap,bS as Tag,ah as Text,am as TextArea,ad as Toggle,cn as ToggleCodeComponent,c as Tooltip,aZ as TraceLoader,$ as UpgradeRequiredWrapper,bl as VerticalScroll,di as WarningModal,df as getLinksFromText,dg as getStrongsFromText,dh as renderText}from"./chunks/ui-components-917db301.js";import"./icons.js";import"react";import"styled-components";import"zustand";import"javascript-time-ago";import"./chunks/vendor-0965fadc.js";import"react-dom";import"@xyflow/react";import"react-error-boundary";import"lottie-react";import"prism-react-renderer";
package/lib/constants.js CHANGED
@@ -1 +1 @@
1
- export{aw as ACTION_OPTIONS,ap as BUTTON_TEXTS,D as DEFAULT_DATA_STREAM_NAME,bH as DESTINATION_CATEGORIES,bp as DISPLAY_LANGUAGES,a1 as DISPLAY_TITLES,aG as FORM_ALERTS,bW as INSTRUMENTATION_RULE_OPTIONS,c$ as LANGUAGE_OPTIONS,bq as MONITORS_OPTIONS,br as STORAGE_KEYS,d0 as TOKEN_ABOUT_TO_EXPIRE}from"./chunks/ui-components-e54e1ba5.js";import"./icons.js";import"react";import"styled-components";import"zustand";import"javascript-time-ago";import"./chunks/vendor-0965fadc.js";import"react-dom";import"@xyflow/react";import"react-error-boundary";import"lottie-react";import"prism-react-renderer";
1
+ export{aw as ACTION_OPTIONS,ap as BUTTON_TEXTS,D as DEFAULT_DATA_STREAM_NAME,bH as DESTINATION_CATEGORIES,bp as DISPLAY_LANGUAGES,a1 as DISPLAY_TITLES,aG as FORM_ALERTS,bW as INSTRUMENTATION_RULE_OPTIONS,c$ as LANGUAGE_OPTIONS,bq as MONITORS_OPTIONS,br as STORAGE_KEYS,d0 as TOKEN_ABOUT_TO_EXPIRE}from"./chunks/ui-components-917db301.js";import"./icons.js";import"react";import"styled-components";import"zustand";import"javascript-time-ago";import"./chunks/vendor-0965fadc.js";import"react-dom";import"@xyflow/react";import"react-error-boundary";import"lottie-react";import"prism-react-renderer";
@@ -16,5 +16,6 @@ export type HandleSelectAllFunc = (opts: {
16
16
  export type HandleSourceChangeFunc = (opts: {
17
17
  clusterId: string;
18
18
  workloadId: Partial<WorkloadId>;
19
- boolean?: boolean;
19
+ selected?: boolean;
20
+ auto?: boolean;
20
21
  }) => void;
@@ -1,4 +1,4 @@
1
- import e,{useMemo as t,useState as a,useEffect as l,useCallback as n}from"react";import o,{useTheme as s}from"styled-components";import{F as i,a as r,C as c,T as d,b as u,B as p,S as g,c as m,O as h,N as b,d as f,e as y,f as w,u as C,g as k,D as v,E as x,h as $,i as S,j as I,L as A,P as R,R as P,k as T,l as D,m as z,n as N,o as L,p as V,q as M,r as O,s as W,t as j,v as F,A as U,w as E,x as H,y as G,z as q,I as Y,G as B,H as K,J as X,K as J,M as Q,Q as Z,Y as _,U as ee,V as te,W as ae,X as le,Z as ne,_ as oe,$ as se,a0 as ie}from"../chunks/ui-components-e54e1ba5.js";import{SourceIcon as re,VSquareIcon as ce,SettingsIcon as de,OdigosLogo as ue,ConnectionsIcon as pe,RefreshIcon as ge,DeleteIcon as me,VIcon as he,XIcon as be,XSquareIcon as fe,PodIcon as ye,ChevronUpIcon as we,ChevronDownIcon as Ce,TerminalIcon as ke,DownloadIcon as ve,PipelineCollectorIcon as xe,GatewayIcon as $e,YamlIcon as Se}from"../icons.js";import"zustand";import"javascript-time-ago";import"../chunks/vendor-0965fadc.js";import"react-dom";import"@xyflow/react";import"react-error-boundary";import"lottie-react";import"prism-react-renderer";const Ie=o(i)`
1
+ import e,{useMemo as t,useState as a,useEffect as l,useCallback as n}from"react";import o,{useTheme as s}from"styled-components";import{F as i,a as r,C as c,T as d,b as u,B as p,S as g,c as m,O as h,N as b,d as f,e as y,f as w,u as C,g as v,D as k,E as x,h as $,i as S,j as I,L as A,P as R,R as P,k as T,l as D,m as z,n as N,o as L,p as V,q as M,r as O,s as W,t as j,v as F,A as U,w as E,x as H,y as G,z as q,I as Y,G as B,H as K,J as X,K as J,M as Q,Q as Z,Y as _,U as ee,V as te,W as ae,X as le,Z as ne,_ as oe,$ as se,a0 as ie}from"../chunks/ui-components-917db301.js";import{SourceIcon as re,VSquareIcon as ce,SettingsIcon as de,OdigosLogo as ue,ConnectionsIcon as pe,RefreshIcon as ge,DeleteIcon as me,VIcon as he,XIcon as be,XSquareIcon as fe,PodIcon as ye,ChevronUpIcon as we,ChevronDownIcon as Ce,TerminalIcon as ve,DownloadIcon as ke,PipelineCollectorIcon as xe,GatewayIcon as $e,YamlIcon as Se}from"../icons.js";import"zustand";import"javascript-time-ago";import"../chunks/vendor-0965fadc.js";import"react-dom";import"@xyflow/react";import"react-error-boundary";import"lottie-react";import"prism-react-renderer";const Ie=o(i)`
2
2
  width: ${({$width:e})=>e};
3
3
  gap: 12px;
4
4
  justify-content: space-between;
@@ -25,7 +25,7 @@ import e,{useMemo as t,useState as a,useEffect as l,useCallback as n}from"react"
25
25
  &:hover {
26
26
  background-color: ${({theme:e})=>e.v2.colors.silver[600]};
27
27
  }
28
- `,Pe=({formData:a,handleSourceChange:l,handleSelectAll:n,selectedArea:o,searchText:i,filters:f})=>{const y=s(),{activeNamespace:w,isAll:C,isSome:k}=t(()=>{const e=o.value.clusterId&&o.value.namespaceName?a.find(({clusterId:e})=>e===o.value.clusterId)?.namespaces.find(({name:e})=>e===o.value.namespaceName):void 0;if(!e)return{activeNamespace:void 0,isAll:!1,isSome:!1};const t=e.workloads.filter(({selected:e})=>e).length;return{activeNamespace:e,isAll:t>0&&t===e.workloads.length,isSome:t>0&&t<e.workloads.length}},[a,o.value.clusterId,o.value.namespaceName]),v=t(()=>{if(!w)return[];const{clusterId:t}=o.value,{name:a,workloads:n}=w;return n.map(({name:n,selected:o,kind:s})=>{if(i&&!n.toLowerCase().includes(i.toLowerCase()))return null;const m=o||!1;if(f.showOnlySelected&&!m)return null;const h=()=>l({clusterId:t,workloadId:{namespace:a,name:n,kind:s}});return e.createElement(Re,{key:`${t}#${a}#${n}#${s}`,onClick:h},e.createElement(r,{$gap:12},e.createElement(c,{value:m,onChange:h}),e.createElement(d,{size:u.XS},n)),e.createElement(p,{label:s,status:g.Info,textSize:u.XXXS,backgroundColor:y.v2.colors.blue[900]}))})},[a,o.value.clusterId,w,i,f]);return e.createElement(Ie,{$width:"50%"},e.createElement(r,{$padding:"0 12px 0 28px",$gap:12},e.createElement(m,{text:(C?"Unselect":"Select")+" all workloads in the selected namespace"},e.createElement(c,{partiallyChecked:k,value:C,onChange:()=>n({clusterId:o.value.clusterId,namespaceName:o.value.namespaceName,boolean:!C}),disabled:!v.length})),e.createElement(r,{$gap:8},e.createElement(d,{size:u.XS,nowrap:!0},o.value.clusterId?`${o.value.clusterName} > ${o.value.namespaceName} > Workloads`:"Workloads"),e.createElement(p,{label:v.length,status:h.Unknown}))),e.createElement(Ae,{$borderRadius:"0 16px 16px 0"},v.length?v:e.createElement(b,{title:"Workloads not found",subTitle:"Please select a namespace to view workloads"})))},Te=({formData:a,handleSourceChange:l,handleSelectAll:n,selectedArea:o,searchText:i,filters:C})=>{const k=s(),{isAll:v,isSome:x}=t(()=>{const e=a.length>0&&a.every(({namespaces:e})=>e.every(({workloads:e})=>e.every(({selected:e})=>e)));return{isAll:e,isSome:!e&&a.length>0&&a.some(({namespaces:e})=>e.some(({workloads:e})=>e.some(({selected:e})=>e)))}},[a]),$=t(()=>a.flatMap(({clusterId:t,clusterName:a,namespaces:n})=>n.map(({name:n,workloads:s,selected:b})=>{if(i&&!n.toLowerCase().includes(i.toLowerCase()))return null;const v=s.filter(({selected:e})=>e).length,x=v>0&&v===s.length,$=v>0&&v<s.length,S=b||!1;if(C.showOnlySelected&&!x&&!$&&!S)return null;const I=o.value.clusterId===t&&o.value.namespaceName===n,A=()=>o.setValue({clusterId:t,clusterName:a,namespaceName:n}),R=e=>{A(),"boolean"==typeof e.all&&s.forEach(({name:a,kind:o})=>{l({clusterId:t,workloadId:{namespace:n,name:a,kind:o},boolean:e.all})}),"boolean"==typeof e.future&&l({clusterId:t,workloadId:{namespace:n},boolean:e.future})};return e.createElement(Re,{key:`${t}#${n}`,$isSelected:I,onClick:A},e.createElement(r,{$gap:12},e.createElement(c,{partiallyChecked:$,value:x,onChange:e=>R({all:e,future:e})}),e.createElement(d,{size:u.XS},`${a} > ${n}`)),e.createElement(r,{$gap:12},e.createElement(m,{text:"Automatically instrument all workloads currently in the namespace, and all workloads that will be deployed to this namespace in the future"},e.createElement(f,{label:"Auto",size:y.S,value:S,onChange:e=>R({future:e})})),e.createElement(r,{$gap:8},e.createElement(d,{variant:w.Span,size:u.XXXS,color:k.v2.colors.silver[200],align:"right"},"Selected"),e.createElement(p,{label:`${v}/${s.length}`,status:I?g.Default:h.Unknown,minWidth:"42px"}))))})),[a,o.value.clusterId,o.value.namespaceName,i,C]);return e.createElement(Ie,{$width:"50%"},e.createElement(r,{$padding:"0 12px 0 28px",$gap:12},e.createElement(m,{text:(v?"Unselect":"Select")+" all workloads in all namespaces"},e.createElement(c,{partiallyChecked:x,value:v,onChange:()=>n({boolean:!v}),disabled:!$.length})),e.createElement(r,{$gap:8},e.createElement(d,{size:u.XS,nowrap:!0},"Namespaces"),e.createElement(p,{label:$.length,status:h.Unknown}))),e.createElement(Ae,{$borderRadius:"16px 0 0 16px"},$.length?$:e.createElement(b,{title:"Namespaces not found",subTitle:""})))},De="75vw",ze=o.div`
28
+ `,Pe=({formData:a,handleSourceChange:l,handleSelectAll:n,selectedArea:o,searchText:i,filters:f})=>{const y=s(),{activeNamespace:w,isAll:C,isSome:v}=t(()=>{const e=o.value.clusterId&&o.value.namespaceName?a.find(({clusterId:e})=>e===o.value.clusterId)?.namespaces.find(({name:e})=>e===o.value.namespaceName):void 0;if(!e)return{activeNamespace:void 0,isAll:!1,isSome:!1};const t=e.workloads.filter(({selected:e})=>e).length;return{activeNamespace:e,isAll:t>0&&t===e.workloads.length,isSome:t>0&&t<e.workloads.length}},[a,o.value.clusterId,o.value.namespaceName]),k=t(()=>{if(!w)return[];const{clusterId:t}=o.value,{name:a,workloads:n}=w;return n.map(({name:n,selected:o,kind:s})=>{if(i&&!n.toLowerCase().includes(i.toLowerCase()))return null;const m=o||!1;if(f.showOnlySelected&&!m)return null;const h=()=>l({clusterId:t,workloadId:{namespace:a,name:n,kind:s}});return e.createElement(Re,{key:`${t}#${a}#${n}#${s}`,onClick:h},e.createElement(r,{$gap:12},e.createElement(c,{value:m,onChange:h}),e.createElement(d,{size:u.XS},n)),e.createElement(p,{label:s,status:g.Info,textSize:u.XXXS,backgroundColor:y.v2.colors.blue[900]}))})},[a,o.value.clusterId,w,i,f]);return e.createElement(Ie,{$width:"50%"},e.createElement(r,{$padding:"0 12px 0 28px",$gap:12},e.createElement(m,{text:(C?"Unselect":"Select")+" all workloads in the selected namespace"},e.createElement(c,{partiallyChecked:v,value:C,onChange:()=>n({clusterId:o.value.clusterId,namespaceName:o.value.namespaceName,boolean:!C}),disabled:!k.length})),e.createElement(r,{$gap:8},e.createElement(d,{size:u.XS,nowrap:!0},o.value.clusterId?`${o.value.clusterName} > ${o.value.namespaceName} > Workloads`:"Workloads"),e.createElement(p,{label:k.length,status:h.Unknown}))),e.createElement(Ae,{$borderRadius:"0 16px 16px 0"},k.length?k:e.createElement(b,{title:"Workloads not found",subTitle:"Please select a namespace to view workloads"})))},Te=({formData:a,handleSourceChange:l,handleSelectAll:n,selectedArea:o,searchText:i,filters:C})=>{const v=s(),{isAll:k,isSome:x}=t(()=>{const e=a.length>0&&a.every(({namespaces:e})=>e.every(({workloads:e})=>e.every(({selected:e})=>e)));return{isAll:e,isSome:!e&&a.length>0&&a.some(({namespaces:e})=>e.some(({workloads:e})=>e.some(({selected:e})=>e)))}},[a]),$=t(()=>a.flatMap(({clusterId:t,clusterName:a,namespaces:n})=>n.map(({name:n,workloads:s,selected:b})=>{if(i&&!n.toLowerCase().includes(i.toLowerCase()))return null;const k=s.filter(({selected:e})=>e).length,x=k>0&&k===s.length,$=k>0&&k<s.length,S=b||!1;if(C.showOnlySelected&&!x&&!$&&!S)return null;const I=o.value.clusterId===t&&o.value.namespaceName===n,A=()=>o.setValue({clusterId:t,clusterName:a,namespaceName:n}),R=e=>{A(),l({clusterId:t,workloadId:{namespace:n},auto:e.auto,selected:e.all})};return e.createElement(Re,{key:`${t}#${n}`,$isSelected:I,onClick:A},e.createElement(r,{$gap:12},e.createElement(c,{partiallyChecked:$,value:x,onChange:e=>R({auto:e,all:e})}),e.createElement(d,{size:u.XS},`${a} > ${n}`)),e.createElement(r,{$gap:12},e.createElement(m,{text:"Automatically instrument all workloads currently in the namespace, and all workloads that will be deployed to this namespace in the future"},e.createElement(f,{label:"Auto",size:y.S,value:S,onChange:e=>R({auto:e,all:e||void 0})})),e.createElement(r,{$gap:8},e.createElement(d,{variant:w.Span,size:u.XXXS,color:v.v2.colors.silver[200],align:"right"},"Selected"),e.createElement(p,{label:`${k}/${s.length}`,status:I?g.Default:h.Unknown,minWidth:"42px"}))))})),[a,o.value.clusterId,o.value.namespaceName,i,C]);return e.createElement(Ie,{$width:"50%"},e.createElement(r,{$padding:"0 12px 0 28px",$gap:12},e.createElement(m,{text:(k?"Unselect":"Select")+" all workloads in all namespaces"},e.createElement(c,{partiallyChecked:x,value:k,onChange:()=>n({boolean:!k}),disabled:!$.length})),e.createElement(r,{$gap:8},e.createElement(d,{size:u.XS,nowrap:!0},"Namespaces"),e.createElement(p,{label:$.length,status:h.Unknown}))),e.createElement(Ae,{$borderRadius:"16px 0 0 16px"},$.length?$:e.createElement(b,{title:"Namespaces not found",subTitle:""})))},De="75vw",ze=o.div`
29
29
  display: flex;
30
30
  flex-direction: column;
31
31
  border-radius: 16px;
@@ -52,28 +52,28 @@ import e,{useMemo as t,useState as a,useEffect as l,useCallback as n}from"react"
52
52
  justify-content: flex-end;
53
53
  gap: 16px;
54
54
  padding: 0 12px;
55
- `,Oe=(e,t,a)=>{const l=[];return t.workloads.forEach(n=>{const o=e?.workloads.find(e=>e.name===n.name&&e.kind===n.kind);n.selected!==o?.selected&&l.push({namespace:t.name,name:n.name,kind:n.kind,selected:n.selected||!1,currentStreamName:a})}),l},We=({onClose:o,snapshots:i,selectedConnectionIds:c,setSelectedConnectionIds:p,persistSources:m})=>{const h=s(),{selectedStreamName:b}=C(),{progress:w,resetProgress:V}=k(),M=t(()=>b||v,[b]),[O,W]=a(""),[j,F]=a(x.Namespace),[U,E]=a({showOnlySelected:!1}),[H,G]=a(!1),[q,Y]=a(!1),[B,K]=a(void 0),[X,J]=a({clusterId:"",clusterName:"",namespaceName:""}),[Q,Z]=a([]);l(()=>{Z(e=>{const t=((e,t)=>$(((e,t)=>e.clusters.filter(({clusterId:e})=>t.includes(e)))(e,t)))(i,c);return t.map(t=>{const a=e?.find(e=>e.clusterId===t.clusterId);return a??t})})},[i,c]);const{formDiff:_,isFormDirty:ee}=t(()=>{const e=((e,t,a)=>{const l={};return e.forEach(e=>{e.namespaces.forEach(n=>{const o=t.find(t=>t.clusterId===e.clusterId)?.namespaces.find(e=>e.name===n.name),s=n.selected||!1;if(s!==o?.selected){l[e.clusterId]||(l[e.clusterId]=[]);const t={namespace:n.name,selected:s,currentStreamName:a};if(s)l[e.clusterId]=[t];else{l[e.clusterId].push(t);const s=Oe(o,n,a);s.length>0&&l[e.clusterId].push(...s)}}else{const t=Oe(o,n,a);t.length>0&&(l[e.clusterId]||(l[e.clusterId]=[]),l[e.clusterId].push(...t))}})}),l})(Q,i.clusters,M);return{formDiff:e,isFormDirty:Object.keys(e).length>0}},[Q,i,M]),te=n(({clusterId:e,workloadId:t,boolean:a})=>{Z(l=>{const n=$(l),o=n.findIndex(t=>t.clusterId===e);if(-1===o)return n;const s=n[o].namespaces.findIndex(e=>e.name===t.namespace);if(-1===s)return n;if(t.kind&&t.name){const e=n[o].namespaces[s].workloads.findIndex(e=>e.name===t.name&&e.kind===t.kind);if(-1===e)return n;const l="boolean"==typeof a?a:!n[o].namespaces[s].workloads[e].selected;n[o].namespaces[s].workloads[e].selected=l,l?n[o].namespaces[s].workloads.every(e=>e.selected)&&(n[o].namespaces[s].selected=!0):n[o].namespaces[s].selected=!1}else{const e="boolean"==typeof a?a:!n[o].namespaces[s].selected;n[o].namespaces[s].selected=e}return n})},[]),ae=n(({clusterId:e,namespaceName:t,boolean:a})=>{Z(l=>{const n=$(l);return n.forEach((l,o)=>{e&&l.clusterId!==e||l.namespaces.forEach(({name:e,workloads:l},s)=>{t&&e!==t||(n[o].namespaces[s].selected=a,l.forEach((e,t)=>{n[o].namespaces[s].workloads[t].selected=a}))})}),n})},[]),le=()=>{G(!1),o()};return e.createElement(S,{isOpen:!0,hideOverlay:!q,width:De,header:{icon:re,title:"Manage Sources",onClose:o,onCloseDisabled:q}},q?e.createElement(I,{$height:"calc(100vh - 136px)"},e.createElement(Ve,null,e.createElement(A,{title:"Creating Sources...",titleSize:u.S,subTitle:"This may take a few moments while sources are being created.",subTitleSize:u.XXXS,withGradient:!0,withSpinner:!0,prettySpinner:!0,percentage:w[R.BulkInstrumenting]?.percentage||0}))):e.createElement(ze,null,e.createElement(Ne,null,e.createElement(P,{icon:ce,title:"Selected Clusters",badge:{label:c.length}}),e.createElement(T,{width:"300px",value:O,onChange:W,segment:{options:[{label:"Namespace",value:x.Namespace},{label:"Source",value:x.Source}],selected:j,setSelected:F}}),e.createElement(r,{$gap:8},e.createElement(d,{size:u.XXXS,color:h.v2.colors.silver[200],nowrap:!0},"Show only:"),e.createElement(f,{size:y.S,label:"Selected",value:U.showOnlySelected,onChange:e=>E(t=>({...t,showOnlySelected:e}))}))),e.createElement(Le,null,e.createElement(Te,{formData:Q,handleSourceChange:te,handleSelectAll:ae,selectedArea:{value:X,setValue:J},searchText:j===x.Namespace?O:"",filters:U}),e.createElement(Pe,{formData:Q,handleSourceChange:te,handleSelectAll:ae,selectedArea:{value:X,setValue:J},searchText:j===x.Source?O:"",filters:U}))),e.createElement(Me,null,q?null:B?e.createElement(D,{fullWidth:!0,status:g.Error,message:B}):ee?e.createElement(D,{fullWidth:!0,status:g.Info,message:'The values don\'t reflect the current configuration of the selected clusters.\n"Apply" will override the current configurations.'}):ee?null:e.createElement(D,{fullWidth:!0,status:g.Success,message:"The values reflect the current configuration of the selected cluster."}),e.createElement(r,{$gap:8},e.createElement("div",{style:{width:"150px"}},e.createElement(z,{fullWidth:!0,variant:N.Secondary,label:"Cancel",onClick:()=>ee?G(!0):le(),disabled:!ee||q})),e.createElement("div",{style:{width:"150px"}},e.createElement(z,{fullWidth:!0,variant:N.Primary,label:"Save",onClick:async()=>{Y(!0);const e=await m(_);V(R.BulkInstrumenting),Y(!1),e?.error?K(e.error):(p([]),o())},disabled:!ee||q})))),e.createElement(L,{isOpen:H,onClose:()=>G(!1),onApprove:le}))},je="75vw",Fe=o.div`
55
+ `,Oe=({onClose:o,snapshots:i,selectedConnectionIds:c,setSelectedConnectionIds:p,persistSources:m})=>{const h=s(),{selectedStreamName:b}=C(),{progress:w,resetProgress:V}=v(),M=t(()=>b||k,[b]),[O,W]=a(""),[j,F]=a(x.Namespace),[U,E]=a({showOnlySelected:!1}),[H,G]=a(!1),[q,Y]=a(!1),[B,K]=a(void 0),[X,J]=a({clusterId:"",clusterName:"",namespaceName:""}),[Q,Z]=a([]);l(()=>{Z(e=>{const t=((e,t)=>$(((e,t)=>e.clusters.filter(({clusterId:e})=>t.includes(e)))(e,t)))(i,c);return t.map(t=>{const a=e?.find(e=>e.clusterId===t.clusterId);return a??t})})},[i,c]);const{formDiff:_,isFormDirty:ee}=t(()=>{const e=((e,t,a)=>{const l={};return e.forEach(e=>{e.namespaces.forEach(n=>{const o=t.find(t=>t.clusterId===e.clusterId)?.namespaces.find(e=>e.name===n.name),s=n.selected||!1,i=s!==o?.selected;if(i&&(l[e.clusterId]||(l[e.clusterId]=[]),l[e.clusterId].push({namespace:n.name,selected:s,currentStreamName:a}),s&&(l[e.clusterId]=l[e.clusterId].filter(e=>e.namespace!==n.name||e.namespace===n.name&&(!e.name||!e.kind)))),!i||!s){const t=((e,t,a)=>{const l=[];return t.workloads.forEach(n=>{const o=e?.workloads.find(e=>e.name===n.name&&e.kind===n.kind);n.selected!==o?.selected&&l.push({namespace:t.name,name:n.name,kind:n.kind,selected:n.selected||!1,currentStreamName:a})}),l})(o,n,a);t.length>0&&(l[e.clusterId]||(l[e.clusterId]=[]),l[e.clusterId].push(...t))}})}),l})(Q,i.clusters,M);return{formDiff:e,isFormDirty:Object.keys(e).length>0}},[Q,i,M]),te=n(({clusterId:e,workloadId:t,selected:a,auto:l})=>{Z(n=>{const o=$(n),s=o.findIndex(t=>t.clusterId===e);if(-1===s)return o;const i=o[s].namespaces.findIndex(e=>e.name===t.namespace);if(-1===i)return o;if(t.kind&&t.name){const e=o[s].namespaces[i].workloads.findIndex(e=>e.name===t.name&&e.kind===t.kind);if(-1===e)return o;const l="boolean"==typeof a?a:!o[s].namespaces[i].workloads[e].selected;o[s].namespaces[i].workloads[e].selected=l,l?o[s].namespaces[i].workloads.every(e=>e.selected)&&(o[s].namespaces[i].selected=!0):o[s].namespaces[i].selected=!1}else{const e="boolean"==typeof l?l:!o[s].namespaces[i].selected;o[s].namespaces[i].selected=e,e?o[s].namespaces[i].workloads.forEach(e=>{e.selected=!0}):"boolean"!=typeof a||a||o[s].namespaces[i].workloads.forEach(e=>{e.selected=!1})}return o})},[]),ae=n(({clusterId:e,namespaceName:t,boolean:a})=>{Z(l=>{const n=$(l);return n.forEach((l,o)=>{e&&l.clusterId!==e||l.namespaces.forEach(({name:e,workloads:l},s)=>{t&&e!==t||(n[o].namespaces[s].selected=a,l.forEach((e,t)=>{n[o].namespaces[s].workloads[t].selected=a}))})}),n})},[]),le=()=>{G(!1),o()};return e.createElement(S,{isOpen:!0,hideOverlay:!q,width:De,header:{icon:re,title:"Manage Sources",onClose:o,onCloseDisabled:q}},q?e.createElement(I,{$height:"calc(100vh - 136px)"},e.createElement(Ve,null,e.createElement(A,{title:"Creating Sources...",titleSize:u.S,subTitle:"This may take a few moments while sources are being created.",subTitleSize:u.XXXS,withGradient:!0,withSpinner:!0,prettySpinner:!0,percentage:w[R.BulkInstrumenting]?.percentage||0}))):e.createElement(ze,null,e.createElement(Ne,null,e.createElement(P,{icon:ce,title:"Selected Clusters",badge:{label:c.length}}),e.createElement(T,{width:"300px",value:O,onChange:W,segment:{options:[{label:"Namespace",value:x.Namespace},{label:"Source",value:x.Source}],selected:j,setSelected:F}}),e.createElement(r,{$gap:8},e.createElement(d,{size:u.XXXS,color:h.v2.colors.silver[200],nowrap:!0},"Show only:"),e.createElement(f,{size:y.S,label:"Selected",value:U.showOnlySelected,onChange:e=>E(t=>({...t,showOnlySelected:e}))}))),e.createElement(Le,null,e.createElement(Te,{formData:Q,handleSourceChange:te,handleSelectAll:ae,selectedArea:{value:X,setValue:J},searchText:j===x.Namespace?O:"",filters:U}),e.createElement(Pe,{formData:Q,handleSourceChange:te,handleSelectAll:ae,selectedArea:{value:X,setValue:J},searchText:j===x.Source?O:"",filters:U}))),e.createElement(Me,null,q?null:B?e.createElement(D,{fullWidth:!0,status:g.Error,message:B}):ee?e.createElement(D,{fullWidth:!0,status:g.Info,message:'The values don\'t reflect the current configuration of the selected clusters.\n"Apply" will override the current configurations.'}):ee?null:e.createElement(D,{fullWidth:!0,status:g.Success,message:"The values reflect the current configuration of the selected cluster."}),e.createElement(r,{$gap:8},e.createElement("div",{style:{width:"150px"}},e.createElement(z,{fullWidth:!0,variant:N.Secondary,label:"Cancel",onClick:()=>ee?G(!0):le(),disabled:!ee||q})),e.createElement("div",{style:{width:"150px"}},e.createElement(z,{fullWidth:!0,variant:N.Primary,label:"Save",onClick:async()=>{Y(!0);const e=await m(_);V(R.BulkInstrumenting),Y(!1),e?.error?K(e.error):(p([]),o())},disabled:!ee||q})))),e.createElement(L,{isOpen:H,onClose:()=>G(!1),onApprove:le}))},We="75vw",je=o.div`
56
56
  display: flex;
57
57
  flex-direction: column;
58
58
  border-radius: 16px;
59
59
  background-color: ${({theme:e})=>e.v2.colors.silver[1e3]};
60
60
  overflow: hidden;
61
- `,Ue=o.div`
61
+ `,Fe=o.div`
62
62
  display: flex;
63
63
  gap: 12px;
64
64
  padding: 16px;
65
65
  background-color: ${({theme:e})=>e.v2.colors.silver[1e3]};
66
66
  position: sticky;
67
67
  top: 0;
68
- `,Ee=o.div`
68
+ `,Ue=o.div`
69
69
  display: flex;
70
70
  gap: 12px;
71
71
  padding: 16px;
72
- `,He=o(i)`
72
+ `,Ee=o(i)`
73
73
  width: ${({$width:e})=>e};
74
74
  gap: 12px;
75
75
  justify-content: space-between;
76
- `,Ge=o.div`
76
+ `,He=o.div`
77
77
  display: flex;
78
78
  flex-direction: column;
79
79
  padding: 12px;
@@ -84,7 +84,7 @@ import e,{useMemo as t,useState as a,useEffect as l,useCallback as n}from"react"
84
84
  background-color: ${({theme:e})=>e.v2.colors.silver[900]};
85
85
  overflow-y: auto;
86
86
  overflow-x: hidden;
87
- `,qe=o.div`
87
+ `,Ge=o.div`
88
88
  display: flex;
89
89
  align-items: center;
90
90
  gap: 12px;
@@ -95,13 +95,13 @@ import e,{useMemo as t,useState as a,useEffect as l,useCallback as n}from"react"
95
95
  &:hover {
96
96
  background-color: ${({theme:e})=>e.v2.colors.silver[600]};
97
97
  }
98
- `,Ye=o.div`
98
+ `,qe=o.div`
99
99
  display: flex;
100
100
  align-items: center;
101
101
  justify-content: flex-end;
102
102
  gap: 16px;
103
103
  padding: 0 12px;
104
- `,Be=({onClose:n,connections:o,selectedConnectionIds:i,setSelectedConnectionIds:m,getConnectionRemoteConfig:b,onApply:w})=>{const C=s(),[k,v]=a(""),[x,$]=a({showOnlySelected:!1}),I=t(()=>o.filter(e=>(!k||e.name.toLowerCase().includes(k.toLowerCase()))&&(!x.showOnlySelected||i.includes(e.id))),[o,i.length,k,x]),R=e=>{m(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},[O,W]=a(!1),[j,F]=a(!1),[U,E]=a(void 0),[H,G]=a(!1),[q,Y]=a(void 0),{formData:B,handleFormChange:K,areFormValuesEqual:X,resetFormData:J}=V(q||{automaticRollout:!0}),{isFormDirty:Q,isFormMatch:Z}=t(()=>({isFormDirty:i.length>1||void 0!==q&&!X(q,B),isFormMatch:1===i.length&&void 0!==q&&X(q,B)}),[i.length,q,B]);l(()=>{1===i.length?(async e=>{if(H)return;G(!0);const t=await b(e);if(t){const e={automaticRollout:!t.rollout?.automaticRolloutDisabled};Y(e),J(e)}G(!1)})(i[0]):Y(void 0)},[i.length]);const _=()=>{W(!1),n()};return e.createElement(S,{isOpen:!0,hideOverlay:!0,width:je,header:{icon:de,title:"Cluster Configuration",onClose:n}},e.createElement(Fe,null,e.createElement(Ue,null,e.createElement(P,{icon:ce,title:"Selected Clusters",badge:{label:i.length}}),e.createElement(T,{width:"300px",placeholder:"Search by cluster name",value:k,onChange:v}),e.createElement(r,{$gap:8},e.createElement(d,{size:u.XXXS,color:C.v2.colors.silver[200],nowrap:!0},"Show only:"),e.createElement(f,{size:y.S,label:"Selected",value:x.showOnlySelected,onChange:e=>$(t=>({...t,showOnlySelected:e}))}))),e.createElement(Ee,null,e.createElement(He,{$width:"40%"},e.createElement(r,{$padding:"0 12px",$justifyContent:"space-between"},e.createElement(r,{$gap:8},e.createElement(d,{size:u.XS},"Clusters"),e.createElement(p,{label:o.length,status:h.Unknown})),e.createElement(r,{$gap:8},e.createElement(d,{size:u.XXXS,color:C.v2.colors.silver[200],align:"right"},"Selected clusters"),e.createElement(p,{label:`${i.length}/${o.length}`,status:h.Unknown}))),e.createElement(Ge,{$borderRadius:"16px 0 0 16px"},I.map(t=>e.createElement(qe,{key:t.id,onClick:()=>R(t.id)},e.createElement(c,{value:i.includes(t.id),onChange:()=>R(t.id)}),e.createElement(d,{size:u.XS},t.name))))),e.createElement(He,{$width:"60%"},e.createElement(r,{$padding:"0 12px"},e.createElement(d,{size:u.XS},"Configurations")),e.createElement(Ge,{$borderRadius:"0 16px 16px 0",$gap:12},H?e.createElement(M,null):e.createElement(f,{label:"Automatic Rollout "+(B.automaticRollout?"Enabled":"Disabled"),tooltip:"Odigos automatically triggers a one-time rollout for workloads when instrumenting or uninstrumenting, ensuring that changes are applied without requiring manual intervention. When automatic rollout is enabled, Odigos will proactively restart workloads as needed to apply updated instrumentation. Users do not need to manually trigger rollouts after adding or removing sources. Any new pods created after enabling or disabling the agent (via automatic rollout, autoscaling, etc.) will still have the agent injected, regardless of this setting. When set to false, additional configurations related to automated rollouts or rollbacks take effect.",value:B.automaticRollout,onChange:e=>K("automaticRollout",e)}))))),e.createElement(Ye,null,H?e.createElement(A,{icon:ue,title:"Fetching Configuration...",titleSize:u.XXS,withGradient:!0}):j?e.createElement(A,{icon:ue,title:"Applying Configurations...",titleSize:u.XXS,withGradient:!0}):U?e.createElement(D,{fullWidth:!0,status:g.Error,message:U}):Q?e.createElement(D,{fullWidth:!0,status:g.Info,message:'The values don\'t reflect the current configuration of the selected clusters.\n"Apply" will override the current configurations.'}):Z?e.createElement(D,{fullWidth:!0,status:g.Success,message:"The values reflect the current configuration of the selected cluster."}):null,e.createElement(r,{$gap:8},e.createElement("div",{style:{width:"150px"}},e.createElement(z,{fullWidth:!0,variant:N.Secondary,label:"Cancel",onClick:()=>Q?W(!0):_(),disabled:j})),e.createElement("div",{style:{width:"150px"}},e.createElement(z,{fullWidth:!0,variant:N.Primary,label:"Save",onClick:async()=>{F(!0);const e=await w(i,B);F(!1),e?.error?E(e.error):(m([]),n())},disabled:!Q||j})))),e.createElement(L,{isOpen:O,onClose:()=>W(!1),onApprove:_}))};var Ke,Xe;!function(e){e.BulkConfig="bulk-config",e.BulkSource="bulk-source",e.BulkDestination="bulk-destination",e.BulkAction="bulk-action",e.BulkInstrumentationRule="bulk-instrumentation-rule",e.Delete="delete"}(Ke||(Ke={})),function(e){e.Id="id",e.Name="name",e.Type="type",e.Status="status",e.OdigosVersion="odigosVersion",e.ConnectedSince="connectedSince",e.LastActivity="lastActivity"}(Xe||(Xe={}));const Je=[{key:Xe.Name,label:"Name"},{key:Xe.Type,label:"Type",textAlign:"right"},{key:Xe.Status,label:"Status"},{key:Xe.OdigosVersion,label:"Odigos Version"},{key:Xe.ConnectedSince,label:"Connected Since"},{key:Xe.LastActivity,label:"Last Activity"}],Qe=(e,t)=>{const a=e.find(e=>e.key===Xe.Id)?.rawValue;a&&t(a.toString())},Ze=({tableRowsMaxHeight:o,connections:i,getConnections:r,onClickConnection:c,deleteConnection:d,getConnectionRemoteConfig:u,applyConfigurations:m,getAllClusterSnapshots:b,persistSources:f})=>{const y=s(),{formatTimeAgo:w}=O(),[C,k]=a(!1),[v,x]=a(i||[]),[$,S]=a(!1),[I,A]=a(null),R=n(async()=>{try{k(!0),x(await r()??[])}catch(e){}finally{k(!1)}},[]),P=n(async()=>{if(b)try{S(!0),A(await b()??null)}catch(e){}finally{S(!1)}},[]);l(()=>{v.length||R()},[v.length,R]),l(()=>{I||P()},[I,P]);const[T,D]=a(""),[z,L]=a(null),[V,M]=a([]),K=t(()=>v.filter(e=>e.status===g.Success),[v]),X=t(()=>v.filter(e=>!T||e.name.toLowerCase().includes(T.toLowerCase())).map(t=>({cells:[{key:Xe.Id,rawValue:t.id},{key:Xe.Name,rawValue:t.name},{key:Xe.Type,rawValue:t.type},{key:Xe.Status,rawValue:t.status,component:()=>(t=>{const a=t===g.Success?"Connection live":"Connection lost",l=t===g.Success?he:be;return e.createElement(p,{status:t,label:a,leftIcon:l})})(t.status)},{key:Xe.OdigosVersion,rawValue:t.odigosVersion},{key:Xe.ConnectedSince,rawValue:t.connectedAt?w(t.connectedAt):"-"},{key:Xe.LastActivity,rawValue:t.lastSeenAt?w(t.lastSeenAt):"-"}],onClick:t.status===g.Success?()=>c(t):void 0,isSelected:V.includes(t.id),onSelect:()=>M(e=>Array.from(new Set([...e,t.id]))),onDeselect:()=>M(e=>e.filter(e=>e!==t.id)),hideCheckbox:t.status!==g.Success})),[v,V,T]);return e.createElement(W,null,e.createElement(j,{richTitle:{icon:pe,title:"Connections",badge:{label:v.length.toString(),status:h.Unknown}},search:{placeholder:"Search by cluster name",value:T,onChange:e=>D(e),width:"300px"},actions:[{id:F(),type:U.Button,buttonProps:{variant:N.Secondary,size:E.S,leftIcon:ge,onClick:async()=>{await R(),await P()},disabled:C||$}}]},e.createElement(H,{variant:G.Pretty,maxHeight:o,headerBackgroundColor:y.v2.colors.silver[1e3],isLoading:C,withCheckboxes:!0,columns:Je,rows:X,rowActionsPushRightPosition:z?`calc(${z===Ke.BulkConfig?je:De} - 24px)`:void 0,getRowActions:({cells:e})=>(e=>e.find(e=>e.key===Xe.Status)?.rawValue===g.Success)(e)?[I&&f?{id:F(),tooltip:"Manage Sources",rightIcon:re,onClick:async()=>{Qe(e,e=>{M([e]),L(Ke.BulkSource)})}}:null,u&&m?{id:F(),tooltip:"Edit Configuration",rightIcon:de,onClick:async()=>{Qe(e,e=>{M([e]),L(Ke.BulkConfig)})}}:null]:[{id:F(),label:"Delete Connection",rightIcon:me,onClick:()=>{Qe(e,e=>{M([e]),L(Ke.Delete)})}}]}),z===Ke.BulkConfig&&u&&m&&e.createElement(Be,{onClose:()=>L(null),connections:K,selectedConnectionIds:V,setSelectedConnectionIds:M,getConnectionRemoteConfig:u,onApply:m}),z===Ke.BulkSource&&I&&f&&e.createElement(We,{onClose:()=>L(null),snapshots:I,selectedConnectionIds:V,setSelectedConnectionIds:M,persistSources:async e=>{if(!f)return{error:"Persist sources function is not defined"};const t=await f(e);return t?.error||await P(),t}}),e.createElement(q,{target:"connection",isOpen:z===Ke.Delete,onClose:()=>{M([]),L(null)},onApprove:async()=>{const e=V[0];e&&(await d(e),await R())}}),e.createElement(Y,{isOpen:!!V.length&&!z,richTitle:{icon:ce,title:"Selected Clusters",badge:{label:V.length}},actions:[{id:F(),type:U.Button,buttonProps:{variant:N.Text,size:E.S,label:"Cancel",onClick:()=>M([])}},I&&f?{id:F(),type:U.ButtonDropData,buttonProps:{variant:N.Secondary,size:E.S,label:"Add Component",onClick:e=>L(e)},dropDataProps:{alignX:B.Left,items:[{id:Ke.BulkSource,label:"Add Source",icon:re}]}}:null,u&&m?{id:F(),type:U.Button,buttonProps:{variant:N.Primary,size:E.S,label:"Manage Configurations",rightIcon:de,onClick:()=>L(Ke.BulkConfig)}}:null]})))},_e=o.div`
104
+ `,Ye=({onClose:n,connections:o,selectedConnectionIds:i,setSelectedConnectionIds:m,getConnectionRemoteConfig:b,onApply:w})=>{const C=s(),[v,k]=a(""),[x,$]=a({showOnlySelected:!1}),I=t(()=>o.filter(e=>(!v||e.name.toLowerCase().includes(v.toLowerCase()))&&(!x.showOnlySelected||i.includes(e.id))),[o,i.length,v,x]),R=e=>{m(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},[O,W]=a(!1),[j,F]=a(!1),[U,E]=a(void 0),[H,G]=a(!1),[q,Y]=a(void 0),{formData:B,handleFormChange:K,areFormValuesEqual:X,resetFormData:J}=V(q||{automaticRollout:!0}),{isFormDirty:Q,isFormMatch:Z}=t(()=>({isFormDirty:i.length>1||void 0!==q&&!X(q,B),isFormMatch:1===i.length&&void 0!==q&&X(q,B)}),[i.length,q,B]);l(()=>{1===i.length?(async e=>{if(H)return;G(!0);const t=await b(e);if(t){const e={automaticRollout:!t.rollout?.automaticRolloutDisabled};Y(e),J(e)}G(!1)})(i[0]):Y(void 0)},[i.length]);const _=()=>{W(!1),n()};return e.createElement(S,{isOpen:!0,hideOverlay:!0,width:We,header:{icon:de,title:"Cluster Configuration",onClose:n}},e.createElement(je,null,e.createElement(Fe,null,e.createElement(P,{icon:ce,title:"Selected Clusters",badge:{label:i.length}}),e.createElement(T,{width:"300px",placeholder:"Search by cluster name",value:v,onChange:k}),e.createElement(r,{$gap:8},e.createElement(d,{size:u.XXXS,color:C.v2.colors.silver[200],nowrap:!0},"Show only:"),e.createElement(f,{size:y.S,label:"Selected",value:x.showOnlySelected,onChange:e=>$(t=>({...t,showOnlySelected:e}))}))),e.createElement(Ue,null,e.createElement(Ee,{$width:"40%"},e.createElement(r,{$padding:"0 12px",$justifyContent:"space-between"},e.createElement(r,{$gap:8},e.createElement(d,{size:u.XS},"Clusters"),e.createElement(p,{label:o.length,status:h.Unknown})),e.createElement(r,{$gap:8},e.createElement(d,{size:u.XXXS,color:C.v2.colors.silver[200],align:"right"},"Selected clusters"),e.createElement(p,{label:`${i.length}/${o.length}`,status:h.Unknown}))),e.createElement(He,{$borderRadius:"16px 0 0 16px"},I.map(t=>e.createElement(Ge,{key:t.id,onClick:()=>R(t.id)},e.createElement(c,{value:i.includes(t.id),onChange:()=>R(t.id)}),e.createElement(d,{size:u.XS},t.name))))),e.createElement(Ee,{$width:"60%"},e.createElement(r,{$padding:"0 12px"},e.createElement(d,{size:u.XS},"Configurations")),e.createElement(He,{$borderRadius:"0 16px 16px 0",$gap:12},H?e.createElement(M,null):e.createElement(f,{label:"Automatic Rollout "+(B.automaticRollout?"Enabled":"Disabled"),tooltip:"Odigos automatically triggers a one-time rollout for workloads when instrumenting or uninstrumenting, ensuring that changes are applied without requiring manual intervention. When automatic rollout is enabled, Odigos will proactively restart workloads as needed to apply updated instrumentation. Users do not need to manually trigger rollouts after adding or removing sources. Any new pods created after enabling or disabling the agent (via automatic rollout, autoscaling, etc.) will still have the agent injected, regardless of this setting. When set to false, additional configurations related to automated rollouts or rollbacks take effect.",value:B.automaticRollout,onChange:e=>K("automaticRollout",e)}))))),e.createElement(qe,null,H?e.createElement(A,{icon:ue,title:"Fetching Configuration...",titleSize:u.XXS,withGradient:!0}):j?e.createElement(A,{icon:ue,title:"Applying Configurations...",titleSize:u.XXS,withGradient:!0}):U?e.createElement(D,{fullWidth:!0,status:g.Error,message:U}):Q?e.createElement(D,{fullWidth:!0,status:g.Info,message:'The values don\'t reflect the current configuration of the selected clusters.\n"Apply" will override the current configurations.'}):Z?e.createElement(D,{fullWidth:!0,status:g.Success,message:"The values reflect the current configuration of the selected cluster."}):null,e.createElement(r,{$gap:8},e.createElement("div",{style:{width:"150px"}},e.createElement(z,{fullWidth:!0,variant:N.Secondary,label:"Cancel",onClick:()=>Q?W(!0):_(),disabled:j})),e.createElement("div",{style:{width:"150px"}},e.createElement(z,{fullWidth:!0,variant:N.Primary,label:"Save",onClick:async()=>{F(!0);const e=await w(i,B);F(!1),e?.error?E(e.error):(m([]),n())},disabled:!Q||j})))),e.createElement(L,{isOpen:O,onClose:()=>W(!1),onApprove:_}))};var Be,Ke;!function(e){e.BulkConfig="bulk-config",e.BulkSource="bulk-source",e.BulkDestination="bulk-destination",e.BulkAction="bulk-action",e.BulkInstrumentationRule="bulk-instrumentation-rule",e.Delete="delete"}(Be||(Be={})),function(e){e.Id="id",e.Name="name",e.Type="type",e.Status="status",e.OdigosVersion="odigosVersion",e.ConnectedSince="connectedSince",e.LastActivity="lastActivity"}(Ke||(Ke={}));const Xe=[{key:Ke.Name,label:"Name"},{key:Ke.Type,label:"Type",textAlign:"right"},{key:Ke.Status,label:"Status"},{key:Ke.OdigosVersion,label:"Odigos Version"},{key:Ke.ConnectedSince,label:"Connected Since"},{key:Ke.LastActivity,label:"Last Activity"}],Je=(e,t)=>{const a=e.find(e=>e.key===Ke.Id)?.rawValue;a&&t(a.toString())},Qe=({tableRowsMaxHeight:o,connections:i,getConnections:r,onClickConnection:c,deleteConnection:d,getConnectionRemoteConfig:u,applyConfigurations:m,getAllClusterSnapshots:b,persistSources:f})=>{const y=s(),{formatTimeAgo:w}=O(),[C,v]=a(!1),[k,x]=a(i||[]),[$,S]=a(!1),[I,A]=a(null),R=n(async()=>{try{v(!0),x(await r()??[])}catch(e){}finally{v(!1)}},[]),P=n(async()=>{if(b)try{S(!0),A(await b()??null)}catch(e){}finally{S(!1)}},[]);l(()=>{k.length||R()},[k.length,R]),l(()=>{I||P()},[I,P]);const[T,D]=a(""),[z,L]=a(null),[V,M]=a([]),K=t(()=>k.filter(e=>e.status===g.Success),[k]),X=t(()=>k.filter(e=>!T||e.name.toLowerCase().includes(T.toLowerCase())).map(t=>({cells:[{key:Ke.Id,rawValue:t.id},{key:Ke.Name,rawValue:t.name},{key:Ke.Type,rawValue:t.type},{key:Ke.Status,rawValue:t.status,component:()=>(t=>{const a=t===g.Success?"Connection live":"Connection lost",l=t===g.Success?he:be;return e.createElement(p,{status:t,label:a,leftIcon:l})})(t.status)},{key:Ke.OdigosVersion,rawValue:t.odigosVersion},{key:Ke.ConnectedSince,rawValue:t.connectedAt?w(t.connectedAt):"-"},{key:Ke.LastActivity,rawValue:t.lastSeenAt?w(t.lastSeenAt):"-"}],onClick:t.status===g.Success?()=>c(t):void 0,isSelected:V.includes(t.id),onSelect:()=>M(e=>Array.from(new Set([...e,t.id]))),onDeselect:()=>M(e=>e.filter(e=>e!==t.id)),hideCheckbox:t.status!==g.Success})),[k,V,T]);return e.createElement(W,null,e.createElement(j,{richTitle:{icon:pe,title:"Connections",badge:{label:k.length.toString(),status:h.Unknown}},search:{placeholder:"Search by cluster name",value:T,onChange:e=>D(e),width:"300px"},actions:[{id:F(),type:U.Button,buttonProps:{variant:N.Secondary,size:E.S,leftIcon:ge,onClick:async()=>{await R(),await P()},disabled:C||$}}]},e.createElement(H,{variant:G.Pretty,maxHeight:o,headerBackgroundColor:y.v2.colors.silver[1e3],isLoading:C,withCheckboxes:!0,columns:Xe,rows:X,rowActionsPushRightPosition:z?`calc(${z===Be.BulkConfig?We:De} - 24px)`:void 0,getRowActions:({cells:e})=>(e=>e.find(e=>e.key===Ke.Status)?.rawValue===g.Success)(e)?[I&&f?{id:F(),tooltip:"Manage Sources",rightIcon:re,onClick:async()=>{Je(e,e=>{M([e]),L(Be.BulkSource)})}}:null,u&&m?{id:F(),tooltip:"Edit Configuration",rightIcon:de,onClick:async()=>{Je(e,e=>{M([e]),L(Be.BulkConfig)})}}:null]:[{id:F(),label:"Delete Connection",rightIcon:me,onClick:()=>{Je(e,e=>{M([e]),L(Be.Delete)})}}]}),z===Be.BulkConfig&&u&&m&&e.createElement(Ye,{onClose:()=>L(null),connections:K,selectedConnectionIds:V,setSelectedConnectionIds:M,getConnectionRemoteConfig:u,onApply:m}),z===Be.BulkSource&&I&&f&&e.createElement(Oe,{onClose:()=>L(null),snapshots:I,selectedConnectionIds:V,setSelectedConnectionIds:M,persistSources:async e=>{if(!f)return{error:"Persist sources function is not defined"};const t=await f(e);return t?.error||await P(),t}}),e.createElement(q,{target:"connection",isOpen:z===Be.Delete,onClose:()=>{M([]),L(null)},onApprove:async()=>{const e=V[0];e&&(await d(e),await R())}}),e.createElement(Y,{isOpen:!!V.length&&!z,richTitle:{icon:ce,title:"Selected Clusters",badge:{label:V.length}},actions:[{id:F(),type:U.Button,buttonProps:{variant:N.Text,size:E.S,label:"Cancel",onClick:()=>M([])}},I&&f?{id:F(),type:U.ButtonDropData,buttonProps:{variant:N.Secondary,size:E.S,label:"Add Component",onClick:e=>L(e)},dropDataProps:{alignX:B.Left,items:[{id:Be.BulkSource,label:"Add Source",icon:re}]}}:null,u&&m?{id:F(),type:U.Button,buttonProps:{variant:N.Primary,size:E.S,label:"Manage Configurations",rightIcon:de,onClick:()=>L(Be.BulkConfig)}}:null]})))},Ze=o.div`
105
105
  display: flex;
106
106
  align-items: center;
107
107
  justify-content: space-between;
@@ -113,10 +113,10 @@ import e,{useMemo as t,useState as a,useEffect as l,useCallback as n}from"react"
113
113
  &:hover {
114
114
  background: ${({theme:e})=>e.v2.colors.silver[700]};
115
115
  }
116
- `,et=o.div`
116
+ `,_e=o.div`
117
117
  animation-name: ${K.animations.fade.in};
118
- `,tt=({pod:n,getExtendedPodInfo:o,onClose:s})=>{const{formatTimeAgo:r}=O(),[c,u]=a(null),[p,m]=a(!1);l(()=>{n?o(n.namespace,n.name).then(e=>u(e??null)):(u(null),m(!1))},[n]);const h=t(()=>[{id:F(),title:"Node",label:c?.node??"-",withCopy:!0},{id:F(),title:"Status",badge:{status:X(c?.status),label:c?.status??"-"}}],[c]),b=t(()=>c?.containers?.map(e=>({id:F(),items:[{id:F(),title:"Container",label:e.name??"-"},{id:F(),title:"Status",label:e.startedAt?`${e.status} (since ${r(e.startedAt)})`:e.status},{id:F(),title:"Ready",badge:{status:e.ready?g.Success:g.Error,leftIcon:e.ready?ce:fe,label:e.ready?"True":"False",invertColors:!0}},{id:F(),title:"Started",badge:{status:e.started?g.Success:g.Error,leftIcon:e.started?ce:fe,label:e.started?"True":"False",invertColors:!0}},{id:F(),title:"Image Version",label:e.image?.split(":")?.[1]??"-"},{id:F(),title:"Image Repository",label:e.image?.split(":")?.[0]??"-"},{id:F(),title:"Restarts",label:e.restarts.toString()},{id:F(),title:"State Reason",label:e.stateReason??"-"},{id:F(),title:"Resource Requests",label:`CPU ${e.resources.requests.cpu} • Memory ${e.resources.requests.memory}`},{id:F(),title:"Resource Limits",label:`CPU ${e.resources.limits.cpu} • Memory ${e.resources.limits.memory}`}]}))||[],[c]);return e.createElement(S,{isOpen:!!n,header:{icon:ye,title:"Pod Information",onClose:s}},c?null:e.createElement(I,null,e.createElement(M,null)),c?e.createElement(e.Fragment,null,e.createElement(j,{richTitle:{icon:ye,title:c.name,withCopy:!0}},e.createElement(i,{$gap:24},e.createElement(J,{cellsPerRow:2,items:h}),b.length>0&&e.createElement(i,{$gap:12},e.createElement(_e,{onClick:()=>m(e=>!e)},e.createElement(d,null,"Containers Overview"),e.createElement(Q,{icon:p?we:Ce})),p&&b.map(({id:t,items:a})=>e.createElement(et,{key:t},e.createElement(J,{cellsPerRow:2,items:a})))))),e.createElement(j,{richTitle:{icon:ke,title:"Kubectl Commands"}},e.createElement(i,{$gap:12},e.createElement(Z,{value:`kubectl get pod ${c.name} -n ${c.namespace} -o yaml`}),e.createElement(Z,{value:`kubectl describe pod ${c.name} -n ${c.namespace}`}),e.createElement(Z,{value:`kubectl logs ${c.name} -n ${c.namespace}`}))),e.createElement(_,{yaml:c.manifestYAML})):null)};var at;!function(e){e.PodName="podName",e.Status="status",e.Restarts="restarts",e.NodeName="nodeName",e.Age="age",e.DockerImage="dockerImage"}(at||(at={}));const lt=[{key:at.PodName,label:"Pod Name"},{key:at.Status,label:"Status"},{key:at.Restarts,label:"Restarts",textAlign:"right"},{key:at.NodeName,label:"Node Name"},{key:at.Age,label:"Age",textAlign:"right"},{key:at.DockerImage,label:"Docker Image",textAlign:"right"}],nt=({isLoading:l,tableRowsMaxHeight:n,pods:o,getExtendedPodInfo:i})=>{const r=s(),{formatTimeAgo:c}=O(),[d,u]=a(null),g=t(()=>o.map(t=>({onClick:()=>u(t),cells:[{key:at.PodName,rawValue:t.name},{key:at.Status,rawValue:t.status,component:()=>{return a=t.status,e.createElement(p,{status:X(a),label:a});var a}},{key:at.Restarts,rawValue:t.restartsCount.toString()},{key:at.NodeName,rawValue:t.nodeName},{key:at.Age,rawValue:c(t.creationTimestamp)},{key:at.DockerImage,rawValue:t.image}]})),[o,r]);return e.createElement(j,{richTitle:{icon:ye,title:"Pods"}},e.createElement(H,{variant:G.Data,maxHeight:n,isLoading:l,columns:lt,rows:g}),e.createElement(tt,{pod:d,getExtendedPodInfo:i,onClose:()=>u(null)}))};var ot;!function(e){e.Gateway="gateway",e.Node="node"}(ot||(ot={}));const st=[{value:ot.Gateway,label:"Gateway"},{value:ot.Node,label:"Node Collector"}],it=o.div`
118
+ `,et=({pod:n,getExtendedPodInfo:o,onClose:s})=>{const{formatTimeAgo:r}=O(),[c,u]=a(null),[p,m]=a(!1);l(()=>{n?o(n.namespace,n.name).then(e=>u(e??null)):(u(null),m(!1))},[n]);const h=t(()=>[{id:F(),title:"Node",label:c?.node??"-",withCopy:!0},{id:F(),title:"Status",badge:{status:X(c?.status),label:c?.status??"-"}}],[c]),b=t(()=>c?.containers?.map(e=>({id:F(),items:[{id:F(),title:"Container",label:e.name??"-"},{id:F(),title:"Status",label:e.startedAt?`${e.status} (since ${r(e.startedAt)})`:e.status},{id:F(),title:"Ready",badge:{status:e.ready?g.Success:g.Error,leftIcon:e.ready?ce:fe,label:e.ready?"True":"False",invertColors:!0}},{id:F(),title:"Started",badge:{status:e.started?g.Success:g.Error,leftIcon:e.started?ce:fe,label:e.started?"True":"False",invertColors:!0}},{id:F(),title:"Image Version",label:e.image?.split(":")?.[1]??"-"},{id:F(),title:"Image Repository",label:e.image?.split(":")?.[0]??"-"},{id:F(),title:"Restarts",label:e.restarts.toString()},{id:F(),title:"State Reason",label:e.stateReason??"-"},{id:F(),title:"Resource Requests",label:`CPU ${e.resources.requests.cpu} • Memory ${e.resources.requests.memory}`},{id:F(),title:"Resource Limits",label:`CPU ${e.resources.limits.cpu} • Memory ${e.resources.limits.memory}`}]}))||[],[c]);return e.createElement(S,{isOpen:!!n,header:{icon:ye,title:"Pod Information",onClose:s}},c?null:e.createElement(I,null,e.createElement(M,null)),c?e.createElement(e.Fragment,null,e.createElement(j,{richTitle:{icon:ye,title:c.name,withCopy:!0}},e.createElement(i,{$gap:24},e.createElement(J,{cellsPerRow:2,items:h}),b.length>0&&e.createElement(i,{$gap:12},e.createElement(Ze,{onClick:()=>m(e=>!e)},e.createElement(d,null,"Containers Overview"),e.createElement(Q,{icon:p?we:Ce})),p&&b.map(({id:t,items:a})=>e.createElement(_e,{key:t},e.createElement(J,{cellsPerRow:2,items:a})))))),e.createElement(j,{richTitle:{icon:ve,title:"Kubectl Commands"}},e.createElement(i,{$gap:12},e.createElement(Z,{value:`kubectl get pod ${c.name} -n ${c.namespace} -o yaml`}),e.createElement(Z,{value:`kubectl describe pod ${c.name} -n ${c.namespace}`}),e.createElement(Z,{value:`kubectl logs ${c.name} -n ${c.namespace}`}))),e.createElement(_,{yaml:c.manifestYAML})):null)};var tt;!function(e){e.PodName="podName",e.Status="status",e.Restarts="restarts",e.NodeName="nodeName",e.Age="age",e.DockerImage="dockerImage"}(tt||(tt={}));const at=[{key:tt.PodName,label:"Pod Name"},{key:tt.Status,label:"Status"},{key:tt.Restarts,label:"Restarts",textAlign:"right"},{key:tt.NodeName,label:"Node Name"},{key:tt.Age,label:"Age",textAlign:"right"},{key:tt.DockerImage,label:"Docker Image",textAlign:"right"}],lt=({isLoading:l,tableRowsMaxHeight:n,pods:o,getExtendedPodInfo:i})=>{const r=s(),{formatTimeAgo:c}=O(),[d,u]=a(null),g=t(()=>o.map(t=>({onClick:()=>u(t),cells:[{key:tt.PodName,rawValue:t.name},{key:tt.Status,rawValue:t.status,component:()=>{return a=t.status,e.createElement(p,{status:X(a),label:a});var a}},{key:tt.Restarts,rawValue:t.restartsCount.toString()},{key:tt.NodeName,rawValue:t.nodeName},{key:tt.Age,rawValue:c(t.creationTimestamp)},{key:tt.DockerImage,rawValue:t.image}]})),[o,r]);return e.createElement(j,{richTitle:{icon:ye,title:"Pods"}},e.createElement(H,{variant:G.Data,maxHeight:n,isLoading:l,columns:at,rows:g}),e.createElement(et,{pod:d,getExtendedPodInfo:i,onClose:()=>u(null)}))};var nt;!function(e){e.Gateway="gateway",e.Node="node"}(nt||(nt={}));const ot=[{value:nt.Gateway,label:"Gateway"},{value:nt.Node,label:"Node Collector"}],st=o.div`
119
119
  display: flex;
120
120
  align-items: center;
121
121
  justify-content: space-between;
122
- `,rt=({selectedTab:a,setSelectedTab:l,onClickDownloadDiagnose:n,onClickRefresh:o,loading:s,disabled:i})=>{const c=t(()=>{const e=[];return n&&e.push({id:F(),type:U.Button,buttonProps:{label:"Download Diagnose",leftIcon:ve,size:E.S,variant:N.Text,onClick:n,disabled:i}}),o&&e.push({id:F(),type:U.Button,buttonProps:{label:"Refresh",leftIcon:ge,size:E.S,variant:N.Text,onClick:o,disabled:i,loading:s}}),e},[n,o,i,s]);return e.createElement(it,null,e.createElement(r,{$gap:12},e.createElement(r,{$gap:8},e.createElement(xe,{size:32}),e.createElement(d,{size:u.M,weight:500},"Pipeline Collectors")),e.createElement(ee,{options:st,selected:a,setSelected:l,disabled:i})),e.createElement(te,{actions:c}))},ct=({isOpen:t,onClose:a,title:l,yaml:n})=>e.createElement(S,{isOpen:t,header:{icon:$e,title:l,onClose:a}},e.createElement(_,{yaml:n}));var dt;!function(e){e.ManifestYaml="manifest-yaml",e.ConfigMapYaml="configmap-yaml"}(dt||(dt={}));const ut=({richTitle:t,statusCard:l,textCards:n,manifestYaml:o,configMapYaml:s})=>{const[i,c]=a(null);return e.createElement(j,{richTitle:t,actions:[{id:F(),type:U.ButtonDropData,buttonProps:{variant:N.Secondary,size:E.S,label:"View YAML",onClick:e=>c(e)},dropDataProps:{items:[{id:dt.ManifestYaml,label:t.title,icon:Se},{id:dt.ConfigMapYaml,label:"ConfigMap",icon:Se}]}}]},e.createElement(r,{$gap:16},e.createElement(ae,{...l}),n.map(t=>e.createElement(le,{key:t.title,...t}))),e.createElement(ct,{isOpen:i===dt.ManifestYaml,onClose:()=>c(null),title:t.title,yaml:o}),e.createElement(ct,{isOpen:i===dt.ConfigMapYaml,onClose:()=>c(null),title:"ConfigMap",yaml:s}))},pt=e=>{switch(e){case ne.Healthy:return"All desired replicas are updated, available, and ready";case ne.Updating:return"Workload is progressing towards desired state (e.g., updating pods)";case ne.Degraded:return"Progressing but with availability issues (e.g., not enough available replicas)";case ne.Failed:return"Progress deadline exceeded or an unrecoverable error occurred";case ne.Down:return"No available replicas";case ne.Unknown:return"Status cannot be determined from current signals";default:return"Status unknown"}},gt=({tableRowsMaxHeight:o,getGatewayInfo:s,getGatewayPods:i,getNodeCollectorInfo:r,getNodeCollectorPods:c,getExtendedPodInfo:d})=>{const{formatTimeAgo:u}=O(),{isVersionSupported:p,version:m}=oe(1.12),[b,f]=a(!1),[y,w]=a(ot.Gateway),[C,k]=a(null),[v,x]=a([]),[$,S]=a(null),[I,A]=a([]),R=n(async()=>{f(!0);try{switch(y){case ot.Gateway:k(await s()??null),x(await i()??[]);break;case ot.Node:S(await r()??null),A(await c()??[])}}catch(e){}f(!1)},[y]);l(()=>{R()},[R]);const P=t(()=>(e=>{switch(e){case ot.Gateway:return"Deployment";case ot.Node:return"DaemonSet";default:return"Pipeline Collectors"}})(y),[y]),T=t(()=>((e,t,a,l)=>{const n={status:h.Disabled,label:"No rollouts yet"};let o=!1,s=null;switch(e){case ot.Gateway:o=t?.rolloutInProgress??!1,s=t?.lastRolloutAt??null;break;case ot.Node:o=a?.rolloutInProgress??!1,s=a?.lastRolloutAt??null;break;default:return n}return o?{status:g.Info,label:"Rollout in progress",rightIcon:ge,useSecondaryTone:!0}:s?{status:h.Disabled,label:`Last Rollout: ${l(s)}`}:n})(y,C,$,u),[C,$,y,u]),D=t(()=>((e,t,a,l)=>{let n=l?g.Info:h.Unknown,o=l?"Loading":ne.Unknown,s=l?"Fetching data...":pt(ne.Unknown);switch(e){case ot.Gateway:n=t?.status?X(t?.status):n,o=t?.status??o,s=t?.status?pt(t.status):s;break;case ot.Node:n=a?.status?X(a?.status):n,o=a?.status??o,s=a?.status?pt(a.status):s}return{status:n,title:o,description:s}})(y,C,$,b),[C,$,y,b]),z=t(()=>((e,t,a,l)=>{switch(e){case ot.Gateway:return[{title:"HPA Spec (Replicas)",cells:[{label:"Min.",value:t?.hpa?.min.toString()??"-",isLoading:l},{label:"Max.",value:t?.hpa?.max.toString()??"-",isLoading:l},{label:"Current",value:t?.hpa?.current.toString()??"-",isLoading:l},{label:"Desired",value:t?.hpa?.desired.toString()??"-",isLoading:l}]},{title:"Requests",cells:[{label:"CPU",value:t?.resources?.requests.cpu??"-",isLoading:l},{label:"Memory",value:t?.resources?.requests.memory??"-",isLoading:l}]},{title:"Limits",cells:[{label:"CPU",value:t?.resources?.limits.cpu??"-",isLoading:l},{label:"Memory",value:t?.resources?.limits.memory??"-",isLoading:l}]},{title:"Docker Image",cells:[{value:t?.imageVersion??"-",isLoading:l}]}];case ot.Node:return[{title:"Nodes",cells:[{label:"Desired",value:a?.nodes?.desired.toString()??"-",isLoading:l},{label:"Ready",value:a?.nodes?.ready.toString()??"-",isLoading:l}]},{title:"Requests",cells:[{label:"CPU",value:a?.resources?.requests.cpu??"-",isLoading:l},{label:"Memory",value:a?.resources?.requests.memory??"-",isLoading:l}]},{title:"Limits",cells:[{label:"CPU",value:a?.resources?.limits.cpu??"-",isLoading:l},{label:"Memory",value:a?.resources?.limits.memory??"-",isLoading:l}]},{title:"Docker Image",cells:[{value:a?.imageVersion??"-",isLoading:l}]}];default:return[]}})(y,C,$,b),[C,$,y,b]),N=t(()=>(y===ot.Gateway?C?.manifestYAML:$?.manifestYAML)??"",[C,$,y]),L=t(()=>(y===ot.Gateway?C?.configMapYAML:$?.configMapYAML)??"",[C,$,y]),V=t(()=>y===ot.Gateway?v:I,[v,I,y]);return e.createElement(W,null,e.createElement(rt,{disabled:!p,loading:b,selectedTab:y,setSelectedTab:w,onClickDownloadDiagnose:void 0,onClickRefresh:R}),e.createElement(se,null,e.createElement(ut,{richTitle:{icon:$e,title:P,badge:T},statusCard:D,textCards:z,manifestYaml:N,configMapYaml:L}),e.createElement(nt,{isLoading:b,tableRowsMaxHeight:o,pods:V,getExtendedPodInfo:d}),!p&&e.createElement(ie,{minSupportedVersion:1.12,currentVersion:m||""})))};export{Ze as CentralConnections,gt as PipelineCollectors};
122
+ `,it=({selectedTab:a,setSelectedTab:l,onClickDownloadDiagnose:n,onClickRefresh:o,loading:s,disabled:i})=>{const c=t(()=>{const e=[];return n&&e.push({id:F(),type:U.Button,buttonProps:{label:"Download Diagnose",leftIcon:ke,size:E.S,variant:N.Text,onClick:n,disabled:i}}),o&&e.push({id:F(),type:U.Button,buttonProps:{label:"Refresh",leftIcon:ge,size:E.S,variant:N.Text,onClick:o,disabled:i,loading:s}}),e},[n,o,i,s]);return e.createElement(st,null,e.createElement(r,{$gap:12},e.createElement(r,{$gap:8},e.createElement(xe,{size:32}),e.createElement(d,{size:u.M,weight:500},"Pipeline Collectors")),e.createElement(ee,{options:ot,selected:a,setSelected:l,disabled:i})),e.createElement(te,{actions:c}))},rt=({isOpen:t,onClose:a,title:l,yaml:n})=>e.createElement(S,{isOpen:t,header:{icon:$e,title:l,onClose:a}},e.createElement(_,{yaml:n}));var ct;!function(e){e.ManifestYaml="manifest-yaml",e.ConfigMapYaml="configmap-yaml"}(ct||(ct={}));const dt=({richTitle:t,statusCard:l,textCards:n,manifestYaml:o,configMapYaml:s})=>{const[i,c]=a(null);return e.createElement(j,{richTitle:t,actions:[{id:F(),type:U.ButtonDropData,buttonProps:{variant:N.Secondary,size:E.S,label:"View YAML",onClick:e=>c(e)},dropDataProps:{items:[{id:ct.ManifestYaml,label:t.title,icon:Se},{id:ct.ConfigMapYaml,label:"ConfigMap",icon:Se}]}}]},e.createElement(r,{$gap:16},e.createElement(ae,{...l}),n.map(t=>e.createElement(le,{key:t.title,...t}))),e.createElement(rt,{isOpen:i===ct.ManifestYaml,onClose:()=>c(null),title:t.title,yaml:o}),e.createElement(rt,{isOpen:i===ct.ConfigMapYaml,onClose:()=>c(null),title:"ConfigMap",yaml:s}))},ut=e=>{switch(e){case ne.Healthy:return"All desired replicas are updated, available, and ready";case ne.Updating:return"Workload is progressing towards desired state (e.g., updating pods)";case ne.Degraded:return"Progressing but with availability issues (e.g., not enough available replicas)";case ne.Failed:return"Progress deadline exceeded or an unrecoverable error occurred";case ne.Down:return"No available replicas";case ne.Unknown:return"Status cannot be determined from current signals";default:return"Status unknown"}},pt=({tableRowsMaxHeight:o,getGatewayInfo:s,getGatewayPods:i,getNodeCollectorInfo:r,getNodeCollectorPods:c,getExtendedPodInfo:d})=>{const{formatTimeAgo:u}=O(),{isVersionSupported:p,version:m}=oe(1.12),[b,f]=a(!1),[y,w]=a(nt.Gateway),[C,v]=a(null),[k,x]=a([]),[$,S]=a(null),[I,A]=a([]),R=n(async()=>{f(!0);try{switch(y){case nt.Gateway:v(await s()??null),x(await i()??[]);break;case nt.Node:S(await r()??null),A(await c()??[])}}catch(e){}f(!1)},[y]);l(()=>{R()},[R]);const P=t(()=>(e=>{switch(e){case nt.Gateway:return"Deployment";case nt.Node:return"DaemonSet";default:return"Pipeline Collectors"}})(y),[y]),T=t(()=>((e,t,a,l)=>{const n={status:h.Disabled,label:"No rollouts yet"};let o=!1,s=null;switch(e){case nt.Gateway:o=t?.rolloutInProgress??!1,s=t?.lastRolloutAt??null;break;case nt.Node:o=a?.rolloutInProgress??!1,s=a?.lastRolloutAt??null;break;default:return n}return o?{status:g.Info,label:"Rollout in progress",rightIcon:ge,useSecondaryTone:!0}:s?{status:h.Disabled,label:`Last Rollout: ${l(s)}`}:n})(y,C,$,u),[C,$,y,u]),D=t(()=>((e,t,a,l)=>{let n=l?g.Info:h.Unknown,o=l?"Loading":ne.Unknown,s=l?"Fetching data...":ut(ne.Unknown);switch(e){case nt.Gateway:n=t?.status?X(t?.status):n,o=t?.status??o,s=t?.status?ut(t.status):s;break;case nt.Node:n=a?.status?X(a?.status):n,o=a?.status??o,s=a?.status?ut(a.status):s}return{status:n,title:o,description:s}})(y,C,$,b),[C,$,y,b]),z=t(()=>((e,t,a,l)=>{switch(e){case nt.Gateway:return[{title:"HPA Spec (Replicas)",cells:[{label:"Min.",value:t?.hpa?.min.toString()??"-",isLoading:l},{label:"Max.",value:t?.hpa?.max.toString()??"-",isLoading:l},{label:"Current",value:t?.hpa?.current.toString()??"-",isLoading:l},{label:"Desired",value:t?.hpa?.desired.toString()??"-",isLoading:l}]},{title:"Requests",cells:[{label:"CPU",value:t?.resources?.requests.cpu??"-",isLoading:l},{label:"Memory",value:t?.resources?.requests.memory??"-",isLoading:l}]},{title:"Limits",cells:[{label:"CPU",value:t?.resources?.limits.cpu??"-",isLoading:l},{label:"Memory",value:t?.resources?.limits.memory??"-",isLoading:l}]},{title:"Docker Image",cells:[{value:t?.imageVersion??"-",isLoading:l}]}];case nt.Node:return[{title:"Nodes",cells:[{label:"Desired",value:a?.nodes?.desired.toString()??"-",isLoading:l},{label:"Ready",value:a?.nodes?.ready.toString()??"-",isLoading:l}]},{title:"Requests",cells:[{label:"CPU",value:a?.resources?.requests.cpu??"-",isLoading:l},{label:"Memory",value:a?.resources?.requests.memory??"-",isLoading:l}]},{title:"Limits",cells:[{label:"CPU",value:a?.resources?.limits.cpu??"-",isLoading:l},{label:"Memory",value:a?.resources?.limits.memory??"-",isLoading:l}]},{title:"Docker Image",cells:[{value:a?.imageVersion??"-",isLoading:l}]}];default:return[]}})(y,C,$,b),[C,$,y,b]),N=t(()=>(y===nt.Gateway?C?.manifestYAML:$?.manifestYAML)??"",[C,$,y]),L=t(()=>(y===nt.Gateway?C?.configMapYAML:$?.configMapYAML)??"",[C,$,y]),V=t(()=>y===nt.Gateway?k:I,[k,I,y]);return e.createElement(W,null,e.createElement(it,{disabled:!p,loading:b,selectedTab:y,setSelectedTab:w,onClickDownloadDiagnose:void 0,onClickRefresh:R}),e.createElement(se,null,e.createElement(dt,{richTitle:{icon:$e,title:P,badge:T},statusCard:D,textCards:z,manifestYaml:N,configMapYaml:L}),e.createElement(lt,{isLoading:b,tableRowsMaxHeight:o,pods:V,getExtendedPodInfo:d}),!p&&e.createElement(ie,{minSupportedVersion:1.12,currentVersion:m||""})))};export{Qe as CentralConnections,pt as PipelineCollectors};
package/lib/containers.js CHANGED
@@ -1,4 +1,4 @@
1
- import e,{useState as t,useEffect as a,forwardRef as i,useRef as n,useImperativeHandle as o,useMemo as l,Fragment as r,useCallback as s,Children as c}from"react";import d,{css as u,useTheme as p}from"styled-components";import{a1 as m,a2 as h,a3 as g,a4 as y,a5 as v,a6 as b,a7 as f,a8 as x,a9 as S,aa as $,ab as k,ac as C,ad as w,ae as D,af as T,ag as N,ah as E,H as O,ai as A,aj as F,ak as I,al as M,am as R,an as L,ao as P,ap as j,aq as K,ar as V,as as q,E as H,at as z,au as B,av as W,aw as _,ax as J,ay as U,az as G,aA as Y,F as X,aB as Z,aC as Q,aD as ee,aE as te,aF as ae,S as ie,aG as ne,aH as oe,aI as le,aJ as re,aK as se,a as ce,aL as de,c as ue,aM as pe,aN as me,aO as he,aP as ge,aQ as ye,aR as ve,aS as be,aT as fe,aU as xe,aV as Se,aW as $e,aX as ke,aY as Ce,j as we,N as De,aZ as Te,a_ as Ne,a$ as Ee,b0 as Oe,q as Ae,b1 as Fe,b2 as Ie,b3 as Me,b4 as Re,b5 as Le,b6 as Pe,b7 as je,b8 as Ke,b9 as Ve,g as qe,P as He,ba as ze,bb as Be,u as We,bc as _e,bd as Je,be as Ue,bf as Ge,bg as Ye,bh as Xe,bi as Ze,bj as Qe,bk as et,bl as tt,bm as at,bn as it,bo as nt,bp as ot,bq as lt,br as rt,bs as st,bt as ct,bu as dt,D as ut,bv as pt,bw as mt,bx as ht,by as gt,bz as yt,bA as vt,bB as bt,bC as ft,bD as xt,bE as St,bF as $t,bG as kt,bH as Ct,h as wt,bI as Dt,bJ as Tt,bK as Nt,bL as Et,bM as Ot,bN as At,bO as Ft,bP as It,bQ as Mt,bR as Rt,bS as Lt,bT as Pt,bU as jt,bV as Kt,bW as Vt,bX as qt,r as Ht,bY as zt,bZ as Bt,b_ as Wt,b$ as _t,c0 as Jt,c1 as Ut,c2 as Gt,c3 as Yt,c4 as Xt,c5 as Zt,c6 as Qt,Y as ea,c7 as ta,v as aa,c8 as ia,c9 as na,ca as oa,cb as la,cc as ra,cd as sa,ce as ca,cf as da,cg as ua,ch as pa,ci as ma,p as ha,cj as ga,ck as ya,cl as va,cm as ba,cn as fa,co as xa,cp as Sa}from"./chunks/ui-components-e54e1ba5.js";import{VSquareIcon as $a,XSquareIcon as ka,EditIcon as Ca,TrashIcon as wa,OdigosLogoText as Da,PlusIcon as Ta,RefreshIcon as Na,SearchIcon as Ea,FilterIcon as Oa,DataStreamIcon as Aa,VIcon as Fa,OdigosLogo as Ia,ArrowIcon as Ma,RefreshLeftArrowIcon as Ra,NotificationIcon as La,UserIcon as Pa,ImageErrorIcon as ja,OverviewIcon as Ka,InstrumentationRuleIcon as Va,ActionIcon as qa,SourceIcon as Ha,DestinationIcon as za,SlackLogo as Ba,KeyIcon as Wa,TerminalIcon as _a,ExclamationTriangleIcon as Ja,TraceViewIcon as Ua}from"./icons.js";import{MarkerType as Ga,useNodesState as Ya,useEdgesState as Xa,applyNodeChanges as Za}from"@xyflow/react";import"zustand";import"javascript-time-ago";import"./chunks/vendor-0965fadc.js";import"react-dom";import"react-error-boundary";import"lottie-react";import"prism-react-renderer";const Qa=e=>{const{type:t,name:a,notes:i,signals:n,disabled:o,fields:{collectContainerAttributes:l,collectReplicaSetAttributes:r,collectWorkloadId:s,collectClusterId:c,labelsAttributes:d,annotationsAttributes:u,clusterAttributes:p,overwriteExistingValues:v,attributeNamesToDelete:b,renames:f,piiCategories:x,fallbackSamplingRatio:S,samplingPercentage:$,endpointsFilters:k,servicesNameFilters:C,attributeFilters:w}}=e,D=[{title:m.TYPE,value:t},{type:h.ActiveStatus,title:m.STATUS,value:String(!o)},{type:h.Monitors,title:m.SIGNALS_FOR_PROCESSING,value:n?.map(e=>e.toLowerCase()).join(", ")||""},{title:m.NAME,value:a||""},{title:m.NOTES,value:i||""},{type:h.Divider}];if(t===g.K8sAttributes&&(D.push({title:"Collect Container Attributes",value:String(l)}),D.push({title:"Collect ReplicaSet Attributes",value:String(r)}),D.push({title:"Collect Workload ID",value:String(s)}),D.push({title:"Collect Cluster ID",value:String(c)}),d?.length&&D.push({type:h.Divider}),d?.forEach(({labelKey:e,attributeKey:t,from:a,fromSources:i},n)=>{let o="";o+=`Label Key: ${e}\n`,o+=`Attribute Key: ${t}\n`,o+=`From: ${i?.length?i.join(", "):a||y.Pod}\n`,D.push({title:"Label"+(d.length>1?` #${n+1}`:""),value:o})}),u?.length&&D.push({type:h.Divider}),u?.forEach(({annotationKey:e,attributeKey:t,from:a,fromSources:i},n)=>{let o="";o+=`Annotation Key: ${e}\n`,o+=`Attribute Key: ${t}\n`,o+=`From: ${i?.length?i.join(", "):a||y.Pod}\n`,D.push({title:"Annotation"+(u.length>1?` #${n+1}`:""),value:o})})),t===g.AddClusterInfo){D.push({title:"Overwrite Existing Values",value:String(v||!1)});let e="";p?.forEach(({attributeName:t,attributeStringValue:a},i)=>{e+=`${t}: ${a}`,i<p.length-1&&(e+=", ")}),D.push({title:"Attributes",value:e})}if(t===g.DeleteAttributes){let e="";b?.forEach((t,a)=>{e+=t,a<b.length-1&&(e+=", ")}),D.push({title:"Attributes",value:e})}if(t===g.RenameAttributes){let e="";const t=Object.entries(f||{});t.forEach(([a,i],n)=>{e+=`${a}: ${i}`,n<t.length-1&&(e+=", ")}),D.push({title:"Attributes",value:e})}if(t===g.PiiMasking){let e="";x?.forEach((t,a)=>{e+=t,a<x.length-1&&(e+=", ")}),D.push({title:"Categories",value:e})}return t===g.ErrorSampler&&D.push({title:"Sampling Ratio",value:String(S)}),t===g.ProbabilisticSampler&&D.push({title:"Sampling Percentage",value:String($)}),t===g.LatencySampler&&k?.forEach(({serviceName:e,httpRoute:t,minimumLatencyThreshold:a,fallbackSamplingRatio:i},n)=>{let o="";o+=`Service Name: ${e}\n`,o+=`HTTP Route: ${t}\n`,o+=`Min. Latency: ${a}\n`,o+=`Fallback Sampling Ratio: ${i}`,D.push({title:"Endpoint"+(k.length>1?` #${n+1}`:""),value:o})}),t===g.ServiceNameSampler&&C?.forEach(({serviceName:e,samplingRatio:t,fallbackSamplingRatio:a},i)=>{let n="";n+=`Service Name: ${e}\n`,n+=`Sampling Ratio: ${t}\n`,n+=`Fallback Sampling Ratio: ${a}`,D.push({title:"Filter"+(C.length>1?` #${i+1}`:""),value:n})}),t===g.SpanAttributeSampler&&w?.forEach(({serviceName:e,attributeKey:t,fallbackSamplingRatio:a,condition:i},n)=>{let o="";o+=`Service Name: ${e}\n`,o+=`Attribute Key: ${t}\n`,o+=`Fallback Sampling Ratio: ${a}\n`;const l=Object.keys(i)[0];o+=`Condition: ${l}\n`,o+=`Operation: ${i[l]?.operation}\n`,o+=`Expected Value: ${i[l]?.expectedValue}`,"jsonCondition"===l&&(o+=`\nJSON Path: ${i[l].jsonPath}`),D.push({title:"Filter"+(w.length>1?` #${n+1}`:""),value:o})}),D},ei=x.PiiCategories,ti=d.div`
1
+ import e,{useState as t,useEffect as a,forwardRef as i,useRef as n,useImperativeHandle as o,useMemo as l,Fragment as r,useCallback as s,Children as c}from"react";import d,{css as u,useTheme as p}from"styled-components";import{a1 as m,a2 as h,a3 as g,a4 as y,a5 as v,a6 as b,a7 as f,a8 as x,a9 as S,aa as $,ab as k,ac as C,ad as w,ae as D,af as T,ag as N,ah as E,H as O,ai as A,aj as F,ak as I,al as M,am as R,an as L,ao as P,ap as j,aq as K,ar as V,as as q,E as H,at as z,au as B,av as W,aw as _,ax as J,ay as U,az as G,aA as Y,F as X,aB as Z,aC as Q,aD as ee,aE as te,aF as ae,S as ie,aG as ne,aH as oe,aI as le,aJ as re,aK as se,a as ce,aL as de,c as ue,aM as pe,aN as me,aO as he,aP as ge,aQ as ye,aR as ve,aS as be,aT as fe,aU as xe,aV as Se,aW as $e,aX as ke,aY as Ce,j as we,N as De,aZ as Te,a_ as Ne,a$ as Ee,b0 as Oe,q as Ae,b1 as Fe,b2 as Ie,b3 as Me,b4 as Re,b5 as Le,b6 as Pe,b7 as je,b8 as Ke,b9 as Ve,g as qe,P as He,ba as ze,bb as Be,u as We,bc as _e,bd as Je,be as Ue,bf as Ge,bg as Ye,bh as Xe,bi as Ze,bj as Qe,bk as et,bl as tt,bm as at,bn as it,bo as nt,bp as ot,bq as lt,br as rt,bs as st,bt as ct,bu as dt,D as ut,bv as pt,bw as mt,bx as ht,by as gt,bz as yt,bA as vt,bB as bt,bC as ft,bD as xt,bE as St,bF as $t,bG as kt,bH as Ct,h as wt,bI as Dt,bJ as Tt,bK as Nt,bL as Et,bM as Ot,bN as At,bO as Ft,bP as It,bQ as Mt,bR as Rt,bS as Lt,bT as Pt,bU as jt,bV as Kt,bW as Vt,bX as qt,r as Ht,bY as zt,bZ as Bt,b_ as Wt,b$ as _t,c0 as Jt,c1 as Ut,c2 as Gt,c3 as Yt,c4 as Xt,c5 as Zt,c6 as Qt,Y as ea,c7 as ta,v as aa,c8 as ia,c9 as na,ca as oa,cb as la,cc as ra,cd as sa,ce as ca,cf as da,cg as ua,ch as pa,ci as ma,p as ha,cj as ga,ck as ya,cl as va,cm as ba,cn as fa,co as xa,cp as Sa}from"./chunks/ui-components-917db301.js";import{VSquareIcon as $a,XSquareIcon as ka,EditIcon as Ca,TrashIcon as wa,OdigosLogoText as Da,PlusIcon as Ta,RefreshIcon as Na,SearchIcon as Ea,FilterIcon as Oa,DataStreamIcon as Aa,VIcon as Fa,OdigosLogo as Ia,ArrowIcon as Ma,RefreshLeftArrowIcon as Ra,NotificationIcon as La,UserIcon as Pa,ImageErrorIcon as ja,OverviewIcon as Ka,InstrumentationRuleIcon as Va,ActionIcon as qa,SourceIcon as Ha,DestinationIcon as za,SlackLogo as Ba,KeyIcon as Wa,TerminalIcon as _a,ExclamationTriangleIcon as Ja,TraceViewIcon as Ua}from"./icons.js";import{MarkerType as Ga,useNodesState as Ya,useEdgesState as Xa,applyNodeChanges as Za}from"@xyflow/react";import"zustand";import"javascript-time-ago";import"./chunks/vendor-0965fadc.js";import"react-dom";import"react-error-boundary";import"lottie-react";import"prism-react-renderer";const Qa=e=>{const{type:t,name:a,notes:i,signals:n,disabled:o,fields:{collectContainerAttributes:l,collectReplicaSetAttributes:r,collectWorkloadId:s,collectClusterId:c,labelsAttributes:d,annotationsAttributes:u,clusterAttributes:p,overwriteExistingValues:v,attributeNamesToDelete:b,renames:f,piiCategories:x,fallbackSamplingRatio:S,samplingPercentage:$,endpointsFilters:k,servicesNameFilters:C,attributeFilters:w}}=e,D=[{title:m.TYPE,value:t},{type:h.ActiveStatus,title:m.STATUS,value:String(!o)},{type:h.Monitors,title:m.SIGNALS_FOR_PROCESSING,value:n?.map(e=>e.toLowerCase()).join(", ")||""},{title:m.NAME,value:a||""},{title:m.NOTES,value:i||""},{type:h.Divider}];if(t===g.K8sAttributes&&(D.push({title:"Collect Container Attributes",value:String(l)}),D.push({title:"Collect ReplicaSet Attributes",value:String(r)}),D.push({title:"Collect Workload ID",value:String(s)}),D.push({title:"Collect Cluster ID",value:String(c)}),d?.length&&D.push({type:h.Divider}),d?.forEach(({labelKey:e,attributeKey:t,from:a,fromSources:i},n)=>{let o="";o+=`Label Key: ${e}\n`,o+=`Attribute Key: ${t}\n`,o+=`From: ${i?.length?i.join(", "):a||y.Pod}\n`,D.push({title:"Label"+(d.length>1?` #${n+1}`:""),value:o})}),u?.length&&D.push({type:h.Divider}),u?.forEach(({annotationKey:e,attributeKey:t,from:a,fromSources:i},n)=>{let o="";o+=`Annotation Key: ${e}\n`,o+=`Attribute Key: ${t}\n`,o+=`From: ${i?.length?i.join(", "):a||y.Pod}\n`,D.push({title:"Annotation"+(u.length>1?` #${n+1}`:""),value:o})})),t===g.AddClusterInfo){D.push({title:"Overwrite Existing Values",value:String(v||!1)});let e="";p?.forEach(({attributeName:t,attributeStringValue:a},i)=>{e+=`${t}: ${a}`,i<p.length-1&&(e+=", ")}),D.push({title:"Attributes",value:e})}if(t===g.DeleteAttributes){let e="";b?.forEach((t,a)=>{e+=t,a<b.length-1&&(e+=", ")}),D.push({title:"Attributes",value:e})}if(t===g.RenameAttributes){let e="";const t=Object.entries(f||{});t.forEach(([a,i],n)=>{e+=`${a}: ${i}`,n<t.length-1&&(e+=", ")}),D.push({title:"Attributes",value:e})}if(t===g.PiiMasking){let e="";x?.forEach((t,a)=>{e+=t,a<x.length-1&&(e+=", ")}),D.push({title:"Categories",value:e})}return t===g.ErrorSampler&&D.push({title:"Sampling Ratio",value:String(S)}),t===g.ProbabilisticSampler&&D.push({title:"Sampling Percentage",value:String($)}),t===g.LatencySampler&&k?.forEach(({serviceName:e,httpRoute:t,minimumLatencyThreshold:a,fallbackSamplingRatio:i},n)=>{let o="";o+=`Service Name: ${e}\n`,o+=`HTTP Route: ${t}\n`,o+=`Min. Latency: ${a}\n`,o+=`Fallback Sampling Ratio: ${i}`,D.push({title:"Endpoint"+(k.length>1?` #${n+1}`:""),value:o})}),t===g.ServiceNameSampler&&C?.forEach(({serviceName:e,samplingRatio:t,fallbackSamplingRatio:a},i)=>{let n="";n+=`Service Name: ${e}\n`,n+=`Sampling Ratio: ${t}\n`,n+=`Fallback Sampling Ratio: ${a}`,D.push({title:"Filter"+(C.length>1?` #${i+1}`:""),value:n})}),t===g.SpanAttributeSampler&&w?.forEach(({serviceName:e,attributeKey:t,fallbackSamplingRatio:a,condition:i},n)=>{let o="";o+=`Service Name: ${e}\n`,o+=`Attribute Key: ${t}\n`,o+=`Fallback Sampling Ratio: ${a}\n`;const l=Object.keys(i)[0];o+=`Condition: ${l}\n`,o+=`Operation: ${i[l]?.operation}\n`,o+=`Expected Value: ${i[l]?.expectedValue}`,"jsonCondition"===l&&(o+=`\nJSON Path: ${i[l].jsonPath}`),D.push({title:"Filter"+(w.length>1?` #${n+1}`:""),value:o})}),D},ei=x.PiiCategories,ti=d.div`
2
2
  display: flex;
3
3
  flex-direction: row;
4
4
  gap: 32px;
@@ -155,7 +155,7 @@ import e,{useState as t,useEffect as a,forwardRef as i,useRef as n,useImperative
155
155
  display: flex;
156
156
  align-items: center;
157
157
  overflow-x: scroll;
158
- `,nn=({onClose:i})=>{const n=O.useTheme(),{onClickNode:o}=Xe(),{searchText:s}=he(),{selectedStreamName:c}=We(),{sources:d,destinations:u,actions:p,instrumentationRules:m}=z(),{popupRef:h,popupOpen:g,setPopupOpen:y,popupPosition:v,handlePosition:b}=Ze();a(()=>{g||(b(0,50),y(!0))},[g]);const[f,x]=t("all"),{categories:S,searchResults:$}=l(()=>Ai({instrumentationRules:m,sources:Ue(d,c),actions:p,destinations:Ye(u,c),searchText:s,selectedCategory:f}),[m,d,p,u,c,s,f]);return $.length?e.createElement(Qe,{ref:h,isOpen:g,top:v.top,left:v.left,maxWidth:"420px",header:e.createElement(an,null,S.map(({category:t,label:a,count:i})=>!!i&&e.createElement(et,{key:`category-select-${t}`,label:a,badgeLabel:i,isSelected:f===t,onClick:()=>x(t)})))},$.map(({category:t,label:a,entities:l},s)=>!!l.length&&e.createElement(r,{key:`category-list-${t}`},e.createElement(tt,{style:{maxHeight:"all"!==f?"240px":"140px",padding:"12px 0"}},e.createElement(E,{size:12,family:"secondary",color:n.text.darker_grey,style:{marginLeft:"16px"}},a),l.map((a,n)=>e.createElement(et,{key:`entity-${s}-${n}`,icon:$e(t),label:ve(a,t,{extended:!0}),onClick:()=>{const e=W(a);o(null,{data:{type:t,id:e}}),i()},style:{width:"100%",justifyContent:"flex-start"},color:"transparent"}))),e.createElement(le,{thickness:s===$.length-1?0:1,length:"90%",margin:"8px auto"})))):e.createElement(Qe,{ref:h,isOpen:g,top:v.top,left:v.left},e.createElement(De,null))},on=({preventPopup:a=!1})=>{const{searchText:i,setSearchText:o}=he(),[l,r]=t(!1),s=!!i||l,c=()=>{o(""),r(!1)},d=n(null);return at(d,c),P({key:"Escape",active:s},c),e.createElement(tn,{ref:d},e.createElement(S,{placeholder:"Search",icon:Ea,value:i,onChange:e=>o(e.target.value.toLowerCase()),onFocus:()=>r(!0)}),s&&!a?e.createElement(nn,{onClose:c}):null)},ln=({sources:t,title:a="Condition",value:i,onSelect:n,onDeselect:o,...r})=>{const s=l(()=>{const e=[];return t.forEach(({conditions:t})=>{t?.forEach(({type:t,reason:a})=>{e.find(e=>e.id===`${t}#${a}`)||e.push({id:`${t}#${a}`,value:`${it(t)} - ${it(a)}`})})}),e.sort((e,t)=>e.id?.localeCompare(t.id||"")||0)},[t]);return e.createElement(nt,{disabled:!s?.length,title:a,placeholder:"All",options:s,value:i,onSelect:n,onDeselect:o,...r})},rn=({sources:t,title:a="Error Message",value:i,onSelect:n,onDeselect:o,disabled:r,...s})=>{const c=l(()=>{const e=[];return t.forEach(({conditions:t})=>{de(t||[]).forEach(({status:t,message:a,reason:i})=>{t!==ie.Error||e.find(e=>e.id===a)||(a?e.find(e=>e.id===a)||e.push({id:a,value:a}):i&&(e.find(e=>e.id===i)||e.push({id:i,value:i})))})}),e},[t]);return e.createElement(nt,{disabled:r||!c?.length,title:a,placeholder:"All",options:c,value:i,onSelect:n,onDeselect:o,...s})},sn=({sources:t,title:a="Programming Language",value:i,onSelect:n,onDeselect:o,...r})=>{const s=l(()=>{const e=[];return t.forEach(({containers:t})=>{t?.forEach(({language:t})=>{e.find(e=>e.id===t)||e.push({id:t,value:ot[t]||t})})}),e.sort((e,t)=>e.id?.localeCompare(t.id||"")||0)},[t]);return e.createElement(nt,{disabled:!s?.length,title:a,placeholder:"All",options:s,value:i,onSelect:n,onDeselect:o,...r})},cn=({title:t="Monitors",value:a,onSelect:i,onDeselect:n,...o})=>{const r=l(()=>{const e=[];return lt.forEach(({id:t,value:a})=>{e.find(e=>e.id===t)||e.push({id:t,value:a})}),e},[]);return e.createElement(nt,{disabled:!r?.length,title:t,placeholder:"All",options:r,value:a,onSelect:i,onDeselect:n,...o})},dn=({namespaces:t,title:a="Namespace",value:i,onSelect:n,onDeselect:o,...r})=>{const s=l(()=>{const e=[];return t?.forEach(({name:t})=>{e.find(e=>e.id===t)||e.push({id:t,value:t})}),e},[t]);return e.createElement(nt,{disabled:!s?.length,title:a,placeholder:"Select namespace",options:s,value:i,onSelect:n,onDeselect:o,...r})},un=({sources:t,title:a="Kind",value:i,onSelect:n,onDeselect:o,...r})=>{const s=l(()=>{const e=[];return t.forEach(({kind:t})=>{e.find(e=>e.id===t)||e.push({id:t,value:t})}),e},[t]);return e.createElement(nt,{disabled:!s?.length,title:a,placeholder:"All",options:s,value:i,onSelect:n,onDeselect:o,...r})},pn=({sources:t,title:a="Agent Injection Status",value:i,onSelect:n,onDeselect:o,disabled:r,...s})=>{const c=l(()=>{const e=[];return t.forEach(({podsAgentInjectionStatus:t})=>{const{status:a,message:i}=t||{};i&&!e.find(e=>e.id===i)&&e.push({id:i,value:`${a} - ${i}`})}),e},[t]);return e.createElement(nt,{disabled:r||!c?.length,title:a,placeholder:"All",options:c,value:i,onSelect:n,onDeselect:o,...s})},mn=d.div`
158
+ `,nn=({onClose:i})=>{const n=O.useTheme(),{onClickNode:o}=Xe(),{searchText:s}=he(),{selectedStreamName:c}=We(),{sources:d,destinations:u,actions:p,instrumentationRules:m}=z(),{popupRef:h,popupOpen:g,setPopupOpen:y,popupPosition:v,handlePosition:b}=Ze();a(()=>{g||(b(0,50),y(!0))},[g]);const[f,x]=t("all"),{categories:S,searchResults:$}=l(()=>Ai({instrumentationRules:m,sources:Ue(d,c),actions:p,destinations:Ye(u,c),searchText:s,selectedCategory:f}),[m,d,p,u,c,s,f]);return $.length?e.createElement(Qe,{ref:h,isOpen:g,top:v.top,left:v.left,maxWidth:"420px",header:e.createElement(an,null,S.map(({category:t,label:a,count:i})=>!!i&&e.createElement(et,{key:`category-select-${t}`,label:a,badgeLabel:i,isSelected:f===t,onClick:()=>x(t)})))},$.map(({category:t,label:a,entities:l},s)=>!!l.length&&e.createElement(r,{key:`category-list-${t}`},e.createElement(tt,{style:{maxHeight:"all"!==f?"240px":"140px",padding:"12px 0"}},e.createElement(E,{size:12,family:"secondary",color:n.text.darker_grey,style:{marginLeft:"16px"}},a),l.map((a,n)=>e.createElement(et,{key:`entity-${s}-${n}`,icon:$e(t),label:ve(a,t,{extended:!0}),onClick:()=>{const e=W(a);o(null,{data:{type:t,id:e}}),i()},style:{width:"100%",justifyContent:"flex-start"},color:"transparent"}))),e.createElement(le,{thickness:s===$.length-1?0:1,length:"90%",margin:"8px auto"})))):e.createElement(Qe,{ref:h,isOpen:g,top:v.top,left:v.left},e.createElement(De,null))},on=({preventPopup:a=!1})=>{const{searchText:i,setSearchText:o}=he(),[l,r]=t(!1),s=!!i||l,c=()=>{o(""),r(!1)},d=n(null);return at(d,c),P({key:"Escape",active:s},c),e.createElement(tn,{ref:d},e.createElement(S,{placeholder:"Search",icon:Ea,value:i,onChange:e=>o(e.target.value.toLowerCase()),onFocus:()=>r(!0)}),s&&!a?e.createElement(nn,{onClose:c}):null)},ln=({sources:t,title:a="Condition",value:i,onSelect:n,onDeselect:o,...r})=>{const s=l(()=>{const e=[];return t.forEach(({conditions:t})=>{t?.forEach(({type:t,reason:a})=>{e.find(e=>e.id===`${t}#${a}`)||e.push({id:`${t}#${a}`,value:`${it(t)} - ${it(a)}`})})}),e.sort((e,t)=>e.id?.localeCompare(t.id||"")||0)},[t]);return e.createElement(nt,{disabled:!s?.length,title:a,placeholder:"All",options:s,value:i,onSelect:n,onDeselect:o,...r})},rn=({sources:t,title:a="Error Message",value:i,onSelect:n,onDeselect:o,disabled:r,...s})=>{const c=l(()=>{const e=[];return t.forEach(({conditions:t})=>{de(t||[]).forEach(({status:t,message:a,reason:i})=>{t!==ie.Error||e.find(e=>e.id===a)||(a?e.find(e=>e.id===a)||e.push({id:a,value:a}):i&&(e.find(e=>e.id===i)||e.push({id:i,value:i})))})}),e},[t]);return e.createElement(nt,{disabled:r||!c?.length,title:a,placeholder:"All",options:c,value:i,onSelect:n,onDeselect:o,...s})},sn=({sources:t,title:a="Programming Language",value:i,onSelect:n,onDeselect:o,...r})=>{const s=l(()=>{const e=[];return t.forEach(({containers:t})=>{t?.forEach(({language:t})=>{e.find(e=>e.id===t)||e.push({id:t,value:ot[t]||t})})}),e.sort((e,t)=>e.id?.localeCompare(t.id||"")||0)},[t]);return e.createElement(nt,{disabled:!s?.length,title:a,placeholder:"All",options:s,value:i,onSelect:n,onDeselect:o,...r})},cn=({title:t="Monitors",value:a,onSelect:i,onDeselect:n,...o})=>{const r=l(()=>{const e=[];return lt.forEach(({id:t,value:a})=>{e.find(e=>e.id===t)||e.push({id:t,value:a})}),e},[]);return e.createElement(nt,{disabled:!r?.length,title:t,placeholder:"All",options:r,value:a,onSelect:i,onDeselect:n,...o})},dn=({namespaces:t,title:a="Namespace",value:i,onSelect:n,onDeselect:o,...r})=>{const s=l(()=>{const e=[];return t?.forEach(({name:t})=>{e.find(e=>e.id===t)||e.push({id:t,value:t})}),e},[t]);return e.createElement(nt,{disabled:!s?.length,title:a,placeholder:"Select namespace",options:s,value:i,onSelect:n,onDeselect:o,...r})},un=({sources:t,title:a="Kind",value:i,onSelect:n,onDeselect:o,...r})=>{const s=l(()=>{const e=[];return t.forEach(({kind:t})=>{e.find(e=>e.id===t)||e.push({id:t,value:t})}),e},[t]);return e.createElement(nt,{disabled:!s?.length,title:a,placeholder:"All",options:s,value:i,onSelect:n,onDeselect:o,...r})},pn=({sources:t,title:a="Agent Injection Status",value:i,onSelect:n,onDeselect:o,disabled:r,...s})=>{const c=l(()=>{const e=[];return t.forEach(({podsAgentInjectionStatus:t})=>{const{reasonEnum:a,message:i}=t||{};a?e.find(e=>e.id===a)||e.push({id:a,value:it(a)}):i&&(e.find(e=>e.id===i)||e.push({id:i,value:i}))}),e},[t]);return e.createElement(nt,{disabled:r||!c?.length,title:a,placeholder:"All",options:c,value:i,onSelect:n,onDeselect:o,...s})},mn=d.div`
159
159
  display: flex;
160
160
  flex-direction: column;
161
161
  gap: 12px;
package/lib/contexts.js CHANGED
@@ -1 +1 @@
1
- export{d2 as OdigosProvider,_ as useOdigos}from"./chunks/ui-components-e54e1ba5.js";import"./icons.js";import"react";import"styled-components";import"zustand";import"javascript-time-ago";import"./chunks/vendor-0965fadc.js";import"react-dom";import"@xyflow/react";import"react-error-boundary";import"lottie-react";import"prism-react-renderer";
1
+ export{d2 as OdigosProvider,_ as useOdigos}from"./chunks/ui-components-917db301.js";import"./icons.js";import"react";import"styled-components";import"zustand";import"javascript-time-ago";import"./chunks/vendor-0965fadc.js";import"react-dom";import"@xyflow/react";import"react-error-boundary";import"lottie-react";import"prism-react-renderer";
package/lib/functions.js CHANGED
@@ -1 +1 @@
1
- export{bG as capitalizeFirstLetter,cI as cleanObjectEmptyStringsValues,bB as compareCondition,h as deepClone,aP as filterActions,bf as filterDestinations,bg as filterDestinationsByStream,bd as filterSources,be as filterSourcesByStream,cJ as flattenObjectKeys,b4 as formatBytes,cm as formatDuration,v as generateId,ax as getActionIcon,aJ as getConditionsBooleans,b8 as getContainersIcons,cg as getContainersInstrumentedCount,b7 as getDestinationIcon,aW as getEntityIcon,av as getEntityId,aR as getEntityLabel,cK as getIdFromSseTarget,b6 as getInstrumentationRuleIcon,cL as getMainContainerLanguage,bK as getMetricForEntity,cM as getMonitorIcon,cN as getPlatformIcon,cO as getPlatformLabel,bT as getProgrammingLanguageIcon,co as getRecursiveValues,cP as getSseTargetFromId,cQ as getStatusColor,J as getStatusFromPodStatus,aN as getStatusIcon,c2 as getStatusTypeFromOdigosHealth,cR as getValueForRange,bX as getWorkloadId,bF as getYamlFieldsForDestination,c3 as hasUnhealthyInstances,ab as isEmpty,cS as isLegalK8sLabel,ch as isOverTime,c8 as isStringABoolean,cT as isTimeElapsed,cU as isValidVersion,aL as mapConditions,bA as mapDestinationFieldsForDisplay,b3 as mapExportedSignals,cV as numbersOnly,c9 as parseBooleanFromString,cW as parseJsonStringToPrettyString,cX as removeEmptyValuesFromObject,bC as safeJsonParse,cY as safeJsonStringify,a$ as sleep,bn as splitCamelString,cZ as stringifyNonStringValues,c_ as trimVersion}from"./chunks/ui-components-e54e1ba5.js";import"./icons.js";import"react";import"styled-components";import"zustand";import"javascript-time-ago";import"./chunks/vendor-0965fadc.js";import"react-dom";import"@xyflow/react";import"react-error-boundary";import"lottie-react";import"prism-react-renderer";
1
+ export{bG as capitalizeFirstLetter,cI as cleanObjectEmptyStringsValues,bB as compareCondition,h as deepClone,aP as filterActions,bf as filterDestinations,bg as filterDestinationsByStream,bd as filterSources,be as filterSourcesByStream,cJ as flattenObjectKeys,b4 as formatBytes,cm as formatDuration,v as generateId,ax as getActionIcon,aJ as getConditionsBooleans,b8 as getContainersIcons,cg as getContainersInstrumentedCount,b7 as getDestinationIcon,aW as getEntityIcon,av as getEntityId,aR as getEntityLabel,cK as getIdFromSseTarget,b6 as getInstrumentationRuleIcon,cL as getMainContainerLanguage,bK as getMetricForEntity,cM as getMonitorIcon,cN as getPlatformIcon,cO as getPlatformLabel,bT as getProgrammingLanguageIcon,co as getRecursiveValues,cP as getSseTargetFromId,cQ as getStatusColor,J as getStatusFromPodStatus,aN as getStatusIcon,c2 as getStatusTypeFromOdigosHealth,cR as getValueForRange,bX as getWorkloadId,bF as getYamlFieldsForDestination,c3 as hasUnhealthyInstances,ab as isEmpty,cS as isLegalK8sLabel,ch as isOverTime,c8 as isStringABoolean,cT as isTimeElapsed,cU as isValidVersion,aL as mapConditions,bA as mapDestinationFieldsForDisplay,b3 as mapExportedSignals,cV as numbersOnly,c9 as parseBooleanFromString,cW as parseJsonStringToPrettyString,cX as removeEmptyValuesFromObject,bC as safeJsonParse,cY as safeJsonStringify,a$ as sleep,bn as splitCamelString,cZ as stringifyNonStringValues,c_ as trimVersion}from"./chunks/ui-components-917db301.js";import"./icons.js";import"react";import"styled-components";import"zustand";import"javascript-time-ago";import"./chunks/vendor-0965fadc.js";import"react-dom";import"@xyflow/react";import"react-error-boundary";import"lottie-react";import"prism-react-renderer";
package/lib/hooks.js CHANGED
@@ -1 +1 @@
1
- export{au as useActionFormData,d3 as useBodyScroll,bh as useClickNode,bY as useClickNotification,bb as useConnection,bc as useContainerSize,ci as useCopy,bt as useDataStreamFormData,bE as useDestinationFormData,p as useGenericForm,d4 as useInfiniteScroll,bV as useInstrumentationRuleFormData,ao as useKeyDown,bm as useOnClickOutside,bi as usePopup,bs as useSessionStorage,ca as useSourceFormData,ce as useSourceSelectionFormData,r as useTimeAgo}from"./chunks/ui-components-e54e1ba5.js";import"./icons.js";import"react";import"styled-components";import"zustand";import"javascript-time-ago";import"./chunks/vendor-0965fadc.js";import"react-dom";import"@xyflow/react";import"react-error-boundary";import"lottie-react";import"prism-react-renderer";
1
+ export{au as useActionFormData,d3 as useBodyScroll,bh as useClickNode,bY as useClickNotification,bb as useConnection,bc as useContainerSize,ci as useCopy,bt as useDataStreamFormData,bE as useDestinationFormData,p as useGenericForm,d4 as useInfiniteScroll,bV as useInstrumentationRuleFormData,ao as useKeyDown,bm as useOnClickOutside,bi as usePopup,bs as useSessionStorage,ca as useSourceFormData,ce as useSourceSelectionFormData,r as useTimeAgo}from"./chunks/ui-components-917db301.js";import"./icons.js";import"react";import"styled-components";import"zustand";import"javascript-time-ago";import"./chunks/vendor-0965fadc.js";import"react-dom";import"@xyflow/react";import"react-error-boundary";import"lottie-react";import"prism-react-renderer";
package/lib/snippets.js CHANGED
@@ -1 +1 @@
1
- export{bx as AddButton,c4 as CopyText,c0 as EditButton,b_ as Flow,d5 as MapItemNode,d6 as NoDataNode,by as NoteBackToSummary,c6 as PodContainer,cb as SourceContainer}from"./chunks/ui-components-e54e1ba5.js";import"./icons.js";import"react";import"styled-components";import"zustand";import"javascript-time-ago";import"./chunks/vendor-0965fadc.js";import"react-dom";import"@xyflow/react";import"react-error-boundary";import"lottie-react";import"prism-react-renderer";
1
+ export{bx as AddButton,c4 as CopyText,c0 as EditButton,b_ as Flow,d5 as MapItemNode,d6 as NoDataNode,by as NoteBackToSummary,c6 as PodContainer,cb as SourceContainer}from"./chunks/ui-components-917db301.js";import"./icons.js";import"react";import"styled-components";import"zustand";import"javascript-time-ago";import"./chunks/vendor-0965fadc.js";import"react-dom";import"@xyflow/react";import"react-error-boundary";import"lottie-react";import"prism-react-renderer";
package/lib/store.js CHANGED
@@ -1 +1 @@
1
- export{P as ProgressKeys,d1 as useActiveNodeStore,cl as useDarkMode,u as useDataStreamStore,an as useDrawerStore,at as useEntityStore,aO as useFilterStore,aB as useModalStore,bU as useNotificationStore,g as useProgressStore,b1 as useSelectedStore,bu as useSetupStore}from"./chunks/ui-components-e54e1ba5.js";import"./icons.js";import"react";import"styled-components";import"zustand";import"javascript-time-ago";import"./chunks/vendor-0965fadc.js";import"react-dom";import"@xyflow/react";import"react-error-boundary";import"lottie-react";import"prism-react-renderer";
1
+ export{P as ProgressKeys,d1 as useActiveNodeStore,cl as useDarkMode,u as useDataStreamStore,an as useDrawerStore,at as useEntityStore,aO as useFilterStore,aB as useModalStore,bU as useNotificationStore,g as useProgressStore,b1 as useSelectedStore,bu as useSetupStore}from"./chunks/ui-components-917db301.js";import"./icons.js";import"react";import"styled-components";import"zustand";import"javascript-time-ago";import"./chunks/vendor-0965fadc.js";import"react-dom";import"@xyflow/react";import"react-error-boundary";import"lottie-react";import"prism-react-renderer";
package/lib/theme.js CHANGED
@@ -1 +1 @@
1
- export{H as default}from"./chunks/ui-components-e54e1ba5.js";import"styled-components";import"./icons.js";import"react";import"zustand";import"javascript-time-ago";import"./chunks/vendor-0965fadc.js";import"react-dom";import"@xyflow/react";import"react-error-boundary";import"lottie-react";import"prism-react-renderer";
1
+ export{H as default}from"./chunks/ui-components-917db301.js";import"styled-components";import"./icons.js";import"react";import"zustand";import"javascript-time-ago";import"./chunks/vendor-0965fadc.js";import"react-dom";import"@xyflow/react";import"react-error-boundary";import"lottie-react";import"prism-react-renderer";
package/lib/types.js CHANGED
@@ -1 +1 @@
1
- export{cq as ActionCategory,a8 as ActionKeyTypes,a3 as ActionType,cD as AddNodeTypes,ct as BooleanOperation,bP as CodeAttributesKeyTypes,aA as Crud,bN as CustomInstrumentationsKeyTypes,b9 as DesiredStateProgress,cE as DestinationTypes,cC as EdgeTypes,E as EntityTypes,ag as FieldTypes,bO as GolangCustomProbe,bL as HeadersCollectionKeyTypes,aa as InputTypes,cz as InstallationMethod,bR as InstrumentationRuleType,cA as IntrumentationStatus,bM as JavaCustomProbe,cu as JsonOperation,a4 as K8sAttributesFrom,cc as K8sResourceKind,cv as ListDirection,bZ as NodeTypes,cs as NumberOperation,bz as OtherEntityTypes,aM as OtherStatus,O as OtherStatusType,bQ as PayloadCollectionKeyTypes,cy as PlatformType,cH as PodContainerLifecycleStatus,cG as PodContainerStatus,cF as PodPhase,cB as Profile,cd as ProgrammingLanguages,bD as SignalType,cw as SortDirection,S as StatusType,cr as StringOperation,cx as Tier,Z as WorkloadRolloutStatus}from"./chunks/ui-components-e54e1ba5.js";import"./icons.js";import"react";import"styled-components";import"zustand";import"javascript-time-ago";import"./chunks/vendor-0965fadc.js";import"react-dom";import"@xyflow/react";import"react-error-boundary";import"lottie-react";import"prism-react-renderer";
1
+ export{cq as ActionCategory,a8 as ActionKeyTypes,a3 as ActionType,cD as AddNodeTypes,ct as BooleanOperation,bP as CodeAttributesKeyTypes,aA as Crud,bN as CustomInstrumentationsKeyTypes,b9 as DesiredStateProgress,cE as DestinationTypes,cC as EdgeTypes,E as EntityTypes,ag as FieldTypes,bO as GolangCustomProbe,bL as HeadersCollectionKeyTypes,aa as InputTypes,cz as InstallationMethod,bR as InstrumentationRuleType,cA as IntrumentationStatus,bM as JavaCustomProbe,cu as JsonOperation,a4 as K8sAttributesFrom,cc as K8sResourceKind,cv as ListDirection,bZ as NodeTypes,cs as NumberOperation,bz as OtherEntityTypes,aM as OtherStatus,O as OtherStatusType,bQ as PayloadCollectionKeyTypes,cy as PlatformType,cH as PodContainerLifecycleStatus,cG as PodContainerStatus,cF as PodPhase,cB as Profile,cd as ProgrammingLanguages,bD as SignalType,cw as SortDirection,S as StatusType,cr as StringOperation,cx as Tier,Z as WorkloadRolloutStatus}from"./chunks/ui-components-917db301.js";import"./icons.js";import"react";import"styled-components";import"zustand";import"javascript-time-ago";import"./chunks/vendor-0965fadc.js";import"react-dom";import"@xyflow/react";import"react-error-boundary";import"lottie-react";import"prism-react-renderer";
package/lib/visuals.js CHANGED
@@ -1 +1 @@
1
- export{dl as VISUAL_ODIGOS_LOGO_HEIGHT,dk as VISUAL_ODIGOS_LOGO_WIDTH,dm as VisualOdigosLogo,dn as VisualStar,dp as VisualSuccess}from"./chunks/ui-components-e54e1ba5.js";import"./icons.js";import"react";import"styled-components";import"zustand";import"javascript-time-ago";import"./chunks/vendor-0965fadc.js";import"react-dom";import"@xyflow/react";import"react-error-boundary";import"lottie-react";import"prism-react-renderer";
1
+ export{dl as VISUAL_ODIGOS_LOGO_HEIGHT,dk as VISUAL_ODIGOS_LOGO_WIDTH,dm as VisualOdigosLogo,dn as VisualStar,dp as VisualSuccess}from"./chunks/ui-components-917db301.js";import"./icons.js";import"react";import"styled-components";import"zustand";import"javascript-time-ago";import"./chunks/vendor-0965fadc.js";import"react-dom";import"@xyflow/react";import"react-error-boundary";import"lottie-react";import"prism-react-renderer";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odigos/ui-kit",
3
- "version": "0.0.168",
3
+ "version": "0.0.170",
4
4
  "author": "Odigos",
5
5
  "license": "MIT",
6
6
  "repository": {