@odigos/ui-kit 0.0.253 → 0.0.254
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/lib/chunks/connections-scope-DDNmfpzA.js +1 -0
- package/lib/chunks/{flow-BnkrFBJL.js → flow-Bu1VbeQt.js} +1 -1
- package/lib/chunks/{helpers-BEkhis3j.js → helpers-Cy9W3KCg.js} +1 -1
- package/lib/chunks/{index-DIVbcB6F.js → index-D2nQHheF.js} +1 -1
- package/lib/chunks/{source-instrument-form-context-6ViZM1Z_.js → source-instrument-form-context-BJGS7jKX.js} +1 -1
- package/lib/chunks/{ui-components-TeG65JGy.js → ui-components-D_eeOuIL.js} +6 -6
- package/lib/chunks/use-odigos-api-W15RTo5l.js +5 -0
- package/lib/components/v2.js +1 -1
- package/lib/components.js +1 -1
- package/lib/constants/strings/index.d.ts +2 -1
- package/lib/constants.js +1 -1
- package/lib/containers/v2.js +7 -7
- package/lib/containers.js +6 -6
- package/lib/contexts/odigos-api/index.d.ts +1 -0
- package/lib/contexts/odigos-api/platform-helpers.d.ts +4 -2
- package/lib/contexts/odigos-api/types.d.ts +15 -1
- package/lib/contexts/odigos-api.js +1 -1
- package/lib/contexts.js +1 -1
- package/lib/functions.js +1 -1
- package/lib/hooks.js +1 -1
- package/lib/snippets/v2.js +1 -1
- package/lib/snippets.js +1 -1
- package/lib/store.js +1 -1
- package/lib/theme.js +1 -1
- package/lib/types.js +1 -1
- package/lib/visuals.js +1 -1
- package/package.json +1 -1
- package/lib/chunks/connections-scope-h3bbPbRd.js +0 -1
- package/lib/chunks/use-odigos-api-li2VrVHH.js +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.254](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.253...ui-kit-v0.0.254) (2026-06-18)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* init vm aligments ([#1010](https://github.com/odigos-io/ui-kit/issues/1010)) ([4b7265f](https://github.com/odigos-io/ui-kit/commit/4b7265fa6f74248512b9391a793be56a0996da24))
|
|
9
|
+
* React encountered two children with the same key ([#1009](https://github.com/odigos-io/ui-kit/issues/1009)) ([1b51af5](https://github.com/odigos-io/ui-kit/commit/1b51af5080a4750e0801a2991b622c1af12c1806))
|
|
10
|
+
|
|
3
11
|
## [0.0.253](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.252...ui-kit-v0.0.253) (2026-06-17)
|
|
4
12
|
|
|
5
13
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{useMemo as n}from"react";import{e as t,_ as e}from"./use-odigos-api-W15RTo5l.js";const r=({connectionIds:r,children:i})=>{const s=t(),a=n(()=>({operations:s.operations,context:{...s.context,connectionIds:r},apolloConfig:s.apolloConfig}),[s.operations,s.context,s.apolloConfig,r.join(",")]);return o(e.Provider,{value:a,children:i})};export{r as O};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as e,jsxs as o,Fragment as t}from"react/jsx-runtime";import{memo as i,useRef as r,useEffect as n}from"react";import"@xyflow/react/dist/style.css";import d,{useTheme as s}from"styled-components";import{N as a,F as l,I as c,T as p,S as h,g as m,u,a as g,b}from"./ui-components-
|
|
1
|
+
import{jsx as e,jsxs as o,Fragment as t}from"react/jsx-runtime";import{memo as i,useRef as r,useEffect as n}from"react";import"@xyflow/react/dist/style.css";import d,{useTheme as s}from"styled-components";import{N as a,F as l,I as c,T as p,S as h,g as m,u,a as g,b}from"./ui-components-D_eeOuIL.js";import{Handle as x,Position as f,ReactFlowProvider as y,ReactFlow as w,Controls as v,ControlButton as N,useReactFlow as k}from"@xyflow/react";import{RefreshIcon as $}from"../icons.js";const C=d(l)`
|
|
2
2
|
max-width: 300px;
|
|
3
3
|
padding: 12px;
|
|
4
4
|
border-radius: 12px;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import{useMemo as n,useContext as o,createContext as a,Fragment as s}from"react";import{t as i,c as u,P as l,d as c,e as p,f as d,h as f}from"./ui-components-
|
|
1
|
+
import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import{useMemo as n,useContext as o,createContext as a,Fragment as s}from"react";import{t as i,c as u,P as l,d as c,e as p,f as d,h as f}from"./ui-components-D_eeOuIL.js";import h from"styled-components";const m=a({platformType:l.K8s,tier:u.Community,version:"v0.0.0"}),v=({children:t,platformType:r,tier:o,version:a})=>{const s=n(()=>({platformType:r,tier:o,version:a}),[r,o,a]);return e(m.Provider,{value:s,children:t})},g=(e,t)=>!t||i(e)>=i(t),y=e=>{const t=o(m),r=g(t.version,e),n=t.platformType===l.Vm;return{...t,isVersionSupported:r,isVm:n,isEnterprise:t.tier===u.Onprem}};function x(){return{sources:[],namespaces:[],languages:[]}}function k(e){return!e||!e.sources?.length&&!e.namespaces?.length&&!e.languages?.length}function S(e){return e?{sources:e.sources?[...e.sources]:[],namespaces:e.namespaces?[...e.namespaces]:[],languages:e.languages?[...e.languages]:[]}:{sources:[],namespaces:[],languages:[]}}function A(e){return null==e||0===e}function T(e){return{name:"",notes:"",disabled:!1,ruleType:"Relevance",sourceScopes:{sources:[],namespaces:[],languages:[]},operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:"",durationPreset:"500",customDurationMs:"",keepErrors:!1,percentageMode:"costReduction"===e?"sample":"all",percentagePreset:"0",customPercentage:""}}function R(e){return k(e.sourceScopes)?null:e.sourceScopes}function P(e){return R(e)}function b(e){if("all"===e.percentageMode)return null;if("custom"===e.percentagePreset){const t=parseFloat(e.customPercentage);return isNaN(t)?null:t}return parseFloat(e.percentagePreset)}function M(e){if("custom"===e.durationPreset){const t=parseFloat(e.customDurationMs);return isNaN(t)?null:t}return parseInt(e.durationPreset,10)}function D(e){return{httpServer:{[e.routeType]:e.route||null,method:e.method||null}}}function I(e){return"all"===e.operationType?null:"httpServer"===e.operationType?D(e):"httpClient"===e.operationType?{httpClient:{serverAddress:e.serverAddress||null,["route"===e.routeType?"templatedPath":"templatedPathPrefix"]:e.route||null,method:e.method||null}}:null}function $(e){return"all"===e.operationType?null:"httpServer"===e.operationType?D(e):"kafkaConsumer"===e.operationType?{kafkaConsumer:{kafkaTopic:e.kafkaTopic||null}}:"kafkaProducer"===e.operationType?{kafkaProducer:{kafkaTopic:e.kafkaTopic||null}}:null}function C(e){return{ruleId:"",name:e.name||null,disabled:!1,notes:e.notes||null,sourceScopes:R(e),percentageAtMost:b(e),operation:I(e)}}function E(e){return{ruleId:"",name:e.name||null,disabled:!1,notes:e.notes||null,sourceScopes:R(e),error:e.keepErrors,durationAtLeastMs:"Duration"===e.ruleType?M(e):null,percentageAtLeast:b(e),operation:$(e)}}function w(e){return{ruleId:"",name:e.name||null,disabled:!1,notes:e.notes||null,sourceScopes:R(e),percentageAtMost:b(e)??0,operation:$(e)}}function L(e){return{name:e.name||null,disabled:e.disabled,sourceScopes:P(e),operation:I(e),percentageAtMost:b(e),notes:e.notes||null}}function O(e){return{name:e.name||null,disabled:e.disabled,sourceScopes:P(e),error:"Error"===e.ruleType,durationAtLeastMs:"Duration"===e.ruleType?M(e):null,operation:$(e),percentageAtLeast:b(e),notes:e.notes||null}}function N(e){return{name:e.name||null,disabled:e.disabled,sourceScopes:P(e),operation:$(e),percentageAtMost:b(e)??0,notes:e.notes||null}}const H=["5000","1000","500","100","50"],K=["50","25","10","1","0.5","0.1","0"];function j(e){if(null==e)return{percentageMode:"all",percentagePreset:"0",customPercentage:""};const t=K.find(t=>Number(t)===e);return t?{percentageMode:"sample",percentagePreset:t,customPercentage:""}:{percentageMode:"sample",percentagePreset:"custom",customPercentage:String(e)}}function z(e){if(!e)return{operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:""};const t=e;if(t.httpServer){return{operationType:"httpServer",routeType:t.httpServer.routePrefix?"routePrefix":"route",route:t.httpServer.route||t.httpServer.routePrefix||"",serverAddress:"",method:t.httpServer.method||"",kafkaTopic:""}}return t.kafkaConsumer?{operationType:"kafkaConsumer",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:t.kafkaConsumer.kafkaTopic||""}:t.kafkaProducer?{operationType:"kafkaProducer",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:t.kafkaProducer.kafkaTopic||""}:{operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:""}}function F(e){const t=T(),r=S(e.rule.sourceScopes);const n=function(e){return"highlyRelevant"!==e.category?"Relevance":e.rule.error?"Error":null!=e.rule.durationAtLeastMs?"Duration":"Relevance"}(e);let o,a,s={durationPreset:"500",customDurationMs:""},i=!1;switch(e.category){case"noisy":o=function(e){const t=e.rule.operation;if(!t)return{operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:""};if(t.httpServer)return{operationType:"httpServer",routeType:t.httpServer.routePrefix?"routePrefix":"route",route:t.httpServer.route||t.httpServer.routePrefix||"",serverAddress:"",method:t.httpServer.method||"",kafkaTopic:""};if(t.httpClient)return{operationType:"httpClient",routeType:t.httpClient.templatedPathPrefix?"routePrefix":"route",route:t.httpClient.templatedPath||t.httpClient.templatedPathPrefix||"",serverAddress:t.httpClient.serverAddress||"",method:t.httpClient.method||"",kafkaTopic:""};return{operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:""}}(e),a=A(u=e.rule.percentageAtMost)?{percentageMode:"all",percentagePreset:"0",customPercentage:""}:j(u);break;case"highlyRelevant":o=z(e.rule.operation),a=j(e.rule.percentageAtLeast),s=function(e){if(null==e)return{durationPreset:"500",customDurationMs:""};const t=H.find(t=>Number(t)===e);return t?{durationPreset:t,customDurationMs:""}:{durationPreset:"custom",customDurationMs:String(e)}}(e.rule.durationAtLeastMs),i=e.rule.error;break;case"costReduction":o=z(e.rule.operation),a=j(e.rule.percentageAtMost)}var u;return{...t,name:e.rule.name||"",notes:e.rule.notes||"",disabled:e.rule.disabled,ruleType:n,sourceScopes:r,...o,...s,keepErrors:i,...a}}var X;!function(e){e.Default="default",e.Action="action",e.Endpoint="endpoint",e.Scope="scope",e.Duration="duration"}(X||(X={}));const J=[X.Action,X.Endpoint,X.Scope,X.Duration],V=h.span`
|
|
2
2
|
font-family: ${({theme:e,$isMono:t})=>t?e.font_family.secondary:e.font_family.primary};
|
|
3
3
|
font-size: ${({theme:e})=>e.v2.text.size.xxs}px;
|
|
4
4
|
line-height: 20px;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aA as e,ag as a,L as t,a9 as l,aa as r,dT as n,a5 as i,aN as s,ar as o,a7 as d,J as c,ab as u,an as p,dU as h,ae as g,af as m,dV as v,dW as f,V as b,Q as y,U as x,R as C,O as S,aw as $,au as k,b4 as T,c as w,n as A,F as P,a4 as M,ah as L,aJ as I,dX as O,dY as D,aU as z,dZ as N,f as X,d_ as R,ad as H,h as E,d$ as B,e0 as V,e1 as q,e2 as j,e3 as G,e4 as J,e5 as U,ak as K,e6 as F,e7 as W,e8 as Y,e9 as Q,ea as Z,bV as _,eb as ee,ec as ae,ed as te,ee as le,ef as re,eg as ne,eh as ie,ei as se,ej as oe,ek as de,el as ce,aK as ue,em as pe,en as he,eo as ge,ep as me,eq as ve,bI as fe,er as be,es as ye,et as xe,eu as Ce,ev as Se,ew as $e,ex as ke,ey as Te,ez as we,a_ as Ae,q as Pe,eA as Me,S as Le,eB as Ie,b5 as Oe,eC as De,eD as ze,eE as Ne,eF as Xe,by as Re,az as He,eG as Ee,eH as Be,eI as Ve,di as qe,eJ as je,eK as Ge,eL as Je,s as Ue,dg as Ke,a6 as Fe,eM as We,bk as Ye,aM as Qe,N as Ze,l as _e,aQ as ea,du as aa,bj as ta,bq as la,bi as ra,bY as na,eN as ia}from"./ui-components-
|
|
1
|
+
import{aA as e,ag as a,L as t,a9 as l,aa as r,dT as n,a5 as i,aN as s,ar as o,a7 as d,J as c,ab as u,an as p,dU as h,ae as g,af as m,dV as v,dW as f,V as b,Q as y,U as x,R as C,O as S,aw as $,au as k,b4 as T,c as w,n as A,F as P,a4 as M,ah as L,aJ as I,dX as O,dY as D,aU as z,dZ as N,f as X,d_ as R,ad as H,h as E,d$ as B,e0 as V,e1 as q,e2 as j,e3 as G,e4 as J,e5 as U,ak as K,e6 as F,e7 as W,e8 as Y,e9 as Q,ea as Z,bV as _,eb as ee,ec as ae,ed as te,ee as le,ef as re,eg as ne,eh as ie,ei as se,ej as oe,ek as de,el as ce,aK as ue,em as pe,en as he,eo as ge,ep as me,eq as ve,bI as fe,er as be,es as ye,et as xe,eu as Ce,ev as Se,ew as $e,ex as ke,ey as Te,ez as we,a_ as Ae,q as Pe,eA as Me,S as Le,eB as Ie,b5 as Oe,eC as De,eD as ze,eE as Ne,eF as Xe,by as Re,az as He,eG as Ee,eH as Be,eI as Ve,di as qe,eJ as je,eK as Ge,eL as Je,s as Ue,dg as Ke,a6 as Fe,eM as We,bk as Ye,aM as Qe,N as Ze,l as _e,aQ as ea,du as aa,bj as ta,bq as la,bi as ra,bY as na,eN as ia}from"./ui-components-D_eeOuIL.js";import{jsx as sa,jsxs as oa,Fragment as da}from"react/jsx-runtime";import{D as ca,C as ua,E as pa,u as ha,F as ga,h as ma,f as va,e as fa,G as ba,H as ya,I as xa,i as Ca,m as Sa}from"./helpers-Cy9W3KCg.js";import{EditIcon as $a,OdigosLogoTextCentral as ka,OdigosLogoTextEnterprise as Ta,OdigosLogoTextCommunity as wa,OdigosLogoTextColoredCentral as Aa,OdigosLogoTextColoredEnterprise as Pa,OdigosLogoTextColoredCommunity as Ma,ArrowLeftIcon as La,ArrowRightIcon as Ia,VSquareIcon as Oa,VIcon as Da,CopyIcon as za,YamlIcon as Na}from"../icons.js";import Xa,{useMemo as Ra,useCallback as Ha,useState as Ea,useRef as Ba,useEffect as Va,forwardRef as qa,useImperativeHandle as ja}from"react";import Ga,{useTheme as Ja}from"styled-components";const Ua=({isOpen:t,onClose:l,onDeny:r,onApprove:n})=>sa(e,{title:"Discard changes?",description:"You have unsaved changes.\nIf you cancel now, your changes won't be saved.",isOpen:t,onClose:l,denyButton:{label:"Keep editing",variant:a.Secondary,onClick:()=>{r?.(),l()}},approveButton:{label:"Discard changes",variant:a.Primary,onClick:()=>{n?.(),l()}}}),Ka=({isOpen:t,onClose:l,onDeny:r,onApprove:n,action:i="delete",target:s,description:o,overrideApproveButtonLabel:d,overrideDenyButtonLabel:c})=>{const u=i.charAt(0).toUpperCase()+i.substring(1),p=s?.endsWith("s")?"these":"this";return sa(e,{title:`${u}${s?` ${s}`:""}?`,description:o??`Are you sure you want to ${i}${s?` ${p} ${s}`:""}?`,isOpen:t,onClose:l,denyButton:{label:c??"Go back",variant:a.Secondary,onClick:()=>{r?.(),l()}},approveButton:{label:d??u,variant:a.Primary,onClick:()=>{n?.(),l()}}})},Fa=({componentType:e,inputType:a,name:g,label:m,tooltip:v,badge:f,placeholder:b,required:y,disabled:x,value:C,setValue:S,errorMessage:$,warnMessage:k,helpMessage:T,dropdownOptions:w,dropdownNoSearch:A,dropdownNoCheckbox:P,timeUnits:M,timeDefaultUnit:L})=>{switch(e){case t.Input:return sa(p,{name:g,type:a,label:m,tooltip:v,badge:f,placeholder:b,required:y,disabled:x,value:C??"",onChange:e=>{const t=e.target.value;S(a===h.Number?""===t?null:Number(t):t)},errorMessage:$,warnMessage:k,helpMessage:T},g);case t.MultiInput:return sa(u,{name:g,label:m,tooltip:v,badge:f,placeholder:b,required:y,disabled:x,values:Array.isArray(C)?C:c(C,[]),setValues:e=>S(e),errorMessage:$,warnMessage:k,helpMessage:T},g);case t.KeyValuePair:return sa(d,{name:g,label:m,tooltip:v,badge:f,required:y,disabled:x,limitFieldsPerRow:2,columns:[{keyName:"key",label:"Key",placeholder:"Key"},{keyName:"value",label:"Value",placeholder:"Value"}],values:Array.isArray(C)?C:c(C,[]),setValues:e=>S(e),errorMessage:$,warnMessage:k,helpMessage:T},g);case t.TextArea:return sa(o,{name:g,label:m,tooltip:v,badge:f,required:y,disabled:x,placeholder:b,value:C??"",onChange:e=>S(e.target.value),errorMessage:$,warnMessage:k,helpMessage:T},g);case t.Dropdown:return sa(s,{name:g,label:m,tooltip:v,badge:f,placeholder:b,required:y,disabled:x,withSearch:!A,options:w?.map(e=>({id:e.id||"",label:e.label||"",withCheckbox:!P}))||[],values:C?[String(C)]:[],setValues:e=>S(e[0]),errorMessage:$,warnMessage:k,helpMessage:T},g);case t.Checkbox:return sa(i,{name:g,label:m,tooltip:v,badge:f,value:!0===C||"true"===C,onChange:e=>S(e),disabled:x,errorMessage:$,warnMessage:k,helpMessage:T},g);case t.Time:return sa(n,{name:g,label:m,tooltip:v,badge:f,placeholder:b,required:y,disabled:x,value:C??"",setValue:e=>S(e),units:M,defaultUnit:L,errorMessage:$,warnMessage:k,helpMessage:T},g);case t.Toggle:return sa(l,{name:g,labelAlign:r.Right,label:m,tooltip:v,badge:f,value:!0===C||"true"===C,onChange:e=>S(e),disabled:x,errorMessage:$,warnMessage:k,helpMessage:T},g);default:return null}},Wa=Ga.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
gap: 24px;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{useState as t,useCallback as a,useMemo as r,useContext as n,createContext as s,useRef as o,useEffect as i}from"react";import{r as l,s as d,A as c,v as u,w as m,x as p,y as h,z as f,B as g,C as v,G as b,H as y,J as D,K as E,L as S,M as k,O as C,Q as A,R as F,U as I,V as w,W as N,c as x,E as R}from"./ui-components-TeG65JGy.js";import{u as P}from"./use-odigos-api-li2VrVHH.js";import{n as O,m as T,i as L,b as M,a as U,d as j,v as K,g as V,u as G}from"./helpers-BEkhis3j.js";const _={type:"",disabled:!1,name:"",notes:"",signals:[],fields:{}},q=s(null),H="All row fields are required",z="At least one row is required",J=(e,t)=>!!e&&t.every(t=>{const a=e[t];return Array.isArray(a)?a.length>0:!("string"==typeof(r=a)?!r.trim():p(r));var r}),Q=({children:n})=>{const[s,o]=t(null),i=l(_),f=a(e=>{i.resetFormData(),i.handleErrorChange(void 0,void 0,{}),e?.type&&i.handleFormChange("type",e.type),o(e)},[]),g=a(e=>{var t;i.resetFormData((({type:e,name:t,notes:a,disabled:r,signals:n,fields:s})=>({type:e,name:t||"",notes:a||"",disabled:!!r,signals:n??[],fields:s??{}}))(e)),i.handleErrorChange(void 0,void 0,{}),o((t=e.type,c.find(e=>e.type===t)??null))},[]),v=a(()=>{if(!s)return{errorMessage:"No action type selected",preparedFormData:d(_)};const e=(e=>{const t=d(e),a=t.fields||{},r=a[u.UrlTemplatizationRulesGroups];r?.length&&(a[u.UrlTemplatizationRulesGroups]=r.map(e=>({...e,templatizationRules:(e.templatizationRules||[]).filter(e=>!!e.template?.trim())})));const n=a[u.AttributeNamesToDelete];n?.length&&(a[u.AttributeNamesToDelete]=n.filter(e=>!!e?.trim()));const s=a[u.Renames];s&&(a[u.Renames]=Object.fromEntries(Object.entries(s).filter(([e,t])=>!!e?.trim()&&!!t?.trim())));const o=a[u.ExtractAttribute];return o?.extractions?.length&&(a[u.ExtractAttribute]={extractions:o.extractions.map(e=>({targetAttributeName:e.targetAttributeName?.trim()||"",lookupKey:e.lookupKey?.trim()||"",dataFormat:e.dataFormat||"",regex:e.regex?.trim()||""})).filter(e=>!!(e.targetAttributeName||e.lookupKey||e.dataFormat||e.regex))}),t.fields=a,t})(i.formData),t={};p(e.signals)&&(t.signals=h.FIELD_IS_REQUIRED),s.type&&Object.assign(t,((e,t,a)=>{const r={},n=t.fields||{},s=a.fields||{};switch(e){case m.K8sAttributes:{const e=!(n[u.CollectContainerAttributes]||n[u.CollectReplicaSetAttributes]||n[u.CollectWorkloadId]||n[u.CollectClusterId]),t=!n[u.LabelsAttributes]?.length,a=!n[u.AnnotationsAttributes]?.length;e&&t&&a&&(r[u.CollectContainerAttributes]="Enable at least one option or add a label/annotation row");const s=n[u.LabelsAttributes];s?.some(e=>!J(e,["labelKey","attributeKey","fromSources"]))&&(r[u.LabelsAttributes]=H);const o=n[u.AnnotationsAttributes];o?.some(e=>!J(e,["annotationKey","attributeKey","fromSources"]))&&(r[u.AnnotationsAttributes]=H);break}case m.AddClusterInfo:{const e=n[u.ClusterAttributes];e?.length?e.some(e=>!J(e,["attributeName","attributeStringValue"]))&&(r[u.ClusterAttributes]=H):r[u.ClusterAttributes]=z;break}case m.DeleteAttributes:{const e=s[u.AttributeNamesToDelete]||[],t=n[u.AttributeNamesToDelete]||[];t.length?e.length>t.length&&(r[u.AttributeNamesToDelete]=H):r[u.AttributeNamesToDelete]=e.length?H:z;break}case m.RenameAttributes:{const e=Object.entries(s[u.Renames]||{}),t=Object.entries(n[u.Renames]||{}),a=e.some(([e,t])=>!e?.trim()||!t?.trim());t.length?a&&(r[u.Renames]=H):r[u.Renames]=e.length?H:z;break}case m.PiiMasking:{const e=n[u.PiiCategories];e?.length||(r[u.PiiCategories]="Select at least one attribute to mask");break}case m.URLTemplatization:{const e=n[u.UrlTemplatizationRulesGroups];(!e?.length||e.some(e=>!e.templatizationRules?.length))&&(r[u.UrlTemplatizationRulesGroups]="Each rule group needs at least one non-blank template");break}case m.ExtractAttribute:{const e=n[u.ExtractAttribute]?.extractions||[],t=s[u.ExtractAttribute]?.extractions||[];if(e.length)if(e.some(e=>{if(!e.targetAttributeName?.trim())return!0;const t=!!e.regex?.trim(),a=!!e.lookupKey?.trim();return a!==!!e.dataFormat||t===a}))r[u.ExtractAttribute]="Each row needs a target attribute name and either a regex or both lookup key and data format";else{const t=new Set;e.some(e=>{const a=e.targetAttributeName?.trim()||"";return!!t.has(a)||(t.add(a),!1)})&&(r[u.ExtractAttribute]="Each new span attribute name must be unique")}else r[u.ExtractAttribute]=t.length?H:z;break}}return r})(s.type,e,i.formData)),i.handleErrorChange(void 0,void 0,t);return{errorMessage:Object.keys(t).length>0?"Invalid form values":void 0,preparedFormData:e}},[i,s]),b=r(()=>({selectedOption:s,onSelectOption:f,loadAction:g,genericForm:i,validateFormData:v}),[s,f,g,i,v]);return e(q.Provider,{value:b,children:n})},W=()=>{const e=n(q);if(!e)throw new Error("useActionFormContext must be used within an ActionFormContextProvider");return e},$={name:""},B=s(null),X=({children:n,defaultExcludeName:s=""})=>{const{dataStreams:i}=f(),[c,u]=t(void 0),[m,p]=t(s),[v,b]=t(void 0),[y,D]=t(null),E=o(null),S=l($),k=a(e=>{S.resetFormData({name:e}),S.handleErrorChange(void 0,void 0,{}),u(void 0),p(e),b(e),D(null),E.current=null},[]),C=a(()=>{const e=d(S.formData),t=(e=>{const t={};return e.name?g(e.name)||(t.name=h.ILLEGAL_K8S_LABEL):t.name=h.FIELD_IS_REQUIRED,t})(e);S.handleErrorChange(void 0,void 0,t);const a=Object.keys(t).length>0?h.REQUIRED_FIELDS:void 0;return u(a),{errorMessage:a,preparedFormData:e}},[S]),A=a(async e=>{const{errorMessage:t,preparedFormData:a}=C();if(t)return;const r=i.find(e=>e.name===a.name&&e.name!==m);if(r)return E.current=e,void D({preparedFormData:a,existingName:r.name,editingName:v});await e(a)},[C,i,m,v]),F=a(async()=>{const e=E.current,t=y?.preparedFormData;E.current=null,D(null),e&&t&&await e(t)},[y]),I=a(()=>{E.current=null,D(null)},[]),w=r(()=>({genericForm:S,loadDataStream:k,editingName:v,validateFormData:C,requestSubmit:A,pendingMerge:y,confirmMerge:F,cancelMerge:I,errorMessage:c,excludeName:m,setExcludeName:p}),[S,k,v,C,A,y,F,I,c,m]);return e(B.Provider,{value:w,children:n})},Y=()=>{const e=n(B);if(!e)throw new Error("useDataStreamFormContext must be used within a DataStreamFormContextProvider");return e},Z={type:"",name:"",currentStreamName:"",disabled:!1,exportedSignals:{logs:!1,metrics:!1,traces:!1,profiles:!1},fields:[]},ee={activeForm:null,onChangeActiveForm:()=>{},loadDestination:()=>{},genericForm:void 0,validateFormData:()=>({isOk:!1,preparedFormData:d(Z)}),unsavedDestinations:[],thisUnsavedDestination:void 0,setUnsavedDestinations:()=>{},addUnsavedDestination:()=>{},updateUnsavedDestination:()=>{},deleteUnsavedDestination:()=>{}},te=s(ee),ae=e=>e.filter(e=>!!e).map(e=>{const{name:t,componentType:a,componentProperties:r,displayName:n,initialValue:s,renderCondition:o}=e,i=a===S.Dropdown,l=D(r,{});return{componentType:a,renderCondition:o,name:t,title:n,value:s,placeholder:l.placeholder||(i?"Select an option":void 0),options:i&&Array.isArray(l.values)?l.values.map(e=>({id:e,label:e})):void 0,...l}}),re=({children:n})=>{const{selectedStreamName:s}=f(),{items:o}=P().destinationsApi.useDestinations(),[c,u]=t(null),[m,g]=t(ee.unsavedDestinations),S=r(()=>"number"==typeof c?.unsavedIdx?m[c.unsavedIdx]:void 0,[c,m]),k=a((e,t)=>{c&&(g(t=>[...t,{...e,option:c.option}]),u(t?e=>e?{...e,listType:v.UNSAVED,unsavedIdx:m.length}:null:null))},[c,m.length]),C=a((e,t,a)=>{c&&(g(a=>a.map((a,r)=>r===e?{...a,...t,option:c.option}:a)),u(a?e=>e?{...e,listType:v.UNSAVED}:null:null))},[c]),A=a(e=>{g(t=>t.filter((t,a)=>a!==e)),u(null)},[]),F=l({...Z,currentStreamName:s});i(()=>{if(!c)return;if(S)return void F.resetFormData({...S.formData});if(c.listType===v.EXISTS&&c.option.id){const e=o.find(e=>e.id===c.option.id);if(e)return void F.resetFormData({type:e.destinationType.type,name:e.name||e.destinationType.displayName,currentStreamName:s,disabled:!!e.disabled,exportedSignals:{logs:!!e.exportedSignals?.logs,metrics:!!e.exportedSignals?.metrics,traces:!!e.exportedSignals?.traces,profiles:!!e.exportedSignals?.profiles},fields:c.dynamicFields.map(e=>({key:e.name,value:e.value}))})}const e=b(c.option.supportedSignals);F.resetFormData({type:c.option.type,name:c.option.displayName,currentStreamName:s,disabled:!1,exportedSignals:{logs:e.includes(y.Logs),metrics:e.includes(y.Metrics),traces:e.includes(y.Traces),profiles:e.includes(y.Profiles)},fields:c.dynamicFields.map(e=>({key:e.name,value:e.value}))})},[c,S]);const I=a(e=>{F.resetFormData(),F.handleErrorChange(void 0,void 0,{}),u(e?{...e,dynamicFields:e.option?.fields?ae(e.option.fields):[]}:null)},[]),w=a((e,t)=>{let a;for(const r of t){const t=r.items.find(t=>t.type===e.destinationType.type);if(t){a=t;break}}const r=D(e.fields,{}),n={id:e.id,type:e.destinationType.type,displayName:e.name||e.destinationType.displayName,selected:!0,testConnectionSupported:a?.testConnectionSupported??!1,supportedSignals:e.destinationType.supportedSignals,fields:a?a.fields.map(e=>({...e,initialValue:r[e.name]??e.initialValue})):[]},s=ae(n.fields);u({listType:v.EXISTS,option:n,dynamicFields:s})},[]),N=a(()=>{const e=d(F.formData),t={};c?.dynamicFields.forEach(({name:a,required:r})=>{if(r){const r=e.fields.find(e=>e.key===a)?.value;p(r)&&(t[a]=h.FIELD_IS_REQUIRED)}});return E(e.exportedSignals).length||(t.exportedSignals=h.FIELD_IS_REQUIRED),F.handleErrorChange(void 0,void 0,t),{errorMessage:0===Object.keys(t).length?void 0:"Invalid form values",preparedFormData:e}},[F,c]);return e(te.Provider,{value:{activeForm:c,onChangeActiveForm:I,loadDestination:w,genericForm:F,validateFormData:N,unsavedDestinations:m,thisUnsavedDestination:S,setUnsavedDestinations:g,addUnsavedDestination:k,updateUnsavedDestination:C,deleteUnsavedDestination:A},children:n})},ne=()=>n(te),se={disabled:!1,ruleName:"",notes:"",sourceScopes:T(),workloads:null,instrumentationLibraries:null,payloadCollection:null,codeAttributes:null,headersCollection:null,customInstrumentations:null},oe=s(null),ie=({children:n,sourceOptions:s=[],namespaceOptions:o=[]})=>{const[i,c]=t(null),u=l(se),m=a(e=>{u.resetFormData(),u.handleErrorChange(void 0,void 0,{}),c(e)},[]),p=a(e=>{var t;u.resetFormData((({ruleName:e,notes:t,disabled:a,sourceScopes:r,instrumentationLibraries:n,payloadCollection:s,codeAttributes:o,headersCollection:i,customInstrumentations:l})=>({ruleName:e||"",notes:t||"",disabled:!!a,sourceScopes:O(r),workloads:null,instrumentationLibraries:n??null,payloadCollection:s??null,codeAttributes:o??null,headersCollection:i??null,customInstrumentations:l??null}))(e)),u.handleErrorChange(void 0,void 0,{}),c((t=e.type,k.find(e=>e.type===t)??null))},[]),h=a(()=>{if(!i)return{errorMessage:"No rule type selected",preparedFormData:d(se)};const e=(e=>{const t=d(e),a={...t,sourceScopes:L(t.sourceScopes)?null:t.sourceScopes,workloads:null};return a.headersCollection?.[C.HeaderKeys]?.length&&(a.headersCollection[C.HeaderKeys]=a.headersCollection[C.HeaderKeys].map(e=>e.trim()).filter(e=>e)),a.customInstrumentations?.[A.Golang]?.length&&(a.customInstrumentations[A.Golang]=a.customInstrumentations[A.Golang].map(e=>new F(e.packageName,e.functionName,e.receiverName,e.receiverMethodName)).filter(e=>{return t=e,!!(t.packageName?.trim()||t.functionName?.trim()||t.receiverName?.trim()||t.receiverMethodName?.trim());var t})),a.customInstrumentations?.[A.Java]?.length&&(a.customInstrumentations[A.Java]=a.customInstrumentations[A.Java].map(e=>new I(e.className,e.methodName)).filter(e=>{return t=e,!(!t.className?.trim()&&!t.methodName?.trim());var t})),a})(u.formData),t=((e,t)=>{const a={};switch(e){case w.CodeAttributes:Object.values(t.codeAttributes||{}).some(e=>null!=e)||(a.codeAttributes="Code attributes are required");break;case w.PayloadCollection:Object.values(t.payloadCollection||{}).some(e=>null!=e)||(a.payloadCollection="Payload collection are required");break;case w.HeadersCollection:t.headersCollection?.[C.HeaderKeys]?.length||(a.headersCollection="Header keys are required");break;case w.CustomInstrumentation:{const e=t.customInstrumentations?.[A.Golang]||[],r=t.customInstrumentations?.[A.Java]||[];if(!e.length&&!r.length){a.customInstrumentations="Custom instrumentation are required";break}const n=e.findIndex(e=>!new F(e.packageName,e.functionName,e.receiverName,e.receiverMethodName).Verify());if(-1!==n){a.customInstrumentations=`Golang probe #${n+1} is invalid: provide a package name plus either a function name OR both a receiver name and receiver method name`;break}const s=r.findIndex(e=>!new I(e.className,e.methodName).Verify());if(-1!==s){a.customInstrumentations=`Java probe #${s+1} is invalid: both class name and method name are required`;break}break}}return a})(i.type,e);return u.handleErrorChange(void 0,void 0,t),{errorMessage:Object.keys(t).length>0?"Invalid form values":void 0,preparedFormData:e}},[u,i]),f=r(()=>({selectedOption:i,onSelectOption:m,loadRule:p,genericForm:u,validateFormData:h,sourceOptions:s,namespaceOptions:o}),[i,m,p,u,h,s,o]);return e(oe.Provider,{value:f,children:n})},le=()=>{const e=n(oe);if(!e)throw new Error("useRuleFormContext must be used within a RuleFormContextProvider");return e};var de;!function(e){e.Create="create",e.View="view",e.EditAutoNoisy="edit-auto-noisy",e.EditAutoCostReduction="edit-auto-cost-reduction",e.EditAutoHighlyRelevant="edit-auto-highly-relevant"}(de||(de={}));const ce=s(null),ue=["50","25","10","1"];function me(e){const t=String(e);return ue.includes(t)?t:"custom"}const pe=({category:n,sourceOptions:s=[],namespaceOptions:o=[],children:d})=>{const{formData:c,handleFormChange:u,resetFormData:m}=l(V(n)),[p,h]=t(null);i(()=>{m(V(n)),h(null)},[n]);const f=a(e=>{h(null),u(void 0,void 0,{...c,...e})},[c,u]),g=a(()=>{m(V(n)),h(null)},[n,m]),v=r(()=>({formType:de.Create,category:n,formData:c,handleChange:f,resetForm:g,duplicateWarning:p,setDuplicateWarning:h,sourceOptions:s,namespaceOptions:o}),[n,c,f,g,p,s,o]);return e(ce.Provider,{value:v,children:d})},he=({data:n,defaultEditMode:s,sourceOptions:d=[],namespaceOptions:c=[],children:u})=>{const[m,p]=t(!1),{formData:h,handleFormChange:f,resetFormData:g}=l(void 0),v=o(null),[b,y]=t(null);i(()=>{n!==v.current&&(v.current=n,n&&s?(g(K(n)),y(null),p(!0)):(p(!1),y(null)))},[n,s]);const D=a(e=>{y(null),f(void 0,void 0,{...h,...e})},[h,f]),E=a(()=>{n&&(g(K(n)),y(null),p(!0))},[n,g]),S=a(()=>{p(!1),y(null)},[]),k=r(()=>({formType:de.View,data:n,isEditing:m,formData:h,handleChange:D,handleEdit:E,handleCancelEdit:S,duplicateWarning:b,setDuplicateWarning:y,sourceOptions:d,namespaceOptions:c}),[n,m,h,D,E,S,b,d,c]);return e(ce.Provider,{value:k,children:u})};function fe(e){const[a,n]=t(()=>0===e?"all":"sample"),[s,o]=t(()=>me(e)),[l,d]=t(()=>"custom"===me(e)?String(e):"");i(()=>{n(0===e?"all":"sample");const t=me(e);o(t),d("custom"===t?String(e):"")},[e]);const c=r(()=>"all"===a?0:"custom"===s?Number(l)||0:Number(s),[a,s,l]);return{percentageMode:a,setPercentageMode:n,percentagePreset:s,setPercentagePreset:o,customPercentage:l,setCustomPercentage:d,resolvedPercentage:c}}const ge=({enabled:a,keepPercentage:n,children:s})=>{const[o,l]=t(a),d=fe(n);i(()=>{l(a)},[a]);const c=r(()=>j({enabled:o,keepPercentage:d.resolvedPercentage}),[o,d.resolvedPercentage]),u=r(()=>({formType:de.EditAutoNoisy,localEnabled:o,setLocalEnabled:l,...d,summary:c}),[o,d,c]);return e(ce.Provider,{value:u,children:s})},ve=({enabled:a,dropPercentage:n,children:s})=>{const[o,l]=t(a),d=fe(n);i(()=>{l(a)},[a]);const c=r(()=>U(o?{disabled:!1,percentageAtMost:d.resolvedPercentage}:null),[o,d.resolvedPercentage]),u=r(()=>({formType:de.EditAutoCostReduction,localEnabled:o,setLocalEnabled:l,...d,summary:c}),[o,d,c]);return e(ce.Provider,{value:u,children:s})},be=({enabled:a,children:n})=>{const[s,o]=t(a);i(()=>{o(a)},[a]);const l=r(()=>M(s?{disabled:!1}:null),[s]),d=r(()=>({formType:de.EditAutoHighlyRelevant,localEnabled:s,setLocalEnabled:o,summary:l}),[s,l]);return e(ce.Provider,{value:d,children:n})},ye=t=>{switch(t.formType){case de.Create:return e(pe,{...t});case de.View:return e(he,{...t});case de.EditAutoNoisy:return e(ge,{...t});case de.EditAutoCostReduction:return e(ve,{...t});case de.EditAutoHighlyRelevant:return e(be,{...t})}};function De(e){const t=n(ce);if(!t)throw new Error("useSamplingRulesFormContext must be used within a SamplingRulesFormProvider");if(e&&t.formType!==e)throw new Error(`Expected formType "${e}" but found "${t.formType}"`);return t}const Ee={otelServiceName:"",currentStreamName:""},Se=s(null),ke=({children:n})=>{const[s,o]=t(void 0),i=l(Ee),c=a(e=>{i.resetFormData((({serviceName:e,id:t})=>({otelServiceName:e||t.name||"",currentStreamName:""}))(e)),i.handleErrorChange(void 0,void 0,{}),o(void 0)},[]),u=a(()=>{const e=d(i.formData);return i.handleErrorChange(void 0,void 0,{}),o(void 0),{errorMessage:void 0,preparedFormData:e}},[i]),m=r(()=>({loadSource:c,genericForm:i,validateFormData:u,errorMessage:s}),[c,i,u,s]);return e(Se.Provider,{value:m,children:n})},Ce=()=>{const e=n(Se);if(!e)throw new Error("useSourceEditFormContext must be used within a SourceEditFormContextProvider");return e},Ae=new Set([N.StaticPod]),Fe=e=>{const t=e.workloads.filter(({selected:e})=>e).length,a=e.workloads.length;return{selectedCount:t,isAllSourced:t>0&&t===a,isSomeSourced:t>0&&t<a,isFutureApps:e.selected||!1}},Ie=(e,t,a)=>{if(t&&!e.name.toLowerCase().includes(t.toLowerCase()))return!1;if(a.showOnlySelected){const{isAllSourced:t,isSomeSourced:a,isFutureApps:r}=Fe(e);return t||a||r}return!0},we=(e,t,a)=>!(t&&!e.name.toLowerCase().includes(t.toLowerCase()))&&(!a.showOnlySelected||e.selected),Ne=s({snapshots:null,setSnapshots:()=>{},isFetching:!1,setIsFetching:()=>{},formData:[],handleSourceChange:()=>{},handleSelectAll:()=>{},formDiff:{},isFormDirty:!1}),xe=({children:n,selectedConnectionIds:s,initialInputs:o})=>{const{tier:l}=G(),c=l===x.Onprem,{selectedStreamName:u}=f(),[m,p]=t(!1),[h,g]=t(null),[v,b]=t([]);i(()=>{h&&b(e=>{const t=((e,t)=>d(((e,t)=>e.clusters.filter(({clusterId:e})=>!t||t.includes(e)))(e,t)))(h,s);return t.map(t=>{const a=e?.find(e=>e.clusterId===t.clusterId),r=a??t;if(o?.[t.clusterId]){const e=o[t.clusterId],a=d(r);return e.forEach(e=>{const t=a.namespaces.find(t=>t.name===e.namespace);if(t)if(e.name&&e.kind){const a=t.workloads.find(t=>t.name===e.name&&t.kind===e.kind);a&&(a.selected=e.selected)}else t.selected=e.selected,e.selected&&t.workloads.forEach(e=>{Ae.has(e.kind)&&!c||(e.selected=!0)})}),a}return r})})},[h,s,o]);const{formDiff:y,isFormDirty:D}=r(()=>{const e=((e,t,a)=>{const r={};return e.forEach(e=>{e.namespaces.forEach(n=>{const s=t.find(t=>t.clusterId===e.clusterId)?.namespaces.find(e=>e.name===n.name),o=n.selected||!1;if(o!==s?.selected)r[e.clusterId]||(r[e.clusterId]=[]),r[e.clusterId].push({namespace:n.name,selected:o,currentStreamName:a}),o?r[e.clusterId]=r[e.clusterId].filter(e=>e.namespace!==n.name||e.namespace===n.name&&(!e.name||!e.kind)):n.workloads.forEach(t=>{t.selected&&r[e.clusterId].push({namespace:n.name,name:t.name,kind:t.kind,selected:!0,currentStreamName:a})});else{const t=((e,t,a)=>{const r=[];return t.workloads.forEach(n=>{const s=e?.workloads.find(e=>e.name===n.name&&e.kind===n.kind);n.selected!==s?.selected&&r.push({namespace:t.name,name:n.name,kind:n.kind,selected:n.selected||!1,currentStreamName:a})}),r})(s,n,a);t.length>0&&(r[e.clusterId]||(r[e.clusterId]=[]),r[e.clusterId].push(...t))}})}),r})(v,h?.clusters||[],u);return{formDiff:e,isFormDirty:Object.keys(e).length>0}},[v,h,u]),E=a(e=>!c&&Ae.has(e),[c]),S=a(({clusterId:e,workloadId:t,selected:a,auto:r})=>{b(n=>{const s=d(n),o=s.findIndex(t=>t.clusterId===e);if(-1===o)return s;const i=s[o].namespaces.findIndex(e=>e.name===t.namespace);if(-1===i)return s;if(t.kind&&t.name){const e=s[o].namespaces[i].workloads.findIndex(e=>e.name===t.name&&e.kind===t.kind);if(-1===e)return s;const r="boolean"==typeof a?a:!s[o].namespaces[i].workloads[e].selected;if(s[o].namespaces[i].workloads[e].selected=r,r){s[o].namespaces[i].workloads.filter(e=>!E(e.kind)).every(e=>e.selected)&&(s[o].namespaces[i].selected=!0)}else s[o].namespaces[i].selected=!1}else{const e="boolean"==typeof r?r:!s[o].namespaces[i].selected;s[o].namespaces[i].selected=e,e?s[o].namespaces[i].workloads.forEach(e=>{E(e.kind)||(e.selected=!0)}):"boolean"!=typeof a||a||s[o].namespaces[i].workloads.forEach(e=>{e.selected=!1})}return s})},[E]),k=a(({clusterId:e,namespaceName:t,boolean:a,searchText:r="",searchBy:n="",filters:s})=>{b(o=>{const i=d(o),l=n===R.Namespace?r:"",c=n===R.Source?r:"",u=!!l||!!c||!!s?.showOnlySelected;return i.forEach((r,n)=>{e&&r.clusterId!==e||r.namespaces.forEach(({name:e,workloads:r},o)=>{if(!t||e===t)if(u)if(t){r.forEach((e,t)=>{a&&E(e.kind)||we(e,c,s||{showOnlySelected:!1})&&(i[n].namespaces[o].workloads[t].selected=a)});const e=i[n].namespaces[o].workloads.filter(e=>!E(e.kind)).every(e=>e.selected);i[n].namespaces[o].selected=e}else{if(!Ie(i[n].namespaces[o],l,s||{showOnlySelected:!1}))return;i[n].namespaces[o].selected=a,r.forEach((e,t)=>{a&&E(e.kind)||(i[n].namespaces[o].workloads[t].selected=a)})}else i[n].namespaces[o].selected=a,r.forEach((e,t)=>{a&&E(e.kind)||(i[n].namespaces[o].workloads[t].selected=a)})})}),i})},[E]);return e(Ne.Provider,{value:{snapshots:h,setSnapshots:g,isFetching:m,setIsFetching:p,formData:v,handleSourceChange:S,handleSelectAll:k,formDiff:y,isFormDirty:D},children:n})},Re=()=>n(Ne);export{Q as A,X as D,Ae as E,ie as R,de as S,re as a,ye as b,ke as c,xe as d,Y as e,ne as f,le as g,De as h,Ce as i,Re as j,we as k,Ie as l,Fe as m,W as u};
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{useState as t,useCallback as a,useMemo as r,useContext as n,createContext as s,useRef as o,useEffect as i}from"react";import{r as l,s as d,A as c,v as u,w as m,x as p,y as h,z as f,B as g,C as v,G as b,H as y,J as D,K as E,L as S,M as k,O as C,Q as A,R as F,U as I,V as w,W as N,c as x,E as R}from"./ui-components-D_eeOuIL.js";import{d as P}from"./use-odigos-api-W15RTo5l.js";import{n as O,m as T,i as L,b as M,a as U,d as j,v as K,g as V,u as G}from"./helpers-Cy9W3KCg.js";const _={type:"",disabled:!1,name:"",notes:"",signals:[],fields:{}},q=s(null),H="All row fields are required",z="At least one row is required",J=(e,t)=>!!e&&t.every(t=>{const a=e[t];return Array.isArray(a)?a.length>0:!("string"==typeof(r=a)?!r.trim():p(r));var r}),Q=({children:n})=>{const[s,o]=t(null),i=l(_),f=a(e=>{i.resetFormData(),i.handleErrorChange(void 0,void 0,{}),e?.type&&i.handleFormChange("type",e.type),o(e)},[]),g=a(e=>{var t;i.resetFormData((({type:e,name:t,notes:a,disabled:r,signals:n,fields:s})=>({type:e,name:t||"",notes:a||"",disabled:!!r,signals:n??[],fields:s??{}}))(e)),i.handleErrorChange(void 0,void 0,{}),o((t=e.type,c.find(e=>e.type===t)??null))},[]),v=a(()=>{if(!s)return{errorMessage:"No action type selected",preparedFormData:d(_)};const e=(e=>{const t=d(e),a=t.fields||{},r=a[u.UrlTemplatizationRulesGroups];r?.length&&(a[u.UrlTemplatizationRulesGroups]=r.map(e=>({...e,templatizationRules:(e.templatizationRules||[]).filter(e=>!!e.template?.trim())})));const n=a[u.AttributeNamesToDelete];n?.length&&(a[u.AttributeNamesToDelete]=n.filter(e=>!!e?.trim()));const s=a[u.Renames];s&&(a[u.Renames]=Object.fromEntries(Object.entries(s).filter(([e,t])=>!!e?.trim()&&!!t?.trim())));const o=a[u.ExtractAttribute];return o?.extractions?.length&&(a[u.ExtractAttribute]={extractions:o.extractions.map(e=>({targetAttributeName:e.targetAttributeName?.trim()||"",lookupKey:e.lookupKey?.trim()||"",dataFormat:e.dataFormat||"",regex:e.regex?.trim()||""})).filter(e=>!!(e.targetAttributeName||e.lookupKey||e.dataFormat||e.regex))}),t.fields=a,t})(i.formData),t={};p(e.signals)&&(t.signals=h.FIELD_IS_REQUIRED),s.type&&Object.assign(t,((e,t,a)=>{const r={},n=t.fields||{},s=a.fields||{};switch(e){case m.K8sAttributes:{const e=!(n[u.CollectContainerAttributes]||n[u.CollectReplicaSetAttributes]||n[u.CollectWorkloadId]||n[u.CollectClusterId]),t=!n[u.LabelsAttributes]?.length,a=!n[u.AnnotationsAttributes]?.length;e&&t&&a&&(r[u.CollectContainerAttributes]="Enable at least one option or add a label/annotation row");const s=n[u.LabelsAttributes];s?.some(e=>!J(e,["labelKey","attributeKey","fromSources"]))&&(r[u.LabelsAttributes]=H);const o=n[u.AnnotationsAttributes];o?.some(e=>!J(e,["annotationKey","attributeKey","fromSources"]))&&(r[u.AnnotationsAttributes]=H);break}case m.AddClusterInfo:{const e=n[u.ClusterAttributes];e?.length?e.some(e=>!J(e,["attributeName","attributeStringValue"]))&&(r[u.ClusterAttributes]=H):r[u.ClusterAttributes]=z;break}case m.DeleteAttributes:{const e=s[u.AttributeNamesToDelete]||[],t=n[u.AttributeNamesToDelete]||[];t.length?e.length>t.length&&(r[u.AttributeNamesToDelete]=H):r[u.AttributeNamesToDelete]=e.length?H:z;break}case m.RenameAttributes:{const e=Object.entries(s[u.Renames]||{}),t=Object.entries(n[u.Renames]||{}),a=e.some(([e,t])=>!e?.trim()||!t?.trim());t.length?a&&(r[u.Renames]=H):r[u.Renames]=e.length?H:z;break}case m.PiiMasking:{const e=n[u.PiiCategories];e?.length||(r[u.PiiCategories]="Select at least one attribute to mask");break}case m.URLTemplatization:{const e=n[u.UrlTemplatizationRulesGroups];(!e?.length||e.some(e=>!e.templatizationRules?.length))&&(r[u.UrlTemplatizationRulesGroups]="Each rule group needs at least one non-blank template");break}case m.ExtractAttribute:{const e=n[u.ExtractAttribute]?.extractions||[],t=s[u.ExtractAttribute]?.extractions||[];if(e.length)if(e.some(e=>{if(!e.targetAttributeName?.trim())return!0;const t=!!e.regex?.trim(),a=!!e.lookupKey?.trim();return a!==!!e.dataFormat||t===a}))r[u.ExtractAttribute]="Each row needs a target attribute name and either a regex or both lookup key and data format";else{const t=new Set;e.some(e=>{const a=e.targetAttributeName?.trim()||"";return!!t.has(a)||(t.add(a),!1)})&&(r[u.ExtractAttribute]="Each new span attribute name must be unique")}else r[u.ExtractAttribute]=t.length?H:z;break}}return r})(s.type,e,i.formData)),i.handleErrorChange(void 0,void 0,t);return{errorMessage:Object.keys(t).length>0?"Invalid form values":void 0,preparedFormData:e}},[i,s]),b=r(()=>({selectedOption:s,onSelectOption:f,loadAction:g,genericForm:i,validateFormData:v}),[s,f,g,i,v]);return e(q.Provider,{value:b,children:n})},W=()=>{const e=n(q);if(!e)throw new Error("useActionFormContext must be used within an ActionFormContextProvider");return e},$={name:""},B=s(null),X=({children:n,defaultExcludeName:s=""})=>{const{dataStreams:i}=f(),[c,u]=t(void 0),[m,p]=t(s),[v,b]=t(void 0),[y,D]=t(null),E=o(null),S=l($),k=a(e=>{S.resetFormData({name:e}),S.handleErrorChange(void 0,void 0,{}),u(void 0),p(e),b(e),D(null),E.current=null},[]),C=a(()=>{const e=d(S.formData),t=(e=>{const t={};return e.name?g(e.name)||(t.name=h.ILLEGAL_K8S_LABEL):t.name=h.FIELD_IS_REQUIRED,t})(e);S.handleErrorChange(void 0,void 0,t);const a=Object.keys(t).length>0?h.REQUIRED_FIELDS:void 0;return u(a),{errorMessage:a,preparedFormData:e}},[S]),A=a(async e=>{const{errorMessage:t,preparedFormData:a}=C();if(t)return;const r=i.find(e=>e.name===a.name&&e.name!==m);if(r)return E.current=e,void D({preparedFormData:a,existingName:r.name,editingName:v});await e(a)},[C,i,m,v]),F=a(async()=>{const e=E.current,t=y?.preparedFormData;E.current=null,D(null),e&&t&&await e(t)},[y]),I=a(()=>{E.current=null,D(null)},[]),w=r(()=>({genericForm:S,loadDataStream:k,editingName:v,validateFormData:C,requestSubmit:A,pendingMerge:y,confirmMerge:F,cancelMerge:I,errorMessage:c,excludeName:m,setExcludeName:p}),[S,k,v,C,A,y,F,I,c,m]);return e(B.Provider,{value:w,children:n})},Y=()=>{const e=n(B);if(!e)throw new Error("useDataStreamFormContext must be used within a DataStreamFormContextProvider");return e},Z={type:"",name:"",currentStreamName:"",disabled:!1,exportedSignals:{logs:!1,metrics:!1,traces:!1,profiles:!1},fields:[]},ee={activeForm:null,onChangeActiveForm:()=>{},loadDestination:()=>{},genericForm:void 0,validateFormData:()=>({isOk:!1,preparedFormData:d(Z)}),unsavedDestinations:[],thisUnsavedDestination:void 0,setUnsavedDestinations:()=>{},addUnsavedDestination:()=>{},updateUnsavedDestination:()=>{},deleteUnsavedDestination:()=>{}},te=s(ee),ae=e=>e.filter(e=>!!e).map(e=>{const{name:t,componentType:a,componentProperties:r,displayName:n,initialValue:s,renderCondition:o}=e,i=a===S.Dropdown,l=D(r,{});return{componentType:a,renderCondition:o,name:t,title:n,value:s,placeholder:l.placeholder||(i?"Select an option":void 0),options:i&&Array.isArray(l.values)?l.values.map(e=>({id:e,label:e})):void 0,...l}}),re=({children:n})=>{const{selectedStreamName:s}=f(),{items:o}=P().destinationsApi.useDestinations(),[c,u]=t(null),[m,g]=t(ee.unsavedDestinations),S=r(()=>"number"==typeof c?.unsavedIdx?m[c.unsavedIdx]:void 0,[c,m]),k=a((e,t)=>{c&&(g(t=>[...t,{...e,option:c.option}]),u(t?e=>e?{...e,listType:v.UNSAVED,unsavedIdx:m.length}:null:null))},[c,m.length]),C=a((e,t,a)=>{c&&(g(a=>a.map((a,r)=>r===e?{...a,...t,option:c.option}:a)),u(a?e=>e?{...e,listType:v.UNSAVED}:null:null))},[c]),A=a(e=>{g(t=>t.filter((t,a)=>a!==e)),u(null)},[]),F=l({...Z,currentStreamName:s});i(()=>{if(!c)return;if(S)return void F.resetFormData({...S.formData});if(c.listType===v.EXISTS&&c.option.id){const e=o.find(e=>e.id===c.option.id);if(e)return void F.resetFormData({type:e.destinationType.type,name:e.name||e.destinationType.displayName,currentStreamName:s,disabled:!!e.disabled,exportedSignals:{logs:!!e.exportedSignals?.logs,metrics:!!e.exportedSignals?.metrics,traces:!!e.exportedSignals?.traces,profiles:!!e.exportedSignals?.profiles},fields:c.dynamicFields.map(e=>({key:e.name,value:e.value}))})}const e=b(c.option.supportedSignals);F.resetFormData({type:c.option.type,name:c.option.displayName,currentStreamName:s,disabled:!1,exportedSignals:{logs:e.includes(y.Logs),metrics:e.includes(y.Metrics),traces:e.includes(y.Traces),profiles:e.includes(y.Profiles)},fields:c.dynamicFields.map(e=>({key:e.name,value:e.value}))})},[c,S]);const I=a(e=>{F.resetFormData(),F.handleErrorChange(void 0,void 0,{}),u(e?{...e,dynamicFields:e.option?.fields?ae(e.option.fields):[]}:null)},[]),w=a((e,t)=>{let a;for(const r of t){const t=r.items.find(t=>t.type===e.destinationType.type);if(t){a=t;break}}const r=D(e.fields,{}),n={id:e.id,type:e.destinationType.type,displayName:e.name||e.destinationType.displayName,selected:!0,testConnectionSupported:a?.testConnectionSupported??!1,supportedSignals:e.destinationType.supportedSignals,fields:a?a.fields.map(e=>({...e,initialValue:r[e.name]??e.initialValue})):[]},s=ae(n.fields);u({listType:v.EXISTS,option:n,dynamicFields:s})},[]),N=a(()=>{const e=d(F.formData),t={};c?.dynamicFields.forEach(({name:a,required:r})=>{if(r){const r=e.fields.find(e=>e.key===a)?.value;p(r)&&(t[a]=h.FIELD_IS_REQUIRED)}});return E(e.exportedSignals).length||(t.exportedSignals=h.FIELD_IS_REQUIRED),F.handleErrorChange(void 0,void 0,t),{errorMessage:0===Object.keys(t).length?void 0:"Invalid form values",preparedFormData:e}},[F,c]);return e(te.Provider,{value:{activeForm:c,onChangeActiveForm:I,loadDestination:w,genericForm:F,validateFormData:N,unsavedDestinations:m,thisUnsavedDestination:S,setUnsavedDestinations:g,addUnsavedDestination:k,updateUnsavedDestination:C,deleteUnsavedDestination:A},children:n})},ne=()=>n(te),se={disabled:!1,ruleName:"",notes:"",sourceScopes:T(),workloads:null,instrumentationLibraries:null,payloadCollection:null,codeAttributes:null,headersCollection:null,customInstrumentations:null},oe=s(null),ie=({children:n,sourceOptions:s=[],namespaceOptions:o=[]})=>{const[i,c]=t(null),u=l(se),m=a(e=>{u.resetFormData(),u.handleErrorChange(void 0,void 0,{}),c(e)},[]),p=a(e=>{var t;u.resetFormData((({ruleName:e,notes:t,disabled:a,sourceScopes:r,instrumentationLibraries:n,payloadCollection:s,codeAttributes:o,headersCollection:i,customInstrumentations:l})=>({ruleName:e||"",notes:t||"",disabled:!!a,sourceScopes:O(r),workloads:null,instrumentationLibraries:n??null,payloadCollection:s??null,codeAttributes:o??null,headersCollection:i??null,customInstrumentations:l??null}))(e)),u.handleErrorChange(void 0,void 0,{}),c((t=e.type,k.find(e=>e.type===t)??null))},[]),h=a(()=>{if(!i)return{errorMessage:"No rule type selected",preparedFormData:d(se)};const e=(e=>{const t=d(e),a={...t,sourceScopes:L(t.sourceScopes)?null:t.sourceScopes,workloads:null};return a.headersCollection?.[C.HeaderKeys]?.length&&(a.headersCollection[C.HeaderKeys]=a.headersCollection[C.HeaderKeys].map(e=>e.trim()).filter(e=>e)),a.customInstrumentations?.[A.Golang]?.length&&(a.customInstrumentations[A.Golang]=a.customInstrumentations[A.Golang].map(e=>new F(e.packageName,e.functionName,e.receiverName,e.receiverMethodName)).filter(e=>{return t=e,!!(t.packageName?.trim()||t.functionName?.trim()||t.receiverName?.trim()||t.receiverMethodName?.trim());var t})),a.customInstrumentations?.[A.Java]?.length&&(a.customInstrumentations[A.Java]=a.customInstrumentations[A.Java].map(e=>new I(e.className,e.methodName)).filter(e=>{return t=e,!(!t.className?.trim()&&!t.methodName?.trim());var t})),a})(u.formData),t=((e,t)=>{const a={};switch(e){case w.CodeAttributes:Object.values(t.codeAttributes||{}).some(e=>null!=e)||(a.codeAttributes="Code attributes are required");break;case w.PayloadCollection:Object.values(t.payloadCollection||{}).some(e=>null!=e)||(a.payloadCollection="Payload collection are required");break;case w.HeadersCollection:t.headersCollection?.[C.HeaderKeys]?.length||(a.headersCollection="Header keys are required");break;case w.CustomInstrumentation:{const e=t.customInstrumentations?.[A.Golang]||[],r=t.customInstrumentations?.[A.Java]||[];if(!e.length&&!r.length){a.customInstrumentations="Custom instrumentation are required";break}const n=e.findIndex(e=>!new F(e.packageName,e.functionName,e.receiverName,e.receiverMethodName).Verify());if(-1!==n){a.customInstrumentations=`Golang probe #${n+1} is invalid: provide a package name plus either a function name OR both a receiver name and receiver method name`;break}const s=r.findIndex(e=>!new I(e.className,e.methodName).Verify());if(-1!==s){a.customInstrumentations=`Java probe #${s+1} is invalid: both class name and method name are required`;break}break}}return a})(i.type,e);return u.handleErrorChange(void 0,void 0,t),{errorMessage:Object.keys(t).length>0?"Invalid form values":void 0,preparedFormData:e}},[u,i]),f=r(()=>({selectedOption:i,onSelectOption:m,loadRule:p,genericForm:u,validateFormData:h,sourceOptions:s,namespaceOptions:o}),[i,m,p,u,h,s,o]);return e(oe.Provider,{value:f,children:n})},le=()=>{const e=n(oe);if(!e)throw new Error("useRuleFormContext must be used within a RuleFormContextProvider");return e};var de;!function(e){e.Create="create",e.View="view",e.EditAutoNoisy="edit-auto-noisy",e.EditAutoCostReduction="edit-auto-cost-reduction",e.EditAutoHighlyRelevant="edit-auto-highly-relevant"}(de||(de={}));const ce=s(null),ue=["50","25","10","1"];function me(e){const t=String(e);return ue.includes(t)?t:"custom"}const pe=({category:n,sourceOptions:s=[],namespaceOptions:o=[],children:d})=>{const{formData:c,handleFormChange:u,resetFormData:m}=l(V(n)),[p,h]=t(null);i(()=>{m(V(n)),h(null)},[n]);const f=a(e=>{h(null),u(void 0,void 0,{...c,...e})},[c,u]),g=a(()=>{m(V(n)),h(null)},[n,m]),v=r(()=>({formType:de.Create,category:n,formData:c,handleChange:f,resetForm:g,duplicateWarning:p,setDuplicateWarning:h,sourceOptions:s,namespaceOptions:o}),[n,c,f,g,p,s,o]);return e(ce.Provider,{value:v,children:d})},he=({data:n,defaultEditMode:s,sourceOptions:d=[],namespaceOptions:c=[],children:u})=>{const[m,p]=t(!1),{formData:h,handleFormChange:f,resetFormData:g}=l(void 0),v=o(null),[b,y]=t(null);i(()=>{n!==v.current&&(v.current=n,n&&s?(g(K(n)),y(null),p(!0)):(p(!1),y(null)))},[n,s]);const D=a(e=>{y(null),f(void 0,void 0,{...h,...e})},[h,f]),E=a(()=>{n&&(g(K(n)),y(null),p(!0))},[n,g]),S=a(()=>{p(!1),y(null)},[]),k=r(()=>({formType:de.View,data:n,isEditing:m,formData:h,handleChange:D,handleEdit:E,handleCancelEdit:S,duplicateWarning:b,setDuplicateWarning:y,sourceOptions:d,namespaceOptions:c}),[n,m,h,D,E,S,b,d,c]);return e(ce.Provider,{value:k,children:u})};function fe(e){const[a,n]=t(()=>0===e?"all":"sample"),[s,o]=t(()=>me(e)),[l,d]=t(()=>"custom"===me(e)?String(e):"");i(()=>{n(0===e?"all":"sample");const t=me(e);o(t),d("custom"===t?String(e):"")},[e]);const c=r(()=>"all"===a?0:"custom"===s?Number(l)||0:Number(s),[a,s,l]);return{percentageMode:a,setPercentageMode:n,percentagePreset:s,setPercentagePreset:o,customPercentage:l,setCustomPercentage:d,resolvedPercentage:c}}const ge=({enabled:a,keepPercentage:n,children:s})=>{const[o,l]=t(a),d=fe(n);i(()=>{l(a)},[a]);const c=r(()=>j({enabled:o,keepPercentage:d.resolvedPercentage}),[o,d.resolvedPercentage]),u=r(()=>({formType:de.EditAutoNoisy,localEnabled:o,setLocalEnabled:l,...d,summary:c}),[o,d,c]);return e(ce.Provider,{value:u,children:s})},ve=({enabled:a,dropPercentage:n,children:s})=>{const[o,l]=t(a),d=fe(n);i(()=>{l(a)},[a]);const c=r(()=>U(o?{disabled:!1,percentageAtMost:d.resolvedPercentage}:null),[o,d.resolvedPercentage]),u=r(()=>({formType:de.EditAutoCostReduction,localEnabled:o,setLocalEnabled:l,...d,summary:c}),[o,d,c]);return e(ce.Provider,{value:u,children:s})},be=({enabled:a,children:n})=>{const[s,o]=t(a);i(()=>{o(a)},[a]);const l=r(()=>M(s?{disabled:!1}:null),[s]),d=r(()=>({formType:de.EditAutoHighlyRelevant,localEnabled:s,setLocalEnabled:o,summary:l}),[s,l]);return e(ce.Provider,{value:d,children:n})},ye=t=>{switch(t.formType){case de.Create:return e(pe,{...t});case de.View:return e(he,{...t});case de.EditAutoNoisy:return e(ge,{...t});case de.EditAutoCostReduction:return e(ve,{...t});case de.EditAutoHighlyRelevant:return e(be,{...t})}};function De(e){const t=n(ce);if(!t)throw new Error("useSamplingRulesFormContext must be used within a SamplingRulesFormProvider");if(e&&t.formType!==e)throw new Error(`Expected formType "${e}" but found "${t.formType}"`);return t}const Ee={otelServiceName:"",currentStreamName:""},Se=s(null),ke=({children:n})=>{const[s,o]=t(void 0),i=l(Ee),c=a(e=>{i.resetFormData((({serviceName:e,id:t})=>({otelServiceName:e||t.name||"",currentStreamName:""}))(e)),i.handleErrorChange(void 0,void 0,{}),o(void 0)},[]),u=a(()=>{const e=d(i.formData);return i.handleErrorChange(void 0,void 0,{}),o(void 0),{errorMessage:void 0,preparedFormData:e}},[i]),m=r(()=>({loadSource:c,genericForm:i,validateFormData:u,errorMessage:s}),[c,i,u,s]);return e(Se.Provider,{value:m,children:n})},Ce=()=>{const e=n(Se);if(!e)throw new Error("useSourceEditFormContext must be used within a SourceEditFormContextProvider");return e},Ae=new Set([N.StaticPod]),Fe=e=>{const t=e.workloads.filter(({selected:e})=>e).length,a=e.workloads.length;return{selectedCount:t,isAllSourced:t>0&&t===a,isSomeSourced:t>0&&t<a,isFutureApps:e.selected||!1}},Ie=(e,t,a)=>{if(t&&!e.name.toLowerCase().includes(t.toLowerCase()))return!1;if(a.showOnlySelected){const{isAllSourced:t,isSomeSourced:a,isFutureApps:r}=Fe(e);return t||a||r}return!0},we=(e,t,a)=>!(t&&!e.name.toLowerCase().includes(t.toLowerCase()))&&(!a.showOnlySelected||e.selected),Ne=s({snapshots:null,setSnapshots:()=>{},isFetching:!1,setIsFetching:()=>{},formData:[],handleSourceChange:()=>{},handleSelectAll:()=>{},formDiff:{},isFormDirty:!1}),xe=({children:n,selectedConnectionIds:s,initialInputs:o})=>{const{tier:l}=G(),c=l===x.Onprem,{selectedStreamName:u}=f(),[m,p]=t(!1),[h,g]=t(null),[v,b]=t([]);i(()=>{h&&b(e=>{const t=((e,t)=>d(((e,t)=>e.clusters.filter(({clusterId:e})=>!t||t.includes(e)))(e,t)))(h,s);return t.map(t=>{const a=e?.find(e=>e.clusterId===t.clusterId),r=a??t;if(o?.[t.clusterId]){const e=o[t.clusterId],a=d(r);return e.forEach(e=>{const t=a.namespaces.find(t=>t.name===e.namespace);if(t)if(e.name&&e.kind){const a=t.workloads.find(t=>t.name===e.name&&t.kind===e.kind);a&&(a.selected=e.selected)}else t.selected=e.selected,e.selected&&t.workloads.forEach(e=>{Ae.has(e.kind)&&!c||(e.selected=!0)})}),a}return r})})},[h,s,o]);const{formDiff:y,isFormDirty:D}=r(()=>{const e=((e,t,a)=>{const r={};return e.forEach(e=>{e.namespaces.forEach(n=>{const s=t.find(t=>t.clusterId===e.clusterId)?.namespaces.find(e=>e.name===n.name),o=n.selected||!1;if(o!==s?.selected)r[e.clusterId]||(r[e.clusterId]=[]),r[e.clusterId].push({namespace:n.name,selected:o,currentStreamName:a}),o?r[e.clusterId]=r[e.clusterId].filter(e=>e.namespace!==n.name||e.namespace===n.name&&(!e.name||!e.kind)):n.workloads.forEach(t=>{t.selected&&r[e.clusterId].push({namespace:n.name,name:t.name,kind:t.kind,selected:!0,currentStreamName:a})});else{const t=((e,t,a)=>{const r=[];return t.workloads.forEach(n=>{const s=e?.workloads.find(e=>e.name===n.name&&e.kind===n.kind);n.selected!==s?.selected&&r.push({namespace:t.name,name:n.name,kind:n.kind,selected:n.selected||!1,currentStreamName:a})}),r})(s,n,a);t.length>0&&(r[e.clusterId]||(r[e.clusterId]=[]),r[e.clusterId].push(...t))}})}),r})(v,h?.clusters||[],u);return{formDiff:e,isFormDirty:Object.keys(e).length>0}},[v,h,u]),E=a(e=>!c&&Ae.has(e),[c]),S=a(({clusterId:e,workloadId:t,selected:a,auto:r})=>{b(n=>{const s=d(n),o=s.findIndex(t=>t.clusterId===e);if(-1===o)return s;const i=s[o].namespaces.findIndex(e=>e.name===t.namespace);if(-1===i)return s;if(t.kind&&t.name){const e=s[o].namespaces[i].workloads.findIndex(e=>e.name===t.name&&e.kind===t.kind);if(-1===e)return s;const r="boolean"==typeof a?a:!s[o].namespaces[i].workloads[e].selected;if(s[o].namespaces[i].workloads[e].selected=r,r){s[o].namespaces[i].workloads.filter(e=>!E(e.kind)).every(e=>e.selected)&&(s[o].namespaces[i].selected=!0)}else s[o].namespaces[i].selected=!1}else{const e="boolean"==typeof r?r:!s[o].namespaces[i].selected;s[o].namespaces[i].selected=e,e?s[o].namespaces[i].workloads.forEach(e=>{E(e.kind)||(e.selected=!0)}):"boolean"!=typeof a||a||s[o].namespaces[i].workloads.forEach(e=>{e.selected=!1})}return s})},[E]),k=a(({clusterId:e,namespaceName:t,boolean:a,searchText:r="",searchBy:n="",filters:s})=>{b(o=>{const i=d(o),l=n===R.Namespace?r:"",c=n===R.Source?r:"",u=!!l||!!c||!!s?.showOnlySelected;return i.forEach((r,n)=>{e&&r.clusterId!==e||r.namespaces.forEach(({name:e,workloads:r},o)=>{if(!t||e===t)if(u)if(t){r.forEach((e,t)=>{a&&E(e.kind)||we(e,c,s||{showOnlySelected:!1})&&(i[n].namespaces[o].workloads[t].selected=a)});const e=i[n].namespaces[o].workloads.filter(e=>!E(e.kind)).every(e=>e.selected);i[n].namespaces[o].selected=e}else{if(!Ie(i[n].namespaces[o],l,s||{showOnlySelected:!1}))return;i[n].namespaces[o].selected=a,r.forEach((e,t)=>{a&&E(e.kind)||(i[n].namespaces[o].workloads[t].selected=a)})}else i[n].namespaces[o].selected=a,r.forEach((e,t)=>{a&&E(e.kind)||(i[n].namespaces[o].workloads[t].selected=a)})})}),i})},[E]);return e(Ne.Provider,{value:{snapshots:h,setSnapshots:g,isFetching:m,setIsFetching:p,formData:v,handleSourceChange:S,handleSelectAll:k,formDiff:y,isFormDirty:D},children:n})},Re=()=>n(Ne);export{Q as A,X as D,Ae as E,ie as R,de as S,re as a,ye as b,ke as c,xe as d,Y as e,ne as f,le as g,De as h,Ce as i,Re as j,we as k,Ie as l,Fe as m,W as u};
|
|
@@ -38,7 +38,7 @@ import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import o,{css as
|
|
|
38
38
|
text-decoration: underline;
|
|
39
39
|
}
|
|
40
40
|
`}
|
|
41
|
-
`,cn=Lt(({children:n,variant:o=nn.P,color:r,size:i=on.S,weight:a=400,opacity:s=1,align:l="left",lineHeight:c,transform:d,nowrap:u,underline:p,onClick:h,disabled:g,maxLines:m,...f},y)=>{const b=n?.toString().split("\n")||[];return e(ln,{ref:y,as:o,$color:r,$size:i,$weight:a,$opacity:s,$align:l,$lineHeight:c,$transform:d,$nowrap:u,$underline:p,$maxLines:m,$withClick:!!h&&!g,onClick:g?void 0:h,...f,children:b.map((n,o)=>t(Pt,{children:[n,o!==b.length-1&&e("br",{})]},`typography-${o}-${n}`))})});cn.displayName="Typography";const dn="https://docs.odigos.io",un="default",pn="this-cluster",hn="This Cluster",gn={SELECTED_DATA_STREAM:"SELECTED_DATA_STREAM",SELECTED_DATA_STREAM_WITH_PROXY:e=>`SELECTED_DATA_STREAM_${e}`,OVERVIEW_FILTERS:"OVERVIEW_FILTERS",DARK_MODE:"DARK_MODE"},mn={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)'},fn={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",RENAME_STREAM:e=>`Rename "${e}"`,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}".`,DATA_STREAM_MERGE_WARNING:(e,t)=>e?`A Data Stream named "${t}" already exists. Saving will merge "${e}" into "${t}" - both streams will share the same configuration going forward.`:`A Data Stream named "${t}" already exists. Saving will merge into "${t}" - the new stream will share the existing configuration going forward.`,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",SOURCES_SETUP:"Sources setup",DESTINATIONS_SETUP:"Destinations setup",SUMMARY:"Summary",REVIEW_SETUP:"Review your setup and confirm your choices.",NO_SOURCES_SELECTED:"No sources selected",ADD_SOURCE_PROMPT:"Add at least one source to start collecting data",NO_DESTINATIONS_SELECTED:"No destinations selected",ADD_DESTINATION_PROMPT:"Add destination so your data has somewhere to go",GET_STARTED_WITH:"Get started with",GET_STARTED_DESCRIPTION:"First, select the sources you want Odigos to monitor. Next, choose where your data should be sent by configuring destinations.",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",OVERVIEW:"Overview",LIBRARIES:"Libraries",STANDARD_LIBRARY:"Standard Library",STANDARD:"Standard",PEER_SOURCES:"Peer Sources",PROFILING:"Profiling",INBOUND:"Inbound",OUTBOUND:"Outbound",INBOUND_DESCRIPTION:e=>`Services that send requests to ${e}`,OUTBOUND_DESCRIPTION:e=>`Services that ${e} sends requests to`,NO_INBOUND_CONNECTIONS_DESCRIPTION:"No services are currently sending requests to this source.",NO_OUTBOUND_CONNECTIONS_DESCRIPTION:"This source hasn't sent requests to other services yet.",NO_INBOUND_CONNECTIONS:"No inbound connections",NO_OUTBOUND_CONNECTIONS:"No outbound connections",COULD_NOT_FETCH_PEER_SOURCES:"Could not fetch peer sources",VIRTUAL:"Virtual",VIRTUAL_TOOLTIP:"This service is not instrumented/injected with Odigos, but we can still see it in the service map because it is connected to other services.",NO_RESULTS:"No results",NO_RESULTS_FOR_FILTER:e=>`No results matched the filter '${e}'`,POD:"Pod",PODS:"Pods",PODS_HEALTHY:"Pods are healthy",PODS_NOT_HEALTHY:"Pods are not healthy",NO_RUNNING_PODS:"No running pods",NO_RUNNING_PODS_SUBTITLE:"Check if you have any running pods and try again",AGENT_INJECTED:"Agent injected",INJECTIONS_AS_EXPECTED:"Injections as expected",AGENT_NOT_INJECTED:"Agent not injected",KUBERNETES_HEALTHY:"Kubernetes healthy",ODIGOS_HEALTHY:"Odigos healthy",HEALTHY:"Healthy",UNHEALTHY:"Unhealthy",NOT_HEALTHY:"Not Healthy",NODE:"Node",AGE:"Age",RUNNING_TIME:"Running Time",RUNNING_TIME_TOOLTIP:"Time elapsed since the container was last started and entered the Running state",NOT_RUNNING:"Not Running",RESTARTS:"Restarts",LATEST_REVISION:"Latest Revision",OLD_REVISION:"Old Revision",READY:"Ready",NOT_READY:"Not Ready",STARTED:"Started",NOT_STARTED:"Not Started",CRASHLOOP:"Crashloop",NO_CRASHLOOP:"No Crashloop",CRASHLOOP_BACKOFF:"Crashloop backoff",CANNOT_POOL_IMAGE:"Cannot pool image",DEVICE_NAME:"Device Name",INSTRUMENTED:"Instrumented",UNINSTRUMENTED:"Uninstrumented",INSTRUMENTED_WITH_DISTRO:e=>`Instrumented | ${e}`,DEBUG_COMMANDS:"Debug Commands",YAML:"YAML",YAML_FILES:"YAML Files",GET_POD_YAML:"Get Pod YAML",GET_POD_LOGS:"Get Pod Logs",DESCRIBE_POD:"Describe Pod",CONTAINER:"Container",CONTAINERS:"Containers",DETECTED_CONTAINERS:"Detected Containers",DETECTED_CONTAINERS_DESCRIPTION:"The system automatically instruments the containers it detects with a supported programming language.",NO_CONTAINERS_DETECTED:"No containers detected",DETECTED_PROCESSES:"Detected Processes",DETECTED_PROCESSES_DESCRIPTION:"The system automatically instruments the processes it detects with a supported programming language.",NO_PROCESSES_DETECTED:"No processes detected",CONTAINER_NAME:"Container Name",PROCESS:"Process",PROCESSES:"Processes",PROCESS_FALLBACK_NAME:"process",OPEN_IN_POD_TAB:"Open in 'Pod' tab",OPEN_IN_SAMPLING_PAGE:"Open in 'Sampling' page",ALL_CONTAINERS_HEALTHY:e=>`All ${e} containers are healthy`,ALL_PROCESSES_HEALTHY:e=>`All ${e} processes are healthy`,PID:e=>`#${e}`,IDENTIFYING_ATTRIBUTES:"Identifying Attributes",INSTRUMENTATION_LIBRARIES:"Instrumentation Libraries",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",NO_DATA_INSTRUMENTATION_RULES:"To configure how telemetry is collected",NO_DATA_SOURCES:"To start collecting telemetry from a Kubernetes workload",NO_DATA_ACTIONS:"To process telemetry before export",NO_DATA_DESTINATIONS:"To send telemetry to an observability backend",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_DETAILS_SUBTITLE:"Use when multiple languages exist in the same container or when Odigos is unable to detect the application language",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.",OVERRIDE_OTEL_DISTRO_NAME:"Override OpenTelemetry distro name",OVERRIDE_OTEL_DISTRO_NAME_SUBTITLE:"Use to set a specific Odigos OpenTelemetry distribution",OVERRIDE_OTEL_DISTRO_NAME_WARNING:"This is an advanced configuration. If the selected OpenTelemetry distro name is incorrect, data collection may be incomplete or may not occur at all.",OVERRIDE_OTEL_DISTRO_NAME_SAVE_TOOLTIP:"Use the provided OpenTelemetry distro name to instrument this container",OVERRIDE_OTEL_DISTRO_NAME_DELETE_TOOLTIP:"Remove manual override of OpenTelemetry distro name, and use Odigos automatic detection OpenTelemetry distro name for instrumentation",OVERRIDE_RUNTIME_DETAILS_SAVE_TOOLTIP:"Use the provided runtime details to instrument this container",OVERRIDE_RUNTIME_DETAILS_DELETE_TOOLTIP:"Remove manual override of runtime details, and use Odigos automatic detection runtime details for instrumentation",OTEL_DISTRO_NAME:"OpenTelemetry distro name",WAITING_FOR_RUNTIME_DETECTION:"Waiting for runtime detection...",DETECTING_RUNTIME_INFO:"Detecting runtime info",NO_AVAILABLE_AGENT:"No available agent",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",ROLLOUT:"Rollout",ROLLOUT_RESTART:"Rollout Restart",ROLLOUT_NOT_REQUIRED:"Rollout Not Required",ROLLOUT_NOT_REQUIRED_MESSAGE:"This source is instrumented with eBPF and does not require a restart.",ROLLOUT_FAILED:"Rollout Failed",ROLLOUT_PREVIOUS_ONGOING:"Previous Rollout Ongoing",ROLLOUT_PREVIOUS_ONGOING_MESSAGE:"A previous rollout is ongoing. Please wait for it to finish before triggering a new one.",ROLLOUT_AUTO_DISABLED:"Auto Rollout Disabled",ROLLOUT_AUTO_DISABLED_MESSAGE:"Trigger a manual rollout to inject the agent.",ROLLOUT_FINISHED:"Rollout Finished",ROLLOUT_FINISHED_MESSAGE:"All pods have been updated and are healthy.",ROLLBACK:"Rollback",ROLLBACK_OCCURRED:"Rollback Occurred",ROLLBACK_OCCURRED_MESSAGE:"Odigos detected a crash and rolled back instrumentation to protect your workload.",ROLLBACK_SUCCESS:"Rollback Success",ROLLBACK_RECOVER:"Recover",FETCHING_NAMESPACES:"Fetching namespaces",FETCHING_NAMESPACES_SUBTITLE:"Please wait while we fetch the namespaces",ADD_SOURCES_DESCRIPTION:"Choose which sources to monitor in your pipeline.",CREATING_SOURCES:"Creating Sources...",CREATING_SOURCES_SUBTITLE:"This may take a few moments while sources are being created.",SELECT_NAMESPACE:"Select namespace from the list",SELECT_NAMESPACE_SUBTITLE:"Add namespace so you can select workloads from it.",CREATING_ACTION:"Creating action",CREATING_ACTION_SUBTITLE:"Please wait while we create the action",ADD_ACTION_DESCRIPTION:"Select an action to modify telemetry data before it's sent to destinations. Choose an action type and configure its details.",CREATING_INSTRUMENTATION_RULE:"Creating instrumentation rule",CREATING_INSTRUMENTATION_RULE_SUBTITLE:"Please wait while we create the instrumentation rule",ADD_INSTRUMENTATION_RULE_DESCRIPTION:"Define how telemetry is recorded from your application. Choose a rule type and configure the details.",CREATING_DESTINATION:"Creating destination",CREATING_DESTINATION_SUBTITLE:"Please wait while we create the destination",ADD_DESTINATION_DRAWER_DESCRIPTION:"Add backend destination you want to connect with Odigos.",THROUGHPUT_LAST_10_SECONDS:"Throughput (last 10 seconds)",DELETE_POD_TO_RESTART:"Delete Pod to Restart",RESTART_POD_DESCRIPTION:"Deleting a pod removes it and lets Kubernetes controllers recreate a new one.\nThe new pod starts fresh with the latest instrumentation agent and configuration.\nRecommended for non-production clusters only.",DEBUG:"Debug",SAMPLING:"Sampling",HEAD_SAMPLING:"Head Sampling",TAIL_SAMPLING:"Tail Sampling",NOISY_OPERATIONS:"Noisy Operations",HIGHLY_RELEVANT_OPERATIONS:"Highly Relevant Operations",COST_REDUCTION_OPERATIONS:"Cost Reduction Operations"},yn={GET_STARTED:"Get started",ADD:"Add",ADD_NEW:"Add New",NEW:"New",SELECT:"Select",CREATE:"Create",UPDATE:"Update",EDIT:"Edit",DELETE:"Delete",RESTART:"Restart",RESTART_POD:"Restart pod",REFRESH:"Refresh",CANCEL:"Cancel",DONE:"Done",SAVE:"Save",BACK:"Back",NEXT:"Next",TEST:"Test",TEST_CONNECTION:"Test Connection",INSTRUMENT:"Instrument",UNINSTRUMENT:"Uninstrument"};var bn,$n,vn,xn,Sn,wn,En,Cn,Tn,An,In,kn,Nn,Dn,On,Rn,_n,Ln,Pn,Fn,Mn,zn,Un,Bn,jn,Wn,Hn,Gn,Xn,Kn,Vn,Jn,Yn,qn,Qn,Zn,eo,to,no,oo,ro,io,ao,so,lo,co;!function(e){e.K8sAttributes="K8sAttributesResolver",e.AddClusterInfo="AddClusterInfo",e.DeleteAttributes="DeleteAttribute",e.RenameAttributes="RenameAttribute",e.PiiMasking="PiiMasking",e.URLTemplatization="URLTemplatization",e.ExtractAttribute="ExtractAttribute"}(bn||(bn={})),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.UrlTemplatizationRulesGroups="urlTemplatizationRulesGroups",e.ExtractAttribute="extractAttribute"}($n||($n={})),function(e){e.Pod="pod",e.Namespace="namespace",e.Node="node"}(vn||(vn={})),function(e){e.EXISTS="exists",e.EQUALS="equals",e.NOT_EQUALS="not_equals",e.CONTAINS="contains",e.NOT_CONTAINS="not_contains",e.REGEX="regex"}(xn||(xn={})),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"}(Sn||(Sn={})),function(e){e.EXISTS="exists",e.EQUALS="equals"}(wn||(wn={})),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"}(En||(En={})),function(e){e.JSON="json",e.SQL="sql",e.ResourcePath="resource_path"}(Cn||(Cn={})),function(e){e.Horizontal="horizontal",e.Vertical="vertical"}(Tn||(Tn={})),function(e){e.Ascending="ascending",e.Descending="descending"}(An||(An={})),function(e){e.Community="community",e.Onprem="onprem"}(In||(In={})),function(e){e.K8s="k8s",e.Vm="vm"}(kn||(kn={})),function(e){e.Cli="odigos-cli",e.Helm="helm",e.Operator="odigos-operator"}(Nn||(Nn={})),function(e){e.New="NEW",e.AppsSelected="APPS_SELECTED",e.Finished="FINISHED"}(Dn||(Dn={})),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"}(On||(On={})),function(e){e.Create="Create",e.Read="Read",e.Update="Update",e.Delete="Delete"}(Rn||(Rn={})),function(e){e.Namespace="Namespace",e.Source="Source",e.Destination="Destination",e.Action="Action",e.InstrumentationRule="InstrumentationRule",e.SamplingRule="SamplingRule"}(_n||(_n={})),function(e){e.DataStream="DataStream"}(Ln||(Ln={})),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",e.Time="time"}(Pn||(Pn={})),function(e){e.Text="text",e.Password="password",e.Number="number",e.Decimal="decimal"}(Fn||(Fn={})),function(e){e.Warning="warning",e.Error="error",e.Success="success",e.Info="info",e.Default="default"}(Mn||(Mn={})),function(e){e.INSTRUMENTED="Instrumented",e.INSTRUMENTING="Instrumenting",e.UNINSTRUMENTED="Uninstrumented",e.NOT_INSTRUMENTED="Not Instrumented"}(zn||(zn={})),function(e){e.Loading="loading",e.Disabled="disabled"}(Un||(Un={})),function(e){e.Disabled="disabled",e.Unknown="unknown"}(Bn||(Bn={})),function(e){e.MarkedForInstrumentation="MarkedForInstrumentation",e.RuntimeDetection="RuntimeDetection",e.AgentEnabled="AgentEnabled",e.AgentInjected="AgentInjected",e.WorkloadRollout="WorkloadRollout",e.ProcessesHealthStatus="ProcessesHealthStatus",e.ExpectingTelemetry="ExpectingTelemetry",e.WorkloadOdigosHealth="WorkloadOdigosHealth"}(jn||(jn={})),function(e){e.TriggeredSuccessfully="RolloutTriggeredSuccessfully",e.RolloutFinished="RolloutFinished",e.PreviousRolloutOngoing="PreviousRolloutOngoing",e.Disabled="Disabled",e.NotRequired="NotRequired",e.WaitingForRestart="WaitingForRestart",e.WorkloadNotSupporting="WorkloadNotSupporting",e.WaitingInQueue="WaitingInQueue",e.FailedToPatch="FailedToPatch"}(Wn||(Wn={})),function(e){e.SuccessfullyInjected="SuccessfullyInjected",e.NoAgentInjected="NoAgentInjected",e.SomePodsAgentNotInjectedRolloutNeeded="SomePodsAgentNotInjectedRolloutNeeded",e.AgentInjectedAndDataSent="AgentInjectedAndDataSent"}(Hn||(Hn={})),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"}(Gn||(Gn={})),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"}(Xn||(Xn={})),function(e){e.Labeled="labeled"}(Kn||(Kn={})),function(e){e.AddRule="addRule",e.AddSource="addSource",e.AddAction="addAction",e.AddDestination="addDestination"}(Vn||(Vn={})),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",e.Pyroscope="pyroscope"}(Jn||(Jn={})),function(e){e.Deployment="Deployment",e.DaemonSet="DaemonSet",e.StatefulSet="StatefulSet",e.CronJob="CronJob",e.Pod="Pod",e.StaticPod="StaticPod",e.Rollout="Rollout",e.ConfigMap="ConfigMap",e.DeploymentConfig="DeploymentConfig",e.InstrumentationConfig="InstrumentationConfig"}(Yn||(Yn={})),function(e){e.GolangCommunity="golang-community",e.NodejsCommunity="nodejs-community",e.PythonCommunity="python-community",e.JavaCommunity="java-community",e.DotNetCommunity="dotnet-community",e.RubyCommunity="ruby-community",e.PhpCommunity="php-community",e.GolangEnterprise="golang-enterprise",e.NodejsEnterprise="nodejs-enterprise",e.PythonEnterprise="python-enterprise",e.JavaEnterprise="java-enterprise",e.JavaEbpfInstrumentations="java-ebpf-instrumentations",e.OpentelemetryEbpfInstrumentation="opentelemetry-ebpf-instrumentation",e.DotNetLegacy="dotnet-legacy",e.DotNetEnterprise="dotnet-enterprise",e.RubyEnterprise="ruby-enterprise",e.CPlusPlusEnterprise="cplusplus-enterprise",e.MySqlEnterprise="mysql-enterprise"}(qn||(qn={})),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"}(Qn||(Qn={})),function(e){e.CodeAttributes="CodeAttributes",e.HeadersCollection="HeadersCollection",e.PayloadCollection="PayloadCollection",e.CustomInstrumentation="CustomInstrumentation",e.UnknownType="UnknownType"}(Zn||(Zn={})),function(e){e.Column="column",e.FilePath="filePath",e.Function="function",e.LineNumber="lineNumber",e.Namespace="namespace",e.StackTrace="stacktrace"}(eo||(eo={})),function(e){e.HeaderKeys="headerKeys"}(to||(to={})),function(e){e.Java="java",e.Golang="golang"}(no||(no={}));class uo{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 po{packageName;functionName;receiverName;receiverMethodName;constructor(e,t,n,o){this.packageName=e,this.functionName=t||"",this.receiverName=n||"",this.receiverMethodName=o||""}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"}(oo||(oo={})),function(e){e.Healthy="Healthy",e.Updating="Updating",e.Degraded="Degraded",e.Failed="Failed",e.Down="Down",e.Unknown="Unknown"}(ro||(ro={})),function(e){e.Pending="Pending",e.Running="Running",e.Succeeded="Succeeded",e.Failed="Failed",e.Unknown="Unknown"}(io||(io={})),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"}(ao||(ao={})),function(e){e.Running="Running",e.Waiting="Waiting",e.Terminated="Terminated"}(so||(so={})),function(e){e.Logs="LOGS",e.Metrics="METRICS",e.Traces="TRACES",e.Profiles="PROFILES"}(lo||(lo={})),function(e){e.Logs="logs",e.Metrics="metrics",e.Traces="traces",e.Profiles="profiles"}(co||(co={}));const ho={[lo.Logs]:co.Logs,[lo.Metrics]:co.Metrics,[lo.Traces]:co.Traces,[lo.Profiles]:co.Profiles},go={[co.Logs]:lo.Logs,[co.Metrics]:lo.Metrics,[co.Traces]:lo.Traces,[co.Profiles]:lo.Profiles};var mo;!function(e){e.SampledSpansOnly="sampled_spans_only",e.AllSpans="all_spans"}(mo||(mo={}));const fo=(e,t)=>e===Mn.Success?fn.HEALTHY:e===Mn.Error?fn.NOT_HEALTHY:tn(t),yo=e=>{if(!e)return null;switch(e){case Qn.Irrelevant:return null;case Qn.Failure:case Qn.Error:return Mn.Error;case Qn.Notice:return Mn.Warning;case Qn.Pending:case Qn.Waiting:return Un.Loading;case Qn.Unsupported:case Qn.Disabled:return Un.Disabled;case Qn.Success:return Mn.Success;case Qn.Unknown:default:return Mn.Info}},bo=(e,t,n="reason",o)=>{const r=yo(e?.status);return r?{key:`desired-status-${e?.name}`,status:r,leftIcon:t||(r===Mn.Success?l:c),label:o||("reason"===n?tn(e?.reasonEnum):fo(r,e?.reasonEnum)),tooltip:e?.message,textSize:on.XXXS,invertColors:!0,useSecondaryTone:!0}:null},$o=e=>e.charAt(0).toUpperCase()+e.slice(1),vo=e=>{const t=e=>e.filter(e=>"object"==typeof e&&null!==e?""!==e.key&&""!==e.value:""!==e),n=e=>Object.fromEntries(Object.entries(e).filter(([e,t])=>""!==e&&""!==t).map(([e,o])=>Array.isArray(o)?[e,t(o)]:"object"==typeof o&&null!==o?[e,n(o)]:[e,o]));return Object.entries(e).reduce((e,[o,r])=>{try{const i=JSON.parse(r);Array.isArray(i)?e[o]=JSON.stringify(t(i)):e[o]="object"==typeof i&&null!==i?JSON.stringify(n(i)):r}catch(i){"object"==typeof r&&null!==r?Array.isArray(r)?e[o]=JSON.stringify(t(r)):e[o]=JSON.stringify(n(r)):e[o]=r}return e},{})};var xo;!function(e){e.SIGNALS="SIGNALS"}(xo||(xo={}));const So=(e,t,n)=>{if(!e||!e.length)return!0;if(1===e.length)return"true"==e[0];const[o,r,i]=e;if(o===xo.SIGNALS)switch(r){case"INCLUDES":return t?.includes(i);case"EXCLUDES":return!t?.includes(i);default:return!0}const a=n.find(e=>e.name===o||e.key===o);if(!a)return!1;const s=null==a.value?"":String(a.value);switch(r){case"===":case"==":return s===i;case"!==":case"!=":return s!==i;case">":return Number(s)>Number(i);case"<":return Number(s)<Number(i);case">=":return Number(s)>=Number(i);case"<=":return Number(s)<=Number(i);default:return!0}},wo=e=>JSON.parse(JSON.stringify(e)),Eo=(e,t)=>t.split(".").reduce((e,t)=>e?.[t],e),Co=(e,t,n)=>{const o=t.split(".");let r=e;for(let e=0;e<o.length-1;e++)o[e]in r&&"object"==typeof r[o[e]]||(r[o[e]]={}),r=r[o[e]];r[o[o.length-1]]=n},To=(e,t)=>{let n=[...e];return t.monitors?.length&&(n=n.filter(e=>!!t.monitors?.find(t=>e.signals?.find(e=>e.toLowerCase()===t.id)))),n},Ao=(e,t)=>{let n=[...e];return t.monitors?.length&&(n=n.filter(e=>!!t.monitors?.find(t=>e.exportedSignals[t.id]))),n},Io=(e,t)=>t?e.filter(e=>e.dataStreamNames.includes(t)||!e.dataStreamNames.length):[],ko=(e,t)=>{let n=e;if(t.namespaces?.length){const e=new Set(t.namespaces.map(({id:e})=>e));n=n.filter(({id:t})=>e.has(t.namespace))}if(t.kinds?.length){const e=new Set(t.kinds.map(({id:e})=>e));n=n.filter(({id:t})=>e.has(t.kind))}if(t.languages?.length){const e=new Set(t.languages.map(({id:e})=>e));n=n.filter(({runtimeInfo:t,containers:n})=>t?.detectedLanguages?.some(t=>e.has(t))||n?.some(t=>{const n=t.overrides?.runtimeInfo?.language??t.runtimeInfo?.language;return!!n&&e.has(n)}))}if(t.podsAgentInjectionStatus?.length){const e=new Set(t.podsAgentInjectionStatus.map(({id:e})=>e));n=n.filter(({podsAgentInjectionStatus:t})=>e.has(t?.reasonEnum??"")||e.has(t?.message??""))}return t.onlyErrors&&(n=n.filter(e=>yo(e.workloadOdigosHealthStatus?.status)===Mn.Error)),n},No=(e,t)=>t?e.filter(e=>e.dataStreamNames?.includes(t)||t===un&&!e.dataStreamNames?.length):[],Do=(e,t="",n={})=>{for(const o in e)if(e.hasOwnProperty(o)){const r=e[o],i=t?`${t}.${o}`:o;null===r||"object"!=typeof r||Array.isArray(r)?Array.isArray(r)?r.forEach((e,t)=>{const o=`${i}[${t}]`;null!==e&&"object"==typeof e?Do(e,o,n):n[o]=e}):n[i]=r:Do(r,i,n)}return n},Oo=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]}`},Ro=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`}},_o=()=>{const e=crypto.getRandomValues(new Uint8Array(16));let t=0;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,n=>{const o=e[t%16];t++;return("1"===n?o:"0"===n?63&o|128:15&o|64).toString(16)})},Lo=e=>({[bn.K8sAttributes]:m,[bn.AddClusterInfo]:g,[bn.DeleteAttributes]:h,[bn.PiiMasking]:p,[bn.RenameAttributes]:u,[bn.ExtractAttribute]:d,[bn.URLTemplatization]:d}[e]||f),Po=e=>{if(!e)return Fo([]);if(Array.isArray(e))return Fo(e);const t=Object.values(e).reduce((e,t)=>{if(null!=t){const n=yo(t.status);n&&e.push({status:n,type:t.name??"",reason:t.reasonEnum??null,message:t.message??null})}return e},[]);return Fo(t)},Fo=e=>{const t=e?.filter(({status:e})=>e===Mn.Error),n=e?.filter(({status:e})=>e===Mn.Warning),o=e?.filter(({status:e})=>e===Un.Disabled),r=e?.filter(({status:e})=>e===Un.Loading),i=t.length>0,a=n.length>0,s=o.length>0;return{errors:t,hasErrors:i,warnings:n,hasWarnings:a,disableds:o,hasDisableds:s,loadings:r,hasLoadings:r.length>0,priorotizedStatus:i?Mn.Error:a?Mn.Warning:s?Mn.Info:void 0}},Mo=e=>{const t=e?.reduce((e,t)=>t.agentEnabled?.agentEnabled?e+1:e,0);return`${t}/${e?.length||0} instrumented`},zo=e=>({[On.Java]:R,[On.Go]:O,[On.JavaScript]:D,[On.Python]:N,[On.DotNet]:k,[On.CSharp]:I,[On.CPlusPlus]:A,[On.Php]:T,[On.Ruby]:C,[On.Rust]:E,[On.Swift]:w,[On.Elixir]:S,[On.MySql]:x,[On.Nginx]:v,[On.Postgres]:$,[On.Redis]:b,[On.Kafka]:y,[On.Ignored]:f,[On.Unknown]:f,[On.Processing]:f,[On.NoContainers]:f,[On.NoRunningPods]:f}[e]||f),Uo=e=>e?e.overrides?.runtimeInfo?.language??e.runtimeInfo?.language??On.Unknown:On.Unknown,Bo=e=>e?e.overrides?.runtimeInfo?.runtimeVersion??e.runtimeInfo?.runtimeVersion??null:null,jo=e=>e?.map(e=>zo(Uo(e)))||[],Wo=e=>e?.map(e=>zo(e))||[],Ho=e=>e.runtimeInfo?.detectedLanguages?.length?Wo(e.runtimeInfo?.detectedLanguages):jo(e.containers),Go=(e,t)=>{const n={[Jn.Alauda]:Me,[Jn.AlibabaCloud]:Fe,[Jn.AppDynamics]:Pe,[Jn.Axiom]:Le,[Jn.AzureBlob]:_e,[Jn.AzureMonitor]:Re,[Jn.BetterStack]:Oe,[Jn.Bonree]:De,[Jn.Causely]:Ne,[Jn.Checkly]:ke,[Jn.Chronosphere]:Ie,[Jn.ClickHouse]:Ae,[Jn.CloudWatch]:Te,[Jn.Coralogix]:Ce,[Jn.Dash0]:Ee,[Jn.Datadog]:we,[Jn.Dynamic]:q,[Jn.Dynatrace]:Se,[Jn.ElasticApm]:xe,[Jn.ElasticSearch]:ve,[Jn.GoogleCloud]:$e,[Jn.GoogleCloudOTLP]:$e,[Jn.GrafanaCloudLoki]:be,[Jn.GrafanaCloudPrometheus]:be,[Jn.GrafanaCloudTempo]:be,[Jn.Greptime]:ye,[Jn.Groundcover]:fe,[Jn.Honeycomb]:me,[Jn.HyperDX]:ge,[Jn.Instana]:he,[Jn.Jaeger]:pe,[Jn.Kafka]:y,[Jn.Kloudmate]:ue,[Jn.Last9]:de,[Jn.Lightstep]:ce,[Jn.LogzIo]:le,[Jn.Loki]:se,[Jn.Lumigo]:ae,[Jn.Middleware]:ie,[Jn.NewRelic]:re,[Jn.Observe]:oe,[Jn.Odigos]:ne,[Jn.OneUptime]:te,[Jn.OpenObserve]:ee,[Jn.Opsverse]:Z,[Jn.Oracle]:Q,[Jn.OTLP]:q,[Jn.OTLPHttp]:q,[Jn.Prometheus]:Y,[Jn.Qryn]:J,[Jn.QrynOss]:V,[Jn.Quickwit]:K,[Jn.S3]:X,[Jn.Seq]:G,[Jn.Signalfx]:W,[Jn.Signoz]:H,[Jn.Splunk]:W,[Jn.SplunkSapm]:W,[Jn.SplunkOtlp]:W,[Jn.SumoLogic]:j,[Jn.TelemetryHub]:B,[Jn.Tempo]:U,[Jn.Tingyun]:z,[Jn.Traceloop]:M,[Jn.Uptrace]:F,[Jn.VictoriaMetrics]:P,[Jn.VictoriaMetricsCloud]:P,[Jn.XRay]:L,[Jn.Pyroscope]:_}[e];return n&&!t?{icon:n}:{iconSrc:`https://d15jtxgb40qetw.cloudfront.net/${e}.svg`}},Xo=e=>({[_n.Namespace]:We,[_n.Source]:je,[_n.Destination]:Be,[_n.Action]:d,[_n.InstrumentationRule]:Ue,[_n.SamplingRule]:ze}[e]),Ko=e=>"ruleId"in e&&e.ruleId?e.ruleId:"id"in e&&"string"==typeof e.id&&e.id||"id"in e&&"object"==typeof e.id&&e.id.namespace&&e.id.kind&&e.id.name?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,Vo=e=>e?"string"==typeof e?e:`${e.namespace}/${e.kind}/${e.name}`:"",Jo=e=>Vo(Ko(e)),Yo=(e,t,n)=>{const{extended:o,prioritizeDisplayName:r}=n||{};let i="",a="";switch(t){case _n.InstrumentationRule:const t=e;i=t.type,a=t.ruleName;break;case _n.Source:const n=e;i=n.id.name,a=n.serviceName||"";break;case _n.Action:const o=e;i=o.type,a=o.name||"";break;case _n.Destination:const r=e;i=r.destinationType.displayName,a=r.name;break;case _n.Namespace:const s=e;i=s.name,a=s.name}return o?i+(a&&a!==i?` (${a})`:""):r&&a||i},qo=(e,t)=>{if(t===_n.Source){const t={namespace:"",name:"",kind:""};return e.split("&").forEach(e=>{const[n,o]=e.split("=");t[n]=o}),t}return e},Qo=e=>({[Zn.CodeAttributes]:Ke,[Zn.CustomInstrumentation]:Xe,[Zn.HeadersCollection]:Ge,[Zn.PayloadCollection]:He,[Zn.UnknownType]:f}[e]||f),Zo=e=>e.overrides?.runtimeInfo?.language??e.runtimeInfo?.language??On.Unknown,er=e=>{const{numberOfInstances:t,containers:n}=e;if(!n)return t&&t>0?On.Processing:On.NoRunningPods;const o=n?.filter(e=>Zo(e)!==On.Ignored);if(!o.length)return On.NoContainers;const r=o.find(e=>Zo(e)!==On.Unknown);return r?Zo(r):On.Unknown},tr=(e,t,n)=>(t===_n.Source?e?.sources.find(e=>e.kind===n.kind&&e.name===n.name&&e.namespace===n.namespace):e?.destinations.find(e=>e.id===n))||{throughput:0},nr=e=>({[lo.Logs]:Ye,[lo.Metrics]:Je,[lo.Traces]:Ve,[lo.Profiles]:ne}[e]),or=e=>{if(!e)return ne;return{[kn.K8s]:m,[kn.Vm]:qe}[e]},rr=e=>{if(!e)return"Unknown";return{[kn.K8s]:"Kubernetes Cluster",[kn.Vm]:"Virtual Machine"}[e]},ir=(e,t,n)=>{const o=e[t];return o?o.flatMap(e=>{const o=e[n],r=[];return void 0!==o&&(Array.isArray(o)?r.push(...o):r.push(o)),r.push(...ir(e,t,n)),r}):[]},ar=(e,t)=>{if(t===_n.Source){let t="";return Object.entries(e).forEach(([e,n])=>{t+=`${e}=${n}&`}),t.slice(0,-1),t}return e},sr=(e,t,n)=>{switch(t){case Mn.Default:return e.v2.colors.purple[n];case Mn.Info:return e.v2.colors.blue[n];case Mn.Error:return e.v2.colors.red[n];case Mn.Warning:return e.v2.colors.yellow[n];case Mn.Success:return e.v2.colors.green[n];case Un.Loading:case Bn.Disabled:case Bn.Unknown:return e.v2.colors.silver[n];default:return e.v2.colors.white[500]}},lr=e=>{switch(e){case ro.Updating:case io.Pending:case ao.ContainerCreating:case so.Waiting:return Mn.Info;case ro.Healthy:case io.Succeeded:case io.Running:case ao.Running:case so.Running:return Mn.Success;case ro.Degraded:return Mn.Warning;case ro.Failed:case io.Failed:case ao.Error:case ao.CrashLoopBackOff:case ao.CreateContainerError:case ao.CreateContainerConfigError:case ao.ErrImagePull:case ao.ErrImageNeverPull:case ao.ImagePullBackOff:case ao.InvalidImageName:case ao.RegistryUnavailable:case ao.NetworkNotReady:case ao.OOMKilled:case ao.ContainerCannotRun:case so.Terminated:case ao.DeadlineExceeded:case ao.StartError:return Mn.Error;case ro.Down:case ao.Completed:return Bn.Disabled;case ro.Unknown:case io.Unknown:default:return Bn.Unknown}},cr=o.div`
|
|
41
|
+
`,cn=Lt(({children:n,variant:o=nn.P,color:r,size:i=on.S,weight:a=400,opacity:s=1,align:l="left",lineHeight:c,transform:d,nowrap:u,underline:p,onClick:h,disabled:g,maxLines:m,...f},y)=>{const b=n?.toString().split("\n")||[];return e(ln,{ref:y,as:o,$color:r,$size:i,$weight:a,$opacity:s,$align:l,$lineHeight:c,$transform:d,$nowrap:u,$underline:p,$maxLines:m,$withClick:!!h&&!g,onClick:g?void 0:h,...f,children:b.map((n,o)=>t(Pt,{children:[n,o!==b.length-1&&e("br",{})]},`typography-${o}-${n}`))})});cn.displayName="Typography";const dn="https://docs.odigos.io",un="default",pn="this-cluster",hn="This Cluster",gn={SELECTED_DATA_STREAM:"SELECTED_DATA_STREAM",SELECTED_DATA_STREAM_WITH_PROXY:e=>`SELECTED_DATA_STREAM_${e}`,OVERVIEW_FILTERS:"OVERVIEW_FILTERS",DARK_MODE:"DARK_MODE"},mn={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)'},fn={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",RENAME_STREAM:e=>`Rename "${e}"`,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}".`,DATA_STREAM_MERGE_WARNING:(e,t)=>e?`A Data Stream named "${t}" already exists. Saving will merge "${e}" into "${t}" - both streams will share the same configuration going forward.`:`A Data Stream named "${t}" already exists. Saving will merge into "${t}" - the new stream will share the existing configuration going forward.`,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",SOURCES_SETUP:"Sources setup",DESTINATIONS_SETUP:"Destinations setup",SUMMARY:"Summary",REVIEW_SETUP:"Review your setup and confirm your choices.",NO_SOURCES_SELECTED:"No sources selected",ADD_SOURCE_PROMPT:"Add at least one source to start collecting data",NO_DESTINATIONS_SELECTED:"No destinations selected",ADD_DESTINATION_PROMPT:"Add destination so your data has somewhere to go",GET_STARTED_WITH:"Get started with",GET_STARTED_DESCRIPTION:"First, select the sources you want Odigos to monitor. Next, choose where your data should be sent by configuring destinations.",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",OVERVIEW:"Overview",LIBRARIES:"Libraries",STANDARD_LIBRARY:"Standard Library",STANDARD:"Standard",PEER_SOURCES:"Peer Sources",PROFILING:"Profiling",INBOUND:"Inbound",OUTBOUND:"Outbound",INBOUND_DESCRIPTION:e=>`Services that send requests to ${e}`,OUTBOUND_DESCRIPTION:e=>`Services that ${e} sends requests to`,NO_INBOUND_CONNECTIONS_DESCRIPTION:"No services are currently sending requests to this source.",NO_OUTBOUND_CONNECTIONS_DESCRIPTION:"This source hasn't sent requests to other services yet.",NO_INBOUND_CONNECTIONS:"No inbound connections",NO_OUTBOUND_CONNECTIONS:"No outbound connections",COULD_NOT_FETCH_PEER_SOURCES:"Could not fetch peer sources",VIRTUAL:"Virtual",VIRTUAL_TOOLTIP:"This service is not instrumented/injected with Odigos, but we can still see it in the service map because it is connected to other services.",NO_RESULTS:"No results",NO_RESULTS_FOR_FILTER:e=>`No results matched the filter '${e}'`,POD:"Pod",PODS:"Pods",PODS_HEALTHY:"Pods are healthy",PODS_NOT_HEALTHY:"Pods are not healthy",NO_RUNNING_PODS:"No running pods",NO_RUNNING_PODS_SUBTITLE:"Check if you have any running pods and try again",AGENT_INJECTED:"Agent injected",INJECTIONS_AS_EXPECTED:"Injections as expected",AGENT_NOT_INJECTED:"Agent not injected",KUBERNETES_HEALTHY:"Kubernetes healthy",ODIGOS_HEALTHY:"Odigos healthy",HEALTHY:"Healthy",UNHEALTHY:"Unhealthy",NOT_HEALTHY:"Not Healthy",NODE:"Node",AGE:"Age",RUNNING_TIME:"Running Time",RUNNING_TIME_TOOLTIP:"Time elapsed since the container was last started and entered the Running state",NOT_RUNNING:"Not Running",RESTARTS:"Restarts",LATEST_REVISION:"Latest Revision",OLD_REVISION:"Old Revision",READY:"Ready",NOT_READY:"Not Ready",STARTED:"Started",NOT_STARTED:"Not Started",CRASHLOOP:"Crashloop",NO_CRASHLOOP:"No Crashloop",CRASHLOOP_BACKOFF:"Crashloop backoff",CANNOT_POOL_IMAGE:"Cannot pool image",DEVICE_NAME:"Device Name",INSTRUMENTED:"Instrumented",UNINSTRUMENTED:"Uninstrumented",INSTRUMENTED_WITH_DISTRO:e=>`Instrumented | ${e}`,DEBUG_COMMANDS:"Debug Commands",YAML:"YAML",YAML_FILES:"YAML Files",GET_POD_YAML:"Get Pod YAML",GET_POD_LOGS:"Get Pod Logs",DESCRIBE_POD:"Describe Pod",CONTAINER:"Container",CONTAINERS:"Containers",DETECTED_CONTAINERS:"Detected Containers",DETECTED_CONTAINERS_DESCRIPTION:"The system automatically instruments the containers it detects with a supported programming language.",NO_CONTAINERS_DETECTED:"No containers detected",DETECTED_PROCESSES:"Detected Processes",DETECTED_PROCESSES_DESCRIPTION:"The system automatically instruments the processes it detects with a supported programming language.",NO_PROCESSES_DETECTED:"No processes detected",CONTAINER_NAME:"Container Name",PROCESS:"Process",PROCESSES:"Processes",PROCESS_FALLBACK_NAME:"process",OPEN_IN_POD_TAB:"Open in 'Pod' tab",OPEN_IN_SAMPLING_PAGE:"Open in 'Sampling' page",ALL_CONTAINERS_HEALTHY:e=>`All ${e} containers are healthy`,ALL_PROCESSES_HEALTHY:e=>`All ${e} processes are healthy`,PID:e=>`#${e}`,IDENTIFYING_ATTRIBUTES:"Identifying Attributes",INSTRUMENTATION_LIBRARIES:"Instrumentation Libraries",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",NO_DATA_INSTRUMENTATION_RULES:"To configure how telemetry is collected",NO_DATA_SOURCES:"To start collecting telemetry from a Kubernetes workload",NO_DATA_ACTIONS:"To process telemetry before export",NO_DATA_DESTINATIONS:"To send telemetry to an observability backend",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_DETAILS_SUBTITLE:"Use when multiple languages exist in the same container or when Odigos is unable to detect the application language",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.",OVERRIDE_OTEL_DISTRO_NAME:"Override OpenTelemetry distro name",OVERRIDE_OTEL_DISTRO_NAME_SUBTITLE:"Use to set a specific Odigos OpenTelemetry distribution",OVERRIDE_OTEL_DISTRO_NAME_WARNING:"This is an advanced configuration. If the selected OpenTelemetry distro name is incorrect, data collection may be incomplete or may not occur at all.",OVERRIDE_OTEL_DISTRO_NAME_SAVE_TOOLTIP:"Use the provided OpenTelemetry distro name to instrument this container",OVERRIDE_OTEL_DISTRO_NAME_DELETE_TOOLTIP:"Remove manual override of OpenTelemetry distro name, and use Odigos automatic detection OpenTelemetry distro name for instrumentation",OVERRIDE_RUNTIME_DETAILS_SAVE_TOOLTIP:"Use the provided runtime details to instrument this container",OVERRIDE_RUNTIME_DETAILS_DELETE_TOOLTIP:"Remove manual override of runtime details, and use Odigos automatic detection runtime details for instrumentation",OTEL_DISTRO_NAME:"OpenTelemetry distro name",WAITING_FOR_RUNTIME_DETECTION:"Waiting for runtime detection...",DETECTING_RUNTIME_INFO:"Detecting runtime info",NO_AVAILABLE_AGENT:"No available agent",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",ROLLOUT:"Rollout",ROLLOUT_RESTART:"Rollout Restart",ROLLOUT_RESTART_WORKLOADS_DESCRIPTION:"Are you sure you want to rollout restart these workloads?",ROLLOUT_NOT_REQUIRED:"Rollout Not Required",ROLLOUT_NOT_REQUIRED_MESSAGE:"This source is instrumented with eBPF and does not require a restart.",ROLLOUT_FAILED:"Rollout Failed",ROLLOUT_PREVIOUS_ONGOING:"Previous Rollout Ongoing",ROLLOUT_PREVIOUS_ONGOING_MESSAGE:"A previous rollout is ongoing. Please wait for it to finish before triggering a new one.",ROLLOUT_AUTO_DISABLED:"Auto Rollout Disabled",ROLLOUT_AUTO_DISABLED_MESSAGE:"Trigger a manual rollout to inject the agent.",ROLLOUT_FINISHED:"Rollout Finished",ROLLOUT_FINISHED_MESSAGE:"All pods have been updated and are healthy.",ROLLBACK:"Rollback",ROLLBACK_OCCURRED:"Rollback Occurred",ROLLBACK_OCCURRED_MESSAGE:"Odigos detected a crash and rolled back instrumentation to protect your workload.",ROLLBACK_SUCCESS:"Rollback Success",ROLLBACK_RECOVER:"Recover",FETCHING_NAMESPACES:"Fetching namespaces",FETCHING_NAMESPACES_SUBTITLE:"Please wait while we fetch the namespaces",ADD_SOURCES_DESCRIPTION:"Choose which sources to monitor in your pipeline.",CREATING_SOURCES:"Creating Sources...",CREATING_SOURCES_SUBTITLE:"This may take a few moments while sources are being created.",SELECT_NAMESPACE:"Select namespace from the list",SELECT_NAMESPACE_SUBTITLE:"Add namespace so you can select workloads from it.",CREATING_ACTION:"Creating action",CREATING_ACTION_SUBTITLE:"Please wait while we create the action",ADD_ACTION_DESCRIPTION:"Select an action to modify telemetry data before it's sent to destinations. Choose an action type and configure its details.",CREATING_INSTRUMENTATION_RULE:"Creating instrumentation rule",CREATING_INSTRUMENTATION_RULE_SUBTITLE:"Please wait while we create the instrumentation rule",ADD_INSTRUMENTATION_RULE_DESCRIPTION:"Define how telemetry is recorded from your application. Choose a rule type and configure the details.",CREATING_DESTINATION:"Creating destination",CREATING_DESTINATION_SUBTITLE:"Please wait while we create the destination",ADD_DESTINATION_DRAWER_DESCRIPTION:"Add backend destination you want to connect with Odigos.",THROUGHPUT_LAST_10_SECONDS:"Throughput (last 10 seconds)",DELETE_POD_TO_RESTART:"Delete Pod to Restart",DEBUG:"Debug",SAMPLING:"Sampling",HEAD_SAMPLING:"Head Sampling",TAIL_SAMPLING:"Tail Sampling",NOISY_OPERATIONS:"Noisy Operations",HIGHLY_RELEVANT_OPERATIONS:"Highly Relevant Operations",COST_REDUCTION_OPERATIONS:"Cost Reduction Operations"},yn={GET_STARTED:"Get started",ADD:"Add",ADD_NEW:"Add New",NEW:"New",SELECT:"Select",CREATE:"Create",UPDATE:"Update",EDIT:"Edit",DELETE:"Delete",RESTART:"Restart",RESTART_POD:"Restart pod",REFRESH:"Refresh",CANCEL:"Cancel",DONE:"Done",SAVE:"Save",BACK:"Back",CONFIRM:"Confirm",NEXT:"Next",TEST:"Test",TEST_CONNECTION:"Test Connection",INSTRUMENT:"Instrument",UNINSTRUMENT:"Uninstrument"};var bn,$n,vn,xn,Sn,wn,En,Cn,Tn,An,In,kn,Nn,Dn,On,Rn,_n,Ln,Pn,Fn,Mn,zn,Un,Bn,jn,Wn,Hn,Gn,Xn,Kn,Vn,Jn,Yn,qn,Qn,Zn,eo,to,no,oo,ro,io,ao,so,lo,co;!function(e){e.K8sAttributes="K8sAttributesResolver",e.AddClusterInfo="AddClusterInfo",e.DeleteAttributes="DeleteAttribute",e.RenameAttributes="RenameAttribute",e.PiiMasking="PiiMasking",e.URLTemplatization="URLTemplatization",e.ExtractAttribute="ExtractAttribute"}(bn||(bn={})),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.UrlTemplatizationRulesGroups="urlTemplatizationRulesGroups",e.ExtractAttribute="extractAttribute"}($n||($n={})),function(e){e.Pod="pod",e.Namespace="namespace",e.Node="node"}(vn||(vn={})),function(e){e.EXISTS="exists",e.EQUALS="equals",e.NOT_EQUALS="not_equals",e.CONTAINS="contains",e.NOT_CONTAINS="not_contains",e.REGEX="regex"}(xn||(xn={})),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"}(Sn||(Sn={})),function(e){e.EXISTS="exists",e.EQUALS="equals"}(wn||(wn={})),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"}(En||(En={})),function(e){e.JSON="json",e.SQL="sql",e.ResourcePath="resource_path"}(Cn||(Cn={})),function(e){e.Horizontal="horizontal",e.Vertical="vertical"}(Tn||(Tn={})),function(e){e.Ascending="ascending",e.Descending="descending"}(An||(An={})),function(e){e.Community="community",e.Onprem="onprem"}(In||(In={})),function(e){e.K8s="k8s",e.Vm="vm"}(kn||(kn={})),function(e){e.Cli="odigos-cli",e.Helm="helm",e.Operator="odigos-operator"}(Nn||(Nn={})),function(e){e.New="NEW",e.AppsSelected="APPS_SELECTED",e.Finished="FINISHED"}(Dn||(Dn={})),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"}(On||(On={})),function(e){e.Create="Create",e.Read="Read",e.Update="Update",e.Delete="Delete"}(Rn||(Rn={})),function(e){e.Namespace="Namespace",e.Source="Source",e.Destination="Destination",e.Action="Action",e.InstrumentationRule="InstrumentationRule",e.SamplingRule="SamplingRule"}(_n||(_n={})),function(e){e.DataStream="DataStream"}(Ln||(Ln={})),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",e.Time="time"}(Pn||(Pn={})),function(e){e.Text="text",e.Password="password",e.Number="number",e.Decimal="decimal"}(Fn||(Fn={})),function(e){e.Warning="warning",e.Error="error",e.Success="success",e.Info="info",e.Default="default"}(Mn||(Mn={})),function(e){e.INSTRUMENTED="Instrumented",e.INSTRUMENTING="Instrumenting",e.UNINSTRUMENTED="Uninstrumented",e.NOT_INSTRUMENTED="Not Instrumented"}(zn||(zn={})),function(e){e.Loading="loading",e.Disabled="disabled"}(Un||(Un={})),function(e){e.Disabled="disabled",e.Unknown="unknown"}(Bn||(Bn={})),function(e){e.MarkedForInstrumentation="MarkedForInstrumentation",e.RuntimeDetection="RuntimeDetection",e.AgentEnabled="AgentEnabled",e.AgentInjected="AgentInjected",e.WorkloadRollout="WorkloadRollout",e.ProcessesHealthStatus="ProcessesHealthStatus",e.ExpectingTelemetry="ExpectingTelemetry",e.WorkloadOdigosHealth="WorkloadOdigosHealth"}(jn||(jn={})),function(e){e.TriggeredSuccessfully="RolloutTriggeredSuccessfully",e.RolloutFinished="RolloutFinished",e.PreviousRolloutOngoing="PreviousRolloutOngoing",e.Disabled="Disabled",e.NotRequired="NotRequired",e.WaitingForRestart="WaitingForRestart",e.WorkloadNotSupporting="WorkloadNotSupporting",e.WaitingInQueue="WaitingInQueue",e.FailedToPatch="FailedToPatch"}(Wn||(Wn={})),function(e){e.SuccessfullyInjected="SuccessfullyInjected",e.NoAgentInjected="NoAgentInjected",e.SomePodsAgentNotInjectedRolloutNeeded="SomePodsAgentNotInjectedRolloutNeeded",e.AgentInjectedAndDataSent="AgentInjectedAndDataSent"}(Hn||(Hn={})),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"}(Gn||(Gn={})),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"}(Xn||(Xn={})),function(e){e.Labeled="labeled"}(Kn||(Kn={})),function(e){e.AddRule="addRule",e.AddSource="addSource",e.AddAction="addAction",e.AddDestination="addDestination"}(Vn||(Vn={})),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",e.Pyroscope="pyroscope"}(Jn||(Jn={})),function(e){e.Deployment="Deployment",e.DaemonSet="DaemonSet",e.StatefulSet="StatefulSet",e.CronJob="CronJob",e.Pod="Pod",e.StaticPod="StaticPod",e.Rollout="Rollout",e.ConfigMap="ConfigMap",e.DeploymentConfig="DeploymentConfig",e.InstrumentationConfig="InstrumentationConfig"}(Yn||(Yn={})),function(e){e.GolangCommunity="golang-community",e.NodejsCommunity="nodejs-community",e.PythonCommunity="python-community",e.JavaCommunity="java-community",e.DotNetCommunity="dotnet-community",e.RubyCommunity="ruby-community",e.PhpCommunity="php-community",e.GolangEnterprise="golang-enterprise",e.NodejsEnterprise="nodejs-enterprise",e.PythonEnterprise="python-enterprise",e.JavaEnterprise="java-enterprise",e.JavaEbpfInstrumentations="java-ebpf-instrumentations",e.OpentelemetryEbpfInstrumentation="opentelemetry-ebpf-instrumentation",e.DotNetLegacy="dotnet-legacy",e.DotNetEnterprise="dotnet-enterprise",e.RubyEnterprise="ruby-enterprise",e.CPlusPlusEnterprise="cplusplus-enterprise",e.MySqlEnterprise="mysql-enterprise"}(qn||(qn={})),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"}(Qn||(Qn={})),function(e){e.CodeAttributes="CodeAttributes",e.HeadersCollection="HeadersCollection",e.PayloadCollection="PayloadCollection",e.CustomInstrumentation="CustomInstrumentation",e.UnknownType="UnknownType"}(Zn||(Zn={})),function(e){e.Column="column",e.FilePath="filePath",e.Function="function",e.LineNumber="lineNumber",e.Namespace="namespace",e.StackTrace="stacktrace"}(eo||(eo={})),function(e){e.HeaderKeys="headerKeys"}(to||(to={})),function(e){e.Java="java",e.Golang="golang"}(no||(no={}));class uo{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 po{packageName;functionName;receiverName;receiverMethodName;constructor(e,t,n,o){this.packageName=e,this.functionName=t||"",this.receiverName=n||"",this.receiverMethodName=o||""}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"}(oo||(oo={})),function(e){e.Healthy="Healthy",e.Updating="Updating",e.Degraded="Degraded",e.Failed="Failed",e.Down="Down",e.Unknown="Unknown"}(ro||(ro={})),function(e){e.Pending="Pending",e.Running="Running",e.Succeeded="Succeeded",e.Failed="Failed",e.Unknown="Unknown"}(io||(io={})),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"}(ao||(ao={})),function(e){e.Running="Running",e.Waiting="Waiting",e.Terminated="Terminated"}(so||(so={})),function(e){e.Logs="LOGS",e.Metrics="METRICS",e.Traces="TRACES",e.Profiles="PROFILES"}(lo||(lo={})),function(e){e.Logs="logs",e.Metrics="metrics",e.Traces="traces",e.Profiles="profiles"}(co||(co={}));const ho={[lo.Logs]:co.Logs,[lo.Metrics]:co.Metrics,[lo.Traces]:co.Traces,[lo.Profiles]:co.Profiles},go={[co.Logs]:lo.Logs,[co.Metrics]:lo.Metrics,[co.Traces]:lo.Traces,[co.Profiles]:lo.Profiles};var mo;!function(e){e.SampledSpansOnly="sampled_spans_only",e.AllSpans="all_spans"}(mo||(mo={}));const fo=(e,t)=>e===Mn.Success?fn.HEALTHY:e===Mn.Error?fn.NOT_HEALTHY:tn(t),yo=e=>{if(!e)return null;switch(e){case Qn.Irrelevant:return null;case Qn.Failure:case Qn.Error:return Mn.Error;case Qn.Notice:return Mn.Warning;case Qn.Pending:case Qn.Waiting:return Un.Loading;case Qn.Unsupported:case Qn.Disabled:return Un.Disabled;case Qn.Success:return Mn.Success;case Qn.Unknown:default:return Mn.Info}},bo=(e,t,n="reason",o)=>{const r=yo(e?.status);return r?{key:`desired-status-${e?.name}`,status:r,leftIcon:t||(r===Mn.Success?l:c),label:o||("reason"===n?tn(e?.reasonEnum):fo(r,e?.reasonEnum)),tooltip:e?.message,textSize:on.XXXS,invertColors:!0,useSecondaryTone:!0}:null},$o=e=>e.charAt(0).toUpperCase()+e.slice(1),vo=e=>{const t=e=>e.filter(e=>"object"==typeof e&&null!==e?""!==e.key&&""!==e.value:""!==e),n=e=>Object.fromEntries(Object.entries(e).filter(([e,t])=>""!==e&&""!==t).map(([e,o])=>Array.isArray(o)?[e,t(o)]:"object"==typeof o&&null!==o?[e,n(o)]:[e,o]));return Object.entries(e).reduce((e,[o,r])=>{try{const i=JSON.parse(r);Array.isArray(i)?e[o]=JSON.stringify(t(i)):e[o]="object"==typeof i&&null!==i?JSON.stringify(n(i)):r}catch(i){"object"==typeof r&&null!==r?Array.isArray(r)?e[o]=JSON.stringify(t(r)):e[o]=JSON.stringify(n(r)):e[o]=r}return e},{})};var xo;!function(e){e.SIGNALS="SIGNALS"}(xo||(xo={}));const So=(e,t,n)=>{if(!e||!e.length)return!0;if(1===e.length)return"true"==e[0];const[o,r,i]=e;if(o===xo.SIGNALS)switch(r){case"INCLUDES":return t?.includes(i);case"EXCLUDES":return!t?.includes(i);default:return!0}const a=n.find(e=>e.name===o||e.key===o);if(!a)return!1;const s=null==a.value?"":String(a.value);switch(r){case"===":case"==":return s===i;case"!==":case"!=":return s!==i;case">":return Number(s)>Number(i);case"<":return Number(s)<Number(i);case">=":return Number(s)>=Number(i);case"<=":return Number(s)<=Number(i);default:return!0}},wo=e=>JSON.parse(JSON.stringify(e)),Eo=(e,t)=>t.split(".").reduce((e,t)=>e?.[t],e),Co=(e,t,n)=>{const o=t.split(".");let r=e;for(let e=0;e<o.length-1;e++)o[e]in r&&"object"==typeof r[o[e]]||(r[o[e]]={}),r=r[o[e]];r[o[o.length-1]]=n},To=(e,t)=>{let n=[...e];return t.monitors?.length&&(n=n.filter(e=>!!t.monitors?.find(t=>e.signals?.find(e=>e.toLowerCase()===t.id)))),n},Ao=(e,t)=>{let n=[...e];return t.monitors?.length&&(n=n.filter(e=>!!t.monitors?.find(t=>e.exportedSignals[t.id]))),n},Io=(e,t)=>t?e.filter(e=>e.dataStreamNames.includes(t)||!e.dataStreamNames.length):[],ko=(e,t)=>{let n=e;if(t.namespaces?.length){const e=new Set(t.namespaces.map(({id:e})=>e));n=n.filter(({id:t})=>e.has(t.namespace))}if(t.kinds?.length){const e=new Set(t.kinds.map(({id:e})=>e));n=n.filter(({id:t})=>e.has(t.kind))}if(t.languages?.length){const e=new Set(t.languages.map(({id:e})=>e));n=n.filter(({runtimeInfo:t,containers:n})=>t?.detectedLanguages?.some(t=>e.has(t))||n?.some(t=>{const n=t.overrides?.runtimeInfo?.language??t.runtimeInfo?.language;return!!n&&e.has(n)}))}if(t.podsAgentInjectionStatus?.length){const e=new Set(t.podsAgentInjectionStatus.map(({id:e})=>e));n=n.filter(({podsAgentInjectionStatus:t})=>e.has(t?.reasonEnum??"")||e.has(t?.message??""))}return t.onlyErrors&&(n=n.filter(e=>yo(e.workloadOdigosHealthStatus?.status)===Mn.Error)),n},No=(e,t)=>t?e.filter(e=>e.dataStreamNames?.includes(t)||t===un&&!e.dataStreamNames?.length):[],Do=(e,t="",n={})=>{for(const o in e)if(e.hasOwnProperty(o)){const r=e[o],i=t?`${t}.${o}`:o;null===r||"object"!=typeof r||Array.isArray(r)?Array.isArray(r)?r.forEach((e,t)=>{const o=`${i}[${t}]`;null!==e&&"object"==typeof e?Do(e,o,n):n[o]=e}):n[i]=r:Do(r,i,n)}return n},Oo=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]}`},Ro=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`}},_o=()=>{const e=crypto.getRandomValues(new Uint8Array(16));let t=0;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,n=>{const o=e[t%16];t++;return("1"===n?o:"0"===n?63&o|128:15&o|64).toString(16)})},Lo=e=>({[bn.K8sAttributes]:m,[bn.AddClusterInfo]:g,[bn.DeleteAttributes]:h,[bn.PiiMasking]:p,[bn.RenameAttributes]:u,[bn.ExtractAttribute]:d,[bn.URLTemplatization]:d}[e]||f),Po=e=>{if(!e)return Fo([]);if(Array.isArray(e))return Fo(e);const t=Object.values(e).reduce((e,t)=>{if(null!=t){const n=yo(t.status);n&&e.push({status:n,type:t.name??"",reason:t.reasonEnum??null,message:t.message??null})}return e},[]);return Fo(t)},Fo=e=>{const t=e?.filter(({status:e})=>e===Mn.Error),n=e?.filter(({status:e})=>e===Mn.Warning),o=e?.filter(({status:e})=>e===Un.Disabled),r=e?.filter(({status:e})=>e===Un.Loading),i=t.length>0,a=n.length>0,s=o.length>0;return{errors:t,hasErrors:i,warnings:n,hasWarnings:a,disableds:o,hasDisableds:s,loadings:r,hasLoadings:r.length>0,priorotizedStatus:i?Mn.Error:a?Mn.Warning:s?Mn.Info:void 0}},Mo=e=>{const t=e?.reduce((e,t)=>t.agentEnabled?.agentEnabled?e+1:e,0);return`${t}/${e?.length||0} instrumented`},zo=e=>({[On.Java]:R,[On.Go]:O,[On.JavaScript]:D,[On.Python]:N,[On.DotNet]:k,[On.CSharp]:I,[On.CPlusPlus]:A,[On.Php]:T,[On.Ruby]:C,[On.Rust]:E,[On.Swift]:w,[On.Elixir]:S,[On.MySql]:x,[On.Nginx]:v,[On.Postgres]:$,[On.Redis]:b,[On.Kafka]:y,[On.Ignored]:f,[On.Unknown]:f,[On.Processing]:f,[On.NoContainers]:f,[On.NoRunningPods]:f}[e]||f),Uo=e=>e?e.overrides?.runtimeInfo?.language??e.runtimeInfo?.language??On.Unknown:On.Unknown,Bo=e=>e?e.overrides?.runtimeInfo?.runtimeVersion??e.runtimeInfo?.runtimeVersion??null:null,jo=e=>e?.map(e=>zo(Uo(e)))||[],Wo=e=>e?.map(e=>zo(e))||[],Ho=e=>e.runtimeInfo?.detectedLanguages?.length?Wo(e.runtimeInfo?.detectedLanguages):jo(e.containers),Go=(e,t)=>{const n={[Jn.Alauda]:Me,[Jn.AlibabaCloud]:Fe,[Jn.AppDynamics]:Pe,[Jn.Axiom]:Le,[Jn.AzureBlob]:_e,[Jn.AzureMonitor]:Re,[Jn.BetterStack]:Oe,[Jn.Bonree]:De,[Jn.Causely]:Ne,[Jn.Checkly]:ke,[Jn.Chronosphere]:Ie,[Jn.ClickHouse]:Ae,[Jn.CloudWatch]:Te,[Jn.Coralogix]:Ce,[Jn.Dash0]:Ee,[Jn.Datadog]:we,[Jn.Dynamic]:q,[Jn.Dynatrace]:Se,[Jn.ElasticApm]:xe,[Jn.ElasticSearch]:ve,[Jn.GoogleCloud]:$e,[Jn.GoogleCloudOTLP]:$e,[Jn.GrafanaCloudLoki]:be,[Jn.GrafanaCloudPrometheus]:be,[Jn.GrafanaCloudTempo]:be,[Jn.Greptime]:ye,[Jn.Groundcover]:fe,[Jn.Honeycomb]:me,[Jn.HyperDX]:ge,[Jn.Instana]:he,[Jn.Jaeger]:pe,[Jn.Kafka]:y,[Jn.Kloudmate]:ue,[Jn.Last9]:de,[Jn.Lightstep]:ce,[Jn.LogzIo]:le,[Jn.Loki]:se,[Jn.Lumigo]:ae,[Jn.Middleware]:ie,[Jn.NewRelic]:re,[Jn.Observe]:oe,[Jn.Odigos]:ne,[Jn.OneUptime]:te,[Jn.OpenObserve]:ee,[Jn.Opsverse]:Z,[Jn.Oracle]:Q,[Jn.OTLP]:q,[Jn.OTLPHttp]:q,[Jn.Prometheus]:Y,[Jn.Qryn]:J,[Jn.QrynOss]:V,[Jn.Quickwit]:K,[Jn.S3]:X,[Jn.Seq]:G,[Jn.Signalfx]:W,[Jn.Signoz]:H,[Jn.Splunk]:W,[Jn.SplunkSapm]:W,[Jn.SplunkOtlp]:W,[Jn.SumoLogic]:j,[Jn.TelemetryHub]:B,[Jn.Tempo]:U,[Jn.Tingyun]:z,[Jn.Traceloop]:M,[Jn.Uptrace]:F,[Jn.VictoriaMetrics]:P,[Jn.VictoriaMetricsCloud]:P,[Jn.XRay]:L,[Jn.Pyroscope]:_}[e];return n&&!t?{icon:n}:{iconSrc:`https://d15jtxgb40qetw.cloudfront.net/${e}.svg`}},Xo=e=>({[_n.Namespace]:We,[_n.Source]:je,[_n.Destination]:Be,[_n.Action]:d,[_n.InstrumentationRule]:Ue,[_n.SamplingRule]:ze}[e]),Ko=e=>"ruleId"in e&&e.ruleId?e.ruleId:"id"in e&&"string"==typeof e.id&&e.id||"id"in e&&"object"==typeof e.id&&e.id.namespace&&e.id.kind&&e.id.name?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,Vo=e=>e?"string"==typeof e?e:`${e.namespace}/${e.kind}/${e.name}`:"",Jo=e=>Vo(Ko(e)),Yo=(e,t,n)=>{const{extended:o,prioritizeDisplayName:r}=n||{};let i="",a="";switch(t){case _n.InstrumentationRule:const t=e;i=t.type,a=t.ruleName;break;case _n.Source:const n=e;i=n.id.name,a=n.serviceName||"";break;case _n.Action:const o=e;i=o.type,a=o.name||"";break;case _n.Destination:const r=e;i=r.destinationType.displayName,a=r.name;break;case _n.Namespace:const s=e;i=s.name,a=s.name}return o?i+(a&&a!==i?` (${a})`:""):r&&a||i},qo=(e,t)=>{if(t===_n.Source){const t={namespace:"",name:"",kind:""};return e.split("&").forEach(e=>{const[n,o]=e.split("=");t[n]=o}),t}return e},Qo=e=>({[Zn.CodeAttributes]:Ke,[Zn.CustomInstrumentation]:Xe,[Zn.HeadersCollection]:Ge,[Zn.PayloadCollection]:He,[Zn.UnknownType]:f}[e]||f),Zo=e=>e.overrides?.runtimeInfo?.language??e.runtimeInfo?.language??On.Unknown,er=e=>{const{numberOfInstances:t,containers:n}=e;if(!n)return t&&t>0?On.Processing:On.NoRunningPods;const o=n?.filter(e=>Zo(e)!==On.Ignored);if(!o.length)return On.NoContainers;const r=o.find(e=>Zo(e)!==On.Unknown);return r?Zo(r):On.Unknown},tr=(e,t,n)=>(t===_n.Source?e?.sources.find(e=>e.kind===n.kind&&e.name===n.name&&e.namespace===n.namespace):e?.destinations.find(e=>e.id===n))||{throughput:0},nr=e=>({[lo.Logs]:Ye,[lo.Metrics]:Je,[lo.Traces]:Ve,[lo.Profiles]:ne}[e]),or=e=>{if(!e)return ne;return{[kn.K8s]:m,[kn.Vm]:qe}[e]},rr=e=>{if(!e)return"Unknown";return{[kn.K8s]:"Kubernetes Cluster",[kn.Vm]:"Virtual Machine"}[e]},ir=(e,t,n)=>{const o=e[t];return o?o.flatMap(e=>{const o=e[n],r=[];return void 0!==o&&(Array.isArray(o)?r.push(...o):r.push(o)),r.push(...ir(e,t,n)),r}):[]},ar=(e,t)=>{if(t===_n.Source){let t="";return Object.entries(e).forEach(([e,n])=>{t+=`${e}=${n}&`}),t.slice(0,-1),t}return e},sr=(e,t,n)=>{switch(t){case Mn.Default:return e.v2.colors.purple[n];case Mn.Info:return e.v2.colors.blue[n];case Mn.Error:return e.v2.colors.red[n];case Mn.Warning:return e.v2.colors.yellow[n];case Mn.Success:return e.v2.colors.green[n];case Un.Loading:case Bn.Disabled:case Bn.Unknown:return e.v2.colors.silver[n];default:return e.v2.colors.white[500]}},lr=e=>{switch(e){case ro.Updating:case io.Pending:case ao.ContainerCreating:case so.Waiting:return Mn.Info;case ro.Healthy:case io.Succeeded:case io.Running:case ao.Running:case so.Running:return Mn.Success;case ro.Degraded:return Mn.Warning;case ro.Failed:case io.Failed:case ao.Error:case ao.CrashLoopBackOff:case ao.CreateContainerError:case ao.CreateContainerConfigError:case ao.ErrImagePull:case ao.ErrImageNeverPull:case ao.ImagePullBackOff:case ao.InvalidImageName:case ao.RegistryUnavailable:case ao.NetworkNotReady:case ao.OOMKilled:case ao.ContainerCannotRun:case so.Terminated:case ao.DeadlineExceeded:case ao.StartError:return Mn.Error;case ro.Down:case ao.Completed:return Bn.Disabled;case ro.Unknown:case io.Unknown:default:return Bn.Unknown}},cr=o.div`
|
|
42
42
|
border-radius: 100%;
|
|
43
43
|
background-color: ${({theme:e})=>e.v2.colors.silver[700]};
|
|
44
44
|
position: relative;
|
|
@@ -767,7 +767,7 @@ import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import o,{css as
|
|
|
767
767
|
&:hover {
|
|
768
768
|
border-bottom-color: ${({theme:e,$isSelected:t})=>t?e.v2.colors.white[500]:e.v2.colors.grey[500]};
|
|
769
769
|
}
|
|
770
|
-
`,Uu=({"data-id":o,size:r=_u.S,variant:a=Lu.Filled,options:s=[],selected:l,setSelected:c,disabled:d,fullWidth:u=!1})=>{const p=i(),h=a===Lu.Underline,g=h?zu:Fu;return e(h?Mu:Pu,{"data-id":o,$fullWidth:u,children:s.map(({value:o,label:i,icon:a,badge:s,tooltip:u,selectedBgColor:m,selectedBorderColor:f,disabled:y},b)=>{const $=l===o,v=y||d,x=v?p.v2.colors.grey[400]:h||$?p.v2.colors.white[500]:p.v2.colors.grey[300],S=r===_u.S?on.XXS:on.XS,w=$?500:400,E=t(n,{children:[a&&e(a,{fill:x}),i&&e(cn,{size:S,weight:w,color:x,nowrap:!0,children:i}),s&&e(Cu,{...s})]});return e(g,{onClick:()=>!v&&c(o),$disabled:v,$isSelected:$,$size:r,...!h&&{$selectedBgColor:m,$selectedBorderColor:f},children:u?e(ld,{text:u,withIcon:!0,children:E}):E},`segment-${
|
|
770
|
+
`,Uu=({"data-id":o,size:r=_u.S,variant:a=Lu.Filled,options:s=[],selected:l,setSelected:c,disabled:d,fullWidth:u=!1})=>{const p=i(),h=a===Lu.Underline,g=h?zu:Fu;return e(h?Mu:Pu,{"data-id":o,$fullWidth:u,children:s.map(({value:o,label:i,icon:a,badge:s,tooltip:u,selectedBgColor:m,selectedBorderColor:f,disabled:y},b)=>{const $=l===o,v=y||d,x=v?p.v2.colors.grey[400]:h||$?p.v2.colors.white[500]:p.v2.colors.grey[300],S=r===_u.S?on.XXS:on.XS,w=$?500:400,E=t(n,{children:[a&&e(a,{fill:x}),i&&e(cn,{size:S,weight:w,color:x,nowrap:!0,children:i}),s&&e(Cu,{...s})]});return e(g,{onClick:()=>!v&&c(o),$disabled:v,$isSelected:$,$size:r,...!h&&{$selectedBgColor:m,$selectedBorderColor:f},children:u?e(ld,{text:u,withIcon:!0,children:E}):E},`segment-${b}-${i}-${o}`)})})},Bu=o.div`
|
|
771
771
|
box-sizing: border-box !important;
|
|
772
772
|
width: ${({$width:e})=>e??"fit-content"};
|
|
773
773
|
padding: ${({$withSegment:e})=>e?"2px 2px 2px 12px":"6px 12px"};
|
|
@@ -911,7 +911,7 @@ import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import o,{css as
|
|
|
911
911
|
justify-content: space-between;
|
|
912
912
|
align-items: center;
|
|
913
913
|
gap: 8px;
|
|
914
|
-
`,cp=({label:n,icon:o,loading:r,disabled:i,onClick:a})=>{const[s,l]=Ft(!1);return t(ap,{$hovered:s,type:"button",disabled:i||r,onClick:a,onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:[e(sp,{$hovered:s,$hasIcon:!!o,children:o&&e(o,{size:36})}),t(lp,{$hasIcon:!!o,children:[r?e(Wd,{size:16}):e(cn,{variant:nn.Span,align:"center",children:n}),e(It,{rotate:90,size:24})]})]})},dp=({buttons:t})=>e(Dr,{$gap:12,children:t.map(t=>e(cp,{...t}
|
|
914
|
+
`,cp=({label:n,icon:o,loading:r,disabled:i,onClick:a})=>{const[s,l]=Ft(!1);return t(ap,{$hovered:s,type:"button",disabled:i||r,onClick:a,onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:[e(sp,{$hovered:s,$hasIcon:!!o,children:o&&e(o,{size:36})}),t(lp,{$hasIcon:!!o,children:[r?e(Wd,{size:16}):e(cn,{variant:nn.Span,align:"center",children:n}),e(It,{rotate:90,size:24})]})]})},dp=({buttons:t})=>e(Dr,{$gap:12,children:t.map((t,n)=>e(cp,{...t},`${t.label}-${n}`))});var up;!function(e){e.Button="button",e.ButtonDropData="button-drop-data"}(up||(up={}));const pp=({onAnyClick:t,actions:n})=>e(Nr,{$gap:8,$alignItems:"center",children:n?.map(n=>{if(!n)return null;switch(n.type){case up.Button:return e(Kd,{...n.buttonProps,onClick:e=>{n.buttonProps?.onClick?.(e),t?.()}},n.id);case up.ButtonDropData:return e(rp,{...n.dropDataProps,items:n.dropDataProps?.items??[],withMultiSelect:!1,selectedIds:[],setSelectedIds:e=>{n.buttonProps?.onClick?.(e[0]),t?.()},buttonProps:n.buttonProps},n.id);default:return null}})}),hp=({children:t,fullText:n,fullWidth:o=!0,...r})=>{const i=Bt(null),a=!!r.maxLines&&r.maxLines>0,s=Uc(i,{axis:a?"vertical":"horizontal",deps:[t]})?n??(null==t?"":String(t)):"";return e(ld,{text:s,fullWidth:o,ellipsis:!a,keepAlive:!0,children:e(cn,{ref:i,...r,children:t})})},gp=o.div`
|
|
915
915
|
display: flex;
|
|
916
916
|
align-items: center;
|
|
917
917
|
justify-content: center;
|
|
@@ -943,7 +943,7 @@ import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import o,{css as
|
|
|
943
943
|
flex-direction: column;
|
|
944
944
|
gap: 4px;
|
|
945
945
|
min-width: 0;
|
|
946
|
-
`,vp=({item:n,cellsPerRow:o})=>{const{CopyButton:r}=Dc(),{spacer:i,title:a,titleTooltip:s,label:l,labelTooltip:c,withCopy:d,badge:u}=n;return i?e("div",{style:{flex:1}}):t($p,{$cellsPerRow:o,children:[!!a&&e(ld,{text:s,children:e(hp,{size:on.XXXS,color:rn.Secondary,nowrap:!0,children:a})}),t(Nr,{$gap:4,children:[u&&e(Cu,{...u}),l&&e(ld,{text:c,children:e(hp,{size:on.XS,nowrap:!0,children:l})}),d&&e(r,{value:l||u?.label?.toString()||"",size:Ic.XS})]})]})},xp=({bgTint:n="900",width:o,fullHeight:r=!1,moreSpacing:i=!1,richTitle:a,withCollapse:s,collapseIsDefaultOpen:l,badges:c=[],actions:d=[],dropDataActions:u=[],renderOnRightSide:p,cellsPerRow:h,items:g,children:m})=>{const[f,y]=Ft(l||!1),b=()=>y(e=>!e),$=!s||s&&f,v=!!d.length,x=!!u.length,S=!!c.length;return t(fp,{$width:o,$bgTint:n,$fullHeight:r,$moreSpacing:i,children:[(a||s)&&t(yp,{$gap:16,$justifyContent:"space-between",$clickable:!!s,onClick:e=>{s&&e.target.closest("section")&&b()},children:[a?e(mp,{...a}):e("div",{}),t(Nr,{$gap:12,children:[p,v&&$&&e(pp,{actions:d}),S&&e(Nr,{$gap:8,children:c.map(e=>Wt(Cu,{...e,key:e.key
|
|
946
|
+
`,vp=({item:n,cellsPerRow:o})=>{const{CopyButton:r}=Dc(),{spacer:i,title:a,titleTooltip:s,label:l,labelTooltip:c,withCopy:d,badge:u}=n;return i?e("div",{style:{flex:1}}):t($p,{$cellsPerRow:o,children:[!!a&&e(ld,{text:s,children:e(hp,{size:on.XXXS,color:rn.Secondary,nowrap:!0,children:a})}),t(Nr,{$gap:4,children:[u&&e(Cu,{...u}),l&&e(ld,{text:c,children:e(hp,{size:on.XS,nowrap:!0,children:l})}),d&&e(r,{value:l||u?.label?.toString()||"",size:Ic.XS})]})]})},xp=({bgTint:n="900",width:o,fullHeight:r=!1,moreSpacing:i=!1,richTitle:a,withCollapse:s,collapseIsDefaultOpen:l,badges:c=[],actions:d=[],dropDataActions:u=[],renderOnRightSide:p,cellsPerRow:h,items:g,children:m})=>{const[f,y]=Ft(l||!1),b=()=>y(e=>!e),$=!s||s&&f,v=!!d.length,x=!!u.length,S=!!c.length;return t(fp,{$width:o,$bgTint:n,$fullHeight:r,$moreSpacing:i,children:[(a||s)&&t(yp,{$gap:16,$justifyContent:"space-between",$clickable:!!s,onClick:e=>{s&&e.target.closest("section")&&b()},children:[a?e(mp,{...a}):e("div",{}),t(Nr,{$gap:12,children:[p,v&&$&&e(pp,{actions:d}),S&&e(Nr,{$gap:8,children:c.map((e,t)=>Wt(Cu,{...e,key:e.key||`${e.label}-${t}`}))}),(x||s)&&t(Nr,{$gap:2,children:[x&&e(rp,{iconButtonProps:{"data-id":"drawer-actions",leftIcon:kt},items:u,selectedIds:[],setSelectedIds:e=>u?.find(t=>t?.id===e[0])?.onClick?.()}),s&&e(Kd,{variant:Hd.Text,size:Gd.S,leftIcon:f?Tt:At,onClick:b})]})]})]}),$&&g?e(bp,{children:g.map(t=>e(vp,{item:t,cellsPerRow:h&&h<=g.length?h:void 0},t.id))}):null,$&&m]})};var Sp;!function(e){e.S="small",e.M="medium"}(Sp||(Sp={}));const wp=o.div`
|
|
947
947
|
display: flex;
|
|
948
948
|
flex-direction: column;
|
|
949
949
|
gap: ${({$gap:e})=>e}px;
|
|
@@ -979,7 +979,7 @@ import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import o,{css as
|
|
|
979
979
|
padding: 12px;
|
|
980
980
|
border-radius: 12px;
|
|
981
981
|
background-color: ${({theme:e})=>e.v2.colors.silver[800]};
|
|
982
|
-
`,kp=["-","N/A","undefined","null","undefined/undefined","null/null"],Np=({title:n,cells:o})=>{const r=i();return t(Ip,{children:[e(cn,{size:on.XXS,color:r.v2.colors.grey[150],children:n}),e(Nr,{$gap:32,children:o.map(o=>t(Dr,{$gap:2,children:[!o.isLoading||o.value&&!kp.includes(o.value)?e(cn,{size:o.label?on.M:on.L,children:o.value}):e(Ud,{scale:.9}),o.label&&e(cn,{size:on.XXS,children:o.label})]},`${n}-${o.label}-${o.value}`))})]})};var Dp;!function(e){e.CurrentOfMax="currentOfMax",e.GoodAgainstBad="goodAgainstBad"}(Dp||(Dp={}));const Op=o.div`
|
|
982
|
+
`,kp=["-","N/A","undefined","null","undefined/undefined","null/null"],Np=({title:n,cells:o})=>{const r=i();return t(Ip,{children:[e(cn,{size:on.XXS,color:r.v2.colors.grey[150],children:n}),e(Nr,{$gap:32,children:o.map((o,r)=>t(Dr,{$gap:2,children:[!o.isLoading||o.value&&!kp.includes(o.value)?e(cn,{size:o.label?on.M:on.L,children:o.value}):e(Ud,{scale:.9}),o.label&&e(cn,{size:on.XXS,children:o.label})]},`${n}-${r}-${o.label}-${o.value}`))})]})};var Dp;!function(e){e.CurrentOfMax="currentOfMax",e.GoodAgainstBad="goodAgainstBad"}(Dp||(Dp={}));const Op=o.div`
|
|
983
983
|
display: flex;
|
|
984
984
|
align-items: flex-end;
|
|
985
985
|
justify-content: space-between;
|
|
@@ -1169,7 +1169,7 @@ import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import o,{css as
|
|
|
1169
1169
|
align-items: center;
|
|
1170
1170
|
gap: 16px;
|
|
1171
1171
|
flex-shrink: 0;
|
|
1172
|
-
`,yh=({icon:n,iconSrc:o,title:r,titleBadges:i,subTitle:a,toggleProps:s,actions:l,onClose:c,onCloseDisabled:d})=>t(ph,{children:[t(hh,{children:[n?e(gh,{children:e(n,{size:24})}):o?e(gh,{children:e(mh,{src:o,alt:r||"icon"})}):null,(r||i?.length||a)&&t(Dr,{$gap:6,children:[(r||i?.length)&&t(Nr,{$gap:16,children:[r&&e(cn,{size:on.S,weight:500,children:r}),i?.length&&e(Nr,{$gap:4,children:i?.map(t=>e(Cu,{...t}
|
|
1172
|
+
`,yh=({icon:n,iconSrc:o,title:r,titleBadges:i,subTitle:a,toggleProps:s,actions:l,onClose:c,onCloseDisabled:d})=>t(ph,{children:[t(hh,{children:[n?e(gh,{children:e(n,{size:24})}):o?e(gh,{children:e(mh,{src:o,alt:r||"icon"})}):null,(r||i?.length||a)&&t(Dr,{$gap:6,children:[(r||i?.length)&&t(Nr,{$gap:16,children:[r&&e(cn,{size:on.S,weight:500,children:r}),i?.length&&e(Nr,{$gap:4,children:i?.map((t,n)=>e(Cu,{...t},`${t.label}-${n}`))})]}),a&&e(cn,{size:on.XXS,children:a})]})]}),t(fh,{children:[s&&e(ch,{...s}),l?.length?e(rp,{iconButtonProps:{"data-id":"drawer-actions",leftIcon:kt},items:l,selectedIds:l?.filter(e=>e?.active)?.map(e=>e?.id)??[],setSelectedIds:e=>l?.find(t=>t?.id===e[0])?.onClick?.()}):null,c&&e(Nc,{"data-id":"drawer-close",icon:xt,size:Ic.M,onClick:c,disabled:d})]})]}),bh=o.div`
|
|
1173
1173
|
position: relative;
|
|
1174
1174
|
&.animated {
|
|
1175
1175
|
overflow: hidden;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{useMemo as e,useContext as t,createContext as r,useCallback as a,useState as n,useEffect as o}from"react";import{HttpLink as i,from as s,split as c,ApolloClient as d,InMemoryCache as u,ApolloProvider as l,useLazyQuery as E,useApolloClient as f,useQuery as T,gql as _}from"@apollo/client";import{jsx as S}from"react/jsx-runtime";import{onError as y}from"@apollo/client/link/error";import{setContext as R}from"@apollo/client/link/context";import{getMainDefinition as p}from"@apollo/client/utilities";import{o as m,y as O,D as A,S as I,X as N,Y as C,E as g,P as h,c as L,z as G,Z as P,_ as v,$ as U,a0 as D,a1 as w,a2 as F,a3 as M}from"./ui-components-D_eeOuIL.js";const k=e=>{if(!e)return!1;const t=e.toLowerCase();return t.includes("authentication required")||t.includes("authentication expired")||t.includes("http 401")},b=r(null),Y=()=>{const e=t(b);if(!e)throw new Error("[ui-kit] useOdigosApi() / useXxxApi() called outside of <OdigosApiProvider>. Make sure the host app mounts the provider at its layout level.");return e},H=({apolloConfig:t,operations:r,context:a,children:n})=>{const o=e(()=>(e=>{const t=new i({uri:e.httpUrl,credentials:e.credentials??"same-origin"}),r=y(({graphQLErrors:t,networkError:r})=>{t&&t.length>0&&t.some(e=>k(e.message))&&e.onAuthError?.(),r&&(401===r.statusCode||k(r.message))&&e.onAuthError?.()}),a=R(async(t,r)=>{const a={...r.headers};if(e.authHeader){const t=await e.authHeader();Object.assign(a,t)}return e.csrfHeader&&Object.assign(a,e.csrfHeader()),{headers:a}}),n=[];e.additionalLinks?.length&&n.push(...e.additionalLinks),n.push(a,r,t);let o=s(n);e.wsLink&&(o=c(({query:e})=>{const t=p(e);return"OperationDefinition"===t.kind&&"subscription"===t.operation},e.wsLink,o));const l=e.defaultFetchPolicies;return new d({link:o,cache:new u({addTypename:e.addTypename??!0,typePolicies:e.cacheTypePolicies}),defaultOptions:{watchQuery:{fetchPolicy:l?.watchQuery??"cache-and-network"},query:{fetchPolicy:l?.query??"cache-first"},mutate:{fetchPolicy:l?.mutate??"network-only"}}})})(t),[t.httpUrl,t.wsLink,t.addTypename,t.credentials]),E=e(()=>({operations:r,context:a,apolloConfig:t}),[r,a,t]);return S(l,{client:o,children:S(b.Provider,{value:E,children:n})})},W=b,x=(e,t)=>{if(e)return"string"==typeof e?e:N(e,t)},K=e=>{const{addNotification:t}=m(),r=(r,a,n,o,i)=>t({type:r,title:a,message:n,crdType:e,target:x(o,e),hideFromHistory:i});return{notify:r,notifyError:(e,t,a)=>r(I.Error,e,t,a),notifySuccess:(e,t,a)=>r(I.Success,e,t,a),notifyPending:(e,t)=>r(I.Default,"Pending",e,t,!0),notifyReadonly:()=>{t({type:I.Warning,title:A.READONLY,message:O.READONLY_WARNING,hideFromHistory:!0})}}},V=e=>{e({type:I.Warning,title:A.READONLY,message:O.READONLY_WARNING,hideFromHistory:!0})},$=e=>({error:e,results:[],allSucceeded:!1,anySucceeded:!1,successCount:0,failureCount:0}),B=(e,t)=>{if(e)return"function"==typeof e?e(t):e},j=e=>{if(!e)return"Unknown error";if(e instanceof Error)return e.cause instanceof Error?e.cause.message:e.message;if("object"==typeof e){const t=e;return t.cause?.message||t.message||String(e)}return String(e)},q=(e,t)=>e.client??t,Q=async(e,t,r,a,n)=>{if(!t)return{error:"Query operation not configured"};if(t.canRun&&!t.canRun(a))return{data:void 0};if(t.run)try{return await t.run(q(t,e),r,a)}catch(e){return{error:j(e)}}const o=B(t.document,a);if(!o)return{error:"Query operation not supported in this context"};const i=t.transformVariables?t.transformVariables(r,a):r,s=q(t,e);try{const e=await s.query({query:o,variables:i,fetchPolicy:n??"network-only"});return{data:t.transformResult?t.transformResult(e.data,a):e.data,error:e.error?j(e.error):void 0}}catch(e){return{error:j(e)}}},z=async(e,t,r,a)=>{if(!t)return{error:"Mutation operation not configured"};if(t.canRun&&!t.canRun(a))return{data:void 0};if(t.run)try{return await t.run(q(t,e),r,a)}catch(e){return{error:j(e)}}const n=B(t.document,a);if(!n)return{error:"Mutation operation not supported in this context"};const o=t.transformVariables?t.transformVariables(r,a):r,i=q(t,e);try{const e=await i.mutate({mutation:n,variables:o});return{data:t.transformResult?t.transformResult(e.data,a):e.data,error:void 0}}catch(e){return{error:j(e)}}},X=async(e,t,r,a,n)=>{if(!t)return $("Multi fetch operation not configured");if(!r.length)return $("No proxy ids supplied for multi fetch");const o=q(t,e);if(t.transformVariablesMulti&&(t.documentMulti||t.document)){const e=t.transformVariablesMulti(r,a,n),i=[];for(const r of e)try{const e=await o.query({query:r.document,variables:r.variables,fetchPolicy:"network-only"});t.transformMultiResult?t.transformMultiResult(e.data,n).forEach(e=>i.push(e)):r.proxyIDs.forEach(t=>{i.push({proxyID:t,success:!e.error,data:e.data,error:e.error?.message})})}catch(e){const t=j(e);r.proxyIDs.forEach(e=>i.push({proxyID:e,success:!1,error:t}))}const s=i.filter(e=>e.success).length,c=i.length-s,d=Array.from(new Set(i.filter(e=>!!e.error).map(e=>e.error)));return{results:i,allSucceeded:0===c,anySucceeded:s>0,successCount:s,failureCount:c,error:d.length?d.join(", "):void 0}}const i=await Promise.all(r.map(async r=>{const o={...n,proxyID:r},i=await Q(e,t,a,o);return{proxyID:r,success:!i.error,data:i.data,error:i.error}})),s=i.filter(e=>e.success).length,c=i.length-s,d=Array.from(new Set(i.filter(e=>!!e.error).map(e=>e.error)));return{results:i,allSucceeded:0===c,anySucceeded:s>0,successCount:s,failureCount:c,error:d.length?d.join(", "):void 0}},J=_`
|
|
2
|
+
query OdigosApiNoop {
|
|
3
|
+
__typename
|
|
4
|
+
}
|
|
5
|
+
`,Z=(e,t)=>{if(e)return"function"==typeof e?e(t):e},ee=(e,t)=>e[t],te=(e,t,r)=>{if(void 0===t)return;return e?.transformResult?e.transformResult(t,r):t},re=(e,t,r)=>{if(!e)return;const a=e.transformVariables;return a?a(t,r):t},ae=(t,r,n)=>{const{operations:o,context:i}=Y(),s=ee(o,t),c=e(()=>Z(s?.document,i),[s,i]),d=e(()=>re(s,r,i),[s,r,i]),u=!s||!c,l=!!s?.canRun&&!s.canRun(i),E=n?.skip||u||l,f=T(c??J,{variables:d,skip:E,pollInterval:n?.pollInterval,fetchPolicy:n?.fetchPolicy??"cache-and-network",notifyOnNetworkStatusChange:n?.notifyOnNetworkStatusChange,client:s?.client,onCompleted:n?.onCompleted?e=>{const t=te(s,e,i);void 0!==t&&n.onCompleted(t)}:void 0,onError:n?.onError}),_=e(()=>{if(!E)return te(s,f.data,i)},[s,i,f.data,E]),S=a(async()=>{if(u)return{data:void 0};const e=await f.refetch();return{data:te(s,e.data,i)}},[s,i,f,u]);return{data:_,loading:!E&&f.loading,error:f.error,refetch:S,unsupported:u}},ne=(t,r)=>{const{operations:n,context:o}=Y(),i=ee(n,t),s=e(()=>Z(i?.document,o),[i,o]),c=!i||!s,[d,u]=E(s??J,{fetchPolicy:r?.fetchPolicy??"network-only",notifyOnNetworkStatusChange:r?.notifyOnNetworkStatusChange,client:i?.client});return{execute:a(async e=>{if(c)return{error:void 0};if(i?.canRun&&!i.canRun(o))return{data:void 0};const t=re(i,e,o),r=await d({variables:t});return r.error?{error:r.error}:{data:te(i,r.data,o)}},[i,o,d,c]),data:e(()=>te(i,u.data,o),[i,o,u.data]),loading:u.loading,error:u.error,called:u.called,unsupported:c}},oe=(t,r)=>{const{operations:o,context:i}=Y(),s=f(),c=ee(o,t),d=e(()=>Z(c?.document,i),[c,i]),u=!c||!d,[l,E]=n({loading:!1,called:!1}),T=a(()=>E({loading:!1,called:!1}),[]);return[a(async e=>{if(u||!d)return{error:void 0};if(c?.canRun&&!c.canRun(i))return{data:void 0};const t=re(c,e,i),a=c?.client??s;E(e=>({...e,loading:!0,called:!0}));try{const e=await a.mutate({mutation:d,variables:t}),n=te(c,e.data,i);if(E({data:n,loading:!1,error:void 0,called:!0}),r?.refetchQueries){const e=a.refetchQueries({include:r.refetchQueries});r?.awaitRefetchQueries&&await e}return void 0!==n&&r?.onCompleted?.(n),{data:n}}catch(e){const t=e;return E({data:void 0,loading:!1,error:t,called:!0}),r?.onError?.(t),{error:t}}},[c,i,s,d,u,r]),{data:l.data,loading:l.loading,error:l.error,called:l.called,unsupported:u,reset:T}]},ie=[],se=(e,t,r,a)=>{let n=!0;const o={sources:[]};for(const[i,s]of Object.entries(e)){if(!s.length)continue;n=!1;const e=s.map(({id:e,selected:t,currentStreamName:a})=>({namespace:e.namespace,name:e.name,kind:e.kind,selected:void 0!==t&&t,currentStreamName:a||r}));let c=0,d=0;for(const r of e){const e=t.find(e=>e.id.namespace===i&&e.id.name===r.name&&e.id.kind===r.kind),a=e?.dataStreamNames||[];r.selected&&!e?c++:!r.selected&&e&&a.length<=1&&d++}a(c,d),o.sources.push(...e)}return{payload:o,isEmpty:n}},ce=(e,t)=>{let r=!0;const a={namespaces:[]};for(const[n,{selected:o,currentStreamName:i}]of Object.entries(e))"boolean"==typeof o&&(r=!1,a.namespaces.push({namespace:n,selected:o,currentStreamName:i||t}));return{payload:a,isEmpty:r}},de={filter:{markedForInstrumentation:!0}},ue=[],le=[],Ee=async e=>{const t=(e=>{try{return new URL("/diagnose/download",e).toString()}catch{return null}})(e.httpUrl);if(t)try{const[r,a]=await Promise.all([Promise.resolve(e.authHeader?.()??{}),Promise.resolve(e.csrfHeader?.()??{})]),n=await fetch(t,{credentials:e.credentials??"same-origin",headers:{...r,...a}});if(!n.ok)throw new Error(`Failed to download diagnose archive: ${n.status} ${n.statusText}`);((e,t)=>{if("undefined"==typeof document)return;const r=URL.createObjectURL(e),a=document.createElement("a");a.href=r,a.download=t,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(r)})(await n.blob(),`odigos-diagnose-${Date.now()}.tar.gz`)}catch(e){}},fe=[],Te=[],_e=[],Se=[],ye=(e,t)=>({...e,fields:e.fields.filter(({value:e})=>void 0!==e),currentStreamName:t}),Re=()=>{const{operations:t,context:r}=Y(),n=f(),i=((e,t)=>{const r=f(),{notifyError:n,notifySuccess:o,notifyPending:i,notifyReadonly:s}=K(g.Source),{selectedStreamName:c}=G(),{setProgress:d,resetProgress:u}=P(),{setConfiguredSources:l,setConfiguredFutureApps:E}=v(),T=(e,t)=>{const{progress:r}=P.getState();e>0&&d(U.Instrumenting,{total:(r[U.Instrumenting]?.total||0)+e,current:r[U.Instrumenting]?.current||0}),t>0&&d(U.Uninstrumenting,{total:(r[U.Uninstrumenting]?.total||0)+t,current:r[U.Uninstrumenting]?.current||0})},_=a(async()=>{const{error:a}=await Q(r,e.GET_WORKLOADS,de,t);a&&n(C.Read,a)},[r,e.GET_WORKLOADS,t,n]);return{useSources:()=>{const e=ae("GET_WORKLOADS",de,{fetchPolicy:"cache-first"});return{items:e.data?.workloads??ue,loading:e.loading,refetch:_}},fetchAll:_,fetchByTargets:async(a,o)=>{const i=!!o?.slim,s=a.map(e=>D(e,g.Source)).filter(e=>e.namespace&&e.name&&e.kind);if(0===s.length)return;if(s.length>50)return void await _();const c=i&&e.GET_WORKLOADS_BY_IDS_SLIM?e.GET_WORKLOADS_BY_IDS_SLIM:e.GET_WORKLOADS_BY_IDS,{error:d}=await Q(r,c,{ids:s.map(({namespace:e,kind:t,name:r})=>({namespace:e,kind:t,name:r}))},t);d?n(C.Read,d):await _()},fetchById:async a=>{const{data:o,error:i}=await Q(r,e.GET_WORKLOADS_BY_IDS,{ids:[{namespace:a.namespace,kind:a.kind,name:a.name}]},t);if(!i)return await _(),o?.workloadsByIds?.find(e=>e.id.namespace===a.namespace&&e.id.kind===a.kind&&e.id.name===a.name);n(C.Read,i)},fetchLibraries:async a=>Q(r,e.GET_SOURCE_LIBRARIES,a,t),fetchPeerSources:async a=>Q(r,e.GET_PEER_SOURCES,{serviceName:a},t),usePeerSources:(e,t)=>ae("GET_PEER_SOURCES",e,t),persist:async(a,o)=>{if(t.isReadonly)return s();const{data:d}=await Q(r,e.GET_WORKLOADS,de,t,"cache-first"),f=d?.workloads??ue,{payload:_,isEmpty:S}=se(a,f,c,T),{payload:y,isEmpty:R}=ce(o,c);let p=!1;S||(p=!0,i("Persisting sources...")),R||p||i("Persisting namespaces...");const{error:m}=await z(r,e.PERSIST_SOURCES,_,t);if(m&&(u(U.Instrumenting),u(U.Uninstrumenting),n(C.Update,m)),e.PERSIST_NAMESPACES){const{error:a}=await z(r,e.PERSIST_NAMESPACES,y,t);a&&n(C.Update,a)}l({}),E({})},persistV2:async a=>{if(t.isReadonly)return s(),{error:"readonly"};const n=[];for(const[,o]of Object.entries(a)){const a={sources:[]},i={namespaces:[]};for(const e of o)e.name&&e.kind?a.sources.push(e):i.namespaces.push(e);if(i.namespaces.length>0&&e.PERSIST_NAMESPACES){const{error:a}=await z(r,e.PERSIST_NAMESPACES,i,t);a&&n.push(a)}if(a.sources.length>0){const{error:o}=await z(r,e.PERSIST_SOURCES,a,t);o&&n.push(o)}}return n.length?{error:n.join(", ")}:void 0},update:async(a,d)=>{if(t.isReadonly)return s();i("Updating source...");const u={sourceId:a,patchSourceRequest:{...d,currentStreamName:c}},{data:l,error:E}=await z(r,e.UPDATE_SOURCE,u,t);E?n(C.Update,E,a):l?.updateK8sActualSource&&o(C.Update,`Successfully updated "${a.name}" source`,a)},restartWorkloads:async a=>{if(t.isReadonly)return s();i("Restarting sources...");const{data:c,error:d}=await z(r,e.RESTART_WORKLOADS,{sourceIds:a},t);d?n(C.Update,d):c?.restartWorkloads&&o(C.Update,`Successfully restarted ${a.length} sources`)},restartPod:async(a,c)=>{if(t.isReadonly)return s();i("Restarting pod...");const{data:d,error:u}=await z(r,e.RESTART_POD,{namespace:a,name:c},t);u?n(C.Update,u):d?.restartPod&&o(C.Update,`Successfully restarted pod ${a}/${c}`)},recoverFromRollback:async a=>{if(t.isReadonly)return s();i("Recovering from rollback...");const{data:c,error:d}=await z(r,e.RECOVER_FROM_ROLLBACK,{sourceId:a},t);d?n(C.Update,d,a):c?.recoverFromRollbackForWorkload&&o(C.Update,"Successfully triggered recovery from rollback")}}})(t,r),s=((e,t)=>{const r=f(),{notifyError:a,notifySuccess:n,notifyReadonly:o}=K(g.Destination),{selectedStreamName:i}=G(),s=async()=>{const{error:n}=await Q(r,e.GET_DESTINATIONS,void 0,t);n&&a(C.Read,n)};return{useDestinations:()=>{const e=ae("GET_DESTINATIONS",void 0,{fetchPolicy:"cache-first"});return{items:e.data?.computePlatform?.destinations??e.data?.destinations??Se,loading:e.loading,refetch:s}},useDestinationCategories:()=>{const e=ae("GET_DESTINATION_CATEGORIES",void 0);return{data:e.data,loading:e.loading}},usePotentialDestinations:()=>{const e=ae("GET_POTENTIAL_DESTINATIONS",void 0);return{data:e.data,loading:e.loading}},fetchAll:s,testConnection:async a=>{const{data:n}=await z(r,e.TEST_DESTINATION_CONNECTION,{destination:ye(a,i)},t);return n},create:async c=>{if(t.isReadonly)return o();const{error:d}=await z(r,e.CREATE_DESTINATION,{destination:ye(c,i)},t);d?a(C.Create,d):(n(C.Create,`Successfully created "${c.type}" destination`),await s())},update:async(c,d)=>{if(t.isReadonly)return o();const{data:u,error:l}=await z(r,e.UPDATE_DESTINATION,{id:c,destination:ye(d,i)},t);l?a(C.Update,l,c):u?.updateDestination&&(n(C.Update,`Successfully updated "${d.type}" destination`,c),await s())},remove:async c=>{if(t.isReadonly)return o();const{data:d}=await Q(r,e.GET_DESTINATIONS,void 0,t,"cache-first"),u=d?.computePlatform?.destinations??d?.destinations??Se,l=u.find(e=>w(e)===c)?.destinationType?.type,{error:E}=await z(r,e.DELETE_DESTINATION,{id:c,currentStreamName:i},t);E?a(C.Delete,E,c):(n(C.Delete,`Successfully deleted "${l??c}" destination`,c),await s())}}})(t,r),c=((e,t)=>{const r=f(),{notifyError:a,notifySuccess:n,notifyReadonly:o}=K(g.Action),i=async()=>{const{error:n}=await Q(r,e.GET_ACTIONS,void 0,t);n&&a(C.Read,n)};return{useActions:()=>{const e=ae("GET_ACTIONS",void 0,{fetchPolicy:"cache-first"});return{items:e.data?.computePlatform?.actions??e.data?.actions??le,loading:e.loading,refetch:i}},fetchAll:i,create:async s=>{if(t.isReadonly)return o();if(!e.CREATE_ACTION)return;const{error:c}=await z(r,e.CREATE_ACTION,{action:s},t);c?a(C.Create,c):(n(C.Create,`Successfully created "${s.type}" action`),await i())},update:async(s,c)=>{if(t.isReadonly)return o();if(!e.UPDATE_ACTION)return;const{error:d}=await z(r,e.UPDATE_ACTION,{id:s,action:c},t);d?a(C.Update,d,s):(n(C.Update,`Successfully updated "${c.type}" action`,s),await i())},remove:async(s,c)=>{if(t.isReadonly)return o();if(!e.DELETE_ACTION)return;const{error:d}=await z(r,e.DELETE_ACTION,{id:s,actionType:c},t);d?a(C.Delete,d,s):(n(C.Delete,`Successfully deleted "${c}" action`,s),await i())}}})(t,r),d=((t,r)=>{const a=f(),{notifyError:n,notifySuccess:o,notifyReadonly:i}=K(g.InstrumentationRule),s=async()=>{const{error:e}=await Q(a,t.GET_INSTRUMENTATION_RULES,void 0,r);e&&n(C.Read,e)};return{useRules:()=>{const t=ae("GET_INSTRUMENTATION_RULES",void 0,{fetchPolicy:"cache-first"});return{items:e(()=>(t.data?.computePlatform?.instrumentationRules??t.data?.instrumentationRules??[]).map(M),[t.data]),loading:t.loading,refetch:s}},fetchAll:s,create:async(e,c)=>{if(r.isReadonly)return i();if(!t.CREATE_INSTRUMENTATION_RULE)return;const{error:d}=await z(a,t.CREATE_INSTRUMENTATION_RULE,{instrumentationRule:F(e)},r);d?n(C.Create,d):(o(C.Create,`Successfully created${c?` "${c}"`:""} rule`),await s())},update:async(e,c,d)=>{if(r.isReadonly)return i();if(!t.UPDATE_INSTRUMENTATION_RULE)return;const{error:u}=await z(a,t.UPDATE_INSTRUMENTATION_RULE,{ruleId:e,instrumentationRule:F(c)},r);u?n(C.Update,u,e):(o(C.Update,`Successfully updated${d?` "${d}"`:""} rule`,e),await s())},remove:async(e,c)=>{if(r.isReadonly)return i();if(!t.DELETE_INSTRUMENTATION_RULE)return;const{error:d}=await z(a,t.DELETE_INSTRUMENTATION_RULE,{ruleId:e},r);d?n(C.Delete,d,e):(o(C.Delete,`Successfully deleted${c?` "${c}"`:""} rule`,e),await s())}}})(t,r),u=((e,t)=>{const r=f(),{addNotification:a}=m(),{setDataStreams:n}=G(),i=(e,t)=>a({type:I.Error,title:e,message:t}),s=async()=>{const{data:a,error:o}=await Q(r,e.GET_DATA_STREAMS,void 0,t);if(o)i(C.Read,o);else if(a){const e=a.computePlatform?.dataStreams??a.dataStreams??[];n(e)}},c=e.CREATE_DATA_STREAM?async n=>{if(t.isReadonly)return V(a);const{error:o}=await z(r,e.CREATE_DATA_STREAM,{stream:n},t);o?i(C.Create,o):await s()}:void 0;return{useDataStreams:()=>{const e=ae("GET_DATA_STREAMS",void 0,{fetchPolicy:"cache-first"}),t=e.data?.computePlatform?.dataStreams??e.data?.dataStreams??_e;return o(()=>{n(t)},[JSON.stringify(t.map(e=>e.name))]),{items:t,loading:e.loading,refetch:s}},fetchAll:s,create:c,update:async(n,o)=>{if(t.isReadonly)return V(a);const{error:c}=await z(r,e.UPDATE_DATA_STREAM,{id:n,dataStream:o},t);c?i(C.Update,c):await s()},remove:async n=>{if(t.isReadonly)return V(a);const{error:o}=await z(r,e.DELETE_DATA_STREAM,{id:n},t);o?i(C.Delete,o):await s()}}})(t,r),l=((e,t)=>{const r=f(),{notifyError:a,notifyReadonly:n}=K(g.Namespace),o=async()=>{const n=await Q(r,e.GET_NAMESPACES_WITH_WORKLOADS,void 0,t);return n.error&&a(C.Read,n.error),n};return{useNamespaces:()=>{const e=ae("GET_NAMESPACES_WITH_WORKLOADS",void 0,{fetchPolicy:"cache-first"});return{items:e.data?.namespaces??Te,loading:e.loading,refetch:o}},fetchAll:o,persist:async o=>{if(t.isReadonly)return n();const{error:i}=await z(r,e.PERSIST_NAMESPACES,o,t);return i&&a(C.Update,i),i?{error:i}:void 0}}})(t,r),E=((e,t)=>{const r=f(),{notifyError:a}=K(g.Source);return{fetch:async n=>{const o=await Q(r,e.GET_K8S_MANIFEST,n,t);return o.error&&a(C.Read,o.error),o}}})(t,r),T=((e,t)=>{const r=f(),{notifyError:a,notifySuccess:n,notifyReadonly:o}=K(g.Source);return{useEffectiveConfig:(e,t)=>ae("GET_EFFECTIVE_CONFIG",e,t),useConfigYamls:e=>ae("GET_CONFIG_YAMLS",void 0,e),getEffectiveConfig:async a=>e.GET_EFFECTIVE_CONFIG?Q(r,e.GET_EFFECTIVE_CONFIG,{id:a},t):{error:"GET_EFFECTIVE_CONFIG not configured"},applyConfigurations:e.UPDATE_REMOTE_CONFIG?async(n,i)=>{if(t.isReadonly)return o();const{error:s}=await z(r,e.UPDATE_REMOTE_CONFIG,{formData:n,connectionIds:i},t);return s&&a(C.Update,s),s?{error:s}:void 0}:void 0,getConfigYamls:e.GET_CONFIG_YAMLS?async()=>Q(r,e.GET_CONFIG_YAMLS,void 0,t):void 0,updateLocalUiConfig:e.UPDATE_LOCAL_UI_CONFIG?async i=>{if(t.isReadonly)return o();const{error:s}=await z(r,e.UPDATE_LOCAL_UI_CONFIG,{config:i},t);return s?a(C.Update,s):n(C.Update,"Local UI configuration updated successfully"),s?{error:s}:void 0}:void 0,resetLocalUiConfigToDefaults:e.RESET_LOCAL_UI_CONFIG_TO_FACTORY_DEFAULTS?async()=>{if(t.isReadonly)return o();const{error:i}=await z(r,e.RESET_LOCAL_UI_CONFIG_TO_FACTORY_DEFAULTS,void 0,t);return i?a(C.Update,i):n(C.Update,"Local UI configuration reset to factory defaults"),i?{error:i}:void 0}:void 0}})(t,r),_=((e,t)=>{const r=f(),{apolloConfig:a}=Y();return{fetchDescribeOdigos:e.GET_DESCRIBE_ODIGOS?async()=>Q(r,e.GET_DESCRIBE_ODIGOS,void 0,t):void 0,fetchDescribeSource:e.GET_DESCRIBE_SOURCE?async a=>Q(r,e.GET_DESCRIBE_SOURCE,a,t):void 0,downloadDiagnose:e.GET_DIAGNOSE?async(n,o)=>{const i=await Q(r,e.GET_DIAGNOSE,{input:n,dryRun:o?.dryRun??!1},t),s=i?.data?.stats?.fileCount??0;return!i.error&&s>0&&!o?.dryRun&&await Ee(a),i}:void 0}})(t,r),S=((e,t)=>{const r=f(),{notifyError:a,notifyReadonly:n}=K(g.Source),o=async()=>{e.GET_TOKENS&&await Q(r,e.GET_TOKENS,void 0,t)};return{useTokens:()=>{const e=ae("GET_TOKENS",void 0,{fetchPolicy:"cache-first"});return{items:e.data??ie,loading:e.loading,refetch:o}},updateToken:e.UPDATE_TOKEN?async o=>{if(t.isReadonly)return n();const{error:i}=await z(r,e.UPDATE_TOKEN,{token:o},t);return i&&a(C.Update,i),i?{error:i}:void 0}:void 0}})(t,r),y=((e,t)=>{const r=f();return{useMetrics:e=>ae("GET_METRICS",void 0,e),fetch:async()=>Q(r,e.GET_METRICS,void 0,t)}})(t,r),R=((e,t)=>{const r=f();return{useServiceMap:e=>ae("GET_SERVICE_MAP",void 0,e),fetch:e.GET_SERVICE_MAP?async()=>Q(r,e.GET_SERVICE_MAP,void 0,t):void 0}})(t,r),p=((e,t)=>{const r=f();return{useSlots:e=>ae("GET_PROFILING_SLOTS",void 0,e),useSourceProfiling:(e,t)=>ae("GET_SOURCE_PROFILING",e,t),fetchSlots:e.GET_PROFILING_SLOTS?async()=>Q(r,e.GET_PROFILING_SLOTS,void 0,t):void 0,fetchSourceProfiling:e.GET_SOURCE_PROFILING?async a=>Q(r,e.GET_SOURCE_PROFILING,a,t):void 0,enableProfiling:e.ENABLE_SOURCE_PROFILING?async a=>z(r,e.ENABLE_SOURCE_PROFILING,a,t):void 0}})(t,r),O=((e,t)=>{const r=f();return{useGatewayInfo:e=>ae("GET_GATEWAY_INFO",void 0,e),useGatewayPods:e=>ae("GET_GATEWAY_PODS",void 0,e),useNodeCollectorInfo:e=>ae("GET_NODE_COLLECTOR_INFO",void 0,e),useNodeCollectorPods:e=>ae("GET_NODE_COLLECTOR_PODS",void 0,e),usePodInfo:(e,t)=>ae("GET_COLLECTOR_POD_INFO",e,t),getGatewayInfo:e.GET_GATEWAY_INFO?async()=>Q(r,e.GET_GATEWAY_INFO,void 0,t):void 0,getGatewayPods:e.GET_GATEWAY_PODS?async()=>Q(r,e.GET_GATEWAY_PODS,void 0,t):void 0,getNodeCollectorInfo:e.GET_NODE_COLLECTOR_INFO?async()=>Q(r,e.GET_NODE_COLLECTOR_INFO,void 0,t):void 0,getNodeCollectorPods:e.GET_NODE_COLLECTOR_PODS?async()=>Q(r,e.GET_NODE_COLLECTOR_PODS,void 0,t):void 0,getExtendedPodInfo:e.GET_COLLECTOR_POD_INFO?async(a,n)=>Q(r,e.GET_COLLECTOR_POD_INFO,{namespace:a,name:n},t):void 0}})(t,r),A=((e,t)=>{const r=f(),{notifyError:a,notifySuccess:n,notifyReadonly:o}=K(g.SamplingRule),i=async()=>{e.GET_SAMPLING_RULES&&await Q(r,e.GET_SAMPLING_RULES,void 0,t)},s=(e,s)=>e?async c=>{if(t.isReadonly)return o();const{error:d}=await z(r,e,c,t);return d?a(s,d):(n(C.Create,"Successfully created sampling rule"),await i()),d?{error:d}:void 0}:void 0,c=(e,s)=>e?async(c,d)=>{if(t.isReadonly)return o();const{error:u}=await z(r,e,{samplingId:d.samplingId,ruleId:c,rule:d.rule},t);return u?a(s,u):(n(C.Update,"Successfully updated sampling rule"),await i()),u?{error:u}:void 0}:void 0,d=e=>e?async(s,c)=>{if(t.isReadonly)return o();const{error:d}=await z(r,e,{samplingId:c,ruleId:s},t);return d?a(C.Delete,d):(n(C.Delete,"Successfully deleted sampling rule"),await i()),d?{error:d}:void 0}:void 0;return{useSamplingRules:()=>{const e=ae("GET_SAMPLING_RULES",void 0,{fetchPolicy:"cache-first"});return{items:e.data?.computePlatform?.samplingRules??e.data?.samplingRules??fe,k8sHealthProbesConfig:e.data?.computePlatform?.k8sHealthProbesConfig??e.data?.k8sHealthProbesConfig??null,loading:e.loading,refetch:i}},fetchAll:e.GET_SAMPLING_RULES?async()=>Q(r,e.GET_SAMPLING_RULES,void 0,t):void 0,createNoisy:s(e.CREATE_NOISY_OPERATION_RULE,C.Create),updateNoisy:c(e.UPDATE_NOISY_OPERATION_RULE,C.Update),deleteNoisy:d(e.DELETE_NOISY_OPERATION_RULE),createHighlyRelevant:s(e.CREATE_HIGHLY_RELEVANT_OPERATION_RULE,C.Create),updateHighlyRelevant:c(e.UPDATE_HIGHLY_RELEVANT_OPERATION_RULE,C.Update),deleteHighlyRelevant:d(e.DELETE_HIGHLY_RELEVANT_OPERATION_RULE),createCostReduction:s(e.CREATE_COST_REDUCTION_RULE,C.Create),updateCostReduction:c(e.UPDATE_COST_REDUCTION_RULE,C.Update),deleteCostReduction:d(e.DELETE_COST_REDUCTION_RULE),updateK8sHealthProbesConfig:e.UPDATE_LOCAL_UI_SAMPLING_CONFIG?async n=>{if(t.isReadonly)return o();const{error:s}=await z(r,e.UPDATE_LOCAL_UI_SAMPLING_CONFIG,{config:n},t);return s?a(C.Update,s):await i(),s?{error:s}:void 0}:void 0}})(t,r),N=((e,t)=>{const r=f();return{useSnapshots:()=>{const e=ae("GET_ALL_CLUSTER_SNAPSHOTS",void 0,{fetchPolicy:"cache-first"});return{data:e.data,loading:e.loading,unsupported:e.unsupported}},getAllClusterSnapshots:e.GET_ALL_CLUSTER_SNAPSHOTS?async()=>Q(r,e.GET_ALL_CLUSTER_SNAPSHOTS,void 0,t):void 0,getClusterSnapshot:e.GET_CLUSTER_SNAPSHOT?async a=>Q(r,e.GET_CLUSTER_SNAPSHOT,{clusterId:a},t):void 0}})(t,r);return{sourcesApi:i,destinationsApi:s,actionsApi:c,instrumentationRulesApi:d,dataStreamsApi:u,namespacesApi:l,k8sManifestApi:E,configApi:T,describeApi:_,tokensApi:S,metricsApi:y,serviceMapApi:R,profilingApi:p,collectorsApi:O,samplingApi:A,snapshotsApi:N,capabilities:e(()=>((e,t)=>{const r=t.platformType===h.Vm,a=t.tier===L.Onprem,n=!r;return{canBulkPersistSources:n&&!!e.PERSIST_SOURCES,canFetchSnapshots:n&&!!e.GET_ALL_CLUSTER_SNAPSHOTS,canRecoverFromRollback:n&&!!e.RECOVER_FROM_ROLLBACK,canRestartWorkloads:n&&!!e.RESTART_WORKLOADS,canFetchPeerSources:!!e.GET_PEER_SOURCES,canFetchSourceLibraries:!!e.GET_SOURCE_LIBRARIES,canFetchK8sManifest:n&&!!e.GET_K8S_MANIFEST,canCreateDestination:n&&!!e.CREATE_DESTINATION,canTestConnection:n&&!!e.TEST_DESTINATION_CONNECTION,canFetchDestinationCategories:!!e.GET_DESTINATION_CATEGORIES,canFetchPotentialDestinations:n&&!!e.GET_POTENTIAL_DESTINATIONS,canCreateAction:n&&!!e.CREATE_ACTION,canCreateInstrumentationRule:n&&!!e.CREATE_INSTRUMENTATION_RULE,canApplyEffectiveConfig:n&&!!e.UPDATE_REMOTE_CONFIG&&!!e.GET_EFFECTIVE_CONFIG,canFetchEffectiveConfig:!!e.GET_EFFECTIVE_CONFIG,canFetchConfigYamls:!!e.GET_CONFIG_YAMLS,canFetchProfiling:n&&!!e.GET_PROFILING_SLOTS,canFetchCollectorInfo:n&&!!e.GET_GATEWAY_INFO,canManageSamplingRules:!!e.GET_SAMPLING_RULES,isEnterprise:a,isVm:r}})(t,r),[t,r]),resetCache:a(async()=>{await n.cache.reset()},[n])}};export{H as O,W as _,se as a,oe as b,ae as c,Re as d,Y as e,X as f,ce as p,z as r,ne as u};
|
package/lib/components/v2.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{eH as Autocomplete,ax as Badge,ae as Button,af as ButtonSize,gl as ButtonTab,gm as ButtonTabList,ag as ButtonVariants,a5 as Checkbox,gn as CheckboxList,di as CheckboxSize,bh as CliCommand,bb as Condition,a$ as Conditions,go as DEFAULT_TIME_UNITS,a_ as DataCard,l as Drawer,bV as DropData,bX as DropDataAlignX,bW as DropDataAlignY,aN as DropDown,a6 as FieldMessage,a4 as FieldTitle,dz as GaugeChart,gp as GaugeChartVariant,gq as Header,gr as HoverActions,aO as IconButton,aP as IconButtonSize,bn as IconGroup,an as Input,ab as InputList,a7 as InputTable,db as Island,aQ as Loader,b_ as Modal,gs as Navbar,N as NoData,q as Note,ak as Radio,gt as RadioGroup,am as RadioSize,bj as Search,aJ as SectionCard,gu as SectionCardSize,ah as Segment,ap as SegmentSize,bx as SegmentVariant,dy as StatusCard,dc as Stepper,bz as Table,bA as TableVariant,b5 as Tag,bg as TagVariants,ar as TextArea,dA as TextCard,dT as TimeInput,a9 as Toggle,aa as ToggleLabelAlign,gv as ToggleList,aU as ToggleSize,gw as ToggleVariant,ao as TruncatableTypography,f as Typography,ad as TypographyColor,h as TypographySize,aV as TypographyVariants,aA as WarningModal,gx as resolveTypographyColor}from"../chunks/ui-components-
|
|
1
|
+
export{eH as Autocomplete,ax as Badge,ae as Button,af as ButtonSize,gl as ButtonTab,gm as ButtonTabList,ag as ButtonVariants,a5 as Checkbox,gn as CheckboxList,di as CheckboxSize,bh as CliCommand,bb as Condition,a$ as Conditions,go as DEFAULT_TIME_UNITS,a_ as DataCard,l as Drawer,bV as DropData,bX as DropDataAlignX,bW as DropDataAlignY,aN as DropDown,a6 as FieldMessage,a4 as FieldTitle,dz as GaugeChart,gp as GaugeChartVariant,gq as Header,gr as HoverActions,aO as IconButton,aP as IconButtonSize,bn as IconGroup,an as Input,ab as InputList,a7 as InputTable,db as Island,aQ as Loader,b_ as Modal,gs as Navbar,N as NoData,q as Note,ak as Radio,gt as RadioGroup,am as RadioSize,bj as Search,aJ as SectionCard,gu as SectionCardSize,ah as Segment,ap as SegmentSize,bx as SegmentVariant,dy as StatusCard,dc as Stepper,bz as Table,bA as TableVariant,b5 as Tag,bg as TagVariants,ar as TextArea,dA as TextCard,dT as TimeInput,a9 as Toggle,aa as ToggleLabelAlign,gv as ToggleList,aU as ToggleSize,gw as ToggleVariant,ao as TruncatableTypography,f as Typography,ad as TypographyColor,h as TypographySize,aV as TypographyVariants,aA as WarningModal,gx as resolveTypographyColor}from"../chunks/ui-components-D_eeOuIL.js";import"react/jsx-runtime";import"styled-components";import"../icons.js";import"zustand";import"react";import"javascript-time-ago";import"javascript-time-ago/locale/en";import"prism-react-renderer";import"../chunks/vendor-BFqT13Me.js";import"zustand/middleware";import"react-error-boundary";import"react-dom";import"virtua";
|
package/lib/components.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{aM as CenterThis,eN as Code,m as Divider,g3 as ErrorBoundary,g4 as FadeLoader,F as FlexColumn,n as FlexRow,g5 as IconButton,I as IconGroup,g6 as IconWrapped,g7 as ImageControlled,g8 as LoadingText,g9 as ModalBody,ga as NotificationNote,gb as Overlay,aZ as Padding,da as PageContent,e as Popup,gc as ScrollX,bk as ScrollY,bo as SkeletonLoader,gd as TableContainer,ge as TableTitleWrap,gf as TableWrap,T as Text,gg as ToggleCodeComponent,av as Tooltip,dB as UpgradeRequiredWrapper,gh as VerticalScroll,gi as getLinksFromText,gj as getStrongsFromText,gk as renderText}from"./chunks/ui-components-
|
|
1
|
+
export{aM as CenterThis,eN as Code,m as Divider,g3 as ErrorBoundary,g4 as FadeLoader,F as FlexColumn,n as FlexRow,g5 as IconButton,I as IconGroup,g6 as IconWrapped,g7 as ImageControlled,g8 as LoadingText,g9 as ModalBody,ga as NotificationNote,gb as Overlay,aZ as Padding,da as PageContent,e as Popup,gc as ScrollX,bk as ScrollY,bo as SkeletonLoader,gd as TableContainer,ge as TableTitleWrap,gf as TableWrap,T as Text,gg as ToggleCodeComponent,av as Tooltip,dB as UpgradeRequiredWrapper,gh as VerticalScroll,gi as getLinksFromText,gj as getStrongsFromText,gk as renderText}from"./chunks/ui-components-D_eeOuIL.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"javascript-time-ago/locale/en";import"prism-react-renderer";import"./chunks/vendor-BFqT13Me.js";import"zustand/middleware";import"react-error-boundary";import"react-dom";import"virtua";
|
|
@@ -217,6 +217,7 @@ export declare const DISPLAY_TITLES: {
|
|
|
217
217
|
GOLANG_CUSTOM_PROBES: string;
|
|
218
218
|
ROLLOUT: string;
|
|
219
219
|
ROLLOUT_RESTART: string;
|
|
220
|
+
ROLLOUT_RESTART_WORKLOADS_DESCRIPTION: string;
|
|
220
221
|
ROLLOUT_NOT_REQUIRED: string;
|
|
221
222
|
ROLLOUT_NOT_REQUIRED_MESSAGE: string;
|
|
222
223
|
ROLLOUT_FAILED: string;
|
|
@@ -249,7 +250,6 @@ export declare const DISPLAY_TITLES: {
|
|
|
249
250
|
ADD_DESTINATION_DRAWER_DESCRIPTION: string;
|
|
250
251
|
THROUGHPUT_LAST_10_SECONDS: string;
|
|
251
252
|
DELETE_POD_TO_RESTART: string;
|
|
252
|
-
RESTART_POD_DESCRIPTION: string;
|
|
253
253
|
DEBUG: string;
|
|
254
254
|
SAMPLING: string;
|
|
255
255
|
HEAD_SAMPLING: string;
|
|
@@ -275,6 +275,7 @@ export declare const BUTTON_TEXTS: {
|
|
|
275
275
|
DONE: string;
|
|
276
276
|
SAVE: string;
|
|
277
277
|
BACK: string;
|
|
278
|
+
CONFIRM: string;
|
|
278
279
|
NEXT: string;
|
|
279
280
|
TEST: string;
|
|
280
281
|
TEST_CONNECTION: string;
|