@prorobotech/openapi-k8s-toolkit 1.4.0-alpha.25 → 1.4.0-alpha.26

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.
@@ -34966,13 +34966,13 @@ const AntdLink = ({
34966
34966
  const { data: multiQueryData, isLoading: isMultiqueryLoading } = useMultiQuery();
34967
34967
  const partsOfUrl = usePartsOfUrl();
34968
34968
  const navigate = useNavigate();
34969
- const { id, text, href, ...linkProps } = data;
34969
+ const { id, text, href, title, ...linkProps } = data;
34970
34970
  const replaceValues = partsOfUrl.partsOfUrl.reduce((acc, value, index) => {
34971
34971
  acc[index.toString()] = value;
34972
34972
  return acc;
34973
34973
  }, {});
34974
34974
  const textPrepared = parseAll({ text, replaceValues, multiQueryData });
34975
- const tooltipPrepared = typeof linkProps.title === "string" ? parseAll({ text: linkProps.title, replaceValues, multiQueryData }) : void 0;
34975
+ const tooltipPrepared = typeof title === "string" ? parseAll({ text: title, replaceValues, multiQueryData }) : void 0;
34976
34976
  const hrefPrepared = parseAll({ text: href, replaceValues, multiQueryData });
34977
34977
  const isExternal = isExternalHref(hrefPrepared);
34978
34978
  if (isMultiqueryLoading) {
@@ -78621,7 +78621,7 @@ const TolerationsModal = ({
78621
78621
  };
78622
78622
 
78623
78623
  const LazyEnrichedTableModal = lazy(
78624
- () => import('./index-CVmBLq_Q.mjs').then((mod) => ({ default: mod.EnrichedTableModal }))
78624
+ () => import('./index-DoowX3kQ.mjs').then((mod) => ({ default: mod.EnrichedTableModal }))
78625
78625
  );
78626
78626
  const renderActiveType = (activeType, extraProps) => {
78627
78627
  if (!activeType) return null;
@@ -81395,25 +81395,7 @@ const getVolumeTypeMetas = (volumeName, volumesMap) => {
81395
81395
  }
81396
81396
  return [getVolumeTypeMeta(volumeName, vol)];
81397
81397
  };
81398
- const columns = [
81399
- { title: "Name", dataIndex: "name", key: "name" },
81400
- { title: "Mount Path", dataIndex: "mountPath", key: "mountPath" },
81401
- { title: "Sub Path", dataIndex: "subPath", key: "subPath" },
81402
- { title: "Type", dataIndex: "typeName", key: "typeName" },
81403
- { title: "Access", dataIndex: "access", key: "access" },
81404
- { title: "Utilized by", dataIndex: "containerName", key: "containerName" }
81405
- // { title: 'Type', dataIndex: 'typeResource', key: 'typeResource' },
81406
- ];
81407
- const undefinedValues = [
81408
- { key: "name", value: "-" },
81409
- { key: "mountPath", value: "-" },
81410
- { key: "subPath", value: "-" },
81411
- { key: "typeName", value: "-" },
81412
- { key: "access", value: "-" },
81413
- { key: "containerName", value: "-" }
81414
- ];
81415
- const withUndefinedFallback = (value, fallback = "-") => value === void 0 || value === null || value === "" ? fallback : value;
81416
- const customColumns = {
81398
+ const buildCustomColumns = (containerFactoryKey) => ({
81417
81399
  mountPath: {
81418
81400
  type: "factory",
81419
81401
  customProps: {
@@ -81456,52 +81438,20 @@ const customColumns = {
81456
81438
  type: "VisibilityContainer",
81457
81439
  data: {
81458
81440
  id: "typeName-link-visible",
81459
- value: "{reqsJsonPath[0]['.typeKey']['-']}",
81460
- criteria: "equals",
81461
- valueToCompare: ["configMap", "secret"]
81441
+ value: "{reqsJsonPath[0]['.typeHref']['']}",
81442
+ criteria: "notEquals",
81443
+ valueToCompare: [""]
81462
81444
  },
81463
81445
  children: [
81464
81446
  {
81465
- type: "VisibilityContainer",
81466
- data: {
81467
- id: "typeName-configmap-link-visible",
81468
- value: "{reqsJsonPath[0]['.typeKey']['-']}",
81469
- criteria: "equals",
81470
- valueToCompare: ["configMap"]
81471
- },
81472
- children: [
81473
- {
81474
- type: "antdLink",
81475
- data: {
81476
- href: "/openapi-ui/{2}/{3}/factory/configmap-details/v1/configmaps/{reqsJsonPath[0]['.typeName']['-']}",
81477
- id: "typeName-link",
81478
- text: "{reqsJsonPath[0]['.typeName']['-']}",
81479
- title: "{reqsJsonPath[0]['.typeName']['-']}",
81480
- style: ellipsisStyle
81481
- }
81482
- }
81483
- ]
81484
- },
81485
- {
81486
- type: "VisibilityContainer",
81447
+ type: "antdLink",
81487
81448
  data: {
81488
- id: "typeName-secret-link-visible",
81489
- value: "{reqsJsonPath[0]['.typeKey']['-']}",
81490
- criteria: "equals",
81491
- valueToCompare: ["secret"]
81492
- },
81493
- children: [
81494
- {
81495
- type: "antdLink",
81496
- data: {
81497
- href: "/openapi-ui/{2}/{3}/factory/secret-details/v1/secrets/{reqsJsonPath[0]['.typeName']['-']}",
81498
- id: "typeName-secret-link",
81499
- text: "{reqsJsonPath[0]['.typeName']['-']}",
81500
- title: "{reqsJsonPath[0]['.typeName']['-']}",
81501
- style: ellipsisStyle
81502
- }
81503
- }
81504
- ]
81449
+ href: "{reqsJsonPath[0]['.typeHref']['']}",
81450
+ id: "typeName-link",
81451
+ text: "{reqsJsonPath[0]['.typeName']['-']}",
81452
+ title: "{reqsJsonPath[0]['.typeName']['-']}",
81453
+ style: ellipsisStyle
81454
+ }
81505
81455
  }
81506
81456
  ]
81507
81457
  },
@@ -81509,9 +81459,9 @@ const customColumns = {
81509
81459
  type: "VisibilityContainer",
81510
81460
  data: {
81511
81461
  id: "typeName-text-visible",
81512
- value: "{reqsJsonPath[0]['.typeKey']['-']}",
81513
- criteria: "notEquals",
81514
- valueToCompare: ["configMap", "secret"]
81462
+ value: "{reqsJsonPath[0]['.typeHref']['']}",
81463
+ criteria: "equals",
81464
+ valueToCompare: [""]
81515
81465
  },
81516
81466
  children: [
81517
81467
  {
@@ -81552,13 +81502,18 @@ const customColumns = {
81552
81502
  }
81553
81503
  },
81554
81504
  {
81555
- type: "antdLink",
81556
- data: {
81557
- href: "/openapi-ui/{2}/{3}/factory/container-details/v1/containers/{reqsJsonPath[0]['.podName']['-']}/{reqsJsonPath[0]['.containerName']['-']}",
81505
+ type: containerFactoryKey ? "antdLink" : "parsedText",
81506
+ data: containerFactoryKey ? {
81507
+ href: `/openapi-ui/{2}/{3}/factory/${containerFactoryKey}/v1/containers/{reqsJsonPath[0]['.podName']['-']}/{reqsJsonPath[0]['.containerName']['-']}`,
81558
81508
  id: "container-link",
81559
81509
  text: "{reqsJsonPath[0]['.containerName']['-']}",
81560
81510
  title: "{reqsJsonPath[0]['.containerName']['-']}",
81561
81511
  style: ellipsisStyle
81512
+ } : {
81513
+ id: "container-text",
81514
+ text: "{reqsJsonPath[0]['.containerName']['-']}",
81515
+ tooltip: "{reqsJsonPath[0]['.containerName']['-']}",
81516
+ style: ellipsisStyle
81562
81517
  }
81563
81518
  }
81564
81519
  ]
@@ -81566,19 +81521,145 @@ const customColumns = {
81566
81521
  ]
81567
81522
  }
81568
81523
  }
81524
+ });
81525
+ const isLinkableVolumeTypeKey = (typeKey) => typeKey === "configMap" || typeKey === "secret";
81526
+ const isPendingLinkSegment = (value) => !value || value.includes("...") || value.includes("{") || value.includes("}");
81527
+ const getVolumeFactoryKey = ({
81528
+ apiGroup,
81529
+ apiVersion,
81530
+ resource,
81531
+ namespace,
81532
+ baseFactoriesMapping,
81533
+ baseFactoryNamespacedAPIKey,
81534
+ baseFactoryClusterSceopedAPIKey,
81535
+ baseFactoryNamespacedBuiltinKey,
81536
+ baseFactoryClusterSceopedBuiltinKey
81537
+ }) => {
81538
+ if (namespace) {
81539
+ if (apiGroup) {
81540
+ const forcedMapping3 = baseFactoriesMapping?.[`${baseFactoryNamespacedAPIKey}-${apiGroup}-${apiVersion}-${resource}`];
81541
+ return forcedMapping3 || baseFactoryNamespacedAPIKey || "";
81542
+ }
81543
+ const forcedMapping2 = baseFactoriesMapping?.[`${baseFactoryNamespacedBuiltinKey}-${apiVersion}-${resource}`];
81544
+ return forcedMapping2 || baseFactoryNamespacedBuiltinKey || "";
81545
+ }
81546
+ if (apiGroup) {
81547
+ const forcedMapping2 = baseFactoriesMapping?.[`${baseFactoryClusterSceopedAPIKey}-${apiGroup}-${apiVersion}-${resource}`];
81548
+ return forcedMapping2 || baseFactoryClusterSceopedAPIKey || "";
81549
+ }
81550
+ const forcedMapping = baseFactoriesMapping?.[`${baseFactoryClusterSceopedBuiltinKey}-${apiVersion}-${resource}`];
81551
+ return forcedMapping || baseFactoryClusterSceopedBuiltinKey || "";
81552
+ };
81553
+ const getVolumeResourceLinkPrefix = ({
81554
+ baseprefix,
81555
+ cluster,
81556
+ namespace,
81557
+ apiGroupVersion,
81558
+ pluralName,
81559
+ baseFactoryNamespacedAPIKey,
81560
+ baseFactoryClusterSceopedAPIKey,
81561
+ baseFactoryNamespacedBuiltinKey,
81562
+ baseFactoryClusterSceopedBuiltinKey,
81563
+ baseFactoriesMapping
81564
+ }) => {
81565
+ const { apiGroup, apiVersion } = parseApiVersion$1(apiGroupVersion);
81566
+ return `${baseprefix}/${cluster}${namespace ? `/${namespace}` : ""}/factory/${getVolumeFactoryKey({
81567
+ apiGroup,
81568
+ apiVersion,
81569
+ resource: pluralName,
81570
+ namespace,
81571
+ baseFactoriesMapping,
81572
+ baseFactoryNamespacedAPIKey,
81573
+ baseFactoryClusterSceopedAPIKey,
81574
+ baseFactoryNamespacedBuiltinKey,
81575
+ baseFactoryClusterSceopedBuiltinKey
81576
+ })}/${apiGroupVersion}/${pluralName}`;
81577
+ };
81578
+ const getVolumeTypeHref = ({
81579
+ typeKey,
81580
+ typeName,
81581
+ resourceLinkPrefixes
81582
+ }) => {
81583
+ if (!isLinkableVolumeTypeKey(typeKey)) {
81584
+ return "";
81585
+ }
81586
+ const resourceLinkPrefix = resourceLinkPrefixes?.[typeKey];
81587
+ return resourceLinkPrefix ? `${resourceLinkPrefix}/${typeName}` : "";
81569
81588
  };
81589
+
81590
+ const columns = [
81591
+ { title: "Name", dataIndex: "name", key: "name" },
81592
+ { title: "Mount Path", dataIndex: "mountPath", key: "mountPath" },
81593
+ { title: "Sub Path", dataIndex: "subPath", key: "subPath" },
81594
+ { title: "Type", dataIndex: "typeName", key: "typeName" },
81595
+ { title: "Access", dataIndex: "access", key: "access" },
81596
+ { title: "Utilized by", dataIndex: "containerName", key: "containerName" }
81597
+ // { title: 'Type', dataIndex: 'typeResource', key: 'typeResource' },
81598
+ ];
81599
+ const undefinedValues = [
81600
+ { key: "name", value: "-" },
81601
+ { key: "mountPath", value: "-" },
81602
+ { key: "subPath", value: "-" },
81603
+ { key: "typeName", value: "-" },
81604
+ { key: "access", value: "-" },
81605
+ { key: "containerName", value: "-" }
81606
+ ];
81607
+ const withUndefinedFallback = (value, fallback = "-") => value === void 0 || value === null || value === "" ? fallback : value;
81570
81608
  const Volumes = ({ data, children }) => {
81571
- const { id, reqIndex, jsonPathToSpec, jsonPathToPodName, errorText, containerStyle } = data;
81609
+ const {
81610
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
81611
+ id,
81612
+ baseprefix,
81613
+ cluster,
81614
+ reqIndex,
81615
+ jsonPathToSpec,
81616
+ jsonPathToPodName,
81617
+ forcedNamespace,
81618
+ errorText,
81619
+ containerStyle,
81620
+ baseFactoryNamespacedAPIKey,
81621
+ baseFactoryClusterSceopedAPIKey,
81622
+ baseFactoryNamespacedBuiltinKey,
81623
+ baseFactoryClusterSceopedBuiltinKey,
81624
+ baseNavigationPluralName,
81625
+ baseNavigationSpecificName,
81626
+ containerFactoryKey
81627
+ } = data;
81572
81628
  const theme = useTheme();
81629
+ const partsOfUrl = usePartsOfUrl();
81573
81630
  const { data: multiQueryData, isLoading: isMultiQueryLoading, isError: isMultiQueryErrors, errors } = useMultiQuery();
81574
- const dataSource = useMemo(() => {
81631
+ const replaceValues = partsOfUrl.partsOfUrl.reduce((acc, value, index) => {
81632
+ acc[index.toString()] = value;
81633
+ return acc;
81634
+ }, {});
81635
+ const clusterPrepared = parseAll({ text: cluster, replaceValues, multiQueryData });
81636
+ const forcedNamespacePrepared = forcedNamespace ? parseAll({
81637
+ text: forcedNamespace,
81638
+ replaceValues,
81639
+ multiQueryData
81640
+ }) : void 0;
81641
+ const {
81642
+ data: navigationDataArr,
81643
+ isLoading: isNavigationLoading,
81644
+ isError: isNavigationError
81645
+ } = useK8sSmartResource({
81646
+ cluster: clusterPrepared,
81647
+ apiGroup: "front.in-cloud.io",
81648
+ apiVersion: "v1alpha1",
81649
+ plural: baseNavigationPluralName,
81650
+ fieldSelector: `metadata.name=${baseNavigationSpecificName}`
81651
+ });
81652
+ const baseFactoriesMapping = navigationDataArr && navigationDataArr.items && navigationDataArr.items.length > 0 ? navigationDataArr.items[0].spec?.baseFactoriesMapping : void 0;
81653
+ const customColumns = useMemo(() => buildCustomColumns(containerFactoryKey), [containerFactoryKey]);
81654
+ const dataSourceWithoutHref = useMemo(() => {
81575
81655
  if (isMultiQueryLoading || isMultiQueryErrors || !multiQueryData) return [];
81576
81656
  const jsonRoot2 = multiQueryData[`req${reqIndex}`];
81577
81657
  if (jsonRoot2 === void 0) return [];
81578
81658
  const specResult = jp.query(jsonRoot2 || {}, `$${jsonPathToSpec}`);
81579
81659
  const spec = specResult?.[0];
81580
81660
  if (!spec) return [];
81581
- const namespace = jsonRoot2?.metadata?.namespace || spec?.metadata?.namespace || "";
81661
+ const fallbackNamespace = jsonRoot2?.metadata?.namespace || spec?.metadata?.namespace || "";
81662
+ const effectiveNamespace = forcedNamespacePrepared || fallbackNamespace;
81582
81663
  const podNameFromPath = jsonPathToPodName ? jp.query(jsonRoot2 || {}, `$${jsonPathToPodName}`)?.[0] : void 0;
81583
81664
  const podName = podNameFromPath || jsonRoot2?.metadata?.name || spec?.metadata?.name || "-";
81584
81665
  const containers = Array.isArray(spec.containers) ? spec.containers : [];
@@ -81590,23 +81671,113 @@ const Volumes = ({ data, children }) => {
81590
81671
  return containers.flatMap((container, cIdx) => {
81591
81672
  const mounts = Array.isArray(container.volumeMounts) ? container.volumeMounts : [];
81592
81673
  return mounts.flatMap(
81593
- (mount, mIdx) => getVolumeTypeMetas(mount.name, volumesMap).map((typeMeta, typeIdx) => ({
81594
- ...typeMeta,
81595
- ...mount,
81596
- name: withUndefinedFallback(mount.name),
81597
- mountPath: withUndefinedFallback(mount.mountPath),
81598
- subPath: withUndefinedFallback(mount.subPath),
81599
- typeName: withUndefinedFallback(typeMeta.typeName),
81600
- containerName: withUndefinedFallback(container.name || `container-${cIdx}`),
81601
- podName,
81602
- namespace,
81603
- access: withUndefinedFallback(mount.readOnly ? "RO" : "RW"),
81604
- key: `${cIdx}-${mIdx}-${typeIdx}`
81605
- }))
81674
+ (mount, mIdx) => getVolumeTypeMetas(mount.name, volumesMap).map((typeMeta, typeIdx) => {
81675
+ const typeName = String(withUndefinedFallback(typeMeta.typeName));
81676
+ return {
81677
+ ...typeMeta,
81678
+ ...mount,
81679
+ name: String(withUndefinedFallback(mount.name)),
81680
+ mountPath: String(withUndefinedFallback(mount.mountPath)),
81681
+ subPath: String(withUndefinedFallback(mount.subPath)),
81682
+ typeName,
81683
+ containerName: String(withUndefinedFallback(container.name || `container-${cIdx}`)),
81684
+ podName: String(podName),
81685
+ namespace: String(effectiveNamespace),
81686
+ access: String(withUndefinedFallback(mount.readOnly ? "RO" : "RW")),
81687
+ key: `${cIdx}-${mIdx}-${typeIdx}`
81688
+ };
81689
+ })
81606
81690
  );
81607
81691
  });
81608
- }, [multiQueryData, isMultiQueryLoading, isMultiQueryErrors, reqIndex, jsonPathToSpec, jsonPathToPodName]);
81609
- if (isMultiQueryLoading) {
81692
+ }, [
81693
+ multiQueryData,
81694
+ isMultiQueryLoading,
81695
+ isMultiQueryErrors,
81696
+ reqIndex,
81697
+ jsonPathToSpec,
81698
+ jsonPathToPodName,
81699
+ forcedNamespacePrepared
81700
+ ]);
81701
+ const hasLinkableVolumeTypes = dataSourceWithoutHref.some(({ typeKey }) => isLinkableVolumeTypeKey(typeKey));
81702
+ const linkableNamespace = dataSourceWithoutHref.find(({ typeKey }) => isLinkableVolumeTypeKey(typeKey))?.namespace;
81703
+ const configMapFactoryKey = hasLinkableVolumeTypes && !isNavigationLoading && !isNavigationError ? getVolumeFactoryKey({
81704
+ apiGroup: void 0,
81705
+ apiVersion: "v1",
81706
+ resource: "configmaps",
81707
+ namespace: linkableNamespace,
81708
+ baseFactoriesMapping,
81709
+ baseFactoryNamespacedAPIKey,
81710
+ baseFactoryClusterSceopedAPIKey,
81711
+ baseFactoryNamespacedBuiltinKey,
81712
+ baseFactoryClusterSceopedBuiltinKey
81713
+ }) : void 0;
81714
+ const secretFactoryKey = hasLinkableVolumeTypes && !isNavigationLoading && !isNavigationError ? getVolumeFactoryKey({
81715
+ apiGroup: void 0,
81716
+ apiVersion: "v1",
81717
+ resource: "secrets",
81718
+ namespace: linkableNamespace,
81719
+ baseFactoriesMapping,
81720
+ baseFactoryNamespacedAPIKey,
81721
+ baseFactoryClusterSceopedAPIKey,
81722
+ baseFactoryNamespacedBuiltinKey,
81723
+ baseFactoryClusterSceopedBuiltinKey
81724
+ }) : void 0;
81725
+ const hasPendingLinkPrefixInputs = hasLinkableVolumeTypes && (isPendingLinkSegment(clusterPrepared) || isPendingLinkSegment(linkableNamespace) || isPendingLinkSegment(configMapFactoryKey) || isPendingLinkSegment(secretFactoryKey));
81726
+ const isLinkPrefixLoading = hasLinkableVolumeTypes && !isMultiQueryErrors && !isNavigationError && (isNavigationLoading || hasPendingLinkPrefixInputs);
81727
+ const resourceLinkPrefixes = useMemo(() => {
81728
+ if (!hasLinkableVolumeTypes || isLinkPrefixLoading) {
81729
+ return void 0;
81730
+ }
81731
+ return {
81732
+ configMap: getVolumeResourceLinkPrefix({
81733
+ baseprefix,
81734
+ cluster: clusterPrepared,
81735
+ namespace: linkableNamespace,
81736
+ apiGroupVersion: "v1",
81737
+ pluralName: "configmaps",
81738
+ baseFactoryNamespacedAPIKey,
81739
+ baseFactoryClusterSceopedAPIKey,
81740
+ baseFactoryNamespacedBuiltinKey,
81741
+ baseFactoryClusterSceopedBuiltinKey,
81742
+ baseFactoriesMapping
81743
+ }) || "",
81744
+ secret: getVolumeResourceLinkPrefix({
81745
+ baseprefix,
81746
+ cluster: clusterPrepared,
81747
+ namespace: linkableNamespace,
81748
+ apiGroupVersion: "v1",
81749
+ pluralName: "secrets",
81750
+ baseFactoryNamespacedAPIKey,
81751
+ baseFactoryClusterSceopedAPIKey,
81752
+ baseFactoryNamespacedBuiltinKey,
81753
+ baseFactoryClusterSceopedBuiltinKey,
81754
+ baseFactoriesMapping
81755
+ }) || ""
81756
+ };
81757
+ }, [
81758
+ hasLinkableVolumeTypes,
81759
+ isLinkPrefixLoading,
81760
+ baseprefix,
81761
+ clusterPrepared,
81762
+ linkableNamespace,
81763
+ baseFactoryNamespacedAPIKey,
81764
+ baseFactoryClusterSceopedAPIKey,
81765
+ baseFactoryNamespacedBuiltinKey,
81766
+ baseFactoryClusterSceopedBuiltinKey,
81767
+ baseFactoriesMapping
81768
+ ]);
81769
+ const dataSource = useMemo(
81770
+ () => dataSourceWithoutHref.map((row) => ({
81771
+ ...row,
81772
+ typeHref: getVolumeTypeHref({
81773
+ typeKey: row.typeKey,
81774
+ typeName: row.typeName,
81775
+ resourceLinkPrefixes
81776
+ })
81777
+ })),
81778
+ [dataSourceWithoutHref, resourceLinkPrefixes]
81779
+ );
81780
+ if (isMultiQueryLoading || isLinkPrefixLoading) {
81610
81781
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading..." });
81611
81782
  }
81612
81783
  if (isMultiQueryErrors) {
@@ -81636,8 +81807,20 @@ const Volumes = ({ data, children }) => {
81636
81807
  ] });
81637
81808
  };
81638
81809
 
81810
+ const httpStatusToResultStatus = (statusCode) => {
81811
+ if (statusCode === 403) return "403";
81812
+ if (statusCode === 404) return "404";
81813
+ if (statusCode && statusCode >= 500) return "500";
81814
+ return "error";
81815
+ };
81816
+ const getDefaultTitle = (status) => {
81817
+ if (status === "403") return "Access Denied";
81818
+ if (status === "404") return "Not Found";
81819
+ if (status === "500") return "Server Error";
81820
+ return "Error";
81821
+ };
81639
81822
  const AntdResult = ({ data, children }) => {
81640
- const { data: multiQueryData, isLoading } = useMultiQuery();
81823
+ const { data: multiQueryData, isLoading, errors } = useMultiQuery();
81641
81824
  const partsOfUrl = usePartsOfUrl();
81642
81825
  if (isLoading) {
81643
81826
  return null;
@@ -81646,6 +81829,20 @@ const AntdResult = ({ data, children }) => {
81646
81829
  acc[index.toString()] = value;
81647
81830
  return acc;
81648
81831
  }, {});
81832
+ if (typeof data.reqIndex === "number") {
81833
+ const error = errors[data.reqIndex];
81834
+ if (!error) {
81835
+ return children ?? null;
81836
+ }
81837
+ const errorObj = error;
81838
+ const httpStatus = errorObj?.response?.status;
81839
+ const autoStatus = httpStatusToResultStatus(httpStatus);
81840
+ const autoMessage = errorObj?.response?.statusText || errorObj?.message || String(error);
81841
+ const status = data.status ?? autoStatus;
81842
+ const title = data.title ? parseAll({ text: data.title, replaceValues, multiQueryData }) : getDefaultTitle(status);
81843
+ const subTitle = data.subTitle ? parseAll({ text: data.subTitle, replaceValues, multiQueryData }) : autoMessage;
81844
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Result, { status, title, subTitle, style: data.style, children });
81845
+ }
81649
81846
  const parsedTitle = data.title ? parseAll({ text: data.title, replaceValues, multiQueryData }) : void 0;
81650
81847
  const parsedSubTitle = data.subTitle ? parseAll({ text: data.subTitle, replaceValues, multiQueryData }) : void 0;
81651
81848
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Result, { status: data.status, title: parsedTitle, subTitle: parsedSubTitle, style: data.style, children });
@@ -91397,4 +91594,4 @@ const usePluginManifest = ({
91397
91594
  };
91398
91595
 
91399
91596
  export { useInfiniteSentinel as $, getBuiltinResourceTypes as A, getCrdData as B, getDirectUnknownResource as C, DeleteIcon as D, EnrichedTableProvider as E, checkPermission as F, getSwagger as G, filterIfApiInstanceNamespaceScoped as H, filterIfBuiltInInstanceNamespaceScoped as I, checkIfApiInstanceNamespaceScoped as J, checkIfBuiltInInstanceNamespaceScoped as K, getKinds as L, useClusterList as M, useApiResources as N, useApiResourceSingle as O, PaddingContainer as P, useBuiltinResources as Q, ReadOnlyModal as R, useBuiltinResourceSingle as S, useCrdResources as T, useCrdResourceSingle as U, useApisResourceTypes as V, useApiResourceTypesByGroup as W, useBuiltinResourceTypes as X, useCrdData as Y, useListWatch as Z, _$1 as _, useTheme as a, parseQuotaValueCpu as a$, useK8sVerbs as a0, useManyK8sSmartResource as a1, useSmartResourceParams as a2, useResourceScope as a3, useKinds as a4, usePluginManifest as a5, Spacer$1 as a6, TreeWithSearch as a7, ConfirmModal as a8, UpIcon as a9, EnrichedTable as aA, ClusterListTable as aB, getEnrichedColumns as aC, getEnrichedColumnsWithControls as aD, YamlEditorSingleton$1 as aE, BlackholeFormProvider as aF, BlackholeForm as aG, getObjectFormItemsDraft as aH, MarketPlace as aI, MarketplaceCard as aJ, ProjectInfoCard as aK, PodTerminal as aL, NodeTerminal as aM, PodLogs as aN, PodLogsMonaco as aO, VMVNC as aP, Search as aQ, Events as aR, DynamicRenderer as aS, DynamicComponents as aT, DynamicRendererWithProviders as aU, prepareTemplate as aV, isFlatObject as aW, filterSelectOptions as aX, getStringByName as aY, floorToDecimal as aZ, parseQuotaValue as a_, DownIcon as aa, BackToDefaultIcon as ab, SuccessIcon as ac, feedbackIcons as ad, PlusIcon as ae, MinusIcon as af, LockedIcon as ag, UnlockedIcon as ah, PauseCircleIcon as ai, ResumeCircleIcon as aj, LookingGlassIcon as ak, EarthIcon as al, ContentCard$1 as am, FlexGrow as an, UncontrolledSelect as ao, CustomSelect$4 as ap, CursorPointerTag as aq, CursorPointerTagMinContent as ar, CursorDefaultDiv as as, ResourceLink as at, ManageableBreadcrumbsProvider as au, prepareDataForManageableBreadcrumbs as av, ManageableBreadcrumbs as aw, ManageableSidebarProvider as ax, prepareDataForManageableSidebar as ay, ManageableSidebar as az, usePartsOfUrl as b, parseQuotaValueMemoryAndStorage as b0, normalizeValuesForQuotasToNumber as b1, getAllPathsFromObj as b2, getPrefixSubarrays as b3, groupsToTreeData as b4, getBuiltinTreeData as b5, getGroupsByCategory as b6, createContextFactory as b7, prepareUrlsToFetchForDynamicRenderer as b8, deepMerge as b9, getSortedKinds as ba, getSortedKindsAll as bb, hslFromString as bc, getUppercase as bd, kindByGvr as be, pluralByKind as bf, namespacedByGvr as bg, getLinkToBuiltinForm as bh, getLinkToApiForm as bi, isMultilineString as bj, isMultilineFromYaml as bk, includesArray as bl, getResourceLink as bm, getNamespaceLink as bn, convertBytes as bo, formatBytesAuto as bp, toBytes as bq, convertStorage as br, parseValueWithUnit as bs, convertCores as bt, formatCoresAuto as bu, toCores as bv, convertCompute as bw, parseCoresWithUnit as bx, formatDateAuto as by, isValidRFC3339 as bz, usePermissions as c, useDirectUnknownResource as d, useK8sSmartResource as e, jsxRuntimeExports as f, EditIcon as g, getLinkToForm as h, DeleteModal as i, jp as j, DeleteModalMany as k, getClusterList as l, createNewEntry as m, updateEntry as n, deleteEntry as o, parseAll as p, getApiResources as q, getApiResourceSingle as r, serializeLabelsWithNoEncoding$1 as s, getBuiltinResources as t, useMultiQuery as u, getBuiltinResourceSingle as v, getCrdResources as w, getCrdResourceSingle as x, getApiResourceTypes as y, getApiResourceTypesByApiGroup as z };
91400
- //# sourceMappingURL=index-C4_frU1l.mjs.map
91597
+ //# sourceMappingURL=index-DX9lpTFs.mjs.map