@odigos/ui-kit 0.0.67 → 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 +12 -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/settings/types.d.ts +1 -2
- package/lib/containers.js +89 -84
- 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/package.json +8 -8
- package/lib/containers/system-settings/settings/advanced-settings.d.ts +0 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
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
|
+
|
|
3
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)
|
|
4
16
|
|
|
5
17
|
|
|
@@ -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';
|
|
@@ -4,8 +4,7 @@ export declare enum SettingsTabs {
|
|
|
4
4
|
Ui = "UI",
|
|
5
5
|
Rollback = "Rollback",
|
|
6
6
|
CollectorNode = "Collector Node",
|
|
7
|
-
CollectorGateway = "Collector Gateway"
|
|
8
|
-
Advanced = "Advanced"
|
|
7
|
+
CollectorGateway = "Collector Gateway"
|
|
9
8
|
}
|
|
10
9
|
export interface SettingsProps {
|
|
11
10
|
formData: OdigosConfig;
|
package/lib/containers.js
CHANGED
|
@@ -2,14 +2,14 @@ import React, { useState, useEffect, forwardRef, useRef, useImperativeHandle, us
|
|
|
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
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-
|
|
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';
|
|
@@ -4730,7 +4730,6 @@ var SettingsTabs;
|
|
|
4730
4730
|
SettingsTabs["Rollback"] = "Rollback";
|
|
4731
4731
|
SettingsTabs["CollectorNode"] = "Collector Node";
|
|
4732
4732
|
SettingsTabs["CollectorGateway"] = "Collector Gateway";
|
|
4733
|
-
SettingsTabs["Advanced"] = "Advanced";
|
|
4734
4733
|
})(SettingsTabs || (SettingsTabs = {}));
|
|
4735
4734
|
|
|
4736
4735
|
const Card = styled.div `
|
|
@@ -4753,11 +4752,19 @@ const RowOfFields = styled(FlexRow) `
|
|
|
4753
4752
|
width: 100%;
|
|
4754
4753
|
gap: 12px;
|
|
4755
4754
|
align-items: flex-start;
|
|
4755
|
+
justify-content: space-between;
|
|
4756
4756
|
`;
|
|
4757
4757
|
|
|
4758
4758
|
const UiSettings = forwardRef(({ formData, handleFormChange }, ref) => {
|
|
4759
|
+
const [isAdvanced, setIsAdvanced] = useState(false);
|
|
4759
4760
|
return (React.createElement(Card, { ref: ref, id: SettingsTabs.Ui },
|
|
4760
|
-
React.createElement(
|
|
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) => {
|
|
4765
|
+
const { value } = e.target;
|
|
4766
|
+
handleFormChange('uiPaginationLimit', value === '' ? null : Number(value));
|
|
4767
|
+
} })),
|
|
4761
4768
|
React.createElement(Input, { title: 'Central Backend URL', tooltip: 'URL of the central backend', required: true, value: formData.centralBackendURL || '', onChange: (e) => {
|
|
4762
4769
|
const { value } = e.target;
|
|
4763
4770
|
handleFormChange('centralBackendURL', value || null);
|
|
@@ -4777,9 +4784,34 @@ const UiSettings = forwardRef(({ formData, handleFormChange }, ref) => {
|
|
|
4777
4784
|
});
|
|
4778
4785
|
UiSettings.displayName = UiSettings.name;
|
|
4779
4786
|
|
|
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
|
+
|
|
4780
4798
|
const GeneralSettings = forwardRef(({ formData, handleFormChange }, ref) => {
|
|
4799
|
+
const [isAdvanced, setIsAdvanced] = useState(false);
|
|
4781
4800
|
return (React.createElement(Card, { ref: ref, id: SettingsTabs.General },
|
|
4782
|
-
React.createElement(
|
|
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
|
+
} }))),
|
|
4783
4815
|
React.createElement(Toggle, { title: 'Karpenter Enabled', tooltip: 'Enable Karpenter support', initialValue: formData.karpenterEnabled || false, onChange: (bool) => handleFormChange('karpenterEnabled', bool) }),
|
|
4784
4816
|
React.createElement(Toggle, { title: 'Allow Concurrent Agents', tooltip: 'Allow concurrent running agents', initialValue: formData.allowConcurrentAgents || false, onChange: (bool) => handleFormChange('allowConcurrentAgents', bool) }),
|
|
4785
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) }),
|
|
@@ -4814,74 +4846,34 @@ const RollbackSettings = forwardRef(({ formData, handleFormChange }, ref) => {
|
|
|
4814
4846
|
});
|
|
4815
4847
|
RollbackSettings.displayName = RollbackSettings.name;
|
|
4816
4848
|
|
|
4817
|
-
const
|
|
4818
|
-
|
|
4819
|
-
{
|
|
4820
|
-
{ id: MountMethod.InitContainer, value: 'Init Container' },
|
|
4821
|
-
];
|
|
4822
|
-
const AGENT_ENV_VARS_INJECTION_METHOD_OPTIONS = [
|
|
4823
|
-
{ id: AgentEnvVarsInjectionMethod.Loader, value: 'Loader' },
|
|
4824
|
-
{ id: AgentEnvVarsInjectionMethod.PodManifest, value: 'Pod Manifest' },
|
|
4825
|
-
{ id: AgentEnvVarsInjectionMethod.LoaderFallbackToPodManifest, value: 'Loader Fallback to Pod Manifest' },
|
|
4826
|
-
];
|
|
4827
|
-
|
|
4828
|
-
const AdvancedSettings = forwardRef(({ formData, handleFormChange }, ref) => {
|
|
4829
|
-
return (React.createElement(Card, { ref: ref, id: SettingsTabs.Advanced },
|
|
4830
|
-
React.createElement(CardTitle, null, "Advanced"),
|
|
4831
|
-
React.createElement(Input, { title: 'UI Pagination Limit', 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) => {
|
|
4832
|
-
const { value } = e.target;
|
|
4833
|
-
handleFormChange('uiPaginationLimit', value === '' ? null : Number(value));
|
|
4834
|
-
} }),
|
|
4835
|
-
React.createElement(Dropdown, { title: 'Mount Method', 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) }),
|
|
4836
|
-
React.createElement(Dropdown, { title: 'Agent Env Vars Injection Method', tooltip: 'How to inject env vars 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) }),
|
|
4837
|
-
React.createElement(Input, { title: 'Odiglet Health Probe Bind Port', tooltip: 'Port to bind the health probe', type: 'number', required: true, value: formData.odigletHealthProbeBindPort?.toString() || '', onChange: (e) => {
|
|
4838
|
-
const { value } = e.target;
|
|
4839
|
-
handleFormChange('odigletHealthProbeBindPort', value === '' ? null : Number(value));
|
|
4840
|
-
} }),
|
|
4841
|
-
React.createElement(Input, { title: 'Custom Container Runtime Socket Path', tooltip: 'Path to the custom container runtime socket', required: true, value: formData.customContainerRuntimeSocketPath || '', onChange: (e) => {
|
|
4842
|
-
const { value } = e.target;
|
|
4843
|
-
handleFormChange('customContainerRuntimeSocketPath', value || null);
|
|
4844
|
-
} }),
|
|
4845
|
-
React.createElement(Input, { 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) => {
|
|
4846
|
-
const { value } = e.target;
|
|
4847
|
-
handleFormChange('collectorNode.k8sNodeLogsDirectory', value || null);
|
|
4848
|
-
} }),
|
|
4849
|
-
React.createElement(Input, { 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) => {
|
|
4850
|
-
const { value } = e.target;
|
|
4851
|
-
handleFormChange('collectorNode.collectorOwnMetricsPort', value === '' ? null : Number(value));
|
|
4852
|
-
} }),
|
|
4849
|
+
const CollectorNodeSettings = forwardRef(({ formData, handleFormChange }, ref) => {
|
|
4850
|
+
const [isAdvanced, setIsAdvanced] = useState(false);
|
|
4851
|
+
return (React.createElement(Card, { ref: ref, id: SettingsTabs.CollectorNode },
|
|
4853
4852
|
React.createElement(RowOfFields, null,
|
|
4854
|
-
React.createElement(
|
|
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) => {
|
|
4855
4857
|
const { value } = e.target;
|
|
4856
|
-
handleFormChange('collectorNode.
|
|
4858
|
+
handleFormChange('collectorNode.k8sNodeLogsDirectory', value || null);
|
|
4857
4859
|
} }),
|
|
4858
|
-
React.createElement(Input, { title: 'Coll. Node
|
|
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) => {
|
|
4859
4861
|
const { value } = e.target;
|
|
4860
|
-
handleFormChange('collectorNode.
|
|
4861
|
-
} })),
|
|
4862
|
-
React.createElement(Input, { 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) => {
|
|
4863
|
-
const { value } = e.target;
|
|
4864
|
-
handleFormChange('collectorNode.goMemLimitMiB', value === '' ? null : Number(value));
|
|
4865
|
-
} }),
|
|
4866
|
-
React.createElement(RowOfFields, null,
|
|
4867
|
-
React.createElement(Input, { 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) => {
|
|
4868
|
-
const { value } = e.target;
|
|
4869
|
-
handleFormChange('collectorGateway.memoryLimiterLimitMiB', value === '' ? null : Number(value));
|
|
4862
|
+
handleFormChange('collectorNode.collectorOwnMetricsPort', value === '' ? null : Number(value));
|
|
4870
4863
|
} }),
|
|
4871
|
-
React.createElement(
|
|
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) => {
|
|
4872
4874
|
const { value } = e.target;
|
|
4873
|
-
handleFormChange('
|
|
4874
|
-
} })),
|
|
4875
|
-
React.createElement(Input, { 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) => {
|
|
4876
|
-
const { value } = e.target;
|
|
4877
|
-
handleFormChange('collectorGateway.goMemLimitMiB', value === '' ? null : Number(value));
|
|
4878
|
-
} })));
|
|
4879
|
-
});
|
|
4880
|
-
AdvancedSettings.displayName = AdvancedSettings.name;
|
|
4881
|
-
|
|
4882
|
-
const CollectorNodeSettings = forwardRef(({ formData, handleFormChange }, ref) => {
|
|
4883
|
-
return (React.createElement(Card, { ref: ref, id: SettingsTabs.CollectorNode },
|
|
4884
|
-
React.createElement(CardTitle, null, "Collector Node"),
|
|
4875
|
+
handleFormChange('collectorNode.goMemLimitMiB', value === '' ? null : Number(value));
|
|
4876
|
+
} }))),
|
|
4885
4877
|
React.createElement(RowOfFields, null,
|
|
4886
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) => {
|
|
4887
4879
|
const { value } = e.target;
|
|
@@ -4904,8 +4896,25 @@ const CollectorNodeSettings = forwardRef(({ formData, handleFormChange }, ref) =
|
|
|
4904
4896
|
CollectorNodeSettings.displayName = CollectorNodeSettings.name;
|
|
4905
4897
|
|
|
4906
4898
|
const CollectorGatewaySettings = forwardRef(({ formData, handleFormChange }, ref) => {
|
|
4899
|
+
const [isAdvanced, setIsAdvanced] = useState(false);
|
|
4907
4900
|
return (React.createElement(Card, { ref: ref, id: SettingsTabs.CollectorGateway },
|
|
4908
|
-
React.createElement(
|
|
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
|
+
} }))),
|
|
4909
4918
|
React.createElement(RowOfFields, null,
|
|
4910
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) => {
|
|
4911
4920
|
const { value } = e.target;
|
|
@@ -4946,15 +4955,18 @@ const DataContainer = styled.div `
|
|
|
4946
4955
|
const DRAWER_WIDTH = '750px';
|
|
4947
4956
|
const TITLE_TEXT = 'System Settings';
|
|
4948
4957
|
const SystemSettings = ({ installationMethod, fetchSettings, onSave }) => {
|
|
4958
|
+
const [isSaving, setIsSaving] = useState(false);
|
|
4949
4959
|
const [settings, setSettings] = useState(undefined);
|
|
4950
4960
|
const { formData, handleFormChange, resetFormData, isFormDirty } = useGenericForm(settings);
|
|
4951
|
-
useEffect(() => {
|
|
4952
|
-
fetchSettings().then(setSettings);
|
|
4953
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4954
|
-
}, []);
|
|
4955
|
-
const [isSaving, setIsSaving] = useState(false);
|
|
4956
4961
|
const [isOpen, setIsOpen] = useState(false);
|
|
4957
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]);
|
|
4958
4970
|
const [cancelWarningOpen, setCancelWarningOpen] = useState(false);
|
|
4959
4971
|
const [cancelApproveCallback, setCancelApproveCallback] = useState(null);
|
|
4960
4972
|
const handleWithCancelWarning = (callback) => {
|
|
@@ -4980,9 +4992,8 @@ const SystemSettings = ({ installationMethod, fetchSettings, onSave }) => {
|
|
|
4980
4992
|
const rollbackRef = useRef(null);
|
|
4981
4993
|
const collectorNodeRef = useRef(null);
|
|
4982
4994
|
const collectorGatewayRef = useRef(null);
|
|
4983
|
-
const
|
|
4984
|
-
const
|
|
4985
|
-
const tabsArray = [SettingsTabs.General, SettingsTabs.Ui, SettingsTabs.Rollback, SettingsTabs.CollectorNode, SettingsTabs.CollectorGateway, SettingsTabs.Advanced];
|
|
4995
|
+
const refsArray = [generalRef, uiRef, rollbackRef, collectorNodeRef, collectorGatewayRef];
|
|
4996
|
+
const tabsArray = [SettingsTabs.General, SettingsTabs.Ui, SettingsTabs.Rollback, SettingsTabs.CollectorNode, SettingsTabs.CollectorGateway];
|
|
4986
4997
|
const scrollTo = (id) => {
|
|
4987
4998
|
const scrollContainer = scrollContainerRef.current;
|
|
4988
4999
|
if (!scrollContainer)
|
|
@@ -4993,7 +5004,7 @@ const SystemSettings = ({ installationMethod, fetchSettings, onSave }) => {
|
|
|
4993
5004
|
if (curr && curr.id === id) {
|
|
4994
5005
|
const containerRect = scrollContainer.getBoundingClientRect();
|
|
4995
5006
|
const targetRect = curr.getBoundingClientRect();
|
|
4996
|
-
relativeTop = targetRect.top - containerRect.top + scrollContainer.scrollTop
|
|
5007
|
+
relativeTop = targetRect.top - containerRect.top + scrollContainer.scrollTop;
|
|
4997
5008
|
break;
|
|
4998
5009
|
}
|
|
4999
5010
|
}
|
|
@@ -5054,11 +5065,6 @@ const SystemSettings = ({ installationMethod, fetchSettings, onSave }) => {
|
|
|
5054
5065
|
onClick: () => handleTabChange(SettingsTabs.CollectorGateway),
|
|
5055
5066
|
selected: selectedTab === SettingsTabs.CollectorGateway,
|
|
5056
5067
|
},
|
|
5057
|
-
{
|
|
5058
|
-
label: SettingsTabs.Advanced,
|
|
5059
|
-
onClick: () => handleTabChange(SettingsTabs.Advanced),
|
|
5060
|
-
selected: selectedTab === SettingsTabs.Advanced,
|
|
5061
|
-
},
|
|
5062
5068
|
],
|
|
5063
5069
|
}, footer: {
|
|
5064
5070
|
isOpen: isFormDirty,
|
|
@@ -5082,8 +5088,7 @@ const SystemSettings = ({ installationMethod, fetchSettings, onSave }) => {
|
|
|
5082
5088
|
React.createElement(UiSettings, { ref: uiRef, formData: formData, handleFormChange: handleFormChange }),
|
|
5083
5089
|
React.createElement(RollbackSettings, { ref: rollbackRef, formData: formData, handleFormChange: handleFormChange }),
|
|
5084
5090
|
React.createElement(CollectorNodeSettings, { ref: collectorNodeRef, formData: formData, handleFormChange: handleFormChange }),
|
|
5085
|
-
React.createElement(CollectorGatewaySettings, { ref: collectorGatewayRef, formData: formData, handleFormChange: handleFormChange }),
|
|
5086
|
-
React.createElement(AdvancedSettings, { ref: advancedRef, formData: formData, handleFormChange: handleFormChange }))) : (React.createElement(CenterThis, null,
|
|
5091
|
+
React.createElement(CollectorGatewaySettings, { ref: collectorGatewayRef, formData: formData, handleFormChange: handleFormChange }))) : (React.createElement(CenterThis, null,
|
|
5087
5092
|
React.createElement(FadeLoader, { scale: 1.2 })))),
|
|
5088
5093
|
React.createElement(CancelWarning, { isOpen: cancelWarningOpen, name: TITLE_TEXT, onApprove: () => {
|
|
5089
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';
|
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
|
}
|