@prorobotech/openapi-k8s-toolkit 0.0.1-alpha.153 → 0.0.1-alpha.154
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/dist/openapi-k8s-toolkit.es.js +44 -39
- package/dist/openapi-k8s-toolkit.es.js.map +1 -1
- package/dist/openapi-k8s-toolkit.umd.js +44 -39
- package/dist/openapi-k8s-toolkit.umd.js.map +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/EnrichedTable/utils.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/types.d.ts +6 -12
- package/package.json +1 -1
|
@@ -33550,7 +33550,7 @@ const useTheme = () => {
|
|
|
33550
33550
|
return useContext(ThemeContext);
|
|
33551
33551
|
};
|
|
33552
33552
|
|
|
33553
|
-
const
|
|
33553
|
+
const serializeLabelsWithNoEncoding$1 = (input) => {
|
|
33554
33554
|
if (typeof input !== "object" || input === null || Array.isArray(input) || Object.getPrototypeOf(input) !== Object.prototype) {
|
|
33555
33555
|
return "Expected a plain object";
|
|
33556
33556
|
}
|
|
@@ -33558,7 +33558,7 @@ const serializeLabels = (input) => {
|
|
|
33558
33558
|
if (!entries.map(([, v]) => v).every((v) => typeof v === "string" || typeof v === "number")) {
|
|
33559
33559
|
return "All values must be string or number";
|
|
33560
33560
|
}
|
|
33561
|
-
return
|
|
33561
|
+
return entries.map(([k, v]) => `${k}=${v}`).join(",");
|
|
33562
33562
|
};
|
|
33563
33563
|
|
|
33564
33564
|
const EnrichedTable$1 = ({
|
|
@@ -33582,8 +33582,8 @@ const EnrichedTable$1 = ({
|
|
|
33582
33582
|
fetchUrl,
|
|
33583
33583
|
pathToItems,
|
|
33584
33584
|
clusterNamePartOfUrl,
|
|
33585
|
-
|
|
33586
|
-
|
|
33585
|
+
labelSelector,
|
|
33586
|
+
labelSelectorFull,
|
|
33587
33587
|
fieldSelector,
|
|
33588
33588
|
namespace,
|
|
33589
33589
|
k8sResource,
|
|
@@ -33624,41 +33624,42 @@ const EnrichedTable$1 = ({
|
|
|
33624
33624
|
refetchInterval: false
|
|
33625
33625
|
});
|
|
33626
33626
|
const fetchUrlPrepared = parseAll({ text: fetchUrl, replaceValues, multiQueryData });
|
|
33627
|
-
|
|
33628
|
-
if (
|
|
33627
|
+
const sParams = new URLSearchParams();
|
|
33628
|
+
if (labelSelector && Object.keys(labelSelector).length > 0) {
|
|
33629
33629
|
const parsedObject = Object.fromEntries(
|
|
33630
|
-
Object.entries(
|
|
33631
|
-
([
|
|
33630
|
+
Object.entries(labelSelector).map(
|
|
33631
|
+
([k, v]) => [k, parseAll({ text: v, replaceValues, multiQueryData })]
|
|
33632
33632
|
)
|
|
33633
33633
|
);
|
|
33634
|
-
const serializedLabels =
|
|
33635
|
-
|
|
33634
|
+
const serializedLabels = serializeLabelsWithNoEncoding$1(parsedObject);
|
|
33635
|
+
if (serializedLabels.length > 0) sParams.set("labelSelector", serializedLabels);
|
|
33636
33636
|
}
|
|
33637
|
-
if (
|
|
33638
|
-
const
|
|
33639
|
-
const
|
|
33640
|
-
|
|
33637
|
+
if (labelSelectorFull) {
|
|
33638
|
+
const root = multiQueryData[`req${labelSelectorFull.reqIndex}`];
|
|
33639
|
+
const value = Array.isArray(labelSelectorFull.pathToLabels) ? _$1.get(root, labelSelectorFull.pathToLabels) : jp.query(root, `$${labelSelectorFull.pathToLabels}`)[0];
|
|
33640
|
+
const serializedLabels = serializeLabelsWithNoEncoding$1(value);
|
|
33641
|
+
if (serializedLabels.length > 0) sParams.set("labelSelector", serializedLabels);
|
|
33641
33642
|
}
|
|
33642
|
-
let fieldSelectorSuffix;
|
|
33643
33643
|
if (fieldSelector) {
|
|
33644
|
-
const
|
|
33645
|
-
|
|
33646
|
-
|
|
33647
|
-
|
|
33648
|
-
|
|
33649
|
-
|
|
33650
|
-
|
|
33644
|
+
const parsedObject = Object.fromEntries(
|
|
33645
|
+
Object.entries(fieldSelector).map(
|
|
33646
|
+
([k, v]) => [
|
|
33647
|
+
parseAll({ text: k, replaceValues, multiQueryData }),
|
|
33648
|
+
parseAll({ text: v, replaceValues, multiQueryData })
|
|
33649
|
+
]
|
|
33650
|
+
)
|
|
33651
33651
|
);
|
|
33652
|
-
const
|
|
33653
|
-
|
|
33652
|
+
const serializedFields = serializeLabelsWithNoEncoding$1(parsedObject);
|
|
33653
|
+
if (serializedFields.length > 0) sParams.set("fieldSelector", serializedFields);
|
|
33654
33654
|
}
|
|
33655
|
+
const searchParams = sParams.toString();
|
|
33655
33656
|
const {
|
|
33656
33657
|
data: fetchedData,
|
|
33657
33658
|
isLoading: isFetchedDataLoading,
|
|
33658
33659
|
error: fetchedDataError
|
|
33659
33660
|
} = useDirectUnknownResource({
|
|
33660
|
-
uri: `${fetchUrlPrepared}${
|
|
33661
|
-
queryKey: [`${fetchUrlPrepared}${
|
|
33661
|
+
uri: `${fetchUrlPrepared}${searchParams ? `?${searchParams}` : ""}`,
|
|
33662
|
+
queryKey: [`${fetchUrlPrepared}${searchParams ? `?${searchParams}` : ""}`],
|
|
33662
33663
|
isEnabled: !isMultiqueryLoading
|
|
33663
33664
|
});
|
|
33664
33665
|
if (isMultiqueryLoading) {
|
|
@@ -37039,8 +37040,8 @@ const Events$1 = ({
|
|
|
37039
37040
|
pageSize,
|
|
37040
37041
|
substractHeight,
|
|
37041
37042
|
limit,
|
|
37042
|
-
|
|
37043
|
-
|
|
37043
|
+
labelSelector,
|
|
37044
|
+
labelSelectorFull,
|
|
37044
37045
|
fieldSelector,
|
|
37045
37046
|
baseFactoryNamespacedAPIKey,
|
|
37046
37047
|
baseFactoryClusterSceopedAPIKey,
|
|
@@ -37064,28 +37065,32 @@ const Events$1 = ({
|
|
|
37064
37065
|
if (limit) {
|
|
37065
37066
|
params.set("limit", limit.toString());
|
|
37066
37067
|
}
|
|
37067
|
-
if (
|
|
37068
|
+
if (labelSelector && Object.keys(labelSelector).length > 0) {
|
|
37068
37069
|
const parsedObject = Object.fromEntries(
|
|
37069
|
-
Object.entries(
|
|
37070
|
+
Object.entries(labelSelector).map(
|
|
37070
37071
|
([k, v]) => [k, parseAll({ text: v, replaceValues, multiQueryData })]
|
|
37071
37072
|
)
|
|
37072
37073
|
);
|
|
37073
37074
|
const serializedLabels = serializeLabelsWithNoEncoding(parsedObject);
|
|
37074
37075
|
if (serializedLabels.length > 0) params.set("labelSelector", serializedLabels);
|
|
37075
37076
|
}
|
|
37076
|
-
if (
|
|
37077
|
-
const root = multiQueryData[`req${
|
|
37078
|
-
const value = Array.isArray(
|
|
37077
|
+
if (labelSelectorFull) {
|
|
37078
|
+
const root = multiQueryData[`req${labelSelectorFull.reqIndex}`];
|
|
37079
|
+
const value = Array.isArray(labelSelectorFull.pathToLabels) ? _$1.get(root, labelSelectorFull.pathToLabels) : jp.query(root, `$${labelSelectorFull.pathToLabels}`)[0];
|
|
37079
37080
|
const serializedLabels = serializeLabelsWithNoEncoding(value);
|
|
37080
37081
|
if (serializedLabels.length > 0) params.set("labelSelector", serializedLabels);
|
|
37081
37082
|
}
|
|
37082
37083
|
if (fieldSelector) {
|
|
37083
|
-
const
|
|
37084
|
-
|
|
37085
|
-
|
|
37086
|
-
|
|
37087
|
-
|
|
37088
|
-
|
|
37084
|
+
const parsedObject = Object.fromEntries(
|
|
37085
|
+
Object.entries(fieldSelector).map(
|
|
37086
|
+
([k, v]) => [
|
|
37087
|
+
parseAll({ text: k, replaceValues, multiQueryData }),
|
|
37088
|
+
parseAll({ text: v, replaceValues, multiQueryData })
|
|
37089
|
+
]
|
|
37090
|
+
)
|
|
37091
|
+
);
|
|
37092
|
+
const serializedFields = serializeLabelsWithNoEncoding(parsedObject);
|
|
37093
|
+
if (serializedFields.length > 0) params.set("fieldSelector", serializedFields);
|
|
37089
37094
|
}
|
|
37090
37095
|
const searchParams = params.toString();
|
|
37091
37096
|
const wsUrlWithParams = `${wsUrlPrepared}${searchParams ? `?${searchParams}` : ""}`;
|