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

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.
@@ -1,7 +1,7 @@
1
1
  import styled, { css, createGlobalStyle } from 'styled-components';
2
2
  import * as React$1 from 'react';
3
3
  import React__default, { useState, useRef, useLayoutEffect, useReducer, useEffect, useCallback, useMemo, Fragment, createContext, useContext, memo, createElement, isValidElement, cloneElement, useInsertionEffect, useSyncExternalStore, forwardRef, useImperativeHandle, PureComponent, Children, Component, lazy, Suspense } from 'react';
4
- import { Input, Tree, Modal, Alert, theme, Select, Tag, Flex, Typography, Breadcrumb, Spin, Menu, Tooltip as Tooltip$1, Space, Button, ConfigProvider, Popover, Card as Card$2, Row, Col, Tabs, notification, Form, Switch, Segmented, Table, Progress, Statistic, message, Checkbox, List as List$1, InputNumber, Upload, Dropdown, Slider, Result, DatePicker, Radio, Empty } from 'antd';
4
+ import { Input, Tree, Modal, Alert, theme, Select, Tag, Flex, Typography, Breadcrumb, Spin, Menu, Tooltip as Tooltip$1, Space, Button, ConfigProvider, Popover, Card as Card$2, Row, Col, Tabs, notification, Form, Switch, Segmented, Table, Progress, Statistic, message, Checkbox, List as List$1, InputNumber, Upload, Dropdown, Result, Slider, App, DatePicker, Radio, Empty } from 'antd';
5
5
  import * as AntIcons from '@ant-design/icons';
6
6
  import { LoadingOutlined, ExclamationCircleFilled, CloseCircleFilled, CheckCircleFilled, PlusOutlined, ClearOutlined, MinusOutlined, CaretDownOutlined, CaretRightOutlined, InfoCircleOutlined, SearchOutlined, EyeOutlined, EyeInvisibleOutlined, CopyOutlined, InboxOutlined, DeleteOutlined, WarningOutlined, MoreOutlined, DownOutlined, QuestionCircleOutlined, CheckOutlined, CloseOutlined, BugOutlined, EllipsisOutlined, PoweroffOutlined, FullscreenExitOutlined, FullscreenOutlined, SettingOutlined, ReloadOutlined } from '@ant-design/icons';
7
7
  import { useNavigate, useSearchParams, Link, useLocation, useParams } from 'react-router-dom';
@@ -34865,41 +34865,6 @@ const AntdText = ({
34865
34865
  };
34866
34866
 
34867
34867
  const MultiQueryContext = createContext(void 0);
34868
- const makeEmptyEntry = () => ({
34869
- data: void 0,
34870
- isLoading: false,
34871
- isError: false,
34872
- error: null
34873
- });
34874
- const aggReducer = (state, action) => {
34875
- switch (action.type) {
34876
- case "RESET":
34877
- return { entries: Array.from({ length: action.total }, makeEmptyEntry) };
34878
- case "SET_ENTRY": {
34879
- const entries = state.entries.slice();
34880
- entries[action.index] = action.entry;
34881
- return { entries };
34882
- }
34883
- default:
34884
- return state;
34885
- }
34886
- };
34887
- const K8sFetcher = ({ index, params, dispatch }) => {
34888
- const res = useK8sSmartResource(params);
34889
- useEffect(() => {
34890
- dispatch({
34891
- type: "SET_ENTRY",
34892
- index,
34893
- entry: {
34894
- data: res.data,
34895
- isLoading: res.isLoading,
34896
- isError: res.isError,
34897
- error: res.error ?? null
34898
- }
34899
- });
34900
- }, [index, res.data, res.isLoading, res.isError, res.error, dispatch]);
34901
- return null;
34902
- };
34903
34868
  const MultiQueryProvider = ({ items, dataToApplyToContext, children }) => {
34904
34869
  const k8sItems = useMemo(
34905
34870
  () => items.filter((x) => typeof x !== "string"),
@@ -34908,10 +34873,7 @@ const MultiQueryProvider = ({ items, dataToApplyToContext, children }) => {
34908
34873
  const urlItems = useMemo(() => items.filter((x) => typeof x === "string"), [items]);
34909
34874
  const k8sCount = k8sItems.length;
34910
34875
  const urlCount = urlItems.length;
34911
- const [state, dispatch] = useReducer(aggReducer, { entries: Array.from({ length: k8sCount }, makeEmptyEntry) });
34912
- useEffect(() => {
34913
- dispatch({ type: "RESET", total: k8sCount });
34914
- }, [k8sCount]);
34876
+ const k8sResults = useManyK8sSmartResource(k8sItems);
34915
34877
  const urlQueries = useQueries({
34916
34878
  queries: urlItems.map((url, i) => ({
34917
34879
  queryKey: ["multi-url", i, url],
@@ -34929,10 +34891,10 @@ const MultiQueryProvider = ({ items, dataToApplyToContext, children }) => {
34929
34891
  const hasExtraReq0 = typeof dataToApplyToContext !== "undefined";
34930
34892
  const baseIndex = hasExtraReq0 ? 1 : 0;
34931
34893
  for (let i = 0; i < k8sCount; i++) {
34932
- const e = state.entries[i] ?? makeEmptyEntry();
34894
+ const result = k8sResults[i];
34933
34895
  const idx = baseIndex + i;
34934
- data[`req${idx}`] = e.data;
34935
- errors[idx] = e.isError ? e.error : null;
34896
+ data[`req${idx}`] = result?.data;
34897
+ errors[idx] = result?.isError ? result.error ?? null : null;
34936
34898
  }
34937
34899
  for (let i = 0; i < urlCount; i++) {
34938
34900
  const q = urlQueries[i];
@@ -34944,17 +34906,11 @@ const MultiQueryProvider = ({ items, dataToApplyToContext, children }) => {
34944
34906
  data.req0 = dataToApplyToContext;
34945
34907
  errors[0] = null;
34946
34908
  }
34947
- const isLoading = state.entries.some((e) => e.isLoading) || urlQueries.some((q) => q.isLoading);
34948
- const isError = state.entries.some((e) => e.isError) || urlQueries.some((q) => q.isError);
34909
+ const isLoading = k8sResults.some((r) => r.isLoading) || urlQueries.some((q) => q.isLoading);
34910
+ const isError = k8sResults.some((r) => r.isError) || urlQueries.some((q) => q.isError);
34949
34911
  return { data, isLoading, isError, errors };
34950
34912
  })();
34951
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(MultiQueryContext.Provider, { value, children: [
34952
- k8sItems.map((params, i) => (
34953
- // eslint-disable-next-line react/no-array-index-key
34954
- /* @__PURE__ */ jsxRuntimeExports.jsx(K8sFetcher, { index: i, params, dispatch }, i)
34955
- )),
34956
- children
34957
- ] });
34913
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(MultiQueryContext.Provider, { value, children });
34958
34914
  };
34959
34915
  const useMultiQuery = () => {
34960
34916
  const ctx = useContext(MultiQueryContext);
@@ -35016,12 +34972,13 @@ const AntdLink = ({
35016
34972
  return acc;
35017
34973
  }, {});
35018
34974
  const textPrepared = parseAll({ text, replaceValues, multiQueryData });
34975
+ const tooltipPrepared = typeof linkProps.title === "string" ? parseAll({ text: linkProps.title, replaceValues, multiQueryData }) : void 0;
35019
34976
  const hrefPrepared = parseAll({ text: href, replaceValues, multiQueryData });
35020
34977
  const isExternal = isExternalHref(hrefPrepared);
35021
34978
  if (isMultiqueryLoading) {
35022
34979
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading multiquery" });
35023
34980
  }
35024
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(
34981
+ const content = /* @__PURE__ */ jsxRuntimeExports.jsxs(
35025
34982
  Typography.Link,
35026
34983
  {
35027
34984
  href: hrefPrepared,
@@ -35039,6 +34996,10 @@ const AntdLink = ({
35039
34996
  ]
35040
34997
  }
35041
34998
  );
34999
+ if (tooltipPrepared) {
35000
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip$1, { title: tooltipPrepared, children: content });
35001
+ }
35002
+ return content;
35042
35003
  };
35043
35004
 
35044
35005
  const AntdCard = ({
@@ -35283,8 +35244,13 @@ const ParsedText = ({ data }) => {
35283
35244
  return acc;
35284
35245
  }, {});
35285
35246
  const parsedText = parseAll({ text: data.text, replaceValues, multiQueryData });
35247
+ const parsedTooltip = data.tooltip ? parseAll({ text: data.tooltip, replaceValues, multiQueryData }) : void 0;
35286
35248
  const formattedText = data.formatter ? formatLocalDate(parsedText) : parsedText;
35287
- return /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: data.style, children: formattedText });
35249
+ const content = /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: data.style, children: formattedText });
35250
+ if (parsedTooltip) {
35251
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip$1, { title: parsedTooltip, children: content });
35252
+ }
35253
+ return content;
35288
35254
  };
35289
35255
 
35290
35256
  const MappedParsedText = ({ data }) => {
@@ -78655,7 +78621,7 @@ const TolerationsModal = ({
78655
78621
  };
78656
78622
 
78657
78623
  const LazyEnrichedTableModal = lazy(
78658
- () => import('./index-oRwnOGcM.mjs').then((mod) => ({ default: mod.EnrichedTableModal }))
78624
+ () => import('./index-CVmBLq_Q.mjs').then((mod) => ({ default: mod.EnrichedTableModal }))
78659
78625
  );
78660
78626
  const renderActiveType = (activeType, extraProps) => {
78661
78627
  if (!activeType) return null;
@@ -81305,12 +81271,129 @@ const ActionsDropdown = ({ data, children }) => {
81305
81271
  ] });
81306
81272
  };
81307
81273
 
81308
- const getVolumeTypeMeta = (volumeName, volumesMap) => {
81274
+ const ellipsisStyle = {
81275
+ display: "inline-block",
81276
+ overflow: "hidden",
81277
+ textOverflow: "ellipsis",
81278
+ whiteSpace: "nowrap",
81279
+ verticalAlign: "bottom"
81280
+ };
81281
+ const VOLUME_TYPE_LABELS = {
81282
+ awsElasticBlockStore: "AwsElasticBlockStore",
81283
+ azureDisk: "AzureDisk",
81284
+ azureFile: "AzureFile",
81285
+ cephfs: "Cephfs",
81286
+ cinder: "Cinder",
81287
+ configMap: "ConfigMap",
81288
+ csi: "CSI",
81289
+ downwardAPI: "DownwardAPI",
81290
+ emptyDir: "EmptyDir",
81291
+ ephemeral: "Ephemeral",
81292
+ fc: "FC",
81293
+ flexVolume: "FlexVolume",
81294
+ flocker: "Flocker",
81295
+ gcePersistentDisk: "GcePersistentDisk",
81296
+ gitRepo: "GitRepo",
81297
+ glusterfs: "Glusterfs",
81298
+ hostPath: "HostPath",
81299
+ image: "Image",
81300
+ iscsi: "ISCSI",
81301
+ nfs: "NFS",
81302
+ persistentVolumeClaim: "PersistentVolumeClaim",
81303
+ photonPersistentDisk: "PhotonPersistentDisk",
81304
+ portworxVolume: "PortworxVolume",
81305
+ projected: "Projected",
81306
+ quobyte: "Quobyte",
81307
+ rbd: "RBD",
81308
+ scaleIO: "ScaleIO",
81309
+ secret: "Secret",
81310
+ storageos: "StorageOS",
81311
+ vsphereVolume: "VsphereVolume"
81312
+ };
81313
+ const getVolumeDisplayName = (typeKey, volumeConfig, fallbackName) => {
81314
+ switch (typeKey) {
81315
+ case "configMap":
81316
+ return volumeConfig?.name || fallbackName;
81317
+ case "secret":
81318
+ return volumeConfig?.secretName || fallbackName;
81319
+ case "persistentVolumeClaim":
81320
+ return volumeConfig?.claimName || fallbackName;
81321
+ case "azureDisk":
81322
+ return volumeConfig?.diskName || fallbackName;
81323
+ case "csi":
81324
+ return volumeConfig?.driver || fallbackName;
81325
+ case "image":
81326
+ return volumeConfig?.reference || fallbackName;
81327
+ case "projected":
81328
+ return Array.isArray(volumeConfig?.sources) && volumeConfig.sources.length > 0 ? `${volumeConfig.sources.length} sources` : fallbackName;
81329
+ default:
81330
+ return volumeConfig?.volumeID || volumeConfig?.path || volumeConfig?.targetWWNs?.[0] || volumeConfig?.datasetName || volumeConfig?.repository || volumeConfig?.server || volumeConfig?.name || fallbackName;
81331
+ }
81332
+ };
81333
+ const getVolumeTypeMeta = (volumeName, vol) => {
81334
+ if (!vol) return { typeResource: "Volume", typeKey: "volume", typeName: volumeName };
81335
+ const matchedType = Object.keys(VOLUME_TYPE_LABELS).find((typeKey) => Boolean(vol[typeKey]));
81336
+ if (matchedType) {
81337
+ return {
81338
+ typeResource: VOLUME_TYPE_LABELS[matchedType],
81339
+ typeKey: matchedType,
81340
+ typeName: getVolumeDisplayName(matchedType, vol[matchedType], volumeName)
81341
+ };
81342
+ }
81343
+ return { typeResource: "Volume", typeKey: "volume", typeName: volumeName };
81344
+ };
81345
+ const getProjectedSourceMeta = (projectedSource, fallbackName) => {
81346
+ if (!projectedSource || typeof projectedSource !== "object") {
81347
+ return { typeResource: "Projected", typeKey: "projected", typeName: fallbackName };
81348
+ }
81349
+ const projectedTypeKey = Object.keys(projectedSource).find(
81350
+ (typeKey) => ["configMap", "secret", "downwardAPI", "serviceAccountToken", "clusterTrustBundle"].includes(typeKey)
81351
+ );
81352
+ if (!projectedTypeKey) {
81353
+ return { typeResource: "Projected", typeKey: "projected", typeName: fallbackName };
81354
+ }
81355
+ const sourceConfig = projectedSource[projectedTypeKey];
81356
+ if (projectedTypeKey === "configMap") {
81357
+ return {
81358
+ typeResource: "ConfigMap",
81359
+ typeKey: "configMap",
81360
+ typeName: sourceConfig?.name || fallbackName
81361
+ };
81362
+ }
81363
+ if (projectedTypeKey === "secret") {
81364
+ return {
81365
+ typeResource: "Secret",
81366
+ typeKey: "secret",
81367
+ typeName: sourceConfig?.name || fallbackName
81368
+ };
81369
+ }
81370
+ if (projectedTypeKey === "downwardAPI") {
81371
+ return {
81372
+ typeResource: "DownwardAPI",
81373
+ typeKey: "downwardAPI",
81374
+ typeName: sourceConfig?.items?.[0]?.path || fallbackName
81375
+ };
81376
+ }
81377
+ if (projectedTypeKey === "serviceAccountToken") {
81378
+ return {
81379
+ typeResource: "ServiceAccountToken",
81380
+ typeKey: "serviceAccountToken",
81381
+ typeName: sourceConfig?.path || fallbackName
81382
+ };
81383
+ }
81384
+ return {
81385
+ typeResource: "ClusterTrustBundle",
81386
+ typeKey: "clusterTrustBundle",
81387
+ typeName: sourceConfig?.path || sourceConfig?.name || fallbackName
81388
+ };
81389
+ };
81390
+ const getVolumeTypeMetas = (volumeName, volumesMap) => {
81309
81391
  const vol = volumesMap[volumeName];
81310
- if (!vol) return { typeResource: "Volume", typeName: volumeName };
81311
- if (vol.configMap) return { typeResource: "ConfigMap", typeName: vol.configMap.name };
81312
- if (vol.secret) return { typeResource: "Secret", typeName: vol.secret.secretName };
81313
- return { typeResource: "Volume", typeName: volumeName };
81392
+ if (!vol) return [getVolumeTypeMeta(volumeName, vol)];
81393
+ if (Array.isArray(vol?.projected?.sources) && vol.projected.sources.length > 0) {
81394
+ return vol.projected.sources.map((source) => getProjectedSourceMeta(source, volumeName));
81395
+ }
81396
+ return [getVolumeTypeMeta(volumeName, vol)];
81314
81397
  };
81315
81398
  const columns = [
81316
81399
  { title: "Name", dataIndex: "name", key: "name" },
@@ -81321,7 +81404,33 @@ const columns = [
81321
81404
  { title: "Utilized by", dataIndex: "containerName", key: "containerName" }
81322
81405
  // { title: 'Type', dataIndex: 'typeResource', key: 'typeResource' },
81323
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;
81324
81416
  const customColumns = {
81417
+ mountPath: {
81418
+ type: "factory",
81419
+ customProps: {
81420
+ disableEventBubbling: true,
81421
+ items: [
81422
+ {
81423
+ type: "parsedText",
81424
+ data: {
81425
+ id: "mountPath-text",
81426
+ text: "{reqsJsonPath[0]['.mountPath']['-']}",
81427
+ tooltip: "{reqsJsonPath[0]['.mountPath']['-']}",
81428
+ style: ellipsisStyle
81429
+ }
81430
+ }
81431
+ ]
81432
+ }
81433
+ },
81325
81434
  typeName: {
81326
81435
  type: "factory",
81327
81436
  customProps: {
@@ -81344,11 +81453,77 @@ const customColumns = {
81344
81453
  }
81345
81454
  },
81346
81455
  {
81347
- type: "parsedText",
81456
+ type: "VisibilityContainer",
81348
81457
  data: {
81349
- id: "typeName-text",
81350
- text: `{reqsJsonPath[0]['.typeName']['-']}`
81351
- }
81458
+ id: "typeName-link-visible",
81459
+ value: "{reqsJsonPath[0]['.typeKey']['-']}",
81460
+ criteria: "equals",
81461
+ valueToCompare: ["configMap", "secret"]
81462
+ },
81463
+ children: [
81464
+ {
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",
81487
+ 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
+ ]
81505
+ }
81506
+ ]
81507
+ },
81508
+ {
81509
+ type: "VisibilityContainer",
81510
+ data: {
81511
+ id: "typeName-text-visible",
81512
+ value: "{reqsJsonPath[0]['.typeKey']['-']}",
81513
+ criteria: "notEquals",
81514
+ valueToCompare: ["configMap", "secret"]
81515
+ },
81516
+ children: [
81517
+ {
81518
+ type: "parsedText",
81519
+ data: {
81520
+ id: "typeName-text",
81521
+ text: "{reqsJsonPath[0]['.typeName']['-']}",
81522
+ tooltip: "{reqsJsonPath[0]['.typeName']['-']}",
81523
+ style: ellipsisStyle
81524
+ }
81525
+ }
81526
+ ]
81352
81527
  }
81353
81528
  ]
81354
81529
  }
@@ -81377,10 +81552,13 @@ const customColumns = {
81377
81552
  }
81378
81553
  },
81379
81554
  {
81380
- type: "parsedText",
81555
+ type: "antdLink",
81381
81556
  data: {
81382
- id: "typeName-text",
81383
- text: `{reqsJsonPath[0]['.containerName']['-']}`
81557
+ href: "/openapi-ui/{2}/{3}/factory/container-details/v1/containers/{reqsJsonPath[0]['.podName']['-']}/{reqsJsonPath[0]['.containerName']['-']}",
81558
+ id: "container-link",
81559
+ text: "{reqsJsonPath[0]['.containerName']['-']}",
81560
+ title: "{reqsJsonPath[0]['.containerName']['-']}",
81561
+ style: ellipsisStyle
81384
81562
  }
81385
81563
  }
81386
81564
  ]
@@ -81390,7 +81568,7 @@ const customColumns = {
81390
81568
  }
81391
81569
  };
81392
81570
  const Volumes = ({ data, children }) => {
81393
- const { id, reqIndex, jsonPathToSpec, errorText, containerStyle } = data;
81571
+ const { id, reqIndex, jsonPathToSpec, jsonPathToPodName, errorText, containerStyle } = data;
81394
81572
  const theme = useTheme();
81395
81573
  const { data: multiQueryData, isLoading: isMultiQueryLoading, isError: isMultiQueryErrors, errors } = useMultiQuery();
81396
81574
  const dataSource = useMemo(() => {
@@ -81400,6 +81578,9 @@ const Volumes = ({ data, children }) => {
81400
81578
  const specResult = jp.query(jsonRoot2 || {}, `$${jsonPathToSpec}`);
81401
81579
  const spec = specResult?.[0];
81402
81580
  if (!spec) return [];
81581
+ const namespace = jsonRoot2?.metadata?.namespace || spec?.metadata?.namespace || "";
81582
+ const podNameFromPath = jsonPathToPodName ? jp.query(jsonRoot2 || {}, `$${jsonPathToPodName}`)?.[0] : void 0;
81583
+ const podName = podNameFromPath || jsonRoot2?.metadata?.name || spec?.metadata?.name || "-";
81403
81584
  const containers = Array.isArray(spec.containers) ? spec.containers : [];
81404
81585
  const volumes = Array.isArray(spec.volumes) ? spec.volumes : [];
81405
81586
  const volumesMap = Array.isArray(volumes) ? volumes.reduce((acc, v) => {
@@ -81408,15 +81589,23 @@ const Volumes = ({ data, children }) => {
81408
81589
  }, {}) : {};
81409
81590
  return containers.flatMap((container, cIdx) => {
81410
81591
  const mounts = Array.isArray(container.volumeMounts) ? container.volumeMounts : [];
81411
- return mounts.map((mount, mIdx) => ({
81412
- ...getVolumeTypeMeta(mount.name, volumesMap),
81413
- ...mount,
81414
- containerName: container.name || `container-${cIdx}`,
81415
- access: mount.readOnly ? "RO" : "RW",
81416
- key: `${cIdx}-${mIdx}`
81417
- }));
81592
+ 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
+ }))
81606
+ );
81418
81607
  });
81419
- }, [multiQueryData, isMultiQueryLoading, isMultiQueryErrors, reqIndex, jsonPathToSpec]);
81608
+ }, [multiQueryData, isMultiQueryLoading, isMultiQueryErrors, reqIndex, jsonPathToSpec, jsonPathToPodName]);
81420
81609
  if (isMultiQueryLoading) {
81421
81610
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading..." });
81422
81611
  }
@@ -81437,6 +81626,7 @@ const Volumes = ({ data, children }) => {
81437
81626
  theme,
81438
81627
  columns,
81439
81628
  dataSource,
81629
+ additionalPrinterColumnsUndefinedValues: undefinedValues,
81440
81630
  additionalPrinterColumnsKeyTypeProps: customColumns,
81441
81631
  withoutControls: true,
81442
81632
  tableProps: { disablePagination: true }
@@ -81446,6 +81636,21 @@ const Volumes = ({ data, children }) => {
81446
81636
  ] });
81447
81637
  };
81448
81638
 
81639
+ const AntdResult = ({ data, children }) => {
81640
+ const { data: multiQueryData, isLoading } = useMultiQuery();
81641
+ const partsOfUrl = usePartsOfUrl();
81642
+ if (isLoading) {
81643
+ return null;
81644
+ }
81645
+ const replaceValues = partsOfUrl.partsOfUrl.reduce((acc, value, index) => {
81646
+ acc[index.toString()] = value;
81647
+ return acc;
81648
+ }, {});
81649
+ const parsedTitle = data.title ? parseAll({ text: data.title, replaceValues, multiQueryData }) : void 0;
81650
+ const parsedSubTitle = data.subTitle ? parseAll({ text: data.subTitle, replaceValues, multiQueryData }) : void 0;
81651
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Result, { status: data.status, title: parsedTitle, subTitle: parsedSubTitle, style: data.style, children });
81652
+ };
81653
+
81449
81654
  const DynamicComponents = {
81450
81655
  DefaultDiv,
81451
81656
  antdText: AntdText,
@@ -81457,6 +81662,7 @@ const DynamicComponents = {
81457
81662
  antdTabs: AntdTabs,
81458
81663
  antdButton: AntdButton,
81459
81664
  antdIcons: AntdIcons,
81665
+ antdResult: AntdResult,
81460
81666
  partsOfUrl: PartsOfUrl,
81461
81667
  multiQuery: MultiQuery,
81462
81668
  parsedText: ParsedText,
@@ -85568,6 +85774,7 @@ const BlackholeForm = ({
85568
85774
  designNewLayoutHeight
85569
85775
  }) => {
85570
85776
  const { token } = theme.useToken();
85777
+ const { notification: notificationApi } = App.useApp();
85571
85778
  const navigate = useNavigate();
85572
85779
  const [form] = Form.useForm();
85573
85780
  const allValues = Form.useWatch([], form);
@@ -85682,7 +85889,12 @@ const BlackholeForm = ({
85682
85889
  const body = data;
85683
85890
  const endpoint = `/api/clusters/${cluster}/k8s/${type === "builtin" ? "" : "apis/"}${apiGroupApiVersion}${isNameSpaced ? `/namespaces/${namespace}` : ""}/${plural}/${isCreate ? "" : name}`;
85684
85891
  if (isCreate) {
85685
- createNewEntry({ endpoint, body }).then(() => {
85892
+ createNewEntry({ endpoint, body }).then((res) => {
85893
+ const resName = res.data?.metadata?.name || name;
85894
+ notificationApi.success({
85895
+ message: `${kind} "${resName}" created successfully`,
85896
+ placement: "bottomRight"
85897
+ });
85686
85898
  if (resolvedBacklink) {
85687
85899
  navigate(resolvedBacklink);
85688
85900
  }
@@ -85696,7 +85908,12 @@ const BlackholeForm = ({
85696
85908
  setError(error2);
85697
85909
  });
85698
85910
  } else {
85699
- updateEntry({ endpoint, body }).then(() => {
85911
+ updateEntry({ endpoint, body }).then((res) => {
85912
+ const resName = res.data?.metadata?.name || name;
85913
+ notificationApi.success({
85914
+ message: `${kind} "${resName}" updated successfully`,
85915
+ placement: "bottomRight"
85916
+ });
85700
85917
  if (resolvedBacklink) {
85701
85918
  navigate(resolvedBacklink);
85702
85919
  }
@@ -85785,7 +86002,9 @@ const BlackholeForm = ({
85785
86002
  if (!matches) continue;
85786
86003
  const concretePath = buildConcretePathForNewItem(tpl, arrayPath, newIndex);
85787
86004
  const current = form.getFieldValue(concretePath);
85788
- if (typeof current === "undefined") {
86005
+ const isItemLevelWildcard = tpl.wildcardPath[tpl.wildcardPath.length - 1] === "*";
86006
+ const isEffectivelyEmpty = typeof current === "undefined" || isItemLevelWildcard && _$1.isPlainObject(current) && _$1.isEmpty(current);
86007
+ if (isEffectivelyEmpty) {
85789
86008
  const toSet = _$1.cloneDeep(tpl.value);
85790
86009
  form.setFieldValue(concretePath, toSet);
85791
86010
  }
@@ -91178,4 +91397,4 @@ const usePluginManifest = ({
91178
91397
  };
91179
91398
 
91180
91399
  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 };
91181
- //# sourceMappingURL=index-C3GT20Hj.mjs.map
91400
+ //# sourceMappingURL=index-C4_frU1l.mjs.map