@odigos/ui-kit 0.0.230 → 0.0.231
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 +15 -0
- package/lib/chunks/index-DAOWyONO.js +145 -0
- package/lib/chunks/{index-DJZLguZq.js → index-tFZXUKvO.js} +1 -1
- package/lib/chunks/{ui-components-B4xHrszQ.js → ui-components-CvK0mvVN.js} +378 -378
- package/lib/components/_v2/table/index.d.ts +8 -1
- package/lib/components/v2.js +1 -1
- package/lib/components.js +1 -1
- package/lib/constants/sampling/index.d.ts +7 -0
- package/lib/constants.js +1 -1
- package/lib/containers/_v2/_drawers/add-destination-drawer/form-column/index.d.ts +1 -1
- package/lib/containers/_v2/_drawers/add-destination-drawer/lists-column/index.d.ts +1 -1
- package/lib/containers/_v2/_drawers/add-source-drawer/namespaces-column/index.d.ts +1 -1
- package/lib/containers/_v2/_drawers/add-source-drawer/workloads-column/index.d.ts +1 -1
- package/lib/containers/source-drawer/profiling/flame-graph-canvas.d.ts +12 -0
- package/lib/containers/source-drawer/profiling/flamebearer.d.ts +21 -2
- package/lib/containers/source-drawer/profiling/index.d.ts +1 -9
- package/lib/containers/source-drawer/profiling/symbol-table.d.ts +13 -0
- package/lib/containers/v2.js +46 -42
- package/lib/containers.js +42 -44
- package/lib/contexts/sampling-rules-form-context.d.ts +3 -1
- package/lib/contexts.js +1 -1
- package/lib/functions.js +1 -1
- package/lib/hooks.js +1 -1
- package/lib/snippets/_v2/sampling-rule-form-sections/index.d.ts +1 -0
- package/lib/snippets/_v2/sampling-rule-form-sections/rule-type.d.ts +8 -0
- package/lib/snippets/_v2/sampling-rule-form-sections/sampling-preview.d.ts +3 -1
- package/lib/snippets/v2.js +1 -1
- package/lib/snippets.js +1 -1
- package/lib/store.js +1 -1
- package/lib/theme.js +1 -1
- package/lib/types.js +1 -1
- package/lib/visuals.js +1 -1
- package/package.json +1 -1
- package/lib/chunks/index-CGrd7Nq0.js +0 -149
package/lib/functions.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{dx as capitalizeFirstLetter,
|
|
1
|
+
export{dx as capitalizeFirstLetter,ft as cleanObjectEmptyStringsValues,x as compareCondition,an as deepClone,d6 as entityIdKey,cO as filterActions,de as filterDestinations,aP as filterDestinationsByStream,dd as filterSources,dc as filterSourcesByStream,fu as flattenObjectKeys,d8 as formatBytes,e5 as formatDuration,g as generateId,aL as getActionIcon,cI as getConditionsBooleans,d$ as getContainersIcons,e2 as getContainersInstrumentedCount,fv as getDeepValue,am as getDestinationIcon,fw as getDetectedLanguageIcons,cV as getEntityIcon,aG as getEntityId,d5 as getEntityIdKey,cQ as getEntityLabel,fx as getIdFromSseTarget,aV as getInstrumentationRuleIcon,fy as getMainContainerLanguage,dB as getMetricForEntity,fz as getMonitorIcon,fA as getPlatformIcon,fB as getPlatformLabel,_ as getProgrammingLanguageIcon,e7 as getRecursiveValues,d9 as getSourceLanguageIcons,fC as getSseTargetFromId,fD as getStatusColor,bu as getStatusFromPodStatus,cM as getStatusIcon,dR as getStatusTypeFromOdigosHealth,fE as getValueForRange,dK as getVirtualServiceIcon,dH as getWorkloadId,aQ as getYamlFieldsForDestination,dS as hasUnhealthyInstances,i as isEmpty,fF as isLegalK8sLabel,be as isOverTime,dX as isStringABoolean,fG as isTimeElapsed,fH as isValidVersion,cL as mapConditions,aN as mapDestinationFieldsForDisplay,H as mapExportedSignals,J as mapSupportedSignals,fI as numbersOnly,dY as parseBooleanFromString,fJ as parseJsonStringToPrettyString,L as prepareDestinationFormData,fK as removeEmptyValuesFromObject,ao as safeJsonParse,fL as safeJsonStringify,fM as setDeepValue,c$ as sleep,aR as splitCamelString,fN as stringifyNonStringValues,cC as trimVersion}from"./chunks/ui-components-CvK0mvVN.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-C150cdxb.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
|
package/lib/hooks.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{cw as useActionFormData,
|
|
1
|
+
export{cw as useActionFormData,g1 as useBodyScroll,df as useClickNode,dI as useClickNotification,db as useContainerSize,u as useCopy,dq as useDataStreamFormData,dw as useDestinationFormData,aM as useGenericForm,dD as useInstrumentationRuleFormData,bc as useKeyDown,dk as useOnClickOutside,dg as usePopup,ca as useScrollTo,dp as useSessionStorage,dZ as useSourceFormData,e0 as useSourceSelectionFormData,bd as useTimeAgo}from"./chunks/ui-components-CvK0mvVN.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-C150cdxb.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type FC } from 'react';
|
|
2
|
+
import type { SamplingRuleFormState } from '@/types';
|
|
3
|
+
interface RuleTypeSectionProps {
|
|
4
|
+
formState: SamplingRuleFormState;
|
|
5
|
+
onChange: (updates: Partial<SamplingRuleFormState>) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const RuleTypeSection: FC<RuleTypeSectionProps>;
|
|
8
|
+
export {};
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { type FC } from 'react';
|
|
1
|
+
import React, { type FC } from 'react';
|
|
2
2
|
import { type ColoredSpanPart } from '@/snippets/_v2/colored-span';
|
|
3
3
|
import type { SamplingRuleCategory, SamplingRuleFormState } from '@/types';
|
|
4
4
|
export type SamplingPreviewSectionProps = {
|
|
5
5
|
readOnly: true;
|
|
6
6
|
summary: ColoredSpanPart[];
|
|
7
|
+
renderAction?: () => React.ReactNode;
|
|
7
8
|
} | {
|
|
8
9
|
readOnly?: false;
|
|
9
10
|
category: SamplingRuleCategory;
|
|
10
11
|
formState: SamplingRuleFormState;
|
|
12
|
+
renderAction?: () => React.ReactNode;
|
|
11
13
|
};
|
|
12
14
|
export declare const SamplingPreviewSection: FC<SamplingPreviewSectionProps>;
|
package/lib/snippets/v2.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{A as ActionType,
|
|
1
|
+
export{A as ActionType,bt as Actions,bC as ColoredSpan,eQ as ColoredSpanVariant,bs as RichTitle}from"../chunks/ui-components-CvK0mvVN.js";export{C as CancelModal,j as DURATION_OPTIONS,g as DeleteModal,e as DurationErrorsSection,D as DynamicField,N as NOISY_PERCENTAGE_OPTIONS,i as OdigosLogoTextByTier,O as OperationSection,a as PERCENTAGE_OPTIONS,f as PercentageSection,P as PresetWithCustomInput,R as RuleInfoSection,d as RuleTypeSection,b as SamplingPreviewSection,S as SignalsCheckboxList,c as SourceScopeSection,U as UpgradeModal,h as WIDE_DRAWER_WIDTH,W as WideDrawer}from"../chunks/index-DAOWyONO.js";export{Y as YamlSectionCard}from"../chunks/index-tFZXUKvO.js";import"react/jsx-runtime";import"styled-components";import"../icons.js";import"zustand";import"react";import"javascript-time-ago";import"../chunks/vendor-C150cdxb.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
|
package/lib/snippets.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{cl as AddButton,
|
|
1
|
+
export{cl as AddButton,dT as CopyText,dN as EditButton,dM as Flow,g5 as MapItemNode,g6 as NoDataNode,du as NoteBackToSummary,dV as PodContainer,d_ as SourceContainer}from"./chunks/ui-components-CvK0mvVN.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-C150cdxb.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
|
package/lib/store.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{aD as ProgressKeys,dL as useActiveNodeStore,e4 as useDarkMode,aO as useDataStreamStore,cs as useDrawerStore,ap as useEntityStore,cN as useFilterStore,cB as useModalStore,aS as useNotificationStore,aA as useProgressStore,d2 as useSelectedStore,dr as useSetupStore}from"./chunks/ui-components-CvK0mvVN.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-C150cdxb.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
|
package/lib/theme.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{fZ as Provider,f_ as animations,f$ as opacity,g0 as palettes}from"./chunks/ui-components-CvK0mvVN.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-C150cdxb.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
|
package/lib/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{f6 as ActionCategory,c as ActionKeyTypes,q as ActionType,f7 as AddNodeTypes,f8 as BooleanOperation,M as CodeAttributesKeyTypes,cA as Crud,V as CustomInstrumentationsKeyTypes,d4 as DesiredStateProgress,f9 as DestinationTypes,fa as EdgeTypes,aC as EntityTypes,p as FieldTypes,R as GolangCustomProbe,P as HeadersCollectionKeyTypes,h as InputTypes,fb as InstallationMethod,W as InstrumentationRuleType,fc as IntrumentationStatus,U as JavaCustomProbe,fd as JsonOperation,K as K8sAttributesFrom,dG as K8sResourceKind,fe as ListDirection,dJ as NodeTypes,ff as NumberOperation,fg as OtelDistroName,dv as OtherEntityTypes,cK as OtherStatus,au as OtherStatusType,Q as PayloadCollectionKeyTypes,fh as PlatformType,fi as PodContainerLifecycleStatus,fj as PodContainerStatus,fk as PodPhase,fl as Profile,dP as ProgrammingLanguages,fm as SIGNAL_KEY_TO_TYPE,dy as SIGNAL_TYPE_TO_KEY,fn as SignalKey,G as SignalType,fo as SortDirection,E as StatusType,fp as StringOperation,av as Tier,bw as WorkloadRolloutStatus}from"./chunks/ui-components-CvK0mvVN.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-C150cdxb.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
|
package/lib/visuals.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{fq as VISUAL_ODIGOS_LOGO_HEIGHT,fr as VISUAL_ODIGOS_LOGO_WIDTH,f5 as VisualGreenRings,fs as VisualOdigosLogo}from"./chunks/ui-components-CvK0mvVN.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-C150cdxb.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
|
package/package.json
CHANGED
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
import{c5 as e,p as a,T as l,k as t,e9 as r,e as s,am as o,w as i,j as n,ap as d,l as c,I as p,h as u,as as h,aw as g,n as m,F as v,d as f,S as b,an as y,aa as x,ea as S,eb as w,ax as C,ec as k,s as T,ed as $,t as L,ee as P,ef as M,eg as A,eh as O,ei as N,ej as z,ek as D,el as R,em as X,en as I,eo as E,ep as H,eq as V,bj as j,a as K,B as U,er as q,es as G,et as J,eu as B,ev as F,ew as W,ex as Z,ey as Y,ez as _,a7 as Q,a3 as ee,eA as ae,eB as le,ab as te,a6 as re,eC as se,eD as oe,eE as ie,eF as ne,b2 as de,eG as ce,eH as pe,eI as ue,eJ as he,eK as ge,eL as me,eM as ve,eN as fe,bG as be,o as ye,eO as xe,eP as Se,eQ as we,eR as Ce,eS as ke,eT as Te,eU as $e,eV as Le,eW as Pe,eX as Me,z as Ae,eY as Oe,E as Ne,eZ as ze,e_ as De,e$ as Re,f0 as Xe,f1 as Ie,dO as Ee,_ as He,ao as Ve,dm as je,f as Ke,f2 as Ue,d7 as qe,b as Ge,N as Je,aI as Be,aj as Fe,bw as We,dP as Ze}from"./ui-components-B4xHrszQ.js";import{jsx as Ye,jsxs as _e,Fragment as Qe}from"react/jsx-runtime";import{OdigosLogoTextEnterprise as ea,OdigosLogoTextCommunity as aa,EditIcon as la,ArrowLeftIcon as ta,ArrowRightIcon as ra,VSquareIcon as sa}from"../icons.js";import{useCallback as oa,useMemo as ia,useState as na,useRef as da,useEffect as ca,forwardRef as pa,useImperativeHandle as ua}from"react";import ha,{useTheme as ga}from"styled-components";import"./index-DJZLguZq.js";const ma=({isOpen:a,onClose:l,onDeny:t,onApprove:r})=>Ye(e,{title:"Discard changes?",description:"You have unsaved changes.\nIf you cancel now, your changes won't be saved.",isOpen:a,onClose:l,onDeny:t,denyLabel:"Keep editing",onApprove:r,approveLabel:"Discard changes"}),va=({isOpen:a,onClose:l,onDeny:t,onApprove:r,action:s="delete",target:o})=>{const i=s.charAt(0).toUpperCase()+s.substring(1),n=o?.endsWith("s")?"these":"this";return Ye(e,{title:`${i}${o?` ${o}`:""}?`,description:`Are you sure you want to ${s}${o?` ${n} ${o}`:""}?`,isOpen:a,onClose:l,onDeny:t,denyLabel:"Go back",onApprove:r,approveLabel:i})},fa=({componentType:e,inputType:h,name:g,label:m,tooltip:v,badge:f,placeholder:b,required:y,disabled:x,value:S,setValue:w,errorMessage:C,warnMessage:k,helpMessage:T,dropdownOptions:$,dropdownNoSearch:L,dropdownNoCheckbox:P,timeUnits:M,timeDefaultUnit:A})=>{switch(e){case a.Input:return Ye(p,{name:g,type:h,label:m,tooltip:v,badge:f,placeholder:b,required:y,disabled:x,value:S??"",onChange:e=>{const a=e.target.value;w(h===u.Number?""===a?null:Number(a):a)},errorMessage:C,warnMessage:k,helpMessage:T},g);case a.MultiInput:return Ye(c,{name:g,label:m,tooltip:v,badge:f,placeholder:b,required:y,disabled:x,values:Array.isArray(S)?S:d(S,[]),setValues:e=>w(e),errorMessage:C,warnMessage:k,helpMessage:T},g);case a.KeyValuePair:return Ye(n,{name:g,label:m,tooltip:v,badge:f,required:y,disabled:x,limitFieldsPerRow:2,columns:[{keyName:"key",label:"Key"},{keyName:"value",label:"Value"}],values:Array.isArray(S)?S:d(S,[]),setValues:e=>w(e),errorMessage:C,warnMessage:k,helpMessage:T},g);case a.TextArea:return Ye(i,{name:g,label:m,tooltip:v,badge:f,required:y,disabled:x,placeholder:b,value:S??"",onChange:e=>w(e.target.value),errorMessage:C,warnMessage:k,helpMessage:T},g);case a.Dropdown:return Ye(o,{name:g,label:m,tooltip:v,badge:f,placeholder:b,required:y,disabled:x,withSearch:!L,options:$?.map(e=>({id:e.id||"",label:e.value||"",withCheckbox:!P}))||[],values:S?[String(S)]:[],setValues:e=>w(e[0]),errorMessage:C,warnMessage:k,helpMessage:T},g);case a.Checkbox:return Ye(s,{name:g,label:m,tooltip:v,badge:f,value:!0===S||"true"===S,onChange:e=>w(e),disabled:x,errorMessage:C,warnMessage:k,helpMessage:T},g);case a.Time:return Ye(r,{name:g,label:m,tooltip:v,badge:f,placeholder:b,required:y,disabled:x,value:S??"",setValue:e=>w(e),units:M,defaultUnit:A,errorMessage:C,warnMessage:k,helpMessage:T},g);case a.Toggle:return Ye(l,{name:g,labelAlign:t.Right,label:m,tooltip:v,badge:f,value:!0===S||"true"===S,onChange:e=>w(e),disabled:x,errorMessage:C,warnMessage:k,helpMessage:T},g);default:return null}},ba=({size:e=200})=>{const{tier:a}=h();return a===g.Onprem?Ye(ea,{size:e}):Ye(aa,{size:e})},ya=[{value:"50",label:"50%"},{value:"25",label:"25%"},{value:"10",label:"10%"},{value:"1",label:"1%"},{value:"0",label:"0%"},{value:"custom",label:"Custom"}],xa=[{value:"10",label:"10%"},{value:"1",label:"1%"},{value:"0.5",label:"0.5%"},{value:"0.1",label:"0.1%"},{value:"0",label:"0%"},{value:"custom",label:"Custom"}],Sa=[{value:"5000",label:"5s"},{value:"1000",label:"1s"},{value:"500",label:"500ms"},{value:"100",label:"100ms"},{value:"50",label:"50ms"},{value:"custom",label:"Custom"}],wa=({description:e,options:a,selected:l,onSelect:t,customName:r,customLabel:s,customPlaceholder:o,customValue:i,onCustomChange:n})=>_e(m,{$gap:16,$alignItems:"flex-end",children:[_e(v,{$gap:6,children:[Ye(f,{label:e}),Ye(b,{size:y.S,options:a,selected:l,setSelected:t})]}),"custom"===l&&Ye(p,{name:r,label:s,placeholder:o,type:u.Number,value:i,onChange:n,width:160})]}),Ca=()=>{},ka=e=>e.readOnly?Ye(Ta,{rule:e.rule}):Ye($a,{ruleType:e.ruleType,formState:e.formState,onChange:e.onChange}),Ta=({rule:e})=>{const a=ga(),r=null!=e.durationAtLeastMs;return e.error?Ye(x,{richTitle:{title:S},children:Ye(l,{name:"sampling-view-toggle-keep-errors",onChange:Ca,value:!0,size:C.S,label:w,labelAlign:t.Right})}):r?Ye(x,{richTitle:{title:k},children:_e("div",{children:[Ye(T,{size:L.XXXS,color:a.v2.colors.silver[200],children:$}),Ye(T,{size:L.XS,children:`${e.durationAtLeastMs}ms`})]})}):null},$a=({ruleType:e,formState:a,onChange:r})=>{const s=oa(e=>r({durationPreset:e}),[r]),o=oa(e=>r({customDurationMs:e.target.value}),[r]);return"Error"===e?Ye(x,{richTitle:{title:S,subTitle:P},children:Ye(l,{name:"sampling-toggle-keep-errors",value:!0,onChange:Ca,size:C.S,label:w,labelAlign:t.Right})}):"Duration"===e?Ye(x,{richTitle:{title:k,subTitle:M},children:Ye(wa,{description:$,options:Sa,selected:a.durationPreset,onSelect:s,customName:"sampling-input-custom-duration",customLabel:A,customPlaceholder:"200ms",customValue:a.customDurationMs,onCustomChange:o})}):null},La=ha.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
gap: 32px;
|
|
4
|
-
`,Pa=ha.div`
|
|
5
|
-
display: flex;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
gap: 4px;
|
|
8
|
-
`,Ma=ha.div`
|
|
9
|
-
display: flex;
|
|
10
|
-
flex-wrap: wrap;
|
|
11
|
-
align-items: flex-end;
|
|
12
|
-
gap: 16px;
|
|
13
|
-
`,Aa=ha.div`
|
|
14
|
-
display: flex;
|
|
15
|
-
align-items: flex-end;
|
|
16
|
-
gap: 16px;
|
|
17
|
-
padding: 12px 16px;
|
|
18
|
-
border-radius: 8px;
|
|
19
|
-
background-color: ${({theme:e})=>e.v2.colors.black[500]};
|
|
20
|
-
`,Oa=ha.div`
|
|
21
|
-
display: flex;
|
|
22
|
-
align-items: flex-end;
|
|
23
|
-
gap: 10px;
|
|
24
|
-
flex: 1;
|
|
25
|
-
`,Na=ha.div`
|
|
26
|
-
display: flex;
|
|
27
|
-
align-items: center;
|
|
28
|
-
height: 32px;
|
|
29
|
-
`,za=ha.div`
|
|
30
|
-
display: flex;
|
|
31
|
-
align-items: flex-end;
|
|
32
|
-
gap: 16px;
|
|
33
|
-
margin-bottom: 12px;
|
|
34
|
-
`,Da="Any",Ra="Kafka topic",Xa=()=>Ye("div",{style:{marginBottom:"8px"},children:Ye(T,{size:L.XS,weight:500,children:"And"})}),Ia=[{value:"all",label:"All Operations"},{value:"httpServer",label:"HTTP Server"},{value:"httpClient",label:"HTTP Client"}],Ea=[{value:"all",label:"All Operations"},{value:"httpServer",label:"HTTP Server"},{value:"kafkaConsumer",label:"Kafka Consumer"},{value:"kafkaProducer",label:"Kafka Producer"}],Ha=[{id:"",label:Da},{id:"GET",label:"GET"},{id:"POST",label:"POST"},{id:"PUT",label:"PUT"},{id:"DELETE",label:"DELETE"},{id:"PATCH",label:"PATCH"}];const Va=e=>e.readOnly?Ye(ja,{data:e.data}):Ye(Ka,{category:e.category,formState:e.formState,onChange:e.onChange}),ja=({data:e})=>{const a=ga(),l=ia(()=>function(e){if("noisy"===e.category){const a=e.rule.operation;if(a?.httpServer)return[{id:"type",title:B,value:J},{id:"route",title:E,value:a.httpServer.route||a.httpServer.routePrefix||F},{id:"method",title:q,value:a.httpServer.method||Da}];if(a?.httpClient){const e=[{id:"type",title:B,value:W}];return a.httpClient.serverAddress&&e.push({id:"serverAddress",title:"Server address",value:a.httpClient.serverAddress}),e.push({id:"route",title:E,value:a.httpClient.templatedPath||a.httpClient.templatedPathPrefix||F}),e.push({id:"method",title:q,value:a.httpClient.method||Da}),e}return[{id:"type",title:B,value:Z}]}const a=e.rule.operation;return a?.httpServer?[{id:"type",title:B,value:J},{id:"route",title:E,value:a.httpServer.route||a.httpServer.routePrefix||F},{id:"method",title:q,value:a.httpServer.method||Da}]:a?.kafkaConsumer?[{id:"type",title:B,value:Y},{id:"topic",title:Ra,value:a.kafkaConsumer.kafkaTopic||F}]:a?.kafkaProducer?[{id:"type",title:B,value:_},{id:"topic",title:Ra,value:a.kafkaProducer.kafkaTopic||F}]:[{id:"type",title:B,value:Z}]}(e),[e]);return Ye(x,{richTitle:{title:O},children:Ye(La,{children:l.map(({id:e,title:l,value:t})=>_e(Pa,{children:[Ye(T,{size:L.XXXS,color:a.v2.colors.silver[200],nowrap:!0,children:l}),Ye(T,{size:L.XS,nowrap:!0,children:t})]},e))})})},Ka=({category:e,formState:a,onChange:l})=>{const t=ia(()=>"noisy"===e?Ia:Ea,[e]),r=oa(e=>l({operationType:e,route:"",serverAddress:"",method:"",kafkaTopic:""}),[l]),s=oa(e=>a=>{a&&l({routeType:e,route:""})},[l]),o=oa(e=>l({route:e.target.value}),[l]),i=oa(e=>l({serverAddress:e.target.value}),[l]),n=oa(e=>l({method:e[0]||""}),[l]),d=oa(e=>l({kafkaTopic:e.target.value}),[l]),c="httpServer"===a.operationType||"httpClient"===a.operationType,u="kafkaConsumer"===a.operationType||"kafkaProducer"===a.operationType,h="httpClient"===a.operationType?I:E,g="httpClient"===a.operationType?H:V;return _e(x,{richTitle:{title:`2. ${O}`,subTitle:N},children:[Ye(v,{$alignItems:"flex-start",children:Ye(b,{size:y.S,options:t,selected:a.operationType,setSelected:r})}),c&&_e(Ma,{children:["httpClient"===a.operationType&&_e(za,{children:[Ye(p,{name:"sampling-input-server-address",label:D,placeholder:z,value:a.serverAddress,onChange:i}),Ye(Xa,{})]}),_e(Aa,{children:[_e(Oa,{children:[Ye(Na,{children:Ye(R,{"data-id":"sampling-radio-route",value:"route"===a.routeType,onChange:s("route")})}),Ye(p,{name:"sampling-input-route",label:h,placeholder:X,value:"route"===a.routeType?a.route:"",onChange:o,disabled:"route"!==a.routeType})]}),_e(Oa,{children:[Ye(Na,{children:Ye(R,{"data-id":"sampling-radio-route-prefix",value:"routePrefix"===a.routeType,onChange:s("routePrefix")})}),Ye(p,{name:"sampling-input-route-prefix",label:g,placeholder:X,value:"routePrefix"===a.routeType?a.route:"",onChange:o,disabled:"routePrefix"!==a.routeType})]})]}),_e(za,{children:[Ye(Xa,{}),Ye(j,{label:q,items:Ha,selectedIds:[a.method||""],setSelectedIds:e=>n(e),buttonProps:{"data-id":"sampling-btn-method",label:Ha.find(e=>e.id===a.method)?.label||Da,size:U.S,variant:K.Secondary}})]})]}),u&&Ye(p,{name:"sampling-input-kafka-topic",label:G,placeholder:"Type kafka topic",value:a.kafkaTopic,onChange:d,width:"320px"})]})},Ua=[{value:"all",label:"Drop All"},{value:"sample",label:"Sample"}],qa=[{value:"all",label:"Keep All"},{value:"sample",label:"Sample"}];const Ga=e=>e.readOnly?Ye(Ja,{data:e.data}):Ye(Ba,{category:e.category,formState:e.formState,onChange:e.onChange}),Ja=({data:e})=>{const a=ga(),l=ia(()=>function(e){switch(e.category){case"highlyRelevant":return null!=e.rule.percentageAtLeast?{title:ae,method:oe,description:re,value:`${e.rule.percentageAtLeast}%`}:{title:ae,method:ne,description:null,value:null};case"noisy":return null!=e.rule.percentageAtMost?{title:le,method:oe,description:se,value:`${e.rule.percentageAtMost}%`}:{title:le,method:ie,description:null,value:null};case"costReduction":return{title:le,method:oe,description:se,value:`${e.rule.percentageAtMost}%`}}}(e),[e]),t=[{id:"method",title:q,value:l.method},...null!=l.description?[{id:"value",title:l.description,value:l.value}]:[]];return Ye(x,{richTitle:{title:l.title},children:Ye(La,{children:t.map(({id:e,title:l,value:t})=>_e(Pa,{children:[Ye(T,{size:L.XXXS,color:a.v2.colors.silver[200],nowrap:!0,children:l}),Ye(T,{size:L.XS,nowrap:!0,children:t})]},e))})})},Ba=({category:e,formState:a,onChange:l})=>{const t="highlyRelevant"===e,r=t?qa:Ua,s=`3. ${t?ae:le}`,o=t?Q:ee,i=t?re:se,n="noisy"===e?xa:ya,d=oa(e=>l({percentageMode:e}),[l]),c=oa(e=>l({percentagePreset:e}),[l]),p=oa(e=>l({customPercentage:e.target.value}),[l]);return _e(x,{richTitle:{title:s,subTitle:o},children:["costReduction"!==e&&Ye(v,{$alignItems:"flex-start",children:Ye(b,{size:y.S,options:r,selected:a.percentageMode,setSelected:d})}),("costReduction"===e||"sample"===a.percentageMode)&&Ye(wa,{description:i,options:n,selected:a.percentagePreset,onSelect:c,customName:"sampling-input-custom-percentage",customLabel:te,customPlaceholder:"5%",customValue:a.customPercentage,onCustomChange:p})]})},Fa=ha.div`
|
|
35
|
-
display: flex;
|
|
36
|
-
align-items: flex-end;
|
|
37
|
-
gap: 16px;
|
|
38
|
-
`,Wa=ha.div`
|
|
39
|
-
width: 280px;
|
|
40
|
-
flex-shrink: 0;
|
|
41
|
-
`,Za=ha.div`
|
|
42
|
-
display: flex;
|
|
43
|
-
flex-direction: column;
|
|
44
|
-
gap: 4px;
|
|
45
|
-
`,Ya=ha.div`
|
|
46
|
-
flex: 1;
|
|
47
|
-
min-width: 0;
|
|
48
|
-
`,_a=[{value:"Relevance",label:"Relevance"},{value:"Error",label:"Error"},{value:"Duration",label:"Duration"}];function Qa(e){return"highlyRelevant"===e.category?e.rule.error?"Error":null!=e.rule.durationAtLeastMs?"Duration":"Relevance":ve[e.category]}const el=e=>e.readOnly?Ye(al,{data:e.data}):Ye(ll,{category:e.category,formState:e.formState,onChange:e.onChange}),al=({data:e})=>{const a=ga(),l=ia(()=>[{id:"name",title:ce,value:e.rule.name||de},{id:"type",title:pe,value:Qa(e)}],[e]),t=e.rule.notes||F;return _e(x,{children:[Ye(La,{children:l.map(({id:e,title:l,value:t})=>_e(Pa,{children:[Ye(T,{size:L.XXXS,color:a.v2.colors.silver[200],nowrap:!0,children:l}),Ye(T,{size:L.XS,nowrap:!0,children:t})]},e))}),_e(Pa,{children:[Ye(T,{size:L.XXXS,color:a.v2.colors.silver[200],children:ue}),Ye(T,{size:L.XS,children:t})]})]})},ll=({category:e,formState:a,onChange:l})=>{const t=oa(e=>l({name:e.target.value}),[l]),r=oa(e=>l({notes:e.target.value}),[l]),s=oa(e=>{l({ruleType:e,keepErrors:"Error"===e})},[l]);return Ye(x,{children:_e(Fa,{children:[Ye(Wa,{children:Ye(p,{name:"sampling-input-rule-name",label:ce,tooltip:"Optional. Give this rule a name for easier identification.",placeholder:he,value:a.name,onChange:t})}),"highlyRelevant"===e&&_e(Za,{children:[Ye(f,{label:pe}),Ye(b,{size:y.S,options:_a,selected:a.ruleType,setSelected:s})]}),Ye(Ya,{children:Ye(p,{name:"sampling-input-note",label:ue,tooltip:me,placeholder:ge,value:a.notes,onChange:r})})]})})},tl=ha.div`
|
|
49
|
-
display: flex;
|
|
50
|
-
align-items: center;
|
|
51
|
-
gap: 24px;
|
|
52
|
-
padding: 8px 16px;
|
|
53
|
-
border-radius: 12px;
|
|
54
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[800]};
|
|
55
|
-
`,rl=ha.div`
|
|
56
|
-
flex: 1;
|
|
57
|
-
min-width: 0;
|
|
58
|
-
white-space: pre;
|
|
59
|
-
overflow-x: auto;
|
|
60
|
-
`,sl=({title:e,summary:a,onEdit:l,renderAction:t})=>{const r=ia(()=>{const l=[];return e&&(l.push({text:e,variant:fe.Default}),l.push({text:" - ",variant:fe.Default})),l.push(...a),l},[e,a]);return _e(tl,{children:[Ye(rl,{children:Ye(be,{parts:r})}),t&&t(),l&&Ye(ye,{"data-id":"sampling-btn-edit-auto-rule",label:xe,rightIcon:la,variant:K.Text,size:U.S,onClick:l})]})},ol=e=>{const a=ia(()=>{if(e.readOnly)return e.summary;switch(e.category){case"noisy":return Te($e(e.formState));case"highlyRelevant":return Ce(ke(e.formState));case"costReduction":return Se(we(e.formState))}},[e]);if(e.readOnly)return Ye(sl,{title:Le,summary:a});const l=1===a.length&&"default"===a[0].variant;return Ye(sl,{title:l?Pe:Le,summary:l?[]:a})},il=ha.div`
|
|
61
|
-
display: flex;
|
|
62
|
-
flex-wrap: wrap;
|
|
63
|
-
gap: 8px;
|
|
64
|
-
`,nl=ha.div`
|
|
65
|
-
display: flex;
|
|
66
|
-
align-items: center;
|
|
67
|
-
gap: 8px;
|
|
68
|
-
padding: 8px 12px;
|
|
69
|
-
border-radius: 8px;
|
|
70
|
-
cursor: pointer;
|
|
71
|
-
background: ${({theme:e,$selected:a})=>a?e.v2.colors.silver[700]:e.v2.colors.silver[900]};
|
|
72
|
-
border: 1px solid ${({theme:e,$selected:a})=>a?e.v2.colors.silver[500]:e.v2.colors.silver[800]};
|
|
73
|
-
|
|
74
|
-
&:hover {
|
|
75
|
-
background: ${({theme:e})=>e.v2.colors.silver[700]};
|
|
76
|
-
}
|
|
77
|
-
`,dl=ha.div`
|
|
78
|
-
display: flex;
|
|
79
|
-
width: 32px;
|
|
80
|
-
height: 32px;
|
|
81
|
-
justify-content: center;
|
|
82
|
-
align-items: center;
|
|
83
|
-
flex-shrink: 0;
|
|
84
|
-
`,cl=ha.div`
|
|
85
|
-
display: flex;
|
|
86
|
-
flex-direction: column;
|
|
87
|
-
gap: 4px;
|
|
88
|
-
`,pl=ha.div`
|
|
89
|
-
display: flex;
|
|
90
|
-
align-items: center;
|
|
91
|
-
gap: 8px;
|
|
92
|
-
padding: 8px;
|
|
93
|
-
border-radius: 8px;
|
|
94
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[900]};
|
|
95
|
-
`,ul=ha.div`
|
|
96
|
-
display: flex;
|
|
97
|
-
width: 24px;
|
|
98
|
-
height: 24px;
|
|
99
|
-
justify-content: center;
|
|
100
|
-
align-items: center;
|
|
101
|
-
flex-shrink: 0;
|
|
102
|
-
`,hl={[Ee.JavaScript]:"Node.js",[Ee.DotNet]:".NET",[Ee.Php]:"PHP",[Ee.Java]:"Java",[Ee.Go]:"Go",[Ee.Python]:"Python",[Ee.Ruby]:"Ruby",[Ee.Rust]:"Rust"},gl=[Ee.Python,Ee.Java,Ee.JavaScript,Ee.DotNet,Ee.Php,Ee.Ruby,Ee.Go].map(e=>({id:e,label:hl[e]??e.charAt(0).toUpperCase()+e.slice(1),Icon:He(e)})),ml=[{value:"all",label:"Entire Cluster"},{value:"source",label:"Specific Source"},{value:"namespace",label:"Specific Namespace"},{value:"language",label:"Specific Programming Language"}];function vl(e){const a=hl[e];return a||e.charAt(0).toUpperCase()+e.slice(1)}const fl=e=>e.readOnly?Ye(bl,{scopes:e.scopes}):Ye(yl,{formState:e.formState,onChange:e.onChange,sourceOptions:e.sourceOptions,namespaceOptions:e.namespaceOptions}),bl=({scopes:e})=>{const a=ga();return Ye(x,{richTitle:{title:Me},children:e.length?Ye(cl,{children:e.map((e,l)=>((e,l)=>{if(e.workloadLanguage){const t=He(e.workloadLanguage);return _e(pl,{children:[t&&Ye(ul,{children:Ye(t,{size:18})}),Ye(T,{size:L.XS,color:a.v2.colors.white[500],children:vl(e.workloadLanguage)})]},l)}const t=[e.workloadNamespace,e.workloadKind,e.workloadName].filter(Boolean),r=t.length?t.join(" / "):"Unknown scope";return Ye(pl,{children:Ye(T,{size:L.XS,color:a.v2.colors.white[500],children:r})},l)})(e,l))}):Ye(Ae,{status:Ne.Default,message:Oe,fullWidth:!0})})},yl=({formState:e,onChange:a,sourceOptions:l=[],namespaceOptions:t=[]})=>{const[r,o]=na("all"),i=e.sourceScopes.length>0,n=ia(()=>ml.map(e=>({...e,disabled:"all"===e.value&&i})),[i]),d=ia(()=>e.sourceScopes.filter(e=>"source"===e.scopeType).map(e=>{return a=e.workloadNamespace,l=e.workloadKind,t=e.workloadName,`${a}/${l}/${t}`;var a,l,t}),[e.sourceScopes]),c=ia(()=>e.sourceScopes.filter(e=>"namespace"===e.scopeType).map(e=>e.workloadNamespace),[e.sourceScopes]),p=ia(()=>new Set(e.sourceScopes.filter(e=>"language"===e.scopeType).map(e=>e.workloadLanguage)),[e.sourceScopes]),u=oa(e=>{o(e)},[]),h=oa(l=>{const t=e.sourceScopes.filter(e=>"source"!==e.scopeType),r=l.map(e=>function(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=>({scopeType:"source",workloadName:e.name,workloadKind:e.kind,workloadNamespace:e.namespace,workloadLanguage:""}));a({sourceScopes:[...t,...r]})},[e.sourceScopes,a]),g=oa(l=>{const t=e.sourceScopes.filter(e=>"namespace"!==e.scopeType),r=l.map(e=>({scopeType:"namespace",workloadName:"",workloadKind:"",workloadNamespace:e,workloadLanguage:""}));a({sourceScopes:[...t,...r]})},[e.sourceScopes,a]),m=oa(l=>{if(e.sourceScopes.some(e=>"language"===e.scopeType&&e.workloadLanguage===l))a({sourceScopes:e.sourceScopes.filter(e=>!("language"===e.scopeType&&e.workloadLanguage===l))});else{const t={scopeType:"language",workloadName:"",workloadKind:"",workloadNamespace:"",workloadLanguage:l};a({sourceScopes:[...e.sourceScopes,t]})}},[e.sourceScopes,a]);return _e(x,{richTitle:{title:`1. ${Me}`,subTitle:ze},children:[Ye(Ae,!i&&"all"===r?{status:Ne.Default,message:Oe,fullWidth:!0,smallIcon:!0}:{status:Ne.Info,message:De,fullWidth:!0,smallIcon:!0}),Ye(v,{$alignItems:"flex-start",children:Ye(b,{size:y.S,options:n,selected:r,setSelected:u})}),"source"===r&&Ye(Re,{multiple:!0,"data-id":"sampling-autocomplete-source",options:l,value:d,onSelect:h,placeholder:Xe}),"namespace"===r&&Ye(Re,{multiple:!0,"data-id":"sampling-autocomplete-namespace",options:t,value:c,onSelect:g,placeholder:"Search namespace"}),"language"===r&&Ye(il,{children:gl.map(({id:e,label:a,Icon:l})=>{const t=p.has(e);return _e(nl,{$selected:t,onClick:()=>m(e),children:[Ye(s,{name:`sampling-scope-lang-${e}`,size:Ie.S,value:t,onChange:()=>m(e)}),Ye(dl,{children:Ye(l,{size:20})}),Ye(T,{size:L.XS,nowrap:!0,children:a})]},e)})})]})},xl=(e,a)=>!a?.length||!!a?.find(a=>a===e),Sl=({title:e="Signals",required:a,errorMessage:l,allowedSignals:t,selectedSignals:r,setSelectedSignals:o,disabled:i})=>{const[n,d]=na(1===r.length),c=da(JSON.stringify(r));ca(()=>{const e=Ve(r);e.length||je.forEach(({id:a})=>{xl(a,t)&&e.push(a)});const a=JSON.stringify(e);c.current!==a&&(c.current=a,o(e),d(1===e.length))},[t,r]);return _e(v,{$gap:12,children:[Ye(f,{label:e,required:a}),Ye(m,{$gap:12,children:je.map(e=>{const a=xl(e.id,t),l=((e,a)=>!!a?.find(a=>a===e))(e.id,r);return a?Ye(s,{label:e.value,disabled:i||!a||n&&l,value:l,onChange:a=>((e,a)=>{const l=e,t=a?[...r,l]:r.filter(e=>e!==l);o(t),d(1===t.length)})(e.id,a)},e.id):null})}),Ye(Ke,{errorMessage:l})]})},wl=({minSupportedVersion:a,currentVersion:l})=>Ye(e,{isOpen:!0,onClose:()=>{},relativeToParent:!0,visual:()=>Ye(Ue,{scale:2.4,icon:()=>Ye("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"21",viewBox:"0 0 22 21",fill:"none",children:Ye("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: ${l}.`}),Cl=ha.div`
|
|
103
|
-
display: flex;
|
|
104
|
-
flex-direction: column;
|
|
105
|
-
justify-content: flex-end;
|
|
106
|
-
width: ${({$width:e})=>e};
|
|
107
|
-
gap: ${({$columnHasHeader:e})=>e?"0":"12px"};
|
|
108
|
-
`,kl=ha.div`
|
|
109
|
-
display: flex;
|
|
110
|
-
align-items: center;
|
|
111
|
-
min-height: 24px;
|
|
112
|
-
padding: 12px;
|
|
113
|
-
border-radius: 16px 16px 0 0;
|
|
114
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[800]};
|
|
115
|
-
`,Tl=ha.div`
|
|
116
|
-
display: flex;
|
|
117
|
-
flex-direction: column;
|
|
118
|
-
gap: ${({$gap:e})=>e}px;
|
|
119
|
-
padding: 12px 12px 0 12px;
|
|
120
|
-
width: calc(100% - 24px);
|
|
121
|
-
height: ${({$heightOffset:e,$columnHasHeader:a})=>`calc(100vh - 180px - ${e}px ${a?"- 48px":""})`};
|
|
122
|
-
border-radius: ${({$columnHasHeader:e,$isLeft:a,$isRight:l})=>e?a?"0 0 0 16px":l?"0 16px 0 0":"0":a?"16px 0 0 16px":l?"0 16px 16px 0":"16px"};
|
|
123
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[900]};
|
|
124
|
-
overflow-y: auto;
|
|
125
|
-
overflow-x: hidden;
|
|
126
|
-
`,$l=({isLeft:e,isRight:a,heightOffset:l=0,width:t,header:r,list:s})=>_e(Cl,{$width:t,$columnHasHeader:!!r,children:[r&&Ye(kl,{children:r}),Ye(Tl,{$gap:8,$isLeft:e,$isRight:a,$heightOffset:l,$columnHasHeader:!!r,children:s.length?s.length>1?Ye(qe,{gap:8,elements:s}):Ye(Qe,{children:s[0]}):Ye(Ge,{$height:"100%",children:Ye(Je,{})})})]}),Ll="75vw",Pl=ha.div`
|
|
127
|
-
display: flex;
|
|
128
|
-
flex-direction: column;
|
|
129
|
-
border-radius: 16px;
|
|
130
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[1e3]};
|
|
131
|
-
overflow: hidden;
|
|
132
|
-
`,Ml=ha.div`
|
|
133
|
-
display: flex;
|
|
134
|
-
gap: 12px;
|
|
135
|
-
padding: 16px 16px 0 16px;
|
|
136
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[1e3]};
|
|
137
|
-
position: sticky;
|
|
138
|
-
top: 0;
|
|
139
|
-
`,Al=ha.div`
|
|
140
|
-
padding: 12px 12px 0 12px;
|
|
141
|
-
`,Ol=ha.div`
|
|
142
|
-
display: flex;
|
|
143
|
-
gap: 12px;
|
|
144
|
-
padding: 16px;
|
|
145
|
-
`,Nl=ha.div`
|
|
146
|
-
padding: 5vh 10vw;
|
|
147
|
-
border-radius: 12px;
|
|
148
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[800]};
|
|
149
|
-
`,zl=pa(({isOpen:e,withOverlay:a,disableAnimation:l,onClose:t,onBack:r,onNext:s,nextIsSkip:o,onSave:i,disableSave:n,connectionIds:d,header:c,subHeader:p,leftColumn:u,rightColumn:h,search:g,filters:m,errorMessage:v,isFormDirty:f,hideDirtyNote:b,isFetching:y,progress:x},S)=>{const[w,C]=na(!1),[k,T]=na(!1),[$,P]=na(void 0);ua(S,()=>({clearErrors:()=>P(void 0)}));const M=k,A=oa(()=>{f&&!w?C(!0):(C(!1),t?.())},[f,w,t]),O=n||k||"boolean"==typeof f&&!f,N=oa(async()=>{T(!0);const e=await i();T(!1),e?.error?P(e.error):(d?.setValue([]),t?.())},[i,d,t]),z=!!g||!!d||!!m,D=!!p,R=(z?48:0)+(D?50:0),X=ia(()=>y?{status:Ne.Info,message:"Fetching Data..."}:k&&!x?{status:Ne.Info,message:"Saving Changes..."}:$||v?{status:Ne.Error,message:$||v}:"boolean"==typeof f&&f&&!b?{status:Ne.Info,message:'The values don\'t reflect the current configurations of the selected clusters.\n"Save" will override the current configurations.'}:"boolean"!=typeof f||f||b?void 0:{status:Ne.Success,message:"The values reflect the current configuration of the selected cluster."},[y,k,x,$,v,f,b]),I=ia(()=>r?{label:"Back",leftIcon:ta,variant:K.Secondary,onClick:r}:{label:"Cancel",variant:K.Secondary,onClick:A,disabled:M},[r,A,M]),E=ia(()=>s?o?{"data-id":"wide-drawer-skip",label:"Skip",rightIcon:ra,variant:K.Secondary,onClick:s}:{"data-id":"wide-drawer-next",label:"Next",rightIcon:ra,variant:K.Primary,onClick:s}:{"data-id":"wide-drawer-save",label:"Save",variant:K.Primary,onClick:N,disabled:O},[s,o,N,O]);return _e(Be,{width:Ll,isOpen:e,disableAnimation:l,hideOverlay:!k&&!a,header:{...c,onClose:t?A:void 0,onCloseDisabled:M},footer:{note:X,actions:[I,E]},children:[k?Ye(Ge,{$height:"calc(100vh - 136px)",children:Ye(Nl,{children:Ye(Fe,{titleSize:L.S,subTitleSize:L.XXXS,withGradient:!0,withSpinner:!0,...x})})}):_e(Pl,{children:[z&&_e(Ml,{children:[d&&Ye(We,{icon:sa,title:"Selected Clusters",badge:{label:d.value.length}}),g&&Ye(Ze,{width:"100%",...g}),m]}),D&&Ye(Al,{children:Ye(We,{icon:p.icon,title:p.title,subTitle:p.description,badge:p.badge})}),_e(Ol,{children:[Ye($l,{isLeft:!0,heightOffset:R,...u}),Ye($l,{isRight:!0,heightOffset:R,...h})]})]}),Ye(ma,{isOpen:w,onClose:()=>C(!1),onApprove:A})]})});zl.displayName=zl.name;export{sl as A,ma as C,fa as D,xa as N,Va as O,wa as P,el as R,Sl as S,wl as U,zl as W,ya as a,ol as b,fl as c,Ga as d,ka as e,va as f,Ll as g,ba as h,Sa as i};
|