@odigos/ui-kit 0.0.253 → 0.0.254
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/lib/chunks/connections-scope-DDNmfpzA.js +1 -0
- package/lib/chunks/{flow-BnkrFBJL.js → flow-Bu1VbeQt.js} +1 -1
- package/lib/chunks/{helpers-BEkhis3j.js → helpers-Cy9W3KCg.js} +1 -1
- package/lib/chunks/{index-DIVbcB6F.js → index-D2nQHheF.js} +1 -1
- package/lib/chunks/{source-instrument-form-context-6ViZM1Z_.js → source-instrument-form-context-BJGS7jKX.js} +1 -1
- package/lib/chunks/{ui-components-TeG65JGy.js → ui-components-D_eeOuIL.js} +6 -6
- package/lib/chunks/use-odigos-api-W15RTo5l.js +5 -0
- package/lib/components/v2.js +1 -1
- package/lib/components.js +1 -1
- package/lib/constants/strings/index.d.ts +2 -1
- package/lib/constants.js +1 -1
- package/lib/containers/v2.js +7 -7
- package/lib/containers.js +6 -6
- package/lib/contexts/odigos-api/index.d.ts +1 -0
- package/lib/contexts/odigos-api/platform-helpers.d.ts +4 -2
- package/lib/contexts/odigos-api/types.d.ts +15 -1
- package/lib/contexts/odigos-api.js +1 -1
- package/lib/contexts.js +1 -1
- package/lib/functions.js +1 -1
- package/lib/hooks.js +1 -1
- package/lib/snippets/v2.js +1 -1
- package/lib/snippets.js +1 -1
- package/lib/store.js +1 -1
- package/lib/theme.js +1 -1
- package/lib/types.js +1 -1
- package/lib/visuals.js +1 -1
- package/package.json +1 -1
- package/lib/chunks/connections-scope-h3bbPbRd.js +0 -1
- package/lib/chunks/use-odigos-api-li2VrVHH.js +0 -5
package/lib/constants.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{A as ACTION_OPTIONS,fJ as ALL_SOURCES,bC as BTN_CANCEL,dF as BTN_CREATE_FIRST_RULE,bJ as BTN_CREATE_RULE,bF as BTN_DELETE_RULE,dV as BTN_EDIT_AUTO_RULE,bE as BTN_EDIT_RULE,bR as BTN_SAVE,bD as BTN_SAVE_RULE,aY as BUTTON_TEXTS,bG as CATEGORY_DESCRIPTIONS,ex as CATEGORY_LABELS,bK as CATEGORY_TITLES,fK as CREATE_COST_REDUCTION_AUTO_RULE_DRAWER_TITLE,fL as CREATE_HIGHLY_RELEVANT_AUTO_RULE_DRAWER_TITLE,fM as CREATE_NOISY_AUTO_RULE_DRAWER_TITLE,aX as DEFAULT_CLUSTER_ID,aW as DEFAULT_CLUSTER_NAME,dt as DEFAULT_DATA_STREAM_NAME,e0 as DESC_DURATION,d$ as DESC_ERRORS,e3 as DESC_OPERATION,fN as DESC_PERCENTAGE_HIGHLY_RELEVANT,aF as DESC_PERCENTAGE_NOISY,ey as DESC_RULE_TYPE,eG as DESC_SOURCE_SCOPE,aR as DESTINATION_CATEGORIES,ay as DISPLAY_LANGUAGES,D as DISPLAY_TITLES,aq as DOCS_BASE_URL,C as DestinationCategoryTypes,bN as EDIT_COST_REDUCTION_AUTO_RULE_DRAWER_SUBTITLE,bO as EDIT_COST_REDUCTION_AUTO_RULE_DRAWER_TITLE,bL as EDIT_HIGHLY_RELEVANT_AUTO_RULE_DRAWER_SUBTITLE,bM as EDIT_HIGHLY_RELEVANT_AUTO_RULE_DRAWER_TITLE,bP as EDIT_NOISY_AUTO_RULE_DRAWER_SUBTITLE,bQ as EDIT_NOISY_AUTO_RULE_DRAWER_TITLE,bH as EDIT_TITLES,ef as EMPTY_VALUE,al as EXTRACTION_FORMAT_COPY,ai as EXTRACT_ATTRIBUTE_FORM,dD as FILTER_TYPE_ALL,y as FORM_ALERTS,M as INSTRUMENTATION_RULE_OPTIONS,e1 as LABEL_CUSTOM_DURATION,aK as LABEL_CUSTOM_PERCENTAGE,aI as LABEL_DISABLED,dC as LABEL_DISABLED_RULE,ep as LABEL_DROP_ALL,aC as LABEL_DROP_AT_MOST,aH as LABEL_ENABLED,e8 as LABEL_HTTP_ROUTE,ea as LABEL_HTTP_ROUTE_PREFIX,ec as LABEL_KAFKA_TOPIC,eq as LABEL_KEEP_ALL,em as LABEL_KEEP_AT_LEAST,en as LABEL_KEEP_AT_MOST,el as LABEL_KEEP_PERCENTAGE,d_ as LABEL_KEEP_TRACES_DURATION,dY as LABEL_KEEP_TRACES_ERRORS,eb as LABEL_METHOD,et as LABEL_NOTE,dW as LABEL_NO_PREVIEW,ee as LABEL_OPERATION_TYPE,fO as LABEL_RULE_DISABLED,fP as LABEL_RULE_ENABLED,er as LABEL_RULE_NAME,es as LABEL_RULE_TYPE,eo as LABEL_SAMPLE,e5 as LABEL_SERVER_ADDRESS,e7 as LABEL_TEMPLATED_PATH,e9 as LABEL_TEMPLATED_PATH_PREFIX,bu as LANGUAGE_OPTIONS,dg as MONITORS_OPTIONS,eA as NOTE_ENTIRE_CLUSTER,eF as NOTE_SOURCE_SCOPE_LOGIC,fQ as OPENTELEMETRY_EBPF_DISTRO_OPTION,eh as OPERATION_ALL,eg as OPERATION_HTTP_CLIENT,ed as OPERATION_HTTP_SERVER,ei as OPERATION_KAFKA_CONSUMER,ej as OPERATION_KAFKA_PRODUCER,bt as OTEL_DISTRO_NAME_OPTIONS,ek as PERCENTAGE_SECTION_DESCRIPTIONS,ev as PLACEHOLDER_NOTE,e6 as PLACEHOLDER_ROUTE,eu as PLACEHOLDER_RULE_NAME,eI as PLACEHOLDER_SEARCH_SOURCE,e4 as PLACEHOLDER_SERVER_ADDRESS,bd as PROCESS_ATTRIBUTE_NAMES,ac as REGEX_TESTER_DRAWER,aG as SAMPLING_AUTO_RULE_TITLE,dL as SAMPLING_BTN_CREATE_RULE,dJ as SAMPLING_BTN_DOCS,dK as SAMPLING_BTN_REFRESH,aE as SAMPLING_COST_REDUCTION_AUTO_RULE_TITLE,dO as SAMPLING_DELETE_MODAL_APPROVE,dP as SAMPLING_DELETE_MODAL_CANCEL,dQ as SAMPLING_DELETE_MODAL_DESCRIPTION,dR as SAMPLING_DELETE_MODAL_TITLE,bS as SAMPLING_DRAWER_WIDTH,dI as SAMPLING_DUPLICATE_RULE_WARNING,aB as SAMPLING_HIGHLY_RELEVANT_AUTO_RULE_TITLE,cJ as SAMPLING_ONBOARDING_ADVANCED_LEFT_BULLET_1,cK as SAMPLING_ONBOARDING_ADVANCED_LEFT_BULLET_2,cL as SAMPLING_ONBOARDING_ADVANCED_LEFT_BULLET_3,cM as SAMPLING_ONBOARDING_ADVANCED_LEFT_TITLE,cN as SAMPLING_ONBOARDING_ADVANCED_RIGHT_BULLET_1,cO as SAMPLING_ONBOARDING_ADVANCED_RIGHT_BULLET_2,cP as SAMPLING_ONBOARDING_ADVANCED_RIGHT_BULLET_3,cQ as SAMPLING_ONBOARDING_ADVANCED_RIGHT_BULLET_4,cR as SAMPLING_ONBOARDING_ADVANCED_RIGHT_BULLET_5,cS as SAMPLING_ONBOARDING_ADVANCED_RIGHT_TITLE,cU as SAMPLING_ONBOARDING_ADVANCED_SUBTITLE,cT as SAMPLING_ONBOARDING_ADVANCED_TITLE,d9 as SAMPLING_ONBOARDING_AMBIENT_LABEL,cf as SAMPLING_ONBOARDING_BTN_GO_TO,c0 as SAMPLING_ONBOARDING_BTN_NEXT,cI as SAMPLING_ONBOARDING_BTN_READ_MORE,cq as SAMPLING_ONBOARDING_BTN_SKIP,cr as SAMPLING_ONBOARDING_BTN_START,cV as SAMPLING_ONBOARDING_COMMON_BANNER,d8 as SAMPLING_ONBOARDING_COMMON_RULES_SECTION,cY as SAMPLING_ONBOARDING_DROP_DESCRIPTION,cX as SAMPLING_ONBOARDING_DROP_SUBTITLE,cW as SAMPLING_ONBOARDING_DROP_TITLE,c$ as SAMPLING_ONBOARDING_ERROR_PRESET_NAME,c_ as SAMPLING_ONBOARDING_ERROR_PRESET_TOGGLE_LABEL,d2 as SAMPLING_ONBOARDING_KEEP_DESCRIPTION,d1 as SAMPLING_ONBOARDING_KEEP_SUBTITLE,d0 as SAMPLING_ONBOARDING_KEEP_TITLE,d3 as SAMPLING_ONBOARDING_KEEP_USE_CASE_1,d4 as SAMPLING_ONBOARDING_KEEP_USE_CASE_2,d5 as SAMPLING_ONBOARDING_KEEP_USE_CASE_3,d6 as SAMPLING_ONBOARDING_KEEP_USE_CASE_4,d7 as SAMPLING_ONBOARDING_KEEP_USE_CASE_5,c7 as SAMPLING_ONBOARDING_NOISY_BANNER,c3 as SAMPLING_ONBOARDING_NOISY_DESCRIPTION,c6 as SAMPLING_ONBOARDING_NOISY_PRESET_NAME,c4 as SAMPLING_ONBOARDING_NOISY_PRESET_SECTION,c5 as SAMPLING_ONBOARDING_NOISY_PRESET_TOGGLE_LABEL,c2 as SAMPLING_ONBOARDING_NOISY_SUBTITLE,c1 as SAMPLING_ONBOARDING_NOISY_TITLE,cZ as SAMPLING_ONBOARDING_PRESET_RULES_SECTION,b$ as SAMPLING_ONBOARDING_RECOMMENDED_BADGE,cF as SAMPLING_ONBOARDING_STRATEGY_ADVANCED_BADGE,cG as SAMPLING_ONBOARDING_STRATEGY_ADVANCED_DESC,cH as SAMPLING_ONBOARDING_STRATEGY_ADVANCED_NAME,cC as SAMPLING_ONBOARDING_STRATEGY_DROP_BADGE,cA as SAMPLING_ONBOARDING_STRATEGY_DROP_BULLET_1,cB as SAMPLING_ONBOARDING_STRATEGY_DROP_BULLET_2,cD as SAMPLING_ONBOARDING_STRATEGY_DROP_DESC,cE as SAMPLING_ONBOARDING_STRATEGY_DROP_NAME,cx as SAMPLING_ONBOARDING_STRATEGY_KEEP_BADGE,cv as SAMPLING_ONBOARDING_STRATEGY_KEEP_BULLET_1,cw as SAMPLING_ONBOARDING_STRATEGY_KEEP_BULLET_2,cy as SAMPLING_ONBOARDING_STRATEGY_KEEP_DESC,cz as SAMPLING_ONBOARDING_STRATEGY_KEEP_NAME,cu as SAMPLING_ONBOARDING_STRATEGY_KEEP_WARNING,ct as SAMPLING_ONBOARDING_STRATEGY_SUBTITLE,cs as SAMPLING_ONBOARDING_STRATEGY_TITLE,cc as SAMPLING_ONBOARDING_SUCCESS_BULLET_1,cd as SAMPLING_ONBOARDING_SUCCESS_BULLET_2,ce as SAMPLING_ONBOARDING_SUCCESS_BULLET_3,cb as SAMPLING_ONBOARDING_SUCCESS_INTRO,ca as SAMPLING_ONBOARDING_SUCCESS_SUBTITLE,c9 as SAMPLING_ONBOARDING_SUCCESS_TITLE,cp as SAMPLING_ONBOARDING_WELCOME_BANNER,ci as SAMPLING_ONBOARDING_WELCOME_INTRO,cj as SAMPLING_ONBOARDING_WELCOME_STAGE_1_DESC,ck as SAMPLING_ONBOARDING_WELCOME_STAGE_1_TITLE,cl as SAMPLING_ONBOARDING_WELCOME_STAGE_2_DESC,cm as SAMPLING_ONBOARDING_WELCOME_STAGE_2_TITLE,cn as SAMPLING_ONBOARDING_WELCOME_STAGE_3_DESC,co as SAMPLING_ONBOARDING_WELCOME_STAGE_3_TITLE,ch as SAMPLING_ONBOARDING_WELCOME_SUBTITLE,cg as SAMPLING_ONBOARDING_WELCOME_TITLE,dM as SAMPLING_PAGE_DESCRIPTION,dN as SAMPLING_PAGE_TITLE,eK as SCOPE_AND_LABEL,eJ as SCOPE_GROUP_ANY_OF_HINT,eE as SCOPE_GROUP_LANGUAGES_TITLE,eD as SCOPE_GROUP_NAMESPACES_TITLE,eB as SCOPE_GROUP_SOURCES_TITLE,dZ as SECTION_DURATION,dX as SECTION_ERRORS,aD as SECTION_KEEP_PERCENTAGE,e2 as SECTION_OPERATION,ez as SECTION_SAMPLING_PREVIEW,eL as SECTION_SOURCE_SCOPE,df as STORAGE_KEYS,dE as TITLE_NO_RESULTS,dG as TITLE_NO_RULES,fR as TOKEN_ABOUT_TO_EXPIRE,ew as TOOLTIP_NOTE,eC as UNKNOWN_SOURCE_LABEL,bI as UNNAMED_RULE,dH as getNoResultsSubTitle}from"./chunks/ui-components-
|
|
1
|
+
export{A as ACTION_OPTIONS,fJ as ALL_SOURCES,bC as BTN_CANCEL,dF as BTN_CREATE_FIRST_RULE,bJ as BTN_CREATE_RULE,bF as BTN_DELETE_RULE,dV as BTN_EDIT_AUTO_RULE,bE as BTN_EDIT_RULE,bR as BTN_SAVE,bD as BTN_SAVE_RULE,aY as BUTTON_TEXTS,bG as CATEGORY_DESCRIPTIONS,ex as CATEGORY_LABELS,bK as CATEGORY_TITLES,fK as CREATE_COST_REDUCTION_AUTO_RULE_DRAWER_TITLE,fL as CREATE_HIGHLY_RELEVANT_AUTO_RULE_DRAWER_TITLE,fM as CREATE_NOISY_AUTO_RULE_DRAWER_TITLE,aX as DEFAULT_CLUSTER_ID,aW as DEFAULT_CLUSTER_NAME,dt as DEFAULT_DATA_STREAM_NAME,e0 as DESC_DURATION,d$ as DESC_ERRORS,e3 as DESC_OPERATION,fN as DESC_PERCENTAGE_HIGHLY_RELEVANT,aF as DESC_PERCENTAGE_NOISY,ey as DESC_RULE_TYPE,eG as DESC_SOURCE_SCOPE,aR as DESTINATION_CATEGORIES,ay as DISPLAY_LANGUAGES,D as DISPLAY_TITLES,aq as DOCS_BASE_URL,C as DestinationCategoryTypes,bN as EDIT_COST_REDUCTION_AUTO_RULE_DRAWER_SUBTITLE,bO as EDIT_COST_REDUCTION_AUTO_RULE_DRAWER_TITLE,bL as EDIT_HIGHLY_RELEVANT_AUTO_RULE_DRAWER_SUBTITLE,bM as EDIT_HIGHLY_RELEVANT_AUTO_RULE_DRAWER_TITLE,bP as EDIT_NOISY_AUTO_RULE_DRAWER_SUBTITLE,bQ as EDIT_NOISY_AUTO_RULE_DRAWER_TITLE,bH as EDIT_TITLES,ef as EMPTY_VALUE,al as EXTRACTION_FORMAT_COPY,ai as EXTRACT_ATTRIBUTE_FORM,dD as FILTER_TYPE_ALL,y as FORM_ALERTS,M as INSTRUMENTATION_RULE_OPTIONS,e1 as LABEL_CUSTOM_DURATION,aK as LABEL_CUSTOM_PERCENTAGE,aI as LABEL_DISABLED,dC as LABEL_DISABLED_RULE,ep as LABEL_DROP_ALL,aC as LABEL_DROP_AT_MOST,aH as LABEL_ENABLED,e8 as LABEL_HTTP_ROUTE,ea as LABEL_HTTP_ROUTE_PREFIX,ec as LABEL_KAFKA_TOPIC,eq as LABEL_KEEP_ALL,em as LABEL_KEEP_AT_LEAST,en as LABEL_KEEP_AT_MOST,el as LABEL_KEEP_PERCENTAGE,d_ as LABEL_KEEP_TRACES_DURATION,dY as LABEL_KEEP_TRACES_ERRORS,eb as LABEL_METHOD,et as LABEL_NOTE,dW as LABEL_NO_PREVIEW,ee as LABEL_OPERATION_TYPE,fO as LABEL_RULE_DISABLED,fP as LABEL_RULE_ENABLED,er as LABEL_RULE_NAME,es as LABEL_RULE_TYPE,eo as LABEL_SAMPLE,e5 as LABEL_SERVER_ADDRESS,e7 as LABEL_TEMPLATED_PATH,e9 as LABEL_TEMPLATED_PATH_PREFIX,bu as LANGUAGE_OPTIONS,dg as MONITORS_OPTIONS,eA as NOTE_ENTIRE_CLUSTER,eF as NOTE_SOURCE_SCOPE_LOGIC,fQ as OPENTELEMETRY_EBPF_DISTRO_OPTION,eh as OPERATION_ALL,eg as OPERATION_HTTP_CLIENT,ed as OPERATION_HTTP_SERVER,ei as OPERATION_KAFKA_CONSUMER,ej as OPERATION_KAFKA_PRODUCER,bt as OTEL_DISTRO_NAME_OPTIONS,ek as PERCENTAGE_SECTION_DESCRIPTIONS,ev as PLACEHOLDER_NOTE,e6 as PLACEHOLDER_ROUTE,eu as PLACEHOLDER_RULE_NAME,eI as PLACEHOLDER_SEARCH_SOURCE,e4 as PLACEHOLDER_SERVER_ADDRESS,bd as PROCESS_ATTRIBUTE_NAMES,ac as REGEX_TESTER_DRAWER,aG as SAMPLING_AUTO_RULE_TITLE,dL as SAMPLING_BTN_CREATE_RULE,dJ as SAMPLING_BTN_DOCS,dK as SAMPLING_BTN_REFRESH,aE as SAMPLING_COST_REDUCTION_AUTO_RULE_TITLE,dO as SAMPLING_DELETE_MODAL_APPROVE,dP as SAMPLING_DELETE_MODAL_CANCEL,dQ as SAMPLING_DELETE_MODAL_DESCRIPTION,dR as SAMPLING_DELETE_MODAL_TITLE,bS as SAMPLING_DRAWER_WIDTH,dI as SAMPLING_DUPLICATE_RULE_WARNING,aB as SAMPLING_HIGHLY_RELEVANT_AUTO_RULE_TITLE,cJ as SAMPLING_ONBOARDING_ADVANCED_LEFT_BULLET_1,cK as SAMPLING_ONBOARDING_ADVANCED_LEFT_BULLET_2,cL as SAMPLING_ONBOARDING_ADVANCED_LEFT_BULLET_3,cM as SAMPLING_ONBOARDING_ADVANCED_LEFT_TITLE,cN as SAMPLING_ONBOARDING_ADVANCED_RIGHT_BULLET_1,cO as SAMPLING_ONBOARDING_ADVANCED_RIGHT_BULLET_2,cP as SAMPLING_ONBOARDING_ADVANCED_RIGHT_BULLET_3,cQ as SAMPLING_ONBOARDING_ADVANCED_RIGHT_BULLET_4,cR as SAMPLING_ONBOARDING_ADVANCED_RIGHT_BULLET_5,cS as SAMPLING_ONBOARDING_ADVANCED_RIGHT_TITLE,cU as SAMPLING_ONBOARDING_ADVANCED_SUBTITLE,cT as SAMPLING_ONBOARDING_ADVANCED_TITLE,d9 as SAMPLING_ONBOARDING_AMBIENT_LABEL,cf as SAMPLING_ONBOARDING_BTN_GO_TO,c0 as SAMPLING_ONBOARDING_BTN_NEXT,cI as SAMPLING_ONBOARDING_BTN_READ_MORE,cq as SAMPLING_ONBOARDING_BTN_SKIP,cr as SAMPLING_ONBOARDING_BTN_START,cV as SAMPLING_ONBOARDING_COMMON_BANNER,d8 as SAMPLING_ONBOARDING_COMMON_RULES_SECTION,cY as SAMPLING_ONBOARDING_DROP_DESCRIPTION,cX as SAMPLING_ONBOARDING_DROP_SUBTITLE,cW as SAMPLING_ONBOARDING_DROP_TITLE,c$ as SAMPLING_ONBOARDING_ERROR_PRESET_NAME,c_ as SAMPLING_ONBOARDING_ERROR_PRESET_TOGGLE_LABEL,d2 as SAMPLING_ONBOARDING_KEEP_DESCRIPTION,d1 as SAMPLING_ONBOARDING_KEEP_SUBTITLE,d0 as SAMPLING_ONBOARDING_KEEP_TITLE,d3 as SAMPLING_ONBOARDING_KEEP_USE_CASE_1,d4 as SAMPLING_ONBOARDING_KEEP_USE_CASE_2,d5 as SAMPLING_ONBOARDING_KEEP_USE_CASE_3,d6 as SAMPLING_ONBOARDING_KEEP_USE_CASE_4,d7 as SAMPLING_ONBOARDING_KEEP_USE_CASE_5,c7 as SAMPLING_ONBOARDING_NOISY_BANNER,c3 as SAMPLING_ONBOARDING_NOISY_DESCRIPTION,c6 as SAMPLING_ONBOARDING_NOISY_PRESET_NAME,c4 as SAMPLING_ONBOARDING_NOISY_PRESET_SECTION,c5 as SAMPLING_ONBOARDING_NOISY_PRESET_TOGGLE_LABEL,c2 as SAMPLING_ONBOARDING_NOISY_SUBTITLE,c1 as SAMPLING_ONBOARDING_NOISY_TITLE,cZ as SAMPLING_ONBOARDING_PRESET_RULES_SECTION,b$ as SAMPLING_ONBOARDING_RECOMMENDED_BADGE,cF as SAMPLING_ONBOARDING_STRATEGY_ADVANCED_BADGE,cG as SAMPLING_ONBOARDING_STRATEGY_ADVANCED_DESC,cH as SAMPLING_ONBOARDING_STRATEGY_ADVANCED_NAME,cC as SAMPLING_ONBOARDING_STRATEGY_DROP_BADGE,cA as SAMPLING_ONBOARDING_STRATEGY_DROP_BULLET_1,cB as SAMPLING_ONBOARDING_STRATEGY_DROP_BULLET_2,cD as SAMPLING_ONBOARDING_STRATEGY_DROP_DESC,cE as SAMPLING_ONBOARDING_STRATEGY_DROP_NAME,cx as SAMPLING_ONBOARDING_STRATEGY_KEEP_BADGE,cv as SAMPLING_ONBOARDING_STRATEGY_KEEP_BULLET_1,cw as SAMPLING_ONBOARDING_STRATEGY_KEEP_BULLET_2,cy as SAMPLING_ONBOARDING_STRATEGY_KEEP_DESC,cz as SAMPLING_ONBOARDING_STRATEGY_KEEP_NAME,cu as SAMPLING_ONBOARDING_STRATEGY_KEEP_WARNING,ct as SAMPLING_ONBOARDING_STRATEGY_SUBTITLE,cs as SAMPLING_ONBOARDING_STRATEGY_TITLE,cc as SAMPLING_ONBOARDING_SUCCESS_BULLET_1,cd as SAMPLING_ONBOARDING_SUCCESS_BULLET_2,ce as SAMPLING_ONBOARDING_SUCCESS_BULLET_3,cb as SAMPLING_ONBOARDING_SUCCESS_INTRO,ca as SAMPLING_ONBOARDING_SUCCESS_SUBTITLE,c9 as SAMPLING_ONBOARDING_SUCCESS_TITLE,cp as SAMPLING_ONBOARDING_WELCOME_BANNER,ci as SAMPLING_ONBOARDING_WELCOME_INTRO,cj as SAMPLING_ONBOARDING_WELCOME_STAGE_1_DESC,ck as SAMPLING_ONBOARDING_WELCOME_STAGE_1_TITLE,cl as SAMPLING_ONBOARDING_WELCOME_STAGE_2_DESC,cm as SAMPLING_ONBOARDING_WELCOME_STAGE_2_TITLE,cn as SAMPLING_ONBOARDING_WELCOME_STAGE_3_DESC,co as SAMPLING_ONBOARDING_WELCOME_STAGE_3_TITLE,ch as SAMPLING_ONBOARDING_WELCOME_SUBTITLE,cg as SAMPLING_ONBOARDING_WELCOME_TITLE,dM as SAMPLING_PAGE_DESCRIPTION,dN as SAMPLING_PAGE_TITLE,eK as SCOPE_AND_LABEL,eJ as SCOPE_GROUP_ANY_OF_HINT,eE as SCOPE_GROUP_LANGUAGES_TITLE,eD as SCOPE_GROUP_NAMESPACES_TITLE,eB as SCOPE_GROUP_SOURCES_TITLE,dZ as SECTION_DURATION,dX as SECTION_ERRORS,aD as SECTION_KEEP_PERCENTAGE,e2 as SECTION_OPERATION,ez as SECTION_SAMPLING_PREVIEW,eL as SECTION_SOURCE_SCOPE,df as STORAGE_KEYS,dE as TITLE_NO_RESULTS,dG as TITLE_NO_RULES,fR as TOKEN_ABOUT_TO_EXPIRE,ew as TOOLTIP_NOTE,eC as UNKNOWN_SOURCE_LABEL,bI as UNNAMED_RULE,dH as getNoResultsSubTitle}from"./chunks/ui-components-D_eeOuIL.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"javascript-time-ago/locale/en";import"prism-react-renderer";import"./chunks/vendor-BFqT13Me.js";import"zustand/middleware";import"react-error-boundary";import"react-dom";import"virtua";
|
package/lib/containers/v2.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t,Fragment as o}from"react/jsx-runtime";import{useEffect as n,useMemo as a,useRef as i,useCallback as l,useState as s,Fragment as r,forwardRef as c,useImperativeHandle as d,Children as u,createContext as p,useContext as h,useLayoutEffect as g}from"react";import m,{useTheme as f,css as b,keyframes as v}from"styled-components";import{u as y,n as C,C as S,e as w,f as x,h as T,d as k,b as $,c as E,S as I,j as A,R as N,k as O,l as R,a as D,r as P,o as F,p as L,q as _,s as z,t as M,w as B,x as X,y as V,z as U,A as H,B as G}from"../chunks/helpers-
|
|
1
|
+
import{jsxs as e,jsx as t,Fragment as o}from"react/jsx-runtime";import{useEffect as n,useMemo as a,useRef as i,useCallback as l,useState as s,Fragment as r,forwardRef as c,useImperativeHandle as d,Children as u,createContext as p,useContext as h,useLayoutEffect as g}from"react";import m,{useTheme as f,css as b,keyframes as v}from"styled-components";import{u as y,n as C,C as S,e as w,f as x,h as T,d as k,b as $,c as E,S as I,j as A,R as N,k as O,l as R,a as D,r as P,o as F,p as L,q as _,s as z,t as M,w as B,x as X,y as V,z as U,A as H,B as G}from"../chunks/helpers-Cy9W3KCg.js";import{v as j,F as W,a4 as K,a5 as Y,a6 as J,a7 as q,a8 as Z,a9 as Q,aa as ee,ab as te,l as oe,ac as ne,f as ae,ad as ie,h as le,n as se,ae as re,af as ce,ag as de,ah as ue,ai as pe,aj as he,ak as ge,al as me,am as fe,an as be,m as ve,w as ye,N as Ce,ao as Se,ap as we,aq as xe,ar as Te,as as ke,q as $e,S as Ee,H as Ie,K as Ae,G as Ne,at as Oe,au as Re,av as De,O as Pe,aw as Fe,R as Le,U as _e,Q as ze,V as Me,ax as Be,ay as Xe,az as Ve,aA as Ue,D as He,z as Ge,aB as je,aC as We,aD as Ke,aE as Ye,aF as Je,aG as qe,aH as Ze,aI as Qe,aJ as et,aK as tt,aL as ot,A as nt,aM as at,C as it,aN as lt,aO as st,aP as rt,aQ as ct,aR as dt,aS as ut,s as pt,J as ht,M as gt,E as mt,aT as ft,c as bt,aU as vt,aV as yt,Z as Ct,aW as St,aX as wt,$ as xt,a1 as Tt,aY as kt,aZ as $t,a_ as Et,a$ as It,b0 as At,r as Nt,b1 as Ot,L as Rt,b2 as Dt,b3 as Pt,b4 as Ft,o as Lt,y as _t,b5 as zt,b6 as Mt,b7 as Bt,b8 as Xt,b9 as Vt,ba as Ut,bb as Ht,bc as Gt,bd as jt,be as Wt,bf as Kt,bg as Yt,bh as Jt,bi as qt,bj as Zt,bk as Qt,bl as eo,bm as to,i as oo,j as no,bn as ao,W as io,bo as lo,bp as so,bq as ro,br as co,bs as uo,bt as po,bu as ho,bv as go,bw as mo,bx as fo,by as bo,bz as vo,bA as yo,bB as Co,bC as So,bD as wo,bE as xo,bF as To,bG as ko,bH as $o,bI as Eo,bJ as Io,bK as Ao,bL as No,bM as Oo,bN as Ro,bO as Do,bP as Po,bQ as Fo,bR as Lo,bS as _o,bT as zo,bU as Mo,bV as Bo,bW as Xo,bX as Vo,bY as Uo,bZ as Ho,b_ as Go,b$ as jo,c0 as Wo,c1 as Ko,c2 as Yo,c3 as Jo,c4 as qo,c5 as Zo,c6 as Qo,c7 as en,c8 as tn,c9 as on,ca as nn,cb as an,cc as ln,cd as sn,ce as rn,cf as cn,cg as dn,ch as un,ci as pn,cj as hn,ck as gn,cl as mn,cm as fn,cn as bn,co as vn,cp as yn,cq as Cn,cr as Sn,cs as wn,ct as xn,cu as Tn,cv as kn,cw as $n,cx as En,cy as In,cz as An,cA as Nn,cB as On,cC as Rn,cD as Dn,cE as Pn,cF as Fn,cG as Ln,cH as _n,cI as zn,cJ as Mn,cK as Bn,cL as Xn,cM as Vn,cN as Un,cO as Hn,cP as Gn,cQ as jn,cR as Wn,cS as Kn,cT as Yn,cU as Jn,cV as qn,cW as Zn,cX as Qn,cY as ea,cZ as ta,c_ as oa,c$ as na,d0 as aa,d1 as ia,d2 as la,d3 as sa,d4 as ra,d5 as ca,d6 as da,d7 as ua,d8 as pa,d9 as ha,da as ga,db as ma,dc as fa,dd as ba,de as va,df as ya,dg as Ca,dh as Sa,di as wa,dj as xa,g as Ta,dk as ka,k as $a,dl as Ea,dm as Ia,dn as Aa,dp as Na,dq as Oa,dr as Ra,ds as Da,u as Pa,_ as Fa,dt as La,du as _a,dv as za,dw as Ma,dx as Ba,dy as Xa,dz as Va,dA as Ua,dB as Ha,dC as Ga,dD as ja,dE as Wa,dF as Ka,dG as Ya,dH as Ja,dI as qa,dJ as Za,dK as Qa,dL as ei,dM as ti,dN as oi,dO as ni,dP as ai,dQ as ii,dR as li,dS as si}from"../chunks/ui-components-D_eeOuIL.js";import{TrashIcon as ri,PlusIcon as ci,ArrowRightIcon as di,VSquareIcon as ui,XSquareIcon as pi,BookIcon as hi,DeleteIcon as gi,EditIcon as mi,GoLogo as fi,JavaLogo as bi,ChevronRightIcon as vi,ActionIcon as yi,DestinationIcon as Ci,ChevronUpIcon as Si,ChevronDownIcon as wi,VIcon as xi,XIcon as Ti,InstrumentationRuleIcon as ki,SourceIcon as $i,NamespacesIcon as Ei,SettingsIcon as Ii,PodIcon as Ai,OdigosLogo as Ni,K8sLogo as Oi,RefreshIcon as Ri,ExclamationCircleIcon as Di,QuestionCircleIcon as Pi,InboundIcon as Fi,OutboundIcon as Li,UserIcon as _i,TerminalIcon as zi,SearchIcon as Mi,MinusIcon as Bi,ExpandIcon as Xi,CopyIcon as Vi,DotIcon as Ui,DownloadIcon as Hi,RefreshLeftArrowIcon as Gi,VmLogo as ji,SamplingIcon as Wi,ExclamationTriangleIcon as Ki,KeyIcon as Yi,DiagnoseIcon as Ji,StarIcon as qi,ArrowIcon as Zi,ConnectionsIcon as Qi,FilterIcon as el,DataStreamIcon as tl,PipelineCollectorIcon as ol,ArrowDownSquareIcon as nl,ArrowUpSquareIcon as al,GatewayIcon as il,YamlIcon as ll}from"../icons.js";import{d as sl}from"../chunks/use-odigos-api-W15RTo5l.js";import{S as rl,D as cl,I as dl,a as ul,A as pl,P as hl,b as gl,c as ml,R as fl,O as bl,d as vl,e as yl,f as Cl,W as Sl,g as wl,C as xl,Y as Tl,h as kl,i as $l,U as El}from"../chunks/index-D2nQHheF.js";import{O as Il}from"../chunks/connections-scope-DDNmfpzA.js";import{u as Al,f as Nl,g as Ol,e as Rl,i as Dl,h as Pl,S as Fl,k as Ll,E as _l,l as zl,m as Ml,j as Bl,b as Xl,d as Vl,a as Ul,A as Hl,R as Gl,c as jl,D as Wl}from"../chunks/source-instrument-form-context-BJGS7jKX.js";import{createPortal as Kl}from"react-dom";import"zustand";import"javascript-time-ago";import"javascript-time-ago/locale/en";import"prism-react-renderer";import"../chunks/vendor-BFqT13Me.js";import"zustand/middleware";import"react-error-boundary";import"virtua";import"@apollo/client";import"@apollo/client/link/error";import"@apollo/client/link/context";import"@apollo/client/utilities";const Yl=[{id:"CREDIT_CARD",label:"Credit card"}],Jl=[{id:j.CollectContainerAttributes,label:"Collect container attributes"},{id:j.CollectReplicaSetAttributes,label:"Collect ReplicaSet attributes"},{id:j.CollectWorkloadId,label:"Collect workload ID"},{id:j.CollectClusterId,label:"Collect cluster ID"}],ql=[{id:Z.Pod,label:Z.Pod},{id:Z.Namespace,label:Z.Namespace},{id:Z.Node,label:Z.Node}],Zl=[{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:ql}],Ql=[{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:ql}],es=/^[a-zA-Z]$/,ts=new Set(["*","+","?"]),os=new Set(["^","$"]),ns={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"},as=m.div`
|
|
2
2
|
padding: 8px 16px;
|
|
3
3
|
border-radius: 6px;
|
|
4
4
|
border: 1px solid ${({theme:e})=>e.v2.colors.silver[500]};
|
|
@@ -188,7 +188,7 @@ import{jsxs as e,jsx as t,Fragment as o}from"react/jsx-runtime";import{useEffect
|
|
|
188
188
|
${Rr}:hover & {
|
|
189
189
|
visibility: visible;
|
|
190
190
|
}
|
|
191
|
-
`,Pr=({clusterId:o,namespaceName:n,checkbox:a,isFutureApps:i,selectedCounts:l,isActive:s,onActive:r,handleSourceChange:c})=>{const{isVm:d}=y(),u=e=>{r(),c({clusterId:o,workloadId:{namespace:n},auto:e.auto,selected:e.all})};return t(Rr,{children:t(ar,{dataId:`namespace-${n}`,withCarret:!0,title:n,isSelected:s,onClick:r,isPartiallyChecked:a.partial,isChecked:a.all,onCheckboxChange:e=>u({auto:e,all:e}),children:e(se,{$gap:12,children:[!d&&t(Dr,{$visible:s||i,children:t(De,{text:Er,children:t(Q,{label:$r,labelAlign:ee.Left,size:vt.S,value:i,onChange:e=>u({auto:e,all:e||void 0})})})}),e(se,{$gap:8,children:[t(ae,{variant:yt.Span,size:le.XXXS,color:ie.Secondary,align:"right",children:kr}),t(Be,{label:`${l.sourced}/${l.total}`,status:s?Ee.Default:ft.Unknown,minWidth:"42px"})]})]})})})},Fr=({withCollapse:e,clusterId:o,clusterName:n,namespaces:i,selectedArea:l,setSelectedArea:s,handleSourceChange:r})=>{const c=a(()=>i.map(({name:e,totalWorkloads:a,selectedCount:i,isAllSourced:c,isSomeSourced:d,isFutureApps:u})=>t(Pr,{clusterId:o,namespaceName:e,isFutureApps:u,checkbox:{all:c||u,partial:d},selectedCounts:{sourced:i,total:a},isActive:l.clusterId===o&&l.namespaceName===e,onActive:()=>s({clusterId:o,clusterName:n,namespaceName:e}),handleSourceChange:r},`${o}#${e}`)),[o,n,i,l]);return e?t(cr,{title:n,list:c,noBgColor:!0}):c},Lr=({onClose:o,onBack:i,onNext:l,selectedConnectionIds:r,setSelectedConnectionIds:c,withOverlay:d,disableAnimation:u})=>{const{isVm:p}=y(),{sourcesApi:h,snapshotsApi:g,namespacesApi:m}=sl(),{data:f,loading:b}=g.useSnapshots(),{items:v,loading:C}=m.useNamespaces(),S=yr(p),{selectedStreamName:w}=Ge(),{progress:x,resetProgress:T}=Ct(),{isFetching:k,setIsFetching:$,setSnapshots:E,formData:I,handleSourceChange:A,handleSelectAll:N,formDiff:O,isFormDirty:R}=Bl(),D=a(()=>{if(f)return f;const e=v;return e.length?{clusters:[{clusterId:wt,clusterName:St,namespaces:e.map(e=>({name:e.name,selected:e.markedForInstrumentation&&e.dataStreamNames.includes(w),workloads:e.workloads?.map(e=>({namespace:e.id.namespace,name:e.id.name,kind:e.id.kind,selected:(e.markedForInstrumentation?.markedForInstrumentation??!1)&&(e.dataStreamNames?.includes(w)??!1)}))||[]}))}]}:null},[f,v,w]);n(()=>{$(b||C),D&&E(D)},[D,b,C,$,E]);const[P,F]=s(""),[L,_]=s(mt.Namespace),[z,M]=s({showOnlySelected:!1}),[B,X]=s({clusterId:"",clusterName:"",namespaceName:""}),V=(({isFetching:o,formData:n,handleSourceChange:i,handleSelectAll:l,selectedArea:s,setSelectedArea:r,searchText:c,searchBy:d,filters:u})=>{const{isVm:p}=y(),h=yr(p),g=a(()=>n.map(e=>{const t=[...e.namespaces].sort((e,t)=>e.name.localeCompare(t.name)).filter(e=>zl(e,c,u)).map(e=>({name:e.name,totalWorkloads:e.workloads.length,...Ml(e)}));return{clusterId:e.clusterId,clusterName:e.clusterName,visibleNamespaces:t}}),[n,c,u]),m=a(()=>{let e=!1;for(const{visibleNamespaces:t}of g)for(const{totalWorkloads:o,selectedCount:n}of t)if(e=!0,n!==o)return!1;return e},[g]),{list:f,withFilterCount:b,filteredCount:v,totalCount:C}=a(()=>{const e=g.map(({clusterId:e,clusterName:o,visibleNamespaces:n})=>n.length?t(Fr,{withCollapse:g.length>1,clusterId:e,clusterName:o,namespaces:n,selectedArea:s,setSelectedArea:r,handleSourceChange:i},e):null),o=e.filter(e=>null!==e);return{list:o,withFilterCount:o.length!==e.length,filteredCount:o.length,totalCount:e.length}},[g,s]);return{width:"60%",header:e(se,{$width:"100%",$gap:12,$justifyContent:"space-between",children:[e(se,{$gap:8,children:[t(ae,{size:le.XS,nowrap:!0,children:h.groupColumnHeader}),t(De,{text:b?He.FILTERED_COUNT_TOOLTIP:void 0,children:t(Be,{label:`${b?`${v} / ${C}`:C}`,status:ft.Unknown})})]}),t(ae,{"data-id":"namespaces-select-all",onClick:()=>l({boolean:!m,searchText:c,searchBy:d,filters:u}),disabled:!f.length,size:le.XS,children:xr(m)})]}),list:f.length?f:o?[t(at,{$height:"100%",children:t(ct,{title:h.fetchingGroups.title,subTitle:h.fetchingGroups.subTitle,withSpinner:!0})},"loading")]:[t(at,{$height:"100%",children:t(Ce,c?{icon:Ei,title:Cr,subTitle:h.noGroupMatchedFilter(c)}:{icon:Ei,title:h.noGroups.title,subTitle:h.noGroups.subTitle})},"no-data")]}})({isFetching:k,formData:I,handleSourceChange:A,handleSelectAll:N,selectedArea:B,setSelectedArea:X,searchText:L===mt.Namespace?P:"",searchBy:L,filters:z}),U=(({formData:o,handleSourceChange:n,handleSelectAll:i,selectedArea:l,searchText:s,searchBy:r,filters:c})=>{const{tier:d,isVm:u}=y(),p=yr(u),h=d===bt.Onprem,g=a(()=>l.value.namespaceName?o.find(({clusterId:e})=>e===l.value.clusterId)?.namespaces.find(({name:e})=>e===l.value.namespaceName):void 0,[o,l.value.clusterId,l.value.namespaceName]),m=a(()=>g?[...g.workloads].sort((e,t)=>e.name.localeCompare(t.name)).filter(e=>Ll(e,s,c)):[],[g,s,c]),f=a(()=>!!m.length&&m.every(({selected:e})=>e),[m]),b=a(()=>{if(!g)return[];const{clusterId:e}=l.value,{name:o}=g;return m.map(({name:a,selected:i,kind:l})=>{const s=!u&&!h&&_l.has(l);return t(Or,{workloadName:a,workloadKind:l,isChecked:!s&&(i||!1),onToggle:()=>n({clusterId:e,workloadId:{namespace:o,name:a,kind:l}}),disabled:s,disabledReason:Ir},`${e}#${o}#${a}#${l}`)})},[m,g,l.value.clusterId]),{withFilterCount:v,filteredCount:C,totalCount:S}=a(()=>{const e=g?.workloads.length??0;return{withFilterCount:m.length!==e,filteredCount:m.length,totalCount:e}},[m,g]);return{width:"40%",header:e(se,{$width:"100%",$gap:12,$justifyContent:"space-between",children:[e(se,{$gap:8,children:[t(ae,{size:le.XS,nowrap:!0,children:l.value.namespaceName?`${l.value.namespaceName} > ${p.itemColumnHeader}`:p.itemColumnHeader}),t(De,{text:v?He.FILTERED_COUNT_TOOLTIP:void 0,children:t(Be,{label:`${v?`${C} / ${S}`:S}`,status:ft.Unknown})})]}),t(ae,{"data-id":"workloads-select-all",onClick:()=>i({clusterId:l.value.clusterId,namespaceName:l.value.namespaceName,boolean:!f,searchText:s,searchBy:r,filters:c}),disabled:!b.length,size:le.XS,children:xr(f)})]}),list:b.length?b:[t(at,{$height:"100%",children:t(Ce,g?s?{icon:$i,title:Cr,subTitle:wr(s)}:{icon:$i,title:Sr,subTitle:p.noItemsInGroupSubTitle}:{icon:$i,title:p.selectGroupPrompt.title,subTitle:p.selectGroupPrompt.subTitle})},"no-data")]}})({formData:I,handleSourceChange:A,handleSelectAll:N,selectedArea:{value:B},searchText:L===mt.Source?P:"",searchBy:L,filters:z});return t(Sl,{isOpen:!0,withOverlay:d,disableAnimation:u,onClose:o?()=>{T(xt.BulkInstrumenting),o()}:void 0,onBack:i?()=>i(O):void 0,onNext:l?()=>l(O):void 0,nextIsSkip:!R,onSave:()=>h.persistV2(O),header:{icon:$i,title:He.ADD_SOURCE,subTitle:He.ADD_SOURCES_DESCRIPTION},connectionIds:r&&c?{value:r,setValue:c}:void 0,search:{value:P,onChange:e=>{F(e),L===mt.Namespace&&X({clusterId:"",clusterName:"",namespaceName:""})},placeholder:S.searchPlaceholder(L),segment:{options:[{label:S.groupSegmentLabel,value:mt.Namespace},{label:S.itemSegmentLabel,value:mt.Source}],selected:L,setSelected:_}},filters:e(se,{$gap:8,children:[t(ae,{size:le.XXXS,color:ie.Secondary,nowrap:!0,children:Tr}),t(Q,{name:"filter-selected",size:vt.S,label:kr,value:z.showOnlySelected,onChange:e=>M(t=>({...t,showOnlySelected:e}))})]}),isFormDirty:R,isFetching:k,progress:{title:He.CREATING_SOURCES,subTitle:He.CREATING_SOURCES_SUBTITLE,percentage:x[xt.BulkInstrumenting]?.percentage||0},leftColumn:V,rightColumn:U})},_r=(e,t)=>{const o=[{id:"type",title:He.TYPE,label:t.label},{id:"status",title:He.STATUS,badge:{status:e.disabled?ft.Unknown:Ee.Success,label:e.disabled?He.DISABLED:He.ENABLED}}],n=e.signals?.map(e=>{let t=e.toLowerCase();return t=`${t.charAt(0).toUpperCase()}${t.slice(1)}`,t}).join(", ");return n&&o.push({id:"signals",title:He.SIGNALS_FOR_PROCESSING,label:n}),e.name&&o.push({id:"name",title:He.NAME,label:e.name}),e.notes&&o.push({id:"notes",title:He.NOTES,label:e.notes}),o},zr=({onClose:i,actionId:r})=>{const c=f(),{actionsApi:d}=sl(),{items:u}=d.useActions(),{selectedOption:p,loadAction:h,validateFormData:g,genericForm:m}=Al(),[b,v]=s(!1),[y,C]=s(!1),[S,w]=s(null),x=b&&!!m?.isFormDirty,T=a(()=>u?.find(e=>Tt(e)===r),[r,u]),k=a(()=>nt.find(({type:e})=>e===T?.type)??null,[T?.type]);n(()=>{T&&h(T)},[T]);const $=l(()=>{T&&v(!0)},[T]),E=l(()=>{T&&(h(T),v(!1))},[T,h]),I=l(()=>{x?w("close"):i()},[x,i]),A=l(()=>{x?w("cancel"):E()},[x,E]),N=l(()=>{const e=S;w(null),"close"===e?(E(),i()):E()},[S,E,i]),O=l(async()=>{if(T){const{errorMessage:e,preparedFormData:t}=g();e||(await d.update(T.id,t),v(!1))}},[T,g,d]),R=l(()=>{T&&C(!0)},[T]),D=l(async()=>{T&&(await d.remove(T.id,T.type),i())},[T,d,i]);if(!T||!k)return null;const P=(e=>{const t=[],{type:o,fields:n}=e,a=e=>({status:e?Ee.Success:ft.Unknown,label:e?"True":"False",invertColors:!0});if(o===ye.K8sAttributes&&(t.push({id:"collectContainerAttributes",title:"Collect Container Attributes",badge:a(n.collectContainerAttributes)}),t.push({id:"collectReplicaSetAttributes",title:"Collect ReplicaSet Attributes",badge:a(n.collectReplicaSetAttributes)}),t.push({id:"collectWorkloadId",title:"Collect Workload ID",badge:a(n.collectWorkloadId)}),t.push({id:"collectClusterId",title:"Collect Cluster ID",badge:a(n.collectClusterId)}),n.labelsAttributes?.forEach(({labelKey:e,attributeKey:o,from:a,fromSources:i},l)=>{const s=i?.length?i.join(", "):a||Z.Pod,r=(n.labelsAttributes?.length??0)>1?`Label #${l+1} `:"Label ";t.push({id:`label-${l}-key`,title:`${r}Key`,label:e}),t.push({id:`label-${l}-attr`,title:`${r}Attribute Key`,label:o}),t.push({id:`label-${l}-from`,title:`${r}From`,label:s})}),n.annotationsAttributes?.forEach(({annotationKey:e,attributeKey:o,from:a,fromSources:i},l)=>{const s=i?.length?i.join(", "):a||Z.Pod,r=(n.annotationsAttributes?.length??0)>1?`Annotation #${l+1} `:"Annotation ";t.push({id:`annotation-${l}-key`,title:`${r}Key`,label:e}),t.push({id:`annotation-${l}-attr`,title:`${r}Attribute Key`,label:o}),t.push({id:`annotation-${l}-from`,title:`${r}From`,label:s})})),o===ye.AddClusterInfo&&(t.push({id:"overwriteExistingValues",title:"Overwrite Existing Values",badge:a(n.overwriteExistingValues)}),n.clusterAttributes?.forEach(({attributeName:e,attributeStringValue:o},n)=>{t.push({id:`cluster-attr-${n}`,title:e,label:o})})),o===ye.DeleteAttributes&&n.attributeNamesToDelete?.forEach((e,o)=>{t.push({id:`del-attr-${o}`,title:"Attribute"+((n.attributeNamesToDelete?.length??0)>1?` #${o+1}`:""),label:e})}),o===ye.RenameAttributes&&Object.entries(n.renames||{}).forEach(([e,o],n)=>{t.push({id:`rename-${n}`,title:e,label:o})}),o===ye.PiiMasking&&n.piiCategories?.forEach((e,o)=>{t.push({id:`pii-${o}`,title:"Category"+((n.piiCategories?.length??0)>1?` #${o+1}`:""),label:e})}),o===ye.ExtractAttribute){const e=n.extractAttribute?.extractions??[];e.forEach(({targetAttributeName:o,lookupKey:n,dataFormat:a,regex:i},l)=>{const s=e.length>1?`Extraction #${l+1} `:"Extraction ";t.push({id:`extract-${l}-target`,title:`${s}New Attribute Name`,label:o||"-"}),n&&t.push({id:`extract-${l}-lookupKey`,title:`${s}Lookup Key`,label:n}),a&&t.push({id:`extract-${l}-format`,title:`${s}Data Format`,label:a}),i&&t.push({id:`extract-${l}-regex`,title:`${s}Regex`,label:i})})}return o===ye.URLTemplatization&&n.urlTemplatizationRulesGroups?.forEach((e,o)=>{const a=(n.urlTemplatizationRulesGroups?.length??0)>1?`Group #${o+1} `:"Group ";e.filterK8sNamespace&&t.push({id:`group-${o}-ns`,title:`${a}Namespace`,label:e.filterK8sNamespace}),e.workloadFilters?.forEach((n,i)=>{const l=[n.kind,n.name].filter(Boolean).join("/");l&&t.push({id:`group-${o}-wf-${i}`,title:`${a}Workload${(e.workloadFilters?.length??0)>1?` #${i+1}`:""}`,label:l})});const i=e.templatizationRules?.map(e=>e.template).filter(Boolean).join(", ");i&&t.push({id:`group-${o}-templates`,title:`${a}Templates`,label:i}),e.notes&&t.push({id:`group-${o}-notes`,title:`${a}Notes`,label:e.notes})}),t})(T);return e(o,{children:[t(oe,{isOpen:!0,header:{icon:At(T.type),title:k.label,onClose:I,actions:[{id:"edit-action-btn-edit",label:kt.EDIT,icon:mi,active:b,onClick:$},{id:"edit-action-btn-delete",label:kt.DELETE,icon:ri,color:c.v2.colors.red[500],active:y,onClick:R}]},footer:{actions:b?[{"data-id":"edit-action-btn-cancel",label:kt.CANCEL,variant:de.Secondary,onClick:A},{"data-id":"edit-action-btn-save",label:kt.SAVE,variant:de.Primary,onClick:O}]:[]},children:t($t,{$padding:"4px 12px 12px",children:b&&p?t(Rs,{}):t(W,{$gap:16,children:e(Et,{bgTint:"1000",children:[e(Et,{bgTint:"900",children:[t(It,{conditions:T.conditions||[]}),t(Et,{bgTint:"800",cellsPerRow:2,items:_r(T,k)})]}),!!P?.length&&t(Et,{bgTint:"900",richTitle:{title:"Configuration"},withCollapse:!0,collapseIsDefaultOpen:!0,children:t(Et,{bgTint:"800",cellsPerRow:2,items:P})})]})})})}),t(wl,{target:"action",isOpen:y,onClose:()=>C(!1),onApprove:D}),t(xl,{isOpen:null!==S,onClose:()=>w(null),onApprove:N})]})},Mr=({onClose:o,connections:l,selectedConnectionIds:r,setSelectedConnectionIds:c})=>{const{configApi:d}=sl(),[u,p]=s(""),[h,g]=s({showOnlySelected:!1}),m=a(()=>l.filter(e=>{const t=!u||e.name.toLowerCase().includes(u.toLowerCase()),o=!h.showOnlySelected||h.showOnlySelected&&r.includes(e.id);return t&&o}),[l.length,r.length,u,h]),f=e=>{c(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},b=1===r.length?r[0]:void 0,{data:v,loading:y}=d.useEffectiveConfig(b?{id:b}:void 0,{skip:!b}),C=a(()=>{if(b&&v)return{rollout:{automaticRolloutDisabled:v.rollout?.automaticRolloutDisabled??!1}}},[b,v]),{formData:S,handleFormChange:w,areFormValuesEqual:x,resetFormData:T}=Nt(C||{rollout:{automaticRolloutDisabled:!1}}),k=i(T);k.current=T,n(()=>{C&&k.current(C)},[C]);const $=a(()=>r.length>1||void 0!==C&&!x(C,S),[r.length,C,S]);return t(Sl,{isOpen:!0,onClose:o,onSave:async()=>await(d.applyConfigurations?.(S,r))??void 0,header:{icon:Ii,title:"Cluster Configuration"},connectionIds:{value:r,setValue:c},search:{placeholder:"Search by cluster name",value:u,onChange:p},filters:e(se,{$gap:8,children:[t(ae,{size:le.XXXS,color:ie.Secondary,nowrap:!0,children:"Show only:"}),t(Q,{size:vt.S,label:"Selected",value:h.showOnlySelected,onChange:e=>g(t=>({...t,showOnlySelected:e}))})]}),isFormDirty:$,isFetching:y,leftColumn:{width:"35%",header:e(se,{$width:"100%",$gap:12,$justifyContent:"space-between",children:[e(se,{$gap:8,children:[t(ae,{size:le.XS,children:"Clusters"}),t(Be,{label:m.length,status:ft.Unknown})]}),e(se,{$gap:8,children:[t(ae,{size:le.XXXS,color:ie.Secondary,align:"right",children:"Selected clusters"}),t(Be,{label:`${r.length}/${m.length}`,status:ft.Unknown})]})]}),list:m.map(e=>t(ar,{title:e.name,isChecked:r.includes(e.id),onClick:()=>f(e.id),onCheckboxChange:()=>f(e.id)},e.id))},rightColumn:{width:"65%",header:t(ae,{size:le.XS,children:"Configurations"}),list:[t(Q,{label:"Automatic rollout disabled",tooltip:"Odigos automatically triggers a one-time rollout for workloads when instrumenting or uninstrumenting, ensuring that changes are applied without requiring manual intervention. When automatic rollout is disabled, Odigos will not restart workloads, and users will need to manually trigger rollouts after adding or removing sources.",value:S.rollout?.automaticRolloutDisabled||!1,onChange:e=>w("rollout.automaticRolloutDisabled",e)},"automatic-rollout-disabled")]}})},Br=e=>{const t=[{id:"type",title:He.TYPE,label:e.destinationType.displayName},{id:"status",title:He.STATUS,badge:{status:e.disabled?ft.Unknown:Ee.Success,label:e.disabled?He.DISABLED:He.ENABLED}}],o=Ae(e.exportedSignals).map(e=>{let t=e.toLowerCase();return t=`${t.charAt(0).toUpperCase()}${t.slice(1)}`,t}).join(", ");return o&&t.push({id:"monitors",title:He.MONITORS,label:o}),e.name&&t.push({id:"name",title:He.NAME,label:e.name}),t},Xr=({onClose:r,destinationId:c})=>{const d=f(),{isVm:u}=y(),{destinationsApi:p}=sl(),{items:h}=p.useDestinations(),{data:g,loading:m}=p.useDestinationCategories(),{selectedStreamName:b}=Ge(),{activeForm:v,loadDestination:C,validateFormData:S,genericForm:w}=Nl(),x=i(null),[T,k]=s(!1),[$,E]=s(!1),[I,A]=s(null),N=T&&!!w?.isFormDirty,O=a(()=>Dt(h,b),[h,b]),R=a(()=>O?.find(e=>Tt(e)===c),[c,O]),D=g?.destinationCategories?.categories??null;n(()=>{R&&D&&C(R,D)},[R,D]);const P=a(()=>R&&D?Pt(D,R):[],[R,D]),F=l(()=>{R&&k(!0)},[R]),L=l(()=>{R&&D&&(C(R,D),k(!1))},[R,D,C]),_=l(()=>{N?A("close"):r()},[N,r]),z=l(()=>{N?A("cancel"):L()},[N,L]),M=l(()=>{const e=I;A(null),"close"===e?(L(),r()):L()},[I,L,r]),B=l(async()=>{if(R){const{errorMessage:e,preparedFormData:t}=S();e||(await p.update(R.id,Oe(t)),k(!1))}},[R,S,p]),X=l(()=>{R&&E(!0)},[R]),V=l(async()=>{R&&(await p.remove(R.id),r())},[R,p,r]);if(!R)return null;const{icon:U,iconSrc:H}=ut(R.destinationType.type),G=((e,t)=>{const o=[],n=Ot(e,t),a=n.map(e=>({name:e.key,value:e.value})),i=Ae(e.exportedSignals);let l=[];const s=()=>{l.length&&(o.push({kind:"cells",id:`cells-${o.length}`,items:l}),l=[])};return n.forEach(({key:e,name:n,value:r})=>{const c=t.find(t=>t.name===e),{secret:d,componentType:u,componentProperties:p,hideFromReadData:h,customReadDataLabels:g}=c||{};if(h?.length&&ke(h,i,a))return;const{type:m}=ht(p,{type:""}),f=d||"password"===m;if(g?.length)g.forEach(({condition:t,...o},n)=>{t==r&&l.push({id:`${e}-custom-${n}`,title:o.title,label:o.value})});else if(r)if(f)l.push({id:e,title:n,label:new Array(10).fill("•").join("")});else{if(u===Rt.MultiInput){const t=ht(r,null);if(Array.isArray(t)&&t.length)return s(),void o.push({kind:"list",id:e,title:n,items:t.map((t,o)=>({id:`${e}-${o}`,label:String(t)}))})}if(u===Rt.KeyValuePair){const t=ht(r,null);if(Array.isArray(t)&&t.length)return s(),void o.push({kind:"pairs",id:e,title:n,items:t.map((t,o)=>{const n=t&&"object"==typeof t?t:{};return{id:`${e}-${o}`,title:null!=n.key?String(n.key):"",label:null!=n.value?String(n.value):""}})})}l.push({id:e,title:n,label:r})}else l.push({id:e,title:n,label:"-"})}),s(),o})(R,P);return e(o,{children:[t(oe,{isOpen:!0,header:{icon:U,iconSrc:H,title:R.name||R.destinationType.displayName,onClose:_,actions:[{id:"edit-destination-btn-edit",label:kt.EDIT,icon:mi,active:T,onClick:F},{id:"edit-destination-btn-delete",label:kt.DELETE,icon:ri,color:d.v2.colors.red[500],active:$,onClick:X}]},footer:{actions:T?[{"data-id":"edit-destination-btn-cancel",label:kt.CANCEL,variant:de.Secondary,onClick:z},...v?.option.testConnectionSupported&&!u?[{"data-id":"edit-destination-btn-test-connection",label:kt.TEST_CONNECTION,variant:de.Secondary,onClick:()=>x.current?.testConnection()}]:[],{"data-id":"edit-destination-btn-save",label:kt.SAVE,variant:de.Primary,onClick:B}]:[]},children:t($t,{$padding:"4px 12px 12px",children:m?t(at,{$height:"50vh",children:t(ct,{withSpinner:!0})}):T&&v?t(Fs,{ref:x,isEdit:!0}):t(W,{$gap:16,children:e(Et,{bgTint:"1000",children:[e(Et,{bgTint:"900",children:[!u&&t(It,{conditions:R.conditions||[]}),t(Et,{bgTint:"800",cellsPerRow:2,items:Br(R)})]}),!!G.length&&t(Et,{bgTint:"900",richTitle:{title:"Configuration"},withCollapse:!0,collapseIsDefaultOpen:!0,children:G.map(e=>"cells"===e.kind?t(Et,{bgTint:"800",cellsPerRow:2,items:e.items},e.id):(e.kind,t(Et,{bgTint:"800",richTitle:{title:e.title},cellsPerRow:2,items:e.items},e.id)))})]})})})}),t(wl,{target:"destination",isOpen:$,onClose:()=>E(!1),onApprove:V}),t(xl,{isOpen:null!==I,onClose:()=>A(null),onApprove:M})]})},Vr=(e,t)=>{const o=[{id:"type",title:He.TYPE,label:t.label},{id:"status",title:He.STATUS,badge:{status:e.disabled?ft.Unknown:Ee.Success,label:e.disabled?He.DISABLED:He.ENABLED}}];return e.ruleName&&o.push({id:"name",title:He.NAME,label:e.ruleName}),e.profileName&&o.push({id:"profile",title:He.MANAGED_BY_PROFILE,label:e.profileName}),e.notes&&o.push({id:"notes",title:He.NOTES,label:e.notes}),o},Ur=({onClose:i,ruleId:r})=>{const c=f(),{instrumentationRulesApi:d}=sl(),{items:u}=d.useRules(),{addNotification:p}=Lt(),{selectedOption:h,loadRule:g,validateFormData:m,genericForm:b}=Ol(),[v,y]=s(!1),[C,S]=s(!1),[w,x]=s(null),T=v&&!!b?.isFormDirty,k=a(()=>u?.find(e=>Tt(e)===r),[r,u]),$=a(()=>gt.find(({type:e})=>e===k?.type)??null,[k?.type]);n(()=>{k&&g(k)},[k]);const E=l(()=>{if(k){if(!k.mutable)return void p({type:Ee.Warning,title:_t.FORBIDDEN,message:_t.CANNOT_EDIT_RULE,crdType:mt.InstrumentationRule,target:k.ruleId,hideFromHistory:!0});y(!0)}},[k,p]),I=l(()=>{k&&(g(k),y(!1))},[k,g]),A=l(()=>{T?x("close"):i()},[T,i]),N=l(()=>{T?x("cancel"):I()},[T,I]),O=l(()=>{const e=w;x(null),"close"===e?(I(),i()):I()},[w,I,i]),R=l(async()=>{if(k){const{errorMessage:e,preparedFormData:t}=m();e||(await d.update(k.ruleId,t,k.type),y(!1))}},[k,m,d]),D=l(()=>{if(k){if(!k.mutable)return void p({type:Ee.Warning,title:_t.FORBIDDEN,message:_t.CANNOT_DELETE_RULE,crdType:mt.InstrumentationRule,target:k.ruleId,hideFromHistory:!0});S(!0)}},[k,p]),P=l(async()=>{k&&(await d.remove(k.ruleId,k.type),i())},[k,d,i]);if(!k||!$)return null;const F=((e,o)=>{const n=[];return e.payloadCollection&&Object.entries(e.payloadCollection).forEach(([e,o])=>{o&&n.push(t(ae,{size:le.XS,children:`• ${Ft(e).toLowerCase()}`},e))}),e.codeAttributes&&Object.entries(e.codeAttributes).forEach(([e,o])=>{o&&n.push(t(ae,{size:le.XS,children:`• ${Ft(e).toLowerCase()}`},e))}),e.headersCollection?.[Pe.HeaderKeys]?.length&&e.headersCollection[Pe.HeaderKeys].forEach(e=>{e&&n.push(t(ae,{size:le.XS,children:e},e))}),e.customInstrumentations&&(e.customInstrumentations[ze.Java]?.forEach((e,a)=>{const i=new _e(e.className,e.methodName);if(i.Verify()){0===a&&n.push(t(ae,{size:le.XS,children:"Java Custom Probes:"},"java-custom-probes"));const e=i.toString();n.push(t(ae,{size:le.XXS,color:o.v2.colors.grey[200],children:`• ${e}`},e))}}),e.customInstrumentations[ze.Golang]?.forEach((e,a)=>{const i=new Le(e.packageName,e.functionName,e.receiverName,e.receiverMethodName);if(i.Verify()){0===a&&n.push(t(ae,{size:le.XS,children:"Golang Custom Probes:"},"golang-custom-probes"));const e=i.toString();n.push(t(ae,{size:le.XXS,color:o.v2.colors.grey[200],children:`• ${e}`},e))}})),n})(k,c);return e(o,{children:[t(oe,{isOpen:!0,header:{icon:Mt(k.type),title:$.label,onClose:A,actions:[{id:"edit-rule-btn-edit",label:kt.EDIT,icon:mi,active:v,onClick:E},{id:"edit-rule-btn-delete",label:kt.DELETE,icon:ri,color:c.v2.colors.red[500],active:C,onClick:D}]},footer:{actions:v?[{"data-id":"edit-rule-btn-cancel",label:kt.CANCEL,variant:de.Secondary,onClick:N},{"data-id":"edit-rule-btn-save",label:kt.SAVE,variant:de.Primary,onClick:R}]:[]},children:t($t,{$padding:"4px 12px 12px",children:v&&h?t(Us,{}):t(W,{$gap:16,children:e(Et,{bgTint:"1000",children:[e(Et,{bgTint:"900",children:[t(It,{conditions:k.conditions||[]}),t(Et,{bgTint:"800",cellsPerRow:2,items:Vr(k,$)})]}),t(ul,{readOnly:!0,scopes:k.sourceScopes??null}),!!F.length&&t(Et,{bgTint:"900",richTitle:{title:"Collect"},withCollapse:!0,collapseIsDefaultOpen:!0,children:t(Et,{bgTint:"800",children:F})}),!!$.supportedLanguages.length&&t(Et,{bgTint:"900",richTitle:{title:"Supported languages"},withCollapse:!0,collapseIsDefaultOpen:!0,children:t(Et,{bgTint:"800",children:t(se,{$gap:12,$wrap:"wrap",children:$.supportedLanguages.map(e=>t(zt,{label:Xe[e],leftIcon:Ve(e),flex:"0.5"},e))})})})]})})})}),t(wl,{target:"instrumentation rule",isOpen:C,onClose:()=>S(!1),onApprove:P}),t(xl,{isOpen:null!==w,onClose:()=>x(null),onApprove:O})]})};var Hr;!function(e){e.Overview="overview",e.Pods="pods",e.PeerSources="peer-sources",e.Profiling="profiling",e.Sampling="sampling",e.Debug="debug"}(Hr||(Hr={}));const Gr=({collapseIsDefaultOpen:e,isJumpToTarget:o,onClickRestartPod:n,namespace:i,podName:l,nodeName:s,startTime:r,agentInjectedStatus:c,odigosHealthStatus:d,k8sHealthStatus:u,children:p})=>{const{formatDurationAgo:h}=Bt(),g=Xt(!!o),m=a(()=>({title:l,icon:Ai,withCopy:!0}),[l]),f=a(()=>{const e=[],t=Vt(c);t&&e.push(t);const o=Vt(d,Ni,"health");o&&e.push(o);const n=Vt(u,Oi,"health");return n&&e.push(n),e},[c,d,u]),b=a(()=>n?[{id:`restart-pod-${l}`,icon:Ri,label:kt.RESTART_POD,onClick:()=>n(i,l)}]:void 0,[n,i,l]),v=a(()=>[{id:"nodeName",title:He.NODE,label:s,withCopy:!0},{id:"age",title:He.AGE,label:r?h(r,{style:"short"}):He.NOT_RUNNING,labelTooltip:r}],[s,r,h]);return t("div",{ref:g,children:t(Et,{bgTint:"900",richTitle:m,badges:f,dropDataActions:b,items:v,withCollapse:!0,collapseIsDefaultOpen:e,children:p})})},jr=m.div`
|
|
191
|
+
`,Pr=({clusterId:o,namespaceName:n,checkbox:a,isFutureApps:i,selectedCounts:l,isActive:s,onActive:r,handleSourceChange:c})=>{const{isVm:d}=y(),u=e=>{r(),c({clusterId:o,workloadId:{namespace:n},auto:e.auto,selected:e.all})};return t(Rr,{children:t(ar,{dataId:`namespace-${n}`,withCarret:!0,title:n,isSelected:s,onClick:r,isPartiallyChecked:a.partial,isChecked:a.all,onCheckboxChange:e=>u({auto:e,all:e}),children:e(se,{$gap:12,children:[!d&&t(Dr,{$visible:s||i,children:t(De,{text:Er,children:t(Q,{label:$r,labelAlign:ee.Left,size:vt.S,value:i,onChange:e=>u({auto:e,all:e||void 0})})})}),e(se,{$gap:8,children:[t(ae,{variant:yt.Span,size:le.XXXS,color:ie.Secondary,align:"right",children:kr}),t(Be,{label:`${l.sourced}/${l.total}`,status:s?Ee.Default:ft.Unknown,minWidth:"42px"})]})]})})})},Fr=({withCollapse:e,clusterId:o,clusterName:n,namespaces:i,selectedArea:l,setSelectedArea:s,handleSourceChange:r})=>{const c=a(()=>i.map(({name:e,totalWorkloads:a,selectedCount:i,isAllSourced:c,isSomeSourced:d,isFutureApps:u})=>t(Pr,{clusterId:o,namespaceName:e,isFutureApps:u,checkbox:{all:c||u,partial:d},selectedCounts:{sourced:i,total:a},isActive:l.clusterId===o&&l.namespaceName===e,onActive:()=>s({clusterId:o,clusterName:n,namespaceName:e}),handleSourceChange:r},`${o}#${e}`)),[o,n,i,l]);return e?t(cr,{title:n,list:c,noBgColor:!0}):c},Lr=({onClose:o,onBack:i,onNext:l,selectedConnectionIds:r,setSelectedConnectionIds:c,withOverlay:d,disableAnimation:u})=>{const{isVm:p}=y(),{sourcesApi:h,snapshotsApi:g,namespacesApi:m}=sl(),{data:f,loading:b}=g.useSnapshots(),{items:v,loading:C}=m.useNamespaces(),S=yr(p),{selectedStreamName:w}=Ge(),{progress:x,resetProgress:T}=Ct(),{isFetching:k,setIsFetching:$,setSnapshots:E,formData:I,handleSourceChange:A,handleSelectAll:N,formDiff:O,isFormDirty:R}=Bl(),D=a(()=>{if(f)return f;const e=v;return e.length?{clusters:[{clusterId:wt,clusterName:St,namespaces:e.map(e=>({name:e.name,selected:e.markedForInstrumentation&&e.dataStreamNames.includes(w),workloads:e.workloads?.map(e=>({namespace:e.id.namespace,name:e.id.name,kind:e.id.kind,selected:(e.markedForInstrumentation?.markedForInstrumentation??!1)&&(e.dataStreamNames?.includes(w)??!1)}))||[]}))}]}:null},[f,v,w]);n(()=>{$(b||C),D&&E(D)},[D,b,C,$,E]);const[P,F]=s(""),[L,_]=s(mt.Namespace),[z,M]=s({showOnlySelected:!1}),[B,X]=s({clusterId:"",clusterName:"",namespaceName:""}),V=(({isFetching:o,formData:n,handleSourceChange:i,handleSelectAll:l,selectedArea:s,setSelectedArea:r,searchText:c,searchBy:d,filters:u})=>{const{isVm:p}=y(),h=yr(p),g=a(()=>n.map(e=>{const t=[...e.namespaces].sort((e,t)=>e.name.localeCompare(t.name)).filter(e=>zl(e,c,u)).map(e=>({name:e.name,totalWorkloads:e.workloads.length,...Ml(e)}));return{clusterId:e.clusterId,clusterName:e.clusterName,visibleNamespaces:t}}),[n,c,u]),m=a(()=>{let e=!1;for(const{visibleNamespaces:t}of g)for(const{totalWorkloads:o,selectedCount:n}of t)if(e=!0,n!==o)return!1;return e},[g]),{list:f,withFilterCount:b,filteredCount:v,totalCount:C}=a(()=>{const e=g.map(({clusterId:e,clusterName:o,visibleNamespaces:n})=>n.length?t(Fr,{withCollapse:g.length>1,clusterId:e,clusterName:o,namespaces:n,selectedArea:s,setSelectedArea:r,handleSourceChange:i},e):null),o=e.filter(e=>null!==e);return{list:o,withFilterCount:o.length!==e.length,filteredCount:o.length,totalCount:e.length}},[g,s]);return{width:"60%",header:e(se,{$width:"100%",$gap:12,$justifyContent:"space-between",children:[e(se,{$gap:8,children:[t(ae,{size:le.XS,nowrap:!0,children:h.groupColumnHeader}),t(De,{text:b?He.FILTERED_COUNT_TOOLTIP:void 0,children:t(Be,{label:`${b?`${v} / ${C}`:C}`,status:ft.Unknown})})]}),t(ae,{"data-id":"namespaces-select-all",onClick:()=>l({boolean:!m,searchText:c,searchBy:d,filters:u}),disabled:!f.length,size:le.XS,children:xr(m)})]}),list:f.length?f:o?[t(at,{$height:"100%",children:t(ct,{title:h.fetchingGroups.title,subTitle:h.fetchingGroups.subTitle,withSpinner:!0})},"loading")]:[t(at,{$height:"100%",children:t(Ce,c?{icon:Ei,title:Cr,subTitle:h.noGroupMatchedFilter(c)}:{icon:Ei,title:h.noGroups.title,subTitle:h.noGroups.subTitle})},"no-data")]}})({isFetching:k,formData:I,handleSourceChange:A,handleSelectAll:N,selectedArea:B,setSelectedArea:X,searchText:L===mt.Namespace?P:"",searchBy:L,filters:z}),U=(({formData:o,handleSourceChange:n,handleSelectAll:i,selectedArea:l,searchText:s,searchBy:r,filters:c})=>{const{tier:d,isVm:u}=y(),p=yr(u),h=d===bt.Onprem,g=a(()=>l.value.namespaceName?o.find(({clusterId:e})=>e===l.value.clusterId)?.namespaces.find(({name:e})=>e===l.value.namespaceName):void 0,[o,l.value.clusterId,l.value.namespaceName]),m=a(()=>g?[...g.workloads].sort((e,t)=>e.name.localeCompare(t.name)).filter(e=>Ll(e,s,c)):[],[g,s,c]),f=a(()=>!!m.length&&m.every(({selected:e})=>e),[m]),b=a(()=>{if(!g)return[];const{clusterId:e}=l.value,{name:o}=g;return m.map(({name:a,selected:i,kind:l})=>{const s=!u&&!h&&_l.has(l);return t(Or,{workloadName:a,workloadKind:l,isChecked:!s&&(i||!1),onToggle:()=>n({clusterId:e,workloadId:{namespace:o,name:a,kind:l}}),disabled:s,disabledReason:Ir},`${e}#${o}#${a}#${l}`)})},[m,g,l.value.clusterId]),{withFilterCount:v,filteredCount:C,totalCount:S}=a(()=>{const e=g?.workloads.length??0;return{withFilterCount:m.length!==e,filteredCount:m.length,totalCount:e}},[m,g]);return{width:"40%",header:e(se,{$width:"100%",$gap:12,$justifyContent:"space-between",children:[e(se,{$gap:8,children:[t(ae,{size:le.XS,nowrap:!0,children:l.value.namespaceName?`${l.value.namespaceName} > ${p.itemColumnHeader}`:p.itemColumnHeader}),t(De,{text:v?He.FILTERED_COUNT_TOOLTIP:void 0,children:t(Be,{label:`${v?`${C} / ${S}`:S}`,status:ft.Unknown})})]}),t(ae,{"data-id":"workloads-select-all",onClick:()=>i({clusterId:l.value.clusterId,namespaceName:l.value.namespaceName,boolean:!f,searchText:s,searchBy:r,filters:c}),disabled:!b.length,size:le.XS,children:xr(f)})]}),list:b.length?b:[t(at,{$height:"100%",children:t(Ce,g?s?{icon:$i,title:Cr,subTitle:wr(s)}:{icon:$i,title:Sr,subTitle:p.noItemsInGroupSubTitle}:{icon:$i,title:p.selectGroupPrompt.title,subTitle:p.selectGroupPrompt.subTitle})},"no-data")]}})({formData:I,handleSourceChange:A,handleSelectAll:N,selectedArea:{value:B},searchText:L===mt.Source?P:"",searchBy:L,filters:z});return t(Sl,{isOpen:!0,withOverlay:d,disableAnimation:u,onClose:o?()=>{T(xt.BulkInstrumenting),o()}:void 0,onBack:i?()=>i(O):void 0,onNext:l?()=>l(O):void 0,nextIsSkip:!R,onSave:()=>h.persistV2(O),header:{icon:$i,title:He.ADD_SOURCE,subTitle:He.ADD_SOURCES_DESCRIPTION},connectionIds:r&&c?{value:r,setValue:c}:void 0,search:{value:P,onChange:e=>{F(e),L===mt.Namespace&&X({clusterId:"",clusterName:"",namespaceName:""})},placeholder:S.searchPlaceholder(L),segment:{options:[{label:S.groupSegmentLabel,value:mt.Namespace},{label:S.itemSegmentLabel,value:mt.Source}],selected:L,setSelected:_}},filters:e(se,{$gap:8,children:[t(ae,{size:le.XXXS,color:ie.Secondary,nowrap:!0,children:Tr}),t(Q,{name:"filter-selected",size:vt.S,label:kr,value:z.showOnlySelected,onChange:e=>M(t=>({...t,showOnlySelected:e}))})]}),isFormDirty:R,isFetching:k,progress:{title:He.CREATING_SOURCES,subTitle:He.CREATING_SOURCES_SUBTITLE,percentage:x[xt.BulkInstrumenting]?.percentage||0},leftColumn:V,rightColumn:U})},_r=(e,t)=>{const o=[{id:"type",title:He.TYPE,label:t.label},{id:"status",title:He.STATUS,badge:{status:e.disabled?ft.Unknown:Ee.Success,label:e.disabled?He.DISABLED:He.ENABLED}}],n=e.signals?.map(e=>{let t=e.toLowerCase();return t=`${t.charAt(0).toUpperCase()}${t.slice(1)}`,t}).join(", ");return n&&o.push({id:"signals",title:He.SIGNALS_FOR_PROCESSING,label:n}),e.name&&o.push({id:"name",title:He.NAME,label:e.name}),e.notes&&o.push({id:"notes",title:He.NOTES,label:e.notes}),o},zr=({onClose:i,actionId:r})=>{const c=f(),{actionsApi:d}=sl(),{items:u}=d.useActions(),{selectedOption:p,loadAction:h,validateFormData:g,genericForm:m}=Al(),[b,v]=s(!1),[y,C]=s(!1),[S,w]=s(null),x=b&&!!m?.isFormDirty,T=a(()=>u?.find(e=>Tt(e)===r),[r,u]),k=a(()=>nt.find(({type:e})=>e===T?.type)??null,[T?.type]);n(()=>{T&&h(T)},[T]);const $=l(()=>{T&&v(!0)},[T]),E=l(()=>{T&&(h(T),v(!1))},[T,h]),I=l(()=>{x?w("close"):i()},[x,i]),A=l(()=>{x?w("cancel"):E()},[x,E]),N=l(()=>{const e=S;w(null),"close"===e?(E(),i()):E()},[S,E,i]),O=l(async()=>{if(T){const{errorMessage:e,preparedFormData:t}=g();e||(await d.update(T.id,t),v(!1))}},[T,g,d]),R=l(()=>{T&&C(!0)},[T]),D=l(async()=>{T&&(await d.remove(T.id,T.type),i())},[T,d,i]);if(!T||!k)return null;const P=(e=>{const t=[],{type:o,fields:n}=e,a=e=>({status:e?Ee.Success:ft.Unknown,label:e?"True":"False",invertColors:!0});if(o===ye.K8sAttributes&&(t.push({id:"collectContainerAttributes",title:"Collect Container Attributes",badge:a(n.collectContainerAttributes)}),t.push({id:"collectReplicaSetAttributes",title:"Collect ReplicaSet Attributes",badge:a(n.collectReplicaSetAttributes)}),t.push({id:"collectWorkloadId",title:"Collect Workload ID",badge:a(n.collectWorkloadId)}),t.push({id:"collectClusterId",title:"Collect Cluster ID",badge:a(n.collectClusterId)}),n.labelsAttributes?.forEach(({labelKey:e,attributeKey:o,from:a,fromSources:i},l)=>{const s=i?.length?i.join(", "):a||Z.Pod,r=(n.labelsAttributes?.length??0)>1?`Label #${l+1} `:"Label ";t.push({id:`label-${l}-key`,title:`${r}Key`,label:e}),t.push({id:`label-${l}-attr`,title:`${r}Attribute Key`,label:o}),t.push({id:`label-${l}-from`,title:`${r}From`,label:s})}),n.annotationsAttributes?.forEach(({annotationKey:e,attributeKey:o,from:a,fromSources:i},l)=>{const s=i?.length?i.join(", "):a||Z.Pod,r=(n.annotationsAttributes?.length??0)>1?`Annotation #${l+1} `:"Annotation ";t.push({id:`annotation-${l}-key`,title:`${r}Key`,label:e}),t.push({id:`annotation-${l}-attr`,title:`${r}Attribute Key`,label:o}),t.push({id:`annotation-${l}-from`,title:`${r}From`,label:s})})),o===ye.AddClusterInfo&&(t.push({id:"overwriteExistingValues",title:"Overwrite Existing Values",badge:a(n.overwriteExistingValues)}),n.clusterAttributes?.forEach(({attributeName:e,attributeStringValue:o},n)=>{t.push({id:`cluster-attr-${n}`,title:e,label:o})})),o===ye.DeleteAttributes&&n.attributeNamesToDelete?.forEach((e,o)=>{t.push({id:`del-attr-${o}`,title:"Attribute"+((n.attributeNamesToDelete?.length??0)>1?` #${o+1}`:""),label:e})}),o===ye.RenameAttributes&&Object.entries(n.renames||{}).forEach(([e,o],n)=>{t.push({id:`rename-${n}`,title:e,label:o})}),o===ye.PiiMasking&&n.piiCategories?.forEach((e,o)=>{t.push({id:`pii-${o}`,title:"Category"+((n.piiCategories?.length??0)>1?` #${o+1}`:""),label:e})}),o===ye.ExtractAttribute){const e=n.extractAttribute?.extractions??[];e.forEach(({targetAttributeName:o,lookupKey:n,dataFormat:a,regex:i},l)=>{const s=e.length>1?`Extraction #${l+1} `:"Extraction ";t.push({id:`extract-${l}-target`,title:`${s}New Attribute Name`,label:o||"-"}),n&&t.push({id:`extract-${l}-lookupKey`,title:`${s}Lookup Key`,label:n}),a&&t.push({id:`extract-${l}-format`,title:`${s}Data Format`,label:a}),i&&t.push({id:`extract-${l}-regex`,title:`${s}Regex`,label:i})})}return o===ye.URLTemplatization&&n.urlTemplatizationRulesGroups?.forEach((e,o)=>{const a=(n.urlTemplatizationRulesGroups?.length??0)>1?`Group #${o+1} `:"Group ";e.filterK8sNamespace&&t.push({id:`group-${o}-ns`,title:`${a}Namespace`,label:e.filterK8sNamespace}),e.workloadFilters?.forEach((n,i)=>{const l=[n.kind,n.name].filter(Boolean).join("/");l&&t.push({id:`group-${o}-wf-${i}`,title:`${a}Workload${(e.workloadFilters?.length??0)>1?` #${i+1}`:""}`,label:l})});const i=e.templatizationRules?.map(e=>e.template).filter(Boolean).join(", ");i&&t.push({id:`group-${o}-templates`,title:`${a}Templates`,label:i}),e.notes&&t.push({id:`group-${o}-notes`,title:`${a}Notes`,label:e.notes})}),t})(T);return e(o,{children:[t(oe,{isOpen:!0,header:{icon:At(T.type),title:k.label,onClose:I,actions:[{id:"edit-action-btn-edit",label:kt.EDIT,icon:mi,active:b,onClick:$},{id:"edit-action-btn-delete",label:kt.DELETE,icon:ri,color:c.v2.colors.red[500],active:y,onClick:R}]},footer:{actions:b?[{"data-id":"edit-action-btn-cancel",label:kt.CANCEL,variant:de.Secondary,onClick:A},{"data-id":"edit-action-btn-save",label:kt.SAVE,variant:de.Primary,onClick:O}]:[]},children:t($t,{$padding:"4px 12px 12px",children:b&&p?t(Rs,{}):t(W,{$gap:16,children:e(Et,{bgTint:"1000",children:[e(Et,{bgTint:"900",children:[t(It,{conditions:T.conditions||[]}),t(Et,{bgTint:"800",cellsPerRow:2,items:_r(T,k)})]}),!!P?.length&&t(Et,{bgTint:"900",richTitle:{title:"Configuration"},withCollapse:!0,collapseIsDefaultOpen:!0,children:t(Et,{bgTint:"800",cellsPerRow:2,items:P})})]})})})}),t(wl,{target:"action",isOpen:y,onClose:()=>C(!1),onApprove:D}),t(xl,{isOpen:null!==S,onClose:()=>w(null),onApprove:N})]})},Mr=({onClose:o,connections:l,selectedConnectionIds:r,setSelectedConnectionIds:c})=>{const{configApi:d}=sl(),[u,p]=s(""),[h,g]=s({showOnlySelected:!1}),m=a(()=>l.filter(e=>{const t=!u||e.name.toLowerCase().includes(u.toLowerCase()),o=!h.showOnlySelected||h.showOnlySelected&&r.includes(e.id);return t&&o}),[l.length,r.length,u,h]),f=e=>{c(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},b=1===r.length?r[0]:void 0,{data:v,loading:y}=d.useEffectiveConfig(b?{id:b}:void 0,{skip:!b}),C=a(()=>{if(b&&v)return{rollout:{automaticRolloutDisabled:v.rollout?.automaticRolloutDisabled??!1}}},[b,v]),{formData:S,handleFormChange:w,areFormValuesEqual:x,resetFormData:T}=Nt(C||{rollout:{automaticRolloutDisabled:!1}}),k=i(T);k.current=T,n(()=>{C&&k.current(C)},[C]);const $=a(()=>r.length>1||void 0!==C&&!x(C,S),[r.length,C,S]);return t(Sl,{isOpen:!0,onClose:o,onSave:async()=>await(d.applyConfigurations?.(S,r))??void 0,header:{icon:Ii,title:"Cluster Configuration"},connectionIds:{value:r,setValue:c},search:{placeholder:"Search by cluster name",value:u,onChange:p},filters:e(se,{$gap:8,children:[t(ae,{size:le.XXXS,color:ie.Secondary,nowrap:!0,children:"Show only:"}),t(Q,{size:vt.S,label:"Selected",value:h.showOnlySelected,onChange:e=>g(t=>({...t,showOnlySelected:e}))})]}),isFormDirty:$,isFetching:y,leftColumn:{width:"35%",header:e(se,{$width:"100%",$gap:12,$justifyContent:"space-between",children:[e(se,{$gap:8,children:[t(ae,{size:le.XS,children:"Clusters"}),t(Be,{label:m.length,status:ft.Unknown})]}),e(se,{$gap:8,children:[t(ae,{size:le.XXXS,color:ie.Secondary,align:"right",children:"Selected clusters"}),t(Be,{label:`${r.length}/${m.length}`,status:ft.Unknown})]})]}),list:m.map(e=>t(ar,{title:e.name,isChecked:r.includes(e.id),onClick:()=>f(e.id),onCheckboxChange:()=>f(e.id)},e.id))},rightColumn:{width:"65%",header:t(ae,{size:le.XS,children:"Configurations"}),list:[t(Q,{label:"Automatic rollout disabled",tooltip:"Odigos automatically triggers a one-time rollout for workloads when instrumenting or uninstrumenting, ensuring that changes are applied without requiring manual intervention. When automatic rollout is disabled, Odigos will not restart workloads, and users will need to manually trigger rollouts after adding or removing sources.",value:S.rollout?.automaticRolloutDisabled||!1,onChange:e=>w("rollout.automaticRolloutDisabled",e)},"automatic-rollout-disabled")]}})},Br=e=>{const t=[{id:"type",title:He.TYPE,label:e.destinationType.displayName},{id:"status",title:He.STATUS,badge:{status:e.disabled?ft.Unknown:Ee.Success,label:e.disabled?He.DISABLED:He.ENABLED}}],o=Ae(e.exportedSignals).map(e=>{let t=e.toLowerCase();return t=`${t.charAt(0).toUpperCase()}${t.slice(1)}`,t}).join(", ");return o&&t.push({id:"monitors",title:He.MONITORS,label:o}),e.name&&t.push({id:"name",title:He.NAME,label:e.name}),t},Xr=({onClose:r,destinationId:c})=>{const d=f(),{isVm:u}=y(),{destinationsApi:p}=sl(),{items:h}=p.useDestinations(),{data:g,loading:m}=p.useDestinationCategories(),{selectedStreamName:b}=Ge(),{activeForm:v,loadDestination:C,validateFormData:S,genericForm:w}=Nl(),x=i(null),[T,k]=s(!1),[$,E]=s(!1),[I,A]=s(null),N=T&&!!w?.isFormDirty,O=a(()=>Dt(h,b),[h,b]),R=a(()=>O?.find(e=>Tt(e)===c),[c,O]),D=g?.destinationCategories?.categories??null;n(()=>{R&&D&&C(R,D)},[R,D]);const P=a(()=>R&&D?Pt(D,R):[],[R,D]),F=l(()=>{R&&k(!0)},[R]),L=l(()=>{R&&D&&(C(R,D),k(!1))},[R,D,C]),_=l(()=>{N?A("close"):r()},[N,r]),z=l(()=>{N?A("cancel"):L()},[N,L]),M=l(()=>{const e=I;A(null),"close"===e?(L(),r()):L()},[I,L,r]),B=l(async()=>{if(R){const{errorMessage:e,preparedFormData:t}=S();e||(await p.update(R.id,Oe(t)),k(!1))}},[R,S,p]),X=l(()=>{R&&E(!0)},[R]),V=l(async()=>{R&&(await p.remove(R.id),r())},[R,p,r]);if(!R)return null;const{icon:U,iconSrc:H}=ut(R.destinationType.type),G=((e,t)=>{const o=[],n=Ot(e,t),a=n.map(e=>({name:e.key,value:e.value})),i=Ae(e.exportedSignals);let l=[];const s=()=>{l.length&&(o.push({kind:"cells",id:`cells-${o.length}`,items:l}),l=[])};return n.forEach(({key:e,name:n,value:r})=>{const c=t.find(t=>t.name===e),{secret:d,componentType:u,componentProperties:p,hideFromReadData:h,customReadDataLabels:g}=c||{};if(h?.length&&ke(h,i,a))return;const{type:m}=ht(p,{type:""}),f=d||"password"===m;if(g?.length)g.forEach(({condition:t,...o},n)=>{t==r&&l.push({id:`${e}-custom-${n}`,title:o.title,label:o.value})});else if(r)if(f)l.push({id:e,title:n,label:new Array(10).fill("•").join("")});else{if(u===Rt.MultiInput){const t=ht(r,null);if(Array.isArray(t)&&t.length)return s(),void o.push({kind:"list",id:e,title:n,items:t.map((t,o)=>({id:`${e}-${o}`,label:String(t)}))})}if(u===Rt.KeyValuePair){const t=ht(r,null);if(Array.isArray(t)&&t.length)return s(),void o.push({kind:"pairs",id:e,title:n,items:t.map((t,o)=>{const n=t&&"object"==typeof t?t:{};return{id:`${e}-${o}`,title:null!=n.key?String(n.key):"",label:null!=n.value?String(n.value):""}})})}l.push({id:e,title:n,label:r})}else l.push({id:e,title:n,label:"-"})}),s(),o})(R,P);return e(o,{children:[t(oe,{isOpen:!0,header:{icon:U,iconSrc:H,title:R.name||R.destinationType.displayName,onClose:_,actions:[{id:"edit-destination-btn-edit",label:kt.EDIT,icon:mi,active:T,onClick:F},{id:"edit-destination-btn-delete",label:kt.DELETE,icon:ri,color:d.v2.colors.red[500],active:$,onClick:X}]},footer:{actions:T?[{"data-id":"edit-destination-btn-cancel",label:kt.CANCEL,variant:de.Secondary,onClick:z},...v?.option.testConnectionSupported&&!u?[{"data-id":"edit-destination-btn-test-connection",label:kt.TEST_CONNECTION,variant:de.Secondary,onClick:()=>x.current?.testConnection()}]:[],{"data-id":"edit-destination-btn-save",label:kt.SAVE,variant:de.Primary,onClick:B}]:[]},children:t($t,{$padding:"4px 12px 12px",children:m?t(at,{$height:"50vh",children:t(ct,{withSpinner:!0})}):T&&v?t(Fs,{ref:x,isEdit:!0}):t(W,{$gap:16,children:e(Et,{bgTint:"1000",children:[e(Et,{bgTint:"900",children:[!u&&t(It,{conditions:R.conditions||[]}),t(Et,{bgTint:"800",cellsPerRow:2,items:Br(R)})]}),!!G.length&&t(Et,{bgTint:"900",richTitle:{title:"Configuration"},withCollapse:!0,collapseIsDefaultOpen:!0,children:G.map(e=>"cells"===e.kind?t(Et,{bgTint:"800",cellsPerRow:2,items:e.items},e.id):(e.kind,t(Et,{bgTint:"800",richTitle:{title:e.title},cellsPerRow:2,items:e.items},e.id)))})]})})})}),t(wl,{target:"destination",isOpen:$,onClose:()=>E(!1),onApprove:V}),t(xl,{isOpen:null!==I,onClose:()=>A(null),onApprove:M})]})},Vr=(e,t)=>{const o=[{id:"type",title:He.TYPE,label:t.label},{id:"status",title:He.STATUS,badge:{status:e.disabled?ft.Unknown:Ee.Success,label:e.disabled?He.DISABLED:He.ENABLED}}];return e.ruleName&&o.push({id:"name",title:He.NAME,label:e.ruleName}),e.profileName&&o.push({id:"profile",title:He.MANAGED_BY_PROFILE,label:e.profileName}),e.notes&&o.push({id:"notes",title:He.NOTES,label:e.notes}),o},Ur=({onClose:i,ruleId:r})=>{const c=f(),{instrumentationRulesApi:d}=sl(),{items:u}=d.useRules(),{addNotification:p}=Lt(),{selectedOption:h,loadRule:g,validateFormData:m,genericForm:b}=Ol(),[v,y]=s(!1),[C,S]=s(!1),[w,x]=s(null),T=v&&!!b?.isFormDirty,k=a(()=>u?.find(e=>Tt(e)===r),[r,u]),$=a(()=>gt.find(({type:e})=>e===k?.type)??null,[k?.type]);n(()=>{k&&g(k)},[k]);const E=l(()=>{if(k){if(!k.mutable)return void p({type:Ee.Warning,title:_t.FORBIDDEN,message:_t.CANNOT_EDIT_RULE,crdType:mt.InstrumentationRule,target:k.ruleId,hideFromHistory:!0});y(!0)}},[k,p]),I=l(()=>{k&&(g(k),y(!1))},[k,g]),A=l(()=>{T?x("close"):i()},[T,i]),N=l(()=>{T?x("cancel"):I()},[T,I]),O=l(()=>{const e=w;x(null),"close"===e?(I(),i()):I()},[w,I,i]),R=l(async()=>{if(k){const{errorMessage:e,preparedFormData:t}=m();e||(await d.update(k.ruleId,t,k.type),y(!1))}},[k,m,d]),D=l(()=>{if(k){if(!k.mutable)return void p({type:Ee.Warning,title:_t.FORBIDDEN,message:_t.CANNOT_DELETE_RULE,crdType:mt.InstrumentationRule,target:k.ruleId,hideFromHistory:!0});S(!0)}},[k,p]),P=l(async()=>{k&&(await d.remove(k.ruleId,k.type),i())},[k,d,i]);if(!k||!$)return null;const F=((e,o)=>{const n=[];return e.payloadCollection&&Object.entries(e.payloadCollection).forEach(([e,o])=>{o&&n.push(t(ae,{size:le.XS,children:`• ${Ft(e).toLowerCase()}`},`payload-${e}`))}),e.codeAttributes&&Object.entries(e.codeAttributes).forEach(([e,o])=>{o&&n.push(t(ae,{size:le.XS,children:`• ${Ft(e).toLowerCase()}`},`code-${e}`))}),e.headersCollection?.[Pe.HeaderKeys]?.length&&e.headersCollection[Pe.HeaderKeys].forEach((e,o)=>{e&&n.push(t(ae,{size:le.XS,children:e},`header-${o}-${e}`))}),e.customInstrumentations&&(e.customInstrumentations[ze.Java]?.forEach((e,a)=>{const i=new _e(e.className,e.methodName);if(i.Verify()){0===a&&n.push(t(ae,{size:le.XS,children:"Java Custom Probes:"},"java-custom-probes"));const e=i.toString();n.push(t(ae,{size:le.XXS,color:o.v2.colors.grey[200],children:`• ${e}`},`java-probe-${a}-${e}`))}}),e.customInstrumentations[ze.Golang]?.forEach((e,a)=>{const i=new Le(e.packageName,e.functionName,e.receiverName,e.receiverMethodName);if(i.Verify()){0===a&&n.push(t(ae,{size:le.XS,children:"Golang Custom Probes:"},"golang-custom-probes"));const e=i.toString();n.push(t(ae,{size:le.XXS,color:o.v2.colors.grey[200],children:`• ${e}`},`golang-probe-${a}-${e}`))}})),n})(k,c);return e(o,{children:[t(oe,{isOpen:!0,header:{icon:Mt(k.type),title:$.label,onClose:A,actions:[{id:"edit-rule-btn-edit",label:kt.EDIT,icon:mi,active:v,onClick:E},{id:"edit-rule-btn-delete",label:kt.DELETE,icon:ri,color:c.v2.colors.red[500],active:C,onClick:D}]},footer:{actions:v?[{"data-id":"edit-rule-btn-cancel",label:kt.CANCEL,variant:de.Secondary,onClick:N},{"data-id":"edit-rule-btn-save",label:kt.SAVE,variant:de.Primary,onClick:R}]:[]},children:t($t,{$padding:"4px 12px 12px",children:v&&h?t(Us,{}):t(W,{$gap:16,children:e(Et,{bgTint:"1000",children:[e(Et,{bgTint:"900",children:[t(It,{conditions:k.conditions||[]}),t(Et,{bgTint:"800",cellsPerRow:2,items:Vr(k,$)})]}),t(ul,{readOnly:!0,scopes:k.sourceScopes??null}),!!F.length&&t(Et,{bgTint:"900",richTitle:{title:"Collect"},withCollapse:!0,collapseIsDefaultOpen:!0,children:t(Et,{bgTint:"800",children:F})}),!!$.supportedLanguages.length&&t(Et,{bgTint:"900",richTitle:{title:"Supported languages"},withCollapse:!0,collapseIsDefaultOpen:!0,children:t(Et,{bgTint:"800",children:t(se,{$gap:12,$wrap:"wrap",children:$.supportedLanguages.map(e=>t(zt,{label:Xe[e],leftIcon:Ve(e),flex:"0.5"},e))})})})]})})})}),t(wl,{target:"instrumentation rule",isOpen:C,onClose:()=>S(!1),onApprove:P}),t(xl,{isOpen:null!==w,onClose:()=>x(null),onApprove:O})]})};var Hr;!function(e){e.Overview="overview",e.Pods="pods",e.PeerSources="peer-sources",e.Profiling="profiling",e.Sampling="sampling",e.Debug="debug"}(Hr||(Hr={}));const Gr=({collapseIsDefaultOpen:e,isJumpToTarget:o,onClickRestartPod:n,namespace:i,podName:l,nodeName:s,startTime:r,agentInjectedStatus:c,odigosHealthStatus:d,k8sHealthStatus:u,children:p})=>{const{formatDurationAgo:h}=Bt(),g=Xt(!!o),m=a(()=>({title:l,icon:Ai,withCopy:!0}),[l]),f=a(()=>{const e=[],t=Vt(c);t&&e.push(t);const o=Vt(d,Ni,"health");o&&e.push(o);const n=Vt(u,Oi,"health");return n&&e.push(n),e},[c,d,u]),b=a(()=>n?[{id:`restart-pod-${l}`,icon:Ri,label:kt.RESTART_POD,onClick:()=>n(i,l)}]:void 0,[n,i,l]),v=a(()=>[{id:"nodeName",title:He.NODE,label:s,withCopy:!0},{id:"age",title:He.AGE,label:r?h(r,{style:"short"}):He.NOT_RUNNING,labelTooltip:r}],[s,r,h]);return t("div",{ref:g,children:t(Et,{bgTint:"900",richTitle:m,badges:f,dropDataActions:b,items:v,withCollapse:!0,collapseIsDefaultOpen:e,children:p})})},jr=m.div`
|
|
192
192
|
display: flex;
|
|
193
193
|
align-items: center;
|
|
194
194
|
justify-content: space-between;
|
|
@@ -207,7 +207,7 @@ import{jsxs as e,jsx as t,Fragment as o}from"react/jsx-runtime";import{useEffect
|
|
|
207
207
|
width: fit-content;
|
|
208
208
|
border-radius: 8px;
|
|
209
209
|
background-color: ${({theme:e})=>e.v2.colors.silver[800]};
|
|
210
|
-
`,Yr=({count:o,total:n,label:a,icon:i})=>{const l=f(),s=void 0===n?void 0:o===n?l.v2.colors.green[500]:l.v2.colors.red[500];return e(Kr,{children:[e(se,{$gap:0,$alignItems:"flex-end",children:[t(ae,{size:le.L,color:s,weight:500,nowrap:!0,children:o}),void 0!==n&&t(ae,{size:le.S,color:s,weight:500,nowrap:!0,children:`/${n}`})]}),e(se,{$alignItems:"center",$gap:4,children:[i&&t(i,{size:16}),t(ae,{size:le.XXXS,nowrap:!0,children:a})]})]})},Jr=e=>{if(e.overrideProcessNum)return e.overrideProcessNum.toString();const t=e.identifyingAttributes?.find(({name:e})=>e===jt.PID)??e.identifyingAttributes?.find(({name:e})=>e===jt.VPID);return t?.value??null};var qr;!function(e){e.IdentifyingAttributes="identifying-attributes",e.InstrumentationLibraries="instrumentation-libraries"}(qr||(qr={}));const Zr=({overrideProcessNum:o,healthy:i,healthStatus:l,identifyingAttributes:r,instrumentations:c,isJumpToTarget:d})=>{const u=f(),[p,h]=s(qr.IdentifyingAttributes),g=Xt(!!d),{tabOptions:m,firstTabValue:b,bothTabsDisabled:v}=a(()=>{const e=c?.some(e=>!1===e.healthy),o=[{value:qr.IdentifyingAttributes,label:He.IDENTIFYING_ATTRIBUTES,disabled:!r?.length,selectedBgColor:u.v2.colors.purple[500]},{value:qr.InstrumentationLibraries,label:He.INSTRUMENTATION_LIBRARIES,icon:e?e=>t(Di,{...e,fill:u.v2.colors.red[500]}):void 0,disabled:!c?.length,selectedBgColor:u.v2.colors.purple[500]}];return{tabOptions:o,firstTabValue:o.find(e=>!e.disabled)?.value||o[0].value,bothTabsDisabled:o.every(e=>e.disabled)}},[r,c]);n(()=>{b&&h(b)},[b]);const y=a(()=>{switch(p){case qr.IdentifyingAttributes:return t(W,{children:r?.map(e=>t(nc,{label:e.name,value:e.value}
|
|
210
|
+
`,Yr=({count:o,total:n,label:a,icon:i})=>{const l=f(),s=void 0===n?void 0:o===n?l.v2.colors.green[500]:l.v2.colors.red[500];return e(Kr,{children:[e(se,{$gap:0,$alignItems:"flex-end",children:[t(ae,{size:le.L,color:s,weight:500,nowrap:!0,children:o}),void 0!==n&&t(ae,{size:le.S,color:s,weight:500,nowrap:!0,children:`/${n}`})]}),e(se,{$alignItems:"center",$gap:4,children:[i&&t(i,{size:16}),t(ae,{size:le.XXXS,nowrap:!0,children:a})]})]})},Jr=e=>{if(e.overrideProcessNum)return e.overrideProcessNum.toString();const t=e.identifyingAttributes?.find(({name:e})=>e===jt.PID)??e.identifyingAttributes?.find(({name:e})=>e===jt.VPID);return t?.value??null};var qr;!function(e){e.IdentifyingAttributes="identifying-attributes",e.InstrumentationLibraries="instrumentation-libraries"}(qr||(qr={}));const Zr=({overrideProcessNum:o,healthy:i,healthStatus:l,identifyingAttributes:r,instrumentations:c,isJumpToTarget:d})=>{const u=f(),[p,h]=s(qr.IdentifyingAttributes),g=Xt(!!d),{tabOptions:m,firstTabValue:b,bothTabsDisabled:v}=a(()=>{const e=c?.some(e=>!1===e.healthy),o=[{value:qr.IdentifyingAttributes,label:He.IDENTIFYING_ATTRIBUTES,disabled:!r?.length,selectedBgColor:u.v2.colors.purple[500]},{value:qr.InstrumentationLibraries,label:He.INSTRUMENTATION_LIBRARIES,icon:e?e=>t(Di,{...e,fill:u.v2.colors.red[500]}):void 0,disabled:!c?.length,selectedBgColor:u.v2.colors.purple[500]}];return{tabOptions:o,firstTabValue:o.find(e=>!e.disabled)?.value||o[0].value,bothTabsDisabled:o.every(e=>e.disabled)}},[r,c]);n(()=>{b&&h(b)},[b]);const y=a(()=>{switch(p){case qr.IdentifyingAttributes:return t(W,{children:r?.map((e,o)=>t(nc,{label:e.name,value:e.value},`attr-${o}-${e.name}`))});case qr.InstrumentationLibraries:return t(W,{children:c?.map((e,o)=>t(nc,{label:e.name,isStandardLibrary:e.isStandardLibrary,healthy:e.healthy,message:e.message},`instr-${o}-${e.name}`))});default:return null}},[p,r,c]),C=a(()=>Jr({overrideProcessNum:o,identifyingAttributes:r}),[o,r]);return t("div",{ref:g,children:e(Et,{bgTint:"800",richTitle:{title:C?`${He.PROCESS} ${He.PID(C)}`:He.PROCESS_FALLBACK_NAME},renderOnRightSide:t(ae,{color:i?ie.Success:ie.Error,size:le.XXXS,children:l?.message}),badges:[{key:"odigos-healthy",status:i?Ee.Success:Ee.Error,leftIcon:Ni,label:i?He.HEALTHY:He.NOT_HEALTHY,textSize:le.XXXS,invertColors:!0,useSecondaryTone:!0}],withCollapse:!v,collapseIsDefaultOpen:d,children:[!v&&t(ue,{options:m,selected:p,setSelected:h}),!v&&y]})})},Qr=m.div`
|
|
211
211
|
display: flex;
|
|
212
212
|
align-items: flex-start;
|
|
213
213
|
gap: 8px;
|
|
@@ -246,7 +246,7 @@ import{jsxs as e,jsx as t,Fragment as o}from"react/jsx-runtime";import{useEffect
|
|
|
246
246
|
background-color: ${({theme:e})=>e.v2.colors.silver[800]};
|
|
247
247
|
}
|
|
248
248
|
`}
|
|
249
|
-
`,gc=({serviceName:o,isVirtual:n,nodeAttributes:i})=>{const l=eo(e=>e.drawerEntityId),{items:s}=sl().sourcesApi.useSources(),r=a(()=>s.find(e=>e.id.name===o||e.serviceName===o),[s,o]),c=a(()=>r&&JSON.stringify(to(r))!==JSON.stringify(to(l)),[r,l]),d=a(()=>{if(n){const e=Object.fromEntries((i??[]).map(({key:e,value:t})=>[e,t]));return[oo({serviceName:o,attributes:e})]}if("user"===o?.toLowerCase())return[_i];const e=r?no(r):void 0;return e?.length?e:[Pi]},[n,i,o,r]),u=c?()=>{const{setDrawerType:e,setDrawerEntityId:t}=eo.getState();e(mt.Source),t({namespace:r?.id.namespace??"",name:r?.id.name??"",kind:r?.id.kind??""})}:void 0;return e(hc,{onClick:u,$withClick:!!u,children:[e(se,{$gap:8,children:[t(ao,{icons:d}),t(ae,{size:le.XXS,children:o})]}),n&&t(Be,{status:Ee.Info,label:He.VIRTUAL,textSize:le.XXXS,invertColors:!0,tooltip:He.VIRTUAL_TOOLTIP})]})},mc=e=>{if("string"==typeof e)return e;if(e&&"object"==typeof e){const t=e;if("string"==typeof t.k8sActualManifest)return t.k8sActualManifest;if("string"==typeof t.manifest)return t.manifest}},fc=({source:o})=>{const i=f(),{k8sManifestApi:l}=sl(),[r,c]=s(!0),[d,u]=s(void 0),[p,h]=s(!0),[g,m]=s(void 0);n(()=>{l.fetch({namespace:o.id.namespace,kind:o.id.kind,name:o.id.name}).then(({data:e})=>u(mc(e))).finally(()=>c(!1)),l.fetch({namespace:o.id.namespace,kind:io.InstrumentationConfig,name:`${o.id.kind}-${o.id.name}`.toLowerCase()}).then(({data:e})=>m(mc(e))).finally(()=>h(!1))},[l,o.id.namespace,o.id.kind,o.id.name]);const b=a(()=>[{label:He.DESCRIBE_POD,value:`kubectl describe ${o.id.kind} ${o.id.name} -n ${o.id.namespace}`},{label:He.GET_POD_YAML,value:`kubectl get ${o.id.kind} ${o.id.name} -n ${o.id.namespace} -o yaml`},{label:He.GET_POD_YAML,value:`kubectl get ${io.InstrumentationConfig} ${o.id.kind}-${o.id.name} -n ${o.id.namespace} -o yaml`}],[o.id.kind,o.id.name,o.id.namespace]);return e(Et,{bgTint:"1000",children:[t(Et,{bgTint:"900",richTitle:{icon:zi,title:He.DEBUG_COMMANDS},withCollapse:!0,collapseIsDefaultOpen:!0,children:b.map(({label:e,value:o})=>t(Jt,{label:e,value:o}
|
|
249
|
+
`,gc=({serviceName:o,isVirtual:n,nodeAttributes:i})=>{const l=eo(e=>e.drawerEntityId),{items:s}=sl().sourcesApi.useSources(),r=a(()=>s.find(e=>e.id.name===o||e.serviceName===o),[s,o]),c=a(()=>r&&JSON.stringify(to(r))!==JSON.stringify(to(l)),[r,l]),d=a(()=>{if(n){const e=Object.fromEntries((i??[]).map(({key:e,value:t})=>[e,t]));return[oo({serviceName:o,attributes:e})]}if("user"===o?.toLowerCase())return[_i];const e=r?no(r):void 0;return e?.length?e:[Pi]},[n,i,o,r]),u=c?()=>{const{setDrawerType:e,setDrawerEntityId:t}=eo.getState();e(mt.Source),t({namespace:r?.id.namespace??"",name:r?.id.name??"",kind:r?.id.kind??""})}:void 0;return e(hc,{onClick:u,$withClick:!!u,children:[e(se,{$gap:8,children:[t(ao,{icons:d}),t(ae,{size:le.XXS,children:o})]}),n&&t(Be,{status:Ee.Info,label:He.VIRTUAL,textSize:le.XXXS,invertColors:!0,tooltip:He.VIRTUAL_TOOLTIP})]})},mc=e=>{if("string"==typeof e)return e;if(e&&"object"==typeof e){const t=e;if("string"==typeof t.k8sActualManifest)return t.k8sActualManifest;if("string"==typeof t.manifest)return t.manifest}},fc=({source:o})=>{const i=f(),{k8sManifestApi:l}=sl(),[r,c]=s(!0),[d,u]=s(void 0),[p,h]=s(!0),[g,m]=s(void 0);n(()=>{l.fetch({namespace:o.id.namespace,kind:o.id.kind,name:o.id.name}).then(({data:e})=>u(mc(e))).finally(()=>c(!1)),l.fetch({namespace:o.id.namespace,kind:io.InstrumentationConfig,name:`${o.id.kind}-${o.id.name}`.toLowerCase()}).then(({data:e})=>m(mc(e))).finally(()=>h(!1))},[l,o.id.namespace,o.id.kind,o.id.name]);const b=a(()=>[{label:He.DESCRIBE_POD,value:`kubectl describe ${o.id.kind} ${o.id.name} -n ${o.id.namespace}`},{label:He.GET_POD_YAML,value:`kubectl get ${o.id.kind} ${o.id.name} -n ${o.id.namespace} -o yaml`},{label:He.GET_POD_YAML,value:`kubectl get ${io.InstrumentationConfig} ${o.id.kind}-${o.id.name} -n ${o.id.namespace} -o yaml`}],[o.id.kind,o.id.name,o.id.namespace]);return e(Et,{bgTint:"1000",children:[t(Et,{bgTint:"900",richTitle:{icon:zi,title:He.DEBUG_COMMANDS},withCollapse:!0,collapseIsDefaultOpen:!0,children:b.map(({label:e,value:o},n)=>t(Jt,{label:e,value:o},`debug-cmd-${n}-${e}`))}),r?t(lo,{size:1}):t(Tl,{bgTint:"800",codeBgColor:i.v2.colors.silver[900],title:`${o.id.kind} YAML`,yaml:d}),p?t(lo,{size:1}):t(Tl,{bgTint:"800",codeBgColor:i.v2.colors.silver[900],title:"Instrumentation Config YAML",yaml:g})]})},bc=({title:o,children:n})=>e(W,{$gap:8,children:[t(ae,{size:le.XXXS,color:ie.Secondary,children:o}),n]}),vc=({source:o})=>{const n=a(()=>{const[e,t]=so(o.telemetryMetrics?.[0]?.throughputBytes||0).split(" ");return{value:e,units:t}},[o]);return t(bc,{title:He.THROUGHPUT_LAST_10_SECONDS,children:e(se,{$alignItems:"flex-end",$gap:4,children:[t(ae,{size:le.L,children:n.value}),t(ae,{size:le.XS,variant:yt.Span,children:n.units})]})})},yc=({source:o})=>{const{CopyButton:n}=ro();return t(bc,{title:He.NAMESPACE,children:e(se,{children:[t(zt,{variant:Yt.Blue,label:o.id.namespace}),t(n,{value:o.id.namespace,size:rt.XS})]})})},Cc=({source:e})=>t(bc,{title:He.KIND,children:t(se,{children:t(zt,{variant:Yt.Blue,label:e.id.kind})})}),Sc=({source:o})=>{const{CopyButton:n}=ro();return t(bc,{title:He.NAME,children:e(se,{children:[t(zt,{variant:Yt.Blue,label:o.id.name}),t(n,{value:o.id.name,size:rt.XS})]})})},wc=({source:o})=>{const{isVm:n}=y();return t(Et,{children:e(se,{$gap:24,$alignItems:"flex-start",$justifyContent:"flex-start",$wrap:"wrap",children:[!n&&t(vc,{source:o}),!n&&t(yc,{source:o}),t(Cc,{source:o}),t(Sc,{source:o})]})})},xc=({source:e})=>t(Et,{bgTint:"900",children:t(Wr,{podsOdigosHealthStatus:e.podsOdigosHealthStatus,pods:e.pods,noPadding:!0})}),Tc=({source:e})=>{const o=a(()=>e.workloadOdigosHealthStatus?{status:e.workloadOdigosHealthStatus.status?co(e.workloadOdigosHealthStatus.status):ft.Unknown,title:Ft(e.workloadOdigosHealthStatus.reasonEnum),subTitle:e.workloadOdigosHealthStatus.message}:null,[e]);return o?t(Ht,{...o,width:"100%"}):null},kc="calc(50% - 6px)",$c=({source:o,onClickRollout:n,onClickRollback:i})=>{const l=a(()=>{const{status:e,reasonEnum:t,message:a}=o.conditions?.rollout||{},i=Gt(e);if(!i)return null;return{status:i,title:t?.toLowerCase().includes("rollout")?Ft(t):`${He.ROLLOUT} ${Ft(t)}`,subTitle:a,action:i!==Ee.Success?{icon:Ri,tooltip:He.ROLLOUT_RESTART,onClick:n}:void 0}},[o]),s=a(()=>{const{status:e,reasonEnum:t,message:n}=o.autoRollback?.autoRollbackStatus||{},a=Gt(e);if(!a)return null;return{status:a,title:t?.toLowerCase().includes("rollback")?Ft(t):`${He.ROLLBACK} ${Ft(t)}`,subTitle:n,action:a!==Ee.Success?{icon:Ri,tooltip:He.ROLLBACK_RECOVER,onClick:i}:void 0}},[o]);return l||s?e(se,{$gap:12,$alignItems:"stretch",children:[l&&t(Ht,{invertColors:!0,slim:!0,width:s?kc:"100%",...l}),s&&t(Ht,{invertColors:!0,slim:!0,width:kc,...s})]}):null},Ec=p(null),Ic=m.div`
|
|
250
250
|
position: relative;
|
|
251
251
|
`,Ac=({children:e})=>{const o=i(null);return t(Ic,{ref:o,children:t(Ec.Provider,{value:o,children:e})})},Nc=m.div`
|
|
252
252
|
position: fixed;
|
|
@@ -362,7 +362,7 @@ import{jsxs as e,jsx as t,Fragment as o}from"react/jsx-runtime";import{useEffect
|
|
|
362
362
|
opacity: 1;
|
|
363
363
|
pointer-events: auto;
|
|
364
364
|
}
|
|
365
|
-
`,Sd=({name:o,summary:n,onJumpToRule:a})=>e(bd,{children:[e(vd,{children:[o&&t(ae,{size:le.XXXS,color:ie.Secondary,nowrap:!0,children:o}),t(yd,{children:t(S,{parts:n})})]}),a&&t(Cd,{children:t(De,{text:He.OPEN_IN_SAMPLING_PAGE,children:t(re,{"data-id":"sampling-rule-jump",variant:de.Primary,size:ce.S,leftIcon:Xi,onClick:a})})})]}),wd=({source:e,onRedirectToSampling:o})=>t(Et,{bgTint:"1000",richTitle:{title:He.SAMPLING},children:e.containers?.map(e=>t(kd,{container:e,onRedirectToSampling:o},e.containerName))});var xd;!function(e){e.All="all",e.Noisy="noisy",e.HighlyRelevant="highly-relevant",e.CostReduction="cost-reduction"}(xd||(xd={}));const Td=e=>"noisy"===e.type?w(e.rule):"highlyRelevant"===e.type?x(e.rule):"costReduction"===e.type?T(e.rule):[],kd=({container:o,onRedirectToSampling:n})=>{const[i,l]=s(xd.All),r=eo(e=>e.setPendingViewSamplingRule),c=o.agentConfig?.traces?.headSampling?.noisyOperations??[],d=a(()=>(o.collectorConfig?.tailSampling?.noisyOperations??[]).map(e=>({type:"noisy",rule:e})),[o.agentConfig?.traces?.headSampling?.noisyOperations]),u=a(()=>(o.collectorConfig?.tailSampling?.highlyRelevantOperations??[]).map(e=>({type:"highlyRelevant",rule:e})),[o.collectorConfig?.tailSampling?.highlyRelevantOperations]),p=a(()=>(o.collectorConfig?.tailSampling?.costReductionRules??[]).map(e=>({type:"costReduction",rule:e})),[o.collectorConfig?.tailSampling?.costReductionRules]),h=a(()=>i===xd.Noisy?d:i===xd.HighlyRelevant?u:i===xd.CostReduction?p:[...d,...u,...p],[i,u,p]),g=a(()=>(e,t)=>{r({ruleId:e,category:t}),n()},[n,r]);return e(Et,{bgTint:"900",richTitle:{title:o.containerName},withCollapse:!0,collapseIsDefaultOpen:!0,children:[e(Et,{bgTint:"800",richTitle:{title:He.HEAD_SAMPLING,badge:{label:c.length}},withCollapse:!0,collapseIsDefaultOpen:!!c.length,children:[t(ae,{size:le.XXS,children:He.NOISY_OPERATIONS}),t(W,{$gap:4,children:c.length?c.map(e=>t(Sd,{name:e.name,summary:w(e),onJumpToRule:()=>g(e.ruleId,"noisy")},e.ruleId)):t(Ce,{title:"No noisy operations"})})]}),e(Et,{bgTint:"800",richTitle:{title:He.TAIL_SAMPLING,badge:{label:d.length+u.length+p.length}},withCollapse:!0,collapseIsDefaultOpen:!!h.length,children:[t(ue,{options:(m=d.length,f=u.length,b=p.length,[{value:xd.All,label:"All",badge:{label:m+f+b,textSize:le.XXXS}},{value:xd.Noisy,label:He.NOISY_OPERATIONS,badge:{label:m,textSize:le.XXXS}},{value:xd.HighlyRelevant,label:He.HIGHLY_RELEVANT_OPERATIONS,badge:{label:f,textSize:le.XXXS}},{value:xd.CostReduction,label:He.COST_REDUCTION_OPERATIONS,badge:{label:b,textSize:le.XXXS}}]),selected:i,setSelected:l}),t(W,{$gap:4,children:h.length?h.map(e=>t(Sd,{name:e.rule.name,summary:Td(e),onJumpToRule:()=>g(e.rule.ruleId,e.type)},e.rule.ruleId)):t(Ce,{title:`No ${i===xd.All?`${xd.Noisy}, ${xd.HighlyRelevant} and ${xd.CostReduction}`:i} operations`})})]})]});var m,f,b},$d=[io.Deployment,io.StatefulSet,io.DaemonSet,io.DeploymentConfig,io.Rollout,io.Pod];var Ed;!function(e){e.Workload="Workload",e.Pod="Pod"}(Ed||(Ed={}));const Id=e=>!!e&&Gt(e.status)===Ee.Error,Ad=e=>Id(e.healthStatus),Nd=e=>Id(e.odigosHealthStatus)||(e.processes??[]).some(Ad),Od=e=>Id(e.agentInjectedStatus)||Id(e.odigosHealthStatus)||(e.containers??[]).some(Nd),Rd=({onClose:o,sourceId:r,onRedirectToSampling:c})=>{const d=f(),{isVm:u}=y(),{sourcesApi:p,configApi:h}=sl(),{selectedStreamName:g}=Ge(),{genericForm:m,loadSource:b,validateFormData:v}=Dl(),{data:C}=h.useEffectiveConfig(),[S,w]=s(!1),[x,T]=s(!1),[k,$]=s(!1),[E,I]=s(Hr.Overview),[A,N]=s(null),[O,R]=s({openFor:null}),D=(()=>{const[e,t]=s(null),o=l(e=>{t({tab:Hr.Pods,podName:e.podName})},[]),n=l((e,o)=>{t({tab:Hr.Pods,podName:e.podName,containerName:o.containerName})},[]),i=l((e,o,n)=>{const a=Jr({identifyingAttributes:n.identifyingAttributes});t({tab:Hr.Pods,podName:e.podName,containerName:o.containerName,processPid:a})},[]),r=l(()=>t(null),[]);return a(()=>({jumpToTarget:e,jumpToPod:o,jumpToContainer:n,jumpToProcess:i,clearJumpToTarget:r}),[e,o,n,i,r])})();n(()=>{D.jumpToTarget&&I(D.jumpToTarget.tab)},[D.jumpToTarget]),n(()=>{A&&JSON.stringify(to(r))!==JSON.stringify(to(A))&&N(null)},[r,A]);const P=i(!1),F=l(async()=>N(await p.fetchById(r)||null),[r,p]);n(()=>{if(P.current||(F(),P.current=!0),!S){const e=setInterval(()=>F(),3e3);return()=>clearInterval(e)}},[F,S]),n(()=>{A&&b(A)},[A]);const L=A&&$d.includes(A.id.kind),_=a(()=>{const e=[],o=(A?.pods??[]).some(Od);return e.push({value:Hr.Overview,label:He.OVERVIEW}),u||(e.push({value:Hr.Pods,label:He.PODS,icon:o?e=>t(Di,{...e,fill:d.v2.colors.red[500]}):void 0}),e.push({value:Hr.PeerSources,label:He.PEER_SOURCES}),C?.profiling?.enabled&&e.push({value:Hr.Profiling,label:He.PROFILING}),e.push({value:Hr.Sampling,label:He.SAMPLING}),e.push({value:Hr.Debug,label:He.DEBUG})),e},[u,C,A?.pods]),z=l(()=>w(!0),[]),M=a(()=>()=>{o(),c()},[o,c]),B=l(()=>{A&&b(A),w(!1)},[A]),X=l(async()=>{if(!A||!m)return;const{errorMessage:e,preparedFormData:t}=v();if(e)return;const o=t.otelServiceName!==A.id.name?t.otelServiceName:"";await p.update(r,{...t,otelServiceName:o}),w(!1)},[A,m,v,r,p]),V=l(()=>T(!0),[]),U=l(async()=>{A&&(await p.persistV2({[wt]:[{namespace:A.id.namespace,name:A.id.name,kind:A.id.kind,selected:!1,currentStreamName:g}]}),T(!1),o())},[A,p,g,o]),H=l(()=>{R({openFor:Ed.Workload})},[]),G=l(e=>{I(e),D.clearJumpToTarget()},[D]),j=l(async()=>{await p.recoverFromRollback(r)},[p,r]),K=l(async()=>{O.openFor===Ed.Workload?await p.restartWorkloads([r]):O.openFor===Ed.Pod&&O.podNamespace&&O.podName&&await p.restartPod(O.podNamespace,O.podName),
|
|
365
|
+
`,Sd=({name:o,summary:n,onJumpToRule:a})=>e(bd,{children:[e(vd,{children:[o&&t(ae,{size:le.XXXS,color:ie.Secondary,nowrap:!0,children:o}),t(yd,{children:t(S,{parts:n})})]}),a&&t(Cd,{children:t(De,{text:He.OPEN_IN_SAMPLING_PAGE,children:t(re,{"data-id":"sampling-rule-jump",variant:de.Primary,size:ce.S,leftIcon:Xi,onClick:a})})})]}),wd=({source:e,onRedirectToSampling:o})=>t(Et,{bgTint:"1000",richTitle:{title:He.SAMPLING},children:e.containers?.map(e=>t(kd,{container:e,onRedirectToSampling:o},e.containerName))});var xd;!function(e){e.All="all",e.Noisy="noisy",e.HighlyRelevant="highly-relevant",e.CostReduction="cost-reduction"}(xd||(xd={}));const Td=e=>"noisy"===e.type?w(e.rule):"highlyRelevant"===e.type?x(e.rule):"costReduction"===e.type?T(e.rule):[],kd=({container:o,onRedirectToSampling:n})=>{const[i,l]=s(xd.All),r=eo(e=>e.setPendingViewSamplingRule),c=o.agentConfig?.traces?.headSampling?.noisyOperations??[],d=a(()=>(o.collectorConfig?.tailSampling?.noisyOperations??[]).map(e=>({type:"noisy",rule:e})),[o.agentConfig?.traces?.headSampling?.noisyOperations]),u=a(()=>(o.collectorConfig?.tailSampling?.highlyRelevantOperations??[]).map(e=>({type:"highlyRelevant",rule:e})),[o.collectorConfig?.tailSampling?.highlyRelevantOperations]),p=a(()=>(o.collectorConfig?.tailSampling?.costReductionRules??[]).map(e=>({type:"costReduction",rule:e})),[o.collectorConfig?.tailSampling?.costReductionRules]),h=a(()=>i===xd.Noisy?d:i===xd.HighlyRelevant?u:i===xd.CostReduction?p:[...d,...u,...p],[i,u,p]),g=a(()=>(e,t)=>{r({ruleId:e,category:t}),n()},[n,r]);return e(Et,{bgTint:"900",richTitle:{title:o.containerName},withCollapse:!0,collapseIsDefaultOpen:!0,children:[e(Et,{bgTint:"800",richTitle:{title:He.HEAD_SAMPLING,badge:{label:c.length}},withCollapse:!0,collapseIsDefaultOpen:!!c.length,children:[t(ae,{size:le.XXS,children:He.NOISY_OPERATIONS}),t(W,{$gap:4,children:c.length?c.map(e=>t(Sd,{name:e.name,summary:w(e),onJumpToRule:()=>g(e.ruleId,"noisy")},e.ruleId)):t(Ce,{title:"No noisy operations"})})]}),e(Et,{bgTint:"800",richTitle:{title:He.TAIL_SAMPLING,badge:{label:d.length+u.length+p.length}},withCollapse:!0,collapseIsDefaultOpen:!!h.length,children:[t(ue,{options:(m=d.length,f=u.length,b=p.length,[{value:xd.All,label:"All",badge:{label:m+f+b,textSize:le.XXXS}},{value:xd.Noisy,label:He.NOISY_OPERATIONS,badge:{label:m,textSize:le.XXXS}},{value:xd.HighlyRelevant,label:He.HIGHLY_RELEVANT_OPERATIONS,badge:{label:f,textSize:le.XXXS}},{value:xd.CostReduction,label:He.COST_REDUCTION_OPERATIONS,badge:{label:b,textSize:le.XXXS}}]),selected:i,setSelected:l}),t(W,{$gap:4,children:h.length?h.map(e=>t(Sd,{name:e.rule.name,summary:Td(e),onJumpToRule:()=>g(e.rule.ruleId,e.type)},e.rule.ruleId)):t(Ce,{title:`No ${i===xd.All?`${xd.Noisy}, ${xd.HighlyRelevant} and ${xd.CostReduction}`:i} operations`})})]})]});var m,f,b},$d=[io.Deployment,io.StatefulSet,io.DaemonSet,io.DeploymentConfig,io.Rollout,io.Pod];var Ed;!function(e){e.Workload="Workload",e.Pod="Pod"}(Ed||(Ed={}));const Id=e=>!!e&&Gt(e.status)===Ee.Error,Ad=e=>Id(e.healthStatus),Nd=e=>Id(e.odigosHealthStatus)||(e.processes??[]).some(Ad),Od=e=>Id(e.agentInjectedStatus)||Id(e.odigosHealthStatus)||(e.containers??[]).some(Nd),Rd=({onClose:o,sourceId:r,onRedirectToSampling:c})=>{const d=f(),{isVm:u}=y(),{sourcesApi:p,configApi:h}=sl(),{selectedStreamName:g}=Ge(),{genericForm:m,loadSource:b,validateFormData:v}=Dl(),{data:C}=h.useEffectiveConfig(),[S,w]=s(!1),[x,T]=s(!1),[k,$]=s(!1),[E,I]=s(Hr.Overview),[A,N]=s(null),[O,R]=s({openFor:null}),D=(()=>{const[e,t]=s(null),o=l(e=>{t({tab:Hr.Pods,podName:e.podName})},[]),n=l((e,o)=>{t({tab:Hr.Pods,podName:e.podName,containerName:o.containerName})},[]),i=l((e,o,n)=>{const a=Jr({identifyingAttributes:n.identifyingAttributes});t({tab:Hr.Pods,podName:e.podName,containerName:o.containerName,processPid:a})},[]),r=l(()=>t(null),[]);return a(()=>({jumpToTarget:e,jumpToPod:o,jumpToContainer:n,jumpToProcess:i,clearJumpToTarget:r}),[e,o,n,i,r])})();n(()=>{D.jumpToTarget&&I(D.jumpToTarget.tab)},[D.jumpToTarget]),n(()=>{A&&JSON.stringify(to(r))!==JSON.stringify(to(A))&&N(null)},[r,A]);const P=i(!1),F=l(async()=>N(await p.fetchById(r)||null),[r,p]);n(()=>{if(P.current||(F(),P.current=!0),!S){const e=setInterval(()=>F(),3e3);return()=>clearInterval(e)}},[F,S]),n(()=>{A&&b(A)},[A]);const L=A&&$d.includes(A.id.kind),_=a(()=>{const e=[],o=(A?.pods??[]).some(Od);return e.push({value:Hr.Overview,label:He.OVERVIEW}),u||(e.push({value:Hr.Pods,label:He.PODS,icon:o?e=>t(Di,{...e,fill:d.v2.colors.red[500]}):void 0}),e.push({value:Hr.PeerSources,label:He.PEER_SOURCES}),C?.profiling?.enabled&&e.push({value:Hr.Profiling,label:He.PROFILING}),e.push({value:Hr.Sampling,label:He.SAMPLING}),e.push({value:Hr.Debug,label:He.DEBUG})),e},[u,C,A?.pods]),z=l(()=>w(!0),[]),M=a(()=>()=>{o(),c()},[o,c]),B=l(()=>{A&&b(A),w(!1)},[A]),X=l(async()=>{if(!A||!m)return;const{errorMessage:e,preparedFormData:t}=v();if(e)return;const o=t.otelServiceName!==A.id.name?t.otelServiceName:"";await p.update(r,{...t,otelServiceName:o}),w(!1)},[A,m,v,r,p]),V=l(()=>T(!0),[]),U=l(async()=>{A&&(await p.persistV2({[wt]:[{namespace:A.id.namespace,name:A.id.name,kind:A.id.kind,selected:!1,currentStreamName:g}]}),T(!1),o())},[A,p,g,o]),H=l(()=>{R({openFor:Ed.Workload})},[]),G=l(e=>{I(e),D.clearJumpToTarget()},[D]),j=l(async()=>{await p.recoverFromRollback(r)},[p,r]),K=l(()=>R({openFor:null}),[]),Y=l(async()=>{O.openFor===Ed.Workload?await p.restartWorkloads([r]):O.openFor===Ed.Pod&&O.podNamespace&&O.podName&&await p.restartPod(O.podNamespace,O.podName),K()},[O,p,r,K]),J=a(()=>{const{kind:e,name:t}=r;return{title:`Rollout ${e}`,description:`Are you sure you want to rollout the ${e.toLowerCase()} "${t}"?`}},[r]),q=a(()=>{const e=[];return S||E===Hr.Overview&&(e.push({id:"edit-source-btn-edit",label:kt.EDIT,icon:mi,active:S,onClick:z}),!u&&L&&e.push({id:"edit-source-btn-restart",label:He.ROLLOUT,icon:Gi,onClick:H}),e.push({id:"edit-source-btn-delete",label:kt.UNINSTRUMENT,icon:ri,color:d.v2.colors.red[500],active:x,onClick:V})),e},[E,S,x,u,L,z,H,V,d]),Z=a(()=>{if(!A)return[];const e=[],t={backgroundColor:"transparent",textSize:le.S};return e.push({...t,label:A.id.name,leftIcon:u?void 0:Oi}),A.serviceName&&A.serviceName!==A.id.name&&e.push({...t,label:A.serviceName,leftIcon:Ni,textColor:d.v2.colors.silver[200]}),e},[A,d,u]);if(!A)return t(oe,{isOpen:!0,children:t(at,{$height:"80vh",children:t(ct,{withSpinner:!0})})});const Q=E===Hr.Profiling?k?"95vw":"80vw":S?void 0:"60vw";return e(ic,{value:D,children:[t(oe,{isOpen:!0,width:Q,minWidth:"777px",header:{icon:u?ji:Co(A.containers)[0],titleBadges:Z,onClose:()=>{G(Hr.Overview),N(null),$(!1),o()},actions:q},footer:{actions:S?[{"data-id":"edit-source-btn-cancel",label:kt.CANCEL,variant:de.Secondary,onClick:B},{"data-id":"edit-source-btn-save",label:kt.SAVE,variant:de.Primary,onClick:X}]:[]},children:t($t,{$padding:"4px 12px 12px",children:e(W,{$gap:16,children:[!S&&_.length>1&&t(ue,{options:_,selected:E,setSelected:G}),(()=>{switch(E){case Hr.Overview:return S?t(js,{}):t(Xc,{source:A,onClickRollout:H,onClickRollback:j});case Hr.Pods:return t(dc,{source:A,onClickRestartPod:L?(e,t)=>R({openFor:Ed.Pod,podNamespace:e,podName:t}):void 0});case Hr.PeerSources:return t(uc,{source:A});case Hr.Profiling:return t(fd,{source:A,onFlameFullscreenChange:$});case Hr.Sampling:return t(wd,{source:A,onRedirectToSampling:M});case Hr.Debug:return t(fc,{source:A});default:return null}})()]})})}),t(wl,{target:"source",action:"uninstrument",isOpen:x,onClose:()=>T(!1),onApprove:U}),t(Ue,{isOpen:O.openFor===Ed.Workload,title:J.title,description:J.description,onClose:K,denyButton:{label:"Go back",variant:de.Secondary,onClick:K},approveButton:{label:kt.CONFIRM,variant:de.Primary,onClick:Y}}),t(wl,{target:"pod",action:"restart",description:He.ROLLOUT_RESTART_WORKLOADS_DESCRIPTION,isOpen:O.openFor===Ed.Pod,onClose:K,onApprove:Y,overrideApproveButtonLabel:He.DELETE_POD_TO_RESTART})]})},Dd=m.div`
|
|
366
366
|
display: flex;
|
|
367
367
|
align-items: center;
|
|
368
368
|
gap: 8px;
|
|
@@ -391,7 +391,7 @@ import{jsxs as e,jsx as t,Fragment as o}from"react/jsx-runtime";import{useEffect
|
|
|
391
391
|
padding: 12px 24px;
|
|
392
392
|
border-radius: 8px;
|
|
393
393
|
background-color: ${({theme:e})=>e.v2.colors.silver[800]};
|
|
394
|
-
`,Zd=()=>{const{progress:o}=Ct(),{describeApi:n,namespacesApi:a}=sl(),{items:i}=a.useNamespaces(),[l,r]=s(null),{formData:c,handleFormChange:d,resetFormData:u}=Nt({includeProfiles:!0,includeMetrics:!0,includeSourceWorkloads:!1,sourceWorkloadNamespaces:[]});return t(et,{richTitle:{icon:Ji,title:"Diagnose"},children:l?e(qd,{children:[t(ct,{title:"Creating file...",subTitle:"This may take a few moments. Do not refresh the page.",withGradient:!0,withSpinner:"number"==typeof o[xt.DownloadingDiagnose]?.percentage,percentage:o[xt.DownloadingDiagnose]?.percentage,withVisual:"number"!=typeof o[xt.DownloadingDiagnose]?.percentage,visualIcon:Hi,startedAt:l}),o[xt.DownloadingDiagnose]?.list?.length&&t(W,{$width:"100%",children:o[xt.DownloadingDiagnose].list.map(o=>e(se,{$gap:4,$alignItems:"center",children:[o.status===Ee.Success?t(xi,{size:16}):o.status===Ee.Error?t(Ti,{size:16}):t(ct,{withSpinnerOld:!0,scaleSpinnerOld:.7}),t(ae,{size:le.XXXS,color:ie.Secondary,children:o.label})]},o.label))})]}):e(W,{$gap:24,children:[t(ae,{size:le.XXS,color:ie.Secondary,children:"Download a tar.gz file with diagnostics from this cluster. Select which data to include before downloading, and share the file with the Odigos support team for troubleshooting."}),e(W,{$gap:16,children:[e(se,{$gap:8,children:[t(Y,{label:"Profiles",value:c.includeProfiles,onChange:e=>d("includeProfiles",e),tooltip:"Note: Adds 30s to diagnose download time to collect Profiles"}),t(ae,{size:le.XXXS,color:ie.Secondary,children:"Include pprof profiles"})]}),e(se,{$gap:8,children:[t(Y,{label:"Metrics",value:c.includeMetrics,onChange:e=>d("includeMetrics",e)}),t(ae,{size:le.XXXS,color:ie.Secondary,children:"Include Prometheus metrics"})]}),e(se,{$gap:8,children:[t(Y,{label:"Source Workloads",value:c.includeSourceWorkloads,onChange:e=>{d("includeSourceWorkloads",e),e&&d("sourceWorkloadNamespaces",[])}}),t(ae,{size:le.XXXS,color:ie.Secondary,children:"Include workload and pod manifests for instrumented sources"})]})]}),t(Bo,{alignX:Vo.Left,alignY:Xo.Bottom,items:i.map(e=>({id:e.name,label:e.name,withCheckbox:!0})),selectedIds:c.sourceWorkloadNamespaces,setSelectedIds:e=>d("sourceWorkloadNamespaces",e),withMultiSelect:!0,withSearch:!0,fullWidth:!0,buttonProps:{label:(c.sourceWorkloadNamespaces.length?"Selected":"Select")+" Namespaces",variant:de.Secondary,disabled:c.includeSourceWorkloads,leftIcon:c.sourceWorkloadNamespaces.length?()=>t(Be,{label:c.sourceWorkloadNamespaces.length,status:Ee.Default}):void 0}}),t(se,{$justifyContent:"flex-end",children:t(re,{label:"Download Diagnose",rightIcon:Hi,variant:de.Primary,onClick:async()=>{n.downloadDiagnose&&(r(Date.now()),await n.downloadDiagnose(c),r(null),u())},disabled:null!==l})})]})})},Qd=()=>{const{platformType:e,version:o,tier:a}=y(),{describeApi:i}=sl(),[l,r]=s(null);return n(()=>{i.fetchDescribeOdigos&&i.fetchDescribeOdigos().then(({data:e})=>r(e?.describeOdigos??null))},[]),t(et,{richTitle:{icon:zi,title:"General Information"},children:t(Et,{cellsPerRow:2,items:[{id:Uo(),title:"Odigos Version",label:o},{id:Uo(),title:`${e.toUpperCase()} Version`,label:l?.kubernetesVersion?.value||"-"},{id:Uo(),title:"Installation Method",label:l?.installationMethod?.value||"-"},{id:Uo(),title:"Tier",label:a}]})})},eu=({isOpen:o,onClose:n})=>{const{describeApi:a,tokensApi:i}=sl(),l=i.useTokens().items[0];return e(oe,{isOpen:o,header:{icon:zi,title:"System Overview",onClose:n},children:[a.fetchDescribeOdigos&&t(Qd,{}),i.updateToken&&l&&t(Jd,{token:l}),a.downloadDiagnose&&t(Zd,{})]})},tu=({isOpen:n,onClose:a,onCloseEnd:i})=>{const{addDataStreams:s,setSelectedStreamName:r}=Ge(),{dataStreamsApi:c}=sl(),{requestSubmit:d}=Rl(),u=l(async e=>{c.create?await c.create(e):(s([e]),r(e.name)),a()},[c,s,r,a]),p=l(()=>d(u),[d,u]);return zo({key:"Enter",active:n},p),e(o,{children:[t(Ue,{isOpen:n,onClose:a,onCloseEnd:i,title:He.NAME_YOUR_STREAM,description:He.STREAM_DESCRIPTION,approveButton:{"data-id":"add-stream-btn-done",label:kt.DONE,variant:de.Primary,onClick:p},denyButton:{"data-id":"add-stream-btn-cancel",label:kt.CANCEL,variant:de.Secondary,onClick:a},children:t(Gs,{autoFocus:!0})}),t(Hs,{})]})},ou=({isOpen:a,onClose:i,onCloseEnd:s,dataStreamName:r})=>{const{dataStreamsApi:c}=sl(),{genericForm:d,loadDataStream:u,requestSubmit:p}=Rl();n(()=>{a&&r&&u(r)},[a,r]);const h=!!d?.isFormDirty,g=l(async e=>{await c.update(r,e),i()},[c,r,i]),m=l(()=>p(g),[p,g]);return zo({key:"Enter",active:a},m),e(o,{children:[t(Ue,{isOpen:a,onClose:i,onCloseEnd:s,title:He.RENAME_STREAM(r),description:He.STREAM_DESCRIPTION,approveButton:{"data-id":"edit-stream-btn-save",label:kt.SAVE,variant:de.Primary,onClick:m,disabled:!h},denyButton:{"data-id":"edit-stream-btn-cancel",label:kt.CANCEL,variant:de.Secondary,onClick:i},children:t(Gs,{autoFocus:!0})}),t(Hs,{})]})},nu=({scale:o=1})=>e("svg",{width:742*o,height:533*o,viewBox:"0 0 742 533",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t("path",{d:"M0 0H722C733.046 0 742 8.95431 742 20V513C742 524.046 733.046 533 722 533H0V0Z",fill:"url(#paint0_linear_1585_55266)"}),e("g",{clipPath:"url(#clip0_1585_55266)",children:[t("path",{opacity:"0.1",d:"M817.963 1364.02C1052.53 1129.46 1052.53 749.151 817.96 514.585C583.394 280.019 203.089 280.018 -31.4751 514.583C-266.039 749.147 -266.038 1129.45 -31.4725 1364.02C203.093 1598.58 583.398 1598.58 817.963 1364.02Z",fill:"url(#paint1_radial_1585_55266)"}),t("path",{opacity:"0.3",d:"M789.266 1335.32C1007.98 1116.61 1007.98 761.998 789.264 543.281C570.547 324.565 215.938 324.563 -2.7781 543.279C-221.494 761.995 -221.493 1116.6 -2.77577 1335.32C215.941 1554.04 570.55 1554.04 789.266 1335.32Z",fill:"url(#paint2_radial_1585_55266)"}),t("path",{opacity:"0.5",d:"M736.156 1282.21C925.539 1092.83 925.538 785.776 736.153 596.392C546.769 407.007 239.717 407.006 50.333 596.39C-139.05 785.773 -139.05 1092.83 50.3351 1282.21C239.72 1471.59 546.772 1471.6 736.156 1282.21Z",fill:"url(#paint3_radial_1585_55266)"}),t("path",{opacity:"0.7",d:"M628.365 1174.42C758.218 1044.57 758.217 834.036 628.364 704.182C498.51 574.329 287.977 574.328 158.124 704.181C28.2713 834.033 28.272 1044.57 158.125 1174.42C287.979 1304.27 498.512 1304.27 628.365 1174.42Z",fill:"url(#paint4_radial_1585_55266)"}),t("path",{opacity:"0.1",d:"M795.717 29.8993C1030.28 -204.665 1030.28 -584.97 795.714 -819.536C561.148 -1054.1 180.843 -1054.1 -53.7211 -819.539C-288.285 -584.974 -288.284 -204.669 -53.7185 29.8967C180.847 264.462 561.152 264.464 795.717 29.8993Z",fill:"url(#paint5_radial_1585_55266)"}),t("path",{opacity:"0.3",d:"M767.02 1.20219C985.736 -217.513 985.734 -572.123 767.017 -790.84C548.301 -1009.56 193.691 -1009.56 -25.0242 -790.842C-243.74 -572.126 -243.739 -217.517 -25.0219 1.19982C193.695 219.917 548.304 219.918 767.02 1.20219Z",fill:"url(#paint6_radial_1585_55266)"}),t("path",{opacity:"0.5",d:"M713.909 -51.908C903.293 -241.292 903.292 -548.344 713.907 -737.728C524.523 -927.113 217.47 -927.114 28.0869 -737.731C-161.297 -548.347 -161.296 -241.295 28.089 -51.91C217.474 137.475 524.526 137.476 713.909 -51.908Z",fill:"url(#paint7_radial_1585_55266)"}),t("path",{opacity:"0.7",d:"M606.119 -159.699C735.972 -289.552 735.971 -500.085 606.118 -629.939C476.264 -759.792 265.731 -759.793 135.878 -629.94C6.0252 -500.088 6.02586 -289.554 135.879 -159.701C265.733 -29.8472 476.266 -29.8465 606.119 -159.699Z",fill:"url(#paint8_radial_1585_55266)"})]}),e("defs",{children:[e("linearGradient",{id:"paint0_linear_1585_55266",x1:"371",y1:"0",x2:"371",y2:"533",gradientUnits:"userSpaceOnUse",children:[t("stop",{offset:"0.028197",stopColor:"#0B0517"}),t("stop",{offset:"1",stopColor:"#190D31"})]}),e("radialGradient",{id:"paint1_radial_1585_55266",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(334.074 991.405) rotate(-45) scale(599.732 599.736)",children:[t("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),t("stop",{offset:"0.41",stopColor:"#7C3BFF",stopOpacity:"0.11"}),t("stop",{offset:"0.56",stopColor:"#7C3BFF",stopOpacity:"0.13"}),t("stop",{offset:"0.67",stopColor:"#7C3BFF",stopOpacity:"0.18"}),t("stop",{offset:"0.75",stopColor:"#7C3BFF",stopOpacity:"0.25"}),t("stop",{offset:"0.83",stopColor:"#7C3BFF",stopOpacity:"0.33"}),t("stop",{offset:"0.89",stopColor:"#7C3BFF",stopOpacity:"0.44"}),t("stop",{offset:"0.95",stopColor:"#7C3BFF",stopOpacity:"0.56"}),t("stop",{offset:"1",stopColor:"#7C3BFF",stopOpacity:"0.7"})]}),e("radialGradient",{id:"paint2_radial_1585_55266",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(368.968 957.913) rotate(-45) scale(560.978 560.981)",children:[t("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),t("stop",{offset:"0.38",stopColor:"#7C3BFF",stopOpacity:"0.11"}),t("stop",{offset:"0.52",stopColor:"#7C3BFF",stopOpacity:"0.13"}),t("stop",{offset:"0.62",stopColor:"#7C3BFF",stopOpacity:"0.18"}),t("stop",{offset:"0.69",stopColor:"#7C3BFF",stopOpacity:"0.25"}),t("stop",{offset:"0.76",stopColor:"#7C3BFF",stopOpacity:"0.33"}),t("stop",{offset:"0.82",stopColor:"#7C3BFF",stopOpacity:"0.44"}),t("stop",{offset:"0.88",stopColor:"#7C3BFF",stopOpacity:"0.57"}),t("stop",{offset:"0.93",stopColor:"#7C3BFF",stopOpacity:"0.72"}),t("stop",{offset:"0.97",stopColor:"#7C3BFF",stopOpacity:"0.88"}),t("stop",{offset:"1",stopColor:"#7C3BFF"})]}),e("radialGradient",{id:"paint3_radial_1585_55266",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(351.265 971.313) rotate(-45) scale(484.947 484.95)",children:[t("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),t("stop",{offset:"0.31",stopColor:"#7C3BFF",stopOpacity:"0.11"}),t("stop",{offset:"0.45",stopColor:"#7C3BFF",stopOpacity:"0.14"}),t("stop",{offset:"0.56",stopColor:"#7C3BFF",stopOpacity:"0.19"}),t("stop",{offset:"0.65",stopColor:"#7C3BFF",stopOpacity:"0.26"}),t("stop",{offset:"0.73",stopColor:"#7C3BFF",stopOpacity:"0.35"}),t("stop",{offset:"0.8",stopColor:"#7C3BFF",stopOpacity:"0.46"}),t("stop",{offset:"0.86",stopColor:"#7C3BFF",stopOpacity:"0.6"}),t("stop",{offset:"0.92",stopColor:"#7C3BFF",stopOpacity:"0.76"}),t("stop",{offset:"0.98",stopColor:"#7C3BFF",stopOpacity:"0.93"}),t("stop",{offset:"1",stopColor:"#7C3BFF"})]}),e("radialGradient",{id:"paint4_radial_1585_55266",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(362.239 963.064) rotate(-45) scale(332.216 332.218)",children:[t("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),t("stop",{offset:"0.31",stopColor:"#7C3BFF",stopOpacity:"0.11"}),t("stop",{offset:"0.45",stopColor:"#7C3BFF",stopOpacity:"0.14"}),t("stop",{offset:"0.56",stopColor:"#7C3BFF",stopOpacity:"0.19"}),t("stop",{offset:"0.65",stopColor:"#7C3BFF",stopOpacity:"0.26"}),t("stop",{offset:"0.73",stopColor:"#7C3BFF",stopOpacity:"0.35"}),t("stop",{offset:"0.8",stopColor:"#7C3BFF",stopOpacity:"0.46"}),t("stop",{offset:"0.86",stopColor:"#7C3BFF",stopOpacity:"0.6"}),t("stop",{offset:"0.92",stopColor:"#7C3BFF",stopOpacity:"0.76"}),t("stop",{offset:"0.98",stopColor:"#7C3BFF",stopOpacity:"0.93"}),t("stop",{offset:"1",stopColor:"#7C3BFF"})]}),e("radialGradient",{id:"paint5_radial_1585_55266",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(311.828 -342.716) rotate(-45) scale(599.733 599.736)",children:[t("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),t("stop",{offset:"0.41",stopColor:"#7C3BFF",stopOpacity:"0.11"}),t("stop",{offset:"0.56",stopColor:"#7C3BFF",stopOpacity:"0.13"}),t("stop",{offset:"0.67",stopColor:"#7C3BFF",stopOpacity:"0.18"}),t("stop",{offset:"0.75",stopColor:"#7C3BFF",stopOpacity:"0.25"}),t("stop",{offset:"0.83",stopColor:"#7C3BFF",stopOpacity:"0.33"}),t("stop",{offset:"0.89",stopColor:"#7C3BFF",stopOpacity:"0.44"}),t("stop",{offset:"0.95",stopColor:"#7C3BFF",stopOpacity:"0.56"}),t("stop",{offset:"1",stopColor:"#7C3BFF",stopOpacity:"0.7"})]}),e("radialGradient",{id:"paint6_radial_1585_55266",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(346.722 -376.208) rotate(-45) scale(560.977 560.981)",children:[t("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),t("stop",{offset:"0.38",stopColor:"#7C3BFF",stopOpacity:"0.11"}),t("stop",{offset:"0.52",stopColor:"#7C3BFF",stopOpacity:"0.13"}),t("stop",{offset:"0.62",stopColor:"#7C3BFF",stopOpacity:"0.18"}),t("stop",{offset:"0.69",stopColor:"#7C3BFF",stopOpacity:"0.25"}),t("stop",{offset:"0.76",stopColor:"#7C3BFF",stopOpacity:"0.33"}),t("stop",{offset:"0.82",stopColor:"#7C3BFF",stopOpacity:"0.44"}),t("stop",{offset:"0.88",stopColor:"#7C3BFF",stopOpacity:"0.57"}),t("stop",{offset:"0.93",stopColor:"#7C3BFF",stopOpacity:"0.72"}),t("stop",{offset:"0.97",stopColor:"#7C3BFF",stopOpacity:"0.88"}),t("stop",{offset:"1",stopColor:"#7C3BFF"})]}),e("radialGradient",{id:"paint7_radial_1585_55266",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(329.019 -362.807) rotate(-45) scale(484.947 484.95)",children:[t("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),t("stop",{offset:"0.31",stopColor:"#7C3BFF",stopOpacity:"0.11"}),t("stop",{offset:"0.45",stopColor:"#7C3BFF",stopOpacity:"0.14"}),t("stop",{offset:"0.56",stopColor:"#7C3BFF",stopOpacity:"0.19"}),t("stop",{offset:"0.65",stopColor:"#7C3BFF",stopOpacity:"0.26"}),t("stop",{offset:"0.73",stopColor:"#7C3BFF",stopOpacity:"0.35"}),t("stop",{offset:"0.8",stopColor:"#7C3BFF",stopOpacity:"0.46"}),t("stop",{offset:"0.86",stopColor:"#7C3BFF",stopOpacity:"0.6"}),t("stop",{offset:"0.92",stopColor:"#7C3BFF",stopOpacity:"0.76"}),t("stop",{offset:"0.98",stopColor:"#7C3BFF",stopOpacity:"0.93"}),t("stop",{offset:"1",stopColor:"#7C3BFF"})]}),e("radialGradient",{id:"paint8_radial_1585_55266",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(339.993 -371.057) rotate(-45) scale(332.216 332.218)",children:[t("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),t("stop",{offset:"0.31",stopColor:"#7C3BFF",stopOpacity:"0.11"}),t("stop",{offset:"0.45",stopColor:"#7C3BFF",stopOpacity:"0.14"}),t("stop",{offset:"0.56",stopColor:"#7C3BFF",stopOpacity:"0.19"}),t("stop",{offset:"0.65",stopColor:"#7C3BFF",stopOpacity:"0.26"}),t("stop",{offset:"0.73",stopColor:"#7C3BFF",stopOpacity:"0.35"}),t("stop",{offset:"0.8",stopColor:"#7C3BFF",stopOpacity:"0.46"}),t("stop",{offset:"0.86",stopColor:"#7C3BFF",stopOpacity:"0.6"}),t("stop",{offset:"0.92",stopColor:"#7C3BFF",stopOpacity:"0.76"}),t("stop",{offset:"0.98",stopColor:"#7C3BFF",stopOpacity:"0.93"}),t("stop",{offset:"1",stopColor:"#7C3BFF"})]}),t("clipPath",{id:"clip0_1585_55266",children:t("rect",{width:"929.477",height:"667",fill:"white",transform:"translate(-93.7383 -134)"})})]})]}),au=m.div`
|
|
394
|
+
`,Zd=()=>{const{progress:o}=Ct(),{describeApi:n,namespacesApi:a}=sl(),{items:i}=a.useNamespaces(),[l,r]=s(null),{formData:c,handleFormChange:d,resetFormData:u}=Nt({includeProfiles:!0,includeMetrics:!0,includeSourceWorkloads:!1,sourceWorkloadNamespaces:[]});return t(et,{richTitle:{icon:Ji,title:"Diagnose"},children:l?e(qd,{children:[t(ct,{title:"Creating file...",subTitle:"This may take a few moments. Do not refresh the page.",withGradient:!0,withSpinner:"number"==typeof o[xt.DownloadingDiagnose]?.percentage,percentage:o[xt.DownloadingDiagnose]?.percentage,withVisual:"number"!=typeof o[xt.DownloadingDiagnose]?.percentage,visualIcon:Hi,startedAt:l}),o[xt.DownloadingDiagnose]?.list?.length&&t(W,{$width:"100%",children:o[xt.DownloadingDiagnose].list.map((o,n)=>e(se,{$gap:4,$alignItems:"center",children:[o.status===Ee.Success?t(xi,{size:16}):o.status===Ee.Error?t(Ti,{size:16}):t(ct,{withSpinnerOld:!0,scaleSpinnerOld:.7}),t(ae,{size:le.XXXS,color:ie.Secondary,children:o.label})]},`diagnose-item-${n}-${o.label}`))})]}):e(W,{$gap:24,children:[t(ae,{size:le.XXS,color:ie.Secondary,children:"Download a tar.gz file with diagnostics from this cluster. Select which data to include before downloading, and share the file with the Odigos support team for troubleshooting."}),e(W,{$gap:16,children:[e(se,{$gap:8,children:[t(Y,{label:"Profiles",value:c.includeProfiles,onChange:e=>d("includeProfiles",e),tooltip:"Note: Adds 30s to diagnose download time to collect Profiles"}),t(ae,{size:le.XXXS,color:ie.Secondary,children:"Include pprof profiles"})]}),e(se,{$gap:8,children:[t(Y,{label:"Metrics",value:c.includeMetrics,onChange:e=>d("includeMetrics",e)}),t(ae,{size:le.XXXS,color:ie.Secondary,children:"Include Prometheus metrics"})]}),e(se,{$gap:8,children:[t(Y,{label:"Source Workloads",value:c.includeSourceWorkloads,onChange:e=>{d("includeSourceWorkloads",e),e&&d("sourceWorkloadNamespaces",[])}}),t(ae,{size:le.XXXS,color:ie.Secondary,children:"Include workload and pod manifests for instrumented sources"})]})]}),t(Bo,{alignX:Vo.Left,alignY:Xo.Bottom,items:i.map(e=>({id:e.name,label:e.name,withCheckbox:!0})),selectedIds:c.sourceWorkloadNamespaces,setSelectedIds:e=>d("sourceWorkloadNamespaces",e),withMultiSelect:!0,withSearch:!0,fullWidth:!0,buttonProps:{label:(c.sourceWorkloadNamespaces.length?"Selected":"Select")+" Namespaces",variant:de.Secondary,disabled:c.includeSourceWorkloads,leftIcon:c.sourceWorkloadNamespaces.length?()=>t(Be,{label:c.sourceWorkloadNamespaces.length,status:Ee.Default}):void 0}}),t(se,{$justifyContent:"flex-end",children:t(re,{label:"Download Diagnose",rightIcon:Hi,variant:de.Primary,onClick:async()=>{n.downloadDiagnose&&(r(Date.now()),await n.downloadDiagnose(c),r(null),u())},disabled:null!==l})})]})})},Qd=()=>{const{platformType:e,version:o,tier:a}=y(),{describeApi:i}=sl(),[l,r]=s(null);return n(()=>{i.fetchDescribeOdigos&&i.fetchDescribeOdigos().then(({data:e})=>r(e?.describeOdigos??null))},[]),t(et,{richTitle:{icon:zi,title:"General Information"},children:t(Et,{cellsPerRow:2,items:[{id:Uo(),title:"Odigos Version",label:o},{id:Uo(),title:`${e.toUpperCase()} Version`,label:l?.kubernetesVersion?.value||"-"},{id:Uo(),title:"Installation Method",label:l?.installationMethod?.value||"-"},{id:Uo(),title:"Tier",label:a}]})})},eu=({isOpen:o,onClose:n})=>{const{describeApi:a,tokensApi:i}=sl(),l=i.useTokens().items[0];return e(oe,{isOpen:o,header:{icon:zi,title:"System Overview",onClose:n},children:[a.fetchDescribeOdigos&&t(Qd,{}),i.updateToken&&l&&t(Jd,{token:l}),a.downloadDiagnose&&t(Zd,{})]})},tu=({isOpen:n,onClose:a,onCloseEnd:i})=>{const{addDataStreams:s,setSelectedStreamName:r}=Ge(),{dataStreamsApi:c}=sl(),{requestSubmit:d}=Rl(),u=l(async e=>{c.create?await c.create(e):(s([e]),r(e.name)),a()},[c,s,r,a]),p=l(()=>d(u),[d,u]);return zo({key:"Enter",active:n},p),e(o,{children:[t(Ue,{isOpen:n,onClose:a,onCloseEnd:i,title:He.NAME_YOUR_STREAM,description:He.STREAM_DESCRIPTION,approveButton:{"data-id":"add-stream-btn-done",label:kt.DONE,variant:de.Primary,onClick:p},denyButton:{"data-id":"add-stream-btn-cancel",label:kt.CANCEL,variant:de.Secondary,onClick:a},children:t(Gs,{autoFocus:!0})}),t(Hs,{})]})},ou=({isOpen:a,onClose:i,onCloseEnd:s,dataStreamName:r})=>{const{dataStreamsApi:c}=sl(),{genericForm:d,loadDataStream:u,requestSubmit:p}=Rl();n(()=>{a&&r&&u(r)},[a,r]);const h=!!d?.isFormDirty,g=l(async e=>{await c.update(r,e),i()},[c,r,i]),m=l(()=>p(g),[p,g]);return zo({key:"Enter",active:a},m),e(o,{children:[t(Ue,{isOpen:a,onClose:i,onCloseEnd:s,title:He.RENAME_STREAM(r),description:He.STREAM_DESCRIPTION,approveButton:{"data-id":"edit-stream-btn-save",label:kt.SAVE,variant:de.Primary,onClick:m,disabled:!h},denyButton:{"data-id":"edit-stream-btn-cancel",label:kt.CANCEL,variant:de.Secondary,onClick:i},children:t(Gs,{autoFocus:!0})}),t(Hs,{})]})},nu=({scale:o=1})=>e("svg",{width:742*o,height:533*o,viewBox:"0 0 742 533",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t("path",{d:"M0 0H722C733.046 0 742 8.95431 742 20V513C742 524.046 733.046 533 722 533H0V0Z",fill:"url(#paint0_linear_1585_55266)"}),e("g",{clipPath:"url(#clip0_1585_55266)",children:[t("path",{opacity:"0.1",d:"M817.963 1364.02C1052.53 1129.46 1052.53 749.151 817.96 514.585C583.394 280.019 203.089 280.018 -31.4751 514.583C-266.039 749.147 -266.038 1129.45 -31.4725 1364.02C203.093 1598.58 583.398 1598.58 817.963 1364.02Z",fill:"url(#paint1_radial_1585_55266)"}),t("path",{opacity:"0.3",d:"M789.266 1335.32C1007.98 1116.61 1007.98 761.998 789.264 543.281C570.547 324.565 215.938 324.563 -2.7781 543.279C-221.494 761.995 -221.493 1116.6 -2.77577 1335.32C215.941 1554.04 570.55 1554.04 789.266 1335.32Z",fill:"url(#paint2_radial_1585_55266)"}),t("path",{opacity:"0.5",d:"M736.156 1282.21C925.539 1092.83 925.538 785.776 736.153 596.392C546.769 407.007 239.717 407.006 50.333 596.39C-139.05 785.773 -139.05 1092.83 50.3351 1282.21C239.72 1471.59 546.772 1471.6 736.156 1282.21Z",fill:"url(#paint3_radial_1585_55266)"}),t("path",{opacity:"0.7",d:"M628.365 1174.42C758.218 1044.57 758.217 834.036 628.364 704.182C498.51 574.329 287.977 574.328 158.124 704.181C28.2713 834.033 28.272 1044.57 158.125 1174.42C287.979 1304.27 498.512 1304.27 628.365 1174.42Z",fill:"url(#paint4_radial_1585_55266)"}),t("path",{opacity:"0.1",d:"M795.717 29.8993C1030.28 -204.665 1030.28 -584.97 795.714 -819.536C561.148 -1054.1 180.843 -1054.1 -53.7211 -819.539C-288.285 -584.974 -288.284 -204.669 -53.7185 29.8967C180.847 264.462 561.152 264.464 795.717 29.8993Z",fill:"url(#paint5_radial_1585_55266)"}),t("path",{opacity:"0.3",d:"M767.02 1.20219C985.736 -217.513 985.734 -572.123 767.017 -790.84C548.301 -1009.56 193.691 -1009.56 -25.0242 -790.842C-243.74 -572.126 -243.739 -217.517 -25.0219 1.19982C193.695 219.917 548.304 219.918 767.02 1.20219Z",fill:"url(#paint6_radial_1585_55266)"}),t("path",{opacity:"0.5",d:"M713.909 -51.908C903.293 -241.292 903.292 -548.344 713.907 -737.728C524.523 -927.113 217.47 -927.114 28.0869 -737.731C-161.297 -548.347 -161.296 -241.295 28.089 -51.91C217.474 137.475 524.526 137.476 713.909 -51.908Z",fill:"url(#paint7_radial_1585_55266)"}),t("path",{opacity:"0.7",d:"M606.119 -159.699C735.972 -289.552 735.971 -500.085 606.118 -629.939C476.264 -759.792 265.731 -759.793 135.878 -629.94C6.0252 -500.088 6.02586 -289.554 135.879 -159.701C265.733 -29.8472 476.266 -29.8465 606.119 -159.699Z",fill:"url(#paint8_radial_1585_55266)"})]}),e("defs",{children:[e("linearGradient",{id:"paint0_linear_1585_55266",x1:"371",y1:"0",x2:"371",y2:"533",gradientUnits:"userSpaceOnUse",children:[t("stop",{offset:"0.028197",stopColor:"#0B0517"}),t("stop",{offset:"1",stopColor:"#190D31"})]}),e("radialGradient",{id:"paint1_radial_1585_55266",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(334.074 991.405) rotate(-45) scale(599.732 599.736)",children:[t("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),t("stop",{offset:"0.41",stopColor:"#7C3BFF",stopOpacity:"0.11"}),t("stop",{offset:"0.56",stopColor:"#7C3BFF",stopOpacity:"0.13"}),t("stop",{offset:"0.67",stopColor:"#7C3BFF",stopOpacity:"0.18"}),t("stop",{offset:"0.75",stopColor:"#7C3BFF",stopOpacity:"0.25"}),t("stop",{offset:"0.83",stopColor:"#7C3BFF",stopOpacity:"0.33"}),t("stop",{offset:"0.89",stopColor:"#7C3BFF",stopOpacity:"0.44"}),t("stop",{offset:"0.95",stopColor:"#7C3BFF",stopOpacity:"0.56"}),t("stop",{offset:"1",stopColor:"#7C3BFF",stopOpacity:"0.7"})]}),e("radialGradient",{id:"paint2_radial_1585_55266",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(368.968 957.913) rotate(-45) scale(560.978 560.981)",children:[t("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),t("stop",{offset:"0.38",stopColor:"#7C3BFF",stopOpacity:"0.11"}),t("stop",{offset:"0.52",stopColor:"#7C3BFF",stopOpacity:"0.13"}),t("stop",{offset:"0.62",stopColor:"#7C3BFF",stopOpacity:"0.18"}),t("stop",{offset:"0.69",stopColor:"#7C3BFF",stopOpacity:"0.25"}),t("stop",{offset:"0.76",stopColor:"#7C3BFF",stopOpacity:"0.33"}),t("stop",{offset:"0.82",stopColor:"#7C3BFF",stopOpacity:"0.44"}),t("stop",{offset:"0.88",stopColor:"#7C3BFF",stopOpacity:"0.57"}),t("stop",{offset:"0.93",stopColor:"#7C3BFF",stopOpacity:"0.72"}),t("stop",{offset:"0.97",stopColor:"#7C3BFF",stopOpacity:"0.88"}),t("stop",{offset:"1",stopColor:"#7C3BFF"})]}),e("radialGradient",{id:"paint3_radial_1585_55266",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(351.265 971.313) rotate(-45) scale(484.947 484.95)",children:[t("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),t("stop",{offset:"0.31",stopColor:"#7C3BFF",stopOpacity:"0.11"}),t("stop",{offset:"0.45",stopColor:"#7C3BFF",stopOpacity:"0.14"}),t("stop",{offset:"0.56",stopColor:"#7C3BFF",stopOpacity:"0.19"}),t("stop",{offset:"0.65",stopColor:"#7C3BFF",stopOpacity:"0.26"}),t("stop",{offset:"0.73",stopColor:"#7C3BFF",stopOpacity:"0.35"}),t("stop",{offset:"0.8",stopColor:"#7C3BFF",stopOpacity:"0.46"}),t("stop",{offset:"0.86",stopColor:"#7C3BFF",stopOpacity:"0.6"}),t("stop",{offset:"0.92",stopColor:"#7C3BFF",stopOpacity:"0.76"}),t("stop",{offset:"0.98",stopColor:"#7C3BFF",stopOpacity:"0.93"}),t("stop",{offset:"1",stopColor:"#7C3BFF"})]}),e("radialGradient",{id:"paint4_radial_1585_55266",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(362.239 963.064) rotate(-45) scale(332.216 332.218)",children:[t("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),t("stop",{offset:"0.31",stopColor:"#7C3BFF",stopOpacity:"0.11"}),t("stop",{offset:"0.45",stopColor:"#7C3BFF",stopOpacity:"0.14"}),t("stop",{offset:"0.56",stopColor:"#7C3BFF",stopOpacity:"0.19"}),t("stop",{offset:"0.65",stopColor:"#7C3BFF",stopOpacity:"0.26"}),t("stop",{offset:"0.73",stopColor:"#7C3BFF",stopOpacity:"0.35"}),t("stop",{offset:"0.8",stopColor:"#7C3BFF",stopOpacity:"0.46"}),t("stop",{offset:"0.86",stopColor:"#7C3BFF",stopOpacity:"0.6"}),t("stop",{offset:"0.92",stopColor:"#7C3BFF",stopOpacity:"0.76"}),t("stop",{offset:"0.98",stopColor:"#7C3BFF",stopOpacity:"0.93"}),t("stop",{offset:"1",stopColor:"#7C3BFF"})]}),e("radialGradient",{id:"paint5_radial_1585_55266",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(311.828 -342.716) rotate(-45) scale(599.733 599.736)",children:[t("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),t("stop",{offset:"0.41",stopColor:"#7C3BFF",stopOpacity:"0.11"}),t("stop",{offset:"0.56",stopColor:"#7C3BFF",stopOpacity:"0.13"}),t("stop",{offset:"0.67",stopColor:"#7C3BFF",stopOpacity:"0.18"}),t("stop",{offset:"0.75",stopColor:"#7C3BFF",stopOpacity:"0.25"}),t("stop",{offset:"0.83",stopColor:"#7C3BFF",stopOpacity:"0.33"}),t("stop",{offset:"0.89",stopColor:"#7C3BFF",stopOpacity:"0.44"}),t("stop",{offset:"0.95",stopColor:"#7C3BFF",stopOpacity:"0.56"}),t("stop",{offset:"1",stopColor:"#7C3BFF",stopOpacity:"0.7"})]}),e("radialGradient",{id:"paint6_radial_1585_55266",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(346.722 -376.208) rotate(-45) scale(560.977 560.981)",children:[t("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),t("stop",{offset:"0.38",stopColor:"#7C3BFF",stopOpacity:"0.11"}),t("stop",{offset:"0.52",stopColor:"#7C3BFF",stopOpacity:"0.13"}),t("stop",{offset:"0.62",stopColor:"#7C3BFF",stopOpacity:"0.18"}),t("stop",{offset:"0.69",stopColor:"#7C3BFF",stopOpacity:"0.25"}),t("stop",{offset:"0.76",stopColor:"#7C3BFF",stopOpacity:"0.33"}),t("stop",{offset:"0.82",stopColor:"#7C3BFF",stopOpacity:"0.44"}),t("stop",{offset:"0.88",stopColor:"#7C3BFF",stopOpacity:"0.57"}),t("stop",{offset:"0.93",stopColor:"#7C3BFF",stopOpacity:"0.72"}),t("stop",{offset:"0.97",stopColor:"#7C3BFF",stopOpacity:"0.88"}),t("stop",{offset:"1",stopColor:"#7C3BFF"})]}),e("radialGradient",{id:"paint7_radial_1585_55266",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(329.019 -362.807) rotate(-45) scale(484.947 484.95)",children:[t("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),t("stop",{offset:"0.31",stopColor:"#7C3BFF",stopOpacity:"0.11"}),t("stop",{offset:"0.45",stopColor:"#7C3BFF",stopOpacity:"0.14"}),t("stop",{offset:"0.56",stopColor:"#7C3BFF",stopOpacity:"0.19"}),t("stop",{offset:"0.65",stopColor:"#7C3BFF",stopOpacity:"0.26"}),t("stop",{offset:"0.73",stopColor:"#7C3BFF",stopOpacity:"0.35"}),t("stop",{offset:"0.8",stopColor:"#7C3BFF",stopOpacity:"0.46"}),t("stop",{offset:"0.86",stopColor:"#7C3BFF",stopOpacity:"0.6"}),t("stop",{offset:"0.92",stopColor:"#7C3BFF",stopOpacity:"0.76"}),t("stop",{offset:"0.98",stopColor:"#7C3BFF",stopOpacity:"0.93"}),t("stop",{offset:"1",stopColor:"#7C3BFF"})]}),e("radialGradient",{id:"paint8_radial_1585_55266",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(339.993 -371.057) rotate(-45) scale(332.216 332.218)",children:[t("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),t("stop",{offset:"0.31",stopColor:"#7C3BFF",stopOpacity:"0.11"}),t("stop",{offset:"0.45",stopColor:"#7C3BFF",stopOpacity:"0.14"}),t("stop",{offset:"0.56",stopColor:"#7C3BFF",stopOpacity:"0.19"}),t("stop",{offset:"0.65",stopColor:"#7C3BFF",stopOpacity:"0.26"}),t("stop",{offset:"0.73",stopColor:"#7C3BFF",stopOpacity:"0.35"}),t("stop",{offset:"0.8",stopColor:"#7C3BFF",stopOpacity:"0.46"}),t("stop",{offset:"0.86",stopColor:"#7C3BFF",stopOpacity:"0.6"}),t("stop",{offset:"0.92",stopColor:"#7C3BFF",stopOpacity:"0.76"}),t("stop",{offset:"0.98",stopColor:"#7C3BFF",stopOpacity:"0.93"}),t("stop",{offset:"1",stopColor:"#7C3BFF"})]}),t("clipPath",{id:"clip0_1585_55266",children:t("rect",{width:"929.477",height:"667",fill:"white",transform:"translate(-93.7383 -134)"})})]})]}),au=m.div`
|
|
395
395
|
position: absolute;
|
|
396
396
|
top: 50%;
|
|
397
397
|
left: 50%;
|
|
@@ -481,7 +481,7 @@ import{jsxs as e,jsx as t,Fragment as o}from"react/jsx-runtime";import{useEffect
|
|
|
481
481
|
background-color: ${({theme:e})=>e.v2.colors.silver[900]};
|
|
482
482
|
`,Iu=({children:e})=>{const o=f();return t(ae,{size:le.S,weight:500,color:o.v2.colors.white[500],align:"center",children:e})},Au=m.div`
|
|
483
483
|
white-space: pre-line;
|
|
484
|
-
`,Nu=({enabled:n,onEnabledChange:i,onBack:l,onNext:s})=>{const r=f(),c=a(()=>k({enabled:n,keepPercentage:0}),[n]);return e(o,{children:[t(bu,{title:Ko,onBack:l}),e(hu,{$width:854,children:[t(Iu,{children:Yo}),e(W,{$gap:8,$width:"100%",children:[t(yu,{children:t(Au,{children:t(ae,{size:le.XXS,color:r.v2.colors.silver[200],children:Jo})})}),e(W,{$gap:8,$width:"100%",children:[e(ku,{children:[t($u,{children:t(ae,{size:le.S,weight:500,color:r.v2.colors.white[500],children:qo})}),t(Eu,{children:t(cu,{name:Qo,recommended:!0,toggleLabel:Zo,enabled:n,onEnabledChange:i,summary:c,toggleName:"sampling-onboarding-noisy-toggle"})})]}),t(Tu,{message:en})]})]})]}),t(mu,{onNext:s})]})},Ou=e=>t(Zi,{rotate:90,...e}),Ru=({onClose:n})=>{const a=f();return e(o,{children:[t(pu,{}),e(hu,{$width:732,children:[t(tn,{icon:Wi}),e(W,{$gap:16,$alignItems:"center",$width:"100%",children:[t(ae,{size:le.M,weight:500,color:a.v2.colors.white[500],children:on}),nn.split("\n").map(e=>t(Iu,{children:e}
|
|
484
|
+
`,Nu=({enabled:n,onEnabledChange:i,onBack:l,onNext:s})=>{const r=f(),c=a(()=>k({enabled:n,keepPercentage:0}),[n]);return e(o,{children:[t(bu,{title:Ko,onBack:l}),e(hu,{$width:854,children:[t(Iu,{children:Yo}),e(W,{$gap:8,$width:"100%",children:[t(yu,{children:t(Au,{children:t(ae,{size:le.XXS,color:r.v2.colors.silver[200],children:Jo})})}),e(W,{$gap:8,$width:"100%",children:[e(ku,{children:[t($u,{children:t(ae,{size:le.S,weight:500,color:r.v2.colors.white[500],children:qo})}),t(Eu,{children:t(cu,{name:Qo,recommended:!0,toggleLabel:Zo,enabled:n,onEnabledChange:i,summary:c,toggleName:"sampling-onboarding-noisy-toggle"})})]}),t(Tu,{message:en})]})]})]}),t(mu,{onNext:s})]})},Ou=e=>t(Zi,{rotate:90,...e}),Ru=({onClose:n})=>{const a=f();return e(o,{children:[t(pu,{}),e(hu,{$width:732,children:[t(tn,{icon:Wi}),e(W,{$gap:16,$alignItems:"center",$width:"100%",children:[t(ae,{size:le.M,weight:500,color:a.v2.colors.white[500],children:on}),nn.split("\n").map((e,o)=>t(Iu,{children:e},`subtitle-${o}-${e}`)),e(yu,{children:[t(ae,{size:le.XS,color:a.v2.colors.silver[200],children:an}),t(wu,{color:a.v2.colors.white[500],items:[ln,sn,rn]})]})]})]}),t(mu,{center:!0,children:t(re,{"data-id":"sampling-onboarding-btn-go-to",label:cn,rightIcon:Ou,variant:de.Primary,size:ce.M,onClick:n})})]})},Du=e=>t(Zi,{rotate:90,...e}),Pu=m.div`
|
|
485
485
|
display: flex;
|
|
486
486
|
flex-direction: column;
|
|
487
487
|
align-items: center;
|
package/lib/containers.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import{useState as i,useRef as n,useCallback as a,useEffect as o}from"react";import{MarkerType as s,useNodesState as c,useEdgesState as l}from"@xyflow/react";import{b as d,D as p,E as u,i as g,j as m,k as h,S as y,l as f,T as v,m as x,n as S,a as N,o as b,p as k,q as w}from"./chunks/ui-components-
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import{useState as i,useRef as n,useCallback as a,useEffect as o}from"react";import{MarkerType as s,useNodesState as c,useEdgesState as l}from"@xyflow/react";import{b as d,D as p,E as u,i as g,j as m,k as h,S as y,l as f,T as v,m as x,n as S,a as N,o as b,p as k,q as w}from"./chunks/ui-components-D_eeOuIL.js";import{UserIcon as K,ImageErrorIcon as M,ChevronDownIcon as T,ChevronRightIcon as $}from"./icons.js";import I,{useTheme as z}from"styled-components";import C from"elkjs/lib/elk.bundled.js";import{d as E}from"./chunks/use-odigos-api-W15RTo5l.js";import{F as G}from"./chunks/flow-Bu1VbeQt.js";import"zustand";import"javascript-time-ago";import"javascript-time-ago/locale/en";import"prism-react-renderer";import"./chunks/vendor-BFqT13Me.js";import"zustand/middleware";import"react-error-boundary";import"react-dom";import"virtua";import"@apollo/client";import"@apollo/client/link/error";import"@apollo/client/link/context";import"@apollo/client/utilities";import"@xyflow/react/dist/style.css";const V=e=>`${u.Source}-${e}-${d.MapItem}`,j=(e,t,r)=>{const i=e.isVirtual,n=r?[K]:i?[g(e)]:t?m(t):[M],{priorotizedStatus:a}=i?{priorotizedStatus:void 0}:h(t?.conditions||[]);return{id:e.graphKey,title:e.serviceName,icons:n,isVirtual:i,status:a,aggService:e}},A=e=>!(!e||"user"!==e.serviceName||e.id.namespace||e.id.name||e.id.kind),D=({theme:e,nodes:t,aggregatedServiceMap:r})=>{const i=[],n=new Map(t.map(e=>[e.id,e]));for(const t of r){const r=V(t.graphKey),a=n.get(r);if(!a)continue;const o=a.data?.status===y.Error;for(const a of t.connections){const c=V(a.targetGraphKey);n.has(c)&&i.push({id:`${r}-to-${c}`,type:"smoothstep",source:r,target:c,data:{sourceGraphKey:t.graphKey,targetGraphKey:a.targetGraphKey},markerEnd:{type:s.ArrowClosed},style:{stroke:o?e?.colors.dark_red:e?.colors.border}})}}return i},R=new C,O=`${u.Source}-user-${d.MapItem}`,q={"elk.algorithm":"layered","elk.direction":"RIGHT","elk.layered.spacing.nodeNodeBetweenLayers":"150","elk.spacing.nodeNode":"120","elk.layered.nodePlacement.strategy":"NETWORK_SIMPLEX","elk.layered.spacing.edgeEdgeBetweenLayers":"30","elk.layered.spacing.edgeNodeBetweenLayers":"40"},_=e=>{const t=e.lastIndexOf("|");return-1===t?{graphKey:e,detail:""}:{graphKey:e.substring(0,t),detail:e.substring(t+1)}},B=I.div`
|
|
2
2
|
padding: 8px 0;
|
|
3
|
-
`,F
|
|
3
|
+
`,F=I.div`
|
|
4
4
|
display: flex;
|
|
5
5
|
gap: 12px;
|
|
6
6
|
align-items: center;
|
|
7
7
|
padding: 4px 0 4px 16px;
|
|
8
|
-
`,L
|
|
8
|
+
`,L=I.button`
|
|
9
9
|
display: flex;
|
|
10
10
|
align-items: center;
|
|
11
11
|
gap: 4px;
|
|
@@ -19,16 +19,16 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import{useState
|
|
|
19
19
|
&:hover {
|
|
20
20
|
text-decoration: underline;
|
|
21
21
|
}
|
|
22
|
-
`,P
|
|
22
|
+
`,P=I.div`
|
|
23
23
|
padding: 4px 0 8px;
|
|
24
|
-
`,W=({conn:r,onToggle:i,isExpanded:n})=>{const a=r.details.length>0;return e(B,{children:t(S,{$justifyContent:"space-between",$alignItems:"center",children:[e(v,{size:14,weight:500,children:r.targetServiceName}),a&&t(L,{onClick:i,children:[e(n?T
|
|
24
|
+
`,W=({conn:r,onToggle:i,isExpanded:n})=>{const a=r.details.length>0;return e(B,{children:t(S,{$justifyContent:"space-between",$alignItems:"center",children:[e(v,{size:14,weight:500,children:r.targetServiceName}),a&&t(L,{onClick:i,children:[e(n?T:$,{size:12}),n?"hide attributes":`${r.details.length} attribute${r.details.length>1?"s":""}`]})]})})},U=({conn:t})=>{const i=z();return e(r,{children:t.details.map((t,r)=>e(F,{children:e(v,{size:12,color:i.text.secondary,style:{flex:1},children:t.value})},`detail-${r}-${t.value}`))})},H=({connections:n,isVirtual:a,attributes:o})=>{const[s,c]=i(new Set),l=z();if(a){const i=Object.entries(o||{});return t(r,{children:[e(v,{size:12,color:l.text.info,children:"This service is not instrumented. It was detected from client-side spans of services that communicate with it."}),i.length>0&&t(r,{children:[e(P,{style:{paddingTop:16},children:e(v,{size:11,color:l.text.info,children:"Attributes"})}),i.map(([r,i])=>t(F,{children:[e(v,{size:12,color:l.text.secondary,children:r}),e(v,{size:12,children:i})]},r))]})]})}return n.length?t(r,{children:[e(P,{children:e(v,{size:11,color:l.text.info,children:"Connected services"})}),n.map(r=>t("div",{children:[e(W,{conn:r,isExpanded:s.has(r.targetGraphKey),onToggle:()=>{return e=r.targetGraphKey,void c(t=>{const r=new Set(t);return r.has(e)?r.delete(e):r.add(e),r});var e}}),s.has(r.targetGraphKey)&&e(U,{conn:r}),e(x,{})]},r.targetGraphKey))]}):e(v,{size:12,color:l.text.info,children:"No outgoing connections"})},X=({conn:i})=>{const n=z();return i?e(r,{children:i.details.length>0?t(r,{children:[e(P,{children:e(v,{size:11,color:n.text.info,children:"Attribute breakdown"})}),i.details.map((t,r)=>e(F,{children:e(v,{size:12,style:{flex:1},children:t.value})},`detail-${r}-${t.value}`))]}):e(v,{size:12,color:n.text.info,style:{padding:"8px 0"},children:"No attribute breakdown"})}):e(v,{size:12,color:n.text.info,children:"No data for this connection"})},J=({drawerState:t,aggregatedData:r,onClose:i})=>{if(!t)return null;const n=new Map(r.map(e=>[e.graphKey,e]));let a="",o="",s=null;if("node"===t.type){const r=n.get(t.graphKey);a=r?.serviceName||t.graphKey,o=r?.isVirtual?"Virtual service (uninstrumented)":"Outgoing connections",s=e(H,{connections:r?.connections||[],isVirtual:r?.isVirtual,attributes:r?.attributes})}else{const r=n.get(t.sourceKey),i=r?.connections.find(e=>e.targetGraphKey===t.targetKey);a=`${r?.serviceName||t.sourceKey} → ${i?.targetServiceName||t.targetKey}`,o="Connection details",s=e(X,{conn:i})}return e(f,{isOpen:!0,width:"420px",position:"right",header:{title:a,subTitle:o,onClose:i},children:s})},Q=[],Y=I.div`
|
|
25
25
|
width: 100%;
|
|
26
26
|
flex: 1;
|
|
27
27
|
align-self: stretch;
|
|
28
28
|
min-height: 0;
|
|
29
29
|
height: 100%;
|
|
30
30
|
position: relative;
|
|
31
|
-
`,Z={id:{namespace:"",name:"",kind:""},serviceName:"user",markedForInstrumentation:{markedForInstrumentation:!0}},ee=`${u.Source}-`,te=`-${d.MapItem}`,re=.15,ie=({serviceMap:r,pollIntervalMs:s=5e3})=>{const g=z(),{serviceMapApi:m,sourcesApi:h}=E(),y=h.useSources().items,{data:f,refetch:v}=m.useServiceMap({skip:!!r,pollInterval:s,fetchPolicy:"cache-and-network"}),x=r??(f?.serviceMap??Q),S=r?void 0:()=>{v()},[b,k,w]=c([]),[K,M,T]=l([]),[I
|
|
31
|
+
`,Z={id:{namespace:"",name:"",kind:""},serviceName:"user",markedForInstrumentation:{markedForInstrumentation:!0}},ee=`${u.Source}-`,te=`-${d.MapItem}`,re=.15,ie=({serviceMap:r,pollIntervalMs:s=5e3})=>{const g=z(),{serviceMapApi:m,sourcesApi:h}=E(),y=h.useSources().items,{data:f,refetch:v}=m.useServiceMap({skip:!!r,pollInterval:s,fetchPolicy:"cache-and-network"}),x=r??(f?.serviceMap??Q),S=r?void 0:()=>{v()},[b,k,w]=c([]),[K,M,T]=l([]),[$,I]=i(0),[C,B]=i(null),F=n([]);F.current=b;const L=n(g);L.current=g;const P=n([]),W=n([]),U=a(()=>I(e=>e+1),[]),{activeNodeId:H,setActiveNodeType:X,setActiveNodeId:ie}=N();o(()=>{if(!H)return;const e=(t=H).startsWith(ee)&&t.endsWith(te)?t.slice(ee.length,-te.length):null;var t;e&&B({type:"node",graphKey:e})},[H]);const ne=a((e,t)=>{const{sourceGraphKey:r,targetGraphKey:i}=t.data||{};r&&i&&(X(null),ie(null),B({type:"edge",sourceKey:r,targetKey:i}))},[X,ie]),ae=a(()=>{B(null),X(null),ie(null)},[X,ie]),oe=a((e,t)=>{const r=t.id;M(e=>e.map(e=>e.source===r||e.target===r?{...e,animated:!0,style:{...e.style,strokeWidth:2.5},labelStyle:{...e.labelStyle,opacity:1},labelBgStyle:{...e.labelBgStyle,opacity:1}}:{...e,style:{...e.style,opacity:re},labelStyle:{...e.labelStyle,opacity:re},labelBgStyle:{...e.labelBgStyle,opacity:re}}))},[M]),se=a(()=>{M(W.current)},[M]);return o(()=>{let e=!1;const t=(e=>{const t=new Map,r=new Set,i=(e,r,i=!1)=>{let n=t.get(e);return n||(n={serviceName:r,isVirtual:i,attributes:{},connectionMap:new Map},t.set(e,n)),n},n=(e,t)=>{if(t)for(const{key:r,value:i}of t)r in e||(e[r]=i)};for(const t of e){const{graphKey:e}=_(t.nodeId),a=i(e,t.serviceName);a.isVirtual=!1;for(const e of t.services){const{graphKey:t,detail:o}=_(e?.nodeId??"");e.isVirtual&&(r.add(t),n(i(t,e.serviceName,!0).attributes,e.nodeAttributes));let s=a.connectionMap.get(t);if(s||(s={targetGraphKey:t,targetServiceName:e.serviceName,totalRequests:0,lastDateTime:e.dateTime,details:[]},a.connectionMap.set(t,s)),s.totalRequests+=e.requests,e.dateTime>s.lastDateTime&&(s.lastDateTime=e.dateTime),o){const t=s.details.find(e=>e.value===o);t?(t.requests+=e.requests,e.dateTime>t.dateTime&&(t.dateTime=e.dateTime)):s.details.push({value:o,requests:e.requests,dateTime:e.dateTime})}}}const a=[...t.entries()];for(const[,{connectionMap:e}]of a)for(const[n,a]of e)t.has(n)||i(n,a.targetServiceName,r.has(n));const o=[];for(const[e,{serviceName:r,isVirtual:i,attributes:n,connectionMap:a}]of t){const t=[...a.values()];t.sort((e,t)=>e.targetGraphKey.localeCompare(t.targetGraphKey)),o.push({graphKey:e,serviceName:r,isVirtual:i,connections:t,attributes:n})}return o.sort((e,t)=>e.graphKey.localeCompare(t.graphKey)),o})(x);P.current=t;const r=(({sources:e,aggregatedServiceMap:t})=>{const r=[],i={x:0,y:0};if(t.length&&e.length)for(const n of t){const t=V(n.graphKey),a=e.find(e=>n.serviceName===e.serviceName||n.serviceName===e.id.name);r.push({id:t,type:d.MapItem,position:i,data:j(n,a,A(a)),measured:{width:80,height:80}})}else r.push({id:`${u.Source}-${d.NoData}`,type:d.NoData,position:i,data:{subTitle:p.ARE_SERVICES_INSTRUMENTED_AND_PRODUCING_TRAFFIC}});return r})({aggregatedServiceMap:t,sources:[Z].concat(y)});if(1===r.length&&r[0].id===`${u.Source}-${d.NoData}`)return k(r),M([]),void(W.current=[]);const i=new Set(F.current.map(e=>e.id)),n=new Set(r.map(e=>e.id)),a=r.some(e=>!i.has(e.id)),o=F.current.some(e=>!n.has(e.id));if(!(a||o)){const e=new Map(F.current.map(e=>[e.id,e.position]));k(r.map(t=>({...t,position:e.get(t.id)??t.position})));const i=D({theme:L.current,nodes:r,aggregatedServiceMap:t});return W.current=i,void M(i)}return(async(e,t,r={})=>{const i={id:"root",layoutOptions:{...q,...r},children:e.map(e=>({id:e.id,width:80,height:80,...e.id===O?{layoutOptions:{"elk.layered.layering.layerConstraint":"FIRST","elk.alignment":"CENTER"}}:{}})),edges:t.map(e=>({id:e.id,sources:[e.source],targets:[e.target]}))},n=await R.layout(i),a=new Map;return n.children?.forEach(e=>{a.set(e.id,{x:e.x??0,y:e.y??0})}),{nodes:e.map(e=>({...e,position:a.get(e.id)??e.position})),edges:t}})(r,D({theme:L.current,nodes:r,aggregatedServiceMap:t})).then(({nodes:t})=>{if(e)return;k(t);const r=D({theme:L.current,nodes:t,aggregatedServiceMap:P.current});W.current=r,M(r),U()}),()=>{e=!0}},[x,y]),o(()=>{if(!F.current.length)return;const e=D({theme:g,nodes:F.current,aggregatedServiceMap:P.current});W.current=e,M(e)},[g]),t(Y,{children:[e(G,{nodes:b,edges:K,onNodesChange:w,onEdgesChange:T,onEdgeClick:ne,onNodeMouseEnter:oe,onNodeMouseLeave:se,onRefresh:S,fitViewTrigger:$,zoomOnScroll:!0}),e(J,{drawerState:C,aggregatedData:P.current,onClose:ae})]})},ne=I.div`
|
|
32
32
|
position: fixed;
|
|
33
33
|
bottom: 12px;
|
|
34
34
|
left: 12px;
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
export { OdigosApiProvider } from './provider';
|
|
14
14
|
export { OdigosApiConnectionsScope } from './connections-scope';
|
|
15
15
|
export { useOdigosApi, type UseOdigosApiReturn } from './use-odigos-api';
|
|
16
|
+
export { useApiQuery, useApiLazyQuery, useApiMutation } from './use-api-query';
|
|
16
17
|
export { useApiForConnections, type ApiForConnections } from './use-api-for-connections';
|
|
17
18
|
export type { UseApiQueryOptions, UseApiQueryResult, UseApiLazyQueryResult, UseApiMutationOptions, UseApiMutationResult, UseApiMutationTuple } from './use-api-query';
|
|
18
19
|
export { pickByPlatform, versionedDocument, vmDialectMap, type VersionedDocumentMap } from './platform-helpers';
|
|
@@ -52,8 +52,10 @@ export type VersionedDocumentMap = {
|
|
|
52
52
|
* 1. Pick the platform branch matching `ctx.platformType`.
|
|
53
53
|
* 2. Sort that branch's versions descending (numeric-aware via
|
|
54
54
|
* `trimVersion`).
|
|
55
|
-
* 3. Return the highest version that's `<= ctx.version`.
|
|
56
|
-
*
|
|
55
|
+
* 3. Return the highest version that's `<= ctx.schemaVersion ?? ctx.version`.
|
|
56
|
+
* VM proxies report a GraphQL schema version distinct from their agent
|
|
57
|
+
* binary version, so we floor by the schema version when present. This
|
|
58
|
+
* "floor to the matching bucket" rule keeps older proxies/agents from
|
|
57
59
|
* receiving documents whose schemas they don't understand yet.
|
|
58
60
|
* 4. If no bucket fits (or the platform is missing), return undefined
|
|
59
61
|
* → the runner short-circuits with "Operation not supported in
|
|
@@ -32,8 +32,22 @@ export interface OperationContext {
|
|
|
32
32
|
platformType: PlatformType;
|
|
33
33
|
/** community | onprem — used to gate enterprise-only capabilities. */
|
|
34
34
|
tier: Tier;
|
|
35
|
-
/**
|
|
35
|
+
/**
|
|
36
|
+
* Agent / proxy version — the version users see as "the installed agent"
|
|
37
|
+
* (e.g. the odigos proxy version on k8s, or the vm-agent binary version on
|
|
38
|
+
* VM). Used for display and for capability/legacy gating. Hosts that don't
|
|
39
|
+
* have proxies (odigos standalone) pass the local backend version.
|
|
40
|
+
*/
|
|
36
41
|
version: string;
|
|
42
|
+
/**
|
|
43
|
+
* GraphQL dialect/schema version, when it differs from `version`. VM proxies
|
|
44
|
+
* report their agents-api schema version separately from the vm-agent binary
|
|
45
|
+
* `version`, so the UI can keep showing which agent is installed while
|
|
46
|
+
* talking to it in the right dialect. Version-bucket selection
|
|
47
|
+
* (`versionedDocument`) floors by `schemaVersion ?? version`; k8s hosts that
|
|
48
|
+
* never set it keep using `version` unchanged.
|
|
49
|
+
*/
|
|
50
|
+
schemaVersion?: string;
|
|
37
51
|
/** Currently selected proxy id (central-ui only). Undefined when not applicable. */
|
|
38
52
|
proxyID?: string;
|
|
39
53
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{e as o,r,f as t}from"../chunks/use-odigos-api-W15RTo5l.js";export{O as OdigosApiProvider,p as prepareNamespacePayloads,a as prepareSourcePayloads,u as useApiLazyQuery,b as useApiMutation,c as useApiQuery,d as useOdigosApi}from"../chunks/use-odigos-api-W15RTo5l.js";export{O as OdigosApiConnectionsScope}from"../chunks/connections-scope-DDNmfpzA.js";import{useApolloClient as e}from"@apollo/client";import{P as s,t as i}from"../chunks/ui-components-D_eeOuIL.js";import"react";import"react/jsx-runtime";import"@apollo/client/link/error";import"@apollo/client/link/context";import"@apollo/client/utilities";import"styled-components";import"../icons.js";import"zustand";import"javascript-time-ago";import"javascript-time-ago/locale/en";import"prism-react-renderer";import"../chunks/vendor-BFqT13Me.js";import"zustand/middleware";import"react-error-boundary";import"react-dom";import"virtua";const n=()=>{const s=e(),{operations:i,context:n}=o();return{multiFetch:async(o,r,e)=>{const a=i[o];return a?t(s,a,r,e,n):{results:[],allSucceeded:!1,anySucceeded:!1,successCount:0,failureCount:r.length,error:`Operation ${String(o)} not configured`}},bulkPersistSources:async(o,t)=>{const e=[];for(const a of o){const o={...n,proxyID:a},{error:c}=await r(s,i.PERSIST_SOURCES,t,o);c&&e.push(`${a}: ${c}`)}return e.length?{error:e.join(", ")}:void 0},applyConfigurations:async(o,t)=>{if(!i.UPDATE_REMOTE_CONFIG)return{error:"UPDATE_REMOTE_CONFIG not configured"};const{error:e}=await r(s,i.UPDATE_REMOTE_CONFIG,{formData:t,connectionIds:o},n);return e?{error:e}:void 0}}},m=(o,r)=>o.platformType===s.K8s?r.K8s:o.platformType===s.Vm?r.Vm:void 0,l=o=>r=>{const t=o[r.platformType];if(!t)return;const e=Object.keys(t);if(0===e.length)return;const s=i(r.schemaVersion??r.version),n=[...e].sort((o,r)=>i(r)-i(o)).find(o=>s>=i(o));return n?t[n]:void 0},f=(o,r)=>{const t={};for(const e of Object.keys(o))t[e]=r(o[e]);return t};export{m as pickByPlatform,n as useApiForConnections,l as versionedDocument,f as vmDialectMap};
|
package/lib/contexts.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{A as ActionFormContextProvider,D as DataStreamFormContextProvider,a as DestinationFormContextProvider,R as RuleFormContextProvider,S as SamplingRuleFormType,b as SamplingRulesFormProvider,c as SourceEditFormContextProvider,d as SourceInstrumentFormContextProvider,u as useActionFormContext,e as useDataStreamFormContext,f as useDestinationFormContext,g as useRuleFormContext,h as useSamplingRulesFormContext,i as useSourceEditFormContext,j as useSourceInstrumentFormContext}from"./chunks/source-instrument-form-context-
|
|
1
|
+
export{A as ActionFormContextProvider,D as DataStreamFormContextProvider,a as DestinationFormContextProvider,R as RuleFormContextProvider,S as SamplingRuleFormType,b as SamplingRulesFormProvider,c as SourceEditFormContextProvider,d as SourceInstrumentFormContextProvider,u as useActionFormContext,e as useDataStreamFormContext,f as useDestinationFormContext,g as useRuleFormContext,h as useSamplingRulesFormContext,i as useSourceEditFormContext,j as useSourceInstrumentFormContext}from"./chunks/source-instrument-form-context-BJGS7jKX.js";export{O as OdigosProvider,c as checkVersionSupport,u as useOdigos}from"./chunks/helpers-Cy9W3KCg.js";import{jsx as o}from"react/jsx-runtime";import{useMemo as r,useContext as t,createContext as s}from"react";export{O as OdigosApiConnectionsScope}from"./chunks/connections-scope-DDNmfpzA.js";export{O as OdigosApiProvider,p as prepareNamespacePayloads,a as prepareSourcePayloads,u as useApiLazyQuery,b as useApiMutation,c as useApiQuery,d as useOdigosApi}from"./chunks/use-odigos-api-W15RTo5l.js";export{pickByPlatform,useApiForConnections,versionedDocument,vmDialectMap}from"./contexts/odigos-api.js";import"./chunks/ui-components-D_eeOuIL.js";import"styled-components";import"./icons.js";import"zustand";import"javascript-time-ago";import"javascript-time-ago/locale/en";import"prism-react-renderer";import"./chunks/vendor-BFqT13Me.js";import"zustand/middleware";import"react-error-boundary";import"react-dom";import"virtua";import"@apollo/client";import"@apollo/client/link/error";import"@apollo/client/link/context";import"@apollo/client/utilities";const n=s({formType:void 0}),m=({children:e,formType:t})=>{const s=r(()=>({formType:t}),[t]);return o(n.Provider,{value:s,children:e})},l=()=>t(n);export{m as StorybookProvider,l as useStorybook};
|
package/lib/functions.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a3 as adaptInstrumentationRuleFromWire,a2 as adaptInstrumentationRuleInputForWire,b9 as buildBadgeForDesiredStatus,fe as capitalizeFirstLetter,ff as cleanObjectEmptyStringsValues,as as compareCondition,fg as decimalsOnly,s as deepClone,dm as entityIdKey,ds as filterActions,dr as filterDestinations,b2 as filterDestinationsByStream,dq as filterSources,de as filterSourcesByStream,fh as flattenObjectKeys,bp as formatBytes,fi as formatDuration,bY as generateId,b0 as getActionIcon,k as getConditionsBooleans,bB as getContainersIcons,fj as getContainersInstrumentedCount,fk as getDeepValue,aS as getDestinationIcon,fl as getDetectedLanguageIcons,be as getEffectiveLanguage,bw as getEffectiveRuntimeVersion,dn as getEntityIcon,a1 as getEntityId,dk as getEntityIdKey,dl as getEntityLabel,fm as getHealthBadgeLabel,a0 as getIdFromSseTarget,b6 as getInstrumentationRuleIcon,fn as getMainContainerLanguage,fo as getMetricForEntity,fp as getMonitorIcon,fq as getPlatformIcon,fr as getPlatformLabel,az as getProgrammingLanguageIcon,fs as getRecursiveValues,j as getSourceLanguageIcons,X as getSseTargetFromId,ft as getStatusColor,dw as getStatusFromPodStatus,g as getStatusIcon,br as getStatusTypeFromOdigosHealth,fu as getValueForRange,i as getVirtualServiceIcon,bm as getWorkloadId,b3 as getYamlFieldsForDestination,fv as hasUnhealthyInstances,fw as instrumentationRuleSourceScopesFromWire,fx as instrumentationRuleSourceScopesToWire,x as isEmpty,B as isLegalK8sLabel,bU as isOverTime,fy as isStringABoolean,fz as isTimeElapsed,bv as isValidVersion,fA as mapConditions,bc as mapDesiredStatusToConditionStatus,b1 as mapDestinationFieldsForDisplay,K as mapExportedSignals,G as mapSupportedSignals,fB as numbersOnly,fC as parseBooleanFromString,fD as parseJsonStringToPrettyString,at as prepareDestinationFormData,fE as removeEmptyValuesFromObject,J as safeJsonParse,fF as safeJsonStringify,fG as setDeepValue,fH as sleep,b4 as splitCamelString,fI as stringifyNonStringValues,t as trimVersion}from"./chunks/ui-components-
|
|
1
|
+
export{a3 as adaptInstrumentationRuleFromWire,a2 as adaptInstrumentationRuleInputForWire,b9 as buildBadgeForDesiredStatus,fe as capitalizeFirstLetter,ff as cleanObjectEmptyStringsValues,as as compareCondition,fg as decimalsOnly,s as deepClone,dm as entityIdKey,ds as filterActions,dr as filterDestinations,b2 as filterDestinationsByStream,dq as filterSources,de as filterSourcesByStream,fh as flattenObjectKeys,bp as formatBytes,fi as formatDuration,bY as generateId,b0 as getActionIcon,k as getConditionsBooleans,bB as getContainersIcons,fj as getContainersInstrumentedCount,fk as getDeepValue,aS as getDestinationIcon,fl as getDetectedLanguageIcons,be as getEffectiveLanguage,bw as getEffectiveRuntimeVersion,dn as getEntityIcon,a1 as getEntityId,dk as getEntityIdKey,dl as getEntityLabel,fm as getHealthBadgeLabel,a0 as getIdFromSseTarget,b6 as getInstrumentationRuleIcon,fn as getMainContainerLanguage,fo as getMetricForEntity,fp as getMonitorIcon,fq as getPlatformIcon,fr as getPlatformLabel,az as getProgrammingLanguageIcon,fs as getRecursiveValues,j as getSourceLanguageIcons,X as getSseTargetFromId,ft as getStatusColor,dw as getStatusFromPodStatus,g as getStatusIcon,br as getStatusTypeFromOdigosHealth,fu as getValueForRange,i as getVirtualServiceIcon,bm as getWorkloadId,b3 as getYamlFieldsForDestination,fv as hasUnhealthyInstances,fw as instrumentationRuleSourceScopesFromWire,fx as instrumentationRuleSourceScopesToWire,x as isEmpty,B as isLegalK8sLabel,bU as isOverTime,fy as isStringABoolean,fz as isTimeElapsed,bv as isValidVersion,fA as mapConditions,bc as mapDesiredStatusToConditionStatus,b1 as mapDestinationFieldsForDisplay,K as mapExportedSignals,G as mapSupportedSignals,fB as numbersOnly,fC as parseBooleanFromString,fD as parseJsonStringToPrettyString,at as prepareDestinationFormData,fE as removeEmptyValuesFromObject,J as safeJsonParse,fF as safeJsonStringify,fG as setDeepValue,fH as sleep,b4 as splitCamelString,fI as stringifyNonStringValues,t as trimVersion}from"./chunks/ui-components-D_eeOuIL.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"javascript-time-ago/locale/en";import"prism-react-renderer";import"./chunks/vendor-BFqT13Me.js";import"zustand/middleware";import"react-error-boundary";import"react-dom";import"virtua";
|