@odigos/ui-kit 0.0.84 → 0.0.85
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 +7 -0
- package/lib/containers.js +27 -9
- package/lib/hooks.js +2 -0
- package/lib/store/useFilterStore.d.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.85](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.84...ui-kit-v0.0.85) (2025-08-18)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* override existing toggle for addclusterinfo action ([#326](https://github.com/odigos-io/ui-kit/issues/326)) ([4080e83](https://github.com/odigos-io/ui-kit/commit/4080e83910fa50790d6bd55b0153dc6897f8c32d))
|
|
9
|
+
|
|
3
10
|
## [0.0.84](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.83...ui-kit-v0.0.84) (2025-08-18)
|
|
4
11
|
|
|
5
12
|
|
package/lib/containers.js
CHANGED
|
@@ -19,7 +19,7 @@ import { a6 as RulesIcon, a3 as SourcesIcon, a5 as ActionsIcon, a4 as Destinatio
|
|
|
19
19
|
import 'react-dom';
|
|
20
20
|
|
|
21
21
|
const buildCard$3 = (action) => {
|
|
22
|
-
const { type, spec: { actionName, notes, signals, disabled, collectContainerAttributes, collectReplicaSetAttributes, collectWorkloadId, collectClusterId, labelsAttributes, annotationsAttributes, clusterAttributes, attributeNamesToDelete, renames, piiCategories, fallbackSamplingRatio, samplingPercentage, endpointsFilters, servicesNameFilters, attributeFilters, }, } = action;
|
|
22
|
+
const { type, spec: { actionName, notes, signals, disabled, collectContainerAttributes, collectReplicaSetAttributes, collectWorkloadId, collectClusterId, labelsAttributes, annotationsAttributes, clusterAttributes, overwriteExistingValues, attributeNamesToDelete, renames, piiCategories, fallbackSamplingRatio, samplingPercentage, endpointsFilters, servicesNameFilters, attributeFilters, }, } = action;
|
|
23
23
|
const arr = [
|
|
24
24
|
{ title: DISPLAY_TITLES.TYPE, value: type },
|
|
25
25
|
{ type: DataCardFieldTypes.ActiveStatus, title: DISPLAY_TITLES.STATUS, value: String(!disabled) },
|
|
@@ -51,6 +51,7 @@ const buildCard$3 = (action) => {
|
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
if (type === ActionType.AddClusterInfo) {
|
|
54
|
+
arr.push({ title: 'Overwrite Existing Values', value: String(overwriteExistingValues || false) });
|
|
54
55
|
let str = '';
|
|
55
56
|
clusterAttributes?.forEach(({ attributeName, attributeStringValue }, idx) => {
|
|
56
57
|
str += `${attributeName}: ${attributeStringValue}`;
|
|
@@ -781,7 +782,7 @@ const ActionModal = ({ createAction }) => {
|
|
|
781
782
|
};
|
|
782
783
|
|
|
783
784
|
const buildSpecCell$1 = (action) => {
|
|
784
|
-
const { type, spec: { collectContainerAttributes, collectReplicaSetAttributes, collectWorkloadId, collectClusterId, labelsAttributes, annotationsAttributes, clusterAttributes, attributeNamesToDelete, renames, piiCategories, fallbackSamplingRatio, samplingPercentage, endpointsFilters, }, } = action;
|
|
785
|
+
const { type, spec: { collectContainerAttributes, collectReplicaSetAttributes, collectWorkloadId, collectClusterId, labelsAttributes, annotationsAttributes, clusterAttributes, overwriteExistingValues, attributeNamesToDelete, renames, piiCategories, fallbackSamplingRatio, samplingPercentage, endpointsFilters, attributeFilters, servicesNameFilters, }, } = action;
|
|
785
786
|
let str = '';
|
|
786
787
|
if (type === ActionType.K8sAttributes) {
|
|
787
788
|
if (collectContainerAttributes)
|
|
@@ -804,6 +805,7 @@ const buildSpecCell$1 = (action) => {
|
|
|
804
805
|
});
|
|
805
806
|
}
|
|
806
807
|
if (type === ActionType.AddClusterInfo) {
|
|
808
|
+
str += `Overwrite Existing: ${overwriteExistingValues}\n`;
|
|
807
809
|
clusterAttributes?.forEach(({ attributeName, attributeStringValue }, idx) => {
|
|
808
810
|
str += `${attributeName}: ${attributeStringValue}`;
|
|
809
811
|
if (idx < clusterAttributes.length - 1)
|
|
@@ -841,13 +843,27 @@ const buildSpecCell$1 = (action) => {
|
|
|
841
843
|
}
|
|
842
844
|
if (type === ActionType.LatencySampler) {
|
|
843
845
|
endpointsFilters?.forEach(({ serviceName, httpRoute, minimumLatencyThreshold, fallbackSamplingRatio }, idx) => {
|
|
844
|
-
str += `Endpoint${endpointsFilters.length > 1 ? ` #${idx + 1}` : ''}=${serviceName}${httpRoute}`;
|
|
846
|
+
str += `Endpoint${endpointsFilters.length > 1 ? ` #${idx + 1}` : ''}=${serviceName}${httpRoute}\n`;
|
|
845
847
|
str += ` Latency=${minimumLatencyThreshold}`;
|
|
846
848
|
str += ` Sampling=${fallbackSamplingRatio}`;
|
|
847
849
|
if (idx < endpointsFilters.length - 1)
|
|
848
850
|
str += ', ';
|
|
849
851
|
});
|
|
850
852
|
}
|
|
853
|
+
if (type === ActionType.ServiceNameSampler) {
|
|
854
|
+
servicesNameFilters?.forEach(({ serviceName, samplingRatio, fallbackSamplingRatio }) => {
|
|
855
|
+
str += `Service Name: ${serviceName}, `;
|
|
856
|
+
str += `Sampling Ratio: ${samplingRatio}, `;
|
|
857
|
+
str += `Fallback Sampling Ratio: ${fallbackSamplingRatio}\n`;
|
|
858
|
+
});
|
|
859
|
+
}
|
|
860
|
+
if (type === ActionType.SpanAttributeSampler) {
|
|
861
|
+
attributeFilters?.forEach(({ serviceName, attributeKey, fallbackSamplingRatio }) => {
|
|
862
|
+
str += `Service Name: ${serviceName}, `;
|
|
863
|
+
str += `Attribute Key: ${attributeKey}, `;
|
|
864
|
+
str += `Fallback Sampling Ratio: ${fallbackSamplingRatio}\n`;
|
|
865
|
+
});
|
|
866
|
+
}
|
|
851
867
|
return str;
|
|
852
868
|
};
|
|
853
869
|
|
|
@@ -1869,12 +1885,14 @@ const PushRight = styled.div `
|
|
|
1869
1885
|
`;
|
|
1870
1886
|
const getFilterCount = (params) => {
|
|
1871
1887
|
let count = 0;
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
if (
|
|
1888
|
+
Object.values(params).forEach((value) => {
|
|
1889
|
+
if (value && Array.isArray(value) && value.length > 0) {
|
|
1890
|
+
count += value.length;
|
|
1891
|
+
}
|
|
1892
|
+
});
|
|
1893
|
+
if (params.onlyErrors)
|
|
1894
|
+
count++;
|
|
1895
|
+
if (params.searchText)
|
|
1878
1896
|
count++;
|
|
1879
1897
|
return count;
|
|
1880
1898
|
};
|
package/lib/hooks.js
CHANGED
|
@@ -15,6 +15,7 @@ const INITIAL$2 = {
|
|
|
15
15
|
signals: [],
|
|
16
16
|
disabled: false,
|
|
17
17
|
clusterAttributes: null,
|
|
18
|
+
overwriteExistingValues: false,
|
|
18
19
|
renames: null,
|
|
19
20
|
attributeNamesToDelete: null,
|
|
20
21
|
piiCategories: null,
|
|
@@ -122,6 +123,7 @@ const useActionFormData = () => {
|
|
|
122
123
|
case ActionKeyTypes.LabelsAttributes:
|
|
123
124
|
case ActionKeyTypes.AnnotationsAttributes:
|
|
124
125
|
case ActionKeyTypes.ClusterAttributes:
|
|
126
|
+
case ActionKeyTypes.OverwriteExistingValues:
|
|
125
127
|
case ActionKeyTypes.AttributeNamesToDelete:
|
|
126
128
|
case ActionKeyTypes.Renames:
|
|
127
129
|
case ActionKeyTypes.PiiCategories:
|
|
@@ -32,7 +32,7 @@ interface StoreState {
|
|
|
32
32
|
setErrors: (metrics: FiltersState['errors']) => void;
|
|
33
33
|
onlyErrors: FiltersState['onlyErrors'];
|
|
34
34
|
setOnlyErrors: (onlyErrors: FiltersState['onlyErrors']) => void;
|
|
35
|
-
setAll: (params: FiltersState) => void;
|
|
35
|
+
setAll: (params: Partial<FiltersState>) => void;
|
|
36
36
|
clearAll: () => void;
|
|
37
37
|
getEmptyState: () => FiltersState;
|
|
38
38
|
}
|