@odigos/ui-kit 0.0.8 → 0.0.10
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 +28 -0
- package/lib/components/badge/index.d.ts +2 -2
- package/lib/components/data-card/index.d.ts +1 -0
- package/lib/components/data-tab/index.d.ts +2 -2
- package/lib/components/describe-row/index.d.ts +2 -2
- package/lib/components/divider/index.d.ts +2 -2
- package/lib/components/drawer/drawer-header/index.d.ts +1 -1
- package/lib/components/icon-group/index.d.ts +2 -2
- package/lib/components/icon-wrapped/index.d.ts +2 -2
- package/lib/components/interactive-table/index.d.ts +2 -2
- package/lib/components/interactive-table/row.d.ts +2 -2
- package/lib/components/notification-note/index.d.ts +2 -2
- package/lib/components/status/index.d.ts +2 -2
- package/lib/components/styled.d.ts +12 -0
- package/lib/components/warning-modal/index.d.ts +2 -2
- package/lib/components.js +5 -5
- package/lib/constants/strings/index.d.ts +1 -0
- package/lib/constants.js +1 -1
- package/lib/containers/data-flow/nodes/base-node.d.ts +2 -2
- package/lib/containers/data-flow/nodes/scroll-node.d.ts +2 -2
- package/lib/containers/destination-form/test-connection/index.d.ts +2 -2
- package/lib/containers.js +106 -115
- package/lib/functions/get-conditions-booleans/index.d.ts +2 -2
- package/lib/functions/get-containers-icons/index.d.ts +2 -2
- package/lib/functions/get-platform-icon/index.d.ts +1 -1
- package/lib/functions/get-platform-label/index.d.ts +1 -1
- package/lib/functions/get-programming-language-icon/index.d.ts +2 -2
- package/lib/functions/get-status-icon/index.d.ts +2 -2
- package/lib/functions.js +4 -4
- package/lib/hooks.js +2 -2
- package/lib/icons/common/image-error-icon/image-error-icon.stories.d.ts +8 -0
- package/lib/icons/common/image-error-icon/index.d.ts +2 -0
- package/lib/icons/common/index.d.ts +1 -0
- package/lib/icons/index.d.ts +1 -0
- package/lib/icons/overview/connections-icon/connections-icon.stories.d.ts +8 -0
- package/lib/icons/overview/connections-icon/index.d.ts +2 -0
- package/lib/icons/overview/index.d.ts +1 -0
- package/lib/icons/programming-languages/c-plus-plus-logo/c-plus-plus-logo.stories.d.ts +8 -0
- package/lib/icons/programming-languages/c-plus-plus-logo/index.d.ts +2 -0
- package/lib/icons/programming-languages/c-sharp-logo/c-sharp-logo.stories.d.ts +8 -0
- package/lib/icons/programming-languages/c-sharp-logo/index.d.ts +2 -0
- package/lib/icons/programming-languages/dotnet-logo/dotnet-logo.stories.d.ts +8 -0
- package/lib/icons/programming-languages/dotnet-logo/index.d.ts +2 -0
- package/lib/icons/programming-languages/elixir-logo/elixir-logo.stories.d.ts +8 -0
- package/lib/icons/programming-languages/elixir-logo/index.d.ts +2 -0
- package/lib/icons/programming-languages/go-logo/go-logo.stories.d.ts +8 -0
- package/lib/icons/programming-languages/go-logo/index.d.ts +2 -0
- package/lib/icons/programming-languages/index.d.ts +17 -0
- package/lib/icons/programming-languages/java-logo/index.d.ts +2 -0
- package/lib/icons/programming-languages/java-logo/java-logo.stories.d.ts +8 -0
- package/lib/icons/programming-languages/kafka-logo/index.d.ts +2 -0
- package/lib/icons/programming-languages/kafka-logo/kafka-logo.stories.d.ts +8 -0
- package/lib/icons/programming-languages/mysql-logo/index.d.ts +2 -0
- package/lib/icons/programming-languages/mysql-logo/mysql-logo.stories.d.ts +8 -0
- package/lib/icons/programming-languages/nginx-logo/index.d.ts +2 -0
- package/lib/icons/programming-languages/nginx-logo/nginx-logo.stories.d.ts +8 -0
- package/lib/icons/programming-languages/nodejs-logo/index.d.ts +2 -0
- package/lib/icons/programming-languages/nodejs-logo/nodejs-logo.stories.d.ts +8 -0
- package/lib/icons/programming-languages/php-logo/index.d.ts +2 -0
- package/lib/icons/programming-languages/php-logo/php-logo.stories.d.ts +8 -0
- package/lib/icons/programming-languages/postgres-logo/index.d.ts +2 -0
- package/lib/icons/programming-languages/postgres-logo/postgres-logo.stories.d.ts +8 -0
- package/lib/icons/programming-languages/python-logo/index.d.ts +2 -0
- package/lib/icons/programming-languages/python-logo/python-logo.stories.d.ts +8 -0
- package/lib/icons/programming-languages/redis-logo/index.d.ts +2 -0
- package/lib/icons/programming-languages/redis-logo/redis-logo.stories.d.ts +8 -0
- package/lib/icons/programming-languages/ruby-logo/index.d.ts +2 -0
- package/lib/icons/programming-languages/ruby-logo/ruby-logo.stories.d.ts +8 -0
- package/lib/icons/programming-languages/rust-logo/index.d.ts +2 -0
- package/lib/icons/programming-languages/rust-logo/rust-logo.stories.d.ts +8 -0
- package/lib/icons/programming-languages/swift-logo/index.d.ts +2 -0
- package/lib/icons/programming-languages/swift-logo/swift-logo.stories.d.ts +8 -0
- package/lib/icons.js +10 -3
- package/lib/{index-BulCzWQI.js → index-DB1gmCsH.js} +29 -31
- package/lib/{index-BJxaoI0G.js → index-D_Qn2U89.js} +8 -1
- package/lib/{index-Cu2uHOuh.js → index-DnmWFsTQ.js} +1 -0
- package/lib/{index-CKUgKtl0.js → index-Do8ODRlA.js} +60 -40
- package/lib/{index-CKD2OX24.js → index-eF2JXMVR.js} +11 -7
- package/lib/index-ixs381n-.js +466 -0
- package/lib/types/common/index.d.ts +3 -3
- package/lib/types/connection/index.d.ts +3 -3
- package/lib/types.js +9 -9
- package/lib/{useSourceSelectionFormData-BY6B70Kf.js → useSourceSelectionFormData-CxdOP9FT.js} +4 -4
- package/package.json +10 -10
- package/lib/index-DLKEpJJm.js +0 -53
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import React, { useState, useRef, forwardRef, useEffect, createElement, useCallback, useMemo, Fragment, useId } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { STATUS_TYPE, OTHER_STATUS, PROGRAMMING_LANGUAGES, ENTITY_TYPES } from './types.js';
|
|
3
3
|
import './index-DIcomki-.js';
|
|
4
4
|
import styled, { css } from 'styled-components';
|
|
5
5
|
import Theme from './theme.js';
|
|
6
|
-
import { b as getStatusIcon, r as removeEmptyValuesFromObject, s as safeJsonStringify, f as flattenObjectKeys, m as mapConditions, c as capitalizeFirstLetter, g as getMonitorIcon, p as parseJsonStringToPrettyString, a as getProgrammingLanguageIcon, d as splitCamelString } from './index-
|
|
6
|
+
import { b as getStatusIcon, r as removeEmptyValuesFromObject, s as safeJsonStringify, f as flattenObjectKeys, m as mapConditions, c as capitalizeFirstLetter, g as getMonitorIcon, p as parseJsonStringToPrettyString, a as getProgrammingLanguageIcon, d as splitCamelString } from './index-DB1gmCsH.js';
|
|
7
7
|
import { s as safeJsonParse, i as isEmpty } from './index-BZS1ijMm.js';
|
|
8
|
-
import { M as MinusIcon, f as CheckIcon, L as ListIcon, C as CodeIcon, E as ExtendArrowIcon, c as SortArrowsIcon, a as CopyIcon, b as NotebookIcon, X as XIcon, d as EyeClosedIcon, e as EyeOpenIcon, N as NoDataIcon, g as CrossIcon, S as SearchIcon, T as TrashIcon, P as PlusIcon, A as ArrowIcon } from './index-
|
|
8
|
+
import { M as MinusIcon, f as CheckIcon, L as ListIcon, C as CodeIcon, E as ExtendArrowIcon, I as ImageErrorIcon, c as SortArrowsIcon, a as CopyIcon, b as NotebookIcon, X as XIcon, d as EyeClosedIcon, e as EyeOpenIcon, N as NoDataIcon, g as CrossIcon, S as SearchIcon, T as TrashIcon, P as PlusIcon, A as ArrowIcon } from './index-D_Qn2U89.js';
|
|
9
9
|
import { M as MONITORS_OPTIONS } from './index-CZe2VX28.js';
|
|
10
10
|
import { u as useContainerSize, a as useCopy, g as useTransition, d as useKeyDown, e as useOnClickOutside } from './useTransition-Dfxjcy-C.js';
|
|
11
11
|
import ReactDOM from 'react-dom';
|
|
12
|
-
import { O as OdigosLogo } from './index-BGlk5VhF.js';
|
|
13
12
|
import require$$0 from 'babel-runtime/helpers/extends';
|
|
14
13
|
import require$$1$1 from 'babel-runtime/core-js/object/get-prototype-of';
|
|
15
14
|
import require$$2 from 'babel-runtime/helpers/classCallCheck';
|
|
@@ -17,7 +16,7 @@ import require$$3 from 'babel-runtime/helpers/createClass';
|
|
|
17
16
|
import require$$4 from 'babel-runtime/helpers/possibleConstructorReturn';
|
|
18
17
|
import require$$5 from 'babel-runtime/helpers/inherits';
|
|
19
18
|
import require$$1 from 'object-assign';
|
|
20
|
-
import { I as InfoIcon } from './index-
|
|
19
|
+
import { I as InfoIcon } from './index-ixs381n-.js';
|
|
21
20
|
|
|
22
21
|
const TextWrapper$2 = styled.div `
|
|
23
22
|
color: ${({ $color, theme }) => $color || theme.text.secondary};
|
|
@@ -340,7 +339,7 @@ const Button$4 = ({ children, variant = 'primary', onClick, ...props }) => {
|
|
|
340
339
|
const CancelWarning = ({ isOpen, noOverlay, name, onApprove, onDeny }) => {
|
|
341
340
|
return (React.createElement(WarningModal, { isOpen: isOpen, noOverlay: noOverlay, title: `Cancel${name ? ` ${name}` : ''}`, description: 'Are you sure you want to cancel?', approveButton: {
|
|
342
341
|
text: 'Confirm',
|
|
343
|
-
variant:
|
|
342
|
+
variant: STATUS_TYPE.WARNING,
|
|
344
343
|
onClick: onApprove,
|
|
345
344
|
}, denyButton: {
|
|
346
345
|
text: 'Go Back',
|
|
@@ -382,6 +381,20 @@ const ModalBody = styled.div `
|
|
|
382
381
|
margin: ${({ $isNotModal }) => ($isNotModal ? '64px 0 0 0' : '64px 7vw 32px 7vw')};
|
|
383
382
|
overflow-y: scroll;
|
|
384
383
|
`;
|
|
384
|
+
// common styles for focused-table containers
|
|
385
|
+
const TableContainer = styled(FlexColumn) `
|
|
386
|
+
max-width: ${({ $maxWidth }) => $maxWidth || 'unset'};
|
|
387
|
+
width: 100%;
|
|
388
|
+
`;
|
|
389
|
+
const TableTitleWrap = styled(FlexRow) `
|
|
390
|
+
gap: 16px;
|
|
391
|
+
padding: 16px;
|
|
392
|
+
`;
|
|
393
|
+
const TableWrap = styled.div `
|
|
394
|
+
width: 100%;
|
|
395
|
+
max-height: ${({ $maxHeight }) => $maxHeight || 'unset'};
|
|
396
|
+
overflow-y: auto;
|
|
397
|
+
`;
|
|
385
398
|
|
|
386
399
|
const TooltipContainer = styled.div `
|
|
387
400
|
position: relative;
|
|
@@ -3724,7 +3737,7 @@ const getComponentsFromPropertyString = (propertyString, theme) => {
|
|
|
3724
3737
|
return React.createElement("div", { key: useId(), style: { width: 16, height: 16 } });
|
|
3725
3738
|
let Icon = getStatusIcon(value, theme);
|
|
3726
3739
|
if (!Icon)
|
|
3727
|
-
Icon = getStatusIcon(
|
|
3740
|
+
Icon = getStatusIcon(STATUS_TYPE.WARNING, theme);
|
|
3728
3741
|
return React.createElement(Icon, { key: useId() });
|
|
3729
3742
|
default:
|
|
3730
3743
|
console.warn('unexpected component type!', type);
|
|
@@ -3952,15 +3965,15 @@ const ExtendArrow = ({ extend, size = 14, align = 'center' }) => {
|
|
|
3952
3965
|
|
|
3953
3966
|
const Container$q = styled.div `
|
|
3954
3967
|
border-radius: 24px;
|
|
3955
|
-
background-color: ${({ theme, $status }) => $status ===
|
|
3968
|
+
background-color: ${({ theme, $status }) => $status === STATUS_TYPE.ERROR
|
|
3956
3969
|
? theme.text.error + Theme.opacity.hex['010']
|
|
3957
|
-
: $status ===
|
|
3970
|
+
: $status === STATUS_TYPE.WARNING
|
|
3958
3971
|
? theme.text.warning + Theme.opacity.hex['010']
|
|
3959
3972
|
: theme.colors.secondary + Theme.opacity.hex['005']};
|
|
3960
3973
|
&:hover {
|
|
3961
|
-
background-color: ${({ theme, $status }) => $status ===
|
|
3974
|
+
background-color: ${({ theme, $status }) => $status === STATUS_TYPE.ERROR
|
|
3962
3975
|
? theme.text.error + Theme.opacity.hex['020']
|
|
3963
|
-
: $status ===
|
|
3976
|
+
: $status === STATUS_TYPE.WARNING
|
|
3964
3977
|
? theme.text.warning + Theme.opacity.hex['020']
|
|
3965
3978
|
: theme.colors.secondary + Theme.opacity.hex['010']};
|
|
3966
3979
|
}
|
|
@@ -3991,9 +4004,9 @@ const ConditionDetails = ({ conditions: c, headerLabelError = 'Something Failed'
|
|
|
3991
4004
|
const theme = Theme.useTheme();
|
|
3992
4005
|
const [extend, setExtend] = useState(false);
|
|
3993
4006
|
const conditions = mapConditions(c);
|
|
3994
|
-
const errors = useMemo(() => conditions.filter(({ status }) => status ===
|
|
4007
|
+
const errors = useMemo(() => conditions.filter(({ status }) => status === STATUS_TYPE.ERROR), [conditions]);
|
|
3995
4008
|
const hasErrors = !!errors.length;
|
|
3996
|
-
const warnings = useMemo(() => conditions.filter(({ status }) => status ===
|
|
4009
|
+
const warnings = useMemo(() => conditions.filter(({ status }) => status === STATUS_TYPE.WARNING), [conditions]);
|
|
3997
4010
|
const hasWarnings = !!warnings.length;
|
|
3998
4011
|
const disableds = useMemo(() => conditions.filter(({ status }) => status === OTHER_STATUS.DISABLED), [conditions]);
|
|
3999
4012
|
const hasDisableds = !!disableds.length;
|
|
@@ -4003,7 +4016,7 @@ const ConditionDetails = ({ conditions: c, headerLabelError = 'Something Failed'
|
|
|
4003
4016
|
useEffect(() => {
|
|
4004
4017
|
setExtend(hasErrors || hasWarnings || hasDisableds || hasLoadings);
|
|
4005
4018
|
}, [hasErrors, hasWarnings, hasDisableds, hasLoadings]);
|
|
4006
|
-
const overallStatus = hasErrors ?
|
|
4019
|
+
const overallStatus = hasErrors ? STATUS_TYPE.ERROR : hasWarnings ? STATUS_TYPE.WARNING : hasDisableds ? STATUS_TYPE.INFO : STATUS_TYPE.SUCCESS;
|
|
4007
4020
|
const HeaderIcon = getStatusIcon(overallStatus, theme);
|
|
4008
4021
|
const headerText = hasErrors ? headerLabelError : hasWarnings ? headerLabelWarning : hasDisableds ? headerLabelWarning : loading ? 'Loading...' : headerLabelSuccess;
|
|
4009
4022
|
const headerTextColor = hasErrors ? theme.text.error : hasWarnings ? theme.text.warning : theme.text.info;
|
|
@@ -4017,13 +4030,13 @@ const ConditionDetails = ({ conditions: c, headerLabelError = 'Something Failed'
|
|
|
4017
4030
|
React.createElement(Text, { color: headerSubTextColor, size: 12, family: 'secondary' }, headerSubText),
|
|
4018
4031
|
React.createElement(ExtendArrow, { extend: extend, align: 'right' })),
|
|
4019
4032
|
extend && (React.createElement(Body, null, conditions.map(({ status, type, reason, message, lastTransitionTime }, idx) => {
|
|
4020
|
-
const Icon = status === 'loading' ? () => React.createElement(FadeLoader, { scale: 0.8 }) : status === 'disabled' ? getStatusIcon(
|
|
4021
|
-
const color = status === 'disabled' ? theme.text.info : status ===
|
|
4033
|
+
const Icon = status === 'loading' ? () => React.createElement(FadeLoader, { scale: 0.8 }) : status === 'disabled' ? getStatusIcon(STATUS_TYPE.INFO, theme) : getStatusIcon(status, theme);
|
|
4034
|
+
const color = status === 'disabled' ? theme.text.info : status === STATUS_TYPE.ERROR ? theme.text.error : status === STATUS_TYPE.WARNING ? theme.text.warning : theme.text.info;
|
|
4022
4035
|
const boldColor = status === 'disabled'
|
|
4023
4036
|
? theme.text.info_secondary
|
|
4024
|
-
: status ===
|
|
4037
|
+
: status === STATUS_TYPE.ERROR
|
|
4025
4038
|
? theme.text.error_secondary
|
|
4026
|
-
: status ===
|
|
4039
|
+
: status === STATUS_TYPE.WARNING
|
|
4027
4040
|
? theme.text.warning_secondary
|
|
4028
4041
|
: theme.text.info_secondary;
|
|
4029
4042
|
return (React.createElement(Row$1, { key: `condition-${idx}` },
|
|
@@ -4064,9 +4077,9 @@ const TextWrapper$1 = styled.div `
|
|
|
4064
4077
|
display: flex;
|
|
4065
4078
|
align-items: center;
|
|
4066
4079
|
`;
|
|
4067
|
-
const Status = ({ title, subtitle, size = 12, family = 'secondary', status =
|
|
4080
|
+
const Status = ({ title, subtitle, size = 12, family = 'secondary', status = STATUS_TYPE.DEFAULT, withIcon, withBorder, withBackground }) => {
|
|
4068
4081
|
const theme = Theme.useTheme();
|
|
4069
|
-
const statusType = status === OTHER_STATUS.LOADING ?
|
|
4082
|
+
const statusType = status === OTHER_STATUS.LOADING ? STATUS_TYPE.INFO : status;
|
|
4070
4083
|
const StatusIcon = status === OTHER_STATUS.LOADING ? () => React.createElement(FadeLoader, { scale: 0.8 }) : () => getStatusIcon(statusType, theme)({ size: size + 2 });
|
|
4071
4084
|
return (React.createElement(Container$p, { "$size": size, "$status": statusType, "$withIcon": withIcon, "$withBorder": withBorder, "$withBackground": withBackground },
|
|
4072
4085
|
withIcon && (React.createElement(IconWrapper$4, null,
|
|
@@ -4082,7 +4095,7 @@ const ImageControlled = ({ src = '', alt = '', size = 16 }) => {
|
|
|
4082
4095
|
if (!!src && !hasError) {
|
|
4083
4096
|
return React.createElement("img", { src: src, alt: alt, width: size, height: size, onError: () => setHasError(true) });
|
|
4084
4097
|
}
|
|
4085
|
-
return React.createElement(
|
|
4098
|
+
return React.createElement(ImageErrorIcon, { size: size });
|
|
4086
4099
|
};
|
|
4087
4100
|
|
|
4088
4101
|
const Container$o = styled.div `
|
|
@@ -4098,7 +4111,7 @@ const Container$o = styled.div `
|
|
|
4098
4111
|
}};
|
|
4099
4112
|
`;
|
|
4100
4113
|
const IconWrapped = ({ icon: Icon, src = '', alt = '', status, size = 36 }) => {
|
|
4101
|
-
return (React.createElement(Container$o, { "$status": status, "$size": size },
|
|
4114
|
+
return (React.createElement(Container$o, { "$status": status, "$size": size }, src ? React.createElement(ImageControlled, { src: src, alt: alt, size: size - 16 }) : !!Icon ? React.createElement(Icon, { size: size - 16 }) : React.createElement(ImageErrorIcon, { size: size - 16 })));
|
|
4102
4115
|
};
|
|
4103
4116
|
|
|
4104
4117
|
const Container$n = styled.div `
|
|
@@ -4299,7 +4312,7 @@ const DataTab = ({ title, subTitle, icon, icons, iconSrc, iconSrcs, hoverText, s
|
|
|
4299
4312
|
return null;
|
|
4300
4313
|
return (React.createElement(React.Fragment, null,
|
|
4301
4314
|
withSeperator && React.createElement(SubTitle$2, null, '•'),
|
|
4302
|
-
React.createElement(Status, { status: isActive ?
|
|
4315
|
+
React.createElement(Status, { status: isActive ? STATUS_TYPE.SUCCESS : STATUS_TYPE.ERROR, size: 10 })));
|
|
4303
4316
|
};
|
|
4304
4317
|
return (React.createElement(Container$m, { ref: containerRef, "$status": status, "$faded": faded, "$withClick": !!onClick, onClick: onClick, ...props },
|
|
4305
4318
|
React.createElement(FlexRow, { "$gap": 8 },
|
|
@@ -4608,7 +4621,7 @@ const renderValue = (type, value) => {
|
|
|
4608
4621
|
return React.createElement(InteractiveTable, { ...params });
|
|
4609
4622
|
}
|
|
4610
4623
|
case DATA_CARD_FIELD_TYPES.ACTIVE_STATUS: {
|
|
4611
|
-
return React.createElement(Status, { status: value == 'true' ?
|
|
4624
|
+
return React.createElement(Status, { status: value == 'true' ? STATUS_TYPE.SUCCESS : STATUS_TYPE.ERROR, title: value == 'true' ? 'Active' : 'Inactive', size: 10, withIcon: true, withBorder: true });
|
|
4612
4625
|
}
|
|
4613
4626
|
case DATA_CARD_FIELD_TYPES.COPY_TEXT: {
|
|
4614
4627
|
const str = typeof value === 'string' ? value : JSON.stringify(value);
|
|
@@ -4623,14 +4636,14 @@ const renderValue = (type, value) => {
|
|
|
4623
4636
|
const { containerName, actualDevice, processes } = safeJsonParse(value, {
|
|
4624
4637
|
containerName: '',
|
|
4625
4638
|
actualDevice: { title: '', subTitle: '', tooltip: '' },
|
|
4626
|
-
processes: [{ health:
|
|
4639
|
+
processes: [{ health: STATUS_TYPE.INFO, message: '', identifyingAttributes: [] }],
|
|
4627
4640
|
});
|
|
4628
4641
|
return (React.createElement(DataTab, { title: containerName, subTitle: `${processes.length} Instrumented Processes`, renderActions: () => {
|
|
4629
|
-
return
|
|
4642
|
+
return React.createElement(Status, { status: STATUS_TYPE.INFO, title: 'Instrumentation Device', subtitle: !actualDevice.subTitle || actualDevice.subTitle === '[]' ? 'none' : actualDevice.subTitle, withBorder: true });
|
|
4630
4643
|
}, isExtended: !!processes.length, renderExtended: () => {
|
|
4631
4644
|
return (React.createElement(FlexColStretched, { "$gap": 24 }, processes.map((process, idx) => (React.createElement(FlexColStretched, { key: `process-${idx}`, "$gap": 8 },
|
|
4632
4645
|
React.createElement(DescribeRow, { title: `Instrumented Process #${idx + 1}`, subTitle: process.message || '', value: {
|
|
4633
|
-
text: process.health ===
|
|
4646
|
+
text: process.health === STATUS_TYPE.SUCCESS ? 'healthy' : 'unhealthy',
|
|
4634
4647
|
status: process.health,
|
|
4635
4648
|
} }),
|
|
4636
4649
|
process.identifyingAttributes.map(({ name, value }) => (React.createElement(DescribeRow, { key: useId(), title: name, subTitle: '', value: { text: value, status: undefined } }))))))));
|
|
@@ -4646,14 +4659,14 @@ const renderValue = (type, value) => {
|
|
|
4646
4659
|
otelDistroName: '',
|
|
4647
4660
|
});
|
|
4648
4661
|
const awaitingInstrumentation = !instrumented && !instrumentationMessage;
|
|
4649
|
-
return (React.createElement(DataTab, { title: containerName, subTitle: `${language === PROGRAMMING_LANGUAGES.JAVASCRIPT ? 'Node.js' : capitalizeFirstLetter(language)}` + (!!runtimeVersion ? ` • Runtime Version: ${runtimeVersion}` : ''),
|
|
4662
|
+
return (React.createElement(DataTab, { title: containerName, subTitle: `${language === PROGRAMMING_LANGUAGES.JAVASCRIPT ? 'Node.js' : capitalizeFirstLetter(language)}` + (!!runtimeVersion ? ` • Runtime Version: ${runtimeVersion}` : ''), icon: getProgrammingLanguageIcon(language), isExtended: !!instrumentationMessage, renderExtended: () => {
|
|
4650
4663
|
if (!!instrumentationMessage) {
|
|
4651
4664
|
return (React.createElement(AlignCenter, null,
|
|
4652
|
-
React.createElement(Status, { status:
|
|
4665
|
+
React.createElement(Status, { status: STATUS_TYPE.INFO, title: splitCamelString(instrumentationMessage) })));
|
|
4653
4666
|
}
|
|
4654
4667
|
return null;
|
|
4655
4668
|
}, renderActions: () => {
|
|
4656
|
-
return (React.createElement(Status, { status: instrumented ?
|
|
4669
|
+
return (React.createElement(Status, { status: instrumented ? STATUS_TYPE.SUCCESS : awaitingInstrumentation ? STATUS_TYPE.WARNING : STATUS_TYPE.ERROR, title: instrumented ? 'Instrumented' : awaitingInstrumentation ? 'Instrumenting...' : 'Uninstrumented', subtitle: otelDistroName, withIcon: true, withBorder: true }));
|
|
4657
4670
|
} }));
|
|
4658
4671
|
}
|
|
4659
4672
|
default: {
|
|
@@ -4671,18 +4684,15 @@ const CardContainer = styled.div `
|
|
|
4671
4684
|
padding: 24px;
|
|
4672
4685
|
border-radius: 24px;
|
|
4673
4686
|
border: 1px solid ${({ theme }) => theme.colors.border};
|
|
4674
|
-
|
|
4687
|
+
background-color: ${({ theme, $hovered }) => ($hovered ? theme.colors.secondary + Theme.opacity.hex['010'] : 'transparent')};
|
|
4675
4688
|
transition: background-color 0.3s;
|
|
4676
|
-
${({ $clickable, theme }) => $clickable &&
|
|
4677
|
-
`&:hover {
|
|
4678
|
-
background-color: ${theme.colors.secondary + Theme.opacity.hex['010']};
|
|
4679
|
-
}`}
|
|
4680
4689
|
`;
|
|
4681
4690
|
const Header$1 = styled.div `
|
|
4682
4691
|
width: 100%;
|
|
4683
4692
|
display: flex;
|
|
4684
4693
|
flex-direction: column;
|
|
4685
4694
|
gap: 4px;
|
|
4695
|
+
cursor: ${({ $clickable }) => ($clickable ? 'pointer' : 'default')};
|
|
4686
4696
|
`;
|
|
4687
4697
|
const Title$8 = styled(Text) `
|
|
4688
4698
|
width: 100%;
|
|
@@ -4701,8 +4711,9 @@ const ActionWrapper = styled(FlexRow) `
|
|
|
4701
4711
|
`;
|
|
4702
4712
|
const DataCard = ({ title = 'Details', titleBadge, description, action: Action, withExtend, data }) => {
|
|
4703
4713
|
const [extend, setExtend] = useState(false);
|
|
4704
|
-
|
|
4705
|
-
|
|
4714
|
+
const [hovered, setHovered] = useState(false);
|
|
4715
|
+
return (React.createElement(CardContainer, { "$hovered": hovered },
|
|
4716
|
+
!!title || !!description || !!Action ? (React.createElement(Header$1, { "$clickable": withExtend || false, onClick: () => withExtend && setExtend((prev) => !prev), onMouseEnter: () => withExtend && setHovered(true), onMouseLeave: () => withExtend && setHovered(false) },
|
|
4706
4717
|
(!!title || !!Action) && (React.createElement(Title$8, null,
|
|
4707
4718
|
title,
|
|
4708
4719
|
titleBadge !== undefined && React.createElement(Badge, { label: titleBadge }),
|
|
@@ -4717,7 +4728,7 @@ const DeleteWarning = ({ isOpen, noOverlay, name, type, isLastItem, onApprove, o
|
|
|
4717
4728
|
const actionText = type === ENTITY_TYPES.SOURCE ? 'uninstrument' : 'delete';
|
|
4718
4729
|
return (React.createElement(WarningModal, { isOpen: isOpen, noOverlay: noOverlay, title: `${actionText.charAt(0).toUpperCase() + actionText.substring(1)}${name ? ` ${name}` : ''}`, description: `Are you sure you want to ${actionText}?`, note: isLastItem
|
|
4719
4730
|
? {
|
|
4720
|
-
type:
|
|
4731
|
+
type: STATUS_TYPE.WARNING,
|
|
4721
4732
|
title: `You're about to ${actionText} the last ${type || name}`,
|
|
4722
4733
|
message: '',
|
|
4723
4734
|
}
|
|
@@ -4786,11 +4797,20 @@ const Tab = styled(Text) `
|
|
|
4786
4797
|
gap: 8px;
|
|
4787
4798
|
`;
|
|
4788
4799
|
const DrawerHeader = ({ onClose, icon, iconSrc, title, titleTooltip, replaceTitleWith: ReplaceTitleWith, actionButtons = [], tabs }) => {
|
|
4800
|
+
const renderReplaceTitleWith = () => {
|
|
4801
|
+
if (typeof ReplaceTitleWith === 'function') {
|
|
4802
|
+
return React.createElement(ReplaceTitleWith, null);
|
|
4803
|
+
}
|
|
4804
|
+
if (ReplaceTitleWith) {
|
|
4805
|
+
return ReplaceTitleWith;
|
|
4806
|
+
}
|
|
4807
|
+
return null;
|
|
4808
|
+
};
|
|
4789
4809
|
return (React.createElement(Container$j, null,
|
|
4790
4810
|
React.createElement(TopRow, null,
|
|
4791
4811
|
React.createElement(SectionItemsWrapper, null,
|
|
4792
4812
|
(!!icon || !!iconSrc) && React.createElement(IconWrapped, { icon: icon, src: iconSrc, alt: 'Drawer Item' }),
|
|
4793
|
-
|
|
4813
|
+
renderReplaceTitleWith() || (React.createElement(Tooltip, { text: titleTooltip, withIcon: true }, title && React.createElement(Title$7, null, title)))),
|
|
4794
4814
|
React.createElement(SectionItemsWrapper, { "$gap": 2 },
|
|
4795
4815
|
actionButtons.map((btn, i) => (React.createElement(ActionButton$1, { key: `header-action-button-${i}`, ...btn }))),
|
|
4796
4816
|
React.createElement(CloseButton, { "data-id": 'drawer-close', variant: 'secondary', onClick: onClose },
|
|
@@ -29574,4 +29594,4 @@ const WarningModal = ({ isOpen, noOverlay, title = '', description = '', note, a
|
|
|
29574
29594
|
React.createElement(FooterButton, { "data-id": 'deny', variant: denyButton.variant || 'secondary', onClick: onDeny }, denyButton.text)))));
|
|
29575
29595
|
};
|
|
29576
29596
|
|
|
29577
|
-
export { FlexColumn as $, AutocompleteInput as A, Button$4 as B, CancelWarning as C, DataCard as D, ExtendArrow as E, FadeLoader as F, MonitorsIcons as G, Header as H, IconButton as I, NoDataFound as J, KeyValueInputsList as K, NotificationNote as L, Modal as M, NavigationButtons as N, Segment as O, SkeletonLoader as P, Status as Q, Stepper as R, SectionTitle as S, ToggleCodeComponent as T, Text as U, TextArea as V, Toggle as W, Tooltip as X, TraceLoader as Y, WarningModal as Z, FlexRow as _, Badge as a, CenterThis as a0, Overlay as a1, ModalBody as a2,
|
|
29597
|
+
export { FlexColumn as $, AutocompleteInput as A, Button$4 as B, CancelWarning as C, DataCard as D, ExtendArrow as E, FadeLoader as F, MonitorsIcons as G, Header as H, IconButton as I, NoDataFound as J, KeyValueInputsList as K, NotificationNote as L, Modal as M, NavigationButtons as N, Segment as O, SkeletonLoader as P, Status as Q, Stepper as R, SectionTitle as S, ToggleCodeComponent as T, Text as U, TextArea as V, Toggle as W, Tooltip as X, TraceLoader as Y, WarningModal as Z, FlexRow as _, Badge as a, CenterThis as a0, Overlay as a1, ModalBody as a2, TableContainer as a3, TableTitleWrap as a4, TableWrap as a5, getDefaultExportFromCjs as a6, Checkbox as b, Code as c, ConditionDetails as d, DataCardFields as e, DATA_CARD_FIELD_TYPES as f, DataTab as g, DeleteWarning as h, Divider as i, DocsButton as j, Drawer as k, DrawerHeader as l, DrawerFooter as m, Dropdown as n, FieldError as o, FieldLabel as p, IconGroup as q, IconTitleBadge as r, IconWrapped as s, IconsNav as t, ImageControlled as u, Input as v, InputList as w, InputTable as x, InteractiveTable as y, MonitorsCheckboxes as z };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as getProgrammingLanguageIcon } from './index-
|
|
1
|
+
import { STATUS_TYPE, OTHER_STATUS, ENTITY_TYPES, PLATFORM_TYPE } from './types.js';
|
|
2
|
+
import { a as getProgrammingLanguageIcon } from './index-DB1gmCsH.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import './index-DIcomki-.js';
|
|
5
5
|
import 'styled-components';
|
|
6
6
|
import { R as RulesIcon, A as ActionsIcon, D as DestinationsIcon, S as SourcesIcon, V as VmLogo } from './index-BjJpYtF1.js';
|
|
7
|
-
import { K as K8sLogo } from './index-BGlk5VhF.js';
|
|
7
|
+
import { O as OdigosLogo, K as K8sLogo } from './index-BGlk5VhF.js';
|
|
8
8
|
|
|
9
9
|
const compareCondition = (renderCondition, fields) => {
|
|
10
10
|
if (!renderCondition || !renderCondition.length)
|
|
@@ -61,7 +61,7 @@ const filterSources = (sources, filters) => {
|
|
|
61
61
|
if (!!filters.languages?.length)
|
|
62
62
|
filtered = filtered.filter((source) => !!filters.languages?.find((language) => !!source.containers?.find((cont) => cont.language === language.id)));
|
|
63
63
|
if (!!filters.onlyErrors)
|
|
64
|
-
filtered = filtered.filter((source) => !!source.conditions?.find((cond) => cond.status ===
|
|
64
|
+
filtered = filtered.filter((source) => !!source.conditions?.find((cond) => cond.status === STATUS_TYPE.ERROR));
|
|
65
65
|
if (!!filters.errors?.length)
|
|
66
66
|
filtered = filtered.filter((source) => !!filters.errors?.find((error) => !!source.conditions?.find((cond) => cond.message === error.id)));
|
|
67
67
|
return filtered;
|
|
@@ -77,11 +77,11 @@ const formatBytes = (bytes) => {
|
|
|
77
77
|
};
|
|
78
78
|
|
|
79
79
|
const getConditionsBooleans = (conditions) => {
|
|
80
|
-
const hasErrors = !!conditions?.find(({ status }) => status ===
|
|
81
|
-
const hasWarnings = !!conditions?.find(({ status }) => status ===
|
|
80
|
+
const hasErrors = !!conditions?.find(({ status }) => status === STATUS_TYPE.ERROR);
|
|
81
|
+
const hasWarnings = !!conditions?.find(({ status }) => status === STATUS_TYPE.WARNING);
|
|
82
82
|
const hasDisableds = !!conditions?.find(({ status }) => status === OTHER_STATUS.DISABLED);
|
|
83
83
|
const hasLoadings = !!conditions?.find(({ status }) => status === OTHER_STATUS.LOADING);
|
|
84
|
-
const priorotizedStatus = hasErrors ?
|
|
84
|
+
const priorotizedStatus = hasErrors ? STATUS_TYPE.ERROR : hasWarnings ? STATUS_TYPE.WARNING : hasDisableds ? STATUS_TYPE.INFO : undefined;
|
|
85
85
|
return {
|
|
86
86
|
hasErrors,
|
|
87
87
|
hasWarnings,
|
|
@@ -154,6 +154,8 @@ const getMetricForEntity = (metrics, entityType, entityId) => {
|
|
|
154
154
|
};
|
|
155
155
|
|
|
156
156
|
const getPlatformIcon = (type) => {
|
|
157
|
+
if (!type)
|
|
158
|
+
return OdigosLogo;
|
|
157
159
|
const LOGOS = {
|
|
158
160
|
[PLATFORM_TYPE.K8S]: K8sLogo,
|
|
159
161
|
[PLATFORM_TYPE.VM]: VmLogo,
|
|
@@ -162,6 +164,8 @@ const getPlatformIcon = (type) => {
|
|
|
162
164
|
};
|
|
163
165
|
|
|
164
166
|
const getPlatformLabel = (type) => {
|
|
167
|
+
if (!type)
|
|
168
|
+
return 'Unknown';
|
|
165
169
|
const LABELS = {
|
|
166
170
|
[PLATFORM_TYPE.K8S]: 'Kubernetes Cluster',
|
|
167
171
|
[PLATFORM_TYPE.VM]: 'Virtual Machine',
|