@odigos/ui-kit 0.0.10 → 0.0.12

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.
Files changed (89) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/lib/components/badge/index.d.ts +2 -2
  3. package/lib/components/data-card/data-card-fields/index.d.ts +14 -14
  4. package/lib/components/data-card/index.d.ts +2 -2
  5. package/lib/components/data-tab/index.d.ts +3 -3
  6. package/lib/components/delete-warning/index.d.ts +2 -2
  7. package/lib/components/describe-row/index.d.ts +2 -2
  8. package/lib/components/divider/index.d.ts +2 -2
  9. package/lib/components/icon-group/index.d.ts +2 -2
  10. package/lib/components/icon-wrapped/index.d.ts +2 -2
  11. package/lib/components/interactive-table/index.d.ts +9 -8
  12. package/lib/components/interactive-table/table-row.d.ts +13 -0
  13. package/lib/components/monitors-checkboxes/index.d.ts +4 -4
  14. package/lib/components/monitors-icons/index.d.ts +2 -2
  15. package/lib/components/notification-note/index.d.ts +2 -2
  16. package/lib/components/status/index.d.ts +2 -2
  17. package/lib/components/stepper/index.d.ts +1 -1
  18. package/lib/components/warning-modal/index.d.ts +2 -2
  19. package/lib/components.js +8 -8
  20. package/lib/constants/strings/index.d.ts +10 -10
  21. package/lib/constants.js +4 -4
  22. package/lib/containers/action-drawer/build-card.d.ts +2 -2
  23. package/lib/containers/action-drawer/index.d.ts +2 -2
  24. package/lib/containers/action-form/custom-fields/index.d.ts +2 -2
  25. package/lib/containers/data-flow/edges/labeled-edge.d.ts +2 -2
  26. package/lib/containers/data-flow/helpers/get-main-container-language.d.ts +2 -2
  27. package/lib/containers/data-flow/helpers/get-node-positions.d.ts +2 -2
  28. package/lib/containers/data-flow/nodes/add-node.d.ts +3 -3
  29. package/lib/containers/data-flow/nodes/base-node.d.ts +5 -5
  30. package/lib/containers/data-flow/nodes/edged-node.d.ts +2 -2
  31. package/lib/containers/data-flow/nodes/frame-node.d.ts +2 -2
  32. package/lib/containers/data-flow/nodes/header-node.d.ts +2 -2
  33. package/lib/containers/data-flow/nodes/scroll-node.d.ts +5 -5
  34. package/lib/containers/data-flow/nodes/skeleton-node.d.ts +2 -2
  35. package/lib/containers/data-flow-actions-menu/index.d.ts +2 -2
  36. package/lib/containers/data-flow-actions-menu/search/search-results/builder.d.ts +2 -2
  37. package/lib/containers/destination-drawer/build-card.d.ts +2 -2
  38. package/lib/containers/destination-form/test-connection/index.d.ts +2 -2
  39. package/lib/containers/instrumentation-rule-drawer/build-card.d.ts +2 -2
  40. package/lib/containers/instrumentation-rule-form/custom-fields/index.d.ts +2 -2
  41. package/lib/containers/side-nav/index.d.ts +8 -8
  42. package/lib/containers/source-drawer/build-card.d.ts +1 -1
  43. package/lib/containers.js +373 -366
  44. package/lib/data/sources/index.d.ts +3 -3
  45. package/lib/functions/get-action-icon/index.d.ts +2 -2
  46. package/lib/functions/get-conditions-booleans/index.d.ts +2 -2
  47. package/lib/functions/get-entity-icon/index.d.ts +2 -2
  48. package/lib/functions/get-entity-label/index.d.ts +2 -2
  49. package/lib/functions/get-id-from-sse-target/index.d.ts +2 -2
  50. package/lib/functions/get-instrumentation-rule-icon/index.d.ts +2 -2
  51. package/lib/functions/get-metric-for-entity/index.d.ts +2 -2
  52. package/lib/functions/get-monitor-icon/index.d.ts +2 -2
  53. package/lib/functions/get-platform-icon/index.d.ts +2 -2
  54. package/lib/functions/get-platform-label/index.d.ts +2 -2
  55. package/lib/functions/get-programming-language-icon/index.d.ts +2 -2
  56. package/lib/functions/get-sse-target-from-id/index.d.ts +2 -2
  57. package/lib/functions/get-status-icon/index.d.ts +2 -2
  58. package/lib/functions/index.d.ts +0 -1
  59. package/lib/functions.js +9 -20
  60. package/lib/hooks.js +7 -7
  61. package/lib/icons.js +2 -2
  62. package/lib/{index-BFct3S32.js → index-7-KCQK-x.js} +2 -2
  63. package/lib/{index-ixs381n-.js → index-9ObpINp4.js} +4 -4
  64. package/lib/{index-Do8ODRlA.js → index-B5wdZoej.js} +106 -111
  65. package/lib/{index-eF2JXMVR.js → index-BtuW12KL.js} +22 -22
  66. package/lib/{index-CZe2VX28.js → index-CJKFedQi.js} +31 -31
  67. package/lib/{index-DB1gmCsH.js → index-CYn62h8x.js} +33 -33
  68. package/lib/{index-DnmWFsTQ.js → index-C_0J5P9M.js} +10 -10
  69. package/lib/{index-DIcomki-.js → index-DYEcdkUF.js} +19 -19
  70. package/lib/{index-BumPE6cF.js → index-Db_ZDrEr.js} +13 -13
  71. package/lib/store/useDrawerStore.d.ts +2 -2
  72. package/lib/store/useEntityStore.d.ts +5 -5
  73. package/lib/store/usePendingStore.d.ts +2 -2
  74. package/lib/store.js +1 -1
  75. package/lib/theme.js +1 -1
  76. package/lib/types/actions/index.d.ts +14 -14
  77. package/lib/types/common/index.d.ts +80 -76
  78. package/lib/types/connection/index.d.ts +3 -3
  79. package/lib/types/data-flow/index.d.ts +15 -15
  80. package/lib/types/destinations/index.d.ts +2 -2
  81. package/lib/types/instrumentation-rules/index.d.ts +28 -28
  82. package/lib/types/signals/index.d.ts +5 -5
  83. package/lib/types/sources/index.d.ts +7 -7
  84. package/lib/types.js +164 -159
  85. package/lib/{useSourceSelectionFormData-CxdOP9FT.js → useSourceSelectionFormData-BnlRp8m3.js} +40 -40
  86. package/lib/{useTransition-Dfxjcy-C.js → useTransition-CFmm4scp.js} +23 -23
  87. package/package.json +1 -1
  88. package/lib/components/interactive-table/row.d.ts +0 -13
  89. package/lib/functions/derive-type-from-rule/index.d.ts +0 -2
@@ -1,7 +1,7 @@
1
- import { STATUS_TYPE, OTHER_STATUS, ENTITY_TYPES, PLATFORM_TYPE } from './types.js';
2
- import { a as getProgrammingLanguageIcon } from './index-DB1gmCsH.js';
1
+ import { StatusType, OtherStatus, EntityTypes, PlatformType } from './types.js';
2
+ import { a as getProgrammingLanguageIcon } from './index-CYn62h8x.js';
3
3
  import 'react';
4
- import './index-DIcomki-.js';
4
+ import './index-DYEcdkUF.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
7
  import { O as OdigosLogo, K as K8sLogo } from './index-BGlk5VhF.js';
@@ -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 === STATUS_TYPE.ERROR));
64
+ filtered = filtered.filter((source) => !!source.conditions?.find((cond) => cond.status === StatusType.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 === STATUS_TYPE.ERROR);
81
- const hasWarnings = !!conditions?.find(({ status }) => status === STATUS_TYPE.WARNING);
82
- const hasDisableds = !!conditions?.find(({ status }) => status === OTHER_STATUS.DISABLED);
83
- const hasLoadings = !!conditions?.find(({ status }) => status === OTHER_STATUS.LOADING);
84
- const priorotizedStatus = hasErrors ? STATUS_TYPE.ERROR : hasWarnings ? STATUS_TYPE.WARNING : hasDisableds ? STATUS_TYPE.INFO : undefined;
80
+ const hasErrors = !!conditions?.find(({ status }) => status === StatusType.Error);
81
+ const hasWarnings = !!conditions?.find(({ status }) => status === StatusType.Warning);
82
+ const hasDisableds = !!conditions?.find(({ status }) => status === OtherStatus.Disabled);
83
+ const hasLoadings = !!conditions?.find(({ status }) => status === OtherStatus.Loading);
84
+ const priorotizedStatus = hasErrors ? StatusType.Error : hasWarnings ? StatusType.Warning : hasDisableds ? StatusType.Info : undefined;
85
85
  return {
86
86
  hasErrors,
87
87
  hasWarnings,
@@ -104,10 +104,10 @@ const getContainersIcons = (containers) => {
104
104
 
105
105
  const getEntityIcon = (type) => {
106
106
  const LOGOS = {
107
- [ENTITY_TYPES.SOURCE]: SourcesIcon,
108
- [ENTITY_TYPES.DESTINATION]: DestinationsIcon,
109
- [ENTITY_TYPES.ACTION]: ActionsIcon,
110
- [ENTITY_TYPES.INSTRUMENTATION_RULE]: RulesIcon,
107
+ [EntityTypes.Source]: SourcesIcon,
108
+ [EntityTypes.Destination]: DestinationsIcon,
109
+ [EntityTypes.Action]: ActionsIcon,
110
+ [EntityTypes.InstrumentationRule]: RulesIcon,
111
111
  };
112
112
  return LOGOS[type];
113
113
  };
@@ -117,22 +117,22 @@ const getEntityLabel = (entity, entityType, options) => {
117
117
  let type = '';
118
118
  let name = '';
119
119
  switch (entityType) {
120
- case ENTITY_TYPES.INSTRUMENTATION_RULE:
120
+ case EntityTypes.InstrumentationRule:
121
121
  const rule = entity;
122
122
  type = rule.type;
123
123
  name = rule.ruleName;
124
124
  break;
125
- case ENTITY_TYPES.SOURCE:
125
+ case EntityTypes.Source:
126
126
  const source = entity;
127
127
  type = source.name;
128
128
  name = source.otelServiceName;
129
129
  break;
130
- case ENTITY_TYPES.ACTION:
130
+ case EntityTypes.Action:
131
131
  const action = entity;
132
132
  type = action.type;
133
133
  name = action.spec.actionName;
134
134
  break;
135
- case ENTITY_TYPES.DESTINATION:
135
+ case EntityTypes.Destination:
136
136
  const destination = entity;
137
137
  type = destination.destinationType.displayName;
138
138
  name = destination.name;
@@ -147,7 +147,7 @@ const getEntityLabel = (entity, entityType, options) => {
147
147
  };
148
148
 
149
149
  const getMetricForEntity = (metrics, entityType, entityId) => {
150
- const metric = entityType === ENTITY_TYPES.SOURCE
150
+ const metric = entityType === EntityTypes.Source
151
151
  ? metrics?.sources.find((m) => m.kind === entityId.kind && m.name === entityId.name && m.namespace === entityId.namespace)
152
152
  : metrics?.destinations.find((m) => m.id === entityId);
153
153
  return metric || { throughput: 0 };
@@ -157,8 +157,8 @@ const getPlatformIcon = (type) => {
157
157
  if (!type)
158
158
  return OdigosLogo;
159
159
  const LOGOS = {
160
- [PLATFORM_TYPE.K8S]: K8sLogo,
161
- [PLATFORM_TYPE.VM]: VmLogo,
160
+ [PlatformType.K8s]: K8sLogo,
161
+ [PlatformType.Vm]: VmLogo,
162
162
  };
163
163
  return LOGOS[type];
164
164
  };
@@ -167,8 +167,8 @@ const getPlatformLabel = (type) => {
167
167
  if (!type)
168
168
  return 'Unknown';
169
169
  const LABELS = {
170
- [PLATFORM_TYPE.K8S]: 'Kubernetes Cluster',
171
- [PLATFORM_TYPE.VM]: 'Virtual Machine',
170
+ [PlatformType.K8s]: 'Kubernetes Cluster',
171
+ [PlatformType.Vm]: 'Virtual Machine',
172
172
  };
173
173
  return LABELS[type];
174
174
  };
@@ -1,7 +1,7 @@
1
- import { SIGNAL_TYPE, ACTION_TYPE, INSTRUMENTATION_RULE_TYPE } from './types.js';
2
- import { g as getActionIcon, a as getInstrumentationRuleIcon } from './index-BumPE6cF.js';
1
+ import { SignalType, ActionType, InstrumentationRuleType } from './types.js';
2
+ import { g as getActionIcon, a as getInstrumentationRuleIcon } from './index-Db_ZDrEr.js';
3
3
  import 'react';
4
- import './index-DIcomki-.js';
4
+ import './index-DYEcdkUF.js';
5
5
  import 'styled-components';
6
6
 
7
7
  const ACTION_OPTIONS = [
@@ -10,47 +10,47 @@ const ACTION_OPTIONS = [
10
10
  icon: getActionIcon('attributes'),
11
11
  items: [
12
12
  {
13
- type: ACTION_TYPE.K8S_ATTRIBUTES,
14
- icon: getActionIcon(ACTION_TYPE.K8S_ATTRIBUTES),
13
+ type: ActionType.K8sAttributes,
14
+ icon: getActionIcon(ActionType.K8sAttributes),
15
15
  label: 'Kubernetes Attributes',
16
16
  description: 'Add dynamic k8s resource attributes to your data.',
17
- allowedSignals: [SIGNAL_TYPE.TRACES, SIGNAL_TYPE.METRICS, SIGNAL_TYPE.LOGS],
17
+ allowedSignals: [SignalType.Traces, SignalType.Metrics, SignalType.Logs],
18
18
  docsEndpoint: '/pipeline/actions/attributes/k8sattributes',
19
19
  docsDescription: 'This action adds kubernetes related resource attributes to spans, metrics data points and log records.',
20
20
  },
21
21
  {
22
- type: ACTION_TYPE.ADD_CLUSTER_INFO,
23
- icon: getActionIcon(ACTION_TYPE.ADD_CLUSTER_INFO),
22
+ type: ActionType.AddClusterInfo,
23
+ icon: getActionIcon(ActionType.AddClusterInfo),
24
24
  label: 'Add Cluster Info',
25
25
  description: 'Add static cluster-scoped attributes to your data.',
26
- allowedSignals: [SIGNAL_TYPE.TRACES, SIGNAL_TYPE.METRICS, SIGNAL_TYPE.LOGS],
26
+ allowedSignals: [SignalType.Traces, SignalType.Metrics, SignalType.Logs],
27
27
  docsEndpoint: '/pipeline/actions/attributes/addclusterinfo',
28
28
  docsDescription: 'This action adds static resource attributes to spans, metrics data points and log records. It is useful to add cluster-wide attributes to all telemetry signals.',
29
29
  },
30
30
  {
31
- type: ACTION_TYPE.DELETE_ATTRIBUTES,
32
- icon: getActionIcon(ACTION_TYPE.DELETE_ATTRIBUTES),
31
+ type: ActionType.DeleteAttributes,
32
+ icon: getActionIcon(ActionType.DeleteAttributes),
33
33
  label: 'Delete Attribute',
34
34
  description: 'Delete attributes from logs, metrics, and traces.',
35
- allowedSignals: [SIGNAL_TYPE.TRACES, SIGNAL_TYPE.METRICS, SIGNAL_TYPE.LOGS],
35
+ allowedSignals: [SignalType.Traces, SignalType.Metrics, SignalType.Logs],
36
36
  docsEndpoint: '/pipeline/actions/attributes/deleteattribute',
37
37
  docsDescription: 'This action will delete the specified attributes from all telemetry signals that are specified in the signals field, regardless of the source, or any other condition.',
38
38
  },
39
39
  {
40
- type: ACTION_TYPE.RENAME_ATTRIBUTES,
41
- icon: getActionIcon(ACTION_TYPE.RENAME_ATTRIBUTES),
40
+ type: ActionType.RenameAttributes,
41
+ icon: getActionIcon(ActionType.RenameAttributes),
42
42
  label: 'Rename Attribute',
43
43
  description: 'Rename attributes in logs, metrics, and traces.',
44
- allowedSignals: [SIGNAL_TYPE.TRACES, SIGNAL_TYPE.METRICS, SIGNAL_TYPE.LOGS],
44
+ allowedSignals: [SignalType.Traces, SignalType.Metrics, SignalType.Logs],
45
45
  docsEndpoint: '/pipeline/actions/attributes/renameattribute',
46
46
  docsDescription: 'This action will rename the specified attributes from all telemetry signals that are specified in the signals field, regardless of the source, or any other condition.',
47
47
  },
48
48
  {
49
- type: ACTION_TYPE.PII_MASKING,
50
- icon: getActionIcon(ACTION_TYPE.PII_MASKING),
49
+ type: ActionType.PiiMasking,
50
+ icon: getActionIcon(ActionType.PiiMasking),
51
51
  label: 'PII Masking',
52
52
  description: 'Mask PII data in your traces.',
53
- allowedSignals: [SIGNAL_TYPE.TRACES],
53
+ allowedSignals: [SignalType.Traces],
54
54
  docsEndpoint: '/pipeline/actions/attributes/piimasking',
55
55
  docsDescription: 'This action processes a list of PII categories to be masked from the traces.',
56
56
  },
@@ -61,29 +61,29 @@ const ACTION_OPTIONS = [
61
61
  icon: getActionIcon('sampler'),
62
62
  items: [
63
63
  {
64
- type: ACTION_TYPE.ERROR_SAMPLER,
64
+ type: ActionType.ErrorSampler,
65
65
  icon: getActionIcon('sampler'),
66
66
  label: 'Error Sampler',
67
67
  description: 'Sample errors based on percentage.',
68
- allowedSignals: [SIGNAL_TYPE.TRACES],
68
+ allowedSignals: [SignalType.Traces],
69
69
  docsEndpoint: '/pipeline/actions/sampling/errorsampler',
70
70
  docsDescription: 'This action is a Global Action that supports error sampling by filtering out non-error traces.',
71
71
  },
72
72
  {
73
- type: ACTION_TYPE.LATENCY_SAMPLER,
73
+ type: ActionType.LatencySampler,
74
74
  icon: getActionIcon('sampler'),
75
75
  label: 'Latency Sampler',
76
76
  description: 'Add latency to your traces.',
77
- allowedSignals: [SIGNAL_TYPE.TRACES],
77
+ allowedSignals: [SignalType.Traces],
78
78
  docsEndpoint: '/pipeline/actions/sampling/latencysampler',
79
79
  docsDescription: 'This action is an Endpoint Action that samples traces based on their duration for a specific service and endpoint (HTTP route) filter.',
80
80
  },
81
81
  {
82
- type: ACTION_TYPE.PROBABILISTIC_SAMPLER,
82
+ type: ActionType.ProbabilisticSampler,
83
83
  icon: getActionIcon('sampler'),
84
84
  label: 'Probabilistic Sampler',
85
85
  description: 'Sample traces based on percentage.',
86
- allowedSignals: [SIGNAL_TYPE.TRACES],
86
+ allowedSignals: [SignalType.Traces],
87
87
  docsEndpoint: '/pipeline/actions/sampling/probabilisticsampler',
88
88
  docsDescription: 'This action supports probabilistic sampling based on a configured sampling percentage applied to the TraceID.',
89
89
  },
@@ -93,16 +93,16 @@ const ACTION_OPTIONS = [
93
93
 
94
94
  const INSTRUMENTATION_RULE_OPTIONS = [
95
95
  {
96
- type: INSTRUMENTATION_RULE_TYPE.PAYLOAD_COLLECTION,
97
- icon: getInstrumentationRuleIcon(INSTRUMENTATION_RULE_TYPE.PAYLOAD_COLLECTION),
96
+ type: InstrumentationRuleType.PayloadCollection,
97
+ icon: getInstrumentationRuleIcon(InstrumentationRuleType.PayloadCollection),
98
98
  label: 'Payload Collection',
99
99
  description: 'Collect span attributes containing payload data to traces.',
100
100
  docsEndpoint: '/pipeline/rules/payloadcollection',
101
101
  docsDescription: 'The “Payload Collection” Rule can be used to add span attributes containing payload data to traces.',
102
102
  },
103
103
  {
104
- type: INSTRUMENTATION_RULE_TYPE.CODE_ATTRIBUTES,
105
- icon: getInstrumentationRuleIcon(INSTRUMENTATION_RULE_TYPE.CODE_ATTRIBUTES),
104
+ type: InstrumentationRuleType.CodeAttributes,
105
+ icon: getInstrumentationRuleIcon(InstrumentationRuleType.CodeAttributes),
106
106
  label: 'Code Attributes',
107
107
  description: 'Collect code attributes containing payload data to traces.',
108
108
  docsEndpoint: '/pipeline/rules/codeattributes',
@@ -112,15 +112,15 @@ const INSTRUMENTATION_RULE_OPTIONS = [
112
112
 
113
113
  const MONITORS_OPTIONS = [
114
114
  {
115
- id: SIGNAL_TYPE.LOGS,
115
+ id: SignalType.Logs,
116
116
  value: 'Logs',
117
117
  },
118
118
  {
119
- id: SIGNAL_TYPE.METRICS,
119
+ id: SignalType.Metrics,
120
120
  value: 'Metrics',
121
121
  },
122
122
  {
123
- id: SIGNAL_TYPE.TRACES,
123
+ id: SignalType.Traces,
124
124
  value: 'Traces',
125
125
  },
126
126
  ];
@@ -1,9 +1,9 @@
1
- import { PROGRAMMING_LANGUAGES, SIGNAL_TYPE, STATUS_TYPE } from './types.js';
1
+ import { ProgrammingLanguages, SignalType, StatusType } from './types.js';
2
2
  import 'react';
3
- import './index-DIcomki-.js';
3
+ import './index-DYEcdkUF.js';
4
4
  import 'styled-components';
5
5
  import { O as OdigosLogo } from './index-BGlk5VhF.js';
6
- import { K as KafkaLogo, R as RedisLogo, P as PostgresLogo, N as NginxLogo, M as MysqlLogo, E as ElixirLogo, S as SwiftLogo, a as RustLogo, b as RubyLogo, c as PhpLogo, C as CPlusPlusLogo, d as CSharpLogo, D as DotnetLogo, e as PythonLogo, f as NodejsLogo, G as GoLogo, J as JavaLogo, T as TracesIcon, g as MetricsIcon, L as LogsIcon, I as InfoIcon, W as WarningTriangleIcon, h as ErrorTriangleIcon, i as CheckCircledIcon } from './index-ixs381n-.js';
6
+ import { K as KafkaLogo, R as RedisLogo, P as PostgresLogo, N as NginxLogo, M as MysqlLogo, E as ElixirLogo, S as SwiftLogo, a as RustLogo, b as RubyLogo, c as PhpLogo, C as CPlusPlusLogo, d as CSharpLogo, D as DotnetLogo, e as PythonLogo, f as NodejsLogo, G as GoLogo, J as JavaLogo, T as TracesIcon, g as MetricsIcon, L as LogsIcon, I as InfoIcon, W as WarningTriangleIcon, h as ErrorTriangleIcon, i as CheckCircledIcon } from './index-9ObpINp4.js';
7
7
 
8
8
  const capitalizeFirstLetter = (string) => {
9
9
  return string.charAt(0).toUpperCase() + string.slice(1);
@@ -73,48 +73,48 @@ const flattenObjectKeys = (obj, prefix = '', result = {}) => {
73
73
 
74
74
  const getProgrammingLanguageIcon = (language) => {
75
75
  const LOGOS = {
76
- [PROGRAMMING_LANGUAGES.JAVA]: JavaLogo,
77
- [PROGRAMMING_LANGUAGES.GO]: GoLogo,
78
- [PROGRAMMING_LANGUAGES.JAVASCRIPT]: NodejsLogo,
79
- [PROGRAMMING_LANGUAGES.PYTHON]: PythonLogo,
80
- [PROGRAMMING_LANGUAGES.DOTNET]: DotnetLogo,
81
- [PROGRAMMING_LANGUAGES.CSHARP]: CSharpLogo,
82
- [PROGRAMMING_LANGUAGES.CPLUSPLUS]: CPlusPlusLogo,
83
- [PROGRAMMING_LANGUAGES.PHP]: PhpLogo,
84
- [PROGRAMMING_LANGUAGES.RUBY]: RubyLogo,
85
- [PROGRAMMING_LANGUAGES.RUST]: RustLogo,
86
- [PROGRAMMING_LANGUAGES.SWIFT]: SwiftLogo,
87
- [PROGRAMMING_LANGUAGES.ELIXIR]: ElixirLogo,
88
- [PROGRAMMING_LANGUAGES.MYSQL]: MysqlLogo,
89
- [PROGRAMMING_LANGUAGES.NGINX]: NginxLogo,
90
- [PROGRAMMING_LANGUAGES.POSTGRES]: PostgresLogo,
91
- [PROGRAMMING_LANGUAGES.REDIS]: RedisLogo,
92
- [PROGRAMMING_LANGUAGES.KAFKA]: KafkaLogo,
93
- [PROGRAMMING_LANGUAGES.IGNORED]: OdigosLogo, // TODO: good icon
94
- [PROGRAMMING_LANGUAGES.UNKNOWN]: OdigosLogo, // TODO: good icon
95
- [PROGRAMMING_LANGUAGES.PROCESSING]: OdigosLogo, // TODO: good icon
96
- [PROGRAMMING_LANGUAGES.NO_CONTAINERS]: OdigosLogo, // TODO: good icon
97
- [PROGRAMMING_LANGUAGES.NO_RUNNING_PODS]: OdigosLogo, // TODO: good icon
76
+ [ProgrammingLanguages.Java]: JavaLogo,
77
+ [ProgrammingLanguages.Go]: GoLogo,
78
+ [ProgrammingLanguages.JavaScript]: NodejsLogo,
79
+ [ProgrammingLanguages.Python]: PythonLogo,
80
+ [ProgrammingLanguages.DotNet]: DotnetLogo,
81
+ [ProgrammingLanguages.CSharp]: CSharpLogo,
82
+ [ProgrammingLanguages.CPlusPlus]: CPlusPlusLogo,
83
+ [ProgrammingLanguages.Php]: PhpLogo,
84
+ [ProgrammingLanguages.Ruby]: RubyLogo,
85
+ [ProgrammingLanguages.Rust]: RustLogo,
86
+ [ProgrammingLanguages.Swift]: SwiftLogo,
87
+ [ProgrammingLanguages.Elixir]: ElixirLogo,
88
+ [ProgrammingLanguages.MySql]: MysqlLogo,
89
+ [ProgrammingLanguages.Nginx]: NginxLogo,
90
+ [ProgrammingLanguages.Postgres]: PostgresLogo,
91
+ [ProgrammingLanguages.Redis]: RedisLogo,
92
+ [ProgrammingLanguages.Kafka]: KafkaLogo,
93
+ [ProgrammingLanguages.Ignored]: OdigosLogo, // TODO: good icon
94
+ [ProgrammingLanguages.Unknown]: OdigosLogo, // TODO: good icon
95
+ [ProgrammingLanguages.Processing]: OdigosLogo, // TODO: good icon
96
+ [ProgrammingLanguages.NoContainers]: OdigosLogo, // TODO: good icon
97
+ [ProgrammingLanguages.NoRunningPods]: OdigosLogo, // TODO: good icon
98
98
  };
99
99
  return LOGOS[language];
100
100
  };
101
101
 
102
102
  const getMonitorIcon = (type) => {
103
103
  const LOGOS = {
104
- [SIGNAL_TYPE.LOGS]: LogsIcon,
105
- [SIGNAL_TYPE.METRICS]: MetricsIcon,
106
- [SIGNAL_TYPE.TRACES]: TracesIcon,
104
+ [SignalType.Logs]: LogsIcon,
105
+ [SignalType.Metrics]: MetricsIcon,
106
+ [SignalType.Traces]: TracesIcon,
107
107
  };
108
108
  return LOGOS[type];
109
109
  };
110
110
 
111
111
  const getStatusIcon = (type, theme) => {
112
112
  const LOGOS = {
113
- [STATUS_TYPE.SUCCESS]: (props) => CheckCircledIcon({ fill: theme.text[type], ...props }),
114
- [STATUS_TYPE.ERROR]: (props) => ErrorTriangleIcon({ fill: theme.text[type], ...props }),
115
- [STATUS_TYPE.WARNING]: (props) => WarningTriangleIcon({ fill: theme.text[type], ...props }),
116
- [STATUS_TYPE.INFO]: (props) => InfoIcon({ fill: theme.text[type], ...props }),
117
- [STATUS_TYPE.DEFAULT]: (props) => OdigosLogo({ fill: theme.text[type], ...props }),
113
+ [StatusType.Success]: (props) => CheckCircledIcon({ fill: theme.text[type], ...props }),
114
+ [StatusType.Error]: (props) => ErrorTriangleIcon({ fill: theme.text[type], ...props }),
115
+ [StatusType.Warning]: (props) => WarningTriangleIcon({ fill: theme.text[type], ...props }),
116
+ [StatusType.Info]: (props) => InfoIcon({ fill: theme.text[type], ...props }),
117
+ [StatusType.Default]: (props) => OdigosLogo({ fill: theme.text[type], ...props }),
118
118
  };
119
119
  return LOGOS[type];
120
120
  };
@@ -9,27 +9,27 @@ const FORM_ALERTS = {
9
9
  READONLY_WARNING: "You're not allowed to create/update/delete in readonly mode",
10
10
  };
11
11
  const DISPLAY_TITLES = {
12
- NAMESPACE: 'Namespace',
12
+ Namespace: 'Namespace',
13
13
  NAME: 'Name',
14
14
  KIND: 'Kind',
15
- ACTION: 'Action',
16
- ACTIONS: 'Actions',
15
+ Action: 'Action',
16
+ Actions: 'Actions',
17
17
  ACTION_DETAILS: 'Action Details',
18
- INSTRUMENTATION_RULE: 'Instrumentation Rule',
19
- INSTRUMENTATION_RULES: 'Instrumentation Rules',
18
+ InstrumentationRule: 'Instrumentation Rule',
19
+ InstrumentationRules: 'Instrumentation Rules',
20
20
  INSTRUMENTATION_RULE_DETAILS: 'Instrumentation Rule Details',
21
- DESTINATION: 'Destination',
22
- DESTINATIONS: 'Destinations',
21
+ Destination: 'Destination',
22
+ Destinations: 'Destinations',
23
23
  DESTINATION_DETAILS: 'Destination Details',
24
- SOURCE: 'Source',
25
- SOURCES: 'Sources',
24
+ Source: 'Source',
25
+ Sources: 'Sources',
26
26
  SOURCE_DETAILS: 'Source Details',
27
27
  TYPE: 'Type',
28
28
  NOTES: 'Notes',
29
29
  STATUS: 'Status',
30
30
  READONLY: 'Readonly',
31
31
  LANGUAGE: 'Language',
32
- MONITORS: 'Monitors',
32
+ Monitors: 'Monitors',
33
33
  SIGNALS_FOR_PROCESSING: 'Signals for Processing',
34
34
  MANAGED_BY_PROFILE: 'Managed by Profile',
35
35
  API_TOKEN: 'API Token',
@@ -1,4 +1,4 @@
1
- import { ENTITY_TYPES } from './types.js';
1
+ import { EntityTypes } from './types.js';
2
2
  import React from 'react';
3
3
  import { keyframes } from 'styled-components';
4
4
 
@@ -285,13 +285,13 @@ const useEntityStore = create((set) => ({
285
285
  instrumentationRulesLoading: false,
286
286
  instrumentationRules: [],
287
287
  setEntitiesLoading: (entityType, bool) => {
288
- const KEY = entityType === ENTITY_TYPES.SOURCE
288
+ const KEY = entityType === EntityTypes.Source
289
289
  ? 'sourcesLoading'
290
- : entityType === ENTITY_TYPES.DESTINATION
290
+ : entityType === EntityTypes.Destination
291
291
  ? 'destinationsLoading'
292
- : entityType === ENTITY_TYPES.ACTION
292
+ : entityType === EntityTypes.Action
293
293
  ? 'actionsLoading'
294
- : entityType === ENTITY_TYPES.INSTRUMENTATION_RULE
294
+ : entityType === EntityTypes.InstrumentationRule
295
295
  ? 'instrumentationRulesLoading'
296
296
  : 'NONE';
297
297
  if (KEY === 'NONE')
@@ -299,13 +299,13 @@ const useEntityStore = create((set) => ({
299
299
  set({ [KEY]: bool });
300
300
  },
301
301
  setEntities: (entityType, payload) => {
302
- const KEY = entityType === ENTITY_TYPES.SOURCE
302
+ const KEY = entityType === EntityTypes.Source
303
303
  ? 'sources'
304
- : entityType === ENTITY_TYPES.DESTINATION
304
+ : entityType === EntityTypes.Destination
305
305
  ? 'destinations'
306
- : entityType === ENTITY_TYPES.ACTION
306
+ : entityType === EntityTypes.Action
307
307
  ? 'actions'
308
- : entityType === ENTITY_TYPES.INSTRUMENTATION_RULE
308
+ : entityType === EntityTypes.InstrumentationRule
309
309
  ? 'instrumentationRules'
310
310
  : 'NONE';
311
311
  if (KEY === 'NONE')
@@ -313,13 +313,13 @@ const useEntityStore = create((set) => ({
313
313
  set({ [KEY]: payload });
314
314
  },
315
315
  addEntities: (entityType, entities) => {
316
- const KEY = entityType === ENTITY_TYPES.SOURCE
316
+ const KEY = entityType === EntityTypes.Source
317
317
  ? 'sources'
318
- : entityType === ENTITY_TYPES.DESTINATION
318
+ : entityType === EntityTypes.Destination
319
319
  ? 'destinations'
320
- : entityType === ENTITY_TYPES.ACTION
320
+ : entityType === EntityTypes.Action
321
321
  ? 'actions'
322
- : entityType === ENTITY_TYPES.INSTRUMENTATION_RULE
322
+ : entityType === EntityTypes.InstrumentationRule
323
323
  ? 'instrumentationRules'
324
324
  : 'NONE';
325
325
  if (KEY === 'NONE')
@@ -339,13 +339,13 @@ const useEntityStore = create((set) => ({
339
339
  });
340
340
  },
341
341
  removeEntities: (entityType, entityIds) => {
342
- const KEY = entityType === ENTITY_TYPES.SOURCE
342
+ const KEY = entityType === EntityTypes.Source
343
343
  ? 'sources'
344
- : entityType === ENTITY_TYPES.DESTINATION
344
+ : entityType === EntityTypes.Destination
345
345
  ? 'destinations'
346
- : entityType === ENTITY_TYPES.ACTION
346
+ : entityType === EntityTypes.Action
347
347
  ? 'actions'
348
- : entityType === ENTITY_TYPES.INSTRUMENTATION_RULE
348
+ : entityType === EntityTypes.InstrumentationRule
349
349
  ? 'instrumentationRules'
350
350
  : 'NONE';
351
351
  if (KEY === 'NONE')
@@ -353,7 +353,7 @@ const useEntityStore = create((set) => ({
353
353
  set((state) => {
354
354
  const prev = [...state[KEY]];
355
355
  entityIds.forEach((id) => {
356
- const foundIdx = prev.findIndex((entity) => entityType === ENTITY_TYPES.SOURCE ? JSON.stringify(getEntityId(entity)) === JSON.stringify(getEntityId(id)) : getEntityId(entity) === id);
356
+ const foundIdx = prev.findIndex((entity) => entityType === EntityTypes.Source ? JSON.stringify(getEntityId(entity)) === JSON.stringify(getEntityId(id)) : getEntityId(entity) === id);
357
357
  if (foundIdx !== -1) {
358
358
  prev.splice(foundIdx, 1);
359
359
  }
@@ -520,7 +520,7 @@ const usePendingStore = create((set, get) => ({
520
520
  const pendingItem = pendingItems[i];
521
521
  if (pendingItem.entityType === item.entityType &&
522
522
  (!item.entityId ||
523
- (pendingItem.entityType === ENTITY_TYPES.SOURCE
523
+ (pendingItem.entityType === EntityTypes.Source
524
524
  ? !!pendingItem.entityId &&
525
525
  !!item.entityId &&
526
526
  pendingItem.entityId.namespace === item.entityId.namespace &&
@@ -1,7 +1,7 @@
1
- import { ACTION_TYPE, INSTRUMENTATION_RULE_TYPE } from './types.js';
1
+ import { ActionType, InstrumentationRuleType } from './types.js';
2
2
  import { S as SamplerIcon, P as PiiMaskingIcon, R as RenameAttributeIcon, D as DeleteAttributeIcon, A as AddClusterInfoIcon, K as K8sLogo, O as OdigosLogo, C as CodeAttributesIcon, a as PayloadCollectionIcon } from './index-BGlk5VhF.js';
3
3
  import 'react';
4
- import './index-DIcomki-.js';
4
+ import './index-DYEcdkUF.js';
5
5
  import 'styled-components';
6
6
 
7
7
  const getActionIcon = (type) => {
@@ -13,23 +13,23 @@ const getActionIcon = (type) => {
13
13
  if (isAttributesCategory)
14
14
  return PiiMaskingIcon;
15
15
  const LOGOS = {
16
- [ACTION_TYPE.K8S_ATTRIBUTES]: K8sLogo,
17
- [ACTION_TYPE.ADD_CLUSTER_INFO]: AddClusterInfoIcon,
18
- [ACTION_TYPE.DELETE_ATTRIBUTES]: DeleteAttributeIcon,
19
- [ACTION_TYPE.PII_MASKING]: PiiMaskingIcon,
20
- [ACTION_TYPE.RENAME_ATTRIBUTES]: RenameAttributeIcon,
21
- [ACTION_TYPE.ERROR_SAMPLER]: SamplerIcon,
22
- [ACTION_TYPE.PROBABILISTIC_SAMPLER]: SamplerIcon,
23
- [ACTION_TYPE.LATENCY_SAMPLER]: SamplerIcon,
16
+ [ActionType.K8sAttributes]: K8sLogo,
17
+ [ActionType.AddClusterInfo]: AddClusterInfoIcon,
18
+ [ActionType.DeleteAttributes]: DeleteAttributeIcon,
19
+ [ActionType.PiiMasking]: PiiMaskingIcon,
20
+ [ActionType.RenameAttributes]: RenameAttributeIcon,
21
+ [ActionType.ErrorSampler]: SamplerIcon,
22
+ [ActionType.ProbabilisticSampler]: SamplerIcon,
23
+ [ActionType.LatencySampler]: SamplerIcon,
24
24
  };
25
25
  return LOGOS[type];
26
26
  };
27
27
 
28
28
  const getInstrumentationRuleIcon = (type) => {
29
29
  const LOGOS = {
30
- [INSTRUMENTATION_RULE_TYPE.PAYLOAD_COLLECTION]: PayloadCollectionIcon,
31
- [INSTRUMENTATION_RULE_TYPE.CODE_ATTRIBUTES]: CodeAttributesIcon,
32
- [INSTRUMENTATION_RULE_TYPE.UNKNOWN_TYPE]: OdigosLogo,
30
+ [InstrumentationRuleType.PayloadCollection]: PayloadCollectionIcon,
31
+ [InstrumentationRuleType.CodeAttributes]: CodeAttributesIcon,
32
+ [InstrumentationRuleType.UnknownType]: OdigosLogo,
33
33
  };
34
34
  return LOGOS[type];
35
35
  };
@@ -1,6 +1,6 @@
1
- import { ENTITY_TYPES, type WorkloadId } from '@/types';
1
+ import { EntityTypes, type WorkloadId } from '@/types';
2
2
  export interface DrawerStoreState {
3
- drawerType: ENTITY_TYPES | null;
3
+ drawerType: EntityTypes | null;
4
4
  drawerEntityId: string | WorkloadId | null;
5
5
  }
6
6
  interface DrawerStoreStateSetters {
@@ -1,4 +1,4 @@
1
- import { type Action, type Destination, ENTITY_TYPES, type InstrumentationRule, type Source, type WorkloadId } from '@/types';
1
+ import { type Action, type Destination, EntityTypes, type InstrumentationRule, type Source, type WorkloadId } from '@/types';
2
2
  interface IEntityState {
3
3
  sourcesLoading: boolean;
4
4
  sources: Source[];
@@ -12,10 +12,10 @@ interface IEntityState {
12
12
  type EntityId = string | WorkloadId;
13
13
  type EntityItems = IEntityState['sources'] | IEntityState['destinations'] | IEntityState['actions'] | IEntityState['instrumentationRules'];
14
14
  interface IEntityStateSetters {
15
- setEntitiesLoading: (entityType: ENTITY_TYPES, bool: boolean) => void;
16
- setEntities: (entityType: ENTITY_TYPES, entities: EntityItems) => void;
17
- addEntities: (entityType: ENTITY_TYPES, entities: EntityItems) => void;
18
- removeEntities: (entityType: ENTITY_TYPES, entityIds: EntityId[]) => void;
15
+ setEntitiesLoading: (entityType: EntityTypes, bool: boolean) => void;
16
+ setEntities: (entityType: EntityTypes, entities: EntityItems) => void;
17
+ addEntities: (entityType: EntityTypes, entities: EntityItems) => void;
18
+ removeEntities: (entityType: EntityTypes, entityIds: EntityId[]) => void;
19
19
  resetEntityStore: () => void;
20
20
  }
21
21
  export declare const useEntityStore: import("zustand").UseBoundStore<import("zustand").StoreApi<IEntityState & IEntityStateSetters>>;
@@ -1,6 +1,6 @@
1
- import { ENTITY_TYPES, type WorkloadId } from '@/types';
1
+ import { EntityTypes, type WorkloadId } from '@/types';
2
2
  export interface PendingItem {
3
- entityType: ENTITY_TYPES;
3
+ entityType: EntityTypes;
4
4
  entityId?: string | WorkloadId;
5
5
  }
6
6
  interface StoreState {
package/lib/store.js CHANGED
@@ -1,4 +1,4 @@
1
- export { u as useDarkMode, a as useDrawerStore, b as useEntityStore, c as useFilterStore, d as useInstrumentStore, e as useModalStore, f as useNotificationStore, g as usePendingStore, h as useSelectedStore, i as useSetupStore } from './index-DIcomki-.js';
1
+ export { u as useDarkMode, a as useDrawerStore, b as useEntityStore, c as useFilterStore, d as useInstrumentStore, e as useModalStore, f as useNotificationStore, g as usePendingStore, h as useSelectedStore, i as useSetupStore } from './index-DYEcdkUF.js';
2
2
  import './types.js';
3
3
  import 'react';
4
4
  import 'styled-components';
package/lib/theme.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { u as useDarkMode, j as animations } from './index-DIcomki-.js';
2
+ import { u as useDarkMode, j as animations } from './index-DYEcdkUF.js';
3
3
  import { ThemeProvider, useTheme } from 'styled-components';
4
4
  import './types.js';
5
5
 
@@ -1,23 +1,23 @@
1
- import { SIGNAL_TYPE } from '../signals';
1
+ import { SignalType } from '../signals';
2
2
  import type { Condition, SVG } from '../common';
3
- export declare enum ACTION_TYPE {
4
- K8S_ATTRIBUTES = "K8sAttributesResolver",
5
- ADD_CLUSTER_INFO = "AddClusterInfo",
6
- DELETE_ATTRIBUTES = "DeleteAttribute",
7
- RENAME_ATTRIBUTES = "RenameAttribute",
8
- ERROR_SAMPLER = "ErrorSampler",
9
- PROBABILISTIC_SAMPLER = "ProbabilisticSampler",
10
- LATENCY_SAMPLER = "LatencySampler",
11
- PII_MASKING = "PiiMasking"
3
+ export declare enum ActionType {
4
+ K8sAttributes = "K8sAttributesResolver",
5
+ AddClusterInfo = "AddClusterInfo",
6
+ DeleteAttributes = "DeleteAttribute",
7
+ RenameAttributes = "RenameAttribute",
8
+ ErrorSampler = "ErrorSampler",
9
+ ProbabilisticSampler = "ProbabilisticSampler",
10
+ LatencySampler = "LatencySampler",
11
+ PiiMasking = "PiiMasking"
12
12
  }
13
13
  export interface Action {
14
14
  id: string;
15
- type: ACTION_TYPE;
15
+ type: ActionType;
16
16
  conditions: Condition[] | null;
17
17
  spec: {
18
18
  actionName?: string;
19
19
  notes?: string;
20
- signals: SIGNAL_TYPE[];
20
+ signals: SignalType[];
21
21
  disabled?: boolean;
22
22
  collectContainerAttributes?: boolean | null;
23
23
  collectWorkloadId?: boolean | null;
@@ -50,11 +50,11 @@ export interface Action {
50
50
  };
51
51
  }
52
52
  export interface ActionOption {
53
- type?: ACTION_TYPE;
53
+ type?: ActionType;
54
54
  icon?: SVG;
55
55
  label: string;
56
56
  description?: string;
57
- allowedSignals?: SIGNAL_TYPE[];
57
+ allowedSignals?: SignalType[];
58
58
  docsEndpoint?: string;
59
59
  docsDescription?: string;
60
60
  items?: ActionOption[];