@odigos/ui-kit 0.0.136 → 0.0.138
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 +14 -0
- package/lib/chunks/ui-components-84317435.js +2163 -0
- package/lib/components/_v2/cards/section-card/index.d.ts +9 -2
- package/lib/components/_v2/drawer/index.d.ts +4 -2
- package/lib/components/_v2/drop-data/index.d.ts +18 -0
- package/lib/components/_v2/index.d.ts +4 -0
- package/lib/components/_v2/loader/index.d.ts +12 -0
- package/lib/components/_v2/search/index.d.ts +7 -0
- package/lib/components/_v2/table/index.d.ts +9 -20
- package/lib/components/_v2/table/styled.d.ts +26 -0
- package/lib/components/_v2/table/table-columns/index.d.ts +12 -0
- package/lib/components/_v2/table/table-rows/actions/index.d.ts +9 -0
- package/lib/components/_v2/table/table-rows/index.d.ts +11 -0
- package/lib/components/_v2/table/types.d.ts +24 -0
- package/lib/components/_v2/toggle/index.d.ts +21 -0
- package/lib/components/styled.d.ts +8 -3
- package/lib/components/v2.js +1 -1
- package/lib/components.js +1 -1
- package/lib/constants.js +1 -1
- package/lib/containers/_v2/central-connections/config-drawer/index.d.ts +18 -0
- package/lib/containers/_v2/central-connections/index.d.ts +11 -0
- package/lib/containers/_v2/index.d.ts +1 -0
- package/lib/containers/_v2/pipeline-collectors/general-info/index.d.ts +2 -1
- package/lib/containers/v2.js +53 -5
- package/lib/containers.js +1 -1
- package/lib/functions.js +1 -1
- package/lib/hooks.js +1 -1
- package/lib/icons/common/index.d.ts +1 -0
- package/lib/icons/common/settings-icon/index.d.ts +2 -0
- package/lib/icons.js +1 -1
- package/lib/mock-data/connections/index.d.ts +2 -0
- package/lib/mock-data/index.d.ts +1 -0
- package/lib/snippets.js +1 -1
- package/lib/store.js +1 -1
- package/lib/theme.js +1 -1
- package/lib/types/common/index.d.ts +3 -0
- package/lib/types/pipeline-collectors/index.d.ts +2 -0
- package/lib/types.js +1 -1
- package/lib/visuals.js +1 -1
- package/package.json +1 -1
- package/lib/chunks/ui-components-d05b354a.js +0 -2050
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { type ReactNode, type FC } from 'react';
|
|
2
2
|
import type { SVG } from '@/types';
|
|
3
3
|
import { type BadgeProps } from '../../badge';
|
|
4
|
+
import { type SearchProps } from '../../search';
|
|
4
5
|
import { type ButtonProps } from '../../button';
|
|
6
|
+
import { type DropDataProps } from '../../drop-data';
|
|
5
7
|
export declare enum SectionCardSize {
|
|
6
8
|
S = "small",
|
|
7
9
|
M = "medium"
|
|
8
10
|
}
|
|
9
11
|
export declare enum SectionCardActionType {
|
|
10
|
-
Button = "button"
|
|
12
|
+
Button = "button",
|
|
13
|
+
ButtonDropData = "button-drop-data"
|
|
11
14
|
}
|
|
12
15
|
export interface SectionCardProps {
|
|
13
16
|
size?: SectionCardSize;
|
|
@@ -15,10 +18,14 @@ export interface SectionCardProps {
|
|
|
15
18
|
title: string;
|
|
16
19
|
withCopyTitle?: boolean;
|
|
17
20
|
badge?: BadgeProps;
|
|
21
|
+
search?: SearchProps;
|
|
18
22
|
actions?: {
|
|
19
23
|
id: string;
|
|
20
24
|
type: SectionCardActionType;
|
|
21
|
-
|
|
25
|
+
buttonProps?: ButtonProps & {
|
|
26
|
+
onClick?: (id: string) => void;
|
|
27
|
+
};
|
|
28
|
+
dropDataItems?: DropDataProps['items'];
|
|
22
29
|
}[];
|
|
23
30
|
children?: ReactNode;
|
|
24
31
|
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type CSSProperties, type ReactNode, type FC } from 'react';
|
|
2
2
|
import { HeaderProps } from './header';
|
|
3
3
|
export interface DrawerProps {
|
|
4
4
|
isOpen: boolean;
|
|
5
|
+
hideOverlay?: boolean;
|
|
5
6
|
position?: 'left' | 'right';
|
|
7
|
+
width?: CSSProperties['width'];
|
|
6
8
|
header: HeaderProps;
|
|
7
|
-
children:
|
|
9
|
+
children: ReactNode;
|
|
8
10
|
}
|
|
9
11
|
export declare const Drawer: FC<DrawerProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type FC } from 'react';
|
|
2
|
+
import type { SVG } from '@/types';
|
|
3
|
+
import { type ButtonProps } from '../button';
|
|
4
|
+
interface DropDataOption {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
icon?: SVG;
|
|
8
|
+
withCheckbox?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface DropDataProps {
|
|
11
|
+
items: DropDataOption[];
|
|
12
|
+
selectedId: DropDataOption['id'];
|
|
13
|
+
onSelect: (optionId: DropDataOption['id']) => void;
|
|
14
|
+
defaultOpen?: boolean;
|
|
15
|
+
buttonProps?: ButtonProps;
|
|
16
|
+
}
|
|
17
|
+
export declare const DropData: FC<DropDataProps>;
|
|
18
|
+
export {};
|
|
@@ -7,15 +7,19 @@ export * from './checkbox';
|
|
|
7
7
|
export * from './checkbox-list';
|
|
8
8
|
export * from './cli-command';
|
|
9
9
|
export * from './drawer';
|
|
10
|
+
export * from './drop-data';
|
|
10
11
|
export * from './header';
|
|
11
12
|
export * from './icon-button';
|
|
12
13
|
export * from './input';
|
|
14
|
+
export * from './loader';
|
|
13
15
|
export * from './modal';
|
|
14
16
|
export * from './navbar';
|
|
15
17
|
export * from './note';
|
|
16
18
|
export * from './radio';
|
|
17
19
|
export * from './radio-group';
|
|
20
|
+
export * from './search';
|
|
18
21
|
export * from './segment';
|
|
19
22
|
export * from './table';
|
|
20
23
|
export * from './tag';
|
|
24
|
+
export * from './toggle';
|
|
21
25
|
export * from './typography';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type FC } from 'react';
|
|
2
|
+
import type { SVG } from '@/types';
|
|
3
|
+
import { type TypographyProps } from '../typography';
|
|
4
|
+
export interface LoaderProps {
|
|
5
|
+
label?: string;
|
|
6
|
+
icon?: SVG;
|
|
7
|
+
withGradient?: boolean;
|
|
8
|
+
textColor?: string;
|
|
9
|
+
stripColor?: string;
|
|
10
|
+
typographyProps?: Omit<TypographyProps, 'children'>;
|
|
11
|
+
}
|
|
12
|
+
export declare const Loader: FC<LoaderProps>;
|
|
@@ -1,25 +1,14 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
sortable?: boolean;
|
|
6
|
-
minWidth?: CSSProperties['minWidth'];
|
|
7
|
-
textAlign?: CSSProperties['textAlign'];
|
|
8
|
-
}
|
|
9
|
-
interface RowCell {
|
|
10
|
-
key: string;
|
|
11
|
-
rawValue: string | number | boolean;
|
|
12
|
-
component?: FC;
|
|
13
|
-
}
|
|
14
|
-
interface Row {
|
|
15
|
-
onClick?: () => void;
|
|
16
|
-
cells: RowCell[];
|
|
17
|
-
}
|
|
1
|
+
import { type FC } from 'react';
|
|
2
|
+
import { CSSProperties } from 'styled-components';
|
|
3
|
+
import type { TableColumn, TableRow, TableRowAction } from './types';
|
|
4
|
+
export * from './types';
|
|
18
5
|
export interface TableProps {
|
|
19
6
|
maxHeight?: CSSProperties['maxHeight'];
|
|
20
7
|
isLoading?: boolean;
|
|
21
|
-
columns:
|
|
22
|
-
rows:
|
|
8
|
+
columns: TableColumn[];
|
|
9
|
+
rows: TableRow[];
|
|
10
|
+
rowActions?: TableRowAction[];
|
|
11
|
+
rowActionsPushRightPosition?: CSSProperties['width'];
|
|
12
|
+
withCheckboxes?: boolean;
|
|
23
13
|
}
|
|
24
14
|
export declare const Table: FC<TableProps>;
|
|
25
|
-
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { CSSProperties } from 'react';
|
|
2
|
+
import type { TableColumn } from './types';
|
|
3
|
+
export declare const Container: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
4
|
+
$maxHeight: CSSProperties["maxHeight"];
|
|
5
|
+
}>> & string;
|
|
6
|
+
export declare const TableRoot: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, never>> & string;
|
|
7
|
+
export declare const THead: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, never>> & string;
|
|
8
|
+
export declare const Th: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, {
|
|
9
|
+
$minWidth?: TableColumn["minWidth"];
|
|
10
|
+
$isFirst: boolean;
|
|
11
|
+
$isLast: boolean;
|
|
12
|
+
}>> & string;
|
|
13
|
+
export declare const ThBorder: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
14
|
+
export declare const TBody: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, never>> & string;
|
|
15
|
+
export declare const Td: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, {
|
|
16
|
+
$withClick: boolean;
|
|
17
|
+
$hovered: boolean;
|
|
18
|
+
$selected: boolean;
|
|
19
|
+
$isLastRow: boolean;
|
|
20
|
+
$isFirstCell: boolean;
|
|
21
|
+
$isLastCell: boolean;
|
|
22
|
+
}>> & string;
|
|
23
|
+
export declare const Sortable: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
24
|
+
$textAlign?: TableColumn["textAlign"];
|
|
25
|
+
$withClick: boolean;
|
|
26
|
+
}>> & string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type FC } from 'react';
|
|
2
|
+
import { SortDirection } from '@/types';
|
|
3
|
+
import type { TableColumn } from '../types';
|
|
4
|
+
interface TableColumnsProps {
|
|
5
|
+
columns: TableColumn[];
|
|
6
|
+
sortDirection: SortDirection;
|
|
7
|
+
sortByKey: string;
|
|
8
|
+
onSort: (key: string) => void;
|
|
9
|
+
withCheckboxes?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const TableColumns: FC<TableColumnsProps>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type CSSProperties, type FC } from 'react';
|
|
2
|
+
import type { TableRow, TableRowAction } from '../../types';
|
|
3
|
+
interface ActionsProps {
|
|
4
|
+
rowActions: TableRowAction[];
|
|
5
|
+
rowActionsPushRightPosition?: CSSProperties['width'];
|
|
6
|
+
row: TableRow;
|
|
7
|
+
}
|
|
8
|
+
export declare const Actions: FC<ActionsProps>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type FC, type CSSProperties } from 'react';
|
|
2
|
+
import type { TableColumn, TableRow, TableRowAction } from '../types';
|
|
3
|
+
interface TableRowsProps {
|
|
4
|
+
columns: TableColumn[];
|
|
5
|
+
rows: TableRow[];
|
|
6
|
+
rowActions: TableRowAction[];
|
|
7
|
+
rowActionsPushRightPosition?: CSSProperties['width'];
|
|
8
|
+
withCheckboxes?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const TableRows: FC<TableRowsProps>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type CSSProperties, type FC } from 'react';
|
|
2
|
+
import { type ButtonProps } from '../button';
|
|
3
|
+
export interface TableColumn {
|
|
4
|
+
key: string;
|
|
5
|
+
label: string;
|
|
6
|
+
sortable?: boolean;
|
|
7
|
+
minWidth?: CSSProperties['minWidth'];
|
|
8
|
+
textAlign?: CSSProperties['textAlign'];
|
|
9
|
+
}
|
|
10
|
+
export interface TableRow {
|
|
11
|
+
onClick?: () => void;
|
|
12
|
+
isSelected?: boolean;
|
|
13
|
+
onSelect?: () => void;
|
|
14
|
+
onDeselect?: () => void;
|
|
15
|
+
cells: {
|
|
16
|
+
key: string;
|
|
17
|
+
rawValue: string | number | boolean;
|
|
18
|
+
component?: FC;
|
|
19
|
+
}[];
|
|
20
|
+
}
|
|
21
|
+
export interface TableRowAction extends Pick<ButtonProps, 'label' | 'leftIcon' | 'rightIcon' | 'variant' | 'size' | 'loading' | 'disabled'> {
|
|
22
|
+
id: string;
|
|
23
|
+
onClick: (row: TableRow) => void;
|
|
24
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type FC } from 'react';
|
|
2
|
+
import type { SVG } from '@/types';
|
|
3
|
+
export declare enum ToggleVariant {
|
|
4
|
+
Default = "default",
|
|
5
|
+
SuccessError = "successError"
|
|
6
|
+
}
|
|
7
|
+
export declare enum ToggleSize {
|
|
8
|
+
S = "small",
|
|
9
|
+
L = "large"
|
|
10
|
+
}
|
|
11
|
+
export interface ToggleProps {
|
|
12
|
+
variant?: ToggleVariant;
|
|
13
|
+
size?: ToggleSize;
|
|
14
|
+
value: boolean;
|
|
15
|
+
onChange: (value: boolean) => void;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
withIcon?: boolean;
|
|
18
|
+
onIcon?: SVG;
|
|
19
|
+
offIcon?: SVG;
|
|
20
|
+
}
|
|
21
|
+
export declare const Toggle: FC<ToggleProps>;
|
|
@@ -5,18 +5,21 @@ export declare const FlexRow: import("styled-components/dist/types").IStyledComp
|
|
|
5
5
|
$alignItems?: CSSProperties["alignItems"];
|
|
6
6
|
$justifyContent?: CSSProperties["justifyContent"];
|
|
7
7
|
$wrap?: CSSProperties["flexWrap"];
|
|
8
|
+
$padding?: CSSProperties["padding"];
|
|
8
9
|
}>> & string;
|
|
9
10
|
export declare const FlexColumn: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
10
11
|
$gap?: number;
|
|
11
12
|
$alignItems?: CSSProperties["alignItems"];
|
|
12
13
|
$justifyContent?: CSSProperties["justifyContent"];
|
|
13
14
|
$wrap?: CSSProperties["flexWrap"];
|
|
15
|
+
$padding?: CSSProperties["padding"];
|
|
14
16
|
}>> & string;
|
|
15
|
-
export declare const CenterThis: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$gap" | "$alignItems" | "$justifyContent" | "$wrap"> & {
|
|
17
|
+
export declare const CenterThis: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$padding" | "$gap" | "$alignItems" | "$justifyContent" | "$wrap"> & {
|
|
16
18
|
$gap?: number;
|
|
17
19
|
$alignItems?: CSSProperties["alignItems"];
|
|
18
20
|
$justifyContent?: CSSProperties["justifyContent"];
|
|
19
21
|
$wrap?: CSSProperties["flexWrap"];
|
|
22
|
+
$padding?: CSSProperties["padding"];
|
|
20
23
|
}, {
|
|
21
24
|
$width?: CSSProperties["width"];
|
|
22
25
|
$height?: CSSProperties["height"];
|
|
@@ -27,19 +30,21 @@ export declare const ModalBody: import("styled-components/dist/types").IStyledCo
|
|
|
27
30
|
$isNotModal?: boolean;
|
|
28
31
|
$minHeight?: CSSProperties["minHeight"];
|
|
29
32
|
}>> & string;
|
|
30
|
-
export declare const TableContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$gap" | "$alignItems" | "$justifyContent" | "$wrap"> & {
|
|
33
|
+
export declare const TableContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$padding" | "$gap" | "$alignItems" | "$justifyContent" | "$wrap"> & {
|
|
31
34
|
$gap?: number;
|
|
32
35
|
$alignItems?: CSSProperties["alignItems"];
|
|
33
36
|
$justifyContent?: CSSProperties["justifyContent"];
|
|
34
37
|
$wrap?: CSSProperties["flexWrap"];
|
|
38
|
+
$padding?: CSSProperties["padding"];
|
|
35
39
|
}, {
|
|
36
40
|
$maxWidth: CSSProperties["maxWidth"];
|
|
37
41
|
}>> & string;
|
|
38
|
-
export declare const TableTitleWrap: 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"> & {
|
|
42
|
+
export declare const TableTitleWrap: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$padding" | "$gap" | "$alignItems" | "$justifyContent" | "$wrap"> & {
|
|
39
43
|
$gap?: number;
|
|
40
44
|
$alignItems?: CSSProperties["alignItems"];
|
|
41
45
|
$justifyContent?: CSSProperties["justifyContent"];
|
|
42
46
|
$wrap?: CSSProperties["flexWrap"];
|
|
47
|
+
$padding?: CSSProperties["padding"];
|
|
43
48
|
}, never>> & string;
|
|
44
49
|
export declare const TableWrap: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
45
50
|
$maxHeight: CSSProperties["maxHeight"];
|
package/lib/components/v2.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{B as Badge,g as Button,m as ButtonSize,d4 as ButtonTab,d5 as ButtonTabList,h as ButtonVariants,C as Checkbox,d9 as CheckboxList,d8 as CheckboxListDirection,d7 as CheckboxSize,v as CliCommand,t as DataCard,D as Drawer,da as DropData,db as Header,I as IconButton,c7 as IconButtonSize,dc as Input,L as Loader,dd as Modal,de as Navbar,df as Note,dh as Radio,dj as RadioGroup,di as RadioGroupDirection,dg as RadioSize,S as Search,j as SectionCard,l as SectionCardActionType,d6 as SectionCardSize,y as Segment,z as StatusCard,n as Table,dk as Tag,A as TextCard,d as Toggle,e as ToggleSize,dl as ToggleVariant,b as Typography,c as TypographySize,dm as TypographyVariants}from"../chunks/ui-components-84317435.js";import"../icons.js";import"react";import"zustand";import"javascript-time-ago";import"../chunks/vendor-55cc654c.js";import"react-dom";import"styled-components";import"@xyflow/react";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";
|
package/lib/components.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{at as AutocompleteInput,aM as Badge,aP as Button,ae as CancelWarning,r as CenterThis,M as Checkbox,w as Code,ak as ConditionDetails,al as DataCard,G as DataCardFieldTypes,bA as DataCardFields,cU as DataFinger,aS as DataTab,ad as DeleteWarning,bX as DescribeRow,au as Divider,a4 as DocsButton,ac as Drawer,cW as DrawerFooter,cV as DrawerHeader,bd as Dropdown,cX as ErrorBoundary,bm as ExtendArrow,s as FadeLoader,Q as FieldError,J as FieldLabel,F as FlexColumn,a as FlexRow,cY as Header,bl as IconButton,c4 as IconGroup,aH as IconTitleBadge,aC as IconWrapped,bT as IconsNav,cZ as ImageControlled,U as Input,$ as InputList,Y as InputTable,aK as InteractiveTable,_ as KeyValueInputsList,aO as LoadingText,ao as Modal,aq as ModalBody,a5 as MonitorsCheckboxes,aE as MonitorsIcons,ap as NavigationButtons,N as NoDataFound,ar as NotificationNote,d3 as Overlay,P as PageContent,b8 as Popup,c8 as PopupForm,cd as ScrollX,aW as ScrollY,a3 as SectionTitle,a2 as Segment,b9 as SelectionButton,a_ as SkeletonLoader,aw as Status,bz as Stepper,c_ as TabList,aF as TableContainer,aG as TableTitleWrap,aJ as TableWrap,bJ as Tag,a1 as Text,a6 as TextArea,Z as Toggle,cb as ToggleCodeComponent,f as Tooltip,aL as TraceLoader,ba as VerticalScroll,d2 as WarningModal,c$ as getLinksFromText,d0 as getStrongsFromText,d1 as renderText}from"./chunks/ui-components-84317435.js";import"./icons.js";import"react";import"zustand";import"javascript-time-ago";import"./chunks/vendor-55cc654c.js";import"react-dom";import"styled-components";import"@xyflow/react";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";
|
package/lib/constants.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{ai as ACTION_OPTIONS,ab as BUTTON_TEXTS,bk as DEFAULT_DATA_STREAM_NAME,bx as DESTINATION_CATEGORIES,be as DISPLAY_LANGUAGES,E as DISPLAY_TITLES,as as FORM_ALERTS,bM as INSTRUMENTATION_RULE_OPTIONS,cN as LANGUAGE_OPTIONS,bf as MONITORS_OPTIONS,bg as STORAGE_KEYS,cO as TOKEN_ABOUT_TO_EXPIRE}from"./chunks/ui-components-84317435.js";import"./icons.js";import"react";import"zustand";import"javascript-time-ago";import"./chunks/vendor-55cc654c.js";import"react-dom";import"styled-components";import"@xyflow/react";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type FC, type Dispatch, type SetStateAction } from 'react';
|
|
2
|
+
import { type Connection } from '@/types';
|
|
3
|
+
import { DrawerProps } from '@/components/_v2';
|
|
4
|
+
interface ConnectionConfigurationsFormData {
|
|
5
|
+
automaticRollout: boolean;
|
|
6
|
+
}
|
|
7
|
+
export type ApplyConfigurationsFunc = (connectionIds: string[], formData: ConnectionConfigurationsFormData) => Promise<void>;
|
|
8
|
+
export interface ConfigDrawerProps {
|
|
9
|
+
isOpen: boolean;
|
|
10
|
+
onClose: DrawerProps['header']['onClose'];
|
|
11
|
+
connections: Connection[];
|
|
12
|
+
selectedConnectionIds: string[];
|
|
13
|
+
setSelectedConnectionIds: Dispatch<SetStateAction<string[]>>;
|
|
14
|
+
onApply: ApplyConfigurationsFunc;
|
|
15
|
+
}
|
|
16
|
+
export declare const CONFIG_DRAWER_WIDTH = "75vw";
|
|
17
|
+
export declare const ConfigDrawer: FC<ConfigDrawerProps>;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type FC } from 'react';
|
|
2
|
+
import { CSSProperties } from 'styled-components';
|
|
3
|
+
import { type Connection } from '@/types';
|
|
4
|
+
import { type ApplyConfigurationsFunc } from './config-drawer';
|
|
5
|
+
export interface CentralConnectionsProps {
|
|
6
|
+
tableRowsMaxHeight: CSSProperties['maxHeight'];
|
|
7
|
+
getConnections: () => Promise<Connection[]>;
|
|
8
|
+
deleteConnection: (id: string) => Promise<void>;
|
|
9
|
+
applyConfigurations: ApplyConfigurationsFunc;
|
|
10
|
+
}
|
|
11
|
+
export declare const CentralConnections: FC<CentralConnectionsProps>;
|
|
@@ -3,6 +3,7 @@ import { type SectionCardProps, type StatusCardProps, type TextCardProps } from
|
|
|
3
3
|
export interface GeneralInfoProps extends SectionCardProps {
|
|
4
4
|
statusCard: StatusCardProps;
|
|
5
5
|
textCards: TextCardProps[];
|
|
6
|
-
|
|
6
|
+
manifestYaml: string;
|
|
7
|
+
configMapYaml: string;
|
|
7
8
|
}
|
|
8
9
|
export declare const GeneralInfo: FC<GeneralInfoProps>;
|
package/lib/containers/v2.js
CHANGED
|
@@ -1,4 +1,52 @@
|
|
|
1
|
-
import e,{useState as
|
|
1
|
+
import e,{useState as t,useMemo as a,useCallback as l,useEffect as o}from"react";import i,{useTheme as n}from"styled-components";import{F as s,u as r,D as c,S as d,a as u,b as p,c as g,B as b,O as m,C as y,d as h,e as C,f as k,L as f,g as w,h as x,i as v,P as $,j as L,k as P,l as I,m as R,n as A,o as S,T as z,p as M,q as D,r as V,s as N,t as O,I as T,v as j,w as Y,x as F,y as H,N as U,z as E,A as q,W as G}from"../chunks/ui-components-84317435.js";import{ConnectionsIcon as W,OdigosLogo as B,RefreshIcon as K,SettingsIcon as J,DeleteIcon as Q,VIcon as X,XIcon as Z,PodIcon as _,ChevronUpIcon as ee,ChevronDownIcon as te,TerminalIcon as ae,YamlIcon as le,CopyIcon as oe,VSquareIcon as ie,XSquareIcon as ne,PipelineCollectorIcon as se,DownloadIcon as re,GatewayIcon as ce}from"../icons.js";import"zustand";import"javascript-time-ago";import"../chunks/vendor-55cc654c.js";import"react-dom";import"@xyflow/react";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";const de="75vw",ue=i.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
border-radius: 16px;
|
|
5
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[1e3]};
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
`,pe=i.div`
|
|
8
|
+
display: flex;
|
|
9
|
+
gap: 12px;
|
|
10
|
+
padding: 16px;
|
|
11
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[900]};
|
|
12
|
+
position: sticky;
|
|
13
|
+
top: 0;
|
|
14
|
+
`,ge=i.div`
|
|
15
|
+
display: flex;
|
|
16
|
+
gap: 12px;
|
|
17
|
+
padding: 16px;
|
|
18
|
+
`,be=i(s)`
|
|
19
|
+
width: ${({$width:e})=>e};
|
|
20
|
+
gap: 12px;
|
|
21
|
+
justify-content: space-between;
|
|
22
|
+
`,me=i.div`
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
padding: 12px;
|
|
26
|
+
width: calc(100% - 24px);
|
|
27
|
+
height: calc(100vh - ${({$isFooterOpen:e})=>e?"300px":"240px"});
|
|
28
|
+
border-radius: ${({$borderRadius:e})=>e};
|
|
29
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[900]};
|
|
30
|
+
overflow-y: auto;
|
|
31
|
+
overflow-x: hidden;
|
|
32
|
+
`,ye=i.div`
|
|
33
|
+
display: flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
gap: 12px;
|
|
36
|
+
padding: 8px 16px;
|
|
37
|
+
border-radius: 12px;
|
|
38
|
+
background-color: transparent;
|
|
39
|
+
cursor: pointer;
|
|
40
|
+
&:hover {
|
|
41
|
+
background-color: ${({theme:e})=>e.v2.colors.silver[800]};
|
|
42
|
+
}
|
|
43
|
+
`,he=i.div`
|
|
44
|
+
display: flex;
|
|
45
|
+
align-items: center;
|
|
46
|
+
justify-content: flex-end;
|
|
47
|
+
gap: 16px;
|
|
48
|
+
padding: 0 24px;
|
|
49
|
+
`,Ce=({isOpen:l,onClose:o,connections:i,selectedConnectionIds:s,setSelectedConnectionIds:v,onApply:$})=>{const L=n(),[P,I]=t(""),R=a(()=>i.filter(e=>!P||e.name.toLowerCase().includes(P.toLowerCase())),[i,P]),A=s.length>0,S=e=>{v(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},[z,M]=t(!1),{formData:D,handleFormChange:V,resetFormData:N}=r({automaticRollout:!0});return e.createElement(c,{isOpen:l,hideOverlay:!0,width:de,header:{icon:W,title:"Cluster Configuration",onClose:o}},e.createElement(ue,null,e.createElement(pe,null,e.createElement(d,{value:P,onChange:I})),e.createElement(ge,null,e.createElement(be,{$width:"40%"},e.createElement(u,{$padding:"0 12px",$justifyContent:"space-between"},e.createElement(u,{$gap:8},e.createElement(p,{size:g.XS},"Clusters"),e.createElement(b,{label:i.length,status:m.Unknown})),e.createElement(u,{$gap:8},e.createElement(p,{size:g.XXXS,color:L.v2.colors.silver[200]},"Selected"),e.createElement(b,{label:`${s.length}/${i.length}`,status:m.Unknown}))),e.createElement(me,{$isFooterOpen:A,$borderRadius:"16px 0 0 16px"},R.map(t=>e.createElement(ye,{key:t.id,onClick:()=>S(t.id)},e.createElement(y,{value:s.includes(t.id),onChange:()=>S(t.id)}),e.createElement(p,{size:g.XS},t.name))))),e.createElement(be,{$width:"60%"},e.createElement(u,{$padding:"2px 12px"},e.createElement(p,{size:g.XS},"Configurations")),e.createElement(me,{$isFooterOpen:A,$borderRadius:"0 16px 16px 0"},e.createElement(u,{$gap:12},e.createElement(p,{size:g.XS},"Automatic Rollout"),e.createElement(h,{size:C.S,value:D.automaticRollout,onChange:e=>V("automaticRollout",e)}),e.createElement(k,{text:"Automatic Rollout",withIcon:!0})))))),A&&e.createElement(he,null,z&&e.createElement(f,{label:"Applying configurations...",icon:B,withGradient:!0,typographyProps:{size:g.XXS}}),e.createElement("div",{style:{width:"150px"}},e.createElement(w,{variant:x.Secondary,label:"Cancel",fullWidth:!0,onClick:()=>{N(),v([])}})),e.createElement("div",{style:{width:"150px"}},e.createElement(w,{variant:x.Primary,label:"Apply",fullWidth:!0,onClick:async()=>{M(!0),await $(s,D),M(!1),o()}}))))};var ke;!function(e){e.Id="id",e.Name="name",e.Type="type",e.Status="status",e.OdigosVersion="odigosVersion",e.ConnectedSince="connectedSince",e.LastActivity="lastActivity"}(ke||(ke={}));const fe=[{key:ke.Name,label:"Name",sortable:!0},{key:ke.Type,label:"Type",sortable:!0,textAlign:"right"},{key:ke.Status,label:"Status",sortable:!0},{key:ke.OdigosVersion,label:"Odigos Version",sortable:!0},{key:ke.ConnectedSince,label:"Connected Since",sortable:!0},{key:ke.LastActivity,label:"Last Activity",sortable:!0}],we=({tableRowsMaxHeight:i,getConnections:n,deleteConnection:s,applyConfigurations:r})=>{const{formatTimeAgo:c}=v(),[d,u]=t(!1),[p,g]=t([]),[y,h]=t(""),C=l(async()=>{u(!0);try{g(await n()??[])}catch(e){}u(!1)},[]);o(()=>{C()},[C]);const[k,f]=t([]),[w,z]=t(!1),M=a(()=>p.map(t=>({onClick:()=>alert(`todo: ${t.id}`),isSelected:k.includes(t.id),onSelect:()=>f(e=>[...e,t.id]),onDeselect:()=>f(e=>e.filter(e=>e!==t.id)),cells:[{key:ke.Id,rawValue:t.id},{key:ke.Name,rawValue:t.name},{key:ke.Type,rawValue:t.type},{key:ke.Status,rawValue:t.status,component:()=>(t=>{const a=t===S.Success?"Connection live":"Connection lost",l=t===S.Success?X:Z;return e.createElement(b,{status:t,label:a,leftIcon:l})})(t.status)},{key:ke.OdigosVersion,rawValue:t.odigosVersion},{key:ke.ConnectedSince,rawValue:t.connectedAt?c(t.connectedAt):"-"},{key:ke.LastActivity,rawValue:t.lastSeenAt?c(t.lastSeenAt):"-"}]})),[p,k]);return e.createElement($,null,e.createElement(L,{icon:W,title:"Connections",badge:{label:p.length.toString(),status:m.Unknown},search:{placeholder:"Search by cluster name",value:y,onChange:e=>h(e)},actions:[{id:P(),type:I.Button,buttonProps:{variant:x.Secondary,size:R.S,label:"",leftIcon:K,onClick:()=>C(),disabled:d}},{id:P(),type:I.Button,buttonProps:{variant:x.Primary,size:R.S,label:"Configurations",rightIcon:J,onClick:()=>z(!0)}}]},e.createElement(A,{maxHeight:i,isLoading:d,withCheckboxes:!0,columns:fe,rows:M,rowActionsPushRightPosition:w?`calc(${de} - 24px)`:void 0,rowActions:[{id:P(),label:"",leftIcon:J,onClick:({cells:e})=>{const t=e.find(e=>e.key===ke.Id)?.rawValue;t&&(f([t]),z(!0))},variant:x.Secondary,size:R.S},{id:P(),label:"",leftIcon:Q,onClick:({cells:e})=>{const t=e.find(e=>e.key===ke.Id)?.rawValue;t&&s(t)},variant:x.Secondary,size:R.S}]}),e.createElement(Ce,{isOpen:w,onClose:()=>{f([]),z(!1)},connections:p,selectedConnectionIds:k,setSelectedConnectionIds:f,onApply:r})))},xe=i.div`
|
|
2
50
|
display: flex;
|
|
3
51
|
align-items: center;
|
|
4
52
|
justify-content: space-between;
|
|
@@ -10,10 +58,10 @@ import e,{useState as a,useEffect as t,useMemo as l,useCallback as s}from"react"
|
|
|
10
58
|
&:hover {
|
|
11
59
|
background: ${({theme:e})=>e.v2.colors.silver[700]};
|
|
12
60
|
}
|
|
13
|
-
`,
|
|
14
|
-
animation-name: ${
|
|
15
|
-
|
|
61
|
+
`,ve=i.div`
|
|
62
|
+
animation-name: ${z.animations.fade.in};
|
|
63
|
+
`,$e=({pod:l,getExtendedPodInfo:i,onClose:n})=>{const{formatTimeAgo:r}=v(),{clickCopy:d,isCopied:u}=M(),[g,b]=t(null),[m,y]=t(!1);o(()=>{l?i(l.namespace,l.name).then(e=>b(e??null)):(b(null),y(!1))},[l]);const h=a(()=>[{id:P(),title:"Node",label:g?.node??"-",withCopy:!0},{id:P(),title:"Status",badge:{status:D(g?.status),label:g?.status??"-"}}],[g]),C=a(()=>g?.containers?.map(e=>({id:P(),items:[{id:P(),title:"Container",label:e.name??"-"},{id:P(),title:"Status",badge:{status:D(e.status),label:e.status??"-"},label:e.startedAt?`(since ${r(e.startedAt)})`:""},{id:P(),title:"Image Version",label:e.image?.split(":")?.[1]??"-"},{id:P(),title:"Image Repository",label:e.image?.split(":")?.[0]??"-"},{id:P(),title:"Restarts",label:e.restarts.toString()},{id:P(),title:"State Reason",label:e.stateReason??"-"},{id:P(),title:"Resource Requests",label:`CPU ${e.resources.requests.cpu} • Memory ${e.resources.requests.memory}`},{id:P(),title:"Resource Limits",label:`CPU ${e.resources.limits.cpu} • Memory ${e.resources.limits.memory}`}]}))||[],[g]);return e.createElement(c,{isOpen:!!l,header:{icon:_,title:"Pod Information",onClose:n}},g?null:e.createElement(V,null,e.createElement(N,null)),g?e.createElement(e.Fragment,null,e.createElement(L,{icon:_,title:g.name,withCopyTitle:!0},e.createElement(s,{$gap:24},e.createElement(O,{cellsPerRow:2,items:h}),C.length>0&&e.createElement(s,{$gap:12},e.createElement(xe,{onClick:()=>y(e=>!e)},e.createElement(p,null,"Containers Overview"),e.createElement(T,{icon:m?ee:te})),m&&C.map(({id:t,items:a})=>e.createElement(ve,{key:t},e.createElement(O,{cellsPerRow:2,items:a})))))),e.createElement(L,{icon:ae,title:"Kubectl Commands"},e.createElement(s,{$gap:12},e.createElement(j,{value:`kubectl get pod ${g.name} -n ${g.namespace} -o yaml`}),e.createElement(j,{value:`kubectl describe pod ${g.name} -n ${g.namespace}`}),e.createElement(j,{value:`kubectl logs ${g.name} -n ${g.namespace}`}))),e.createElement(L,{icon:le,title:"YAML",actions:[{id:P(),type:I.Button,buttonProps:{label:"",leftIcon:u?X:oe,onClick:()=>d(g.manifestYAML),disabled:u,size:R.S,variant:x.Secondary}}]},e.createElement("div",{style:{padding:"0 12px"}},e.createElement(Y,{code:g.manifestYAML,language:"yaml",theme:"duotoneDark"})))):null)};var Le;!function(e){e.PodName="podName",e.Ready="ready",e.Started="started",e.Status="status",e.Restarts="restarts",e.NodeName="nodeName",e.Age="age",e.DockerImage="dockerImage"}(Le||(Le={}));const Pe=[{key:Le.PodName,label:"Pod Name",sortable:!0},{key:Le.Ready,label:"Ready",sortable:!0,textAlign:"right"},{key:Le.Started,label:"Started",sortable:!0,textAlign:"right"},{key:Le.Status,label:"Status",sortable:!0},{key:Le.Restarts,label:"Restarts",sortable:!0,textAlign:"right"},{key:Le.NodeName,label:"Node Name",sortable:!0},{key:Le.Age,label:"Age",sortable:!0,textAlign:"right"},{key:Le.DockerImage,label:"Docker Image",sortable:!0,textAlign:"right"}],Ie=({isLoading:l,tableRowsMaxHeight:o,pods:i,getExtendedPodInfo:s})=>{const r=n(),{formatTimeAgo:c}=v(),[d,u]=t(null),p=a(()=>{const t=t=>t?e.createElement(ie,{fill:F(r,S.Success,"500"),size:20}):e.createElement(ne,{fill:F(r,S.Error,"500"),size:20});return i.map(a=>({onClick:()=>u(a),cells:[{key:Le.PodName,rawValue:a.name},{key:Le.Ready,rawValue:a.ready,component:()=>t(a.ready)},{key:Le.Started,rawValue:a.started,component:()=>t(a.started)},{key:Le.Status,rawValue:a.status,component:()=>{return t=a.status,e.createElement(b,{status:D(t),label:t});var t}},{key:Le.Restarts,rawValue:a.restartsCount.toString()},{key:Le.NodeName,rawValue:a.nodeName},{key:Le.Age,rawValue:c(a.creationTimestamp)},{key:Le.DockerImage,rawValue:a.image}]}))},[i,r]);return e.createElement(L,{icon:_,title:"Pods"},e.createElement(A,{maxHeight:o,isLoading:l,columns:Pe,rows:p}),e.createElement($e,{pod:d,getExtendedPodInfo:s,onClose:()=>u(null)}))};var Re;!function(e){e.Gateway="gateway",e.Node="node"}(Re||(Re={}));const Ae=[{value:Re.Gateway,label:"Gateway"},{value:Re.Node,label:"Node Collector"}],Se=i.div`
|
|
16
64
|
display: flex;
|
|
17
65
|
align-items: center;
|
|
18
66
|
justify-content: space-between;
|
|
19
|
-
`,
|
|
67
|
+
`,ze=({selectedTab:t,setSelectedTab:a,onClickDownloadDiagnose:l,onClickRefresh:o,isLoading:i})=>e.createElement(Se,null,e.createElement(u,{$gap:12},e.createElement(u,{$gap:8},e.createElement(se,{size:32}),e.createElement(p,{size:g.M,weight:500},"Pipeline Collectors")),e.createElement(H,{options:Ae,selected:t,setSelected:a})),e.createElement(u,{$gap:8},l&&e.createElement(w,{label:"Download Diagnose",leftIcon:re,size:R.S,variant:x.Text,onClick:l}),o&&e.createElement(w,{label:"Refresh",leftIcon:K,size:R.S,variant:x.Text,onClick:o,loading:i}))),Me=({isOpen:t,onClose:a,title:l,yaml:o})=>{const{clickCopy:i,isCopied:n}=M();return e.createElement(c,{isOpen:t,header:{icon:ce,title:l,onClose:a}},o?e.createElement(L,{icon:le,title:"YAML",actions:[{id:P(),type:I.Button,buttonProps:{label:"",leftIcon:n?X:oe,onClick:()=>i(o),disabled:n,size:R.S,variant:x.Secondary}}]},e.createElement("div",{style:{padding:"0 12px"}},e.createElement(Y,{code:o,language:"yaml",theme:"duotoneDark"}))):e.createElement(U,{title:"No YAML found",subTitle:"The YAML for this resource is not available"}))};var De;!function(e){e.ManifestYaml="manifest-yaml",e.ConfigMapYaml="configmap-yaml"}(De||(De={}));const Ve=({icon:a,title:l,badge:o,statusCard:i,textCards:n,manifestYaml:s,configMapYaml:r})=>{const[c,d]=t(null);return e.createElement(L,{icon:a,title:l,badge:o,actions:[{id:P(),type:I.ButtonDropData,buttonProps:{variant:x.Secondary,size:R.S,label:"View YAML",onClick:e=>d(e)},dropDataItems:[{id:De.ManifestYaml,label:l,icon:le},{id:De.ConfigMapYaml,label:"ConfigMap",icon:le}]}]},e.createElement(u,{$gap:16},e.createElement(E,{...i}),n.map(t=>e.createElement(q,{key:t.title,...t}))),e.createElement(Me,{isOpen:c===De.ManifestYaml,onClose:()=>d(null),title:l,yaml:s}),e.createElement(Me,{isOpen:c===De.ConfigMapYaml,onClose:()=>d(null),title:"ConfigMap",yaml:r}))},Ne=e=>{switch(e){case G.Healthy:return"All desired replicas are updated, available, and ready";case G.Updating:return"Workload is progressing towards desired state (e.g., updating pods)";case G.Degraded:return"Progressing but with availability issues (e.g., not enough available replicas)";case G.Failed:return"Progress deadline exceeded or an unrecoverable error occurred";case G.Down:return"No available replicas";case G.Unknown:return"Status cannot be determined from current signals";default:return"Status unknown"}},Oe=({tableRowsMaxHeight:i,getGatewayInfo:n,getGatewayPods:s,getNodeCollectorInfo:r,getNodeCollectorPods:c,getExtendedPodInfo:d})=>{const{formatTimeAgo:u}=v(),[p,g]=t(!1),[b,y]=t(Re.Gateway),[h,C]=t(null),[k,f]=t([]),[w,x]=t(null),[L,P]=t([]),I=l(async()=>{g(!0);try{switch(b){case Re.Gateway:C(await n()??null),f(await s()??[]);break;case Re.Node:x(await r()??null),P(await c()??[])}}catch(e){}g(!1)},[b]);o(()=>{I()},[I]);const R=a(()=>(e=>{switch(e){case Re.Gateway:return"Deployment";case Re.Node:return"DaemonSet";default:return"Pipeline Collectors"}})(b),[b]),A=a(()=>((e,t,a,l)=>{const o={status:m.Disabled,label:"No rollouts yet"};let i=!1,n=null;switch(e){case Re.Gateway:i=t?.rolloutInProgress??!1,n=t?.lastRolloutAt??null;break;case Re.Node:i=a?.rolloutInProgress??!1,n=a?.lastRolloutAt??null;break;default:return o}return i?{status:S.Info,label:"Rollout in progress",rightIcon:K,useSecondaryTone:!0}:n?{status:m.Disabled,label:`Last Rollout: ${l(n)}`}:o})(b,h,w,u),[h,w,b,u]),z=a(()=>((e,t,a,l)=>{let o=l?S.Info:m.Unknown,i=l?"Loading":G.Unknown,n=l?"Fetching data...":Ne(G.Unknown);switch(e){case Re.Gateway:o=t?.status?D(t?.status):o,i=t?.status??i,n=t?.status?Ne(t.status):n;break;case Re.Node:o=a?.status?D(a?.status):o,i=a?.status??i,n=a?.status?Ne(a.status):n}return{status:o,title:i,description:n}})(b,h,w,p),[h,w,b,p]),M=a(()=>((e,t,a,l)=>{switch(e){case Re.Gateway:return[{title:"HPA Spec (Replicas)",cells:[{label:"Min.",value:t?.hpa?.min.toString()??"-",isLoading:l},{label:"Max.",value:t?.hpa?.max.toString()??"-",isLoading:l},{label:"Current",value:t?.hpa?.current.toString()??"-",isLoading:l},{label:"Desired",value:t?.hpa?.desired.toString()??"-",isLoading:l}]},{title:"Requests",cells:[{label:"CPU",value:t?.resources?.requests.cpu??"-",isLoading:l},{label:"Memory",value:t?.resources?.requests.memory??"-",isLoading:l}]},{title:"Limits",cells:[{label:"CPU",value:t?.resources?.limits.cpu??"-",isLoading:l},{label:"Memory",value:t?.resources?.limits.memory??"-",isLoading:l}]},{title:"Docker Image",cells:[{value:t?.imageVersion??"-",isLoading:l}]}];case Re.Node:return[{title:"Nodes",cells:[{label:"Desired",value:a?.nodes?.desired.toString()??"-",isLoading:l},{label:"Ready",value:a?.nodes?.ready.toString()??"-",isLoading:l}]},{title:"Requests",cells:[{label:"CPU",value:a?.resources?.requests.cpu??"-",isLoading:l},{label:"Memory",value:a?.resources?.requests.memory??"-",isLoading:l}]},{title:"Limits",cells:[{label:"CPU",value:a?.resources?.limits.cpu??"-",isLoading:l},{label:"Memory",value:a?.resources?.limits.memory??"-",isLoading:l}]},{title:"Docker Image",cells:[{value:a?.imageVersion??"-",isLoading:l}]}];default:return[]}})(b,h,w,p),[h,w,b,p]),V=a(()=>(b===Re.Gateway?h?.manifestYAML:w?.manifestYAML)??"",[h,w,b]),N=a(()=>(b===Re.Gateway?h?.configMapYAML:w?.configMapYAML)??"",[h,w,b]),O=a(()=>b===Re.Gateway?k:L,[k,L,b]);return e.createElement($,null,e.createElement(ze,{isLoading:p,selectedTab:b,setSelectedTab:y,onClickDownloadDiagnose:void 0,onClickRefresh:I}),e.createElement(Ve,{icon:ce,title:R,badge:A,statusCard:z,textCards:M,manifestYaml:V,configMapYaml:N}),e.createElement(Ie,{isLoading:p,tableRowsMaxHeight:i,pods:O,getExtendedPodInfo:d}))};export{we as CentralConnections,Oe as PipelineCollectors};
|
package/lib/containers.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e,{useState as t,useEffect as a,forwardRef as i,useRef as n,useImperativeHandle as o,useMemo as l,Fragment as r,useCallback as s,Children as c}from"react";import d,{css as u}from"styled-components";import{
|
|
1
|
+
import e,{useState as t,useEffect as a,forwardRef as i,useRef as n,useImperativeHandle as o,useMemo as l,Fragment as r,useCallback as s,Children as c}from"react";import d,{css as u}from"styled-components";import{E as p,G as m,H as h,K as g,J as y,M as v,Q as b,R as f,U as x,V as $,X as C,Y as S,Z as k,_ as w,$ as T,a0 as D,a1 as N,T as E,a2 as O,a3 as F,a4 as I,a5 as A,a6 as M,a7 as R,a8 as L,a9 as P,aa as K,ab as j,ac as V,ad as q,ae as z,af as H,o as B,ag as W,ah as _,ai as U,aj as J,ak as G,al as Y,am as X,F as Z,an as Q,ao as ee,ap as te,aq as ae,ar as ie,as as ne,at as oe,au as le,av as re,aw as se,a as ce,ax as de,f as ue,ay as pe,az as me,aA as he,aB as ge,aC as ye,aD as ve,aE as be,aF as fe,aG as xe,aH as $e,aI as Ce,aJ as Se,aK as ke,r as we,N as Te,aL as De,aM as Ne,aN as Ee,aO as Oe,aP as Fe,aQ as Ie,aR as Ae,aS as Me,s as Re,aT as Le,aU as Pe,aV as Ke,aW as je,aX as Ve,aY as qe,aZ as ze,a_ as He,a$ as Be,b0 as We,b1 as _e,b2 as Ue,b3 as Je,b4 as Ge,b5 as Ye,b6 as Xe,b7 as Ze,b8 as Qe,b9 as et,ba as tt,bb as at,bc as it,bd as nt,be as ot,bf as lt,bg as rt,bh as st,bi as ct,bj as dt,bk as ut,bl as pt,bm as mt,bn as ht,bo as gt,bp as yt,bq as vt,br as bt,bs as ft,bt as xt,bu as $t,bv as Ct,bw as St,bx as kt,by as wt,bz as Tt,bA as Dt,bB as Nt,bC as Et,bD as Ot,bE as Ft,bF as It,bG as At,bH as Mt,bI as Rt,bJ as Lt,bK as Pt,bL as Kt,bM as jt,bN as Vt,bO as qt,i as zt,bP as Ht,bQ as Bt,bR as Wt,bS as _t,bT as Ut,bU as Jt,bV as Gt,bW as Yt,bX as Xt,bY as Zt,bZ as Qt,b_ as ea,b$ as ta,c0 as aa,c1 as ia,c2 as na,c3 as oa,c4 as la,c5 as ra,c6 as sa,p as ca,u as da,c7 as ua,c8 as pa,c9 as ma,ca as ha,cb as ga,cc as ya,cd as va}from"./chunks/ui-components-84317435.js";import{VSquareIcon as ba,XSquareIcon as fa,EditIcon as xa,TrashIcon as $a,OdigosLogoText as Ca,PlusIcon as Sa,SearchIcon as ka,FilterIcon as wa,DataStreamIcon as Ta,VIcon as Da,OdigosLogo as Na,ArrowIcon as Ea,RefreshLeftArrowIcon as Oa,NotificationIcon as Fa,UserIcon as Ia,ImageErrorIcon as Aa,OverviewIcon as Ma,InstrumentationRuleIcon as Ra,ActionIcon as La,SourceIcon as Pa,DestinationIcon as Ka,SlackLogo as ja,KeyIcon as Va,TerminalIcon as qa,ExclamationTriangleIcon as za,TraceViewIcon as Ha}from"./icons.js";import{MarkerType as Ba,useNodesState as Wa,useEdgesState as _a,applyNodeChanges as Ua}from"@xyflow/react";import"zustand";import"javascript-time-ago";import"./chunks/vendor-55cc654c.js";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";const Ja=e=>{const{type:t,name:a,notes:i,signals:n,disabled:o,fields:{collectContainerAttributes:l,collectReplicaSetAttributes:r,collectWorkloadId:s,collectClusterId:c,labelsAttributes:d,annotationsAttributes:u,clusterAttributes:y,overwriteExistingValues:v,attributeNamesToDelete:b,renames:f,piiCategories:x,fallbackSamplingRatio:$,samplingPercentage:C,endpointsFilters:S,servicesNameFilters:k,attributeFilters:w}}=e,T=[{title:p.TYPE,value:t},{type:m.ActiveStatus,title:p.STATUS,value:String(!o)},{type:m.Monitors,title:p.SIGNALS_FOR_PROCESSING,value:n?.map(e=>e.toLowerCase()).join(", ")||""},{title:p.NAME,value:a||""},{title:p.NOTES,value:i||""},{type:m.Divider}];if(t===h.K8sAttributes&&(T.push({title:"Collect Container Attributes",value:String(l)}),T.push({title:"Collect ReplicaSet Attributes",value:String(r)}),T.push({title:"Collect Workload ID",value:String(s)}),T.push({title:"Collect Cluster ID",value:String(c)}),d?.length&&T.push({type:m.Divider}),d?.forEach(({labelKey:e,attributeKey:t,from:a},i)=>{let n="";n+=`Label Key: ${e}\n`,n+=`Attribute Key: ${t}\n`,n+=`From: ${a||g.Pod}\n`,T.push({title:"Label"+(d.length>1?` #${i+1}`:""),value:n})}),u?.length&&T.push({type:m.Divider}),u?.forEach(({annotationKey:e,attributeKey:t,from:a},i)=>{let n="";n+=`Annotation Key: ${e}\n`,n+=`Attribute Key: ${t}\n`,n+=`From: ${a||g.Pod}\n`,T.push({title:"Annotation"+(u.length>1?` #${i+1}`:""),value:n})})),t===h.AddClusterInfo){T.push({title:"Overwrite Existing Values",value:String(v||!1)});let e="";y?.forEach(({attributeName:t,attributeStringValue:a},i)=>{e+=`${t}: ${a}`,i<y.length-1&&(e+=", ")}),T.push({title:"Attributes",value:e})}if(t===h.DeleteAttributes){let e="";b?.forEach((t,a)=>{e+=t,a<b.length-1&&(e+=", ")}),T.push({title:"Attributes",value:e})}if(t===h.RenameAttributes){let e="";const t=Object.entries(f||{});t.forEach(([a,i],n)=>{e+=`${a}: ${i}`,n<t.length-1&&(e+=", ")}),T.push({title:"Attributes",value:e})}if(t===h.PiiMasking){let e="";x?.forEach((t,a)=>{e+=t,a<x.length-1&&(e+=", ")}),T.push({title:"Categories",value:e})}return t===h.ErrorSampler&&T.push({title:"Sampling Ratio",value:String($)}),t===h.ProbabilisticSampler&&T.push({title:"Sampling Percentage",value:String(C)}),t===h.LatencySampler&&S?.forEach(({serviceName:e,httpRoute:t,minimumLatencyThreshold:a,fallbackSamplingRatio:i},n)=>{let o="";o+=`Service Name: ${e}\n`,o+=`HTTP Route: ${t}\n`,o+=`Min. Latency: ${a}\n`,o+=`Fallback Sampling Ratio: ${i}`,T.push({title:"Endpoint"+(S.length>1?` #${n+1}`:""),value:o})}),t===h.ServiceNameSampler&&k?.forEach(({serviceName:e,samplingRatio:t,fallbackSamplingRatio:a},i)=>{let n="";n+=`Service Name: ${e}\n`,n+=`Sampling Ratio: ${t}\n`,n+=`Fallback Sampling Ratio: ${a}`,T.push({title:"Filter"+(k.length>1?` #${i+1}`:""),value:n})}),t===h.SpanAttributeSampler&&w?.forEach(({serviceName:e,attributeKey:t,fallbackSamplingRatio:a,condition:i},n)=>{let o="";o+=`Service Name: ${e}\n`,o+=`Attribute Key: ${t}\n`,o+=`Fallback Sampling Ratio: ${a}\n`;const l=Object.keys(i)[0];o+=`Condition: ${l}\n`,o+=`Operation: ${i[l]?.operation}\n`,o+=`Expected Value: ${i[l]?.expectedValue}`,"jsonCondition"===l&&(o+=`\nJSON Path: ${i[l].jsonPath}`),T.push({title:"Filter"+(w.length>1?` #${n+1}`:""),value:o})}),T},Ga=f.PiiCategories,Ya=d.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: row;
|
|
4
4
|
gap: 32px;
|
package/lib/functions.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{bw as capitalizeFirstLetter,cw as cleanObjectEmptyStringsValues,br as compareCondition,by as deepClone,aB as filterActions,b4 as filterDestinations,b5 as filterDestinationsByStream,b2 as filterSources,b3 as filterSourcesByStream,cx as flattenObjectKeys,aV as formatBytes,ca as formatDuration,k as generateId,aj as getActionIcon,av as getConditionsBooleans,aZ as getContainersIcons,c5 as getContainersInstrumentedCount,aY as getDestinationIcon,aI as getEntityIcon,aT as getEntityId,aD as getEntityLabel,cy as getIdFromSseTarget,aX as getInstrumentationRuleIcon,cz as getMainContainerLanguage,bB as getMetricForEntity,cA as getMonitorIcon,cB as getPlatformIcon,cC as getPlatformLabel,bK as getProgrammingLanguageIcon,cc as getRecursiveValues,cD as getSseTargetFromId,x as getStatusColor,q as getStatusFromPodStatus,az as getStatusIcon,bU as getStatusTypeFromOdigosHealth,cE as getValueForRange,bO as getWorkloadId,bv as getYamlFieldsForDestination,bV as hasUnhealthyInstances,X as isEmpty,cF as isLegalK8sLabel,c6 as isOverTime,bZ as isStringABoolean,cG as isTimeElapsed,cH as isValidVersion,ax as mapConditions,bq as mapDestinationFieldsForDisplay,aU as mapExportedSignals,cI as numbersOnly,b_ as parseBooleanFromString,cJ as parseJsonStringToPrettyString,cK as removeEmptyValuesFromObject,bs as safeJsonParse,cL as safeJsonStringify,aN as sleep,bc as splitCamelString,cM as stringifyNonStringValues}from"./chunks/ui-components-84317435.js";import"./icons.js";import"react";import"zustand";import"javascript-time-ago";import"./chunks/vendor-55cc654c.js";import"react-dom";import"styled-components";import"@xyflow/react";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";
|
package/lib/hooks.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{ah as useActionFormData,cQ as useBodyScroll,b6 as useClickNode,bP as useClickNotification,a$ as useConnection,b1 as useContainerSize,p as useCopy,bi as useDataStreamFormData,bu as useDestinationFormData,u as useGenericForm,cR as useInfiniteScroll,bL as useInstrumentationRuleFormData,aa as useKeyDown,bb as useOnClickOutside,b7 as usePopup,bh as useSessionStorage,b$ as useSourceFormData,c3 as useSourceSelectionFormData,i as useTimeAgo,bN as useTransition}from"./chunks/ui-components-84317435.js";import"./icons.js";import"react";import"zustand";import"javascript-time-ago";import"./chunks/vendor-55cc654c.js";import"react-dom";import"styled-components";import"@xyflow/react";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";
|
|
@@ -39,6 +39,7 @@ export * from './refresh-right-arrow-icon';
|
|
|
39
39
|
export * from './rotate-arrows-icon';
|
|
40
40
|
export * from './search-icon';
|
|
41
41
|
export * from './server-disconnected-icon';
|
|
42
|
+
export * from './settings-icon';
|
|
42
43
|
export * from './sort-arrows-icon';
|
|
43
44
|
export * from './terminal-icon';
|
|
44
45
|
export * from './trash-icon';
|