@odigos/ui-kit 0.0.242 → 0.0.244
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 +21 -0
- package/lib/chunks/{helpers-flEStb5l.js → helpers-aJJ1GhqS.js} +1 -1
- package/lib/chunks/index-BnOPIhIp.js +149 -0
- package/lib/chunks/source-instrument-form-context-5GXsAhJd.js +1 -0
- package/lib/chunks/ui-components-Dnqp-MQm.js +1592 -0
- package/lib/components/_v2/note/index.d.ts +6 -0
- package/lib/components/v2.js +1 -1
- package/lib/components.js +1 -1
- package/lib/constants/actions/index.d.ts +0 -2
- package/lib/constants.js +1 -1
- package/lib/containers/_v2/_drawers/edit-source-drawer/index.d.ts +2 -1
- package/lib/containers/_v2/_drawers/edit-source-drawer/jump-to-target-context.d.ts +57 -0
- package/lib/containers/_v2/_drawers/edit-source-drawer/overview/pods-card/pods-list/container-row.d.ts +0 -2
- package/lib/containers/_v2/_drawers/edit-source-drawer/overview/pods-card/pods-list/index.d.ts +0 -6
- package/lib/containers/_v2/_drawers/edit-source-drawer/overview/pods-card/pods-list/pod-row.d.ts +0 -2
- package/lib/containers/_v2/_drawers/edit-source-drawer/overview/pods-card/pods-list/process-row.d.ts +0 -2
- package/lib/containers/_v2/_drawers/edit-source-drawer/overview/pods-card/pods-list/types.d.ts +1 -6
- package/lib/containers/_v2/_drawers/edit-source-drawer/pods/containers-card/index.d.ts +3 -0
- package/lib/containers/_v2/_drawers/edit-source-drawer/pods/containers-card/process-card.d.ts +1 -0
- package/lib/containers/_v2/_drawers/edit-source-drawer/pods/pod-card.d.ts +4 -0
- package/lib/containers/_v2/_drawers/edit-source-drawer/tabs.d.ts +7 -0
- package/lib/containers/_v2/_drawers/edit-source-drawer/yaml-files/index.d.ts +2 -1
- package/lib/containers/_v2/overview/drawers/index.d.ts +2 -1
- package/lib/containers/index.d.ts +0 -1
- package/lib/containers/v2.js +118 -123
- package/lib/containers.js +7 -62
- package/lib/contexts.js +1 -1
- package/lib/functions/get-action-icon/index.d.ts +2 -2
- package/lib/functions.js +1 -1
- package/lib/hooks/index.d.ts +1 -0
- package/lib/hooks/useScrollIntoViewWhen.d.ts +15 -0
- package/lib/hooks.js +1 -1
- package/lib/snippets/v2.js +1 -1
- package/lib/snippets.js +6 -6
- package/lib/store.js +1 -1
- package/lib/theme.js +1 -1
- package/lib/types/actions/index.d.ts +0 -19
- package/lib/types/enum/index.d.ts +2 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/types/k8s-manifest/index.d.ts +2 -0
- package/lib/types/workload/index.d.ts +0 -2
- package/lib/types.js +1 -1
- package/lib/visuals.js +1 -1
- package/package.json +1 -1
- package/lib/chunks/index-9imbvR3P.js +0 -149
- package/lib/chunks/source-instrument-form-context-4oj79EpI.js +0 -1
- package/lib/chunks/ui-components-DofONrt0.js +0 -1570
- package/lib/containers/_v2/_forms/add-action-form/custom-fields/error-sampler/index.d.ts +0 -5
- package/lib/containers/_v2/_forms/add-action-form/custom-fields/latency-sampler/index.d.ts +0 -5
- package/lib/containers/_v2/_forms/add-action-form/custom-fields/probabilistic-sampler/index.d.ts +0 -5
- package/lib/containers/_v2/_forms/add-action-form/custom-fields/service-name-sampler/index.d.ts +0 -5
- package/lib/containers/_v2/_forms/add-action-form/custom-fields/span-attribute-sampler/index.d.ts +0 -5
- package/lib/containers/notification-manager/index.d.ts +0 -4
|
@@ -5,12 +5,18 @@ interface NoteAction {
|
|
|
5
5
|
label: string;
|
|
6
6
|
onClick: () => void;
|
|
7
7
|
}
|
|
8
|
+
interface NoteOnCloseParams {
|
|
9
|
+
asSeen: boolean;
|
|
10
|
+
}
|
|
8
11
|
export interface NoteProps {
|
|
9
12
|
status: StatusType;
|
|
10
13
|
message: string;
|
|
11
14
|
action?: NoteAction;
|
|
12
15
|
fullWidth?: boolean;
|
|
13
16
|
smallIcon?: boolean;
|
|
17
|
+
onClose?: (params: NoteOnCloseParams) => void;
|
|
18
|
+
duration?: number;
|
|
19
|
+
zIndex?: number;
|
|
14
20
|
}
|
|
15
21
|
export declare const Note: FC<NoteProps>;
|
|
16
22
|
export {};
|
package/lib/components/v2.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{ex as Autocomplete,ae as Badge,a0 as Button,a1 as ButtonSize,g7 as ButtonTab,g8 as ButtonTabList,a2 as ButtonVariants,V as Checkbox,g9 as CheckboxList,d8 as CheckboxSize,b1 as CliCommand,aX as Condition,aL as Conditions,ga as DEFAULT_TIME_UNITS,aK as DataCard,f as Drawer,bG as DropData,bI as DropDataAlignX,bH as DropDataAlignY,au as DropDown,W as FieldMessage,U as FieldTitle,dq as GaugeChart,gb as GaugeChartVariant,gc as Header,gd as HoverActions,av as IconButton,aw as IconButtonSize,b7 as IconGroup,a3 as Input,$ as InputList,X as InputTable,c_ as Island,ax as Loader,bL as Modal,ge as Navbar,a4 as NoData,n as Note,ct as Radio,gf as RadioGroup,cu as RadioSize,b3 as Search,aq as SectionCard,gg as SectionCardSize,a6 as Segment,dt as SegmentSize,bi as SegmentVariant,dp as StatusCard,c$ as Stepper,bk as Table,bl as TableVariant,aR as Tag,b0 as TagVariants,a7 as TextArea,dr as TextCard,dL as TimeInput,Z as Toggle,_ as ToggleLabelAlign,gh as ToggleList,aB as ToggleSize,gi as ToggleVariant,da as TruncatableTypography,b as Typography,aa as TypographyColor,c as TypographySize,aC as TypographyVariants,ah as WarningModal,gj as resolveTypographyColor}from"../chunks/ui-components-Dnqp-MQm.js";import"react/jsx-runtime";import"styled-components";import"../icons.js";import"zustand";import"react";import"javascript-time-ago";import"../chunks/vendor-Be0cOokr.js";import"prism-react-renderer";import"react-error-boundary";import"react-dom";import"virtua";
|
package/lib/components.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{at as CenterThis,eA as Code,i as Divider,fR as ErrorBoundary,fS as FadeLoader,R as FlexColumn,F as FlexRow,fT as IconButton,eB as IconGroup,fU as IconWrapped,fV as ImageControlled,fW as LoadingText,fX as ModalBody,fY as NotificationNote,fZ as Overlay,aJ as Padding,cZ as PageContent,a as Popup,f_ as ScrollX,b4 as ScrollY,bh as SkeletonLoader,f$ as TableContainer,g0 as TableTitleWrap,g1 as TableWrap,h as Text,g2 as ToggleCodeComponent,ac as Tooltip,ds as UpgradeRequiredWrapper,g3 as VerticalScroll,g4 as getLinksFromText,g5 as getStrongsFromText,g6 as renderText}from"./chunks/ui-components-Dnqp-MQm.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-Be0cOokr.js";import"prism-react-renderer";import"react-error-boundary";import"react-dom";import"virtua";
|
package/lib/constants.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{A as
|
|
1
|
+
export{A as ACTION_OPTIONS,fw as ALL_SOURCES,bn as BTN_CANCEL,dx as BTN_CREATE_FIRST_RULE,bu as BTN_CREATE_RULE,bq as BTN_DELETE_RULE,ep as BTN_EDIT_AUTO_RULE,bp as BTN_EDIT_RULE,bC as BTN_SAVE,bo as BTN_SAVE_RULE,aI as BUTTON_TEXTS,br as CATEGORY_DESCRIPTIONS,en as CATEGORY_LABELS,bv as CATEGORY_TITLES,fx as CREATE_COST_REDUCTION_AUTO_RULE_DRAWER_TITLE,fy as CREATE_HIGHLY_RELEVANT_AUTO_RULE_DRAWER_TITLE,fz as CREATE_NOISY_AUTO_RULE_DRAWER_TITLE,aG as DEFAULT_CLUSTER_ID,aF as DEFAULT_CLUSTER_NAME,dj as DEFAULT_DATA_STREAM_NAME,dS as DESC_DURATION,dR as DESC_ERRORS,dV as DESC_OPERATION,fA as DESC_PERCENTAGE_HIGHLY_RELEVANT,am as DESC_PERCENTAGE_NOISY,eo as DESC_RULE_TYPE,ev as DESC_SOURCE_SCOPE,ay as DESTINATION_CATEGORIES,af as DISPLAY_LANGUAGES,D as DISPLAY_TITLES,a5 as DOCS_BASE_URL,y as DestinationCategoryTypes,by as EDIT_COST_REDUCTION_AUTO_RULE_DRAWER_SUBTITLE,bz as EDIT_COST_REDUCTION_AUTO_RULE_DRAWER_TITLE,bw as EDIT_HIGHLY_RELEVANT_AUTO_RULE_DRAWER_SUBTITLE,bx as EDIT_HIGHLY_RELEVANT_AUTO_RULE_DRAWER_TITLE,bA as EDIT_NOISY_AUTO_RULE_DRAWER_SUBTITLE,bB as EDIT_NOISY_AUTO_RULE_DRAWER_TITLE,bs as EDIT_TITLES,e5 as EMPTY_VALUE,dv as FILTER_TYPE_ALL,v as FORM_ALERTS,I as INSTRUMENTATION_RULE_OPTIONS,dT as LABEL_CUSTOM_DURATION,ar as LABEL_CUSTOM_PERCENTAGE,ap as LABEL_DISABLED,du as LABEL_DISABLED_RULE,ef as LABEL_DROP_ALL,aj as LABEL_DROP_AT_MOST,ao as LABEL_ENABLED,d_ as LABEL_HTTP_ROUTE,e0 as LABEL_HTTP_ROUTE_PREFIX,e2 as LABEL_KAFKA_TOPIC,eg as LABEL_KEEP_ALL,ec as LABEL_KEEP_AT_LEAST,ed as LABEL_KEEP_AT_MOST,eb as LABEL_KEEP_PERCENTAGE,dQ as LABEL_KEEP_TRACES_DURATION,dO as LABEL_KEEP_TRACES_ERRORS,e1 as LABEL_METHOD,ej as LABEL_NOTE,er as LABEL_NO_PREVIEW,e4 as LABEL_OPERATION_TYPE,fB as LABEL_RULE_DISABLED,fC as LABEL_RULE_ENABLED,eh as LABEL_RULE_NAME,ei as LABEL_RULE_TYPE,ee as LABEL_SAMPLE,dX as LABEL_SERVER_ADDRESS,dZ as LABEL_TEMPLATED_PATH,d$ as LABEL_TEMPLATED_PATH_PREFIX,be as LANGUAGE_OPTIONS,d3 as MONITORS_OPTIONS,et as NOTE_ENTIRE_CLUSTER,ew as NOTE_SOURCE_SCOPE_LOGIC,fD as OPENTELEMETRY_EBPF_DISTRO_OPTION,e7 as OPERATION_ALL,e6 as OPERATION_HTTP_CLIENT,e3 as OPERATION_HTTP_SERVER,e8 as OPERATION_KAFKA_CONSUMER,e9 as OPERATION_KAFKA_PRODUCER,bd as OTEL_DISTRO_NAME_OPTIONS,ea as PERCENTAGE_SECTION_DESCRIPTIONS,el as PLACEHOLDER_NOTE,dY as PLACEHOLDER_ROUTE,ek as PLACEHOLDER_RULE_NAME,ey as PLACEHOLDER_SEARCH_SOURCE,dW as PLACEHOLDER_SERVER_ADDRESS,aZ as PROCESS_ATTRIBUTE_NAMES,an as SAMPLING_AUTO_RULE_TITLE,dD as SAMPLING_BTN_CREATE_RULE,dB as SAMPLING_BTN_DOCS,dC as SAMPLING_BTN_REFRESH,al as SAMPLING_COST_REDUCTION_AUTO_RULE_TITLE,dG as SAMPLING_DELETE_MODAL_APPROVE,dH as SAMPLING_DELETE_MODAL_CANCEL,dI as SAMPLING_DELETE_MODAL_DESCRIPTION,dJ as SAMPLING_DELETE_MODAL_TITLE,bD as SAMPLING_DRAWER_WIDTH,dA as SAMPLING_DUPLICATE_RULE_WARNING,ai as SAMPLING_HIGHLY_RELEVANT_AUTO_RULE_TITLE,cw as SAMPLING_ONBOARDING_ADVANCED_LEFT_BULLET_1,cx as SAMPLING_ONBOARDING_ADVANCED_LEFT_BULLET_2,cy as SAMPLING_ONBOARDING_ADVANCED_LEFT_BULLET_3,cz as SAMPLING_ONBOARDING_ADVANCED_LEFT_TITLE,cA as SAMPLING_ONBOARDING_ADVANCED_RIGHT_BULLET_1,cB as SAMPLING_ONBOARDING_ADVANCED_RIGHT_BULLET_2,cC as SAMPLING_ONBOARDING_ADVANCED_RIGHT_BULLET_3,cD as SAMPLING_ONBOARDING_ADVANCED_RIGHT_BULLET_4,cE as SAMPLING_ONBOARDING_ADVANCED_RIGHT_BULLET_5,cF as SAMPLING_ONBOARDING_ADVANCED_RIGHT_TITLE,cH as SAMPLING_ONBOARDING_ADVANCED_SUBTITLE,cG as SAMPLING_ONBOARDING_ADVANCED_TITLE,cY as SAMPLING_ONBOARDING_AMBIENT_LABEL,c0 as SAMPLING_ONBOARDING_BTN_GO_TO,bN as SAMPLING_ONBOARDING_BTN_NEXT,cv as SAMPLING_ONBOARDING_BTN_READ_MORE,cb as SAMPLING_ONBOARDING_BTN_SKIP,cc as SAMPLING_ONBOARDING_BTN_START,cI as SAMPLING_ONBOARDING_COMMON_BANNER,cX as SAMPLING_ONBOARDING_COMMON_RULES_SECTION,cL as SAMPLING_ONBOARDING_DROP_DESCRIPTION,cK as SAMPLING_ONBOARDING_DROP_SUBTITLE,cJ as SAMPLING_ONBOARDING_DROP_TITLE,cO as SAMPLING_ONBOARDING_ERROR_PRESET_NAME,cN as SAMPLING_ONBOARDING_ERROR_PRESET_TOGGLE_LABEL,cR as SAMPLING_ONBOARDING_KEEP_DESCRIPTION,cQ as SAMPLING_ONBOARDING_KEEP_SUBTITLE,cP as SAMPLING_ONBOARDING_KEEP_TITLE,cS as SAMPLING_ONBOARDING_KEEP_USE_CASE_1,cT as SAMPLING_ONBOARDING_KEEP_USE_CASE_2,cU as SAMPLING_ONBOARDING_KEEP_USE_CASE_3,cV as SAMPLING_ONBOARDING_KEEP_USE_CASE_4,cW as SAMPLING_ONBOARDING_KEEP_USE_CASE_5,bU as SAMPLING_ONBOARDING_NOISY_BANNER,bQ as SAMPLING_ONBOARDING_NOISY_DESCRIPTION,bT as SAMPLING_ONBOARDING_NOISY_PRESET_NAME,bR as SAMPLING_ONBOARDING_NOISY_PRESET_SECTION,bS as SAMPLING_ONBOARDING_NOISY_PRESET_TOGGLE_LABEL,bP as SAMPLING_ONBOARDING_NOISY_SUBTITLE,bO as SAMPLING_ONBOARDING_NOISY_TITLE,cM as SAMPLING_ONBOARDING_PRESET_RULES_SECTION,bM as SAMPLING_ONBOARDING_RECOMMENDED_BADGE,cq as SAMPLING_ONBOARDING_STRATEGY_ADVANCED_BADGE,cr as SAMPLING_ONBOARDING_STRATEGY_ADVANCED_DESC,cs as SAMPLING_ONBOARDING_STRATEGY_ADVANCED_NAME,cn as SAMPLING_ONBOARDING_STRATEGY_DROP_BADGE,cl as SAMPLING_ONBOARDING_STRATEGY_DROP_BULLET_1,cm as SAMPLING_ONBOARDING_STRATEGY_DROP_BULLET_2,co as SAMPLING_ONBOARDING_STRATEGY_DROP_DESC,cp as SAMPLING_ONBOARDING_STRATEGY_DROP_NAME,ci as SAMPLING_ONBOARDING_STRATEGY_KEEP_BADGE,cg as SAMPLING_ONBOARDING_STRATEGY_KEEP_BULLET_1,ch as SAMPLING_ONBOARDING_STRATEGY_KEEP_BULLET_2,cj as SAMPLING_ONBOARDING_STRATEGY_KEEP_DESC,ck as SAMPLING_ONBOARDING_STRATEGY_KEEP_NAME,cf as SAMPLING_ONBOARDING_STRATEGY_KEEP_WARNING,ce as SAMPLING_ONBOARDING_STRATEGY_SUBTITLE,cd as SAMPLING_ONBOARDING_STRATEGY_TITLE,bZ as SAMPLING_ONBOARDING_SUCCESS_BULLET_1,b_ as SAMPLING_ONBOARDING_SUCCESS_BULLET_2,b$ as SAMPLING_ONBOARDING_SUCCESS_BULLET_3,bY as SAMPLING_ONBOARDING_SUCCESS_INTRO,bX as SAMPLING_ONBOARDING_SUCCESS_SUBTITLE,bW as SAMPLING_ONBOARDING_SUCCESS_TITLE,ca as SAMPLING_ONBOARDING_WELCOME_BANNER,c3 as SAMPLING_ONBOARDING_WELCOME_INTRO,c4 as SAMPLING_ONBOARDING_WELCOME_STAGE_1_DESC,c5 as SAMPLING_ONBOARDING_WELCOME_STAGE_1_TITLE,c6 as SAMPLING_ONBOARDING_WELCOME_STAGE_2_DESC,c7 as SAMPLING_ONBOARDING_WELCOME_STAGE_2_TITLE,c8 as SAMPLING_ONBOARDING_WELCOME_STAGE_3_DESC,c9 as SAMPLING_ONBOARDING_WELCOME_STAGE_3_TITLE,c2 as SAMPLING_ONBOARDING_WELCOME_SUBTITLE,c1 as SAMPLING_ONBOARDING_WELCOME_TITLE,dE as SAMPLING_PAGE_DESCRIPTION,dF as SAMPLING_PAGE_TITLE,dP as SECTION_DURATION,dN as SECTION_ERRORS,ak as SECTION_KEEP_PERCENTAGE,dU as SECTION_OPERATION,eq as SECTION_SAMPLING_PREVIEW,es as SECTION_SOURCE_SCOPE,d2 as STORAGE_KEYS,dw as TITLE_NO_RESULTS,dy as TITLE_NO_RULES,fE as TOKEN_ABOUT_TO_EXPIRE,em as TOOLTIP_NOTE,eu as UNKNOWN_SOURCE_LABEL,bt as UNNAMED_RULE,dz as getNoResultsSubTitle}from"./chunks/ui-components-Dnqp-MQm.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-Be0cOokr.js";import"prism-react-renderer";import"react-error-boundary";import"react-dom";import"virtua";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type FC } from 'react';
|
|
2
2
|
import { type ProfilingProps } from './profiling';
|
|
3
|
-
import { type UpdateSourceFunc, type PersistSourcesFunc, type WorkloadId, type RestartPodFunc, type RestartWorkloadsFunc, type RecoverFromRollbackFunc, type FetchPeerSourcesFunc, type FetchSourceByIdFunc, type EffectiveConfig } from '@/types';
|
|
3
|
+
import { type UpdateSourceFunc, type PersistSourcesFunc, type WorkloadId, type RestartPodFunc, type RestartWorkloadsFunc, type RecoverFromRollbackFunc, type FetchPeerSourcesFunc, type FetchSourceByIdFunc, type EffectiveConfig, type FetchK8sManifestFn } from '@/types';
|
|
4
4
|
export interface EditSourceDrawerProps {
|
|
5
5
|
onClose: () => void;
|
|
6
6
|
effectiveConfig?: EffectiveConfig;
|
|
@@ -15,5 +15,6 @@ export interface EditSourceDrawerProps {
|
|
|
15
15
|
enableProfiling: ProfilingProps['enableProfiling'];
|
|
16
16
|
fetchProfilingSlots: ProfilingProps['fetchProfilingSlots'];
|
|
17
17
|
fetchSourceProfiling: ProfilingProps['fetchSourceProfiling'];
|
|
18
|
+
fetchK8sManifest: FetchK8sManifestFn;
|
|
18
19
|
}
|
|
19
20
|
export declare const EditSourceDrawer: FC<EditSourceDrawerProps>;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { type FC, type ReactNode } from 'react';
|
|
2
|
+
import { Tabs } from './tabs';
|
|
3
|
+
import type { K8sWorkloadPod, K8sWorkloadPodContainer, K8sWorkloadPodContainerProcess } from '@/types';
|
|
4
|
+
/**
|
|
5
|
+
* A "jump to ..." destination within the drawer. Discriminated by `tab`: each variant carries
|
|
6
|
+
* the additional fields needed to locate the deepest target inside that tab. The drawer
|
|
7
|
+
* watches this value and auto-switches to `tab` whenever a target is set; future tabs
|
|
8
|
+
* (e.g. config, sampling) just add their own variant here.
|
|
9
|
+
*
|
|
10
|
+
* Pods invariants:
|
|
11
|
+
* - `processPid` is meaningful only when `containerName` is also set.
|
|
12
|
+
* - `processPid` is the process's `process.pid` (or `process.vpid` fallback) identifying
|
|
13
|
+
* attribute. We use it — rather than an array index — to identify the targeted process so
|
|
14
|
+
* the target survives data refetches that reorder or insert/remove processes.
|
|
15
|
+
* - `processPid` is `null` when a process was targeted but it has no PID/VPID attribute. In
|
|
16
|
+
* that (rare) case we cannot pinpoint the process card, so the drawer scrolls/expands the
|
|
17
|
+
* container instead. Use `processPid !== undefined` to test "a process was targeted".
|
|
18
|
+
*/
|
|
19
|
+
export type JumpToTarget = {
|
|
20
|
+
tab: Tabs.Pods;
|
|
21
|
+
podName: string;
|
|
22
|
+
containerName?: string;
|
|
23
|
+
processPid?: string | null;
|
|
24
|
+
};
|
|
25
|
+
/** Narrowed alias for the Pods variant — convenient for consumers inside the Pods tab. */
|
|
26
|
+
export type PodsJumpTarget = Extract<JumpToTarget, {
|
|
27
|
+
tab: Tabs.Pods;
|
|
28
|
+
}>;
|
|
29
|
+
export type OnJumpToPod = (pod: K8sWorkloadPod) => void;
|
|
30
|
+
export type OnJumpToContainer = (pod: K8sWorkloadPod, container: K8sWorkloadPodContainer) => void;
|
|
31
|
+
export type OnJumpToProcess = (pod: K8sWorkloadPod, container: K8sWorkloadPodContainer, process: K8sWorkloadPodContainerProcess) => void;
|
|
32
|
+
/**
|
|
33
|
+
* Returns true if `process` is the process pointed to by `target` (matched by PID/VPID, so
|
|
34
|
+
* it survives refetches that reorder or insert/remove processes). Returns false when the
|
|
35
|
+
* target has no `processPid` — i.e. either no process was targeted, or the targeted process
|
|
36
|
+
* had no PID identifying attribute and is therefore not pinpointable.
|
|
37
|
+
*
|
|
38
|
+
* Callers are expected to have already verified that the surrounding container matches.
|
|
39
|
+
*/
|
|
40
|
+
export declare const matchesJumpToTargetProcess: (target: PodsJumpTarget | null | undefined, process: Pick<K8sWorkloadPodContainerProcess, "identifyingAttributes">) => boolean;
|
|
41
|
+
export interface JumpToTargetContextValue {
|
|
42
|
+
jumpToTarget: JumpToTarget | null;
|
|
43
|
+
jumpToPod: OnJumpToPod;
|
|
44
|
+
jumpToContainer: OnJumpToContainer;
|
|
45
|
+
jumpToProcess: OnJumpToProcess;
|
|
46
|
+
clearJumpToTarget: () => void;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* State hook that backs the {@link JumpToTargetContext}. Returns the full context value so a
|
|
50
|
+
* single component (the drawer) can both manage the state and provide it to descendants.
|
|
51
|
+
*/
|
|
52
|
+
export declare const useJumpToTargetState: () => JumpToTargetContextValue;
|
|
53
|
+
export declare const JumpToTargetContextProvider: FC<{
|
|
54
|
+
value: JumpToTargetContextValue;
|
|
55
|
+
children: ReactNode;
|
|
56
|
+
}>;
|
|
57
|
+
export declare const useJumpToTargetContext: () => JumpToTargetContextValue;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { type FC } from 'react';
|
|
2
|
-
import { type OnJumpToProcess } from './types';
|
|
3
2
|
import { type K8sWorkloadPod, type K8sWorkloadPodContainer } from '@/types';
|
|
4
3
|
export interface ContainerRowProps {
|
|
5
4
|
pod: K8sWorkloadPod;
|
|
6
5
|
container: K8sWorkloadPodContainer;
|
|
7
|
-
onJumpToProcess?: OnJumpToProcess;
|
|
8
6
|
}
|
|
9
7
|
export declare const ContainerRow: FC<ContainerRowProps>;
|
package/lib/containers/_v2/_drawers/edit-source-drawer/overview/pods-card/pods-list/index.d.ts
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import { type FC } from 'react';
|
|
2
2
|
import type { K8sWorkloadPod } from '@/types';
|
|
3
|
-
import type { OnJumpToProcess } from './types';
|
|
4
3
|
export interface PodsListProps {
|
|
5
4
|
pods?: K8sWorkloadPod[] | null;
|
|
6
|
-
/**
|
|
7
|
-
* Optional handler invoked when the "jump to pod" action is triggered for a process.
|
|
8
|
-
* Should navigate the user to the relevant spot in the Pod tab.
|
|
9
|
-
*/
|
|
10
|
-
onJumpToProcess?: OnJumpToProcess;
|
|
11
5
|
}
|
|
12
6
|
export declare const PodsList: FC<PodsListProps>;
|
package/lib/containers/_v2/_drawers/edit-source-drawer/overview/pods-card/pods-list/pod-row.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { type FC } from 'react';
|
|
2
2
|
import { type K8sWorkloadPod } from '@/types';
|
|
3
|
-
import { type OnJumpToProcess } from './types';
|
|
4
3
|
export interface PodRowProps {
|
|
5
4
|
pod: K8sWorkloadPod;
|
|
6
|
-
onJumpToProcess?: OnJumpToProcess;
|
|
7
5
|
}
|
|
8
6
|
export declare const PodRow: FC<PodRowProps>;
|
package/lib/containers/_v2/_drawers/edit-source-drawer/overview/pods-card/pods-list/process-row.d.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { type FC } from 'react';
|
|
2
|
-
import type { OnJumpToProcess } from './types';
|
|
3
2
|
import { type K8sWorkloadPod, type K8sWorkloadPodContainer, type K8sWorkloadPodContainerProcess } from '@/types';
|
|
4
3
|
export interface ProcessRowProps {
|
|
5
4
|
overrideProcessNum?: number;
|
|
6
5
|
pod: K8sWorkloadPod;
|
|
7
6
|
container: K8sWorkloadPodContainer;
|
|
8
7
|
process: K8sWorkloadPodContainerProcess;
|
|
9
|
-
onJumpToProcess?: OnJumpToProcess;
|
|
10
8
|
}
|
|
11
9
|
export declare const ProcessRow: FC<ProcessRowProps>;
|
package/lib/containers/_v2/_drawers/edit-source-drawer/overview/pods-card/pods-list/types.d.ts
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
/**
|
|
3
|
-
* Handler invoked when the "jump to pod" action is triggered for a process.
|
|
4
|
-
* Should navigate the user to the relevant spot in the Pod tab.
|
|
5
|
-
*/
|
|
6
|
-
export type OnJumpToProcess = (pod: K8sWorkloadPod, container: K8sWorkloadPodContainer, process: K8sWorkloadPodContainerProcess) => void;
|
|
1
|
+
import type { SVG } from '@/types';
|
|
7
2
|
export interface RowAction {
|
|
8
3
|
icon: SVG;
|
|
9
4
|
onClick: () => void;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { type FC } from 'react';
|
|
2
|
+
import { type PodsJumpTarget } from '../../jump-to-target-context';
|
|
2
3
|
import { type K8sWorkloadPodContainer, type K8sWorkloadContainer } from '@/types';
|
|
3
4
|
export interface ContainersCardProps {
|
|
4
5
|
podContainers?: K8sWorkloadPodContainer[] | null;
|
|
5
6
|
sourceContainers?: K8sWorkloadContainer[] | null;
|
|
7
|
+
/** When set, the matching container/process inside are auto-expanded by the "jump to ..." flow. */
|
|
8
|
+
jumpToTarget?: PodsJumpTarget | null;
|
|
6
9
|
}
|
|
7
10
|
export declare const ContainersCard: FC<ContainersCardProps>;
|
|
@@ -4,5 +4,9 @@ export interface PodCardProps extends K8sWorkloadPod {
|
|
|
4
4
|
children?: ReactNode;
|
|
5
5
|
namespace: string;
|
|
6
6
|
onClickRestartPod?: (namespace: string, name: string) => void;
|
|
7
|
+
/** When true, the card starts expanded on mount. Used by the "jump to ..." flow. */
|
|
8
|
+
collapseIsDefaultOpen?: boolean;
|
|
9
|
+
/** When true, the card is the deepest "jump to ..." target and should scroll into view on mount. */
|
|
10
|
+
isJumpToTarget?: boolean;
|
|
7
11
|
}
|
|
8
12
|
export declare const PodCard: FC<PodCardProps>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type FC } from 'react';
|
|
2
|
-
import type
|
|
2
|
+
import { type FetchK8sManifestFn, type Workload } from '@/types';
|
|
3
3
|
export interface YamlFilesProps {
|
|
4
4
|
source: Workload;
|
|
5
|
+
fetchK8sManifest: FetchK8sManifestFn;
|
|
5
6
|
}
|
|
6
7
|
export declare const YamlFiles: FC<YamlFilesProps>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type FC } from 'react';
|
|
2
|
-
import { type CreateActionFunc, type CreateDestinationFunc, type CreateInstrumentationRuleFunc, type DeleteActionFunc, type DeleteDestinationFunc, type DeleteInstrumentationRuleFunc, type EffectiveConfig, type EnableProfilingFunc, type FetchNamespacesWithWorkloads, type FetchPeerSourcesFunc, type FetchProfilingSlotsFunc, type FetchSourceByIdFunc, type FetchSourceProfilingFunc, type GetDestinationCategoriesFunc, type GetPotentialDestinationsFunc, type PersistSourcesFunc, type RecoverFromRollbackFunc, type RestartPodFunc, type RestartWorkloadsFunc, type TestConnectionFunc, type UpdateActionFunc, type UpdateDestinationFunc, type UpdateInstrumentationRuleFunc, type UpdateSourceFunc } from '@/types';
|
|
2
|
+
import { type CreateActionFunc, type CreateDestinationFunc, type CreateInstrumentationRuleFunc, type DeleteActionFunc, type DeleteDestinationFunc, type DeleteInstrumentationRuleFunc, type EffectiveConfig, type EnableProfilingFunc, type FetchNamespacesWithWorkloads, type FetchPeerSourcesFunc, type FetchProfilingSlotsFunc, type FetchSourceByIdFunc, type FetchSourceProfilingFunc, type GetDestinationCategoriesFunc, type GetPotentialDestinationsFunc, type PersistSourcesFunc, type RecoverFromRollbackFunc, type RestartPodFunc, type RestartWorkloadsFunc, type TestConnectionFunc, type UpdateActionFunc, type UpdateDestinationFunc, type UpdateInstrumentationRuleFunc, type UpdateSourceFunc, type FetchK8sManifestFn } from '@/types';
|
|
3
3
|
export interface DrawersProps {
|
|
4
4
|
effectiveConfig?: EffectiveConfig;
|
|
5
5
|
fetchNamespacesWithWorkloads: FetchNamespacesWithWorkloads;
|
|
@@ -13,6 +13,7 @@ export interface DrawersProps {
|
|
|
13
13
|
enableProfiling: EnableProfilingFunc;
|
|
14
14
|
fetchProfilingSlots: FetchProfilingSlotsFunc;
|
|
15
15
|
fetchSourceProfiling: FetchSourceProfilingFunc;
|
|
16
|
+
fetchK8sManifest: FetchK8sManifestFn;
|
|
16
17
|
getDestinationCategories: GetDestinationCategoriesFunc;
|
|
17
18
|
getPotentialDestinations: GetPotentialDestinationsFunc;
|
|
18
19
|
testConnection: TestConnectionFunc;
|