@odigos/ui-kit 0.0.271 → 0.0.272
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 +7 -0
- package/lib/chunks/{helpers-pQ9OGZgF.js → helpers-BjINTDe1.js} +1 -1
- package/lib/chunks/{index-BD_WHo50.js → index-D2_SqNhv.js} +6 -6
- package/lib/chunks/{source-instrument-form-context-DB1VZT-P.js → source-instrument-form-context-DqNzAFUO.js} +1 -1
- package/lib/chunks/{ui-components-BzgG1abD.js → ui-components-Cz2E0SIN.js} +1 -1
- package/lib/components/autocomplete/index.d.ts +1 -0
- package/lib/components.js +1 -1
- package/lib/constants.js +1 -1
- package/lib/containers.js +3 -3
- package/lib/contexts.js +1 -1
- package/lib/functions.js +1 -1
- package/lib/hooks.js +1 -1
- package/lib/snippets/sampling-rule-form-sections/source-scope.d.ts +1 -0
- package/lib/snippets/wide-drawer/index.d.ts +2 -0
- package/lib/snippets.js +1 -1
- package/lib/store.js +1 -1
- package/lib/theme.js +1 -1
- package/lib/types/common/index.d.ts +1 -0
- package/lib/types.js +1 -1
- package/lib/visuals.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.272](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.271...ui-kit-v0.0.272) (2026-07-27)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* block CRUD on Instrumentation Rules for OSS installations ([#1120](https://github.com/odigos-io/ui-kit/issues/1120)) ([f0a1627](https://github.com/odigos-io/ui-kit/commit/f0a16277b623b4d07fe10ef79e867e19d1dff9d9))
|
|
9
|
+
|
|
3
10
|
## [0.0.271](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.270...ui-kit-v0.0.271) (2026-07-27)
|
|
4
11
|
|
|
5
12
|
### Features
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import{Fragment as n,useMemo as o,useContext as a,createContext as s}from"react";import{T as i,t as u,b as l,P as c}from"./ui-components-
|
|
1
|
+
import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import{Fragment as n,useMemo as o,useContext as a,createContext as s}from"react";import{T as i,t as u,b as l,P as c}from"./ui-components-Cz2E0SIN.js";import p from"styled-components";var d;(e=>{e.Default="default",e.Action="action",e.Endpoint="endpoint",e.Scope="scope",e.Duration="duration"})(d||(d={}));const f=[d.Action,d.Endpoint,d.Scope,d.Duration],h=p.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{jsx as e,jsxs as a,Fragment as t}from"react/jsx-runtime";import{D as l,c as r,F as n,d as i,e as o,f as s,g as c,h as d,B as u,i as p,j as h,k as g,W as m,l as v,m as b,V as f,n as y,o as x,p as k,q as C,r as S,C as T,s as $,u as w,I as M,v as A,w as O,x as L,y as P,z as E,N as I,E as R,S as
|
|
1
|
+
import{jsx as e,jsxs as a,Fragment as t}from"react/jsx-runtime";import{D as l,c as r,F as n,d as i,e as o,f as s,g as c,h as d,B as u,i as p,j as h,k as g,W as m,l as v,m as b,V as f,n as y,o as x,p as k,q as C,r as S,C as T,s as $,u as w,I as M,v as A,w as O,x as L,y as P,z as E,N as I,E as R,S as N,G as V,H as z,U as D,J as X,K as H,L as _,M as q,O as B,Q as j,X as K,Y as U,Z as G,_ as F,$ as W,a0 as J,a1 as Y,a2 as Z,a3 as Q,a4 as ee,T as ae,a5 as te,a6 as le,a7 as re,a8 as ne,a9 as ie,aa as oe,ab as se,ac as ce,ad as de,ae as ue,af as pe,ag as he,b as ge,ah as me,ai as ve,aj as be,ak as fe,al as ye,am as xe,an as ke,ao as Ce,ap as Se,aq as Te,ar as $e,as as we,at as Me,au as Ae,av as Oe,aw as Le,ax as Pe,ay as Ee,az as Ie,aA as Re,aB as Ne,aC as Ve,aD as ze,aE as De,aF as Xe,aG as He,aH as _e,aI as qe,aJ as Be,aK as je,aL as Ke,aM as Ue,aN as Ge,aO as Fe,aP as We,aQ as Je,aR as Ye,aS as Ze,aT as Qe,aU as ea,aV as aa,aW as ta,aX as la,aY as ra,aZ as na,a_ as ia,a$ as oa,b0 as sa,b1 as ca,R as da,b2 as ua,b3 as pa,A as ha,b4 as ga,b5 as ma}from"./ui-components-Cz2E0SIN.js";import{VIcon as va,TrashIcon as ba,PlusIcon as fa,EditIcon as ya,OdigosLogoTextCentral as xa,OdigosLogoTextEnterprise as ka,OdigosLogoTextCommunity as Ca,OdigosLogoTextColoredCentral as Sa,OdigosLogoTextColoredEnterprise as Ta,OdigosLogoTextColoredCommunity as $a,ArrowLeftIcon as wa,ArrowRightIcon as Ma,VSquareIcon as Aa,CopyIcon as Oa,YamlIcon as La}from"../icons.js";import Pa,{useMemo as Ea,useRef as Ia,useCallback as Ra,useState as Na,useEffect as Va,Fragment as za,forwardRef as Da,useImperativeHandle as Xa}from"react";import Ha,{css as _a,useTheme as qa}from"styled-components";import{i as Ba,m as ja,u as Ka,n as Ua,a as Ga,C as Fa,b as Wa,d as Ja,e as Ya,f as Za,g as Qa,h as et,j as at,k as tt}from"./helpers-BjINTDe1.js";const lt=/^[a-zA-Z]$/,rt=new Set(["*","+","?"]),nt=new Set(["^","$"]),it={group:"rgba(102, 242, 102, 0.5)","anchor-quantifier":"rgba(102, 191, 255, 0.5)","class-bracket":"rgba(255, 153, 153, 0.5)","class-content":"rgba(178, 1, 1, 0.5)",alternation:"rgba(255, 153, 153, 0.5)",literal:"transparent"},ot=Ha.div`
|
|
2
2
|
padding: 8px 16px;
|
|
3
3
|
border-radius: 6px;
|
|
4
4
|
border: 1px solid ${({theme:e})=>e.v2.colors.silver[500]};
|
|
@@ -100,7 +100,7 @@ import{jsx as e,jsxs as a,Fragment as t}from"react/jsx-runtime";import{D as l,c
|
|
|
100
100
|
word-break: break-all;
|
|
101
101
|
white-space: pre-wrap;
|
|
102
102
|
user-select: text;
|
|
103
|
-
`,xt=({isOpen:t,regex:m,onClose:v,initialTestString:b=""})=>{const[f,y]=
|
|
103
|
+
`,xt=({isOpen:t,regex:m,onClose:v,initialTestString:b=""})=>{const[f,y]=Na(b),x=Ea(()=>((e,a)=>{if(!e)return{ok:!0,isMatch:!1,message:r.RESULT_EMPTY_REGEX};if(!a)return{ok:!0,isMatch:!1,message:r.RESULT_EMPTY_INPUT};let t;try{t=new RegExp(e)}catch(e){return{ok:!1,message:e instanceof Error?e.message:r.RESULT_INVALID_REGEX_FALLBACK}}const l=t.exec(a);return l?{ok:!0,isMatch:!0,message:l.length>1?l[1]:l[0]}:{ok:!0,isMatch:!1,message:r.RESULT_NO_MATCH}})(m,f),[m,f]),k=x.ok?x.isMatch?"match":"neutral":"error";return e(l,{isOpen:t,header:{title:r.TITLE,onClose:()=>{y(""),v()}},children:e(bt,{children:a(ft,{children:[a(n,{$gap:6,children:[e(i,{label:r.REGEX_LABEL}),e(ct,{pattern:m,"data-id":"regex-tester-regex"}),!m&&e(o,{size:c.XXS,color:s.Secondary,children:r.REGEX_EMPTY_HINT})]}),a(n,{$gap:6,children:[a(d,{$width:"100%",$justifyContent:"space-between",$alignItems:"center",children:[e(i,{label:r.TEST_STRING_LABEL}),e(u,{"data-id":"regex-tester-unescape",label:r.UNESCAPE_LABEL,tooltip:r.UNESCAPE_TOOLTIP,variant:h.Secondary,size:p.S,onClick:()=>y(e=>(e=>{let a="";for(let t=0;t<e.length;t++){if("\\"===e[t]&&t+1<e.length){const l=e[t+1],r="n"===l?"\n":"t"===l?"\t":"r"===l?"\r":'"'===l?'"':"'"===l?"'":"\\"===l?"\\":null;if(null!=r){a+=r,t++;continue}}a+=e[t]}return a})(e)),disabled:(C=f,!/\\["'\\nrt]/.test(C))})]}),e(vt,{name:"regex-tester-test-string","data-id":"regex-tester-test-string",placeholder:r.TEST_STRING_PLACEHOLDER,regex:m,value:f,onChange:y,minHeight:240}),e(g,{helpMessage:r.TEST_STRING_HELP})]}),a(n,{$gap:8,children:[e(i,{label:r.RESULT_LABEL}),e(yt,{$tone:k,"data-id":"regex-tester-result",children:x.message}),x.ok&&x.isMatch&&e(o,{size:c.XXS,color:s.Secondary,children:r.RESULT_CAPTURE_HINT})]})]})})});var C},kt=({isOpen:a,onClose:t,onDeny:l,onApprove:r})=>e(m,{title:"Discard changes?",description:"You have unsaved changes.\nIf you cancel now, your changes won't be saved.",isOpen:a,onClose:t,denyButton:{label:"Keep editing",variant:h.Secondary,onClick:()=>{l?.(),t()}},approveButton:{label:"Discard changes",variant:h.Primary,onClick:()=>{r?.(),t()}}}),Ct=({isOpen:a,onClose:t,onViewConnector:l})=>e(m,{isOpen:a,onClose:t,visual:()=>e(f,{scale:1.2,icon:va}),title:b.CLOUD_CONNECTOR_CREATED_MODAL_TITLE,description:b.CLOUD_CONNECTOR_CREATED_MODAL_DESC,denyButton:{label:v.STAY_ON_CONNECTIONS,variant:h.Secondary,onClick:t},approveButton:{label:v.GO_TO_CONNECTOR_OVERVIEW,variant:h.Primary,onClick:l??t}}),St=({isOpen:a,onClose:t,onDeny:l,onApprove:r,action:n="delete",target:i,description:o,overrideApproveButtonLabel:s,overrideDenyButtonLabel:c})=>{const d=n.charAt(0).toUpperCase()+n.substring(1),u=i?.endsWith("s")?"these":"this";return e(m,{title:`${d}${i?` ${i}`:""}?`,description:o??`Are you sure you want to ${n}${i?` ${u} ${i}`:""}?`,isOpen:a,onClose:t,denyButton:{label:c??"Go back",variant:h.Secondary,onClick:()=>{l?.(),t()}},approveButton:{label:s??d,variant:h.Primary,onClick:()=>{r?.(),t()}}})},Tt=({componentType:a,inputType:t,name:l,label:r,tooltip:n,badge:i,placeholder:o,required:s,disabled:c,value:d,setValue:u,errorMessage:p,warnMessage:h,helpMessage:g,dropdownOptions:m,dropdownNoSearch:v,dropdownNoCheckbox:b,timeUnits:f,timeDefaultUnit:E,toggleSize:I=C.L,keyLabel:R,valueLabel:N})=>{switch(a){case y.Input:return e(L,{name:l,type:t,label:r,tooltip:n,badge:i,placeholder:o,required:s,disabled:c,value:d??"",onChange:e=>{const a=e.target.value;u(t===P.Number?""===a?null:Number(a):a)},errorMessage:p,warnMessage:h,helpMessage:g},l);case y.MultiInput:return e(O,{name:l,label:r,tooltip:n,badge:i,placeholder:o,required:s,disabled:c,values:Array.isArray(d)?d:A(d,[]),setValues:e=>u(e),errorMessage:p,warnMessage:h,helpMessage:g,plain:!0},l);case y.KeyValuePair:return e(M,{name:l,label:r,tooltip:n,badge:i,required:s,disabled:c,limitFieldsPerRow:2,columns:[{keyName:"key",label:R||"Key",placeholder:R||"Key"},{keyName:"value",label:N||"Value",placeholder:N||"Value"}],values:Array.isArray(d)?d:A(d,[]),setValues:e=>u(e),errorMessage:p,warnMessage:h,helpMessage:g},l);case y.TextArea:return e(w,{name:l,label:r,tooltip:n,badge:i,required:s,disabled:c,placeholder:o,value:d??"",onChange:e=>u(e.target.value),errorMessage:p,warnMessage:h,helpMessage:g},l);case y.Dropdown:return e($,{name:l,label:r,tooltip:n,badge:i,placeholder:o,required:s,disabled:c,withSearch:!v,options:m?.map(e=>({id:e.id||"",label:e.label||"",withCheckbox:!b}))||[],values:d?[String(d)]:[],setValues:e=>u(e[0]),errorMessage:p,warnMessage:h,helpMessage:g},l);case y.Checkbox:return e(T,{name:l,label:r,tooltip:n,badge:i,value:!0===d||"true"===d,onChange:e=>u(e),disabled:c,errorMessage:p,warnMessage:h,helpMessage:g},l);case y.Time:return e(S,{name:l,label:r,tooltip:n,badge:i,placeholder:o,required:s,disabled:c,value:d??"",setValue:e=>u(e),units:f,defaultUnit:E,errorMessage:p,warnMessage:h,helpMessage:g},l);case y.Toggle:return e(x,{name:l,size:I,labelAlign:k.Right,label:r,tooltip:n,badge:i,value:!0===d||"true"===d,onChange:e=>u(e),disabled:c,errorMessage:p,warnMessage:h,helpMessage:g},l);default:return null}},$t=Ha.div`
|
|
104
104
|
display: flex;
|
|
105
105
|
flex-wrap: wrap;
|
|
106
106
|
gap: 8px;
|
|
@@ -148,7 +148,7 @@ import{jsx as e,jsxs as a,Fragment as t}from"react/jsx-runtime";import{D as l,c
|
|
|
148
148
|
border-radius: 999px;
|
|
149
149
|
background-color: ${({theme:e})=>e.v2.colors.silver[700]};
|
|
150
150
|
border: 1px solid ${({theme:e})=>e.v2.colors.silver[600]};
|
|
151
|
-
`,Et={[q.JavaScript]:"Node.js",[q.DotNet]:".NET",[q.Php]:"PHP",[q.Java]:"Java",[q.Go]:"Go",[q.Python]:"Python",[q.Ruby]:"Ruby",[q.Rust]:"Rust"},It=[q.Python,q.Java,q.JavaScript,q.DotNet,q.Php,q.Ruby,q.Go],Rt=[{value:"all",label:"Entire Cluster"},{value:"source",label:"Specific Source"},{value:"namespace",label:"Specific Namespace"},{value:"language",label:"Specific Programming Language"}];function Vt(e){return Et[e]||e.charAt(0).toUpperCase()+e.slice(1)}function Nt(e){return null!=e?`${e}. ${Z}`:Z}const zt=({readOnly:a,...t})=>e(a?Ht:qt,{...t}),Dt=({title:t,count:l,children:r})=>a(n,{$gap:6,children:[a(d,{$gap:8,$alignItems:"center",children:[e(o,{size:c.XS,color:s.Primary,nowrap:!0,children:t}),l>1&&e(o,{size:c.XXS,color:s.Secondary,nowrap:!0,children:`(${J})`})]}),e(Ot,{children:r})]}),Xt=()=>{const a=qa();return e(Lt,{children:e(Pt,{children:e(o,{size:c.XXS,color:a.v2.colors.white[500],nowrap:!0,children:Y})})})},Ht=({scopes:t,titleNumber:l})=>{const r=Nt(l);if(Ba(t))return e(E,{bgTint:"900",richTitle:{title:r},withCollapse:!0,collapseIsDefaultOpen:!0,children:e(I,{status:V.Default,message:R,fullWidth:!0})});const n=t.sources??[],i=t.namespaces??[],o=t.languages??[],s=[];return n.length&&s.push({kind:"sources",node:e(Dt,{title:N,count:n.length,children:n.map((a,t)=>{const l=[a.namespace,a.kind,a.name].filter(Boolean),r=l.length?l.join(" / "):D;return e(z,{label:r},`src-${t}-${r}`)})})}),i.length&&s.push({kind:"namespaces",node:e(Dt,{title:X,count:i.length,children:i.map((a,t)=>e(z,{label:a},`ns-${t}-${a}`))})}),o.length&&s.push({kind:"languages",node:e(Dt,{title:H,count:o.length,children:o.map((a,t)=>{const l=B(a);return e(z,{label:Vt(a),leftIcon:l},`lang-${t}-${a}`)})})}),e(E,{bgTint:"900",richTitle:{title:r,subTitle:s.length>1?_:void 0},withCollapse:!0,collapseIsDefaultOpen:!0,children:e(E,{bgTint:"800",children:e(At,{children:s.map((t,l)=>a(Pa.Fragment,{children:[l>0&&e(Xt,{}),t.node]},t.kind))})})})},_t=e=>e.sources.length>0?"source":e.namespaces.length>0?"namespace":e.languages.length>0?"language":"all",qt=({scopes:t,onChange:l,sourceOptions:r=[],namespaceOptions:i=[],supportedLanguages:d,titleNumber:u,dataIdPrefix:p="source-scope",slim:h})=>{const g=t??ja(),[m,v]=Va(()=>_t(g)),{sources:b,namespaces:f,languages:y}=g,x=b.length>0||f.length>0||y.length>0;Na(()=>{x&&"all"===m&&v(_t(g))},[x,m]);const k=Ea(()=>Rt.map(e=>"language"===e.value&&0===d?.length?null:{...e,disabled:"all"===e.value&&x}).filter(Boolean),[x]),C=Ea(()=>b.map(e=>`${e.namespace}/${e.kind}/${e.name}`),[b]),S=Ea(()=>[...f],[f]),$=Ea(()=>new Set(y),[y]),w=Ra(e=>{v(e)},[]),M=Ra(e=>{const a=e.map(e=>(e=>{const a=e.split("/");return 3!==a.length?null:{namespace:a[0],kind:a[1],name:a[2]}})(e)).filter(e=>null!=e).map(e=>({namespace:e.namespace,kind:e.kind,name:e.name}));l({...g,sources:a})},[g,l]),A=Ra(e=>{l({...g,namespaces:e})},[g,l]),O=Ra(e=>{const a=g.languages,t=a.includes(e)?a.filter(a=>a!==e):[...a,e];l({...g,languages:t})},[g,l]),L=!x&&"all"===m,P=(d||It).map(e=>({id:e,label:Et[e]??e.charAt(0).toUpperCase()+e.slice(1),Icon:B(e)}));return a(j,{richTitle:h?{title:Nt(u),titleSize:c.XS,titleColor:s.Secondary,tooltip:K}:{title:Nt(u),subTitle:K,subTitleWrap:!0},backgroundColor:h?"transparent":void 0,padding:h?0:void 0,children:[e(I,L?{status:V.Default,message:R,fullWidth:!0,smallIcon:!0}:{status:V.Info,message:_,fullWidth:!0,smallIcon:!0}),e(n,{$alignItems:"flex-start",children:e(U,{options:k,selected:m,setSelected:w})}),"source"===m&&e(G,{multiple:!0,"data-id":`${p}-autocomplete-source`,options:r,value:C,onSelect:M,placeholder:F}),"namespace"===m&&e(G,{multiple:!0,"data-id":`${p}-autocomplete-namespace`,options:i,value:S,onSelect:A,placeholder:"Search namespace"}),"language"===m&&P.length>0&&e($t,{children:P.map(({id:t,label:l,Icon:r})=>{const n=$.has(t);return a(wt,{$selected:n,onClick:()=>O(t),children:[e(T,{name:`${p}-lang-${t}`,size:W.S,value:n,onChange:()=>O(t)}),e(Mt,{children:e(r,{size:20})}),e(o,{size:c.XS,nowrap:!0,children:l})]},t)})})]})},Bt=e=>{if(null!=e){if(!Array.isArray(e)&&"object"==typeof e)return Object.entries(e).map(([e,a])=>({id:e,label:null==a?e:String(a)}));if(Array.isArray(e))return e.map(e=>"string"==typeof e?{id:e,label:e}:e)}},jt=e=>{if(!Array.isArray(e)||e.length<3)return;const[a,t,l]=e;return e=>{const r=null==e?.[a]?"":String(e[a]);switch(t){case"=":case"==":case"===":return r===l;case"!=":case"!==":return r!==l;default:return!0}}},Kt=e=>{if(Array.isArray(e))return e.map(e=>{const a=e;return{keyName:String(a.keyName??a.name??""),label:a.label??a.displayName,tooltip:a.tooltip,placeholder:a.placeholder,helpMessage:a.helpMessage,componentType:a.componentType,options:Bt(a.options??a.values),fullRow:a.fullRow,defaultValue:a.defaultValue,withRegexTester:a.withRegexTester,separator:a.separator,copyByColumn:a.copyByColumn,renderCondition:jt(a.renderCondition)}})},Ut=e=>{if(Array.isArray(e))return e.map(e=>{if("string"==typeof e)return{id:e,label:e};const a=e;return{id:String(a.id??a.keyName??a.name??""),label:a.label??a.displayName??String(a.id??""),tooltip:a.tooltip,fields:Array.isArray(a.fields)?a.fields.map(Gt):void 0}})},Gt=e=>{const a="string"==typeof e.componentProperties?A(e.componentProperties,{}):e.componentProps||{};return{name:e.name,componentType:e.componentType,inputType:e.inputType??a.inputType??a.type,title:e.displayName,tooltip:a.tooltip,placeholder:a.placeholder,helpMessage:a.helpMessage,required:a.required,initialValue:e.initialValue,renderCondition:e.renderCondition,options:Bt(a.options??a.values),itemWrapperKey:a.itemWrapperKey,columns:Kt(a.columns),limitFieldsPerRow:a.limitFieldsPerRow,variant:a.variant,wrapKey:a.wrapKey,checkboxOptions:Ut(a.options??a.values),checkedValue:a.checkedValue??"true",valueMode:a.valueMode??"object",fields:Array.isArray(a.fields)?a.fields.map(Gt):void 0,addLabel:a.addLabel,itemLabel:a.itemLabel,keyLabel:a.titleKey??a.keyLabel,valueLabel:a.titleValue??a.valueLabel,persistAs:a.persistAs}},Ft=e=>{const a=e.initialValue;if(void 0!==a&&""!==a)return e.componentType===y.CheckboxList?"array"===e.valueMode?A(a,[]):A(a,{}):e.componentType!==y.MultiInput&&e.componentType!==y.MultiTabledInput||!e.wrapKey?e.componentType===y.MultiInput||e.componentType===y.MultiTabledInput?A(a,[]):e.componentType===y.SourceScopes?"null"===a||"{}"===a?ja():Ua(A(a,null)):e.componentType===y.Toggle||e.componentType===y.Checkbox?"true"===a:a:{[e.wrapKey]:A(a,[])}},Wt=e=>"object"==typeof e&&null!==e&&!Array.isArray(e),Jt=e=>Array.isArray(e)?e:[],Yt=e=>{const a={};return e.forEach(e=>{a[String(e.key??"")]=String(e.value??"")}),a},Zt=e=>Wt(e)?Object.entries(e).map(([e,a])=>({key:e,value:String(a??"")})):[],Qt=({field:a,value:t,setValue:l,errorMessage:r,disabled:n})=>{const[i,o]=Va(()=>Zt(t));return Na(()=>{const e=Wt(t)?t:{};((e,a)=>{const t=Object.keys(e),l=Object.keys(a);return t.length===l.length&&t.every(t=>Object.prototype.hasOwnProperty.call(a,t)&&a[t]===e[t])})(Yt(i),e)||o(Zt(t))},[t]),e(M,{name:a.name,label:a.title,tooltip:a.tooltip,helpMessage:a.helpMessage,required:a.required,disabled:n,limitFieldsPerRow:2,columns:[{keyName:"key",label:a.keyLabel||"Key",placeholder:a.keyLabel||"Key"},{keyName:"value",label:a.valueLabel||"Value",placeholder:a.valueLabel||"Value"}],values:i,setValues:e=>{o(e),l(Yt(e))},errorMessage:r})},el=({field:l,value:r,setValue:d,errorMessage:u,disabled:p,keyValuePersistAs:h,sourceOptions:m,namespaceOptions:v})=>{const{name:b,componentType:f,inputType:x,title:k,tooltip:C,placeholder:S,helpMessage:$,required:w,initialValue:A,options:L,itemWrapperKey:P,columns:E,limitFieldsPerRow:I,variant:R,wrapKey:V,checkboxOptions:N}=l,[z,D]=Va({open:!1,value:""});if(f===y.SourceScopes)return e(zt,{scopes:Ua(r),onChange:e=>d(e),sourceOptions:m,namespaceOptions:v,dataIdPrefix:`dynamic-field-${b}`,slim:!0});if(f===y.CheckboxList&&"array"===l.valueMode){const t=Jt(r),l=(e,a)=>d(a?[...t.filter(a=>a!==e),e]:t.filter(a=>a!==e));return a(n,{$gap:12,children:[k&&e(i,{label:k,tooltip:C,required:w}),e(n,{$gap:8,children:(N||[]).map(a=>{const r=e(T,{name:a.id,label:a.label,value:t.includes(a.id),disabled:p,onChange:e=>l(a.id,e)},a.id);return a.tooltip?e(ae,{text:a.tooltip,withIcon:!0,children:r},a.id):r})}),e(g,{errorMessage:u,helpMessage:$})]})}if(f===y.CheckboxList){const t=Wt(r)?r:{},i=(e=>"emptyObject"!==e.checkedValue||{})(l),m=e=>"emptyObject"===l.checkedValue?Wt(e):!!e;return a(n,{$gap:12,children:[k&&e(o,{size:c.XS,color:s.Secondary,nowrap:!0,children:k}),e(n,{$gap:12,children:(N||[]).map(l=>{const r=t[l.id],o=m(r),s=Wt(r)?r:{},c=e(T,{label:l.label,value:o,disabled:p,onChange:e=>d({...t,[l.id]:e?Wt(r)?r:i:null})}),u=l.tooltip?e(ae,{text:l.tooltip,withIcon:!0,children:c}):c,g=o&&l.fields?.length?e(n,{$gap:12,$padding:"0 0 0 24px",children:l.fields.map(a=>e(el,{field:a,value:s[a.name],setValue:e=>d({...t,[l.id]:{...s,[a.name]:e}}),disabled:p,keyValuePersistAs:h},`${b}-${l.id}-${a.name}`))}):null;return a(n,{$gap:12,children:[u,g]},l.id)})}),e(g,{errorMessage:u,helpMessage:$})]})}if(f===y.MultiTabledInput){const l=Jt(V?r?.[V]:r),n=e=>d(V?{...Wt(r)?r:{},[V]:e}:e),i=(E||[]).some(e=>e.withRegexTester);return a(t,{children:[e("cards"===R?te:M,{name:b,label:k,tooltip:C,helpMessage:$,required:w,disabled:p,columns:E||[],limitFieldsPerRow:I,values:l,setValues:n,errorMessage:u,onTestRegex:i?e=>D({open:!0,value:e}):void 0}),i&&e(xt,{isOpen:z.open,regex:z.value,onClose:()=>D({open:!1,value:""})})]})}if(f===y.MultiInput&&V){const a=Jt(r?.[V]);return e(O,{name:b,label:k,tooltip:C,helpMessage:$,required:w,disabled:p,placeholder:S,values:a,setValues:e=>d({...Wt(r)?r:{},[V]:e}),errorMessage:u})}if(f===y.MultiInput&&P){const a=Jt(r).map(e=>String(e?.[P]??""));return e(O,{name:b,label:k,tooltip:C,helpMessage:$,required:w,disabled:p,placeholder:S,values:a,setValues:e=>d(e.map(e=>({[P]:e}))),errorMessage:u})}return f===y.KeyValuePair?"map"===(l.persistAs??h)?e(Qt,{field:l,value:r,setValue:d,errorMessage:u,disabled:p}):e(Tt,{componentType:f,name:b,label:k,tooltip:C,helpMessage:$,disabled:p,required:w,errorMessage:u,keyLabel:l.keyLabel,valueLabel:l.valueLabel,value:r??[],setValue:d}):e(Tt,{componentType:f,inputType:x,name:b,label:k,tooltip:C,helpMessage:$,disabled:p,required:w,placeholder:S,errorMessage:u,dropdownOptions:L,value:(null==r?A:r)??"",setValue:d})},al=({field:l,value:r,setValue:o,disabled:s,keyValuePersistAs:c,sourceOptions:g,namespaceOptions:m})=>{const v=qa(),b=Jt(r),f=b.length?b:[{}],y=l.fields||[],x=e=>o(e);return a(t,{children:[f.map((t,r)=>a(za,{children:[e(ee,{}),a(n,{$gap:12,children:[a(d,{$justifyContent:"space-between",$alignItems:"center",children:[e(i,{label:`${l.itemLabel||l.title||"Item"} ${r+1}`}),e(u,{leftIcon:()=>e(ba,{fill:v.v2.colors.red[500]}),variant:h.Secondary,size:p.S,onClick:()=>(e=>{const a=f.filter((a,t)=>t!==e);x(a)})(r),disabled:s||1===f.length})]}),y.map(a=>e(el,{field:a,value:t[a.name],setValue:e=>((e,a,t)=>x(f.map((l,r)=>r===e?{...l,[a]:t}:l)))(r,a.name,e),disabled:s,keyValuePersistAs:c,sourceOptions:g,namespaceOptions:m},`${l.name}-group-${r}-${a.name}`))]})]},`${l.name}-group-${r}`)),e(u,{variant:h.Secondary,label:l.addLabel||"Add",leftIcon:fa,onClick:()=>x([...f,{}]),disabled:s}),e(ee,{})]})},tl=({field:t,value:l,setValue:r,errorMessage:o,disabled:s})=>a(n,{$gap:12,children:[t.title&&e(i,{label:t.title,tooltip:t.tooltip,required:t.required}),e(n,{$gap:8,children:(t.checkboxOptions||[]).map(a=>{const t=e(T,{name:a.id,label:a.label,value:!0===l?.[a.id],disabled:s,onChange:e=>r(a.id,e)},a.id);return a.tooltip?e(ae,{text:a.tooltip,withIcon:!0,children:t},a.id):t})}),e(g,{errorMessage:o,helpMessage:t.helpMessage})]}),ll=({signals:a,fields:l,value:r,setValue:n,formErrors:i,disabled:o,seedInitialValues:s,keyValuePersistAs:c="map",sourceOptions:d,namespaceOptions:u})=>{const{isVm:p}=Ka(),h=(l||[]).filter(e=>!!e).map(e=>Gt(e));return Na(()=>{if(!s)return;const e=r||{},a={};h.forEach(t=>{if(t.componentType===y.SourceScopes&&p)return;const l=t.componentType===y.SourceScopes?Ft(t)??ja():Ft(t);if(void 0===l)return;if(t.componentType===y.CheckboxList&&"flatFields"===t.valueMode&&Wt(l))return void Object.entries(l).forEach(([t,l])=>{void 0!==e[t]&&null!==e[t]||(a[t]=l)});const r=e[t.name];if(t.componentType===y.SourceScopes){if(void 0!==r)return}else if(null!=r)return;a[t.name]=Wt(l)&&Wt(a[t.name])?{...a[t.name],...l}:l}),Object.entries(a).forEach(([e,a])=>n(e,a))},[]),e(t,{children:h.map(t=>{const l=Object.entries(r||{}).map(([e,a])=>({name:e,key:e,value:a}));if(t.renderCondition&&!Q(t.renderCondition,a,l))return null;if(t.componentType===y.SourceScopes&&p)return null;const s=r?.[t.name];if(t.componentType===y.FieldGroup)return e(al,{field:t,value:s,setValue:e=>n(t.name,e),disabled:o,keyValuePersistAs:c,sourceOptions:d,namespaceOptions:u},t.name);if(t.componentType===y.CheckboxList&&"flatFields"===t.valueMode){const a=t.checkboxOptions?.map(e=>i[e.id]).find(Boolean);return e(tl,{field:t,value:r||{},setValue:n,errorMessage:a,disabled:o},t.name)}return e(el,{field:t,value:s,setValue:e=>n(t.name,e),errorMessage:i[t.name],disabled:o,keyValuePersistAs:c,sourceOptions:d,namespaceOptions:u},t.name)})})},rl=ll,nl=Ha.div`
|
|
151
|
+
`,Et={[q.JavaScript]:"Node.js",[q.DotNet]:".NET",[q.Php]:"PHP",[q.Java]:"Java",[q.Go]:"Go",[q.Python]:"Python",[q.Ruby]:"Ruby",[q.Rust]:"Rust"},It=[q.Python,q.Java,q.JavaScript,q.DotNet,q.Php,q.Ruby,q.Go],Rt=[{value:"all",label:"Entire Cluster"},{value:"source",label:"Specific Source"},{value:"namespace",label:"Specific Namespace"},{value:"language",label:"Specific Programming Language"}];function Nt(e){return Et[e]||e.charAt(0).toUpperCase()+e.slice(1)}function Vt(e){return null!=e?`${e}. ${Z}`:Z}const zt=({readOnly:a,...t})=>e(a?Ht:qt,{...t}),Dt=({title:t,count:l,children:r})=>a(n,{$gap:6,children:[a(d,{$gap:8,$alignItems:"center",children:[e(o,{size:c.XS,color:s.Primary,nowrap:!0,children:t}),l>1&&e(o,{size:c.XXS,color:s.Secondary,nowrap:!0,children:`(${J})`})]}),e(Ot,{children:r})]}),Xt=()=>{const a=qa();return e(Lt,{children:e(Pt,{children:e(o,{size:c.XXS,color:a.v2.colors.white[500],nowrap:!0,children:Y})})})},Ht=({scopes:t,titleNumber:l})=>{const r=Vt(l);if(Ba(t))return e(E,{bgTint:"900",richTitle:{title:r},withCollapse:!0,collapseIsDefaultOpen:!0,children:e(I,{status:N.Default,message:R,fullWidth:!0})});const n=t.sources??[],i=t.namespaces??[],o=t.languages??[],s=[];return n.length&&s.push({kind:"sources",node:e(Dt,{title:V,count:n.length,children:n.map((a,t)=>{const l=[a.namespace,a.kind,a.name].filter(Boolean),r=l.length?l.join(" / "):D;return e(z,{label:r},`src-${t}-${r}`)})})}),i.length&&s.push({kind:"namespaces",node:e(Dt,{title:X,count:i.length,children:i.map((a,t)=>e(z,{label:a},`ns-${t}-${a}`))})}),o.length&&s.push({kind:"languages",node:e(Dt,{title:H,count:o.length,children:o.map((a,t)=>{const l=B(a);return e(z,{label:Nt(a),leftIcon:l},`lang-${t}-${a}`)})})}),e(E,{bgTint:"900",richTitle:{title:r,subTitle:s.length>1?_:void 0},withCollapse:!0,collapseIsDefaultOpen:!0,children:e(E,{bgTint:"800",children:e(At,{children:s.map((t,l)=>a(Pa.Fragment,{children:[l>0&&e(Xt,{}),t.node]},t.kind))})})})},_t=e=>e.sources.length>0?"source":e.namespaces.length>0?"namespace":e.languages.length>0?"language":"all",qt=({scopes:t,onChange:l,sourceOptions:r=[],namespaceOptions:i=[],supportedLanguages:d,titleNumber:u,dataIdPrefix:p="source-scope",slim:h,disabled:g})=>{const m=t??ja(),[v,b]=Na(()=>_t(m)),{sources:f,namespaces:y,languages:x}=m,k=f.length>0||y.length>0||x.length>0;Va(()=>{k&&"all"===v&&b(_t(m))},[k,v]);const C=Ea(()=>Rt.map(e=>"language"===e.value&&0===d?.length?null:{...e,disabled:"all"===e.value&&k}).filter(Boolean),[k]),S=Ea(()=>f.map(e=>`${e.namespace}/${e.kind}/${e.name}`),[f]),$=Ea(()=>[...y],[y]),w=Ea(()=>new Set(x),[x]),M=Ra(e=>{b(e)},[]),A=Ra(e=>{const a=e.map(e=>(e=>{const a=e.split("/");return 3!==a.length?null:{namespace:a[0],kind:a[1],name:a[2]}})(e)).filter(e=>null!=e).map(e=>({namespace:e.namespace,kind:e.kind,name:e.name}));l({...m,sources:a})},[m,l]),O=Ra(e=>{l({...m,namespaces:e})},[m,l]),L=Ra(e=>{const a=m.languages,t=a.includes(e)?a.filter(a=>a!==e):[...a,e];l({...m,languages:t})},[m,l]),P=!k&&"all"===v,E=(d||It).map(e=>({id:e,label:Et[e]??e.charAt(0).toUpperCase()+e.slice(1),Icon:B(e)}));return a(j,{richTitle:h?{title:Vt(u),titleSize:c.XS,titleColor:s.Secondary,tooltip:K}:{title:Vt(u),subTitle:K,subTitleWrap:!0},backgroundColor:h?"transparent":void 0,padding:h?0:void 0,children:[e(I,P?{status:N.Default,message:R,fullWidth:!0,smallIcon:!0}:{status:N.Info,message:_,fullWidth:!0,smallIcon:!0}),e(n,{$alignItems:"flex-start",children:e(U,{options:C,selected:v,setSelected:M,disabled:g})}),"source"===v&&e(G,{multiple:!0,"data-id":`${p}-autocomplete-source`,options:r,value:S,onSelect:A,placeholder:F,disabled:g}),"namespace"===v&&e(G,{multiple:!0,"data-id":`${p}-autocomplete-namespace`,options:i,value:$,onSelect:O,placeholder:"Search namespace",disabled:g}),"language"===v&&E.length>0&&e($t,{children:E.map(({id:t,label:l,Icon:r})=>{const n=w.has(t);return a(wt,{$selected:n,onClick:()=>L(t),children:[e(T,{name:`${p}-lang-${t}`,size:W.S,value:n,onChange:()=>L(t),disabled:g}),e(Mt,{children:e(r,{size:20})}),e(o,{size:c.XS,nowrap:!0,children:l})]},t)})})]})},Bt=e=>{if(null!=e){if(!Array.isArray(e)&&"object"==typeof e)return Object.entries(e).map(([e,a])=>({id:e,label:null==a?e:String(a)}));if(Array.isArray(e))return e.map(e=>"string"==typeof e?{id:e,label:e}:e)}},jt=e=>{if(!Array.isArray(e)||e.length<3)return;const[a,t,l]=e;return e=>{const r=null==e?.[a]?"":String(e[a]);switch(t){case"=":case"==":case"===":return r===l;case"!=":case"!==":return r!==l;default:return!0}}},Kt=e=>{if(Array.isArray(e))return e.map(e=>{const a=e;return{keyName:String(a.keyName??a.name??""),label:a.label??a.displayName,tooltip:a.tooltip,placeholder:a.placeholder,helpMessage:a.helpMessage,componentType:a.componentType,options:Bt(a.options??a.values),fullRow:a.fullRow,defaultValue:a.defaultValue,withRegexTester:a.withRegexTester,separator:a.separator,copyByColumn:a.copyByColumn,renderCondition:jt(a.renderCondition)}})},Ut=e=>{if(Array.isArray(e))return e.map(e=>{if("string"==typeof e)return{id:e,label:e};const a=e;return{id:String(a.id??a.keyName??a.name??""),label:a.label??a.displayName??String(a.id??""),tooltip:a.tooltip,fields:Array.isArray(a.fields)?a.fields.map(Gt):void 0}})},Gt=e=>{const a="string"==typeof e.componentProperties?A(e.componentProperties,{}):e.componentProps||{};return{name:e.name,componentType:e.componentType,inputType:e.inputType??a.inputType??a.type,title:e.displayName,tooltip:a.tooltip,placeholder:a.placeholder,helpMessage:a.helpMessage,required:a.required,initialValue:e.initialValue,renderCondition:e.renderCondition,options:Bt(a.options??a.values),itemWrapperKey:a.itemWrapperKey,columns:Kt(a.columns),limitFieldsPerRow:a.limitFieldsPerRow,variant:a.variant,wrapKey:a.wrapKey,checkboxOptions:Ut(a.options??a.values),checkedValue:a.checkedValue??"true",valueMode:a.valueMode??"object",fields:Array.isArray(a.fields)?a.fields.map(Gt):void 0,addLabel:a.addLabel,itemLabel:a.itemLabel,keyLabel:a.titleKey??a.keyLabel,valueLabel:a.titleValue??a.valueLabel,persistAs:a.persistAs}},Ft=e=>{const a=e.initialValue;if(void 0!==a&&""!==a)return e.componentType===y.CheckboxList?"array"===e.valueMode?A(a,[]):A(a,{}):e.componentType!==y.MultiInput&&e.componentType!==y.MultiTabledInput||!e.wrapKey?e.componentType===y.MultiInput||e.componentType===y.MultiTabledInput?A(a,[]):e.componentType===y.SourceScopes?"null"===a||"{}"===a?ja():Ua(A(a,null)):e.componentType===y.Toggle||e.componentType===y.Checkbox?"true"===a:a:{[e.wrapKey]:A(a,[])}},Wt=e=>"object"==typeof e&&null!==e&&!Array.isArray(e),Jt=e=>Array.isArray(e)?e:[],Yt=e=>{const a={};return e.forEach(e=>{a[String(e.key??"")]=String(e.value??"")}),a},Zt=e=>Wt(e)?Object.entries(e).map(([e,a])=>({key:e,value:String(a??"")})):[],Qt=({field:a,value:t,setValue:l,errorMessage:r,disabled:n})=>{const[i,o]=Na(()=>Zt(t));return Va(()=>{const e=Wt(t)?t:{};((e,a)=>{const t=Object.keys(e),l=Object.keys(a);return t.length===l.length&&t.every(t=>Object.prototype.hasOwnProperty.call(a,t)&&a[t]===e[t])})(Yt(i),e)||o(Zt(t))},[t]),e(M,{name:a.name,label:a.title,tooltip:a.tooltip,helpMessage:a.helpMessage,required:a.required,disabled:n,limitFieldsPerRow:2,columns:[{keyName:"key",label:a.keyLabel||"Key",placeholder:a.keyLabel||"Key"},{keyName:"value",label:a.valueLabel||"Value",placeholder:a.valueLabel||"Value"}],values:i,setValues:e=>{o(e),l(Yt(e))},errorMessage:r})},el=({field:l,value:r,setValue:d,errorMessage:u,disabled:p,keyValuePersistAs:h,sourceOptions:m,namespaceOptions:v})=>{const{name:b,componentType:f,inputType:x,title:k,tooltip:C,placeholder:S,helpMessage:$,required:w,initialValue:A,options:L,itemWrapperKey:P,columns:E,limitFieldsPerRow:I,variant:R,wrapKey:N,checkboxOptions:V}=l,[z,D]=Na({open:!1,value:""});if(f===y.SourceScopes)return e(zt,{scopes:Ua(r),onChange:e=>d(e),sourceOptions:m,namespaceOptions:v,dataIdPrefix:`dynamic-field-${b}`,slim:!0});if(f===y.CheckboxList&&"array"===l.valueMode){const t=Jt(r),l=(e,a)=>d(a?[...t.filter(a=>a!==e),e]:t.filter(a=>a!==e));return a(n,{$gap:12,children:[k&&e(i,{label:k,tooltip:C,required:w}),e(n,{$gap:8,children:(V||[]).map(a=>{const r=e(T,{name:a.id,label:a.label,value:t.includes(a.id),disabled:p,onChange:e=>l(a.id,e)},a.id);return a.tooltip?e(ae,{text:a.tooltip,withIcon:!0,children:r},a.id):r})}),e(g,{errorMessage:u,helpMessage:$})]})}if(f===y.CheckboxList){const t=Wt(r)?r:{},i=(e=>"emptyObject"!==e.checkedValue||{})(l),m=e=>"emptyObject"===l.checkedValue?Wt(e):!!e;return a(n,{$gap:12,children:[k&&e(o,{size:c.XS,color:s.Secondary,nowrap:!0,children:k}),e(n,{$gap:12,children:(V||[]).map(l=>{const r=t[l.id],o=m(r),s=Wt(r)?r:{},c=e(T,{label:l.label,value:o,disabled:p,onChange:e=>d({...t,[l.id]:e?Wt(r)?r:i:null})}),u=l.tooltip?e(ae,{text:l.tooltip,withIcon:!0,children:c}):c,g=o&&l.fields?.length?e(n,{$gap:12,$padding:"0 0 0 24px",children:l.fields.map(a=>e(el,{field:a,value:s[a.name],setValue:e=>d({...t,[l.id]:{...s,[a.name]:e}}),disabled:p,keyValuePersistAs:h},`${b}-${l.id}-${a.name}`))}):null;return a(n,{$gap:12,children:[u,g]},l.id)})}),e(g,{errorMessage:u,helpMessage:$})]})}if(f===y.MultiTabledInput){const l=Jt(N?r?.[N]:r),n=e=>d(N?{...Wt(r)?r:{},[N]:e}:e),i=(E||[]).some(e=>e.withRegexTester);return a(t,{children:[e("cards"===R?te:M,{name:b,label:k,tooltip:C,helpMessage:$,required:w,disabled:p,columns:E||[],limitFieldsPerRow:I,values:l,setValues:n,errorMessage:u,onTestRegex:i?e=>D({open:!0,value:e}):void 0}),i&&e(xt,{isOpen:z.open,regex:z.value,onClose:()=>D({open:!1,value:""})})]})}if(f===y.MultiInput&&N){const a=Jt(r?.[N]);return e(O,{name:b,label:k,tooltip:C,helpMessage:$,required:w,disabled:p,placeholder:S,values:a,setValues:e=>d({...Wt(r)?r:{},[N]:e}),errorMessage:u})}if(f===y.MultiInput&&P){const a=Jt(r).map(e=>String(e?.[P]??""));return e(O,{name:b,label:k,tooltip:C,helpMessage:$,required:w,disabled:p,placeholder:S,values:a,setValues:e=>d(e.map(e=>({[P]:e}))),errorMessage:u})}return f===y.KeyValuePair?"map"===(l.persistAs??h)?e(Qt,{field:l,value:r,setValue:d,errorMessage:u,disabled:p}):e(Tt,{componentType:f,name:b,label:k,tooltip:C,helpMessage:$,disabled:p,required:w,errorMessage:u,keyLabel:l.keyLabel,valueLabel:l.valueLabel,value:r??[],setValue:d}):e(Tt,{componentType:f,inputType:x,name:b,label:k,tooltip:C,helpMessage:$,disabled:p,required:w,placeholder:S,errorMessage:u,dropdownOptions:L,value:(null==r?A:r)??"",setValue:d})},al=({field:l,value:r,setValue:o,disabled:s,keyValuePersistAs:c,sourceOptions:g,namespaceOptions:m})=>{const v=qa(),b=Jt(r),f=b.length?b:[{}],y=l.fields||[],x=e=>o(e);return a(t,{children:[f.map((t,r)=>a(za,{children:[e(ee,{}),a(n,{$gap:12,children:[a(d,{$justifyContent:"space-between",$alignItems:"center",children:[e(i,{label:`${l.itemLabel||l.title||"Item"} ${r+1}`}),e(u,{leftIcon:()=>e(ba,{fill:v.v2.colors.red[500]}),variant:h.Secondary,size:p.S,onClick:()=>(e=>{const a=f.filter((a,t)=>t!==e);x(a)})(r),disabled:s||1===f.length})]}),y.map(a=>e(el,{field:a,value:t[a.name],setValue:e=>((e,a,t)=>x(f.map((l,r)=>r===e?{...l,[a]:t}:l)))(r,a.name,e),disabled:s,keyValuePersistAs:c,sourceOptions:g,namespaceOptions:m},`${l.name}-group-${r}-${a.name}`))]})]},`${l.name}-group-${r}`)),e(u,{variant:h.Secondary,label:l.addLabel||"Add",leftIcon:fa,onClick:()=>x([...f,{}]),disabled:s}),e(ee,{})]})},tl=({field:t,value:l,setValue:r,errorMessage:o,disabled:s})=>a(n,{$gap:12,children:[t.title&&e(i,{label:t.title,tooltip:t.tooltip,required:t.required}),e(n,{$gap:8,children:(t.checkboxOptions||[]).map(a=>{const t=e(T,{name:a.id,label:a.label,value:!0===l?.[a.id],disabled:s,onChange:e=>r(a.id,e)},a.id);return a.tooltip?e(ae,{text:a.tooltip,withIcon:!0,children:t},a.id):t})}),e(g,{errorMessage:o,helpMessage:t.helpMessage})]}),ll=({signals:a,fields:l,value:r,setValue:n,formErrors:i,disabled:o,seedInitialValues:s,keyValuePersistAs:c="map",sourceOptions:d,namespaceOptions:u})=>{const{isVm:p}=Ka(),h=(l||[]).filter(e=>!!e).map(e=>Gt(e));return Va(()=>{if(!s)return;const e=r||{},a={};h.forEach(t=>{if(t.componentType===y.SourceScopes&&p)return;const l=t.componentType===y.SourceScopes?Ft(t)??ja():Ft(t);if(void 0===l)return;if(t.componentType===y.CheckboxList&&"flatFields"===t.valueMode&&Wt(l))return void Object.entries(l).forEach(([t,l])=>{void 0!==e[t]&&null!==e[t]||(a[t]=l)});const r=e[t.name];if(t.componentType===y.SourceScopes){if(void 0!==r)return}else if(null!=r)return;a[t.name]=Wt(l)&&Wt(a[t.name])?{...a[t.name],...l}:l}),Object.entries(a).forEach(([e,a])=>n(e,a))},[]),e(t,{children:h.map(t=>{const l=Object.entries(r||{}).map(([e,a])=>({name:e,key:e,value:a}));if(t.renderCondition&&!Q(t.renderCondition,a,l))return null;if(t.componentType===y.SourceScopes&&p)return null;const s=r?.[t.name];if(t.componentType===y.FieldGroup)return e(al,{field:t,value:s,setValue:e=>n(t.name,e),disabled:o,keyValuePersistAs:c,sourceOptions:d,namespaceOptions:u},t.name);if(t.componentType===y.CheckboxList&&"flatFields"===t.valueMode){const a=t.checkboxOptions?.map(e=>i[e.id]).find(Boolean);return e(tl,{field:t,value:r||{},setValue:n,errorMessage:a,disabled:o},t.name)}return e(el,{field:t,value:s,setValue:e=>n(t.name,e),errorMessage:i[t.name],disabled:o,keyValuePersistAs:c,sourceOptions:d,namespaceOptions:u},t.name)})})},rl=ll,nl=Ha.div`
|
|
152
152
|
display: flex;
|
|
153
153
|
align-items: center;
|
|
154
154
|
gap: 24px;
|
|
@@ -193,7 +193,7 @@ import{jsx as e,jsxs as a,Fragment as t}from"react/jsx-runtime";import{D as l,c
|
|
|
193
193
|
align-items: flex-end;
|
|
194
194
|
gap: 16px;
|
|
195
195
|
margin-bottom: 12px;
|
|
196
|
-
`,Al="Any",Ol="Kafka topic",Ll=()=>e("div",{style:{marginBottom:"8px"},children:e(o,{size:c.XS,weight:500,children:"And"})}),Pl=[{value:"all",label:"All Operations"},{value:"httpServer",label:"HTTP Server"},{value:"httpClient",label:"HTTP Client"}],El=[{value:"all",label:"All Operations"},{value:"httpServer",label:"HTTP Server"},{value:"kafkaConsumer",label:"Kafka Consumer"},{value:"kafkaProducer",label:"Kafka Producer"}],Il=[{id:"",label:Al},{id:"GET",label:"GET"},{id:"POST",label:"POST"},{id:"PUT",label:"PUT"},{id:"DELETE",label:"DELETE"},{id:"PATCH",label:"PATCH"}],Rl=a=>a.readOnly?e(
|
|
196
|
+
`,Al="Any",Ol="Kafka topic",Ll=()=>e("div",{style:{marginBottom:"8px"},children:e(o,{size:c.XS,weight:500,children:"And"})}),Pl=[{value:"all",label:"All Operations"},{value:"httpServer",label:"HTTP Server"},{value:"httpClient",label:"HTTP Client"}],El=[{value:"all",label:"All Operations"},{value:"httpServer",label:"HTTP Server"},{value:"kafkaConsumer",label:"Kafka Consumer"},{value:"kafkaProducer",label:"Kafka Producer"}],Il=[{id:"",label:Al},{id:"GET",label:"GET"},{id:"POST",label:"POST"},{id:"PUT",label:"PUT"},{id:"DELETE",label:"DELETE"},{id:"PATCH",label:"PATCH"}],Rl=a=>a.readOnly?e(Nl,{data:a.data}):e(Vl,{category:a.category,formState:a.formState,onChange:a.onChange}),Nl=({data:t})=>{const l=Ea(()=>(e=>{if("noisy"===e.category){const a=e.rule.operation;if(a?.httpServer)return[{id:"type",title:Ne,value:Re},{id:"route",title:Ae,value:a.httpServer.route||a.httpServer.routePrefix||Ve},{id:"method",title:Ee,value:a.httpServer.method||Al}];if(a?.httpClient){const e=[{id:"type",title:Ne,value:ze}];return a.httpClient.serverAddress&&e.push({id:"serverAddress",title:"Server address",value:a.httpClient.serverAddress}),e.push({id:"route",title:Ae,value:a.httpClient.templatedPath||a.httpClient.templatedPathPrefix||Ve}),e.push({id:"method",title:Ee,value:a.httpClient.method||Al}),e}return[{id:"type",title:Ne,value:De}]}const a=e.rule.operation;return a?.httpServer?[{id:"type",title:Ne,value:Re},{id:"route",title:Ae,value:a.httpServer.route||a.httpServer.routePrefix||Ve},{id:"method",title:Ee,value:a.httpServer.method||Al}]:a?.kafkaConsumer?[{id:"type",title:Ne,value:Xe},{id:"topic",title:Ol,value:a.kafkaConsumer.kafkaTopic||Ve}]:a?.kafkaProducer?[{id:"type",title:Ne,value:He},{id:"topic",title:Ol,value:a.kafkaProducer.kafkaTopic||Ve}]:[{id:"type",title:Ne,value:De}]})(t),[t]);return e(j,{richTitle:{title:ke},children:e(kl,{children:l.map(({id:t,title:l,value:r})=>a(Cl,{children:[e(o,{size:c.XXXS,color:s.Secondary,nowrap:!0,children:l}),e(o,{size:c.XS,nowrap:!0,children:r})]},t))})})},Vl=({category:t,formState:l,onChange:r})=>{const i=Ea(()=>"noisy"===t?Pl:El,[t]),o=Ra(e=>r({operationType:e,route:"",serverAddress:"",method:"",kafkaTopic:""}),[r]),s=Ra(e=>a=>{a&&r({routeType:e,route:""})},[r]),c=Ra(e=>r({route:e.target.value}),[r]),d=Ra(e=>r({serverAddress:e.target.value}),[r]),u=Ra(e=>r({method:e[0]||""}),[r]),g=Ra(e=>r({kafkaTopic:e.target.value}),[r]),m="httpServer"===l.operationType||"httpClient"===l.operationType,v="kafkaConsumer"===l.operationType||"kafkaProducer"===l.operationType,b="httpClient"===l.operationType?Me:Ae,f="httpClient"===l.operationType?Oe:Le;return a(j,{richTitle:{title:`2. ${ke}`,subTitle:Ce},children:[e(n,{$alignItems:"flex-start",children:e(U,{options:i,selected:l.operationType,setSelected:o})}),m&&a(Sl,{children:["httpClient"===l.operationType&&a(Ml,{children:[e(L,{name:"sampling-input-server-address",label:Te,placeholder:Se,value:l.serverAddress,onChange:d}),e(Ll,{})]}),a(Tl,{children:[a($l,{children:[e(wl,{children:e($e,{"data-id":"sampling-radio-route",value:"route"===l.routeType,onChange:s("route")})}),e(L,{name:"sampling-input-route",label:b,placeholder:we,value:"route"===l.routeType?l.route:"",onChange:c,disabled:"route"!==l.routeType})]}),a($l,{children:[e(wl,{children:e($e,{"data-id":"sampling-radio-route-prefix",value:"routePrefix"===l.routeType,onChange:s("routePrefix")})}),e(L,{name:"sampling-input-route-prefix",label:f,placeholder:we,value:"routePrefix"===l.routeType?l.route:"",onChange:c,disabled:"routePrefix"!==l.routeType})]})]}),a(Ml,{children:[e(Ll,{}),e(Pe,{label:Ee,items:Il,selectedIds:[l.method||""],setSelectedIds:e=>u(e),buttonProps:{"data-id":"sampling-btn-method",label:Il.find(e=>e.id===l.method)?.label||Al,size:p.S,variant:h.Secondary}})]})]}),v&&e(L,{name:"sampling-input-kafka-topic",label:Ie,placeholder:"Type kafka topic",value:l.kafkaTopic,onChange:g,width:"320px"})]})},zl=[{value:"all",label:"Drop All"},{value:"sample",label:"Sample"}],Dl=[{value:"all",label:"Keep All"},{value:"sample",label:"Sample"}],Xl=a=>a.readOnly?e(Hl,{data:a.data}):e(_l,{category:a.category,formState:a.formState,onChange:a.onChange}),Hl=({data:t})=>{const l=Ea(()=>(e=>{switch(e.category){case"highlyRelevant":return null!=e.rule.percentageAtLeast?{title:qe,method:Ke,description:Be,value:`${e.rule.percentageAtLeast}%`}:{title:qe,method:Ge,description:null,value:null};case"noisy":return Ja(e.rule.percentageAtMost)?{title:qe,method:Ue,description:null,value:null}:{title:qe,method:Ke,description:je,value:`${e.rule.percentageAtMost}%`};case"costReduction":return{title:qe,method:Ke,description:je,value:`${e.rule.percentageAtMost}%`}}})(t),[t]),r=[{id:"method",title:Ee,value:l.method},...null!=l.description?[{id:"value",title:l.description,value:l.value}]:[]];return e(j,{richTitle:{title:l.title},children:e(kl,{children:r.map(({id:t,title:l,value:r})=>a(Cl,{children:[e(o,{size:c.XXXS,color:s.Secondary,nowrap:!0,children:l}),e(o,{size:c.XS,nowrap:!0,children:r})]},t))})})},_l=({category:t,formState:l,onChange:r})=>{const i="highlyRelevant"===t,o=i?Dl:zl,s=`${i?4:3}. ${qe}`,c=_e[t],d=i?Be:je,u="noisy"===t?gl:hl,p=Ra(e=>r({percentageMode:e}),[r]),h=Ra(e=>r({percentagePreset:e}),[r]),g=Ra(e=>r({customPercentage:e.target.value}),[r]);return a(j,{richTitle:{title:s,subTitle:c},children:["costReduction"!==t&&e(n,{$alignItems:"flex-start",children:e(U,{options:o,selected:l.percentageMode,setSelected:p})}),("costReduction"===t||"sample"===l.percentageMode)&&e(vl,{description:d,options:u,selected:l.percentagePreset,onSelect:h,customName:"sampling-input-custom-percentage",customPlaceholder:"5%",customValue:l.customPercentage,onCustomChange:g,customInputType:P.Decimal,customMin:0,customMax:100})]})},ql=Ha.div`
|
|
197
197
|
display: flex;
|
|
198
198
|
align-items: flex-end;
|
|
199
199
|
gap: 16px;
|
|
@@ -203,7 +203,7 @@ import{jsx as e,jsxs as a,Fragment as t}from"react/jsx-runtime";import{D as l,c
|
|
|
203
203
|
`,jl=Ha.div`
|
|
204
204
|
flex: 1;
|
|
205
205
|
min-width: 0;
|
|
206
|
-
`;function Kl(e){return"highlyRelevant"===e.category?e.rule.error?"Error":null!=e.rule.durationAtLeastMs?"Duration":"Relevance":aa[e.category]}const Ul=a=>a.readOnly?e(Gl,{data:a.data}):e(Fl,{formState:a.formState,onChange:a.onChange}),Gl=({data:t})=>{const l=Ea(()=>[{id:"name",title:We,value:t.rule.name||Fe},{id:"type",title:Je,value:Kl(t)}],[t]),r=t.rule.notes||
|
|
206
|
+
`;function Kl(e){return"highlyRelevant"===e.category?e.rule.error?"Error":null!=e.rule.durationAtLeastMs?"Duration":"Relevance":aa[e.category]}const Ul=a=>a.readOnly?e(Gl,{data:a.data}):e(Fl,{formState:a.formState,onChange:a.onChange}),Gl=({data:t})=>{const l=Ea(()=>[{id:"name",title:We,value:t.rule.name||Fe},{id:"type",title:Je,value:Kl(t)}],[t]),r=t.rule.notes||Ve;return a(j,{children:[e(kl,{children:l.map(({id:t,title:l,value:r})=>a(Cl,{children:[e(o,{size:c.XXXS,color:s.Secondary,nowrap:!0,children:l}),e(o,{size:c.XS,nowrap:!0,children:r})]},t))}),a(Cl,{children:[e(o,{size:c.XXXS,color:s.Secondary,children:Ye}),e(o,{size:c.XS,children:r})]})]})},Fl=({formState:t,onChange:l})=>{const r=Ra(e=>l({name:e.target.value}),[l]),n=Ra(e=>l({notes:e.target.value}),[l]);return e(j,{children:a(ql,{children:[e(Bl,{children:e(L,{name:"sampling-input-rule-name",label:We,tooltip:"Optional. Give this rule a name for easier identification.",placeholder:Ze,value:t.name,onChange:r})}),e(jl,{children:e(L,{name:"sampling-input-note",label:Ye,tooltip:ea,placeholder:Qe,value:t.notes,onChange:n})})]})})},Wl=[{value:"Relevance",label:"Relevance"},{value:"Error",label:"Error"},{value:"Duration",label:"Duration"}],Jl=({formState:a,onChange:t})=>{const l=Ra(e=>t({ruleType:e,keepErrors:"Error"===e}),[t]);return e(j,{richTitle:{title:`3. ${Je}`,subTitle:ta},children:e(n,{$alignItems:"flex-start",children:e(U,{options:Wl,selected:a.ruleType,setSelected:l})})})},Yl=a=>{const t=Ea(()=>{if(a.readOnly)return a.summary;switch(a.category){case"noisy":return Qa(tt(a.formState));case"highlyRelevant":return Za(at(a.formState));case"costReduction":return Ya(et(a.formState))}},[a]);if(a.readOnly)return e(ol,{title:la,summary:t,renderAction:a.renderAction});const l=1===t.length&&"default"===t[0].variant;return e(ol,{title:l?re:la,summary:l?[]:t,renderAction:a.renderAction})},Zl=(e,a)=>!a?.length||!!a?.find(a=>a===e),Ql=({title:t="Signals",required:l,errorMessage:r,allowedSignals:o,selectedSignals:s,setSelectedSignals:c,disabled:u})=>{const[p,h]=Na(1===s.length),m=Ia(JSON.stringify(s));return Va(()=>{let e=ra(s).filter(e=>Zl(e,o));e.length||(e=na.filter(({id:e})=>Zl(e,o)).map(({id:e})=>e));const a=JSON.stringify(e);m.current!==a&&(m.current=a,c(e),h(1===e.length))},[o,s]),a(n,{$gap:12,children:[e(i,{label:t,required:l}),e(d,{$gap:12,children:na.map(a=>{const t=Zl(a.id,o),l=((e,a)=>!!a?.find(a=>a===e))(a.id,s);return t?e(T,{label:a.value,disabled:u||!t||p&&l,value:l,onChange:e=>((e,a)=>{const t=e,l=a?[...s,t]:s.filter(e=>e!==t);c(l),h(1===l.length)})(a.id,e)},a.id):null})}),e(g,{errorMessage:r})]})},er=({minSupportedVersion:a,currentVersion:t})=>e(m,{isOpen:!0,onClose:()=>{},relativeToParent:!0,visual:()=>e(f,{scale:2.4,icon:()=>e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"21",viewBox:"0 0 22 21",fill:"none",children:e("path",{fill:"#151618",d:"M9.4844 0.730003C9.99694 -0.243259 11.4076 -0.24341 11.92 0.730003L11.9685 0.831353L14.3039 6.22012L20.153 6.77755C21.3553 6.89211 21.841 8.38683 20.9358 9.18621L16.5314 13.0731L17.8091 18.8079C18.0716 19.9868 16.8005 20.9109 15.7605 20.2969L10.7017 17.3093L5.64282 20.2969C4.60289 20.9104 3.33173 19.9866 3.59427 18.8079L4.87192 13.0741L0.468608 9.18621C-0.43662 8.38693 0.0482932 6.8924 1.25029 6.77755L7.09837 6.22012L9.43588 0.831353L9.4844 0.730003ZM8.55284 7.02876C8.35287 7.48992 7.9179 7.80589 7.41751 7.85357L2.03952 8.36571L6.09027 11.941C6.46691 12.2737 6.63296 12.7852 6.5237 13.2758L5.34956 18.5459L10.0008 15.8009L10.1669 15.7179C10.5087 15.574 10.8945 15.5741 11.2364 15.7179L11.4036 15.8009L16.0538 18.5459L14.8807 13.2758C14.7714 12.7851 14.9374 12.2737 15.3141 11.941L19.3627 8.36571L13.9858 7.85357C13.4855 7.80587 13.0505 7.4899 12.8505 7.02876L10.7017 2.07342L8.55284 7.02876Z"})})}),title:"Upgrade Required",description:`To use this feature, please upgrade to Odigos v${a} or later.\nCurrent version: ${t}.`}),ar=Ha.div`
|
|
207
207
|
display: flex;
|
|
208
208
|
flex-direction: column;
|
|
209
209
|
justify-content: flex-end;
|
|
@@ -250,7 +250,7 @@ import{jsx as e,jsxs as a,Fragment as t}from"react/jsx-runtime";import{D as l,c
|
|
|
250
250
|
padding: 5vh 10vw;
|
|
251
251
|
border-radius: 12px;
|
|
252
252
|
background-color: ${({theme:e})=>e.v2.colors.silver[800]};
|
|
253
|
-
`,ur=Da(({isOpen:t,withOverlay:r,disableAnimation:n,onClose:i,onBack:o,onNext:s,nextIsSkip:d,onSave:u,disableSave:p,connectionIds:g,header:v,subHeader:b,leftColumn:f,rightColumn:y,search:x,filters:k,errorMessage:C,isFormDirty:S,hideDirtyNote:T,isFetching
|
|
253
|
+
`,ur=Da(({isOpen:t,withOverlay:r,disableAnimation:n,onClose:i,onBack:o,onNext:s,nextIsSkip:d,onSave:u,disableSave:p,connectionIds:g,header:v,subHeader:b,leftColumn:f,rightColumn:y,search:x,filters:k,errorMessage:C,isFormDirty:S,hideDirtyNote:T,forcedNote:$,isFetching:w,progress:M},A)=>{const[O,L]=Na(!1),[P,E]=Na(!1),[I,R]=Na(void 0);Xa(A,()=>({clearErrors:()=>R(void 0)}));const V=P,z=Ra(()=>{S&&!O?L(!0):(L(!1),i?.())},[S,O,i]),D=p||P||"boolean"==typeof S&&!S,X=Ra(async()=>{E(!0);const e=await u();E(!1),!1!==e&&(e?.error?R(e.error):(g?.setValue([]),i?.()))},[u,g,i]),H=!!x||!!g||!!k,_=!!b,q=(H?48:0)+(_?50:0),B=Ea(()=>$||(w?{status:N.Info,message:"Fetching Data..."}:P&&!M?{status:N.Info,message:"Saving Changes..."}:I||C?{status:N.Error,message:I||C}:"boolean"==typeof S&&S&&!T?{status:N.Info,message:'The values don\'t reflect the current configurations of the selected clusters.\n"Save" will override the current configurations.'}:void 0),[w,P,M,I,C,S,T,$]),j=Ea(()=>o?{label:"Back",leftIcon:wa,variant:h.Secondary,onClick:o}:{label:"Cancel",variant:h.Secondary,onClick:z,disabled:V},[o,z,V]),[K,U]=Na(!1),G=Ea(()=>s?d?{"data-id":"wide-drawer-skip",label:"Skip",rightIcon:Ma,variant:h.Secondary,onClick:()=>U(!0)}:{"data-id":"wide-drawer-next",label:"Next",rightIcon:Ma,variant:h.Primary,onClick:s}:{"data-id":"wide-drawer-save",label:"Save",variant:h.Primary,onClick:X,disabled:D},[s,d,X,D]);return a(l,{width:nr,isOpen:t,disableAnimation:n,hideOverlay:!P&&!r,header:{...v,onClose:i?z:void 0,onCloseDisabled:V},footer:{note:B,actions:[j,G]},children:[P?e(oa,{$height:"calc(100vh - 136px)",children:e(dr,{children:e(ca,{titleSize:c.S,subTitleSize:c.XXXS,withGradient:!0,withSpinner:!0,...M})})}):a(ir,{children:[H&&a(or,{children:[g&&e(da,{icon:Aa,title:"Selected Clusters",badge:{label:g.value.length}}),x&&e(ua,{width:"100%",...x}),k]}),_&&e(sr,{children:e(da,{icon:b.icon,title:b.title,subTitle:b.description,badge:b.badge})}),a(cr,{children:[e(rr,{isLeft:!0,heightOffset:q,...f}),e(rr,{isRight:!0,heightOffset:q,...y})]})]}),e(kt,{isOpen:O,onClose:()=>L(!1),onApprove:z}),e(m,{title:"Skip setup?",description:"Without completing setup, Odigos won't be able to collect and send your telemetry data. This may interrupt your data flow and limit the platform's ability to provide value.",isOpen:K,onClose:()=>U(!1),denyButton:{label:"Go Back",variant:h.Secondary,onClick:()=>U(!1)},approveButton:{label:"Skip",variant:h.Primary,onClick:()=>{s?.(),U(!1)}}})]})});ur.displayName=ur.name;const pr=Ha.div`
|
|
254
254
|
padding: 0 24px;
|
|
255
255
|
border-radius: 12px;
|
|
256
256
|
background-color: ${({$codeBgColor:e})=>e||"transparent"};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{useMemo as t,useContext as r,createContext as a,useCallback as n,useState as o,useEffect as s,useRef as i}from"react";import{b6 as c,b7 as l,m as d,S as u,b8 as m,b9 as p,ba as f,P as E,b as y,bb as h,bc as S,bd as T,be as g,bf as _,bg as I,bh as A,bi as v,bj as R,bk as C,bl as N,aY as O,bm as D,bn as w,n as b,bo as P,bp as L,bq as k,br as F,bs as G,bt as U,v as M,bu as x,bv as H,ad as K,a9 as V,ab as W,aa as Y,ac as $,a8 as j,bw as q}from"./ui-components-
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{useMemo as t,useContext as r,createContext as a,useCallback as n,useState as o,useEffect as s,useRef as i}from"react";import{b6 as c,b7 as l,m as d,S as u,b8 as m,b9 as p,ba as f,P as E,b as y,bb as h,bc as S,bd as T,be as g,bf as _,bg as I,bh as A,bi as v,bj as R,bk as C,bl as N,aY as O,bm as D,bn as w,n as b,bo as P,bp as L,bq as k,br as F,bs as G,bt as U,v as M,bu as x,bv as H,ad as K,a9 as V,ab as W,aa as Y,ac as $,a8 as j,bw as q}from"./ui-components-Cz2E0SIN.js";import{i as B,n as Q,m as z,l as J,o as X,p as Z,v as ee,q as te,u as re}from"./helpers-BjINTDe1.js";import{ApolloProvider as ae,useLazyQuery as ne,useApolloClient as oe,useQuery as se}from"@apollo/client/react";import{ErrorLink as ie}from"@apollo/client/link/error";import{SetContextLink as ce}from"@apollo/client/link/context";import{getMainDefinition as le}from"@apollo/client/utilities";import{CombinedGraphQLErrors as de,ServerError as ue}from"@apollo/client/errors";import{HttpLink as me,ApolloLink as pe,ApolloClient as fe,InMemoryCache as Ee,gql as ye}from"@apollo/client";const he=e=>{if(!e)return!1;const t=e.toLowerCase();return t.includes("authentication required")||t.includes("authentication expired")||t.includes("http 401")},Se=a(null),Te=()=>{const e=r(Se);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},ge=({apolloConfig:r,operations:a,context:n,children:o})=>{const s=t(()=>(e=>{const t=new me({uri:e.httpUrl,credentials:e.credentials??"same-origin"}),r=new ie(({error:t})=>{de.is(t)?t.errors.some(e=>he(e.message))&&e.onAuthError?.():(ue.is(t)&&401===t.statusCode||he(t.message))&&e.onAuthError?.()}),a=new ce(async t=>{const r={...t.headers};if(e.authHeader){const t=await e.authHeader();Object.assign(r,t)}return e.csrfHeader&&Object.assign(r,e.csrfHeader()),{headers:r}}),n=[];e.additionalLinks?.length&&n.push(...e.additionalLinks),n.push(a,r,t);let o=pe.from(n);e.wsLink&&(o=pe.split(({query:e})=>{const t=le(e);return"OperationDefinition"===t.kind&&"subscription"===t.operation},e.wsLink,o));const s=e.defaultFetchPolicies;return new fe({link:o,cache:new Ee({typePolicies:e.cacheTypePolicies}),defaultOptions:{watchQuery:{fetchPolicy:s?.watchQuery??"cache-and-network"},query:{fetchPolicy:s?.query??"cache-first"},mutate:{fetchPolicy:s?.mutate??"network-only"}}})})(r),[r.httpUrl,r.wsLink,r.credentials,r.clientKey]),i=t(()=>({operations:a,context:n,apolloConfig:r}),[a,n,r]);return e(ae,{client:s,children:e(Se.Provider,{value:i,children:o})})},_e=Se,Ie=({connectionIds:r,children:a})=>{const n=Te(),o=t(()=>({operations:n.operations,context:{...n.context,connectionIds:r},apolloConfig:n.apolloConfig}),[n.operations,n.context,n.apolloConfig,r.join(",")]);return e(_e.Provider,{value:o,children:a})},Ae=(e,t)=>{if(e)return"string"==typeof e?e:m(e,t)},ve=e=>{const{addNotification:t}=c(),r=(r,a,n,o,s)=>t({type:r,title:a,message:n,crdType:e,target:Ae(o,e),hideFromHistory:s});return{notify:r,notifyError:(e,t,a)=>r(u.Error,e,t,a),notifySuccess:(e,t,a)=>r(u.Success,e,t,a),notifyPending:(e,t)=>r(u.Default,"Pending",e,t,!0),notifyReadonly:()=>{t({type:u.Warning,title:d.READONLY,message:l.READONLY_WARNING,hideFromHistory:!0})}}},Re=e=>{e({type:u.Warning,title:d.READONLY,message:l.READONLY_WARNING,hideFromHistory:!0})},Ce=e=>({error:e,results:[],allSucceeded:!1,anySucceeded:!1,successCount:0,failureCount:0}),Ne=(e,t)=>{if(e)return"function"==typeof e?e(t):e},Oe=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)},De=(e,t)=>e.client??t,we=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(De(t,e),r,a)}catch(e){return{error:Oe(e)}}const o=Ne(t.document,a);if(!o)return{error:"Query operation not supported in this context"};const s=t.transformVariables?t.transformVariables(r,a):r,i=De(t,e);try{const e=await i.query({query:o,variables:s,fetchPolicy:n??"network-only"});return{data:t.transformResult?t.transformResult(e.data,a):e.data,error:e.error?Oe(e.error):void 0}}catch(e){return{error:Oe(e)}}},be=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(De(t,e),r,a)}catch(e){return{error:Oe(e)}}const n=Ne(t.document,a);if(!n)return{error:"Mutation operation not supported in this context"};const o=t.transformVariables?t.transformVariables(r,a):r,s=De(t,e);try{const e=await s.mutate({mutation:n,variables:o});return{data:t.transformResult?t.transformResult(e.data,a):e.data,error:void 0}}catch(e){return{error:Oe(e)}}},Pe=async(e,t,r,a,n)=>{if(!t)return Ce("Multi fetch operation not configured");if(!r.length)return Ce("No proxy ids supplied for multi fetch");const o=De(t,e);if(t.transformVariablesMulti&&(t.documentMulti||t.document)){const e=t.transformVariablesMulti(r,a,n),s=[];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=>s.push(e)):r.proxyIDs.forEach(t=>{s.push({proxyID:t,success:!e.error,data:e.data,error:e.error?.message})})}catch(e){const t=Oe(e);r.proxyIDs.forEach(e=>s.push({proxyID:e,success:!1,error:t}))}const i=s.filter(e=>e.success).length,c=s.length-i,l=Array.from(new Set(s.filter(e=>!!e.error).map(e=>e.error)));return{results:s,allSucceeded:0===c,anySucceeded:i>0,successCount:i,failureCount:c,error:l.length?l.join(", "):void 0}}const s=await Promise.all(r.map(async r=>{const o={...n,proxyID:r},s=await we(e,t,a,o);return{proxyID:r,success:!s.error,data:s.data,error:s.error}})),i=s.filter(e=>e.success).length,c=s.length-i,l=Array.from(new Set(s.filter(e=>!!e.error).map(e=>e.error)));return{results:s,allSucceeded:0===c,anySucceeded:i>0,successCount:i,failureCount:c,error:l.length?l.join(", "):void 0}},Le=ye`
|
|
2
2
|
query OdigosApiNoop {
|
|
3
3
|
__typename
|
|
4
4
|
}
|
|
@@ -732,7 +732,7 @@ import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import o,{css as
|
|
|
732
732
|
align-items: center;
|
|
733
733
|
justify-content: center;
|
|
734
734
|
cursor: pointer;
|
|
735
|
-
`,ju=({label:n,required:o,tooltip:r,badge:a,leftIcon:s,rightIcon:l,hasError:c,errorMessage:d,warnMessage:u,helpMessage:p,type:h=xn.Text,name:g,value:m,onChange:f,disabled:y,maxWidth:b,width:v,small:E=!1,onClick:$,...S})=>{const C=i(),x=h===xn.Password,[w,T]=Ft(!1),[O,N]=Ft(null),A=c||!!d||!!O,I=m?C.v2.colors.white[500]:y?C.v2.colors.grey[400]:C.v2.colors.silver[200],_=E?14:18,R=jt(null),D=od(R,{deps:[m]}),k=S.readOnly&&D&&null!=m&&""!==m?String(m):"";return e(Kr,{$width:v,$gap:6,children:[t(tu,{label:n,tooltip:r,required:o,badge:a}),t(zu,{$small:E,$disabled:y,$error:A,$clickable:!!$&&!y,onClick:y?void 0:$,children:e(Ed,{text:k,fullWidth:!0,keepAlive:!0,children:[s?t(s,{size:_,fill:I}):null,t(Bu,{"data-id":g,type:w||h===xn.Number||h===xn.Decimal?xn.Text:h,name:g,value:m,onChange:e=>{e.stopPropagation();const t=e.target.value;if(h===xn.Number||h===xn.Decimal){const n=h===xn.Number?_i(t):Ii(t),o=null!=S.min?Number(S.min):void 0,r=null!=S.max?Number(S.max):void 0,i=h===xn.Decimal&&n.endsWith(".");let a=n,s=!1;if(n&&!i){const e=parseFloat(n);isNaN(e)||(null!=r&&e>r?(a=String(r),s=!0):null!=o&&e<o&&(a=String(o),s=!0))}e.target.value=a,N(t&&t!==n?"Please enter a valid number":s?"Value must be "+(null!=o&&null!=r?`between ${o} and ${r}`:null!=r?`at most ${r}`:`at least ${o}`):null)}f?.(e)},onKeyDown:e=>{["Enter"].includes(e.key)||e.stopPropagation()},disabled:y,$maxWidth:b,$width:v,$small:E,...S,ref:R}),x?t(Hu,{onClick:()=>T(e=>!e),children:t(w?Ot:Nt,{size:_,fill:I})}):l?t(l,{size:_,fill:I}):null]})}),t(nu,{errorMessage:O||d,warnMessage:u,helpMessage:p})]})},Wu=e=>{const{"data-id":n,options:o,placeholder:r="Search...",isLoading:i}=e,
|
|
735
|
+
`,ju=({label:n,required:o,tooltip:r,badge:a,leftIcon:s,rightIcon:l,hasError:c,errorMessage:d,warnMessage:u,helpMessage:p,type:h=xn.Text,name:g,value:m,onChange:f,disabled:y,maxWidth:b,width:v,small:E=!1,onClick:$,...S})=>{const C=i(),x=h===xn.Password,[w,T]=Ft(!1),[O,N]=Ft(null),A=c||!!d||!!O,I=m?C.v2.colors.white[500]:y?C.v2.colors.grey[400]:C.v2.colors.silver[200],_=E?14:18,R=jt(null),D=od(R,{deps:[m]}),k=S.readOnly&&D&&null!=m&&""!==m?String(m):"";return e(Kr,{$width:v,$gap:6,children:[t(tu,{label:n,tooltip:r,required:o,badge:a}),t(zu,{$small:E,$disabled:y,$error:A,$clickable:!!$&&!y,onClick:y?void 0:$,children:e(Ed,{text:k,fullWidth:!0,keepAlive:!0,children:[s?t(s,{size:_,fill:I}):null,t(Bu,{"data-id":g,type:w||h===xn.Number||h===xn.Decimal?xn.Text:h,name:g,value:m,onChange:e=>{e.stopPropagation();const t=e.target.value;if(h===xn.Number||h===xn.Decimal){const n=h===xn.Number?_i(t):Ii(t),o=null!=S.min?Number(S.min):void 0,r=null!=S.max?Number(S.max):void 0,i=h===xn.Decimal&&n.endsWith(".");let a=n,s=!1;if(n&&!i){const e=parseFloat(n);isNaN(e)||(null!=r&&e>r?(a=String(r),s=!0):null!=o&&e<o&&(a=String(o),s=!0))}e.target.value=a,N(t&&t!==n?"Please enter a valid number":s?"Value must be "+(null!=o&&null!=r?`between ${o} and ${r}`:null!=r?`at most ${r}`:`at least ${o}`):null)}f?.(e)},onKeyDown:e=>{["Enter"].includes(e.key)||e.stopPropagation()},disabled:y,$maxWidth:b,$width:v,$small:E,...S,ref:R}),x?t(Hu,{onClick:()=>T(e=>!e),children:t(w?Ot:Nt,{size:_,fill:I})}):l?t(l,{size:_,fill:I}):null]})}),t(nu,{errorMessage:O||d,warnMessage:u,helpMessage:p})]})},Wu=e=>{const{"data-id":n,options:o,placeholder:r="Search...",isLoading:i,disabled:a}=e,s=!0===e.multiple,[l,c]=Ft(""),[d,u]=Ft(!1),p=Ht(()=>s?e.value:e.value?[e.value]:[],[s,e.value]),h=Ht(()=>{if(s){const e=p.length;return e?1===e?o.find(e=>e.id===p[0])?.label??"":`${e} selected`:""}return e.value?o.find(t=>t.id===e.value)?.label??"":""},[s,e,o,p]),g=d?l:h,m=Ht(()=>{const e=s?o.map(e=>({...e,withCheckbox:!0})):o;if(!l)return e;const t=l.toLowerCase();return e.filter(e=>[e.label,e.badge,e.secondaryLabel].some(e=>e?.toLowerCase().includes(t)))},[s,o,l]),f=Bt(()=>{c(""),u(!0)},[]),y=Bt(t=>{c(t.target.value),d||u(!0),s||t.target.value||!e.value||e.onSelect(null)},[d,s,e]),b=Bt(e=>{u(e),e||c("")},[]),v=Bt(t=>{if(s)return void e.onSelect(t);const n=o.find(e=>e.id===t[0]);n&&(e.onSelect(n),c(""),u(!1))},[s,e,o]),E=d&&(i||m.length>0||l.length>0);return t(vu,{open:E,onOpenChange:b,items:m,selectedIds:p,setSelectedIds:v,withMultiSelect:s,isLoading:i,emptyMessage:`No results matched the filter '${l}'`,fullWidth:!0,alignY:du.Bottom,children:t(ju,{name:n,leftIcon:$t,placeholder:r,value:g,onChange:y,onFocus:f,disabled:a})})},Gu=o.button`
|
|
736
736
|
width: 100%;
|
|
737
737
|
padding: 0;
|
|
738
738
|
padding-right: 12px;
|
package/lib/components.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{Z as Autocomplete,bI as Badge,B as Button,i as ButtonSize,gh as ButtonTab,gi as ButtonTabList,j as ButtonVariants,a$ as CenterThis,C as Checkbox,gj as CheckboxList,$ as CheckboxSize,cl as CliCommand,b5 as Code,cg as Condition,c6 as Conditions,gk as DEFAULT_TIME_UNITS,z as DataCard,a4 as Divider,D as Drawer,ax as DropData,d3 as DropDataAlignX,d2 as DropDataAlignY,s as DropDown,gl as ErrorBoundary,k as FieldMessage,d as FieldTitle,F as FlexColumn,h as FlexRow,eF as GaugeChart,gm as GaugeChartVariant,gn as Header,go as HoverActions,bY as IconButton,bZ as IconButtonSize,cq as IconGroup,x as Input,a5 as InputCardTable,w as InputList,I as InputTable,cF as Island,b1 as Loader,d4 as Modal,gp as ModalBody,gq as Navbar,b0 as NoData,N as Note,gr as Overlay,bW as Padding,ej as PageContent,ar as Radio,c4 as RadioCard,gs as RadioGroup,bB as RadioSize,a_ as ScrollY,b2 as Search,Q as SectionCard,gt as SectionCardSize,Y as Segment,bD as SegmentSize,cC as SegmentVariant,bX as SkeletonLoader,eE as StatusCard,ek as Stepper,cD as Table,gu as TableContainer,gv as TableTitleWrap,cE as TableVariant,gw as TableWrap,H as Tag,ck as TagVariants,u as TextArea,eG as TextCard,r as TimeInput,o as Toggle,gx as ToggleCodeComponent,p as ToggleLabelAlign,gy as ToggleList,q as ToggleSize,gz as ToggleVariant,T as Tooltip,bC as TruncatableTypography,e as Typography,f as TypographyColor,g as TypographySize,c0 as TypographyVariants,eH as UpgradeRequiredWrapper,gA as VerticalScroll,W as WarningModal,gB as resolveTypographyColor}from"./chunks/ui-components-
|
|
1
|
+
export{Z as Autocomplete,bI as Badge,B as Button,i as ButtonSize,gh as ButtonTab,gi as ButtonTabList,j as ButtonVariants,a$ as CenterThis,C as Checkbox,gj as CheckboxList,$ as CheckboxSize,cl as CliCommand,b5 as Code,cg as Condition,c6 as Conditions,gk as DEFAULT_TIME_UNITS,z as DataCard,a4 as Divider,D as Drawer,ax as DropData,d3 as DropDataAlignX,d2 as DropDataAlignY,s as DropDown,gl as ErrorBoundary,k as FieldMessage,d as FieldTitle,F as FlexColumn,h as FlexRow,eF as GaugeChart,gm as GaugeChartVariant,gn as Header,go as HoverActions,bY as IconButton,bZ as IconButtonSize,cq as IconGroup,x as Input,a5 as InputCardTable,w as InputList,I as InputTable,cF as Island,b1 as Loader,d4 as Modal,gp as ModalBody,gq as Navbar,b0 as NoData,N as Note,gr as Overlay,bW as Padding,ej as PageContent,ar as Radio,c4 as RadioCard,gs as RadioGroup,bB as RadioSize,a_ as ScrollY,b2 as Search,Q as SectionCard,gt as SectionCardSize,Y as Segment,bD as SegmentSize,cC as SegmentVariant,bX as SkeletonLoader,eE as StatusCard,ek as Stepper,cD as Table,gu as TableContainer,gv as TableTitleWrap,cE as TableVariant,gw as TableWrap,H as Tag,ck as TagVariants,u as TextArea,eG as TextCard,r as TimeInput,o as Toggle,gx as ToggleCodeComponent,p as ToggleLabelAlign,gy as ToggleList,q as ToggleSize,gz as ToggleVariant,T as Tooltip,bC as TruncatableTypography,e as Typography,f as TypographyColor,g as TypographySize,c0 as TypographyVariants,eH as UpgradeRequiredWrapper,gA as VerticalScroll,W as WarningModal,gB as resolveTypographyColor}from"./chunks/ui-components-Cz2E0SIN.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"react-dom";import"prism-react-renderer";import"zustand/middleware";import"react-error-boundary";import"virtua";
|
package/lib/constants.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{bm as ACTION_OPTIONS,fR as ALL_LANGUAGES_WILDCARD,fS as ALL_SOURCES,cJ as BTN_CANCEL,cQ as BTN_CONTINUE_EDITING,eK as BTN_CREATE_FIRST_RULE,cH as BTN_CREATE_RULE,cM as BTN_DELETE_RULE,a6 as BTN_EDIT_AUTO_RULE,cL as BTN_EDIT_RULE,c_ as BTN_SAVE,cK as BTN_SAVE_RULE,l as BUTTON_TEXTS,cN as CATEGORY_DESCRIPTIONS,aV as CATEGORY_LABELS,cP as CATEGORY_TITLES,fT as CREATE_COST_REDUCTION_AUTO_RULE_DRAWER_TITLE,fU as CREATE_HIGHLY_RELEVANT_AUTO_RULE_DRAWER_TITLE,fV as CREATE_NOISY_AUTO_RULE_DRAWER_TITLE,c2 as DEFAULT_CLUSTER_ID,c1 as DEFAULT_CLUSTER_NAME,eB as DEFAULT_DATA_STREAM_NAME,al as DESC_DURATION,fW as DESC_ERRORS,ao as DESC_OPERATION,fX as DESC_PERCENTAGE_HIGHLY_RELEVANT,bP as DESC_PERCENTAGE_NOISY,aW as DESC_RULE_TYPE,X as DESC_SOURCE_SCOPE,b_ as DESTINATION_CATEGORIES,eo as DISPLAY_LANGUAGES,m as DISPLAY_TITLES,bE as DOCS_BASE_URL,br as DestinationCategoryTypes,cW as EDIT_COST_REDUCTION_AUTO_RULE_DRAWER_SUBTITLE,cX as EDIT_COST_REDUCTION_AUTO_RULE_DRAWER_TITLE,cU as EDIT_HIGHLY_RELEVANT_AUTO_RULE_DRAWER_SUBTITLE,cV as EDIT_HIGHLY_RELEVANT_AUTO_RULE_DRAWER_TITLE,cY as EDIT_NOISY_AUTO_RULE_DRAWER_SUBTITLE,cZ as EDIT_NOISY_AUTO_RULE_DRAWER_TITLE,cO as EDIT_TITLES,aC as EMPTY_VALUE,bA as EXTRACTION_FORMAT_COPY,by as EXTRACT_ATTRIBUTE_FORM,eI as FILTER_TYPE_ALL,b7 as FORM_ALERTS,bv as INSTRUMENTATION_RULE_OPTIONS,am as LABEL_CUSTOM_DURATION,bT as LABEL_CUSTOM_PERCENTAGE,bS as LABEL_DISABLED,cG as LABEL_DISABLED_RULE,aM as LABEL_DROP_ALL,bM as LABEL_DROP_AT_MOST,bR as LABEL_ENABLED,au as LABEL_HTTP_ROUTE,aw as LABEL_HTTP_ROUTE_PREFIX,az as LABEL_KAFKA_TOPIC,aN as LABEL_KEEP_ALL,aJ as LABEL_KEEP_AT_LEAST,aK as LABEL_KEEP_AT_MOST,aI as LABEL_KEEP_PERCENTAGE,ak as LABEL_KEEP_TRACES_DURATION,ai as LABEL_KEEP_TRACES_ERRORS,ay as LABEL_METHOD,aR as LABEL_NOTE,a7 as LABEL_NO_PREVIEW,aB as LABEL_OPERATION_TYPE,fY as LABEL_RULE_DISABLED,fZ as LABEL_RULE_ENABLED,aP as LABEL_RULE_NAME,aQ as LABEL_RULE_TYPE,aL as LABEL_SAMPLE,aq as LABEL_SERVER_ADDRESS,at as LABEL_TEMPLATED_PATH,av as LABEL_TEMPLATED_PATH_PREFIX,cz as LANGUAGE_OPTIONS,aZ as MONITORS_OPTIONS,E as NOTE_ENTIRE_CLUSTER,L as NOTE_SOURCE_SCOPE_LOGIC,f_ as OPENTELEMETRY_EBPF_DISTRO_OPTION,aE as OPERATION_ALL,aD as OPERATION_HTTP_CLIENT,aA as OPERATION_HTTP_SERVER,aF as OPERATION_KAFKA_CONSUMER,aG as OPERATION_KAFKA_PRODUCER,cy as OTEL_DISTRO_NAME_OPTIONS,aH as PERCENTAGE_SECTION_DESCRIPTIONS,aT as PLACEHOLDER_NOTE,as as PLACEHOLDER_ROUTE,aS as PLACEHOLDER_RULE_NAME,_ as PLACEHOLDER_SEARCH_SOURCE,ap as PLACEHOLDER_SERVER_ADDRESS,ci as PROCESS_ATTRIBUTE_NAMES,c as REGEX_TESTER_DRAWER,bQ as SAMPLING_AUTO_RULE_TITLE,eQ as SAMPLING_BTN_CREATE_RULE,eO as SAMPLING_BTN_DOCS,eP as SAMPLING_BTN_REFRESH,bO as SAMPLING_COST_REDUCTION_AUTO_RULE_TITLE,cR as SAMPLING_DEFAULT_CONFIRM_DESCRIPTION,cT as SAMPLING_DEFAULT_CONFIRM_PREVIEW_LABEL,cS as SAMPLING_DEFAULT_CONFIRM_TITLE,eT as SAMPLING_DELETE_MODAL_APPROVE,eU as SAMPLING_DELETE_MODAL_CANCEL,eV as SAMPLING_DELETE_MODAL_DESCRIPTION,eW as SAMPLING_DELETE_MODAL_TITLE,c$ as SAMPLING_DRAWER_WIDTH,eN as SAMPLING_DUPLICATE_RULE_WARNING,bL as SAMPLING_HIGHLY_RELEVANT_AUTO_RULE_TITLE,dR as SAMPLING_ONBOARDING_ADVANCED_LEFT_BULLET_1,dS as SAMPLING_ONBOARDING_ADVANCED_LEFT_BULLET_2,dT as SAMPLING_ONBOARDING_ADVANCED_LEFT_BULLET_3,dU as SAMPLING_ONBOARDING_ADVANCED_LEFT_TITLE,dV as SAMPLING_ONBOARDING_ADVANCED_RIGHT_BULLET_1,dW as SAMPLING_ONBOARDING_ADVANCED_RIGHT_BULLET_2,dX as SAMPLING_ONBOARDING_ADVANCED_RIGHT_BULLET_3,dY as SAMPLING_ONBOARDING_ADVANCED_RIGHT_BULLET_4,dZ as SAMPLING_ONBOARDING_ADVANCED_RIGHT_BULLET_5,d_ as SAMPLING_ONBOARDING_ADVANCED_RIGHT_TITLE,e0 as SAMPLING_ONBOARDING_ADVANCED_SUBTITLE,d$ as SAMPLING_ONBOARDING_ADVANCED_TITLE,eh as SAMPLING_ONBOARDING_AMBIENT_LABEL,dm as SAMPLING_ONBOARDING_BTN_GO_TO,d7 as SAMPLING_ONBOARDING_BTN_NEXT,dQ as SAMPLING_ONBOARDING_BTN_READ_MORE,dy as SAMPLING_ONBOARDING_BTN_SKIP,dz as SAMPLING_ONBOARDING_BTN_START,e1 as SAMPLING_ONBOARDING_COMMON_BANNER,eg as SAMPLING_ONBOARDING_COMMON_RULES_SECTION,e4 as SAMPLING_ONBOARDING_DROP_DESCRIPTION,e3 as SAMPLING_ONBOARDING_DROP_SUBTITLE,e2 as SAMPLING_ONBOARDING_DROP_TITLE,e7 as SAMPLING_ONBOARDING_ERROR_PRESET_NAME,e6 as SAMPLING_ONBOARDING_ERROR_PRESET_TOGGLE_LABEL,ea as SAMPLING_ONBOARDING_KEEP_DESCRIPTION,e9 as SAMPLING_ONBOARDING_KEEP_SUBTITLE,e8 as SAMPLING_ONBOARDING_KEEP_TITLE,eb as SAMPLING_ONBOARDING_KEEP_USE_CASE_1,ec as SAMPLING_ONBOARDING_KEEP_USE_CASE_2,ed as SAMPLING_ONBOARDING_KEEP_USE_CASE_3,ee as SAMPLING_ONBOARDING_KEEP_USE_CASE_4,ef as SAMPLING_ONBOARDING_KEEP_USE_CASE_5,de as SAMPLING_ONBOARDING_NOISY_BANNER,da as SAMPLING_ONBOARDING_NOISY_DESCRIPTION,dd as SAMPLING_ONBOARDING_NOISY_PRESET_NAME,db as SAMPLING_ONBOARDING_NOISY_PRESET_SECTION,dc as SAMPLING_ONBOARDING_NOISY_PRESET_TOGGLE_LABEL,d9 as SAMPLING_ONBOARDING_NOISY_SUBTITLE,d8 as SAMPLING_ONBOARDING_NOISY_TITLE,e5 as SAMPLING_ONBOARDING_PRESET_RULES_SECTION,d6 as SAMPLING_ONBOARDING_RECOMMENDED_BADGE,dN as SAMPLING_ONBOARDING_STRATEGY_ADVANCED_BADGE,dO as SAMPLING_ONBOARDING_STRATEGY_ADVANCED_DESC,dP as SAMPLING_ONBOARDING_STRATEGY_ADVANCED_NAME,dK as SAMPLING_ONBOARDING_STRATEGY_DROP_BADGE,dI as SAMPLING_ONBOARDING_STRATEGY_DROP_BULLET_1,dJ as SAMPLING_ONBOARDING_STRATEGY_DROP_BULLET_2,dL as SAMPLING_ONBOARDING_STRATEGY_DROP_DESC,dM as SAMPLING_ONBOARDING_STRATEGY_DROP_NAME,dF as SAMPLING_ONBOARDING_STRATEGY_KEEP_BADGE,dD as SAMPLING_ONBOARDING_STRATEGY_KEEP_BULLET_1,dE as SAMPLING_ONBOARDING_STRATEGY_KEEP_BULLET_2,dG as SAMPLING_ONBOARDING_STRATEGY_KEEP_DESC,dH as SAMPLING_ONBOARDING_STRATEGY_KEEP_NAME,dC as SAMPLING_ONBOARDING_STRATEGY_KEEP_WARNING,dB as SAMPLING_ONBOARDING_STRATEGY_SUBTITLE,dA as SAMPLING_ONBOARDING_STRATEGY_TITLE,dj as SAMPLING_ONBOARDING_SUCCESS_BULLET_1,dk as SAMPLING_ONBOARDING_SUCCESS_BULLET_2,dl as SAMPLING_ONBOARDING_SUCCESS_BULLET_3,di as SAMPLING_ONBOARDING_SUCCESS_INTRO,dh as SAMPLING_ONBOARDING_SUCCESS_SUBTITLE,dg as SAMPLING_ONBOARDING_SUCCESS_TITLE,dx as SAMPLING_ONBOARDING_WELCOME_BANNER,dq as SAMPLING_ONBOARDING_WELCOME_INTRO,dr as SAMPLING_ONBOARDING_WELCOME_STAGE_1_DESC,ds as SAMPLING_ONBOARDING_WELCOME_STAGE_1_TITLE,dt as SAMPLING_ONBOARDING_WELCOME_STAGE_2_DESC,du as SAMPLING_ONBOARDING_WELCOME_STAGE_2_TITLE,dv as SAMPLING_ONBOARDING_WELCOME_STAGE_3_DESC,dw as SAMPLING_ONBOARDING_WELCOME_STAGE_3_TITLE,dp as SAMPLING_ONBOARDING_WELCOME_SUBTITLE,dn as SAMPLING_ONBOARDING_WELCOME_TITLE,eR as SAMPLING_PAGE_DESCRIPTION,eS as SAMPLING_PAGE_TITLE,a1 as SCOPE_AND_LABEL,a0 as SCOPE_GROUP_ANY_OF_HINT,K as SCOPE_GROUP_LANGUAGES_TITLE,J as SCOPE_GROUP_NAMESPACES_TITLE,G as SCOPE_GROUP_SOURCES_TITLE,aj as SECTION_DURATION,ah as SECTION_ERRORS,bN as SECTION_KEEP_PERCENTAGE,an as SECTION_OPERATION,aX as SECTION_SAMPLING_PREVIEW,a2 as SECTION_SOURCE_SCOPE,en as STORAGE_KEYS,eJ as TITLE_NO_RESULTS,eL as TITLE_NO_RULES,f$ as TOKEN_ABOUT_TO_EXPIRE,aU as TOOLTIP_NOTE,U as UNKNOWN_SOURCE_LABEL,aO as UNNAMED_RULE,eM as getNoResultsSubTitle,bV as getSupportedActionOptions,bJ as getSupportedLanguageIcon,bK as getSupportedLanguageLabel,g0 as isActionSupportedOnPlatform,g1 as isActionSupportedOnVersion,bg as mapActionTypesToOptions,bj as mapRuleTypesToOptions,bG as normalizeSupportedLanguagesForDisplay,g2 as supportsAllLanguages,bH as toScopeSupportedLanguages}from"./chunks/ui-components-
|
|
1
|
+
export{bm as ACTION_OPTIONS,fR as ALL_LANGUAGES_WILDCARD,fS as ALL_SOURCES,cJ as BTN_CANCEL,cQ as BTN_CONTINUE_EDITING,eK as BTN_CREATE_FIRST_RULE,cH as BTN_CREATE_RULE,cM as BTN_DELETE_RULE,a6 as BTN_EDIT_AUTO_RULE,cL as BTN_EDIT_RULE,c_ as BTN_SAVE,cK as BTN_SAVE_RULE,l as BUTTON_TEXTS,cN as CATEGORY_DESCRIPTIONS,aV as CATEGORY_LABELS,cP as CATEGORY_TITLES,fT as CREATE_COST_REDUCTION_AUTO_RULE_DRAWER_TITLE,fU as CREATE_HIGHLY_RELEVANT_AUTO_RULE_DRAWER_TITLE,fV as CREATE_NOISY_AUTO_RULE_DRAWER_TITLE,c2 as DEFAULT_CLUSTER_ID,c1 as DEFAULT_CLUSTER_NAME,eB as DEFAULT_DATA_STREAM_NAME,al as DESC_DURATION,fW as DESC_ERRORS,ao as DESC_OPERATION,fX as DESC_PERCENTAGE_HIGHLY_RELEVANT,bP as DESC_PERCENTAGE_NOISY,aW as DESC_RULE_TYPE,X as DESC_SOURCE_SCOPE,b_ as DESTINATION_CATEGORIES,eo as DISPLAY_LANGUAGES,m as DISPLAY_TITLES,bE as DOCS_BASE_URL,br as DestinationCategoryTypes,cW as EDIT_COST_REDUCTION_AUTO_RULE_DRAWER_SUBTITLE,cX as EDIT_COST_REDUCTION_AUTO_RULE_DRAWER_TITLE,cU as EDIT_HIGHLY_RELEVANT_AUTO_RULE_DRAWER_SUBTITLE,cV as EDIT_HIGHLY_RELEVANT_AUTO_RULE_DRAWER_TITLE,cY as EDIT_NOISY_AUTO_RULE_DRAWER_SUBTITLE,cZ as EDIT_NOISY_AUTO_RULE_DRAWER_TITLE,cO as EDIT_TITLES,aC as EMPTY_VALUE,bA as EXTRACTION_FORMAT_COPY,by as EXTRACT_ATTRIBUTE_FORM,eI as FILTER_TYPE_ALL,b7 as FORM_ALERTS,bv as INSTRUMENTATION_RULE_OPTIONS,am as LABEL_CUSTOM_DURATION,bT as LABEL_CUSTOM_PERCENTAGE,bS as LABEL_DISABLED,cG as LABEL_DISABLED_RULE,aM as LABEL_DROP_ALL,bM as LABEL_DROP_AT_MOST,bR as LABEL_ENABLED,au as LABEL_HTTP_ROUTE,aw as LABEL_HTTP_ROUTE_PREFIX,az as LABEL_KAFKA_TOPIC,aN as LABEL_KEEP_ALL,aJ as LABEL_KEEP_AT_LEAST,aK as LABEL_KEEP_AT_MOST,aI as LABEL_KEEP_PERCENTAGE,ak as LABEL_KEEP_TRACES_DURATION,ai as LABEL_KEEP_TRACES_ERRORS,ay as LABEL_METHOD,aR as LABEL_NOTE,a7 as LABEL_NO_PREVIEW,aB as LABEL_OPERATION_TYPE,fY as LABEL_RULE_DISABLED,fZ as LABEL_RULE_ENABLED,aP as LABEL_RULE_NAME,aQ as LABEL_RULE_TYPE,aL as LABEL_SAMPLE,aq as LABEL_SERVER_ADDRESS,at as LABEL_TEMPLATED_PATH,av as LABEL_TEMPLATED_PATH_PREFIX,cz as LANGUAGE_OPTIONS,aZ as MONITORS_OPTIONS,E as NOTE_ENTIRE_CLUSTER,L as NOTE_SOURCE_SCOPE_LOGIC,f_ as OPENTELEMETRY_EBPF_DISTRO_OPTION,aE as OPERATION_ALL,aD as OPERATION_HTTP_CLIENT,aA as OPERATION_HTTP_SERVER,aF as OPERATION_KAFKA_CONSUMER,aG as OPERATION_KAFKA_PRODUCER,cy as OTEL_DISTRO_NAME_OPTIONS,aH as PERCENTAGE_SECTION_DESCRIPTIONS,aT as PLACEHOLDER_NOTE,as as PLACEHOLDER_ROUTE,aS as PLACEHOLDER_RULE_NAME,_ as PLACEHOLDER_SEARCH_SOURCE,ap as PLACEHOLDER_SERVER_ADDRESS,ci as PROCESS_ATTRIBUTE_NAMES,c as REGEX_TESTER_DRAWER,bQ as SAMPLING_AUTO_RULE_TITLE,eQ as SAMPLING_BTN_CREATE_RULE,eO as SAMPLING_BTN_DOCS,eP as SAMPLING_BTN_REFRESH,bO as SAMPLING_COST_REDUCTION_AUTO_RULE_TITLE,cR as SAMPLING_DEFAULT_CONFIRM_DESCRIPTION,cT as SAMPLING_DEFAULT_CONFIRM_PREVIEW_LABEL,cS as SAMPLING_DEFAULT_CONFIRM_TITLE,eT as SAMPLING_DELETE_MODAL_APPROVE,eU as SAMPLING_DELETE_MODAL_CANCEL,eV as SAMPLING_DELETE_MODAL_DESCRIPTION,eW as SAMPLING_DELETE_MODAL_TITLE,c$ as SAMPLING_DRAWER_WIDTH,eN as SAMPLING_DUPLICATE_RULE_WARNING,bL as SAMPLING_HIGHLY_RELEVANT_AUTO_RULE_TITLE,dR as SAMPLING_ONBOARDING_ADVANCED_LEFT_BULLET_1,dS as SAMPLING_ONBOARDING_ADVANCED_LEFT_BULLET_2,dT as SAMPLING_ONBOARDING_ADVANCED_LEFT_BULLET_3,dU as SAMPLING_ONBOARDING_ADVANCED_LEFT_TITLE,dV as SAMPLING_ONBOARDING_ADVANCED_RIGHT_BULLET_1,dW as SAMPLING_ONBOARDING_ADVANCED_RIGHT_BULLET_2,dX as SAMPLING_ONBOARDING_ADVANCED_RIGHT_BULLET_3,dY as SAMPLING_ONBOARDING_ADVANCED_RIGHT_BULLET_4,dZ as SAMPLING_ONBOARDING_ADVANCED_RIGHT_BULLET_5,d_ as SAMPLING_ONBOARDING_ADVANCED_RIGHT_TITLE,e0 as SAMPLING_ONBOARDING_ADVANCED_SUBTITLE,d$ as SAMPLING_ONBOARDING_ADVANCED_TITLE,eh as SAMPLING_ONBOARDING_AMBIENT_LABEL,dm as SAMPLING_ONBOARDING_BTN_GO_TO,d7 as SAMPLING_ONBOARDING_BTN_NEXT,dQ as SAMPLING_ONBOARDING_BTN_READ_MORE,dy as SAMPLING_ONBOARDING_BTN_SKIP,dz as SAMPLING_ONBOARDING_BTN_START,e1 as SAMPLING_ONBOARDING_COMMON_BANNER,eg as SAMPLING_ONBOARDING_COMMON_RULES_SECTION,e4 as SAMPLING_ONBOARDING_DROP_DESCRIPTION,e3 as SAMPLING_ONBOARDING_DROP_SUBTITLE,e2 as SAMPLING_ONBOARDING_DROP_TITLE,e7 as SAMPLING_ONBOARDING_ERROR_PRESET_NAME,e6 as SAMPLING_ONBOARDING_ERROR_PRESET_TOGGLE_LABEL,ea as SAMPLING_ONBOARDING_KEEP_DESCRIPTION,e9 as SAMPLING_ONBOARDING_KEEP_SUBTITLE,e8 as SAMPLING_ONBOARDING_KEEP_TITLE,eb as SAMPLING_ONBOARDING_KEEP_USE_CASE_1,ec as SAMPLING_ONBOARDING_KEEP_USE_CASE_2,ed as SAMPLING_ONBOARDING_KEEP_USE_CASE_3,ee as SAMPLING_ONBOARDING_KEEP_USE_CASE_4,ef as SAMPLING_ONBOARDING_KEEP_USE_CASE_5,de as SAMPLING_ONBOARDING_NOISY_BANNER,da as SAMPLING_ONBOARDING_NOISY_DESCRIPTION,dd as SAMPLING_ONBOARDING_NOISY_PRESET_NAME,db as SAMPLING_ONBOARDING_NOISY_PRESET_SECTION,dc as SAMPLING_ONBOARDING_NOISY_PRESET_TOGGLE_LABEL,d9 as SAMPLING_ONBOARDING_NOISY_SUBTITLE,d8 as SAMPLING_ONBOARDING_NOISY_TITLE,e5 as SAMPLING_ONBOARDING_PRESET_RULES_SECTION,d6 as SAMPLING_ONBOARDING_RECOMMENDED_BADGE,dN as SAMPLING_ONBOARDING_STRATEGY_ADVANCED_BADGE,dO as SAMPLING_ONBOARDING_STRATEGY_ADVANCED_DESC,dP as SAMPLING_ONBOARDING_STRATEGY_ADVANCED_NAME,dK as SAMPLING_ONBOARDING_STRATEGY_DROP_BADGE,dI as SAMPLING_ONBOARDING_STRATEGY_DROP_BULLET_1,dJ as SAMPLING_ONBOARDING_STRATEGY_DROP_BULLET_2,dL as SAMPLING_ONBOARDING_STRATEGY_DROP_DESC,dM as SAMPLING_ONBOARDING_STRATEGY_DROP_NAME,dF as SAMPLING_ONBOARDING_STRATEGY_KEEP_BADGE,dD as SAMPLING_ONBOARDING_STRATEGY_KEEP_BULLET_1,dE as SAMPLING_ONBOARDING_STRATEGY_KEEP_BULLET_2,dG as SAMPLING_ONBOARDING_STRATEGY_KEEP_DESC,dH as SAMPLING_ONBOARDING_STRATEGY_KEEP_NAME,dC as SAMPLING_ONBOARDING_STRATEGY_KEEP_WARNING,dB as SAMPLING_ONBOARDING_STRATEGY_SUBTITLE,dA as SAMPLING_ONBOARDING_STRATEGY_TITLE,dj as SAMPLING_ONBOARDING_SUCCESS_BULLET_1,dk as SAMPLING_ONBOARDING_SUCCESS_BULLET_2,dl as SAMPLING_ONBOARDING_SUCCESS_BULLET_3,di as SAMPLING_ONBOARDING_SUCCESS_INTRO,dh as SAMPLING_ONBOARDING_SUCCESS_SUBTITLE,dg as SAMPLING_ONBOARDING_SUCCESS_TITLE,dx as SAMPLING_ONBOARDING_WELCOME_BANNER,dq as SAMPLING_ONBOARDING_WELCOME_INTRO,dr as SAMPLING_ONBOARDING_WELCOME_STAGE_1_DESC,ds as SAMPLING_ONBOARDING_WELCOME_STAGE_1_TITLE,dt as SAMPLING_ONBOARDING_WELCOME_STAGE_2_DESC,du as SAMPLING_ONBOARDING_WELCOME_STAGE_2_TITLE,dv as SAMPLING_ONBOARDING_WELCOME_STAGE_3_DESC,dw as SAMPLING_ONBOARDING_WELCOME_STAGE_3_TITLE,dp as SAMPLING_ONBOARDING_WELCOME_SUBTITLE,dn as SAMPLING_ONBOARDING_WELCOME_TITLE,eR as SAMPLING_PAGE_DESCRIPTION,eS as SAMPLING_PAGE_TITLE,a1 as SCOPE_AND_LABEL,a0 as SCOPE_GROUP_ANY_OF_HINT,K as SCOPE_GROUP_LANGUAGES_TITLE,J as SCOPE_GROUP_NAMESPACES_TITLE,G as SCOPE_GROUP_SOURCES_TITLE,aj as SECTION_DURATION,ah as SECTION_ERRORS,bN as SECTION_KEEP_PERCENTAGE,an as SECTION_OPERATION,aX as SECTION_SAMPLING_PREVIEW,a2 as SECTION_SOURCE_SCOPE,en as STORAGE_KEYS,eJ as TITLE_NO_RESULTS,eL as TITLE_NO_RULES,f$ as TOKEN_ABOUT_TO_EXPIRE,aU as TOOLTIP_NOTE,U as UNKNOWN_SOURCE_LABEL,aO as UNNAMED_RULE,eM as getNoResultsSubTitle,bV as getSupportedActionOptions,bJ as getSupportedLanguageIcon,bK as getSupportedLanguageLabel,g0 as isActionSupportedOnPlatform,g1 as isActionSupportedOnVersion,bg as mapActionTypesToOptions,bj as mapRuleTypesToOptions,bG as normalizeSupportedLanguagesForDisplay,g2 as supportsAllLanguages,bH as toScopeSupportedLanguages}from"./chunks/ui-components-Cz2E0SIN.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"react-dom";import"prism-react-renderer";import"zustand/middleware";import"react-error-boundary";import"virtua";
|
package/lib/containers.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import o,{useEffect as i,useState as a,Fragment as l,forwardRef as r,useImperativeHandle as s,useMemo as c,useCallback as d,useRef as p,Children as u,createContext as h,useContext as m,useLayoutEffect as g,memo as f}from"react";import b,{useTheme as v,css as y,keyframes as C}from"styled-components";import{u as S,n as x,C as w,g as T,f as k,e as I,q as N,h as E,j as O,k as $,p as A,l as R,c as D,r as _,S as P,s as L,R as F,t as M,w as z,o as B,x as X,y as U,z as V,A as H,B as j,D as G,E as W,F as K,G as Y,H as J,I as q,J as Z}from"./chunks/helpers-
|
|
1
|
+
import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import o,{useEffect as i,useState as a,Fragment as l,forwardRef as r,useImperativeHandle as s,useMemo as c,useCallback as d,useRef as p,Children as u,createContext as h,useContext as m,useLayoutEffect as g,memo as f}from"react";import b,{useTheme as v,css as y,keyframes as C}from"styled-components";import{u as S,n as x,C as w,g as T,f as k,e as I,q as N,h as E,j as O,k as $,p as A,l as R,c as D,r as _,S as P,s as L,R as F,t as M,w as z,o as B,x as X,y as U,z as V,A as H,B as j,D as G,E as W,F as K,G as Y,H as J,I as q,J as Z}from"./chunks/helpers-BjINTDe1.js";import{bn as Q,F as ee,d as te,C as ne,k as oe,I as ie,bx as ae,o as le,p as re,w as se,Y as ce,by as de,h as pe,bz as ue,ar as he,bA as me,bB as ge,B as fe,i as be,j as ve,x as ye,a4 as Ce,bo as Se,b0 as xe,bC as we,g as Te,bD as ke,u as Ie,N as Ne,S as Ee,bE as Oe,bt as $e,bu as Ae,bs as Re,bF as De,e as _e,f as Pe,af as Le,T as Fe,ad as Me,ae as ze,ab as Be,aa as Xe,ac as Ue,a9 as Ve,b7 as He,a8 as je,bG as Ge,bH as We,bI as Ke,bJ as Ye,bK as Je,W as qe,m as Ze,bb as Qe,bL as et,bM as tt,bN as nt,bO as ot,bP as it,bQ as at,bR as lt,bS as rt,Q as st,bT as ct,bU as dt,bV as pt,bW as ut,bX as ht,a$ as mt,br as gt,s as ft,bY as bt,bZ as vt,b1 as yt,b_ as Ct,b$ as St,aY as xt,v as wt,bv as Tt,ba as kt,b as It,q as Nt,c0 as Et,bc as Ot,c1 as $t,c2 as At,be as Rt,c3 as Dt,b3 as _t,c4 as Pt,l as Lt,y as Ft,D as Mt,c5 as zt,n as Bt,bh as Xt,bm as Ut,z as Vt,c6 as Ht,c7 as jt,bl as Gt,c8 as Wt,a3 as Kt,c9 as Yt,ca as Jt,b6 as qt,H as Zt,cb as Qt,cc as en,cd as tn,ce as nn,ag as on,cf as an,cg as ln,ch as rn,ci as sn,cj as cn,O as dn,ck as pn,cl as un,A as hn,b2 as mn,a_ as gn,cm as fn,cn as bn,co as vn,cp as yn,cq as Cn,cr as Sn,bw as xn,cs as wn,ct as Tn,cu as kn,cv as In,cw as Nn,cx as En,cy as On,cz as $n,cA as An,cB as Rn,M as Dn,cC as _n,cD as Pn,cE as Ln,cF as Fn,cG as Mn,cH as zn,cI as Bn,cJ as Xn,cK as Un,cL as Vn,cM as Hn,cN as jn,cO as Gn,aO as Wn,cP as Kn,cQ as Yn,cR as Jn,cS as qn,cT as Zn,cU as Qn,cV as eo,cW as to,cX as no,cY as oo,cZ as io,c_ as ao,c$ as lo,d0 as ro,d1 as so,ax as co,d2 as po,d3 as uo,b4 as ho,d4 as mo,d5 as go,d6 as fo,d7 as bo,d8 as vo,d9 as yo,da as Co,db as So,dc as xo,dd as wo,de as To,df as ko,dg as Io,dh as No,di as Eo,dj as Oo,dk as $o,dl as Ao,dm as Ro,dn as Do,dp as _o,dq as Po,dr as Lo,ds as Fo,dt as Mo,du as zo,dv as Bo,dw as Xo,dx as Uo,dy as Vo,dz as Ho,dA as jo,dB as Go,dC as Wo,dD as Ko,dE as Yo,dF as Jo,dG as qo,dH as Zo,dI as Qo,dJ as ei,dK as ti,dL as ni,dM as oi,dN as ii,dO as ai,dP as li,dQ as ri,dR as si,dS as ci,dT as di,dU as pi,dV as ui,dW as hi,dX as mi,dY as gi,dZ as fi,d_ as bi,d$ as vi,e0 as yi,e1 as Ci,e2 as Si,e3 as xi,e4 as wi,e5 as Ti,e6 as ki,e7 as Ii,e8 as Ni,e9 as Ei,ea as Oi,eb as $i,ec as Ai,ed as Ri,ee as Di,ef as _i,eg as Pi,eh as Li,P as Fi,ei as Mi,ej as zi,ek as Bi,el as Xi,em as Ui,en as Vi,eo as Hi,aZ as ji,ep as Gi,$ as Wi,eq as Ki,er as Yi,es as Ji,et as qi,eu as Zi,ev as Qi,ew as ea,ex as ta,ey as na,ez as oa,eA as ia,bd as aa,eB as la,R as ra,a as sa,eC as ca,eD as da,eE as pa,eF as ua,eG as ha,eH as ma,eI as ga,eJ as fa,eK as ba,eL as va,eM as ya,eN as Ca,eO as Sa,eP as xa,eQ as wa,eR as Ta,eS as ka,eT as Ia,eU as Na,eV as Ea,eW as Oa,eX as $a}from"./chunks/ui-components-Cz2E0SIN.js";import{TrashIcon as Aa,PlusIcon as Ra,ArrowRightIcon as Da,VSquareIcon as _a,XSquareIcon as Pa,BookIcon as La,DeleteIcon as Fa,EditIcon as Ma,GoLogo as za,JavaLogo as Ba,PhpLogo as Xa,ChevronRightIcon as Ua,ActionIcon as Va,DestinationIcon as Ha,ChevronUpIcon as ja,ChevronDownIcon as Ga,VIcon as Wa,XIcon as Ka,InstrumentationRuleIcon as Ya,SourceIcon as Ja,NamespacesIcon as qa,AzureIcon as Za,GoogleCloudPlatformLogo as Qa,AwsLogo as el,CloudConnectorIcon as tl,EyeOpenIcon as nl,CloudConnectorPolicyIcon as ol,ArrowLeftIcon as il,ISquareIcon as al,RefreshIcon as ll,SettingsIcon as rl,PodIcon as sl,OdigosLogo as cl,K8sLogo as dl,ExclamationCircleIcon as pl,QuestionCircleIcon as ul,InboundIcon as hl,OutboundIcon as ml,UserIcon as gl,TerminalIcon as fl,RefreshLeftArrowIcon as bl,MinusIcon as vl,SearchIcon as yl,ExpandIcon as Cl,CopyIcon as Sl,DotIcon as xl,ArrowDownIcon as wl,DownloadIcon as Tl,VmLogo as kl,SamplingIcon as Il,ExclamationTriangleIcon as Nl,KeyIcon as El,DiagnoseIcon as Ol,StarIcon as $l,ArrowIcon as Al,ConnectionsIcon as Rl,FilterIcon as Dl,DataStreamIcon as _l,PipelineCollectorIcon as Pl,ArrowDownSquareIcon as Ll,ArrowUpSquareIcon as Fl,GatewayIcon as Ml,YamlIcon as zl,ImageErrorIcon as Bl,LockIcon as Xl}from"./icons.js";import{h as Ul,o as Vl,n as Hl,q as jl,m as Gl,t as Wl,s as Kl,S as Yl,w as Jl,E as ql,x as Zl,y as Ql,v as er,l as tr,d as nr,O as or,f as ir,b as ar,A as lr,R as rr,C as sr,e as cr,D as dr}from"./chunks/source-instrument-form-context-DqNzAFUO.js";import{n as pr,f as ur,k as hr,I as mr,l as gr,A as fr,i as br,P as vr,S as yr,R as Cr,g as Sr,j as xr,c as wr,h as Tr,m as kr,W as Ir,C as Nr,b as Er,Y as Or,O as $r,a as Ar,U as Rr,e as Dr}from"./chunks/index-D2_SqNhv.js";import{createPortal as _r}from"react-dom";import{MarkerType as Pr,useNodesState as Lr,useEdgesState as Fr,Handle as Mr,Position as zr,getSmoothStepPath as Br,BaseEdge as Xr,EdgeLabelRenderer as Ur,ReactFlowProvider as Vr,ReactFlow as Hr,Background as jr,Controls as Gr,ControlButton as Wr,useReactFlow as Kr}from"@xyflow/react";import Yr from"elkjs/lib/elk.bundled.js";import"@xyflow/react/dist/style.css";import"zustand";import"javascript-time-ago";import"javascript-time-ago/locale/en";import"prism-react-renderer";import"zustand/middleware";import"react-error-boundary";import"virtua";import"@apollo/client/react";import"@apollo/client/link/error";import"@apollo/client/link/context";import"@apollo/client/utilities";import"@apollo/client/errors";import"@apollo/client";const Jr=[{id:"CREDIT_CARD",label:"Credit card"}],qr=[{id:Q.CollectContainerAttributes,label:"Collect container attributes"},{id:Q.CollectReplicaSetAttributes,label:"Collect ReplicaSet attributes"},{id:Q.CollectWorkloadId,label:"Collect workload ID"},{id:Q.CollectClusterId,label:"Collect cluster ID"}],Zr=[{id:ae.Pod,label:ae.Pod},{id:ae.Namespace,label:ae.Namespace},{id:ae.Node,label:ae.Node}],Qr=[{label:"Label key",keyName:"labelKey",placeholder:"app.kubernetes.io/name"},{label:"Attribute key",keyName:"attributeKey",placeholder:"app.kubernetes.name"},{label:"From sources",keyName:"fromSources",placeholder:"pod, namespace",tooltip:"Select multiple sources. Higher precedence sources (pod > namespace > node) will override lower ones.",componentType:"multi-dropdown",options:Zr}],es=[{label:"Annotation key",keyName:"annotationKey",placeholder:"kubectl.kubernetes.io/restartedAt"},{label:"Attribute key",keyName:"attributeKey",placeholder:"kubectl.kubernetes.restartedAt"},{label:"From sources",keyName:"fromSources",placeholder:"pod, namespace",tooltip:"Select multiple sources. Higher precedence sources (pod > namespace > node) will override lower ones.",componentType:"multi-dropdown",options:Zr}],ts=Q.ExtractAttribute;var ns;(e=>{e.Preset="preset",e.Regex="regex"})(ns||(ns={}));const os=[ue.JSON,ue.SQL,ue.ResourcePath],is=(e=ue.JSON)=>({targetAttributeName:"",lookupKey:"",dataFormat:e,regex:""}),as=e=>!!e.regex&&!e.lookupKey&&!e.dataFormat,ls=b.div`
|
|
2
2
|
width: 100%;
|
|
3
3
|
background: ${({theme:e})=>e.v2.colors.silver[800]};
|
|
4
4
|
border-radius: 8px;
|
|
@@ -23,7 +23,7 @@ import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import o,{useEff
|
|
|
23
23
|
background-color: ${({theme:e})=>e.v2.colors.black[500]};
|
|
24
24
|
box-shadow: 0 4px 16.7px 0 rgba(0, 0, 0, 0.83);
|
|
25
25
|
z-index: 1;
|
|
26
|
-
`,bs=r(({isEdit:n},o)=>{const l=v(),{isVm:r}=S(),{destinationsApi:c}=Vl(),{activeForm:d,genericForm:p,validateFormData:u,thisUnsavedDestination:h,addUnsavedDestination:m,updateUnsavedDestination:g,deleteUnsavedDestination:f}=Hl(),[b,y]=a(h?.testResult),[C,x]=a(!!h);i(()=>{h?(y(h.testResult),x(!0)):(y(void 0),x(!1))},[h]);const w=async()=>{if(!d?.option.testConnectionSupported||!p||r)return;const e=await c.testConnection(De(p.formData));return y(e),e};return s(o,()=>({testConnection:w,testConnectionSupported:!!d?.option.testConnectionSupported}),[d?.option.testConnectionSupported,p,c]),p&&d?e(ee,{$gap:24,style:{minHeight:"100%"},children:[e(pe,{$gap:12,$justifyContent:"space-between",children:[b?b.succeeded?t(Ne,{status:Ee.Success,message:b.message||"Connection OK",fullWidth:!0,smallIcon:!0}):t(Ne,{status:Ee.Error,message:b.message||"Connection Failed",fullWidth:!0,smallIcon:!0}):t("div",{}),e(pe,{$gap:12,children:[!r&&t(ce,{options:[{icon:_a,label:"Enabled",value:!1,selectedBgColor:l.v2.colors.green[800]},{icon:Pa,label:"Disabled",value:!0,selectedBgColor:l.v2.colors.red[800]}],size:ke.S,selected:p.formData.disabled,setSelected:e=>p.handleFormChange("disabled",e),disabled:C}),t(fe,{"data-id":"dest-form-docs",leftIcon:La,variant:ve.Secondary,size:be.S,onClick:()=>window.open(`${Oe}/backends/${d.option.type}`,"_blank","noopener noreferrer")})]})]}),t(hr,{title:"This connection will monitor:",allowedSignals:Re(d.option.supportedSignals),selectedSignals:Ae(p.formData.exportedSignals),setSelectedSignals:e=>p.handleFormChange("exportedSignals",{logs:e.includes($e.Logs),metrics:e.includes($e.Metrics),traces:e.includes($e.Traces),profiles:e.includes($e.Profiles)}),disabled:C,errorMessage:p.formErrors.exportedSignals}),t(ye,{name:"destinationName",label:"Destination name",placeholder:"Use a name that describes the destination...",value:p.formData.name,onChange:({target:{value:e}})=>p.handleFormChange("name",e),disabled:C,errorMessage:p.formErrors.name}),t(ur,{signals:Ae(p.formData.exportedSignals),fields:d.option.fields,disabled:C,value:Object.fromEntries(p.formData.fields.map(e=>[e.key,e.value])),setValue:(e,t)=>{const n=p.formData.fields.some(t=>t.key===e);p.handleFormChange("fields",n?p.formData.fields.map(n=>n.key===e?{...n,value:t}:n):[...p.formData.fields,{key:e,value:t}]),e&&p.formErrors[e]&&p.handleErrorChange(e,void 0)},formErrors:p.formErrors,keyValuePersistAs:"array"}),!n&&e(fs,{$gap:8,$justifyContent:"center",children:[h&&t("div",{style:{width:"150px"},children:t(fe,{"data-id":"dest-form-delete",fullWidth:!0,label:"Delete",rightIcon:Fa,variant:ve.Secondary,textColor:l.v2.colors.red[500],onClick:()=>f(d.unsavedIdx)})}),!r&&(!h||h.option.testConnectionSupported&&!C)&&t("div",{style:{width:"150px"},children:t(fe,{"data-id":"dest-form-test-connection",fullWidth:!0,label:"Test Connection",variant:ve.Secondary,onClick:w})}),h&&t("div",C?{style:{width:"150px"},children:t(fe,{"data-id":"dest-form-edit",fullWidth:!0,label:"Edit",rightIcon:Ma,variant:ve.Secondary,onClick:()=>x(!1)})}:{style:{width:"150px"},children:t(fe,{"data-id":"dest-form-save",fullWidth:!0,label:"Save Changes",variant:ve.Primary,onClick:async()=>{const{errorMessage:e,preparedFormData:t}=u();if(!e){const e=await w(),n=!!e&&!e.succeeded;g(d.unsavedIdx,{formData:t,testResult:e},n)}}})}),!h&&t("div",{style:{width:"150px"},children:t(fe,{"data-id":"dest-form-add",fullWidth:!0,label:"Add Destination",variant:ve.Primary,onClick:async()=>{const{errorMessage:e,preparedFormData:t}=u();if(!e){const e=await w(),n=!!e&&!e.succeeded;m({formData:t,testResult:e},n)}}})})]})]}):t(xe,{title:"No active form"})});bs.displayName="AddDestinationForm";const vs=[{id:Le.FilePath,label:"Collect file path",tooltip:"Indicates whether to record the `code.filepath` attribute."},{id:Le.Function,label:"Collect function",tooltip:"Indicates whether to record the `code.function` attribute."},{id:Le.LineNumber,label:"Collect line number",tooltip:"Indicates whether to record the `code.lineno` attribute."}],ys=[{id:Le.Column,label:"Collect column",tooltip:"Indicates whether to record the `code.column` attribute."},{id:Le.Namespace,label:"Collect namespace",tooltip:"Indicates whether to record the `code.namespace` attribute."},{id:Le.StackTrace,label:"Collect stacktrace",tooltip:"Indicates whether to record the `code.stacktrace` attribute."}],Cs=["*"],Ss=[{id:ze.HttpRequest,label:"Collect HTTP request",tooltip:""},{id:ze.HttpResponse,label:"Collect HTTP response",tooltip:""},{id:ze.DbQuery,label:"Collect DB query",tooltip:""},{id:ze.Messaging,label:"Collect messaging",tooltip:""}],xs={[Ve.Java]:[new Xe("","")],[Ve.Golang]:[new Be("")],[Ve.Php]:[new Ue("","")]},ws={[je.CodeAttributes]:({value:o,setValue:a,formErrors:l})=>{const r=l.codeAttributes,s=c(()=>Object.entries(o.codeAttributes||{}).filter(([e,t])=>!!t).map(([e])=>e),[o]);i(()=>{if(!s.length&&!r){const e={[Le.FilePath]:!0,[Le.Function]:!0,[Le.LineNumber]:!0,[Le.Column]:null,[Le.Namespace]:null,[Le.StackTrace]:null};a("codeAttributes",e)}},[]);const d=(e,t)=>{const n=t?[...s,e]:s.filter(t=>t!==e),o=Object.values(Le).reduce((e,t)=>(e[t]=!!n.includes(t)||null,e),{});a("codeAttributes",o)};return e(n,{children:[e(ee,{$gap:12,children:[t(_e,{size:Te.XS,color:Pe.Secondary,nowrap:!0,children:"Recommended data to collect"}),t(ee,{$gap:6,children:vs.map(({id:e,label:n,tooltip:o})=>t(Fe,{text:o,withIcon:!0,children:t(ne,{label:n,value:s.includes(e),onChange:t=>d(e,t)})},e))}),t(oe,{errorMessage:r})]}),e(ee,{$gap:12,children:[t(_e,{size:Te.XS,color:Pe.Secondary,nowrap:!0,children:"Verbose data to collect"}),t(ee,{$gap:6,children:ys.map(({id:e,label:n,tooltip:o})=>t(Fe,{text:o,withIcon:!0,children:t(ne,{label:n,value:s.includes(e),onChange:t=>d(e,t)})},e))}),t(oe,{errorMessage:r})]})]})},[je.CustomInstrumentation]:({value:o,setValue:a,formErrors:l})=>{const r=l.customInstrumentations,s=c(()=>(o?.customInstrumentations?.[Ve.Golang]||[]).map(e=>new Be(e.packageName,e.functionName,e.receiverName,e.receiverMethodName)),[o]),d=c(()=>(o?.customInstrumentations?.[Ve.Java]||[]).map(e=>new Xe(e.className,e.methodName)),[o]),p=c(()=>(o?.customInstrumentations?.[Ve.Php]||[]).map(e=>new Ue(e.className,e.functionName)),[o]);return i(()=>{o?.customInstrumentations||r||a("customInstrumentations",{[Ve.Golang]:xs[Ve.Golang],[Ve.Java]:xs[Ve.Java],[Ve.Php]:xs[Ve.Php]})},[]),e(n,{children:[e(ee,{children:[e(pe,{$gap:8,children:[t(za,{}),t(te,{label:"Golang custom probes"})]}),t(ie,{name:"golangProbes",columns:[{keyName:"packageName",label:"Package name",placeholder:"e.g. github.com/my-org/my-package",tooltip:"The full import path of the package containing the function or method to be instrumented."},{keyName:"functionName",label:"Function name",placeholder:"e.g. myFunction",tooltip:"The name of the function to be instrumented. Leave empty if instrumenting a receiver method."},{keyName:"receiverName",label:"Receiver name",placeholder:"e.g. myReceiver",tooltip:"The name of the receiver type if instrumenting a method. Leave empty if instrumenting a standalone function."},{keyName:"receiverMethodName",label:"Receiver method name",placeholder:"e.g. myMethod",tooltip:"The name of the method to be instrumented. Leave empty if instrumenting a standalone function."}],values:s,setValues:e=>{const t={};t[Ve.Golang]=e.map(e=>new Be(e.packageName,e.functionName,e.receiverName,e.receiverMethodName)),t[Ve.Java]=d,t[Ve.Php]=p,a("customInstrumentations",t)},errorMessage:r,limitFieldsPerRow:2})]}),e(ee,{children:[e(pe,{$gap:8,children:[t(Ba,{}),t(te,{label:"Java custom probes"})]}),t(ie,{name:"javaProbes",columns:[{keyName:"className",label:"Class name",placeholder:"e.g. com.example.MyClass",tooltip:"The name of the class to be instrumented."},{keyName:"methodName",label:"Method name",placeholder:"e.g. myMethod",tooltip:"The name of the method to be instrumented."}],values:d,setValues:e=>{const t={};t[Ve.Golang]=s,t[Ve.Java]=e.map(e=>new Xe(e.className,e.methodName)),t[Ve.Php]=p,a("customInstrumentations",t)},errorMessage:r,limitFieldsPerRow:2})]}),e(ee,{children:[e(pe,{$gap:8,children:[t(Xa,{}),t(te,{label:"PHP custom probes"})]}),t(Ne,{status:Ee.Warning,message:He.PHP_CUSTOM_INSTRUMENTATION_RESTART,fullWidth:!0}),t(ie,{name:"phpProbes",columns:[{keyName:"className",label:"Class name",placeholder:"e.g. App\\Service\\OrderService",tooltip:"The fully qualified class name to instrument. Leave empty for a global function."},{keyName:"functionName",label:"Function name",placeholder:"e.g. processOrder",tooltip:"The name of the function or method to instrument."}],values:p,setValues:e=>{const t={};t[Ve.Golang]=s,t[Ve.Java]=d,t[Ve.Php]=e.map(e=>new Ue(e.className,e.functionName)),a("customInstrumentations",t)},errorMessage:r,limitFieldsPerRow:2})]})]})},[je.HeadersCollection]:({value:e,setValue:n,formErrors:o})=>{const a=o.headersCollection,l=c(()=>e?.headersCollection?.[Me.HeaderKeys]||[],[e]),r=e=>{const t={[Me.HeaderKeys]:e};n("headersCollection",t)};return i(()=>{l.length||a||r(Cs)},[]),t(se,{name:"headerKeys",label:"Header keys",tooltip:"Specify which headers you want to collect",helpMessage:"Asterisk (*) will collect all headers",values:l,setValues:r,errorMessage:a})},[je.PayloadCollection]:({value:n,setValue:o,formErrors:a})=>{const l=a.payloadCollection,r=c(()=>Object.entries(n.payloadCollection||{}).filter(([e,t])=>!!t).map(([e])=>e),[n]);return i(()=>{if(!r.length&&!l){const e={[ze.HttpRequest]:{},[ze.HttpResponse]:{},[ze.DbQuery]:{},[ze.Messaging]:{}};o("payloadCollection",e)}},[]),e(ee,{$gap:12,children:[t(_e,{size:Te.XS,color:Pe.Secondary,nowrap:!0,children:"Type of data to collect"}),t(ee,{$gap:6,children:Ss.map(({id:e,label:n,tooltip:i})=>t(Fe,{text:i,withIcon:!0,children:t(ne,{label:n,value:r.includes(e),onChange:t=>((e,t)=>{const n=t?[...r,e]:r.filter(t=>t!==e),i={[ze.HttpRequest]:n.includes(ze.HttpRequest)?{}:null,[ze.HttpResponse]:n.includes(ze.HttpResponse)?{}:null,[ze.DbQuery]:n.includes(ze.DbQuery)?{}:null,[ze.Messaging]:n.includes(ze.Messaging)?{}:null};o("payloadCollection",i)})(e,t)})},e))}),t(oe,{errorMessage:l})]})},[je.UnknownType]:null},Ts=({ruleType:e,value:n,setValue:o,formErrors:i,dynamicFields:a})=>{if(!e)return null;if(a?.length)return t(ur,{fields:a,value:n||{},setValue:o,formErrors:i||{},signals:[],seedInitialValues:!0,keyValuePersistAs:"map"},e);const l=ws[e];return l?t(l,{value:n,setValue:o,formErrors:i}):null},ks=()=>{const n=v(),{isVm:o}=S(),{selectedOption:i,genericForm:a,sourceOptions:l,namespaceOptions:r}=jl(),s=c(()=>Ge(i?.supportedLanguages),[i?.supportedLanguages]),d=c(()=>{if(i)return i.type===je.CustomInstrumentation?[]:We(i.supportedLanguages)},[i]);if(!a||!i)return t(xe,{title:"No active form"});const{formData:p,handleFormChange:u,formErrors:h}=a;return e(ee,{$gap:24,children:[e(pe,{$gap:12,$justifyContent:"space-between",children:[t(we,{size:Te.XXXS,maxLines:2,children:i.description}),e(pe,{$gap:12,children:[t(ce,{options:[{icon:_a,label:"Enabled",value:!1,selectedBgColor:n.v2.colors.green[800]},{icon:Pa,label:"Disabled",value:!0,selectedBgColor:n.v2.colors.red[800]}],size:ke.S,selected:p.disabled,setSelected:e=>u("disabled",e)}),t(fe,{leftIcon:La,variant:ve.Secondary,size:be.S,onClick:()=>i.docsUrl&&window.open(i.docsUrl,"_blank","noopener noreferrer")})]})]}),t(mr,{option:i,formState:p}),!!s.length&&e(pe,{$gap:12,children:[t(_e,{size:Te.XS,color:Pe.Secondary,nowrap:!0,children:"Supported Languages:"}),s.map(e=>t(Ke,{label:Je(e),leftIcon:Ye(e),backgroundColor:n.v2.colors.purple[900]},e))]}),!o&&t(gr,{scopes:p.sourceScopes,onChange:e=>u("sourceScopes",e),sourceOptions:l,namespaceOptions:r,supportedLanguages:d,dataIdPrefix:"instrumentation-rule",slim:!0}),t(ye,{name:"ruleName",label:"Rule name",placeholder:"Use a name that describes the rule...",value:p.ruleName,onChange:({target:{value:e}})=>u("ruleName",e),errorMessage:h.ruleName}),t(Ts,{ruleType:i.type,dynamicFields:i.fields,value:p,setValue:(e,t)=>u(e,t),formErrors:h}),t(Ie,{name:"notes",label:"Notes",placeholder:"Your personal notes...",value:p.notes,onChange:({target:{value:e}})=>u("notes",e),errorMessage:h.notes})]})},Is=()=>{const{pendingMerge:e,confirmMerge:n,cancelMerge:o}=Gl();if(!e)return null;const{existingName:i,editingName:a}=e;return t(qe,{isOpen:!0,onClose:o,title:"Merge with existing Data Stream?",description:Ze.DATA_STREAM_MERGE_WARNING(a,i),approveButton:{"data-id":"data-stream-merge-confirm",label:"Merge",variant:ve.Primary,onClick:n},denyButton:{"data-id":"data-stream-merge-cancel",label:"Cancel",variant:ve.Secondary,onClick:o}})},Ns=({autoFocus:n})=>{const{dataStreams:o}=Qe(),{genericForm:i,excludeName:a,editingName:l}=Gl(),{formData:r,formErrors:s,handleFormChange:d}=i,p=r.name,u=c(()=>o.find(e=>e.name===p&&e.name!==a),[o,p,a]);return e(ee,{$width:"100%",$gap:12,children:[t(ye,{name:"data-stream-name",label:Ze.STREAM_NAME,placeholder:Ze.NAME_YOUR_STREAM_PLACEHOLDER,tooltip:Ze.STREAM_DESCRIPTION,required:!0,autoFocus:n,value:p,onChange:e=>d("name",e.target.value),errorMessage:s.name}),u&&t(Ne,{status:Ee.Warning,message:Ze.DATA_STREAM_MERGE_WARNING(l,u.name),fullWidth:!0})]})},Es=()=>{const{selectedStreamName:e}=Qe(),{genericForm:n}=Wl();if(!n)return t(xe,{title:"No active form"});const{formData:o,handleFormChange:i,formErrors:a}=n;return t(ye,{name:"sourceName",label:Ze.NAME,tooltip:"This overrides the default service name (service.name) reported in your telemetry.",placeholder:"Use a name that overrides the source name",value:o.otelServiceName,onChange:({target:{value:t}})=>{i("otelServiceName",t),i("currentStreamName",e)},errorMessage:a.otelServiceName})},Os=[{value:"all",label:"Drop All"},{value:"sample",label:"Sample"}],$s=b.div`
|
|
26
|
+
`,bs=r(({isEdit:n},o)=>{const l=v(),{isVm:r}=S(),{destinationsApi:c}=Vl(),{activeForm:d,genericForm:p,validateFormData:u,thisUnsavedDestination:h,addUnsavedDestination:m,updateUnsavedDestination:g,deleteUnsavedDestination:f}=Hl(),[b,y]=a(h?.testResult),[C,x]=a(!!h);i(()=>{h?(y(h.testResult),x(!0)):(y(void 0),x(!1))},[h]);const w=async()=>{if(!d?.option.testConnectionSupported||!p||r)return;const e=await c.testConnection(De(p.formData));return y(e),e};return s(o,()=>({testConnection:w,testConnectionSupported:!!d?.option.testConnectionSupported}),[d?.option.testConnectionSupported,p,c]),p&&d?e(ee,{$gap:24,style:{minHeight:"100%"},children:[e(pe,{$gap:12,$justifyContent:"space-between",children:[b?b.succeeded?t(Ne,{status:Ee.Success,message:b.message||"Connection OK",fullWidth:!0,smallIcon:!0}):t(Ne,{status:Ee.Error,message:b.message||"Connection Failed",fullWidth:!0,smallIcon:!0}):t("div",{}),e(pe,{$gap:12,children:[!r&&t(ce,{options:[{icon:_a,label:"Enabled",value:!1,selectedBgColor:l.v2.colors.green[800]},{icon:Pa,label:"Disabled",value:!0,selectedBgColor:l.v2.colors.red[800]}],size:ke.S,selected:p.formData.disabled,setSelected:e=>p.handleFormChange("disabled",e),disabled:C}),t(fe,{"data-id":"dest-form-docs",leftIcon:La,variant:ve.Secondary,size:be.S,onClick:()=>window.open(`${Oe}/backends/${d.option.type}`,"_blank","noopener noreferrer")})]})]}),t(hr,{title:"This connection will monitor:",allowedSignals:Re(d.option.supportedSignals),selectedSignals:Ae(p.formData.exportedSignals),setSelectedSignals:e=>p.handleFormChange("exportedSignals",{logs:e.includes($e.Logs),metrics:e.includes($e.Metrics),traces:e.includes($e.Traces),profiles:e.includes($e.Profiles)}),disabled:C,errorMessage:p.formErrors.exportedSignals}),t(ye,{name:"destinationName",label:"Destination name",placeholder:"Use a name that describes the destination...",value:p.formData.name,onChange:({target:{value:e}})=>p.handleFormChange("name",e),disabled:C,errorMessage:p.formErrors.name}),t(ur,{signals:Ae(p.formData.exportedSignals),fields:d.option.fields,disabled:C,value:Object.fromEntries(p.formData.fields.map(e=>[e.key,e.value])),setValue:(e,t)=>{const n=p.formData.fields.some(t=>t.key===e);p.handleFormChange("fields",n?p.formData.fields.map(n=>n.key===e?{...n,value:t}:n):[...p.formData.fields,{key:e,value:t}]),e&&p.formErrors[e]&&p.handleErrorChange(e,void 0)},formErrors:p.formErrors,keyValuePersistAs:"array"}),!n&&e(fs,{$gap:8,$justifyContent:"center",children:[h&&t("div",{style:{width:"150px"},children:t(fe,{"data-id":"dest-form-delete",fullWidth:!0,label:"Delete",rightIcon:Fa,variant:ve.Secondary,textColor:l.v2.colors.red[500],onClick:()=>f(d.unsavedIdx)})}),!r&&(!h||h.option.testConnectionSupported&&!C)&&t("div",{style:{width:"150px"},children:t(fe,{"data-id":"dest-form-test-connection",fullWidth:!0,label:"Test Connection",variant:ve.Secondary,onClick:w})}),h&&t("div",C?{style:{width:"150px"},children:t(fe,{"data-id":"dest-form-edit",fullWidth:!0,label:"Edit",rightIcon:Ma,variant:ve.Secondary,onClick:()=>x(!1)})}:{style:{width:"150px"},children:t(fe,{"data-id":"dest-form-save",fullWidth:!0,label:"Save Changes",variant:ve.Primary,onClick:async()=>{const{errorMessage:e,preparedFormData:t}=u();if(!e){const e=await w(),n=!!e&&!e.succeeded;g(d.unsavedIdx,{formData:t,testResult:e},n)}}})}),!h&&t("div",{style:{width:"150px"},children:t(fe,{"data-id":"dest-form-add",fullWidth:!0,label:"Add Destination",variant:ve.Primary,onClick:async()=>{const{errorMessage:e,preparedFormData:t}=u();if(!e){const e=await w(),n=!!e&&!e.succeeded;m({formData:t,testResult:e},n)}}})})]})]}):t(xe,{title:"No active form"})});bs.displayName="AddDestinationForm";const vs=[{id:Le.FilePath,label:"Collect file path",tooltip:"Indicates whether to record the `code.filepath` attribute."},{id:Le.Function,label:"Collect function",tooltip:"Indicates whether to record the `code.function` attribute."},{id:Le.LineNumber,label:"Collect line number",tooltip:"Indicates whether to record the `code.lineno` attribute."}],ys=[{id:Le.Column,label:"Collect column",tooltip:"Indicates whether to record the `code.column` attribute."},{id:Le.Namespace,label:"Collect namespace",tooltip:"Indicates whether to record the `code.namespace` attribute."},{id:Le.StackTrace,label:"Collect stacktrace",tooltip:"Indicates whether to record the `code.stacktrace` attribute."}],Cs=["*"],Ss=[{id:ze.HttpRequest,label:"Collect HTTP request",tooltip:""},{id:ze.HttpResponse,label:"Collect HTTP response",tooltip:""},{id:ze.DbQuery,label:"Collect DB query",tooltip:""},{id:ze.Messaging,label:"Collect messaging",tooltip:""}],xs={[Ve.Java]:[new Xe("","")],[Ve.Golang]:[new Be("")],[Ve.Php]:[new Ue("","")]},ws={[je.CodeAttributes]:({value:o,setValue:a,formErrors:l,disabled:r})=>{const s=l.codeAttributes,d=c(()=>Object.entries(o.codeAttributes||{}).filter(([e,t])=>!!t).map(([e])=>e),[o]);i(()=>{if(!d.length&&!s){const e={[Le.FilePath]:!0,[Le.Function]:!0,[Le.LineNumber]:!0,[Le.Column]:null,[Le.Namespace]:null,[Le.StackTrace]:null};a("codeAttributes",e)}},[]);const p=(e,t)=>{const n=t?[...d,e]:d.filter(t=>t!==e),o=Object.values(Le).reduce((e,t)=>(e[t]=!!n.includes(t)||null,e),{});a("codeAttributes",o)};return e(n,{children:[e(ee,{$gap:12,children:[t(_e,{size:Te.XS,color:Pe.Secondary,nowrap:!0,children:"Recommended data to collect"}),t(ee,{$gap:6,children:vs.map(({id:e,label:n,tooltip:o})=>t(Fe,{text:o,withIcon:!0,children:t(ne,{label:n,value:d.includes(e),onChange:t=>p(e,t),disabled:r})},e))}),t(oe,{errorMessage:s})]}),e(ee,{$gap:12,children:[t(_e,{size:Te.XS,color:Pe.Secondary,nowrap:!0,children:"Verbose data to collect"}),t(ee,{$gap:6,children:ys.map(({id:e,label:n,tooltip:o})=>t(Fe,{text:o,withIcon:!0,children:t(ne,{label:n,value:d.includes(e),onChange:t=>p(e,t),disabled:r})},e))}),t(oe,{errorMessage:s})]})]})},[je.CustomInstrumentation]:({value:o,setValue:a,formErrors:l,disabled:r})=>{const s=l.customInstrumentations,d=c(()=>(o?.customInstrumentations?.[Ve.Golang]||[]).map(e=>new Be(e.packageName,e.functionName,e.receiverName,e.receiverMethodName)),[o]),p=c(()=>(o?.customInstrumentations?.[Ve.Java]||[]).map(e=>new Xe(e.className,e.methodName)),[o]),u=c(()=>(o?.customInstrumentations?.[Ve.Php]||[]).map(e=>new Ue(e.className,e.functionName)),[o]);return i(()=>{o?.customInstrumentations||s||a("customInstrumentations",{[Ve.Golang]:xs[Ve.Golang],[Ve.Java]:xs[Ve.Java],[Ve.Php]:xs[Ve.Php]})},[]),e(n,{children:[e(ee,{children:[e(pe,{$gap:8,children:[t(za,{}),t(te,{label:"Golang custom probes"})]}),t(ie,{name:"golangProbes",columns:[{keyName:"packageName",label:"Package name",placeholder:"e.g. github.com/my-org/my-package",tooltip:"The full import path of the package containing the function or method to be instrumented."},{keyName:"functionName",label:"Function name",placeholder:"e.g. myFunction",tooltip:"The name of the function to be instrumented. Leave empty if instrumenting a receiver method."},{keyName:"receiverName",label:"Receiver name",placeholder:"e.g. myReceiver",tooltip:"The name of the receiver type if instrumenting a method. Leave empty if instrumenting a standalone function."},{keyName:"receiverMethodName",label:"Receiver method name",placeholder:"e.g. myMethod",tooltip:"The name of the method to be instrumented. Leave empty if instrumenting a standalone function."}],values:d,setValues:e=>{const t={};t[Ve.Golang]=e.map(e=>new Be(e.packageName,e.functionName,e.receiverName,e.receiverMethodName)),t[Ve.Java]=p,t[Ve.Php]=u,a("customInstrumentations",t)},errorMessage:s,limitFieldsPerRow:2,disabled:r})]}),e(ee,{children:[e(pe,{$gap:8,children:[t(Ba,{}),t(te,{label:"Java custom probes"})]}),t(ie,{name:"javaProbes",columns:[{keyName:"className",label:"Class name",placeholder:"e.g. com.example.MyClass",tooltip:"The name of the class to be instrumented."},{keyName:"methodName",label:"Method name",placeholder:"e.g. myMethod",tooltip:"The name of the method to be instrumented."}],values:p,setValues:e=>{const t={};t[Ve.Golang]=d,t[Ve.Java]=e.map(e=>new Xe(e.className,e.methodName)),t[Ve.Php]=u,a("customInstrumentations",t)},errorMessage:s,limitFieldsPerRow:2,disabled:r})]}),e(ee,{children:[e(pe,{$gap:8,children:[t(Xa,{}),t(te,{label:"PHP custom probes"})]}),t(Ne,{status:Ee.Warning,message:He.PHP_CUSTOM_INSTRUMENTATION_RESTART,fullWidth:!0}),t(ie,{name:"phpProbes",columns:[{keyName:"className",label:"Class name",placeholder:"e.g. App\\Service\\OrderService",tooltip:"The fully qualified class name to instrument. Leave empty for a global function."},{keyName:"functionName",label:"Function name",placeholder:"e.g. processOrder",tooltip:"The name of the function or method to instrument."}],values:u,setValues:e=>{const t={};t[Ve.Golang]=d,t[Ve.Java]=p,t[Ve.Php]=e.map(e=>new Ue(e.className,e.functionName)),a("customInstrumentations",t)},errorMessage:s,limitFieldsPerRow:2})]})]})},[je.HeadersCollection]:({value:e,setValue:n,formErrors:o,disabled:a})=>{const l=o.headersCollection,r=c(()=>e?.headersCollection?.[Me.HeaderKeys]||[],[e]),s=e=>{const t={[Me.HeaderKeys]:e};n("headersCollection",t)};return i(()=>{r.length||l||s(Cs)},[]),t(se,{name:"headerKeys",label:"Header keys",tooltip:"Specify which headers you want to collect",helpMessage:"Asterisk (*) will collect all headers",values:r,setValues:s,errorMessage:l,disabled:a})},[je.PayloadCollection]:({value:n,setValue:o,formErrors:a,disabled:l})=>{const r=a.payloadCollection,s=c(()=>Object.entries(n.payloadCollection||{}).filter(([e,t])=>!!t).map(([e])=>e),[n]);return i(()=>{if(!s.length&&!r){const e={[ze.HttpRequest]:{},[ze.HttpResponse]:{},[ze.DbQuery]:{},[ze.Messaging]:{}};o("payloadCollection",e)}},[]),e(ee,{$gap:12,children:[t(_e,{size:Te.XS,color:Pe.Secondary,nowrap:!0,children:"Type of data to collect"}),t(ee,{$gap:6,children:Ss.map(({id:e,label:n,tooltip:i})=>t(Fe,{text:i,withIcon:!0,children:t(ne,{label:n,value:s.includes(e),onChange:t=>((e,t)=>{const n=t?[...s,e]:s.filter(t=>t!==e),i={[ze.HttpRequest]:n.includes(ze.HttpRequest)?{}:null,[ze.HttpResponse]:n.includes(ze.HttpResponse)?{}:null,[ze.DbQuery]:n.includes(ze.DbQuery)?{}:null,[ze.Messaging]:n.includes(ze.Messaging)?{}:null};o("payloadCollection",i)})(e,t),disabled:l})},e))}),t(oe,{errorMessage:r})]})},[je.UnknownType]:null},Ts=({ruleType:e,value:n,setValue:o,formErrors:i,dynamicFields:a,disabled:l})=>{if(!e)return null;if(a?.length)return t(ur,{fields:a,value:n||{},setValue:o,formErrors:i||{},signals:[],seedInitialValues:!0,keyValuePersistAs:"map",disabled:l},e);const r=ws[e];return r?t(r,{value:n,setValue:o,formErrors:i,disabled:l}):null},ks=()=>{const n=v(),{isEnterprise:o,isVm:i}=S(),{selectedOption:a,genericForm:l,sourceOptions:r,namespaceOptions:s}=jl(),d=c(()=>Ge(a?.supportedLanguages),[a?.supportedLanguages]),p=c(()=>{if(a)return a.type===je.CustomInstrumentation?[]:We(a.supportedLanguages)},[a]);if(!l||!a)return t(xe,{title:"No active form"});const{formData:u,handleFormChange:h,formErrors:m}=l;return e(ee,{$gap:24,children:[e(pe,{$gap:12,$justifyContent:"space-between",children:[t(we,{size:Te.XXXS,maxLines:2,children:a.description}),e(pe,{$gap:12,children:[t(ce,{options:[{icon:_a,label:"Enabled",value:!1,selectedBgColor:n.v2.colors.green[800]},{icon:Pa,label:"Disabled",value:!0,selectedBgColor:n.v2.colors.red[800]}],size:ke.S,selected:u.disabled,setSelected:e=>h("disabled",e),disabled:!o}),t(fe,{leftIcon:La,variant:ve.Secondary,size:be.S,onClick:()=>a.docsUrl&&window.open(a.docsUrl,"_blank","noopener noreferrer")})]})]}),t(mr,{option:a,formState:u}),!!d.length&&e(pe,{$gap:12,children:[t(_e,{size:Te.XS,color:Pe.Secondary,nowrap:!0,children:"Supported Languages:"}),d.map(e=>t(Ke,{label:Je(e),leftIcon:Ye(e),backgroundColor:n.v2.colors.purple[900]},e))]}),!i&&t(gr,{scopes:u.sourceScopes,onChange:e=>h("sourceScopes",e),sourceOptions:r,namespaceOptions:s,supportedLanguages:p,dataIdPrefix:"instrumentation-rule",slim:!0,disabled:!o}),t(ye,{name:"ruleName",label:"Rule name",placeholder:"Use a name that describes the rule...",value:u.ruleName,onChange:({target:{value:e}})=>h("ruleName",e),errorMessage:m.ruleName,disabled:!o}),t(Ts,{ruleType:a.type,dynamicFields:a.fields,value:u,setValue:(e,t)=>h(e,t),formErrors:m,disabled:!o}),t(Ie,{name:"notes",label:"Notes",placeholder:"Your personal notes...",value:u.notes,onChange:({target:{value:e}})=>h("notes",e),errorMessage:m.notes,disabled:!o})]})},Is=()=>{const{pendingMerge:e,confirmMerge:n,cancelMerge:o}=Gl();if(!e)return null;const{existingName:i,editingName:a}=e;return t(qe,{isOpen:!0,onClose:o,title:"Merge with existing Data Stream?",description:Ze.DATA_STREAM_MERGE_WARNING(a,i),approveButton:{"data-id":"data-stream-merge-confirm",label:"Merge",variant:ve.Primary,onClick:n},denyButton:{"data-id":"data-stream-merge-cancel",label:"Cancel",variant:ve.Secondary,onClick:o}})},Ns=({autoFocus:n})=>{const{dataStreams:o}=Qe(),{genericForm:i,excludeName:a,editingName:l}=Gl(),{formData:r,formErrors:s,handleFormChange:d}=i,p=r.name,u=c(()=>o.find(e=>e.name===p&&e.name!==a),[o,p,a]);return e(ee,{$width:"100%",$gap:12,children:[t(ye,{name:"data-stream-name",label:Ze.STREAM_NAME,placeholder:Ze.NAME_YOUR_STREAM_PLACEHOLDER,tooltip:Ze.STREAM_DESCRIPTION,required:!0,autoFocus:n,value:p,onChange:e=>d("name",e.target.value),errorMessage:s.name}),u&&t(Ne,{status:Ee.Warning,message:Ze.DATA_STREAM_MERGE_WARNING(l,u.name),fullWidth:!0})]})},Es=()=>{const{selectedStreamName:e}=Qe(),{genericForm:n}=Wl();if(!n)return t(xe,{title:"No active form"});const{formData:o,handleFormChange:i,formErrors:a}=n;return t(ye,{name:"sourceName",label:Ze.NAME,tooltip:"This overrides the default service name (service.name) reported in your telemetry.",placeholder:"Use a name that overrides the source name",value:o.otelServiceName,onChange:({target:{value:t}})=>{i("otelServiceName",t),i("currentStreamName",e)},errorMessage:a.otelServiceName})},Os=[{value:"all",label:"Drop All"},{value:"sample",label:"Sample"}],$s=b.div`
|
|
27
27
|
display: flex;
|
|
28
28
|
flex-direction: column;
|
|
29
29
|
gap: 24px;
|
|
@@ -77,7 +77,7 @@ import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import o,{useEff
|
|
|
77
77
|
justify-content: space-between;
|
|
78
78
|
gap: 12px;
|
|
79
79
|
padding: ${({$isOpen:e})=>e?"2px 12px 8px 12px":"2px 12px"};
|
|
80
|
-
`,Ys=({title:n,tooltip:o,list:i,noBgColor:l,purpleColors:r})=>{const[s,c]=a(!0);return e(Ws,{"data-id":`collapse-${n}`,$noBgColor:l,$purpleColors:r,children:[e(Ks,{$isOpen:s,children:[e(pe,{$gap:10,children:[t(_e,{size:Te.XS,children:n}),o&&t(Fe,{text:o,withIcon:!0}),t(Ke,{label:i.length,status:r?Ee.Default:void 0})]}),t(bt,{icon:s?ja:Ga,size:vt.M,onClick:()=>c(e=>!e)})]}),s?t(ee,{children:i.length?u.toArray(i):t(mt,{$padding:"12px 0",children:t(xe,{})})}):null]})},Js=(e,t,n)=>t||n.signalType?e.filter(e=>e.displayName.toLowerCase().includes(t.toLowerCase())&&(!n.signalType||Re(e.supportedSignals).includes(n.signalType))):e,qs=({option:e,formData:n,testResult:o,isSelected:i,onSelect:a})=>t(Hs,{icon:St(e.type).icon,title:n?.name||e.displayName,withCarret:!0,purpleColors:!!n,isSelected:i,onClick:()=>a(),children:o&&t(Ke,{status:o.succeeded?Ee.Success:Ee.Error,leftIcon:o.succeeded?Wa:Ka})}),Zs=({listType:e,destinationOptions:n,unsavedDestinations:o})=>{const{activeForm:i,onChangeActiveForm:a}=Hl();return n?.length?t(Ys,{title:Ct[e].TITLE,tooltip:Ct[e].DESCRIPTION,list:n.map((n,o)=>t(qs,{option:n,isSelected:i?.listType===e&&"number"!=typeof i?.unsavedIdx&&(null!=n.id&&""!==n.id?i?.option.id===n.id:i?.option.type===n.type),onSelect:()=>a({listType:e,option:n})},`${e}-${n.id??n.type}-${o}`))}):o?.length?t(Ys,{purpleColors:!0,title:Ct[e].TITLE,tooltip:Ct[e].DESCRIPTION,list:o.map(({option:n,formData:o,testResult:l},r)=>t(qs,{option:n,formData:o,testResult:l,isSelected:i?.unsavedIdx===r&&i?.listType===e,onSelect:()=>a({listType:e,option:n,unsavedIdx:r})},`${e}-${r}`))},e):void 0};var Qs;(e=>{e.SELF_HOSTED="self hosted",e.MANAGED="managed"})(Qs||(Qs={}));const ec=(e,t)=>{const n=[],o=[],i=[];return e&&e.destinationCategories.categories.forEach(e=>{e.name===Qs.SELF_HOSTED?o.push(...e.items):e.name===Qs.MANAGED&&i.push(...e.items)}),t&&t?.potentialDestinations.forEach(t=>{for(const o of e?.destinationCategories?.categories||[]){const e=xt(o),i=e.items.findIndex(e=>e.type===t.type);if(-1!==i){const o=wt(t.fields,{});Object.keys(o).length&&(e.items[i].fields=e.items[i].fields.map(e=>({...e,initialValue:o[e.name]})),n.push(e.items[i]))}}}),{[gt.DETECTED]:n,[gt.SELF_HOSTED]:o,[gt.MANAGED]:i}},tc=({onClose:e,onBack:n,onNext:o,selectedConnectionIds:l,setSelectedConnectionIds:r,initialInputs:s,withOverlay:p,disableAnimation:u})=>{const{destinationsApi:h}=Vl(),[m,g]=a(""),[f,b]=a({categoryType:null,signalType:null}),{items:v}=h.useDestinations(),{data:y,loading:C}=h.useDestinationCategories(),{data:S,loading:x}=h.usePotentialDestinations(),{activeForm:w,genericForm:T,unsavedDestinations:k,setUnsavedDestinations:I}=Hl();i(()=>{s&&I(s)},[s]);const N=C||x,E=c(()=>y?.destinationCategories?.categories??[],[y]),[O,$]=a({[gt.ALL]:[],[gt.UNSAVED]:[],[gt.EXISTS]:[],[gt.DETECTED]:[],[gt.SELF_HOSTED]:[],[gt.MANAGED]:[]});i(()=>{const e=v.map(e=>{let t;for(const n of E){const o=n.items.find(t=>t.type===e.destinationType.type);if(o){t=o;break}}const n=wt(e.fields,{});return{id:e.id,type:e.destinationType.type,displayName:e.name||e.destinationType.displayName,selected:!0,testConnectionSupported:t?.testConnectionSupported??!1,supportedSignals:e.destinationType.supportedSignals,fields:t?t.fields.map(e=>({...e,initialValue:n[e.name]??e.initialValue})):[]}});$(t=>({...t,[gt.EXISTS]:e}))},[v,E]),i(()=>{(y||S)&&$(e=>({...e,...ec(y,S)}))},[y,S]);const A=d(async()=>{for(const{option:e,formData:t}of k){const n=De(t);if(e.id){const t=Object.fromEntries(e.fields.map(e=>[e.name,e.initialValue??""])),o=Object.fromEntries(n.fields.map(e=>[e.key,e.value??""]));if(!Object.keys(t).some(e=>t[e]!==o[e])){await h.update(e.id,n);continue}}await h.create(n)}},[k,h]),R=(({isFetching:e,destinationsByCategory:n,searchText:o,filters:i})=>{const{unsavedDestinations:a}=Hl();return{width:"40%",list:c(()=>{const l=[];a.length&&l.push(t(Zs,{listType:gt.UNSAVED,unsavedDestinations:a},"unsaved"));for(const e of Object.values(gt)){if(i.categoryType&&i.categoryType!==e)continue;const a=Js(n[e],o,i);a.length&&l.push(t(Zs,{listType:e,destinationOptions:a},e))}return e&&l.push(t(mt,{$height:"100%",children:t(yt,{title:"Fetching destinations",withSpinner:!0})},"loading-more")),l},[a,n,o,i,e])}})({isFetching:N,destinationsByCategory:O,searchText:m,filters:f}),D=(()=>{const{activeForm:e}=Hl();return{width:"60%",list:e?[t(bs,{},e.option.type)]:[t(mt,{$height:"100%",children:t(xe,{icon:Ha,title:"Select destination from the list",subTitle:"Add destination so your data has somewhere to go."})},"no-data")]}})();return t(kr,{isOpen:!0,withOverlay:p,disableAnimation:u,onClose:e,onBack:n?()=>n(k):void 0,onNext:o?()=>o(k):void 0,nextIsSkip:!k.length,onSave:A,disableSave:!w&&!k.length,isFetching:N,isFormDirty:k.length>0||T?.isFormDirty,hideDirtyNote:!0,progress:{title:Ze.CREATING_DESTINATION,subTitle:Ze.CREATING_DESTINATION_SUBTITLE},header:{icon:Ha,title:Ze.ADD_DESTINATIONS,subTitle:Ze.ADD_DESTINATION_DRAWER_DESCRIPTION},connectionIds:l&&r?{value:l,setValue:r}:void 0,search:{value:m,onChange:g},filters:t(Gs,{destinationsByCategory:O,filters:f,setFilters:b}),leftColumn:R,rightColumn:D})},nc=({onClose:e,selectedConnectionIds:n,setSelectedConnectionIds:o,withOverlay:i})=>{const{
|
|
80
|
+
`,Ys=({title:n,tooltip:o,list:i,noBgColor:l,purpleColors:r})=>{const[s,c]=a(!0);return e(Ws,{"data-id":`collapse-${n}`,$noBgColor:l,$purpleColors:r,children:[e(Ks,{$isOpen:s,children:[e(pe,{$gap:10,children:[t(_e,{size:Te.XS,children:n}),o&&t(Fe,{text:o,withIcon:!0}),t(Ke,{label:i.length,status:r?Ee.Default:void 0})]}),t(bt,{icon:s?ja:Ga,size:vt.M,onClick:()=>c(e=>!e)})]}),s?t(ee,{children:i.length?u.toArray(i):t(mt,{$padding:"12px 0",children:t(xe,{})})}):null]})},Js=(e,t,n)=>t||n.signalType?e.filter(e=>e.displayName.toLowerCase().includes(t.toLowerCase())&&(!n.signalType||Re(e.supportedSignals).includes(n.signalType))):e,qs=({option:e,formData:n,testResult:o,isSelected:i,onSelect:a})=>t(Hs,{icon:St(e.type).icon,title:n?.name||e.displayName,withCarret:!0,purpleColors:!!n,isSelected:i,onClick:()=>a(),children:o&&t(Ke,{status:o.succeeded?Ee.Success:Ee.Error,leftIcon:o.succeeded?Wa:Ka})}),Zs=({listType:e,destinationOptions:n,unsavedDestinations:o})=>{const{activeForm:i,onChangeActiveForm:a}=Hl();return n?.length?t(Ys,{title:Ct[e].TITLE,tooltip:Ct[e].DESCRIPTION,list:n.map((n,o)=>t(qs,{option:n,isSelected:i?.listType===e&&"number"!=typeof i?.unsavedIdx&&(null!=n.id&&""!==n.id?i?.option.id===n.id:i?.option.type===n.type),onSelect:()=>a({listType:e,option:n})},`${e}-${n.id??n.type}-${o}`))}):o?.length?t(Ys,{purpleColors:!0,title:Ct[e].TITLE,tooltip:Ct[e].DESCRIPTION,list:o.map(({option:n,formData:o,testResult:l},r)=>t(qs,{option:n,formData:o,testResult:l,isSelected:i?.unsavedIdx===r&&i?.listType===e,onSelect:()=>a({listType:e,option:n,unsavedIdx:r})},`${e}-${r}`))},e):void 0};var Qs;(e=>{e.SELF_HOSTED="self hosted",e.MANAGED="managed"})(Qs||(Qs={}));const ec=(e,t)=>{const n=[],o=[],i=[];return e&&e.destinationCategories.categories.forEach(e=>{e.name===Qs.SELF_HOSTED?o.push(...e.items):e.name===Qs.MANAGED&&i.push(...e.items)}),t&&t?.potentialDestinations.forEach(t=>{for(const o of e?.destinationCategories?.categories||[]){const e=xt(o),i=e.items.findIndex(e=>e.type===t.type);if(-1!==i){const o=wt(t.fields,{});Object.keys(o).length&&(e.items[i].fields=e.items[i].fields.map(e=>({...e,initialValue:o[e.name]})),n.push(e.items[i]))}}}),{[gt.DETECTED]:n,[gt.SELF_HOSTED]:o,[gt.MANAGED]:i}},tc=({onClose:e,onBack:n,onNext:o,selectedConnectionIds:l,setSelectedConnectionIds:r,initialInputs:s,withOverlay:p,disableAnimation:u})=>{const{destinationsApi:h}=Vl(),[m,g]=a(""),[f,b]=a({categoryType:null,signalType:null}),{items:v}=h.useDestinations(),{data:y,loading:C}=h.useDestinationCategories(),{data:S,loading:x}=h.usePotentialDestinations(),{activeForm:w,genericForm:T,unsavedDestinations:k,setUnsavedDestinations:I}=Hl();i(()=>{s&&I(s)},[s]);const N=C||x,E=c(()=>y?.destinationCategories?.categories??[],[y]),[O,$]=a({[gt.ALL]:[],[gt.UNSAVED]:[],[gt.EXISTS]:[],[gt.DETECTED]:[],[gt.SELF_HOSTED]:[],[gt.MANAGED]:[]});i(()=>{const e=v.map(e=>{let t;for(const n of E){const o=n.items.find(t=>t.type===e.destinationType.type);if(o){t=o;break}}const n=wt(e.fields,{});return{id:e.id,type:e.destinationType.type,displayName:e.name||e.destinationType.displayName,selected:!0,testConnectionSupported:t?.testConnectionSupported??!1,supportedSignals:e.destinationType.supportedSignals,fields:t?t.fields.map(e=>({...e,initialValue:n[e.name]??e.initialValue})):[]}});$(t=>({...t,[gt.EXISTS]:e}))},[v,E]),i(()=>{(y||S)&&$(e=>({...e,...ec(y,S)}))},[y,S]);const A=d(async()=>{for(const{option:e,formData:t}of k){const n=De(t);if(e.id){const t=Object.fromEntries(e.fields.map(e=>[e.name,e.initialValue??""])),o=Object.fromEntries(n.fields.map(e=>[e.key,e.value??""]));if(!Object.keys(t).some(e=>t[e]!==o[e])){await h.update(e.id,n);continue}}await h.create(n)}},[k,h]),R=(({isFetching:e,destinationsByCategory:n,searchText:o,filters:i})=>{const{unsavedDestinations:a}=Hl();return{width:"40%",list:c(()=>{const l=[];a.length&&l.push(t(Zs,{listType:gt.UNSAVED,unsavedDestinations:a},"unsaved"));for(const e of Object.values(gt)){if(i.categoryType&&i.categoryType!==e)continue;const a=Js(n[e],o,i);a.length&&l.push(t(Zs,{listType:e,destinationOptions:a},e))}return e&&l.push(t(mt,{$height:"100%",children:t(yt,{title:"Fetching destinations",withSpinner:!0})},"loading-more")),l},[a,n,o,i,e])}})({isFetching:N,destinationsByCategory:O,searchText:m,filters:f}),D=(()=>{const{activeForm:e}=Hl();return{width:"60%",list:e?[t(bs,{},e.option.type)]:[t(mt,{$height:"100%",children:t(xe,{icon:Ha,title:"Select destination from the list",subTitle:"Add destination so your data has somewhere to go."})},"no-data")]}})();return t(kr,{isOpen:!0,withOverlay:p,disableAnimation:u,onClose:e,onBack:n?()=>n(k):void 0,onNext:o?()=>o(k):void 0,nextIsSkip:!k.length,onSave:A,disableSave:!w&&!k.length,isFetching:N,isFormDirty:k.length>0||T?.isFormDirty,hideDirtyNote:!0,progress:{title:Ze.CREATING_DESTINATION,subTitle:Ze.CREATING_DESTINATION_SUBTITLE},header:{icon:Ha,title:Ze.ADD_DESTINATIONS,subTitle:Ze.ADD_DESTINATION_DRAWER_DESCRIPTION},connectionIds:l&&r?{value:l,setValue:r}:void 0,search:{value:m,onChange:g},filters:t(Gs,{destinationsByCategory:O,filters:f,setFilters:b}),leftColumn:R,rightColumn:D})},nc=({onClose:e,selectedConnectionIds:n,setSelectedConnectionIds:o,withOverlay:i})=>{const{isEnterprise:l}=S(),{instrumentationRulesApi:r}=Vl(),[s,d]=a(""),u=p(null),{selectedOption:h,onSelectOption:m,genericForm:g,validateFormData:f}=jl(),{options:b,loading:v}=r.useRuleTypes(),y=c(()=>b.length?b:Tt,[b]),C=c(()=>s?y.filter(e=>e.label.toLowerCase().includes(s.toLowerCase())):y,[y,s]),x=c(()=>v?[t(ut,{$padding:"8px 12px",children:t(ht,{size:4})},"loading")]:C.map(e=>{const n=h?.type===e.type;return t(Hs,{dataId:`option-${e.type}`,title:e.label,description:e.description,withCarret:!0,isSelected:n,onClick:()=>{u.current?.clearErrors(),m(e)}},e.type)}),[v,h?.type,C,m]),w=c(()=>v?[t(ut,{$padding:"8px 12px",children:t(ht,{size:4})},"loading")]:h?[t(ks,{},h.type)]:[t(mt,{$height:"100%",children:t(xe,{icon:Ya,title:"Instrumentation rule not selected",subTitle:"Please select an instrumentation rule to add"})},"no-data")],[v,h]);return t(kr,{ref:u,isOpen:!0,withOverlay:i,onClose:e,onSave:async()=>{const{errorMessage:e,preparedFormData:t}=f();if(e)return!1;await r.create(t,h?.type)},disableSave:!h||!g?.isFormDirty||!l,isFormDirty:g?.isFormDirty,hideDirtyNote:!0,forcedNote:{fullWidth:!0,status:Ee.Warning,message:"This feature is only supported for OnPrem (Enterprise) installations"},progress:{title:Ze.CREATING_INSTRUMENTATION_RULE,subTitle:Ze.CREATING_INSTRUMENTATION_RULE_SUBTITLE},header:{icon:Ya,title:Ze.ADD_INSTRUMENTATION_RULE,subTitle:Ze.ADD_INSTRUMENTATION_RULE_DESCRIPTION},connectionIds:n&&o?{value:n,setValue:o}:void 0,search:{value:s,onChange:d},leftColumn:{width:"40%",list:x},rightColumn:{width:"60%",list:w}})},oc={groupSegmentLabel:"Namespace",itemSegmentLabel:"Source",searchPlaceholder:()=>{},groupColumnHeader:"Namespaces",fetchingGroups:{title:Ze.FETCHING_NAMESPACES,subTitle:Ze.FETCHING_NAMESPACES_SUBTITLE},noGroups:{title:"No namespaces",subTitle:"No namespaces found in this cluster"},noGroupMatchedFilter:e=>`No namespace matched the filter '${e}'`,itemColumnHeader:"Workloads",selectGroupPrompt:{title:Ze.SELECT_NAMESPACE,subTitle:Ze.SELECT_NAMESPACE_SUBTITLE},noItemsInGroupSubTitle:"No sources found in this namespace"},ic={groupSegmentLabel:"Kind",itemSegmentLabel:"Source",searchPlaceholder:e=>"Search by "+(e===kt.Namespace?"kind":"source"),groupColumnHeader:"Kinds",fetchingGroups:{title:"Fetching kinds",subTitle:"Please wait while we fetch the kinds"},noGroups:{title:"No kinds",subTitle:"No kinds found on this host"},noGroupMatchedFilter:e=>`No kind matched the filter '${e}'`,itemColumnHeader:"Sources",selectGroupPrompt:{title:"Select kind from the list",subTitle:"Pick a kind so you can select sources from it."},noItemsInGroupSubTitle:"No sources found in this kind"},ac=e=>e?ic:oc,lc="No matches",rc=e=>(e?"Unselect":"Select")+" all",sc="Selected",cc=b.div``,dc=b.div`
|
|
81
81
|
visibility: hidden;
|
|
82
82
|
|
|
83
83
|
transition: visibility 0s;
|
package/lib/contexts.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as a,r as x,a as y}from"./chunks/source-instrument-form-context-
|
|
1
|
+
import{u as a,r as x,a as y}from"./chunks/source-instrument-form-context-DqNzAFUO.js";export{A as ActionFormContextProvider,C as CloudConnectorFormContextProvider,D as DataStreamFormContextProvider,b as DestinationFormContextProvider,O as OdigosApiConnectionsScope,c as OdigosApiProvider,R as RuleFormContextProvider,S as SamplingRuleFormType,d as SamplingRulesFormProvider,e as SourceEditFormContextProvider,f as SourceInstrumentFormContextProvider,p as prepareNamespacePayloads,g as prepareSourcePayloads,h as useActionFormContext,i as useApiLazyQuery,j as useApiMutation,k as useApiQuery,l as useCloudConnectorFormContext,m as useDataStreamFormContext,n as useDestinationFormContext,o as useOdigosApi,q as useRuleFormContext,s as useSamplingRulesFormContext,t as useSourceEditFormContext,v as useSourceInstrumentFormContext}from"./chunks/source-instrument-form-context-DqNzAFUO.js";export{O as OdigosProvider,c as checkVersionSupport,r as resolveMinSupportedVersion,u as useOdigos}from"./chunks/helpers-BjINTDe1.js";import{jsx as F}from"react/jsx-runtime";import{useMemo as P,useContext as T,createContext as E}from"react";import{P as I,t as _}from"./chunks/ui-components-Cz2E0SIN.js";import{useApolloClient as M}from"@apollo/client/react";import"@apollo/client/link/error";import"@apollo/client/link/context";import"@apollo/client/utilities";import"@apollo/client/errors";import"@apollo/client";import"styled-components";import"./icons.js";import"zustand";import"javascript-time-ago";import"javascript-time-ago/locale/en";import"react-dom";import"prism-react-renderer";import"zustand/middleware";import"react-error-boundary";import"virtua";const V=()=>{const o=M(),{operations:r,context:e}=a();return{multiFetch:async(t,s,n)=>{const i=r[t];return i?y(o,i,s,n,e):{results:[],allSucceeded:!1,anySucceeded:!1,successCount:0,failureCount:s.length,error:`Operation ${String(t)} not configured`}},bulkPersistSources:async(t,s)=>{const n=[];for(const i of t){const t={...e,proxyID:i},{error:a}=await x(o,r.PERSIST_SOURCES,s,t);a&&n.push(`${i}: ${a}`)}return n.length?{error:n.join(", ")}:void 0},applyConfigurations:async(t,s)=>{if(!r.UPDATE_REMOTE_CONFIG)return{error:"UPDATE_REMOTE_CONFIG not configured"};const{error:n}=await x(o,r.UPDATE_REMOTE_CONFIG,{formData:s,connectionIds:t},e);return n?{error:n}:void 0}}},N=(o,r)=>o.platformType===I.K8s?r.K8s:o.platformType===I.Vm?r.Vm:void 0,U=o=>r=>{const e=o[r.platformType];if(!e)return;const t=Object.keys(e);if(0===t.length)return;const s=_(r.schemaVersion??r.version),n=[...t].sort((o,r)=>_(r)-_(o)).find(o=>s>=_(o));return n?e[n]:void 0},w=(o,r)=>{const e={};for(const t of Object.keys(o))e[t]=r(o[t]);return e},z=E({formType:void 0}),G=({children:o,formType:r})=>{const e=P(()=>({formType:r}),[r]);return F(z.Provider,{value:e,children:o})},$=()=>T(z);export{G as StorybookProvider,N as pickByPlatform,V as useApiForConnections,$ as useStorybook,U as versionedDocument,w as vmDialectMap};
|
package/lib/functions.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{bk as adaptInstrumentationRuleFromWire,bi as adaptInstrumentationRuleInputForWire,ce as buildBadgeForDesiredStatus,c5 as buildCatalogFieldsDataCard,fn as capitalizeFirstLetter,fo as cleanObjectEmptyStringsValues,a3 as compareCondition,fp as decimalsOnly,aY as deepClone,ev as entityIdKey,eA as filterActions,ez as filterDestinations,c9 as filterDestinationsByStream,ey as filterSources,em as filterSourcesByStream,fq as flattenObjectKeys,ct as formatBytes,fr as formatDuration,b4 as generateId,c7 as getActionIcon,et as getConditionsBooleans,cI as getContainersIcons,fs as getContainersInstrumentedCount,ft as getDeepValue,b$ as getDestinationIcon,fu as getDetectedLanguageIcons,cj as getEffectiveLanguage,cB as getEffectiveRuntimeVersion,ew as getEntityIcon,bh as getEntityId,es as getEntityIdKey,eu as getEntityLabel,fv as getHealthBadgeLabel,bf as getIdFromSseTarget,cb as getInstrumentationRuleIcon,fw as getMainContainerLanguage,fx as getMetricForEntity,fy as getMonitorIcon,fz as getNearestTypographySize,fA as getPlatformIcon,ei as getPlatformLabel,O as getProgrammingLanguageIcon,fB as getRecursiveValues,cs as getSourceKindLabel,cp as getSourceLanguageIcons,b8 as getSseTargetFromId,cv as getStatusColor,eC as getStatusFromPodStatus,cw as getStatusIcon,cu as getStatusTypeFromOdigosHealth,fC as getValueForRange,co as getVirtualServiceIcon,cn as getWorkloadId,ca as getYamlFieldsForDestination,fD as hasUnhealthyInstances,fE as instrumentationRuleSourceScopesFromWire,fF as instrumentationRuleSourceScopesToWire,bp as isEmpty,bq as isLegalK8sLabel,d1 as isOverTime,fG as isStringABoolean,fH as isTimeElapsed,cA as isValidVersion,fI as mapConditions,ch as mapDesiredStatusToConditionStatus,c8 as mapDestinationFieldsForDisplay,bu as mapExportedSignals,bs as mapSupportedSignals,fJ as numbersOnly,fK as parseBooleanFromString,fL as parseJsonStringToPrettyString,bF as prepareDestinationFormData,fM as removeEmptyValuesFromObject,v as safeJsonParse,fN as safeJsonStringify,fO as setDeepValue,fP as sleep,ag as splitCamelString,fQ as stringifyNonStringValues,t as trimVersion}from"./chunks/ui-components-
|
|
1
|
+
export{bk as adaptInstrumentationRuleFromWire,bi as adaptInstrumentationRuleInputForWire,ce as buildBadgeForDesiredStatus,c5 as buildCatalogFieldsDataCard,fn as capitalizeFirstLetter,fo as cleanObjectEmptyStringsValues,a3 as compareCondition,fp as decimalsOnly,aY as deepClone,ev as entityIdKey,eA as filterActions,ez as filterDestinations,c9 as filterDestinationsByStream,ey as filterSources,em as filterSourcesByStream,fq as flattenObjectKeys,ct as formatBytes,fr as formatDuration,b4 as generateId,c7 as getActionIcon,et as getConditionsBooleans,cI as getContainersIcons,fs as getContainersInstrumentedCount,ft as getDeepValue,b$ as getDestinationIcon,fu as getDetectedLanguageIcons,cj as getEffectiveLanguage,cB as getEffectiveRuntimeVersion,ew as getEntityIcon,bh as getEntityId,es as getEntityIdKey,eu as getEntityLabel,fv as getHealthBadgeLabel,bf as getIdFromSseTarget,cb as getInstrumentationRuleIcon,fw as getMainContainerLanguage,fx as getMetricForEntity,fy as getMonitorIcon,fz as getNearestTypographySize,fA as getPlatformIcon,ei as getPlatformLabel,O as getProgrammingLanguageIcon,fB as getRecursiveValues,cs as getSourceKindLabel,cp as getSourceLanguageIcons,b8 as getSseTargetFromId,cv as getStatusColor,eC as getStatusFromPodStatus,cw as getStatusIcon,cu as getStatusTypeFromOdigosHealth,fC as getValueForRange,co as getVirtualServiceIcon,cn as getWorkloadId,ca as getYamlFieldsForDestination,fD as hasUnhealthyInstances,fE as instrumentationRuleSourceScopesFromWire,fF as instrumentationRuleSourceScopesToWire,bp as isEmpty,bq as isLegalK8sLabel,d1 as isOverTime,fG as isStringABoolean,fH as isTimeElapsed,cA as isValidVersion,fI as mapConditions,ch as mapDesiredStatusToConditionStatus,c8 as mapDestinationFieldsForDisplay,bu as mapExportedSignals,bs as mapSupportedSignals,fJ as numbersOnly,fK as parseBooleanFromString,fL as parseJsonStringToPrettyString,bF as prepareDestinationFormData,fM as removeEmptyValuesFromObject,v as safeJsonParse,fN as safeJsonStringify,fO as setDeepValue,fP as sleep,ag as splitCamelString,fQ as stringifyNonStringValues,t as trimVersion}from"./chunks/ui-components-Cz2E0SIN.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"react-dom";import"prism-react-renderer";import"zustand/middleware";import"react-error-boundary";import"virtua";
|
package/lib/hooks.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{g4 as IGNORE_OUTSIDE_CLICK_ATTR,g5 as useActionFormData,g6 as useBodyScroll,ex as useContainerSize,b3 as useCopy,g7 as useDataStreamFormData,g8 as useDestinationFormData,bl as useGenericForm,g9 as useInstrumentationRuleFormData,d0 as useKeyDown,cx as useOnClickOutside,ga as useOverflow,gb as usePopup,cd as useScrollIntoViewWhen,eX as useScrollTo,ep as useSessionStorage,gc as useSourceFormData,cc as useTimeAgo}from"./chunks/ui-components-
|
|
1
|
+
export{g4 as IGNORE_OUTSIDE_CLICK_ATTR,g5 as useActionFormData,g6 as useBodyScroll,ex as useContainerSize,b3 as useCopy,g7 as useDataStreamFormData,g8 as useDestinationFormData,bl as useGenericForm,g9 as useInstrumentationRuleFormData,d0 as useKeyDown,cx as useOnClickOutside,ga as useOverflow,gb as usePopup,cd as useScrollIntoViewWhen,eX as useScrollTo,ep as useSessionStorage,gc as useSourceFormData,cc as useTimeAgo}from"./chunks/ui-components-Cz2E0SIN.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"react-dom";import"prism-react-renderer";import"zustand/middleware";import"react-error-boundary";import"virtua";
|
|
@@ -6,6 +6,7 @@ import { type DrawerProps } from '../../components/drawer';
|
|
|
6
6
|
import { type LoaderProps } from '../../components/loader';
|
|
7
7
|
import { type SearchProps } from '../../components/search';
|
|
8
8
|
import { BadgeProps } from '../../components/badge';
|
|
9
|
+
import { NoteProps } from '../../components';
|
|
9
10
|
export interface WideDrawerProps {
|
|
10
11
|
isOpen: DrawerProps['isOpen'];
|
|
11
12
|
withOverlay?: boolean;
|
|
@@ -33,6 +34,7 @@ export interface WideDrawerProps {
|
|
|
33
34
|
errorMessage?: string;
|
|
34
35
|
isFormDirty?: boolean;
|
|
35
36
|
hideDirtyNote?: boolean;
|
|
37
|
+
forcedNote?: NoteProps;
|
|
36
38
|
isFetching?: boolean;
|
|
37
39
|
progress?: Pick<LoaderProps, 'title' | 'subTitle' | 'percentage'>;
|
|
38
40
|
header: Pick<HeaderProps, 'icon' | 'title' | 'subTitle'>;
|
package/lib/snippets.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{A as ActionType,a as Actions,R as RichTitle}from"./chunks/ui-components-
|
|
1
|
+
export{A as ActionType,a as Actions,R as RichTitle}from"./chunks/ui-components-Cz2E0SIN.js";export{C as CancelModal,a as ConnectorCreatedModal,D as DURATION_OPTIONS,b as DeleteModal,c as DurationErrorsSection,d as DynamicActionFields,e as DynamicField,f as DynamicFields,I as InstrumentationPreviewSection,N as NOISY_PERCENTAGE_OPTIONS,O as OdigosLogoTextByTier,g as OperationSection,P as PERCENTAGE_OPTIONS,h as PercentageSection,i as PresetWithCustomInput,R as RuleInfoSection,j as RuleTypeSection,S as SamplingPreviewSection,k as SignalsCheckboxList,l as SourceScopeSection,U as UpgradeModal,W as WIDE_DRAWER_WIDTH,m as WideDrawer,Y as YamlSectionCard}from"./chunks/index-D2_SqNhv.js";export{C as ColoredSpan,a as ColoredSpanVariant}from"./chunks/helpers-BjINTDe1.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"react-dom";import"prism-react-renderer";import"zustand/middleware";import"react-error-boundary";import"virtua";
|
package/lib/store.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{d5 as DrawerType,be as ProgressKeys,eq as getDrawerTypeForAdd,cr as getDrawerTypeForEdit,g3 as useDarkMode,bb as useDataStreamStore,cm as useDrawerStore,el as useFilterStore,b6 as useNotificationStore,bc as useProgressStore,er as useSelectedStore,bd as useSetupStore}from"./chunks/ui-components-
|
|
1
|
+
export{d5 as DrawerType,be as ProgressKeys,eq as getDrawerTypeForAdd,cr as getDrawerTypeForEdit,g3 as useDarkMode,bb as useDataStreamStore,cm as useDrawerStore,el as useFilterStore,b6 as useNotificationStore,bc as useProgressStore,er as useSelectedStore,bd as useSetupStore}from"./chunks/ui-components-Cz2E0SIN.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"react-dom";import"prism-react-renderer";import"zustand/middleware";import"react-error-boundary";import"virtua";
|
package/lib/theme.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{gd as Provider,ge as animations,gf as opacity,gg as palettes}from"./chunks/ui-components-
|
|
1
|
+
export{gd as Provider,ge as animations,gf as opacity,gg as palettes}from"./chunks/ui-components-Cz2E0SIN.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"react-dom";import"prism-react-renderer";import"zustand/middleware";import"react-error-boundary";import"virtua";
|
package/lib/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{bn as ActionKeyTypes,bo as ActionType,eY as AgentInjectedReason,eZ as BooleanOperation,c3 as CloudConnectorFeatureKey,af as CodeAttributesKeyTypes,e_ as ConditionType,b9 as Crud,a9 as CustomInstrumentationsKeyTypes,e$ as DesiredConditionActionItemType,cf as DesiredStateProgress,f0 as DestinationTypes,ba as EntityTypes,bz as ExtractionDataFormat,n as FieldTypes,ab as GolangCustomProbe,ad as HeadersCollectionKeyTypes,y as InputTypes,f1 as InstallationMethod,f2 as InstallationStatus,a8 as InstrumentationRuleType,f3 as IntrumentationStatus,aa as JavaCustomProbe,f4 as JsonOperation,bx as K8sAttributesFrom,bw as K8sResourceKind,f5 as K8sWorkloadContainerAgentConfigTracesHeadSamplingSpanMetricsMode,f6 as ListDirection,f7 as NumberOperation,f8 as OtelDistroName,f9 as OtherEntityTypes,ae as PayloadCollectionKeyTypes,ac as PhpCustomProbe,P as PlatformType,fa as PodContainerLifecycleStatus,fb as PodContainerStatus,fc as PodPhase,fd as Profile,M as ProgrammingLanguages,fe as SIGNAL_KEY_TO_TYPE,ff as SIGNAL_TYPE_TO_KEY,fg as SignalKey,bt as SignalType,fh as SortDirection,S as StatusType,fi as StringOperation,b as Tier,fj as WorkloadRolloutReason,eD as WorkloadRolloutStatus}from"./chunks/ui-components-
|
|
1
|
+
export{bn as ActionKeyTypes,bo as ActionType,eY as AgentInjectedReason,eZ as BooleanOperation,c3 as CloudConnectorFeatureKey,af as CodeAttributesKeyTypes,e_ as ConditionType,b9 as Crud,a9 as CustomInstrumentationsKeyTypes,e$ as DesiredConditionActionItemType,cf as DesiredStateProgress,f0 as DestinationTypes,ba as EntityTypes,bz as ExtractionDataFormat,n as FieldTypes,ab as GolangCustomProbe,ad as HeadersCollectionKeyTypes,y as InputTypes,f1 as InstallationMethod,f2 as InstallationStatus,a8 as InstrumentationRuleType,f3 as IntrumentationStatus,aa as JavaCustomProbe,f4 as JsonOperation,bx as K8sAttributesFrom,bw as K8sResourceKind,f5 as K8sWorkloadContainerAgentConfigTracesHeadSamplingSpanMetricsMode,f6 as ListDirection,f7 as NumberOperation,f8 as OtelDistroName,f9 as OtherEntityTypes,ae as PayloadCollectionKeyTypes,ac as PhpCustomProbe,P as PlatformType,fa as PodContainerLifecycleStatus,fb as PodContainerStatus,fc as PodPhase,fd as Profile,M as ProgrammingLanguages,fe as SIGNAL_KEY_TO_TYPE,ff as SIGNAL_TYPE_TO_KEY,fg as SignalKey,bt as SignalType,fh as SortDirection,S as StatusType,fi as StringOperation,b as Tier,fj as WorkloadRolloutReason,eD as WorkloadRolloutStatus}from"./chunks/ui-components-Cz2E0SIN.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"react-dom";import"prism-react-renderer";import"zustand/middleware";import"react-error-boundary";import"virtua";
|
package/lib/visuals.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{fk as VISUAL_ODIGOS_LOGO_HEIGHT,fl as VISUAL_ODIGOS_LOGO_WIDTH,V as VisualGreenRings,fm as VisualOdigosLogo,df as VisualPurpleRings}from"./chunks/ui-components-
|
|
1
|
+
export{fk as VISUAL_ODIGOS_LOGO_HEIGHT,fl as VISUAL_ODIGOS_LOGO_WIDTH,V as VisualGreenRings,fm as VisualOdigosLogo,df as VisualPurpleRings}from"./chunks/ui-components-Cz2E0SIN.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"react-dom";import"prism-react-renderer";import"zustand/middleware";import"react-error-boundary";import"virtua";
|