@prorobotech/openapi-k8s-toolkit 1.4.0-alpha.24 → 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.
- package/dist/{index-PHzKotN_.mjs → index-C4_frU1l.mjs} +32 -5
- package/dist/index-C4_frU1l.mjs.map +1 -0
- package/dist/{index-DfXU2S4O.mjs → index-CVmBLq_Q.mjs} +2 -2
- package/dist/{index-DfXU2S4O.mjs.map → index-CVmBLq_Q.mjs.map} +1 -1
- package/dist/openapi-k8s-toolkit.es.js +1 -1
- package/dist/openapi-k8s-toolkit.umd.js +29 -2
- package/dist/openapi-k8s-toolkit.umd.js.map +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/AntdResult/AntdResult.d.ts +6 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/AntdResult/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/types/antdComponents.d.ts +8 -1
- package/dist/types/components/organisms/DynamicComponents/types/index.d.ts +2 -1
- package/package.json +1 -1
- package/dist/index-PHzKotN_.mjs.map +0 -1
|
@@ -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,
|
|
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';
|
|
@@ -78621,7 +78621,7 @@ const TolerationsModal = ({
|
|
|
78621
78621
|
};
|
|
78622
78622
|
|
|
78623
78623
|
const LazyEnrichedTableModal = lazy(
|
|
78624
|
-
() => import('./index-
|
|
78624
|
+
() => import('./index-CVmBLq_Q.mjs').then((mod) => ({ default: mod.EnrichedTableModal }))
|
|
78625
78625
|
);
|
|
78626
78626
|
const renderActiveType = (activeType, extraProps) => {
|
|
78627
78627
|
if (!activeType) return null;
|
|
@@ -81636,6 +81636,21 @@ const Volumes = ({ data, children }) => {
|
|
|
81636
81636
|
] });
|
|
81637
81637
|
};
|
|
81638
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
|
+
|
|
81639
81654
|
const DynamicComponents = {
|
|
81640
81655
|
DefaultDiv,
|
|
81641
81656
|
antdText: AntdText,
|
|
@@ -81647,6 +81662,7 @@ const DynamicComponents = {
|
|
|
81647
81662
|
antdTabs: AntdTabs,
|
|
81648
81663
|
antdButton: AntdButton,
|
|
81649
81664
|
antdIcons: AntdIcons,
|
|
81665
|
+
antdResult: AntdResult,
|
|
81650
81666
|
partsOfUrl: PartsOfUrl,
|
|
81651
81667
|
multiQuery: MultiQuery,
|
|
81652
81668
|
parsedText: ParsedText,
|
|
@@ -85758,6 +85774,7 @@ const BlackholeForm = ({
|
|
|
85758
85774
|
designNewLayoutHeight
|
|
85759
85775
|
}) => {
|
|
85760
85776
|
const { token } = theme.useToken();
|
|
85777
|
+
const { notification: notificationApi } = App.useApp();
|
|
85761
85778
|
const navigate = useNavigate();
|
|
85762
85779
|
const [form] = Form.useForm();
|
|
85763
85780
|
const allValues = Form.useWatch([], form);
|
|
@@ -85872,7 +85889,12 @@ const BlackholeForm = ({
|
|
|
85872
85889
|
const body = data;
|
|
85873
85890
|
const endpoint = `/api/clusters/${cluster}/k8s/${type === "builtin" ? "" : "apis/"}${apiGroupApiVersion}${isNameSpaced ? `/namespaces/${namespace}` : ""}/${plural}/${isCreate ? "" : name}`;
|
|
85874
85891
|
if (isCreate) {
|
|
85875
|
-
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
|
+
});
|
|
85876
85898
|
if (resolvedBacklink) {
|
|
85877
85899
|
navigate(resolvedBacklink);
|
|
85878
85900
|
}
|
|
@@ -85886,7 +85908,12 @@ const BlackholeForm = ({
|
|
|
85886
85908
|
setError(error2);
|
|
85887
85909
|
});
|
|
85888
85910
|
} else {
|
|
85889
|
-
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
|
+
});
|
|
85890
85917
|
if (resolvedBacklink) {
|
|
85891
85918
|
navigate(resolvedBacklink);
|
|
85892
85919
|
}
|
|
@@ -91370,4 +91397,4 @@ const usePluginManifest = ({
|
|
|
91370
91397
|
};
|
|
91371
91398
|
|
|
91372
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 };
|
|
91373
|
-
//# sourceMappingURL=index-
|
|
91400
|
+
//# sourceMappingURL=index-C4_frU1l.mjs.map
|