@prorobotech/openapi-k8s-toolkit 0.0.1-alpha.117 → 0.0.1-alpha.119
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 +36 -17
- package/dist/openapi-k8s-toolkit.es.js.map +1 -1
- package/dist/openapi-k8s-toolkit.umd.js +36 -17
- package/dist/openapi-k8s-toolkit.umd.js.map +1 -1
- package/dist/types/components/molecules/Search/Search.d.ts +1 -0
- package/dist/types/hooks/useApiResource.d.ts +2 -1
- package/dist/types/hooks/useBuiltinResource.d.ts +2 -1
- package/dist/types/hooks/useCrdResource.d.ts +2 -1
- package/package.json +1 -1
|
@@ -8791,8 +8791,10 @@ const getLabel = ({
|
|
|
8791
8791
|
preparedLink,
|
|
8792
8792
|
label,
|
|
8793
8793
|
key,
|
|
8794
|
-
externalKeys
|
|
8794
|
+
externalKeys,
|
|
8795
|
+
replaceValues
|
|
8795
8796
|
}) => {
|
|
8797
|
+
const preparedLabel = prepareTemplate({ template: label, replaceValues });
|
|
8796
8798
|
if (preparedLink) {
|
|
8797
8799
|
if (externalKeys && externalKeys.includes(key)) {
|
|
8798
8800
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -8804,13 +8806,13 @@ const getLabel = ({
|
|
|
8804
8806
|
const url = preparedLink.startsWith("/") ? `${window.location.origin}${preparedLink}` : preparedLink;
|
|
8805
8807
|
window.open(url);
|
|
8806
8808
|
},
|
|
8807
|
-
children:
|
|
8809
|
+
children: preparedLabel
|
|
8808
8810
|
}
|
|
8809
8811
|
);
|
|
8810
8812
|
}
|
|
8811
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Link, { to: preparedLink, children:
|
|
8813
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Link, { to: preparedLink, children: preparedLabel });
|
|
8812
8814
|
}
|
|
8813
|
-
return
|
|
8815
|
+
return preparedLabel;
|
|
8814
8816
|
};
|
|
8815
8817
|
const mapLinksFromRaw = ({
|
|
8816
8818
|
rawLinks,
|
|
@@ -8821,7 +8823,7 @@ const mapLinksFromRaw = ({
|
|
|
8821
8823
|
const preparedLink = link ? prepareTemplate({ template: link, replaceValues }) : void 0;
|
|
8822
8824
|
return {
|
|
8823
8825
|
key,
|
|
8824
|
-
label: getLabel({ preparedLink, label, key, externalKeys }),
|
|
8826
|
+
label: getLabel({ preparedLink, label, key, externalKeys, replaceValues }),
|
|
8825
8827
|
internalMetaLink: preparedLink,
|
|
8826
8828
|
children: children ? mapLinksFromRaw({
|
|
8827
8829
|
rawLinks: children,
|
|
@@ -49778,7 +49780,7 @@ const SelectTagSpan = st$1.span`
|
|
|
49778
49780
|
`;
|
|
49779
49781
|
const FormContainer = st$1.div`
|
|
49780
49782
|
display: grid;
|
|
49781
|
-
grid-template-columns: 300px 100px 1fr;
|
|
49783
|
+
grid-template-columns: 300px 100px 1fr 100px;
|
|
49782
49784
|
gap: 16px;
|
|
49783
49785
|
`;
|
|
49784
49786
|
const HideableContainer = st$1.div`
|
|
@@ -49791,7 +49793,7 @@ const Styled = {
|
|
|
49791
49793
|
HideableContainer
|
|
49792
49794
|
};
|
|
49793
49795
|
|
|
49794
|
-
const Search = ({ cluster }) => {
|
|
49796
|
+
const Search = ({ cluster, updateCurrentSearch }) => {
|
|
49795
49797
|
const [form] = Form.useForm();
|
|
49796
49798
|
const [searchParams, setSearchParams] = useSearchParams();
|
|
49797
49799
|
const location = useLocation();
|
|
@@ -49877,12 +49879,22 @@ const Search = ({ cluster }) => {
|
|
|
49877
49879
|
}
|
|
49878
49880
|
}
|
|
49879
49881
|
}, [watchedTypedSelector]);
|
|
49880
|
-
const options = kindWithVersion?.map(({ kind,
|
|
49881
|
-
|
|
49882
|
+
const options = kindWithVersion?.map(({ kind, group, version }) => ({
|
|
49883
|
+
// kindWithVersion?.map(({ kind, notUnique, group, version }) => ({
|
|
49884
|
+
// label: notUnique ? (
|
|
49885
|
+
// <div>
|
|
49886
|
+
// {kind}
|
|
49887
|
+
// <br />
|
|
49888
|
+
// {version.groupVersion}
|
|
49889
|
+
// </div>
|
|
49890
|
+
// ) : (
|
|
49891
|
+
// kind
|
|
49892
|
+
// ),
|
|
49893
|
+
label: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
49882
49894
|
kind,
|
|
49883
49895
|
/* @__PURE__ */ jsxRuntimeExports.jsx("br", {}),
|
|
49884
49896
|
version.groupVersion
|
|
49885
|
-
] })
|
|
49897
|
+
] }),
|
|
49886
49898
|
value: `${group}~${version.version}~${version.resource}`
|
|
49887
49899
|
})) || [];
|
|
49888
49900
|
const tagRender = ({ label, closable, onClose }) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -49955,7 +49967,8 @@ const Search = ({ cluster }) => {
|
|
|
49955
49967
|
}
|
|
49956
49968
|
)
|
|
49957
49969
|
}
|
|
49958
|
-
) })
|
|
49970
|
+
) }),
|
|
49971
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Form.Item, { label: "Search", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { type: "primary", onClick: () => updateCurrentSearch(watchedKinds), children: "Search" }) })
|
|
49959
49972
|
] }) }),
|
|
49960
49973
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
49961
49974
|
"Current: ",
|
|
@@ -50241,7 +50254,8 @@ const useApiResources = ({
|
|
|
50241
50254
|
apiVersion,
|
|
50242
50255
|
typeName,
|
|
50243
50256
|
limit,
|
|
50244
|
-
refetchInterval
|
|
50257
|
+
refetchInterval,
|
|
50258
|
+
isEnabled
|
|
50245
50259
|
}) => {
|
|
50246
50260
|
return useQuery({
|
|
50247
50261
|
queryKey: ["useApiResources", clusterName, namespace, apiGroup, apiVersion, typeName, limit],
|
|
@@ -50260,7 +50274,8 @@ const useApiResources = ({
|
|
|
50260
50274
|
}
|
|
50261
50275
|
return data;
|
|
50262
50276
|
},
|
|
50263
|
-
refetchInterval: refetchInterval !== void 0 ? refetchInterval : 5e3
|
|
50277
|
+
refetchInterval: refetchInterval !== void 0 ? refetchInterval : 5e3,
|
|
50278
|
+
enabled: isEnabled
|
|
50264
50279
|
});
|
|
50265
50280
|
};
|
|
50266
50281
|
const useApiResourceSingle = ({
|
|
@@ -50291,7 +50306,8 @@ const useBuiltinResources = ({
|
|
|
50291
50306
|
namespace,
|
|
50292
50307
|
typeName,
|
|
50293
50308
|
limit,
|
|
50294
|
-
refetchInterval
|
|
50309
|
+
refetchInterval,
|
|
50310
|
+
isEnabled
|
|
50295
50311
|
}) => {
|
|
50296
50312
|
return useQuery({
|
|
50297
50313
|
queryKey: ["useBuiltinResourceType", clusterName, namespace, typeName, limit],
|
|
@@ -50303,7 +50319,8 @@ const useBuiltinResources = ({
|
|
|
50303
50319
|
}
|
|
50304
50320
|
return data;
|
|
50305
50321
|
},
|
|
50306
|
-
refetchInterval: refetchInterval !== void 0 ? refetchInterval : 5e3
|
|
50322
|
+
refetchInterval: refetchInterval !== void 0 ? refetchInterval : 5e3,
|
|
50323
|
+
enabled: isEnabled
|
|
50307
50324
|
});
|
|
50308
50325
|
};
|
|
50309
50326
|
const useBuiltinResourceSingle = ({
|
|
@@ -50326,7 +50343,8 @@ const useCrdResources = ({
|
|
|
50326
50343
|
apiGroup,
|
|
50327
50344
|
apiVersion,
|
|
50328
50345
|
crdName,
|
|
50329
|
-
refetchInterval
|
|
50346
|
+
refetchInterval,
|
|
50347
|
+
isEnabled
|
|
50330
50348
|
}) => {
|
|
50331
50349
|
return useQuery({
|
|
50332
50350
|
queryKey: ["useCrdResources", clusterName, namespace, apiGroup, apiVersion, crdName],
|
|
@@ -50344,7 +50362,8 @@ const useCrdResources = ({
|
|
|
50344
50362
|
}
|
|
50345
50363
|
return data;
|
|
50346
50364
|
},
|
|
50347
|
-
refetchInterval: refetchInterval !== void 0 ? refetchInterval : 5e3
|
|
50365
|
+
refetchInterval: refetchInterval !== void 0 ? refetchInterval : 5e3,
|
|
50366
|
+
enabled: isEnabled
|
|
50348
50367
|
});
|
|
50349
50368
|
};
|
|
50350
50369
|
const useCrdResourceSingle = ({
|