@odigos/ui-kit 0.0.66 → 0.0.68
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 +19 -0
- package/lib/components/dropdown/index.d.ts +2 -1
- package/lib/components/field-label/index.d.ts +2 -0
- package/lib/components/input/index.d.ts +2 -1
- package/lib/components.js +3 -3
- package/lib/containers/system-settings/index.d.ts +2 -1
- package/lib/containers/system-settings/settings/collector-gateway-settings.d.ts +3 -3
- package/lib/containers/system-settings/settings/collector-node-settings.d.ts +3 -3
- package/lib/containers/system-settings/settings/general-settings.d.ts +4 -0
- package/lib/containers/system-settings/settings/options.d.ts +1 -4
- package/lib/containers/system-settings/settings/rollback-settings.d.ts +4 -0
- package/lib/containers/system-settings/settings/styled.d.ts +6 -0
- package/lib/containers/system-settings/settings/types.d.ts +7 -0
- package/lib/containers/system-settings/settings/ui-settings.d.ts +3 -3
- package/lib/containers.js +281 -248
- package/lib/{index-f2da9ad4.js → index-5772129e.js} +31 -20
- package/lib/{index-7074fb24.js → index-847d188f.js} +1 -1
- package/lib/snippets.js +2 -2
- package/lib/types/common/index.d.ts +5 -0
- package/lib/types/config/index.d.ts +2 -24
- package/lib/types.js +8 -31
- package/package.json +8 -8
- package/lib/containers/system-settings/settings/other-settings.d.ts +0 -4
- package/lib/containers/system-settings/settings/user-instrumnetation-envs-settings.d.ts +0 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.68](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.67...ui-kit-v0.0.68) (2025-07-23)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* toggle for advanced settings ([#271](https://github.com/odigos-io/ui-kit/issues/271)) ([53e9a0a](https://github.com/odigos-io/ui-kit/commit/53e9a0aedef964f4afea147eb98c3d1eb43ebe83))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* dirty form state, and scroll pixels ([#269](https://github.com/odigos-io/ui-kit/issues/269)) ([c3d7a0e](https://github.com/odigos-io/ui-kit/commit/c3d7a0e61704d3dcb0882627c91004d0174ce461))
|
|
14
|
+
|
|
15
|
+
## [0.0.67](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.66...ui-kit-v0.0.67) (2025-07-23)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* change system setting fields ([#267](https://github.com/odigos-io/ui-kit/issues/267)) ([25b483a](https://github.com/odigos-io/ui-kit/commit/25b483a8bc92bb07cb251f14859567d51631c641))
|
|
21
|
+
|
|
3
22
|
## [0.0.66](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.65...ui-kit-v0.0.66) (2025-07-22)
|
|
4
23
|
|
|
5
24
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type FC } from 'react';
|
|
2
|
-
import type { SVG } from '@/types';
|
|
2
|
+
import type { SVG, StatusType } from '@/types';
|
|
3
3
|
interface DropdownOption<T = string> {
|
|
4
4
|
id?: T | null;
|
|
5
5
|
value?: string | null;
|
|
@@ -19,6 +19,7 @@ interface DropdownProps {
|
|
|
19
19
|
showSearch?: boolean;
|
|
20
20
|
errorMessage?: string;
|
|
21
21
|
hasError?: boolean;
|
|
22
|
+
status?: StatusType;
|
|
22
23
|
}
|
|
23
24
|
declare const Dropdown: FC<DropdownProps>;
|
|
24
25
|
export { Dropdown, type DropdownProps, type DropdownOption };
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { type FC, type CSSProperties } from 'react';
|
|
2
|
+
import { StatusType } from '@/types';
|
|
2
3
|
interface FieldLabelProps {
|
|
3
4
|
title?: string;
|
|
4
5
|
required?: boolean;
|
|
5
6
|
tooltip?: string;
|
|
6
7
|
style?: CSSProperties;
|
|
8
|
+
status?: StatusType;
|
|
7
9
|
}
|
|
8
10
|
declare const FieldLabel: FC<FieldLabelProps>;
|
|
9
11
|
export { FieldLabel, type FieldLabelProps };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type FC, type InputHTMLAttributes } from 'react';
|
|
2
|
-
import { type SVG } from '@/types';
|
|
2
|
+
import { StatusType, type SVG } from '@/types';
|
|
3
3
|
interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
4
4
|
title?: string;
|
|
5
5
|
icon?: SVG;
|
|
@@ -9,6 +9,7 @@ interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
|
9
9
|
required?: boolean;
|
|
10
10
|
hasError?: boolean;
|
|
11
11
|
errorMessage?: string;
|
|
12
|
+
status?: StatusType;
|
|
12
13
|
}
|
|
13
14
|
declare const Input: FC<InputProps>;
|
|
14
15
|
export { Input, type InputProps };
|
package/lib/components.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { B as Button } from './index-
|
|
2
|
-
export { A as AutocompleteInput, a as Badge, a6 as CenterThis, C as Checkbox, b as Code, c as ConditionDetails, D as DataCard, e as DataCardFieldTypes, d as DataCardFields, f as DataFinger, g as DataTab, h as DescribeRow, i as Divider, j as DocsButton, k as Drawer, m as DrawerFooter, l as DrawerHeader, n as Dropdown, E as ExtendArrow, F as FadeLoader, o as FieldError, p as FieldLabel, a5 as FlexColumn, a4 as FlexRow, H as Header, I as IconButton, q as IconGroup, r as IconTitleBadge, s as IconWrapped, t as IconsNav, u as ImageControlled, v as Input, w as InputList, x as InputTable, y as InteractiveTable, K as KeyValueInputsList, M as Modal, a9 as ModalBody, z as MonitorsCheckboxes, G as MonitorsIcons, N as NavigationButtons, J as NoDataFound, L as NotificationNote, a8 as Overlay, P as Popup, O as PopupForm, S as ScrollX, Q as SectionTitle, R as Segment, U as SelectionButton, V as SkeletonLoader, W as Status, X as Stepper, Y as TabList, aa as TableContainer, ab as TableTitleWrap, ac as TableWrap, Z as Tag, _ as Text, $ as TextArea, a0 as Toggle, T as ToggleCodeComponent, a1 as Tooltip, a2 as TraceLoader, a7 as VerticalScroll, a3 as WarningModal } from './index-
|
|
3
|
-
export { C as CancelWarning, D as DeleteWarning } from './index-
|
|
1
|
+
import { B as Button } from './index-5772129e.js';
|
|
2
|
+
export { A as AutocompleteInput, a as Badge, a6 as CenterThis, C as Checkbox, b as Code, c as ConditionDetails, D as DataCard, e as DataCardFieldTypes, d as DataCardFields, f as DataFinger, g as DataTab, h as DescribeRow, i as Divider, j as DocsButton, k as Drawer, m as DrawerFooter, l as DrawerHeader, n as Dropdown, E as ExtendArrow, F as FadeLoader, o as FieldError, p as FieldLabel, a5 as FlexColumn, a4 as FlexRow, H as Header, I as IconButton, q as IconGroup, r as IconTitleBadge, s as IconWrapped, t as IconsNav, u as ImageControlled, v as Input, w as InputList, x as InputTable, y as InteractiveTable, K as KeyValueInputsList, M as Modal, a9 as ModalBody, z as MonitorsCheckboxes, G as MonitorsIcons, N as NavigationButtons, J as NoDataFound, L as NotificationNote, a8 as Overlay, P as Popup, O as PopupForm, S as ScrollX, Q as SectionTitle, R as Segment, U as SelectionButton, V as SkeletonLoader, W as Status, X as Stepper, Y as TabList, aa as TableContainer, ab as TableTitleWrap, ac as TableWrap, Z as Tag, _ as Text, $ as TextArea, a0 as Toggle, T as ToggleCodeComponent, a1 as Tooltip, a2 as TraceLoader, a7 as VerticalScroll, a3 as WarningModal } from './index-5772129e.js';
|
|
3
|
+
export { C as CancelWarning, D as DeleteWarning } from './index-847d188f.js';
|
|
4
4
|
import React, { createContext, Component, createElement } from 'react';
|
|
5
5
|
import { T as Theme } from './index-bd48e6e2.js';
|
|
6
6
|
import 'styled-components';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type FC } from 'react';
|
|
2
|
-
import type
|
|
2
|
+
import { InstallationMethod, type OdigosConfig } from '@/types';
|
|
3
3
|
interface SystemSettingsProps {
|
|
4
|
+
installationMethod: InstallationMethod;
|
|
4
5
|
fetchSettings: () => Promise<OdigosConfig | undefined>;
|
|
5
6
|
onSave: (payload: OdigosConfig) => Promise<void>;
|
|
6
7
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type
|
|
3
|
-
declare const CollectorGatewaySettings:
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type SettingsProps } from './types';
|
|
3
|
+
declare const CollectorGatewaySettings: React.ForwardRefExoticComponent<SettingsProps & React.RefAttributes<HTMLDivElement>>;
|
|
4
4
|
export { CollectorGatewaySettings };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type
|
|
3
|
-
declare const CollectorNodeSettings:
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type SettingsProps } from './types';
|
|
3
|
+
declare const CollectorNodeSettings: React.ForwardRefExoticComponent<SettingsProps & React.RefAttributes<HTMLDivElement>>;
|
|
4
4
|
export { CollectorNodeSettings };
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import type { DropdownOption } from '@/components';
|
|
2
|
-
import { AgentEnvVarsInjectionMethod, MountMethod
|
|
3
|
-
export declare const UI_MODE_OPTIONS: DropdownOption<UiMode>[];
|
|
4
|
-
export declare const INSTRUMENTATION_LANG_OPTIONS: DropdownOption<ProgrammingLanguages>[];
|
|
2
|
+
import { AgentEnvVarsInjectionMethod, MountMethod } from '@/types';
|
|
5
3
|
export declare const MOUNT_METHOD_OPTIONS: DropdownOption<MountMethod>[];
|
|
6
4
|
export declare const AGENT_ENV_VARS_INJECTION_METHOD_OPTIONS: DropdownOption<AgentEnvVarsInjectionMethod>[];
|
|
7
|
-
export declare const PROFILE_OPTIONS: DropdownOption<Profile>[];
|
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
export declare const Card: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
2
2
|
export declare const CardTitle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("@/components").TextProps, never>> & string & Omit<import("react").FC<import("@/components").TextProps>, keyof import("react").Component<any, {}, any>>;
|
|
3
|
+
export declare const RowOfFields: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$gap" | "$alignItems" | "$justifyContent" | "$wrap"> & {
|
|
4
|
+
$gap?: number;
|
|
5
|
+
$alignItems?: import("styled-components").CSSProperties["alignItems"];
|
|
6
|
+
$justifyContent?: import("styled-components").CSSProperties["justifyContent"];
|
|
7
|
+
$wrap?: import("styled-components").CSSProperties["flexWrap"];
|
|
8
|
+
}, never>> & string;
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import type { OdigosConfig } from '@/types';
|
|
2
|
+
export declare enum SettingsTabs {
|
|
3
|
+
General = "General",
|
|
4
|
+
Ui = "UI",
|
|
5
|
+
Rollback = "Rollback",
|
|
6
|
+
CollectorNode = "Collector Node",
|
|
7
|
+
CollectorGateway = "Collector Gateway"
|
|
8
|
+
}
|
|
2
9
|
export interface SettingsProps {
|
|
3
10
|
formData: OdigosConfig;
|
|
4
11
|
handleFormChange: (key: keyof OdigosConfig | string, value: any) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type
|
|
3
|
-
declare const UiSettings:
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type SettingsProps } from './types';
|
|
3
|
+
declare const UiSettings: React.ForwardRefExoticComponent<SettingsProps & React.RefAttributes<HTMLDivElement>>;
|
|
4
4
|
export { UiSettings };
|
package/lib/containers.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import React, { useState, useEffect, forwardRef, useRef, useImperativeHandle, useMemo, Fragment, useCallback, Children } from 'react';
|
|
2
2
|
import styled, { css } from 'styled-components';
|
|
3
3
|
import { b as DISPLAY_TITLES, T as Theme, U as usePendingStore, V as useNotificationStore, O as useDrawerStore, B as BUTTON_TEXTS, W as useEntityStore, A as ACTION_OPTIONS, g as getActionIcon, z as useModalStore, F as FORM_ALERTS, X as useFilterStore, D as DISPLAY_LANGUAGES, M as MONITORS_OPTIONS, d as getInstrumentationRuleIcon, Y as useDataStreamStore, Z as useInstrumentStore, c as getEntityId, S as STORAGE_KEYS, a as DEFAULT_DATA_STREAM_NAME, _ as useSetupStore, e as getProgrammingLanguageIcon, I as INSTRUMENTATION_RULE_OPTIONS, $ as useSelectedStore, j as ImageErrorIcon, a0 as useDarkMode } from './index-bd48e6e2.js';
|
|
4
|
-
import { ActionType, ActionKeyTypes, InputTypes, FieldTypes, EntityTypes, StatusType, Crud, OtherStatus, NodeTypes, EdgeTypes, AddNodeTypes, SignalType, HeadersCollectionKeyTypes, CustomInstrumentationsKeyTypes, CodeAttributesKeyTypes, PayloadCollectionKeyTypes, InstrumentationRuleType, K8sResourceKind,
|
|
5
|
-
import { e as DataCardFieldTypes, p as FieldLabel, C as Checkbox, o as FieldError, v as Input, x as InputTable, K as KeyValueInputsList, w as InputList, _ as Text, R as Segment, Q as SectionTitle, j as DocsButton, z as MonitorsCheckboxes, $ as TextArea, k as Drawer, c as ConditionDetails, D as DataCard, a5 as FlexColumn, M as Modal, N as NavigationButtons, a9 as ModalBody, L as NotificationNote, A as AutocompleteInput, i as Divider, W as Status, a4 as FlexRow, a1 as Tooltip, s as IconWrapped, G as MonitorsIcons, aa as TableContainer, ab as TableTitleWrap, r as IconTitleBadge, ac as TableWrap, y as InteractiveTable, a6 as CenterThis, J as NoDataFound, a2 as TraceLoader, a as Badge, E as ExtendArrow, a7 as VerticalScroll, U as SelectionButton, B as Button, n as Dropdown, ad as nodeConfig, ae as useNodesState, af as useEdgesState, ag as Flow, ah as applyNodeChanges, P as Popup, a0 as Toggle, I as IconButton, ai as AddButton, F as FadeLoader, g as DataTab, X as Stepper, d as DataCardFields, Z as Tag, aj as MarkerType, t as IconsNav, ak as CopyText, h as DescribeRow, al as PodContainer, am as SourceContainer, q as IconGroup, O as PopupForm } from './index-
|
|
4
|
+
import { ActionType, ActionKeyTypes, InputTypes, FieldTypes, EntityTypes, StatusType, Crud, OtherStatus, NodeTypes, EdgeTypes, AddNodeTypes, SignalType, HeadersCollectionKeyTypes, CustomInstrumentationsKeyTypes, CodeAttributesKeyTypes, PayloadCollectionKeyTypes, InstrumentationRuleType, K8sResourceKind, MountMethod, AgentEnvVarsInjectionMethod, InstallationMethod } from './types.js';
|
|
5
|
+
import { e as DataCardFieldTypes, p as FieldLabel, C as Checkbox, o as FieldError, v as Input, x as InputTable, K as KeyValueInputsList, w as InputList, _ as Text, R as Segment, Q as SectionTitle, j as DocsButton, z as MonitorsCheckboxes, $ as TextArea, k as Drawer, c as ConditionDetails, D as DataCard, a5 as FlexColumn, M as Modal, N as NavigationButtons, a9 as ModalBody, L as NotificationNote, A as AutocompleteInput, i as Divider, W as Status, a4 as FlexRow, a1 as Tooltip, s as IconWrapped, G as MonitorsIcons, aa as TableContainer, ab as TableTitleWrap, r as IconTitleBadge, ac as TableWrap, y as InteractiveTable, a6 as CenterThis, J as NoDataFound, a2 as TraceLoader, a as Badge, E as ExtendArrow, a7 as VerticalScroll, U as SelectionButton, B as Button, n as Dropdown, ad as nodeConfig, ae as useNodesState, af as useEdgesState, ag as Flow, ah as applyNodeChanges, P as Popup, a0 as Toggle, I as IconButton, ai as AddButton, F as FadeLoader, g as DataTab, X as Stepper, d as DataCardFields, Z as Tag, aj as MarkerType, t as IconsNav, ak as CopyText, h as DescribeRow, al as PodContainer, am as SourceContainer, q as IconGroup, O as PopupForm } from './index-5772129e.js';
|
|
6
6
|
import { i as isEmpty, s as safeJsonParse, d as deepClone } from './index-5e5f7bda.js';
|
|
7
7
|
import { C as CheckCircledIcon, O as OdigosLogo } from './index-50101bec.js';
|
|
8
8
|
import { C as CrossCircledIcon, O as OdigosLogoText, a as OverviewIcon, F as FilterIcon, D as DataStreamsIcon, A as ArrowIcon, R as RefreshLeftArrowIcon, N as NotificationIcon, U as UserIcon, S as SlackLogo, K as KeyIcon, T as TerminalIcon, G as GearIcon } from './index-c1df4281.js';
|
|
9
9
|
import { useActionFormData, useSessionStorage, useDataStreamFormData, useDestinationFormData, useClickNotification, useSourceFormData, useSourceSelectionFormData } from './hooks.js';
|
|
10
10
|
import { u as useKeyDown, a as useOnClickOutside, b as useContainerSize, c as useClickNode, d as usePopup, e as useInstrumentationRuleFormData, f as useTransition, g as useTimeAgo, h as useCopy, i as useGenericForm } from './useTransition-c2aef0e4.js';
|
|
11
11
|
import { E as EditIcon, T as TrashIcon, S as SearchIcon, h as CheckIcon, P as PlusIcon, a as CopyIcon } from './index-391844c6.js';
|
|
12
|
-
import { D as DeleteWarning, C as CancelWarning } from './index-
|
|
12
|
+
import { D as DeleteWarning, C as CancelWarning } from './index-847d188f.js';
|
|
13
13
|
import { g as getConditionsBooleans, m as mapConditions, b as getStatusIcon, h as splitCamelString, c as capitalizeFirstLetter, i as isStringABoolean, p as parseBooleanFromString } from './index-58440c5c.js';
|
|
14
14
|
import { f as filterActions, l as getEntityLabel, k as getEntityIcon, v as sleep, n as getPlatformIcon, o as getPlatformLabel, g as formatBytes, i as getContainersIcons, p as getValueForRange, j as getDestinationIcon, e as filterSourcesByStream, d as filterSources, b as filterDestinationsByStream, a as filterDestinations, u as mapDestinationFieldsForDisplay, c as compareCondition, r as getYamlFieldsForDestination, m as getMetricForEntity, q as getWorkloadId, s as hasUnhealthyInstances, h as getContainersInstrumentedCount, t as isOverTime } from './index-42f40e7c.js';
|
|
15
15
|
import { m as mapExportedSignals } from './index-6a6bea6e.js';
|
|
@@ -4723,6 +4723,15 @@ const SystemOverview = ({ tokens, saveToken, fetchDescribeOdigos }) => {
|
|
|
4723
4723
|
React.createElement(Describe, { fetchDescribeOdigos: fetchDescribeOdigos })))));
|
|
4724
4724
|
};
|
|
4725
4725
|
|
|
4726
|
+
var SettingsTabs;
|
|
4727
|
+
(function (SettingsTabs) {
|
|
4728
|
+
SettingsTabs["General"] = "General";
|
|
4729
|
+
SettingsTabs["Ui"] = "UI";
|
|
4730
|
+
SettingsTabs["Rollback"] = "Rollback";
|
|
4731
|
+
SettingsTabs["CollectorNode"] = "Collector Node";
|
|
4732
|
+
SettingsTabs["CollectorGateway"] = "Collector Gateway";
|
|
4733
|
+
})(SettingsTabs || (SettingsTabs = {}));
|
|
4734
|
+
|
|
4726
4735
|
const Card = styled.div `
|
|
4727
4736
|
align-self: stretch;
|
|
4728
4737
|
display: flex;
|
|
@@ -4739,278 +4748,225 @@ const CardTitle = styled(Text) `
|
|
|
4739
4748
|
font-weight: 600;
|
|
4740
4749
|
line-height: 20px;
|
|
4741
4750
|
`;
|
|
4751
|
+
const RowOfFields = styled(FlexRow) `
|
|
4752
|
+
width: 100%;
|
|
4753
|
+
gap: 12px;
|
|
4754
|
+
align-items: flex-start;
|
|
4755
|
+
justify-content: space-between;
|
|
4756
|
+
`;
|
|
4742
4757
|
|
|
4743
|
-
const
|
|
4744
|
-
|
|
4745
|
-
{
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
value: DISPLAY_LANGUAGES[ProgrammingLanguages.Go],
|
|
4751
|
-
icon: getProgrammingLanguageIcon(ProgrammingLanguages.Go),
|
|
4752
|
-
},
|
|
4753
|
-
{
|
|
4754
|
-
id: ProgrammingLanguages.JavaScript,
|
|
4755
|
-
value: DISPLAY_LANGUAGES[ProgrammingLanguages.JavaScript],
|
|
4756
|
-
icon: getProgrammingLanguageIcon(ProgrammingLanguages.JavaScript),
|
|
4757
|
-
},
|
|
4758
|
-
{
|
|
4759
|
-
id: ProgrammingLanguages.Python,
|
|
4760
|
-
value: DISPLAY_LANGUAGES[ProgrammingLanguages.Python],
|
|
4761
|
-
icon: getProgrammingLanguageIcon(ProgrammingLanguages.Python),
|
|
4762
|
-
},
|
|
4763
|
-
{
|
|
4764
|
-
id: ProgrammingLanguages.Java,
|
|
4765
|
-
value: DISPLAY_LANGUAGES[ProgrammingLanguages.Java],
|
|
4766
|
-
icon: getProgrammingLanguageIcon(ProgrammingLanguages.Java),
|
|
4767
|
-
},
|
|
4768
|
-
{
|
|
4769
|
-
id: ProgrammingLanguages.Php,
|
|
4770
|
-
value: DISPLAY_LANGUAGES[ProgrammingLanguages.Php],
|
|
4771
|
-
icon: getProgrammingLanguageIcon(ProgrammingLanguages.Php),
|
|
4772
|
-
},
|
|
4773
|
-
{
|
|
4774
|
-
id: ProgrammingLanguages.Ruby,
|
|
4775
|
-
value: DISPLAY_LANGUAGES[ProgrammingLanguages.Ruby],
|
|
4776
|
-
icon: getProgrammingLanguageIcon(ProgrammingLanguages.Ruby),
|
|
4777
|
-
},
|
|
4778
|
-
{
|
|
4779
|
-
id: ProgrammingLanguages.DotNet,
|
|
4780
|
-
value: DISPLAY_LANGUAGES[ProgrammingLanguages.DotNet],
|
|
4781
|
-
icon: getProgrammingLanguageIcon(ProgrammingLanguages.DotNet),
|
|
4782
|
-
},
|
|
4783
|
-
];
|
|
4784
|
-
const MOUNT_METHOD_OPTIONS = [
|
|
4785
|
-
{ id: MountMethod.VirtualDevice, value: 'Virtual Device' },
|
|
4786
|
-
{ id: MountMethod.HostPath, value: 'Host Path' },
|
|
4787
|
-
// { id: MountMethod.InitContainer, value: 'Init Container' },
|
|
4788
|
-
];
|
|
4789
|
-
const AGENT_ENV_VARS_INJECTION_METHOD_OPTIONS = [
|
|
4790
|
-
{ id: AgentEnvVarsInjectionMethod.Loader, value: 'Loader' },
|
|
4791
|
-
{ id: AgentEnvVarsInjectionMethod.PodManifest, value: 'Pod Manifest' },
|
|
4792
|
-
{ id: AgentEnvVarsInjectionMethod.LoaderFallbackToPodManifest, value: 'Loader Fallback to Pod Manifest' },
|
|
4793
|
-
];
|
|
4794
|
-
const PROFILE_OPTIONS = [
|
|
4795
|
-
// { id: Profile.CategoryAttributes, value: 'Category Attributes' },
|
|
4796
|
-
{ id: Profile.CodeAttributes, value: 'Code Attributes' },
|
|
4797
|
-
// { id: Profile.CopyScope, value: 'Copy Scope' },
|
|
4798
|
-
// { id: Profile.HostnameAsPodname, value: 'Hostname as Podname' },
|
|
4799
|
-
{ id: Profile.FullPayloadCollection, value: 'Full Payload Collection' },
|
|
4800
|
-
{ id: Profile.DbPayloadCollection, value: 'DB Payload Collection' },
|
|
4801
|
-
{ id: Profile.QueryOperationDetector, value: 'Query Operation Detector' },
|
|
4802
|
-
// { id: Profile.Semconv, value: 'Semconv' },
|
|
4803
|
-
// { id: Profile.ReduceSpanNameCardinality, value: 'Reduce Span Name Cardinality' },
|
|
4804
|
-
{ id: Profile.AllowConcurrentAgents, value: 'Allow Concurrent Agents' },
|
|
4805
|
-
{ id: Profile.JavaEbpfInstrumentations, value: 'Java EBPF Instrumentations' },
|
|
4806
|
-
{ id: Profile.JavaNativeInstrumentations, value: 'Java Native Instrumentations' },
|
|
4807
|
-
// { id: Profile.LegacyDotnetInstrumentation, value: 'Legacy .NET Instrumentation' },
|
|
4808
|
-
// { id: Profile.MountMethodK8sHostPath, value: 'Mount Method K8s Host Path' },
|
|
4809
|
-
// { id: Profile.MountMethodK8sVirtualDevice, value: 'Mount Method K8s Virtual Device' },
|
|
4810
|
-
// { id: Profile.PodManifestEnvVarInjection, value: 'Pod Manifest Env Var Injection' },
|
|
4811
|
-
// { id: Profile.DisableGin, value: 'Disable Gin' },
|
|
4812
|
-
// { id: Profile.SmallBatches, value: 'Small Batches' },
|
|
4813
|
-
{ id: Profile.SizeS, value: 'Size S' },
|
|
4814
|
-
{ id: Profile.SizeM, value: 'Size M' },
|
|
4815
|
-
{ id: Profile.SizeL, value: 'Size L' },
|
|
4816
|
-
];
|
|
4817
|
-
|
|
4818
|
-
const UiSettings = ({ formData, handleFormChange }) => {
|
|
4819
|
-
return (React.createElement(Card, null,
|
|
4820
|
-
React.createElement(CardTitle, null, "UI"),
|
|
4821
|
-
React.createElement(Dropdown, { title: 'UI Mode', tooltip: 'Mode of the UI - default or readonly', options: UI_MODE_OPTIONS, value: formData.uiMode ? UI_MODE_OPTIONS.find((option) => option.id === formData.uiMode) : undefined, onSelect: (option) => handleFormChange('uiMode', option.id) }),
|
|
4822
|
-
React.createElement(Input, { title: 'UI Pagination Limit', tooltip: 'Pagination limit for UI paginated fetching', type: 'number', value: formData.uiPaginationLimit?.toString() || '', onChange: (e) => {
|
|
4758
|
+
const UiSettings = forwardRef(({ formData, handleFormChange }, ref) => {
|
|
4759
|
+
const [isAdvanced, setIsAdvanced] = useState(false);
|
|
4760
|
+
return (React.createElement(Card, { ref: ref, id: SettingsTabs.Ui },
|
|
4761
|
+
React.createElement(RowOfFields, null,
|
|
4762
|
+
React.createElement(CardTitle, null, "UI"),
|
|
4763
|
+
React.createElement(Toggle, { title: 'Advanced Settings', tooltip: 'Show advanced settings. Note: these are not recommended to be changed unless you know what you are doing.', initialValue: isAdvanced, onChange: () => setIsAdvanced((prev) => !prev), flipHorizontally: true })),
|
|
4764
|
+
isAdvanced && (React.createElement(Input, { status: StatusType.Warning, title: 'UI Pagination Limit (Advanced)', tooltip: 'Pagination limit for fetching data from the UI backend, bigger limit means more data will be fetched at once, and less requests will be made to the backend', type: 'number', required: true, value: formData.uiPaginationLimit?.toString() || '', onChange: (e) => {
|
|
4823
4765
|
const { value } = e.target;
|
|
4824
4766
|
handleFormChange('uiPaginationLimit', value === '' ? null : Number(value));
|
|
4825
|
-
} }),
|
|
4826
|
-
React.createElement(Input, { title: 'Central Backend URL', tooltip: 'URL of the central backend', value: formData.centralBackendURL || '', onChange: (e) => {
|
|
4767
|
+
} })),
|
|
4768
|
+
React.createElement(Input, { title: 'Central Backend URL', tooltip: 'URL of the central backend', required: true, value: formData.centralBackendURL || '', onChange: (e) => {
|
|
4827
4769
|
const { value } = e.target;
|
|
4828
4770
|
handleFormChange('centralBackendURL', value || null);
|
|
4829
4771
|
} }),
|
|
4830
|
-
React.createElement(Input, { title: 'OIDC Tenant URL', tooltip: 'URL of the OIDC tenant', value: formData.oidc?.tenantUrl || '', onChange: (e) => {
|
|
4772
|
+
React.createElement(Input, { title: 'OIDC Tenant URL', tooltip: 'URL of the OIDC tenant', required: true, value: formData.oidc?.tenantUrl || '', onChange: (e) => {
|
|
4831
4773
|
const { value } = e.target;
|
|
4832
4774
|
handleFormChange('oidc.tenantUrl', value || null);
|
|
4833
4775
|
} }),
|
|
4834
|
-
React.createElement(Input, { title: 'OIDC Client ID', tooltip: 'Client ID of the OIDC application', value: formData.oidc?.clientId || '', onChange: (e) => {
|
|
4776
|
+
React.createElement(Input, { title: 'OIDC Client ID', tooltip: 'Client ID of the OIDC application', required: true, value: formData.oidc?.clientId || '', onChange: (e) => {
|
|
4835
4777
|
const { value } = e.target;
|
|
4836
4778
|
handleFormChange('oidc.clientId', value || null);
|
|
4837
4779
|
} }),
|
|
4838
|
-
React.createElement(Input, { title: 'OIDC Client Secret', tooltip: 'Client Secret of the OIDC application', type: 'password', value: formData.oidc?.clientSecret || '', onChange: (e) => {
|
|
4780
|
+
React.createElement(Input, { title: 'OIDC Client Secret', tooltip: 'Client Secret of the OIDC application', type: 'password', required: true, value: formData.oidc?.clientSecret || '', onChange: (e) => {
|
|
4839
4781
|
const { value } = e.target;
|
|
4840
4782
|
handleFormChange('oidc.clientSecret', value || null);
|
|
4841
4783
|
} })));
|
|
4842
|
-
};
|
|
4784
|
+
});
|
|
4785
|
+
UiSettings.displayName = UiSettings.name;
|
|
4843
4786
|
|
|
4844
|
-
const
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
|
|
4787
|
+
const MOUNT_METHOD_OPTIONS = [
|
|
4788
|
+
{ id: MountMethod.VirtualDevice, value: 'Virtual Device' },
|
|
4789
|
+
{ id: MountMethod.HostPath, value: 'Host Path' },
|
|
4790
|
+
{ id: MountMethod.InitContainer, value: 'Init Container' },
|
|
4791
|
+
];
|
|
4792
|
+
const AGENT_ENV_VARS_INJECTION_METHOD_OPTIONS = [
|
|
4793
|
+
{ id: AgentEnvVarsInjectionMethod.Loader, value: 'Loader' },
|
|
4794
|
+
{ id: AgentEnvVarsInjectionMethod.PodManifest, value: 'Pod Manifest' },
|
|
4795
|
+
{ id: AgentEnvVarsInjectionMethod.LoaderFallbackToPodManifest, value: 'Loader Fallback to Pod Manifest' },
|
|
4796
|
+
];
|
|
4797
|
+
|
|
4798
|
+
const GeneralSettings = forwardRef(({ formData, handleFormChange }, ref) => {
|
|
4799
|
+
const [isAdvanced, setIsAdvanced] = useState(false);
|
|
4800
|
+
return (React.createElement(Card, { ref: ref, id: SettingsTabs.General },
|
|
4801
|
+
React.createElement(RowOfFields, null,
|
|
4802
|
+
React.createElement(CardTitle, null, "General"),
|
|
4803
|
+
React.createElement(Toggle, { title: 'Advanced Settings', tooltip: 'Show advanced settings. Note: these are not recommended to be changed unless you know what you are doing.', initialValue: isAdvanced, onChange: () => setIsAdvanced((prev) => !prev), flipHorizontally: true })),
|
|
4804
|
+
isAdvanced && (React.createElement(React.Fragment, null,
|
|
4805
|
+
React.createElement(Dropdown, { status: StatusType.Warning, title: 'Mount Method (Advanced)', tooltip: 'Method used to mount volume', options: MOUNT_METHOD_OPTIONS, required: true, value: MOUNT_METHOD_OPTIONS.find((option) => option.id === formData.mountMethod) || undefined, onSelect: (option) => handleFormChange('mountMethod', option.id) }),
|
|
4806
|
+
React.createElement(Dropdown, { status: StatusType.Warning, title: 'Agent Envs Injection Method (Advanced)', tooltip: 'How to inject environment variables into agents', options: AGENT_ENV_VARS_INJECTION_METHOD_OPTIONS, required: true, value: AGENT_ENV_VARS_INJECTION_METHOD_OPTIONS.find((option) => option.id === formData.agentEnvVarsInjectionMethod) || undefined, onSelect: (option) => handleFormChange('agentEnvVarsInjectionMethod', option.id) }),
|
|
4807
|
+
React.createElement(Input, { status: StatusType.Warning, title: 'Odiglet Health Probe Bind Port (Advanced)', tooltip: 'Port to bind the health probe', type: 'number', required: true, value: formData.odigletHealthProbeBindPort?.toString() || '', onChange: (e) => {
|
|
4808
|
+
const { value } = e.target;
|
|
4809
|
+
handleFormChange('odigletHealthProbeBindPort', value === '' ? null : Number(value));
|
|
4810
|
+
} }),
|
|
4811
|
+
React.createElement(Input, { status: StatusType.Warning, title: 'Custom Container Runtime Socket Path (Advanced)', tooltip: 'Path to the custom container runtime socket', required: true, value: formData.customContainerRuntimeSocketPath || '', onChange: (e) => {
|
|
4812
|
+
const { value } = e.target;
|
|
4813
|
+
handleFormChange('customContainerRuntimeSocketPath', value || null);
|
|
4814
|
+
} }))),
|
|
4849
4815
|
React.createElement(Toggle, { title: 'Karpenter Enabled', tooltip: 'Enable Karpenter support', initialValue: formData.karpenterEnabled || false, onChange: (bool) => handleFormChange('karpenterEnabled', bool) }),
|
|
4850
|
-
React.createElement(Toggle, { title: 'PSP Enabled', tooltip: 'Enable Pod Security Policy support', initialValue: formData.psp || false, onChange: (bool) => handleFormChange('psp', bool) }),
|
|
4851
4816
|
React.createElement(Toggle, { title: 'Allow Concurrent Agents', tooltip: 'Allow concurrent running agents', initialValue: formData.allowConcurrentAgents || false, onChange: (bool) => handleFormChange('allowConcurrentAgents', bool) }),
|
|
4852
|
-
React.createElement(Toggle, { title: 'Skip Webhook Issuer Creation', tooltip: 'Skip creation of the webhook issuer', initialValue: formData.skipWebhookIssuerCreation || false, onChange: (bool) => handleFormChange('skipWebhookIssuerCreation', bool) }),
|
|
4853
4817
|
React.createElement(Toggle, { title: 'Automatic Rollout Disabled', tooltip: 'Disable automatic rollout of pods after instrumentation', initialValue: formData.rollout?.automaticRolloutDisabled || false, onChange: (bool) => handleFormChange('rollout.automaticRolloutDisabled', bool) }),
|
|
4854
|
-
React.createElement(Input, { title: 'Cluster Name', tooltip: 'Name of the cluster', value: formData.clusterName || '', onChange: (e) => {
|
|
4818
|
+
React.createElement(Input, { title: 'Cluster Name', tooltip: 'Name of the cluster', required: true, value: formData.clusterName || '', onChange: (e) => {
|
|
4855
4819
|
const { value } = e.target;
|
|
4856
4820
|
handleFormChange('clusterName', value || null);
|
|
4857
4821
|
} }),
|
|
4858
|
-
React.createElement(Input, { title: 'Image Prefix', tooltip: '
|
|
4822
|
+
React.createElement(Input, { title: 'Image Prefix', tooltip: 'Docker image prefix for all Odigos components', disabled: true, required: true, value: formData.imagePrefix || '', onChange: (e) => {
|
|
4859
4823
|
const { value } = e.target;
|
|
4860
4824
|
handleFormChange('imagePrefix', value || null);
|
|
4861
4825
|
} }),
|
|
4862
|
-
React.createElement(
|
|
4863
|
-
React.createElement(
|
|
4864
|
-
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
const { value } = e.target;
|
|
4869
|
-
handleFormChange('customContainerRuntimeSocketPath', value || null);
|
|
4870
|
-
} }),
|
|
4871
|
-
React.createElement(Input, { title: 'Odiglet Health Probe Bind Port', tooltip: 'Port to bind the health probe', type: 'number', value: formData.odigletHealthProbeBindPort?.toString() || '', onChange: (e) => {
|
|
4872
|
-
const { value } = e.target;
|
|
4873
|
-
handleFormChange('odigletHealthProbeBindPort', value === '' ? null : Number(value));
|
|
4874
|
-
} }),
|
|
4875
|
-
React.createElement(Toggle, { title: 'Rollback Disabled', tooltip: 'Disable rollback', initialValue: formData.rollbackDisabled || false, onChange: (bool) => handleFormChange('rollbackDisabled', bool) }),
|
|
4876
|
-
React.createElement(Input, { title: 'Rollback Grace Time', tooltip: 'Grace time for rollback', value: formData.rollbackGraceTime || '', onChange: (e) => {
|
|
4877
|
-
const { value } = e.target;
|
|
4878
|
-
handleFormChange('rollbackGraceTime', value || null);
|
|
4879
|
-
} }),
|
|
4880
|
-
React.createElement(Input, { title: 'Rollback Stability Window', tooltip: 'Stability window for rollback', value: formData.rollbackStabilityWindow || '', onChange: (e) => {
|
|
4881
|
-
const { value } = e.target;
|
|
4882
|
-
handleFormChange('rollbackStabilityWindow', value || null);
|
|
4883
|
-
} }),
|
|
4884
|
-
React.createElement(KeyValueInputsList, { title: 'Node Selector', value: Object.entries(formData.nodeSelector || {}).map(([key, value]) => ({
|
|
4885
|
-
key,
|
|
4886
|
-
value,
|
|
4887
|
-
})), onChange: (arr) => handleFormChange('nodeSelector', arr.reduce((acc, { key, value }) => ({
|
|
4888
|
-
...acc,
|
|
4889
|
-
[key]: value,
|
|
4890
|
-
}), {})) })));
|
|
4891
|
-
};
|
|
4826
|
+
React.createElement(KeyValueInputsList, { title: 'Node Selector', tooltip: 'NodeSelector is a map of key-value Kubernetes NodeSelector labels to apply to all Odigos components. Note that Odigos will only be able to instrument applications on the same node. This setting can be applied only via the CLI.', disabled: true, required: true, value: Object.entries(formData.nodeSelector || {}).map(([key, value]) => ({ key, value })) }),
|
|
4827
|
+
React.createElement(RowOfFields, null,
|
|
4828
|
+
React.createElement(InputList, { title: 'Ignored Namespaces', tooltip: 'List of namespaces to exclude from instrumentation', required: true, value: formData.ignoredNamespaces || [], onChange: (arr) => handleFormChange('ignoredNamespaces', arr) }),
|
|
4829
|
+
React.createElement(InputList, { title: 'Ignored Containers', tooltip: 'List of container names to exclude from instrumentation, this is a global setting and will be applied to all applications', required: true, value: formData.ignoredContainers || [], onChange: (arr) => handleFormChange('ignoredContainers', arr) }))));
|
|
4830
|
+
});
|
|
4831
|
+
GeneralSettings.displayName = GeneralSettings.name;
|
|
4892
4832
|
|
|
4893
|
-
const
|
|
4894
|
-
return (React.createElement(Card,
|
|
4895
|
-
React.createElement(CardTitle, null, "
|
|
4896
|
-
React.createElement(
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
-
React.createElement(Input, { title: 'Request CPU (Millicores)', tooltip: 'Request CPU for the collector node in Millicores', type: 'number', value: formData.collectorNode?.requestCPUm?.toString() || '', onChange: (e) => {
|
|
4909
|
-
const { value } = e.target;
|
|
4910
|
-
handleFormChange('collectorNode.requestCPUm', value === '' ? null : Number(value));
|
|
4911
|
-
} }),
|
|
4912
|
-
React.createElement(Input, { title: 'Limit CPU (Millicores)', tooltip: 'Limit CPU for the collector node in Millicores', type: 'number', value: formData.collectorNode?.limitCPUm?.toString() || '', onChange: (e) => {
|
|
4913
|
-
const { value } = e.target;
|
|
4914
|
-
handleFormChange('collectorNode.limitCPUm', value === '' ? null : Number(value));
|
|
4915
|
-
} }),
|
|
4916
|
-
React.createElement(Input, { title: 'Memory Limiter Limit (MB)', tooltip: 'Memory limiter limit for the collector node in Megabytes', type: 'number', value: formData.collectorNode?.memoryLimiterLimitMiB?.toString() || '', onChange: (e) => {
|
|
4917
|
-
const { value } = e.target;
|
|
4918
|
-
handleFormChange('collectorNode.memoryLimiterLimitMiB', value === '' ? null : Number(value));
|
|
4919
|
-
} }),
|
|
4920
|
-
React.createElement(Input, { title: 'Memory Limiter Spike Limit (MB)', tooltip: 'Memory limiter spike limit for the collector node in Megabytes', type: 'number', value: formData.collectorNode?.memoryLimiterSpikeLimitMiB?.toString() || '', onChange: (e) => {
|
|
4921
|
-
const { value } = e.target;
|
|
4922
|
-
handleFormChange('collectorNode.memoryLimiterSpikeLimitMiB', value === '' ? null : Number(value));
|
|
4923
|
-
} }),
|
|
4924
|
-
React.createElement(Input, { title: 'Go Memory Limit (MB)', tooltip: 'Go memory limit for the collector node in Megabytes', type: 'number', value: formData.collectorNode?.goMemLimitMiB?.toString() || '', onChange: (e) => {
|
|
4925
|
-
const { value } = e.target;
|
|
4926
|
-
handleFormChange('collectorNode.goMemLimitMiB', value === '' ? null : Number(value));
|
|
4927
|
-
} }),
|
|
4928
|
-
React.createElement(Input, { title: 'K8s Node Logs Directory', tooltip: 'Target directory for K8s logs if `/var/log` is a symlink', value: formData.collectorNode?.k8sNodeLogsDirectory || '', onChange: (e) => {
|
|
4929
|
-
const { value } = e.target;
|
|
4930
|
-
handleFormChange('collectorNode.k8sNodeLogsDirectory', value || null);
|
|
4931
|
-
} })));
|
|
4932
|
-
};
|
|
4833
|
+
const RollbackSettings = forwardRef(({ formData, handleFormChange }, ref) => {
|
|
4834
|
+
return (React.createElement(Card, { ref: ref, id: SettingsTabs.Rollback },
|
|
4835
|
+
React.createElement(CardTitle, null, "Rollback"),
|
|
4836
|
+
React.createElement(Toggle, { title: 'Rollback Disabled', tooltip: 'Disable rollback', initialValue: formData.rollbackDisabled || false, onChange: (bool) => handleFormChange('rollbackDisabled', bool) }),
|
|
4837
|
+
React.createElement(RowOfFields, null,
|
|
4838
|
+
React.createElement(Input, { title: 'Rollback Grace Time', tooltip: 'Grace time for rollback', required: true, value: formData.rollbackGraceTime || '', onChange: (e) => {
|
|
4839
|
+
const { value } = e.target;
|
|
4840
|
+
handleFormChange('rollbackGraceTime', value || null);
|
|
4841
|
+
} }),
|
|
4842
|
+
React.createElement(Input, { title: 'Rollback Stability Window', tooltip: 'Stability window for rollback', required: true, value: formData.rollbackStabilityWindow || '', onChange: (e) => {
|
|
4843
|
+
const { value } = e.target;
|
|
4844
|
+
handleFormChange('rollbackStabilityWindow', value || null);
|
|
4845
|
+
} }))));
|
|
4846
|
+
});
|
|
4847
|
+
RollbackSettings.displayName = RollbackSettings.name;
|
|
4933
4848
|
|
|
4934
|
-
const
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
React.createElement(
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
|
|
4945
|
-
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
};
|
|
4849
|
+
const CollectorNodeSettings = forwardRef(({ formData, handleFormChange }, ref) => {
|
|
4850
|
+
const [isAdvanced, setIsAdvanced] = useState(false);
|
|
4851
|
+
return (React.createElement(Card, { ref: ref, id: SettingsTabs.CollectorNode },
|
|
4852
|
+
React.createElement(RowOfFields, null,
|
|
4853
|
+
React.createElement(CardTitle, null, "Collector Node"),
|
|
4854
|
+
React.createElement(Toggle, { title: 'Advanced Settings', tooltip: 'Show advanced settings. Note: these are not recommended to be changed unless you know what you are doing.', initialValue: isAdvanced, onChange: () => setIsAdvanced((prev) => !prev), flipHorizontally: true })),
|
|
4855
|
+
isAdvanced && (React.createElement(React.Fragment, null,
|
|
4856
|
+
React.createElement(Input, { status: StatusType.Warning, title: 'K8s Node Logs Directory', tooltip: 'Target directory for K8s logs if `/var/log` is a symlink', required: true, value: formData.collectorNode?.k8sNodeLogsDirectory || '', onChange: (e) => {
|
|
4857
|
+
const { value } = e.target;
|
|
4858
|
+
handleFormChange('collectorNode.k8sNodeLogsDirectory', value || null);
|
|
4859
|
+
} }),
|
|
4860
|
+
React.createElement(Input, { status: StatusType.Warning, title: 'Coll. Node Own Metrics Port', tooltip: "Port for the collector node's own Prometheus metrics", type: 'number', required: true, value: formData.collectorNode?.collectorOwnMetricsPort?.toString() || '', onChange: (e) => {
|
|
4861
|
+
const { value } = e.target;
|
|
4862
|
+
handleFormChange('collectorNode.collectorOwnMetricsPort', value === '' ? null : Number(value));
|
|
4863
|
+
} }),
|
|
4864
|
+
React.createElement(RowOfFields, null,
|
|
4865
|
+
React.createElement(Input, { status: StatusType.Warning, title: 'Coll. Node Memory Limiter Limit (MB)', tooltip: 'Memory limiter limit for the collector node in Megabytes', type: 'number', required: true, value: formData.collectorNode?.memoryLimiterLimitMiB?.toString() || '', onChange: (e) => {
|
|
4866
|
+
const { value } = e.target;
|
|
4867
|
+
handleFormChange('collectorNode.memoryLimiterLimitMiB', value === '' ? null : Number(value));
|
|
4868
|
+
} }),
|
|
4869
|
+
React.createElement(Input, { status: StatusType.Warning, title: 'Coll. Node Memory Limiter Spike Limit (MB)', tooltip: 'Memory limiter spike limit for the collector node in Megabytes', type: 'number', required: true, value: formData.collectorNode?.memoryLimiterSpikeLimitMiB?.toString() || '', onChange: (e) => {
|
|
4870
|
+
const { value } = e.target;
|
|
4871
|
+
handleFormChange('collectorNode.memoryLimiterSpikeLimitMiB', value === '' ? null : Number(value));
|
|
4872
|
+
} })),
|
|
4873
|
+
React.createElement(Input, { status: StatusType.Warning, title: 'Coll. Node Go Memory Limit (MB)', tooltip: 'Go memory limit for the collector node in Megabytes', type: 'number', required: true, value: formData.collectorNode?.goMemLimitMiB?.toString() || '', onChange: (e) => {
|
|
4874
|
+
const { value } = e.target;
|
|
4875
|
+
handleFormChange('collectorNode.goMemLimitMiB', value === '' ? null : Number(value));
|
|
4876
|
+
} }))),
|
|
4877
|
+
React.createElement(RowOfFields, null,
|
|
4878
|
+
React.createElement(Input, { title: 'Request Memory (MB)', tooltip: 'Request memory for the collector node in Megabytes', type: 'number', required: true, value: formData.collectorNode?.requestMemoryMiB?.toString() || '', onChange: (e) => {
|
|
4879
|
+
const { value } = e.target;
|
|
4880
|
+
handleFormChange('collectorNode.requestMemoryMiB', value === '' ? null : Number(value));
|
|
4881
|
+
} }),
|
|
4882
|
+
React.createElement(Input, { title: 'Limit Memory (MB)', tooltip: 'Limit memory for the collector node in Megabytes', type: 'number', required: true, value: formData.collectorNode?.limitMemoryMiB?.toString() || '', onChange: (e) => {
|
|
4883
|
+
const { value } = e.target;
|
|
4884
|
+
handleFormChange('collectorNode.limitMemoryMiB', value === '' ? null : Number(value));
|
|
4885
|
+
} })),
|
|
4886
|
+
React.createElement(RowOfFields, null,
|
|
4887
|
+
React.createElement(Input, { title: 'Request CPU (m)', tooltip: 'Request CPU for the collector node in Millicores', type: 'number', required: true, value: formData.collectorNode?.requestCPUm?.toString() || '', onChange: (e) => {
|
|
4888
|
+
const { value } = e.target;
|
|
4889
|
+
handleFormChange('collectorNode.requestCPUm', value === '' ? null : Number(value));
|
|
4890
|
+
} }),
|
|
4891
|
+
React.createElement(Input, { title: 'Limit CPU (m)', tooltip: 'Limit CPU for the collector node in Millicores', type: 'number', required: true, value: formData.collectorNode?.limitCPUm?.toString() || '', onChange: (e) => {
|
|
4892
|
+
const { value } = e.target;
|
|
4893
|
+
handleFormChange('collectorNode.limitCPUm', value === '' ? null : Number(value));
|
|
4894
|
+
} }))));
|
|
4895
|
+
});
|
|
4896
|
+
CollectorNodeSettings.displayName = CollectorNodeSettings.name;
|
|
4974
4897
|
|
|
4975
|
-
const
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
React.createElement(
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
value
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4898
|
+
const CollectorGatewaySettings = forwardRef(({ formData, handleFormChange }, ref) => {
|
|
4899
|
+
const [isAdvanced, setIsAdvanced] = useState(false);
|
|
4900
|
+
return (React.createElement(Card, { ref: ref, id: SettingsTabs.CollectorGateway },
|
|
4901
|
+
React.createElement(RowOfFields, null,
|
|
4902
|
+
React.createElement(CardTitle, null, "Collector Gateway"),
|
|
4903
|
+
React.createElement(Toggle, { title: 'Advanced Settings', tooltip: 'Show advanced settings. Note: these are not recommended to be changed unless you know what you are doing.', initialValue: isAdvanced, onChange: () => setIsAdvanced((prev) => !prev), flipHorizontally: true })),
|
|
4904
|
+
isAdvanced && (React.createElement(React.Fragment, null,
|
|
4905
|
+
React.createElement(RowOfFields, null,
|
|
4906
|
+
React.createElement(Input, { status: StatusType.Warning, title: 'Coll. Gateway Memory Limiter Limit (MB)', tooltip: 'Memory limiter limit for the collector gateway in Megabytes', type: 'number', required: true, value: formData.collectorGateway?.memoryLimiterLimitMiB?.toString() || '', onChange: (e) => {
|
|
4907
|
+
const { value } = e.target;
|
|
4908
|
+
handleFormChange('collectorGateway.memoryLimiterLimitMiB', value === '' ? null : Number(value));
|
|
4909
|
+
} }),
|
|
4910
|
+
React.createElement(Input, { status: StatusType.Warning, title: 'Coll. Gateway Memory Limiter Spike Limit (MB)', tooltip: 'Memory limiter spike limit for the collector gateway in Megabytes', type: 'number', required: true, value: formData.collectorGateway?.memoryLimiterSpikeLimitMiB?.toString() || '', onChange: (e) => {
|
|
4911
|
+
const { value } = e.target;
|
|
4912
|
+
handleFormChange('collectorGateway.memoryLimiterSpikeLimitMiB', value === '' ? null : Number(value));
|
|
4913
|
+
} })),
|
|
4914
|
+
React.createElement(Input, { status: StatusType.Warning, title: 'Coll. Gateway Go Memory Limit (MB)', tooltip: 'Go memory limit for the collector gateway in Megabytes', type: 'number', required: true, value: formData.collectorGateway?.goMemLimitMiB?.toString() || '', onChange: (e) => {
|
|
4915
|
+
const { value } = e.target;
|
|
4916
|
+
handleFormChange('collectorGateway.goMemLimitMiB', value === '' ? null : Number(value));
|
|
4917
|
+
} }))),
|
|
4918
|
+
React.createElement(RowOfFields, null,
|
|
4919
|
+
React.createElement(Input, { title: 'Autoscaler Min. Replicas', tooltip: 'Minimum number of replicas for the collector gateway', type: 'number', required: true, value: formData.collectorGateway?.minReplicas?.toString() || '', onChange: (e) => {
|
|
4920
|
+
const { value } = e.target;
|
|
4921
|
+
handleFormChange('collectorGateway.minReplicas', value === '' ? null : Number(value));
|
|
4922
|
+
} }),
|
|
4923
|
+
React.createElement(Input, { title: 'Autoscaler Max. Replicas', tooltip: 'Maximum number of replicas for the collector gateway', type: 'number', required: true, value: formData.collectorGateway?.maxReplicas?.toString() || '', onChange: (e) => {
|
|
4924
|
+
const { value } = e.target;
|
|
4925
|
+
handleFormChange('collectorGateway.maxReplicas', value === '' ? null : Number(value));
|
|
4926
|
+
} })),
|
|
4927
|
+
React.createElement(RowOfFields, null,
|
|
4928
|
+
React.createElement(Input, { title: 'Request Memory (MB)', tooltip: 'Request memory for the collector gateway in Megabytes', type: 'number', required: true, value: formData.collectorGateway?.requestMemoryMiB?.toString() || '', onChange: (e) => {
|
|
4929
|
+
const { value } = e.target;
|
|
4930
|
+
handleFormChange('collectorGateway.requestMemoryMiB', value === '' ? null : Number(value));
|
|
4931
|
+
} }),
|
|
4932
|
+
React.createElement(Input, { title: 'Limit Memory (MB)', tooltip: 'Limit memory for the collector gateway in Megabytes', type: 'number', required: true, value: formData.collectorGateway?.limitMemoryMiB?.toString() || '', onChange: (e) => {
|
|
4933
|
+
const { value } = e.target;
|
|
4934
|
+
handleFormChange('collectorGateway.limitMemoryMiB', value === '' ? null : Number(value));
|
|
4935
|
+
} })),
|
|
4936
|
+
React.createElement(RowOfFields, null,
|
|
4937
|
+
React.createElement(Input, { title: 'Request CPU (m)', tooltip: 'Request CPU for the collector gateway in Millicores', type: 'number', required: true, value: formData.collectorGateway?.requestCPUm?.toString() || '', onChange: (e) => {
|
|
4938
|
+
const { value } = e.target;
|
|
4939
|
+
handleFormChange('collectorGateway.requestCPUm', value === '' ? null : Number(value));
|
|
4940
|
+
} }),
|
|
4941
|
+
React.createElement(Input, { title: 'Limit CPU (m)', tooltip: 'Limit CPU for the collector gateway in Millicores', type: 'number', required: true, value: formData.collectorGateway?.limitCPUm?.toString() || '', onChange: (e) => {
|
|
4942
|
+
const { value } = e.target;
|
|
4943
|
+
handleFormChange('collectorGateway.limitCPUm', value === '' ? null : Number(value));
|
|
4944
|
+
} }))));
|
|
4945
|
+
});
|
|
4946
|
+
CollectorGatewaySettings.displayName = CollectorGatewaySettings.name;
|
|
4996
4947
|
|
|
4997
4948
|
const DataContainer = styled.div `
|
|
4998
4949
|
display: flex;
|
|
4999
4950
|
flex-direction: column;
|
|
5000
4951
|
gap: 12px;
|
|
4952
|
+
max-height: 100vh;
|
|
4953
|
+
overflow-y: auto;
|
|
5001
4954
|
`;
|
|
5002
4955
|
const DRAWER_WIDTH = '750px';
|
|
5003
4956
|
const TITLE_TEXT = 'System Settings';
|
|
5004
|
-
const SystemSettings = ({ fetchSettings, onSave }) => {
|
|
4957
|
+
const SystemSettings = ({ installationMethod, fetchSettings, onSave }) => {
|
|
4958
|
+
const [isSaving, setIsSaving] = useState(false);
|
|
5005
4959
|
const [settings, setSettings] = useState(undefined);
|
|
5006
4960
|
const { formData, handleFormChange, resetFormData, isFormDirty } = useGenericForm(settings);
|
|
5007
|
-
useEffect(() => {
|
|
5008
|
-
fetchSettings().then(setSettings);
|
|
5009
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
5010
|
-
}, []);
|
|
5011
|
-
const [isSaving, setIsSaving] = useState(false);
|
|
5012
4961
|
const [isOpen, setIsOpen] = useState(false);
|
|
5013
4962
|
const toggleOpen = () => setIsOpen((prev) => !prev);
|
|
4963
|
+
useEffect(() => {
|
|
4964
|
+
if (isOpen)
|
|
4965
|
+
fetchSettings().then(setSettings);
|
|
4966
|
+
else
|
|
4967
|
+
setSettings(undefined);
|
|
4968
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4969
|
+
}, [isOpen]);
|
|
5014
4970
|
const [cancelWarningOpen, setCancelWarningOpen] = useState(false);
|
|
5015
4971
|
const [cancelApproveCallback, setCancelApproveCallback] = useState(null);
|
|
5016
4972
|
const handleWithCancelWarning = (callback) => {
|
|
@@ -5022,12 +4978,94 @@ const SystemSettings = ({ fetchSettings, onSave }) => {
|
|
|
5022
4978
|
callback();
|
|
5023
4979
|
}
|
|
5024
4980
|
};
|
|
4981
|
+
const handleSave = async () => {
|
|
4982
|
+
setIsSaving(true);
|
|
4983
|
+
await onSave(formData);
|
|
4984
|
+
setSettings(await fetchSettings());
|
|
4985
|
+
setIsSaving(false);
|
|
4986
|
+
toggleOpen();
|
|
4987
|
+
};
|
|
4988
|
+
const [selectedTab, setSelectedTab] = useState(SettingsTabs.General);
|
|
4989
|
+
const scrollContainerRef = useRef(null);
|
|
4990
|
+
const generalRef = useRef(null);
|
|
4991
|
+
const uiRef = useRef(null);
|
|
4992
|
+
const rollbackRef = useRef(null);
|
|
4993
|
+
const collectorNodeRef = useRef(null);
|
|
4994
|
+
const collectorGatewayRef = useRef(null);
|
|
4995
|
+
const refsArray = [generalRef, uiRef, rollbackRef, collectorNodeRef, collectorGatewayRef];
|
|
4996
|
+
const tabsArray = [SettingsTabs.General, SettingsTabs.Ui, SettingsTabs.Rollback, SettingsTabs.CollectorNode, SettingsTabs.CollectorGateway];
|
|
4997
|
+
const scrollTo = (id) => {
|
|
4998
|
+
const scrollContainer = scrollContainerRef.current;
|
|
4999
|
+
if (!scrollContainer)
|
|
5000
|
+
return;
|
|
5001
|
+
let relativeTop = 0;
|
|
5002
|
+
for (let i = 0; i < refsArray.length; i++) {
|
|
5003
|
+
const curr = refsArray[i].current;
|
|
5004
|
+
if (curr && curr.id === id) {
|
|
5005
|
+
const containerRect = scrollContainer.getBoundingClientRect();
|
|
5006
|
+
const targetRect = curr.getBoundingClientRect();
|
|
5007
|
+
relativeTop = targetRect.top - containerRect.top + scrollContainer.scrollTop;
|
|
5008
|
+
break;
|
|
5009
|
+
}
|
|
5010
|
+
}
|
|
5011
|
+
scrollContainer.scrollTo({
|
|
5012
|
+
top: id === SettingsTabs.General ? 0 : relativeTop,
|
|
5013
|
+
behavior: 'smooth',
|
|
5014
|
+
});
|
|
5015
|
+
};
|
|
5016
|
+
const onScroll = (e) => {
|
|
5017
|
+
const scrollContainer = scrollContainerRef.current;
|
|
5018
|
+
if (!scrollContainer)
|
|
5019
|
+
return;
|
|
5020
|
+
const scrollTop = e.currentTarget.scrollTop;
|
|
5021
|
+
for (let i = 0; i < refsArray.length; i++) {
|
|
5022
|
+
const curr = refsArray[i].current;
|
|
5023
|
+
if (curr) {
|
|
5024
|
+
const containerRect = scrollContainer.getBoundingClientRect();
|
|
5025
|
+
const targetRect = curr.getBoundingClientRect();
|
|
5026
|
+
const relativeTop = targetRect.top - containerRect.top + scrollContainer.scrollTop;
|
|
5027
|
+
if (relativeTop <= scrollTop)
|
|
5028
|
+
setSelectedTab(tabsArray[i]);
|
|
5029
|
+
}
|
|
5030
|
+
}
|
|
5031
|
+
};
|
|
5032
|
+
const handleTabChange = (tab) => {
|
|
5033
|
+
setSelectedTab(tab);
|
|
5034
|
+
scrollTo(tab);
|
|
5035
|
+
};
|
|
5025
5036
|
return (React.createElement(React.Fragment, null,
|
|
5026
5037
|
React.createElement(IconButton, { key: TITLE_TEXT, onClick: toggleOpen, tooltip: TITLE_TEXT },
|
|
5027
5038
|
React.createElement(GearIcon, { size: 18 })),
|
|
5028
5039
|
React.createElement(Drawer, { width: DRAWER_WIDTH, isOpen: isOpen, onClose: () => handleWithCancelWarning(toggleOpen), header: {
|
|
5029
5040
|
icons: [GearIcon],
|
|
5030
5041
|
title: TITLE_TEXT,
|
|
5042
|
+
tabs: [
|
|
5043
|
+
{
|
|
5044
|
+
label: SettingsTabs.General,
|
|
5045
|
+
onClick: () => handleTabChange(SettingsTabs.General),
|
|
5046
|
+
selected: selectedTab === SettingsTabs.General,
|
|
5047
|
+
},
|
|
5048
|
+
{
|
|
5049
|
+
label: SettingsTabs.Ui,
|
|
5050
|
+
onClick: () => handleTabChange(SettingsTabs.Ui),
|
|
5051
|
+
selected: selectedTab === SettingsTabs.Ui,
|
|
5052
|
+
},
|
|
5053
|
+
{
|
|
5054
|
+
label: SettingsTabs.Rollback,
|
|
5055
|
+
onClick: () => handleTabChange(SettingsTabs.Rollback),
|
|
5056
|
+
selected: selectedTab === SettingsTabs.Rollback,
|
|
5057
|
+
},
|
|
5058
|
+
{
|
|
5059
|
+
label: SettingsTabs.CollectorNode,
|
|
5060
|
+
onClick: () => handleTabChange(SettingsTabs.CollectorNode),
|
|
5061
|
+
selected: selectedTab === SettingsTabs.CollectorNode,
|
|
5062
|
+
},
|
|
5063
|
+
{
|
|
5064
|
+
label: SettingsTabs.CollectorGateway,
|
|
5065
|
+
onClick: () => handleTabChange(SettingsTabs.CollectorGateway),
|
|
5066
|
+
selected: selectedTab === SettingsTabs.CollectorGateway,
|
|
5067
|
+
},
|
|
5068
|
+
],
|
|
5031
5069
|
}, footer: {
|
|
5032
5070
|
isOpen: isFormDirty,
|
|
5033
5071
|
centerButtons: [
|
|
@@ -5040,22 +5078,17 @@ const SystemSettings = ({ fetchSettings, onSave }) => {
|
|
|
5040
5078
|
{
|
|
5041
5079
|
'data-id': 'drawer-save',
|
|
5042
5080
|
variant: 'primary',
|
|
5043
|
-
onClick:
|
|
5044
|
-
setIsSaving(true);
|
|
5045
|
-
await onSave(formData);
|
|
5046
|
-
setSettings(await fetchSettings());
|
|
5047
|
-
setIsSaving(false);
|
|
5048
|
-
toggleOpen();
|
|
5049
|
-
},
|
|
5081
|
+
onClick: handleSave,
|
|
5050
5082
|
children: BUTTON_TEXTS.SAVE,
|
|
5051
5083
|
},
|
|
5052
5084
|
],
|
|
5053
|
-
} }, formData?.imagePrefix !== undefined && !isSaving ? (React.createElement(DataContainer,
|
|
5054
|
-
React.createElement(
|
|
5055
|
-
React.createElement(
|
|
5056
|
-
React.createElement(
|
|
5057
|
-
React.createElement(
|
|
5058
|
-
React.createElement(
|
|
5085
|
+
} }, formData?.imagePrefix !== undefined && !isSaving ? (React.createElement(DataContainer, { ref: scrollContainerRef, onScroll: onScroll },
|
|
5086
|
+
installationMethod === InstallationMethod.Helm && React.createElement(NotificationNote, { type: StatusType.Warning, title: 'Helm', message: "Changes won't persist unless you update the `values.yaml` file" }),
|
|
5087
|
+
React.createElement(GeneralSettings, { ref: generalRef, formData: formData, handleFormChange: handleFormChange }),
|
|
5088
|
+
React.createElement(UiSettings, { ref: uiRef, formData: formData, handleFormChange: handleFormChange }),
|
|
5089
|
+
React.createElement(RollbackSettings, { ref: rollbackRef, formData: formData, handleFormChange: handleFormChange }),
|
|
5090
|
+
React.createElement(CollectorNodeSettings, { ref: collectorNodeRef, formData: formData, handleFormChange: handleFormChange }),
|
|
5091
|
+
React.createElement(CollectorGatewaySettings, { ref: collectorGatewayRef, formData: formData, handleFormChange: handleFormChange }))) : (React.createElement(CenterThis, null,
|
|
5059
5092
|
React.createElement(FadeLoader, { scale: 1.2 })))),
|
|
5060
5093
|
React.createElement(CancelWarning, { isOpen: cancelWarningOpen, name: TITLE_TEXT, onApprove: () => {
|
|
5061
5094
|
cancelApproveCallback?.();
|
|
@@ -17507,18 +17507,19 @@ const Title$5 = styled(Text) `
|
|
|
17507
17507
|
overflow: hidden;
|
|
17508
17508
|
white-space: nowrap;
|
|
17509
17509
|
text-overflow: ellipsis;
|
|
17510
|
+
color: ${({ $status, theme }) => ($status ? theme.text[$status] : theme.text.secondary)};
|
|
17510
17511
|
`;
|
|
17511
17512
|
const OptionalText = styled(Text) `
|
|
17512
17513
|
font-size: 12px;
|
|
17513
17514
|
color: ${({ theme }) => theme.text.darker_grey};
|
|
17514
17515
|
opacity: 0.8;
|
|
17515
17516
|
`;
|
|
17516
|
-
const FieldLabel = ({ title, required, tooltip, style }) => {
|
|
17517
|
+
const FieldLabel = ({ title, required, tooltip, style, status }) => {
|
|
17517
17518
|
if (!title)
|
|
17518
17519
|
return null;
|
|
17519
17520
|
return (React.createElement(Wrapper, { style: style },
|
|
17520
17521
|
React.createElement(Tooltip, { text: tooltip, withIcon: true },
|
|
17521
|
-
React.createElement(Title$5,
|
|
17522
|
+
React.createElement(Title$5, { "$status": status }, title),
|
|
17522
17523
|
!required && React.createElement(OptionalText, null, "(optional)"))));
|
|
17523
17524
|
};
|
|
17524
17525
|
|
|
@@ -17543,14 +17544,19 @@ const InputWrapper$2 = styled.div `
|
|
|
17543
17544
|
cursor: not-allowed;
|
|
17544
17545
|
opacity: 0.6;
|
|
17545
17546
|
`}
|
|
17546
|
-
${({ $hasError }) => $
|
|
17547
|
-
css `
|
|
17548
|
-
|
|
17549
|
-
|
|
17550
|
-
|
|
17551
|
-
|
|
17552
|
-
|
|
17553
|
-
|
|
17547
|
+
${({ $isActive, $hasError, $status }) => $isActive
|
|
17548
|
+
? css `
|
|
17549
|
+
border-color: ${({ theme }) => theme.colors.secondary};
|
|
17550
|
+
`
|
|
17551
|
+
: $hasError
|
|
17552
|
+
? css `
|
|
17553
|
+
border-color: ${({ theme }) => theme.text.error};
|
|
17554
|
+
`
|
|
17555
|
+
: $status
|
|
17556
|
+
? css `
|
|
17557
|
+
border-color: ${({ theme }) => theme.text[$status]};
|
|
17558
|
+
`
|
|
17559
|
+
: ''}
|
|
17554
17560
|
&:hover {
|
|
17555
17561
|
border-color: ${({ theme }) => theme.colors.secondary};
|
|
17556
17562
|
}
|
|
@@ -17612,7 +17618,7 @@ const Button$1 = styled.button `
|
|
|
17612
17618
|
cursor: not-allowed;
|
|
17613
17619
|
}
|
|
17614
17620
|
`;
|
|
17615
|
-
const Input = ({ icon: Icon, buttonLabel, onButtonClick, hasError, errorMessage, title, tooltip, required, value, onChange, type = InputTypes.Text, name, ...props }) => {
|
|
17621
|
+
const Input = ({ icon: Icon, buttonLabel, onButtonClick, hasError, errorMessage, title, tooltip, required, value, onChange, type = InputTypes.Text, name, status, ...props }) => {
|
|
17616
17622
|
const theme = Theme.useTheme();
|
|
17617
17623
|
const isSecret = type === InputTypes.Password;
|
|
17618
17624
|
const [revealSecret, setRevealSecret] = useState(false);
|
|
@@ -17628,8 +17634,8 @@ const Input = ({ icon: Icon, buttonLabel, onButtonClick, hasError, errorMessage,
|
|
|
17628
17634
|
e.stopPropagation();
|
|
17629
17635
|
};
|
|
17630
17636
|
return (React.createElement(Container$g, null,
|
|
17631
|
-
React.createElement(FieldLabel, { title: title, required: required, tooltip: tooltip }),
|
|
17632
|
-
React.createElement(InputWrapper$2, { "$disabled": props.disabled, "$hasError": hasError || !!errorMessage, "$isActive": !!props.autoFocus },
|
|
17637
|
+
React.createElement(FieldLabel, { title: title, required: required, tooltip: tooltip, status: status }),
|
|
17638
|
+
React.createElement(InputWrapper$2, { "$disabled": props.disabled, "$hasError": hasError || !!errorMessage, "$isActive": !!props.autoFocus, "$status": status },
|
|
17633
17639
|
isSecret ? (React.createElement(IconWrapperClickable, { onClick: () => setRevealSecret((prev) => !prev) }, revealSecret ? React.createElement(EyeClosedIcon, { size: 14, fill: theme.text.grey }) : React.createElement(EyeOpenIcon, { size: 14, fill: theme.text.grey }))) : Icon ? (React.createElement(IconWrapper$2, null,
|
|
17634
17640
|
React.createElement(Icon, { size: 14, fill: theme.text.grey }))) : null,
|
|
17635
17641
|
React.createElement(StyledInput, { "data-id": name, type: revealSecret ? InputTypes.Text : type === InputTypes.Number ? InputTypes.Text : type, "$hasIcon": !!Icon || isSecret, name: name, value: value, onChange: handleInputChange, onKeyDown: handleKeyDown, ...props }),
|
|
@@ -17695,10 +17701,15 @@ const DropdownHeader = styled.div `
|
|
|
17695
17701
|
background: transparent;
|
|
17696
17702
|
`};
|
|
17697
17703
|
|
|
17698
|
-
${({ $hasError }) => $hasError
|
|
17699
|
-
css `
|
|
17700
|
-
|
|
17701
|
-
|
|
17704
|
+
${({ $hasError, $status }) => $hasError
|
|
17705
|
+
? css `
|
|
17706
|
+
border-color: ${({ theme }) => theme.text.error};
|
|
17707
|
+
`
|
|
17708
|
+
: $status
|
|
17709
|
+
? css `
|
|
17710
|
+
border-color: ${({ theme }) => theme.text[$status]};
|
|
17711
|
+
`
|
|
17712
|
+
: ''}
|
|
17702
17713
|
|
|
17703
17714
|
&:hover {
|
|
17704
17715
|
border-color: ${({ $isMulti, $hasSelections, $disabled, theme }) => ($disabled ? 'auto' : $isMulti && $hasSelections ? theme.colors.border : theme.colors.secondary)};
|
|
@@ -17709,7 +17720,7 @@ const IconWrapper$1 = styled.div `
|
|
|
17709
17720
|
align-items: center;
|
|
17710
17721
|
gap: 4px;
|
|
17711
17722
|
`;
|
|
17712
|
-
const Dropdown = ({ options, value, onSelect, onDeselect, title, tooltip, placeholder, disabled = false, isMulti = false, showSearch = false, required = false, errorMessage, hasError = false, }) => {
|
|
17723
|
+
const Dropdown = ({ options, value, onSelect, onDeselect, title, tooltip, placeholder, disabled = false, isMulti = false, showSearch = false, required = false, errorMessage, hasError = false, status, }) => {
|
|
17713
17724
|
const [isOpen, setIsOpen] = useState(false);
|
|
17714
17725
|
const [openUpwards, setOpenUpwards] = useState(false);
|
|
17715
17726
|
const containerRef = useRef(null);
|
|
@@ -17727,9 +17738,9 @@ const Dropdown = ({ options, value, onSelect, onDeselect, title, tooltip, placeh
|
|
|
17727
17738
|
};
|
|
17728
17739
|
const arrLen = Array.isArray(value) ? value.length : 0;
|
|
17729
17740
|
return (React.createElement(RootContainer, { "$disabled": disabled },
|
|
17730
|
-
React.createElement(FieldLabel, { title: title, required: required, tooltip: tooltip }),
|
|
17741
|
+
React.createElement(FieldLabel, { title: title, required: required, tooltip: tooltip, status: status }),
|
|
17731
17742
|
React.createElement(RelativeContainer, { ref: containerRef },
|
|
17732
|
-
React.createElement(DropdownHeader, { "$isOpen": isOpen, "$isMulti": isMulti, "$hasSelections": Array.isArray(value) ? !!value.length : false, "$hasError": !!errorMessage || hasError, "$disabled": disabled, onClick: () => !disabled && toggleOpen() },
|
|
17743
|
+
React.createElement(DropdownHeader, { "$isOpen": isOpen, "$isMulti": isMulti, "$hasSelections": Array.isArray(value) ? !!value.length : false, "$hasError": !!errorMessage || hasError, "$status": status, "$disabled": disabled, onClick: () => !disabled && toggleOpen() },
|
|
17733
17744
|
React.createElement(DropdownPlaceholder, { value: value, placeholder: placeholder, onDeselect: onDeselect }),
|
|
17734
17745
|
React.createElement(IconWrapper$1, null,
|
|
17735
17746
|
isMulti && React.createElement(Badge, { label: arrLen, filled: !!arrLen }),
|
package/lib/snippets.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as Button, _ as Text, L as NotificationNote } from './index-
|
|
2
|
-
export { ai as AddButton, an as AddNode, ao as BaseNode, ak as CopyText, ap as EdgedNode, ag as Flow, aq as FrameNode, ar as HeaderNode, aw as LabeledEdge, as as MapItemNode, at as NoDataNode, al as PodContainer, au as ScrollNode, av as SkeletonNode, am as SourceContainer, ad as nodeConfig } from './index-
|
|
1
|
+
import { B as Button, _ as Text, L as NotificationNote } from './index-5772129e.js';
|
|
2
|
+
export { ai as AddButton, an as AddNode, ao as BaseNode, ak as CopyText, ap as EdgedNode, ag as Flow, aq as FrameNode, ar as HeaderNode, aw as LabeledEdge, as as MapItemNode, at as NoDataNode, al as PodContainer, au as ScrollNode, av as SkeletonNode, am as SourceContainer, ad as nodeConfig } from './index-5772129e.js';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { T as Theme, B as BUTTON_TEXTS, b as DISPLAY_TITLES } from './index-bd48e6e2.js';
|
|
5
5
|
import { E as EditIcon } from './index-391844c6.js';
|
|
@@ -34,6 +34,11 @@ export declare enum PlatformType {
|
|
|
34
34
|
K8s = "k8s",
|
|
35
35
|
Vm = "vm"
|
|
36
36
|
}
|
|
37
|
+
export declare enum InstallationMethod {
|
|
38
|
+
Cli = "odigos-cli",
|
|
39
|
+
Helm = "helm",
|
|
40
|
+
Operator = "odigos-operator"
|
|
41
|
+
}
|
|
37
42
|
export declare enum ProgrammingLanguages {
|
|
38
43
|
Go = "go",
|
|
39
44
|
JavaScript = "javascript",
|
|
@@ -1,23 +1,8 @@
|
|
|
1
1
|
import { ProgrammingLanguages } from '..';
|
|
2
|
-
export declare enum UiMode {
|
|
3
|
-
Default = "default",
|
|
4
|
-
ReadOnly = "readonly"
|
|
5
|
-
}
|
|
6
|
-
export declare enum Profile {
|
|
7
|
-
CodeAttributes = "code-attributes",
|
|
8
|
-
FullPayloadCollection = "full-payload-collection",
|
|
9
|
-
DbPayloadCollection = "db-payload-collection",
|
|
10
|
-
QueryOperationDetector = "query-operation-detector",
|
|
11
|
-
AllowConcurrentAgents = "allow_concurrent_agents",
|
|
12
|
-
JavaEbpfInstrumentations = "java-ebpf-instrumentations",
|
|
13
|
-
JavaNativeInstrumentations = "java-native-instrumentations",
|
|
14
|
-
SizeS = "size_s",
|
|
15
|
-
SizeM = "size_m",
|
|
16
|
-
SizeL = "size_l"
|
|
17
|
-
}
|
|
18
2
|
export declare enum MountMethod {
|
|
19
3
|
VirtualDevice = "VirtualDevice",
|
|
20
|
-
HostPath = "HostPath"
|
|
4
|
+
HostPath = "HostPath",
|
|
5
|
+
InitContainer = "InitContainer"
|
|
21
6
|
}
|
|
22
7
|
export declare enum AgentEnvVarsInjectionMethod {
|
|
23
8
|
Loader = "loader",
|
|
@@ -59,13 +44,8 @@ export interface OidcConfiguration {
|
|
|
59
44
|
clientSecret: string;
|
|
60
45
|
}
|
|
61
46
|
export interface OdigosConfig {
|
|
62
|
-
telemetryEnabled: boolean | null;
|
|
63
|
-
openshiftEnabled: boolean | null;
|
|
64
47
|
karpenterEnabled: boolean | null;
|
|
65
|
-
psp: boolean | null;
|
|
66
48
|
allowConcurrentAgents: boolean | null;
|
|
67
|
-
skipWebhookIssuerCreation: boolean | null;
|
|
68
|
-
uiMode: UiMode | null;
|
|
69
49
|
uiPaginationLimit: number | null;
|
|
70
50
|
centralBackendURL: string | null;
|
|
71
51
|
oidc: OidcConfiguration | null;
|
|
@@ -73,7 +53,6 @@ export interface OdigosConfig {
|
|
|
73
53
|
imagePrefix: string | null;
|
|
74
54
|
ignoredNamespaces: string[] | null;
|
|
75
55
|
ignoredContainers: string[] | null;
|
|
76
|
-
profiles: Profile[] | null;
|
|
77
56
|
mountMethod: MountMethod | null;
|
|
78
57
|
agentEnvVarsInjectionMethod: AgentEnvVarsInjectionMethod | null;
|
|
79
58
|
customContainerRuntimeSocketPath: string | null;
|
|
@@ -85,5 +64,4 @@ export interface OdigosConfig {
|
|
|
85
64
|
rollout: RolloutConfiguration | null;
|
|
86
65
|
collectorNode: CollectorNode | null;
|
|
87
66
|
collectorGateway: CollectorGateway | null;
|
|
88
|
-
userInstrumentationEnvs: UserInstrumentationEnvs | null;
|
|
89
67
|
}
|
package/lib/types.js
CHANGED
|
@@ -91,6 +91,12 @@ var PlatformType;
|
|
|
91
91
|
PlatformType["K8s"] = "k8s";
|
|
92
92
|
PlatformType["Vm"] = "vm";
|
|
93
93
|
})(PlatformType || (PlatformType = {}));
|
|
94
|
+
var InstallationMethod;
|
|
95
|
+
(function (InstallationMethod) {
|
|
96
|
+
InstallationMethod["Cli"] = "odigos-cli";
|
|
97
|
+
InstallationMethod["Helm"] = "helm";
|
|
98
|
+
InstallationMethod["Operator"] = "odigos-operator";
|
|
99
|
+
})(InstallationMethod || (InstallationMethod = {}));
|
|
94
100
|
var ProgrammingLanguages;
|
|
95
101
|
(function (ProgrammingLanguages) {
|
|
96
102
|
ProgrammingLanguages["Go"] = "go";
|
|
@@ -178,40 +184,11 @@ var SortDirection;
|
|
|
178
184
|
SortDirection["Descending"] = "desc";
|
|
179
185
|
})(SortDirection || (SortDirection = {}));
|
|
180
186
|
|
|
181
|
-
var UiMode;
|
|
182
|
-
(function (UiMode) {
|
|
183
|
-
UiMode["Default"] = "default";
|
|
184
|
-
UiMode["ReadOnly"] = "readonly";
|
|
185
|
-
})(UiMode || (UiMode = {}));
|
|
186
|
-
var Profile;
|
|
187
|
-
(function (Profile) {
|
|
188
|
-
// CategoryAttributes = 'category-attributes',
|
|
189
|
-
Profile["CodeAttributes"] = "code-attributes";
|
|
190
|
-
// CopyScope = 'copy-scope',
|
|
191
|
-
// HostnameAsPodname = 'hostname-as-podname',
|
|
192
|
-
Profile["FullPayloadCollection"] = "full-payload-collection";
|
|
193
|
-
Profile["DbPayloadCollection"] = "db-payload-collection";
|
|
194
|
-
Profile["QueryOperationDetector"] = "query-operation-detector";
|
|
195
|
-
// Semconv = 'semconv',
|
|
196
|
-
// ReduceSpanNameCardinality = 'reduce-span-name-cardinality',
|
|
197
|
-
Profile["AllowConcurrentAgents"] = "allow_concurrent_agents";
|
|
198
|
-
Profile["JavaEbpfInstrumentations"] = "java-ebpf-instrumentations";
|
|
199
|
-
Profile["JavaNativeInstrumentations"] = "java-native-instrumentations";
|
|
200
|
-
// LegacyDotnetInstrumentation = 'legacy-dotnet-instrumentation',
|
|
201
|
-
// MountMethodK8sHostPath = 'mount-method-k8s-host-path',
|
|
202
|
-
// MountMethodK8sVirtualDevice = 'mount-method-k8s-virtual-device',
|
|
203
|
-
// PodManifestEnvVarInjection = 'pod-manifest-env-var-injection',
|
|
204
|
-
// DisableGin = 'disable-gin',
|
|
205
|
-
// SmallBatches = 'small-batches',
|
|
206
|
-
Profile["SizeS"] = "size_s";
|
|
207
|
-
Profile["SizeM"] = "size_m";
|
|
208
|
-
Profile["SizeL"] = "size_l";
|
|
209
|
-
})(Profile || (Profile = {}));
|
|
210
187
|
var MountMethod;
|
|
211
188
|
(function (MountMethod) {
|
|
212
189
|
MountMethod["VirtualDevice"] = "VirtualDevice";
|
|
213
190
|
MountMethod["HostPath"] = "HostPath";
|
|
214
|
-
|
|
191
|
+
MountMethod["InitContainer"] = "InitContainer";
|
|
215
192
|
})(MountMethod || (MountMethod = {}));
|
|
216
193
|
var AgentEnvVarsInjectionMethod;
|
|
217
194
|
(function (AgentEnvVarsInjectionMethod) {
|
|
@@ -363,4 +340,4 @@ var K8sResourceKind;
|
|
|
363
340
|
K8sResourceKind["CronJob"] = "CronJob";
|
|
364
341
|
})(K8sResourceKind || (K8sResourceKind = {}));
|
|
365
342
|
|
|
366
|
-
export { ActionCategory, ActionKeyTypes, ActionType, AddNodeTypes, AgentEnvVarsInjectionMethod, BooleanOperation, CodeAttributesKeyTypes, Crud, CustomInstrumentationsKeyTypes, DestinationTypes, EdgeTypes, EntityTypes, FieldTypes, HeadersCollectionKeyTypes, InputTypes, InstrumentationRuleType, IntrumentationStatus, JsonOperation, K8sResourceKind, MountMethod, NodeTypes, NumberOperation, OtherEntityTypes, OtherStatus, PayloadCollectionKeyTypes, PlatformType,
|
|
343
|
+
export { ActionCategory, ActionKeyTypes, ActionType, AddNodeTypes, AgentEnvVarsInjectionMethod, BooleanOperation, CodeAttributesKeyTypes, Crud, CustomInstrumentationsKeyTypes, DestinationTypes, EdgeTypes, EntityTypes, FieldTypes, HeadersCollectionKeyTypes, InputTypes, InstallationMethod, InstrumentationRuleType, IntrumentationStatus, JsonOperation, K8sResourceKind, MountMethod, NodeTypes, NumberOperation, OtherEntityTypes, OtherStatus, PayloadCollectionKeyTypes, PlatformType, ProgrammingLanguages, SignalType, SortDirection, StatusType, StringOperation, Tier };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@odigos/ui-kit",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.68",
|
|
4
4
|
"author": "Odigos",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -105,22 +105,22 @@
|
|
|
105
105
|
"@rollup/plugin-json": "^6.1.0",
|
|
106
106
|
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
107
107
|
"@rollup/plugin-typescript": "^12.1.4",
|
|
108
|
-
"@storybook/addon-docs": "^9.0.
|
|
108
|
+
"@storybook/addon-docs": "^9.0.18",
|
|
109
109
|
"@storybook/addon-webpack5-compiler-babel": "^3.0.6",
|
|
110
|
-
"@storybook/react-webpack5": "9.0.
|
|
111
|
-
"@types/node": "^24.0
|
|
110
|
+
"@storybook/react-webpack5": "9.0.18",
|
|
111
|
+
"@types/node": "^24.1.0",
|
|
112
112
|
"@types/react": "^19.1.8",
|
|
113
113
|
"@types/react-dom": "^19.1.6",
|
|
114
114
|
"babel-loader": "^10.0.0",
|
|
115
115
|
"babel-plugin-styled-components": "^2.1.4",
|
|
116
116
|
"eslint": "^9.31.0",
|
|
117
|
-
"eslint-config-next": "^15.4.
|
|
118
|
-
"eslint-plugin-storybook": "9.0.
|
|
119
|
-
"next": "^15.4.
|
|
117
|
+
"eslint-config-next": "^15.4.3",
|
|
118
|
+
"eslint-plugin-storybook": "9.0.18",
|
|
119
|
+
"next": "^15.4.3",
|
|
120
120
|
"postcss": "^8.5.6",
|
|
121
121
|
"rollup": "^3.29.4",
|
|
122
122
|
"rollup-plugin-postcss": "^4.0.2",
|
|
123
|
-
"storybook": "9.0.
|
|
123
|
+
"storybook": "9.0.18",
|
|
124
124
|
"typescript": "^5.8.3"
|
|
125
125
|
}
|
|
126
126
|
}
|