@prorobotech/openapi-k8s-toolkit 1.4.0-alpha.10 → 1.4.0-alpha.12
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-BwCZPalv.mjs → index-CWMOa8gQ.mjs} +411 -61
- package/dist/index-CWMOa8gQ.mjs.map +1 -0
- package/dist/{index-85og70S2.mjs → index-DlJkWTNK.mjs} +2 -2
- package/dist/{index-85og70S2.mjs.map → index-DlJkWTNK.mjs.map} +1 -1
- package/dist/openapi-k8s-toolkit.es.js +1 -1
- package/dist/openapi-k8s-toolkit.umd.js +407 -57
- package/dist/openapi-k8s-toolkit.umd.js.map +1 -1
- package/dist/types/components/molecules/EnrichedTable/organisms/EnrichedTable/EnrichedTable.d.ts +2 -1
- package/dist/types/components/molecules/EnrichedTable/organisms/EnrichedTable/atoms/TrimmedTags/styled.d.ts +851 -0
- package/dist/types/components/molecules/EnrichedTable/organisms/EnrichedTable/utils.d.ts +3 -2
- package/dist/types/components/molecules/YamlEditorSingleton/utils.d.ts +5 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/ActionsDropdown/hooks/useActionsDropdownHandlers.d.ts +28 -2
- package/dist/types/components/organisms/DynamicComponents/types/antdComponents.d.ts +3 -0
- package/dist/types/localTypes/bff/table.d.ts +2 -1
- package/dist/types/localTypes/dynamicRender.d.ts +1 -0
- package/dist/types/localTypes/richTable.d.ts +4 -0
- package/package.json +1 -1
- package/dist/index-BwCZPalv.mjs.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
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, Card as Card$2, Row, Col, Tabs, notification, Form,
|
|
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, InputNumber, Dropdown, Slider, Result, DatePicker, Radio, Checkbox, Empty } from 'antd';
|
|
5
5
|
import * as AntIcons from '@ant-design/icons';
|
|
6
|
-
import { LoadingOutlined, ExclamationCircleFilled, CloseCircleFilled, CheckCircleFilled, PlusOutlined, ClearOutlined, MinusOutlined, CaretDownOutlined, CaretRightOutlined, InfoCircleOutlined, SearchOutlined, EyeOutlined, EyeInvisibleOutlined, CopyOutlined, WarningOutlined, MoreOutlined, DownOutlined, CheckOutlined, CloseOutlined,
|
|
6
|
+
import { LoadingOutlined, ExclamationCircleFilled, CloseCircleFilled, CheckCircleFilled, PlusOutlined, ClearOutlined, MinusOutlined, CaretDownOutlined, CaretRightOutlined, InfoCircleOutlined, SearchOutlined, EyeOutlined, EyeInvisibleOutlined, CopyOutlined, 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';
|
|
8
8
|
import { useQuery, useQueries, useQueryClient } from '@tanstack/react-query';
|
|
9
9
|
import RFB from 'novnc-next';
|
|
@@ -1578,7 +1578,7 @@ const CustomTreeProvider = styled.div`
|
|
|
1578
1578
|
justify-content: center;
|
|
1579
1579
|
}
|
|
1580
1580
|
`;
|
|
1581
|
-
const Styled$
|
|
1581
|
+
const Styled$J = {
|
|
1582
1582
|
CustomTreeProvider
|
|
1583
1583
|
};
|
|
1584
1584
|
|
|
@@ -1643,7 +1643,7 @@ const TreeWithSearch = ({ treeData, onSelect }) => {
|
|
|
1643
1643
|
});
|
|
1644
1644
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
1645
1645
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Search$1, { style: { marginBottom: 8 }, placeholder: "Search", onChange }),
|
|
1646
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
1646
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$J.CustomTreeProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1647
1647
|
Tree,
|
|
1648
1648
|
{
|
|
1649
1649
|
treeData: loop(treeData),
|
|
@@ -8243,14 +8243,14 @@ const ContentContainer = styled.div`
|
|
|
8243
8243
|
display: ${({ $displayFlex }) => $displayFlex ? "flex" : "block"};
|
|
8244
8244
|
flex-flow: ${({ $flexFlow }) => $flexFlow};
|
|
8245
8245
|
`;
|
|
8246
|
-
const Styled$
|
|
8246
|
+
const Styled$I = {
|
|
8247
8247
|
ContentContainer
|
|
8248
8248
|
};
|
|
8249
8249
|
|
|
8250
8250
|
const ContentCard$1 = ({ children, flexGrow, displayFlex, flexFlow, maxHeight }) => {
|
|
8251
8251
|
const { token } = theme.useToken();
|
|
8252
8252
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8253
|
-
Styled$
|
|
8253
|
+
Styled$I.ContentContainer,
|
|
8254
8254
|
{
|
|
8255
8255
|
$flexGrow: flexGrow,
|
|
8256
8256
|
$bgColor: token.colorBgContainer,
|
|
@@ -8311,13 +8311,13 @@ const UncontrolledSelect$1 = styled(Select)`
|
|
|
8311
8311
|
padding-inline: 8px;
|
|
8312
8312
|
}
|
|
8313
8313
|
`;
|
|
8314
|
-
const Styled$
|
|
8314
|
+
const Styled$H = {
|
|
8315
8315
|
UncontrolledSelect: UncontrolledSelect$1
|
|
8316
8316
|
};
|
|
8317
8317
|
|
|
8318
8318
|
const UncontrolledSelect = (props) => {
|
|
8319
8319
|
const { isCursorPointer } = props;
|
|
8320
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
8320
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$H.UncontrolledSelect, { ...props, $isCursorPointer: isCursorPointer });
|
|
8321
8321
|
};
|
|
8322
8322
|
|
|
8323
8323
|
const CustomSelect$5 = styled(Select)`
|
|
@@ -8365,13 +8365,13 @@ const CustomSelect$5 = styled(Select)`
|
|
|
8365
8365
|
margin-block: 0 !important;
|
|
8366
8366
|
}
|
|
8367
8367
|
`;
|
|
8368
|
-
const Styled$
|
|
8368
|
+
const Styled$G = {
|
|
8369
8369
|
CustomSelect: CustomSelect$5
|
|
8370
8370
|
};
|
|
8371
8371
|
|
|
8372
8372
|
const CustomSelect$4 = (props) => {
|
|
8373
8373
|
const { paddingContainerEnd, ...rest } = props;
|
|
8374
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
8374
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$G.CustomSelect, { $paddingContainerEnd: paddingContainerEnd, ...rest });
|
|
8375
8375
|
};
|
|
8376
8376
|
|
|
8377
8377
|
const CursorPointerTag = styled(Tag)`
|
|
@@ -8518,7 +8518,7 @@ const Abbr$2 = styled.span`
|
|
|
8518
8518
|
height: min-content;
|
|
8519
8519
|
margin-right: 4px;
|
|
8520
8520
|
`;
|
|
8521
|
-
const Styled$
|
|
8521
|
+
const Styled$F = {
|
|
8522
8522
|
Abbr: Abbr$2
|
|
8523
8523
|
};
|
|
8524
8524
|
|
|
@@ -8558,7 +8558,7 @@ const ResourceLink = ({
|
|
|
8558
8558
|
baseFactoriesMapping
|
|
8559
8559
|
});
|
|
8560
8560
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { align: "center", gap: 8, children: [
|
|
8561
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
8561
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$F.Abbr, { $bgColor: bgColor, children: abbr }),
|
|
8562
8562
|
resourceLink ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8563
8563
|
Typography.Link,
|
|
8564
8564
|
{
|
|
@@ -8597,7 +8597,7 @@ const NoWrapContainer = styled.div`
|
|
|
8597
8597
|
flex-wrap: nowrap !important;
|
|
8598
8598
|
}
|
|
8599
8599
|
`;
|
|
8600
|
-
const Styled$
|
|
8600
|
+
const Styled$E = {
|
|
8601
8601
|
PositionRelativeContainer,
|
|
8602
8602
|
FullWidthContainer,
|
|
8603
8603
|
NoWrapContainer
|
|
@@ -8640,9 +8640,9 @@ const CollapsibleBreadcrumb = ({ items }) => {
|
|
|
8640
8640
|
};
|
|
8641
8641
|
return [firstItem, ellipsisItem, lastItem];
|
|
8642
8642
|
};
|
|
8643
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$
|
|
8644
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
8645
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
8643
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$E.PositionRelativeContainer, { children: [
|
|
8644
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$E.FullWidthContainer, { ref: containerRef, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Breadcrumb, { separator: ">", items: renderItems() }) }),
|
|
8645
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$E.NoWrapContainer, { ref: breadcrumbRef, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Breadcrumb, { separator: ">", items, style: { display: "flex", flexWrap: "nowrap" } }) })
|
|
8646
8646
|
] });
|
|
8647
8647
|
};
|
|
8648
8648
|
|
|
@@ -8650,12 +8650,12 @@ const HeightDiv$1 = styled.div`
|
|
|
8650
8650
|
min-height: 22px;
|
|
8651
8651
|
width: 100%;
|
|
8652
8652
|
`;
|
|
8653
|
-
const Styled$
|
|
8653
|
+
const Styled$D = {
|
|
8654
8654
|
HeightDiv: HeightDiv$1
|
|
8655
8655
|
};
|
|
8656
8656
|
|
|
8657
8657
|
const ManageableBreadcrumbs = ({ data }) => {
|
|
8658
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
8658
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$D.HeightDiv, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(CollapsibleBreadcrumb, { items: data.breadcrumbItems }) });
|
|
8659
8659
|
};
|
|
8660
8660
|
|
|
8661
8661
|
const kindByGvr = (entries) => (gvr) => {
|
|
@@ -9642,7 +9642,7 @@ const HeightDiv = styled.div`
|
|
|
9642
9642
|
min-height: 22px;
|
|
9643
9643
|
width: 100%;
|
|
9644
9644
|
`;
|
|
9645
|
-
const Styled$
|
|
9645
|
+
const Styled$C = {
|
|
9646
9646
|
HeightDiv
|
|
9647
9647
|
};
|
|
9648
9648
|
|
|
@@ -9672,7 +9672,7 @@ const ManageableBreadcrumbsProvider = ({
|
|
|
9672
9672
|
return null;
|
|
9673
9673
|
}
|
|
9674
9674
|
if (rawDataLoading) {
|
|
9675
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
9675
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$C.HeightDiv, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Spin, {}) });
|
|
9676
9676
|
}
|
|
9677
9677
|
if (!rawData) {
|
|
9678
9678
|
return null;
|
|
@@ -9688,7 +9688,7 @@ const ManageableBreadcrumbsProvider = ({
|
|
|
9688
9688
|
fallbackIdToCompare
|
|
9689
9689
|
});
|
|
9690
9690
|
if (!result) {
|
|
9691
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
9691
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$C.HeightDiv, {});
|
|
9692
9692
|
}
|
|
9693
9693
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(ManageableBreadcrumbs, { data: result }, JSON.stringify(idToCompare));
|
|
9694
9694
|
};
|
|
@@ -9716,7 +9716,7 @@ const CustomMenu = styled(Menu)`
|
|
|
9716
9716
|
margin: 0 !important;
|
|
9717
9717
|
}
|
|
9718
9718
|
`;
|
|
9719
|
-
const Styled$
|
|
9719
|
+
const Styled$B = {
|
|
9720
9720
|
CustomMenu
|
|
9721
9721
|
};
|
|
9722
9722
|
|
|
@@ -9743,7 +9743,7 @@ const ManageableSidebar = ({ data, noMarginTop }) => {
|
|
|
9743
9743
|
setSelectedKeys(data.selectedKeys);
|
|
9744
9744
|
}, [data.selectedKeys]);
|
|
9745
9745
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9746
|
-
Styled$
|
|
9746
|
+
Styled$B.CustomMenu,
|
|
9747
9747
|
{
|
|
9748
9748
|
selectedKeys,
|
|
9749
9749
|
onSelect: () => {
|
|
@@ -34284,7 +34284,7 @@ const ShortenedText = styled.div`
|
|
|
34284
34284
|
white-space: nowrap;
|
|
34285
34285
|
text-overflow: ellipsis;
|
|
34286
34286
|
`;
|
|
34287
|
-
const Styled$
|
|
34287
|
+
const Styled$A = {
|
|
34288
34288
|
ShortenedText
|
|
34289
34289
|
};
|
|
34290
34290
|
|
|
@@ -34293,7 +34293,7 @@ const ShortenedTextWithTooltip = ({ text, trimLength, maxWidth = 200 }) => {
|
|
|
34293
34293
|
const trimmedText = text.substring(0, trimLength);
|
|
34294
34294
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip$1, { title: text, placement: "top", children: trimmedText });
|
|
34295
34295
|
}
|
|
34296
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip$1, { title: text, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
34296
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip$1, { title: text, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$A.ShortenedText, { $maxWidth: maxWidth, children: text }) });
|
|
34297
34297
|
};
|
|
34298
34298
|
|
|
34299
34299
|
const FilterDropdown = ({
|
|
@@ -34429,18 +34429,48 @@ const TextAlignContainer = styled.div`
|
|
|
34429
34429
|
text-align: ${({ $align }) => $align};
|
|
34430
34430
|
`;
|
|
34431
34431
|
|
|
34432
|
+
const TableTag = styled(Tag)`
|
|
34433
|
+
margin: 0;
|
|
34434
|
+
flex-shrink: 0;
|
|
34435
|
+
`;
|
|
34436
|
+
const TooltipTagsContainer = styled(Flex)`
|
|
34437
|
+
max-width: min(95vw, 900px);
|
|
34438
|
+
min-width: min(60vw, 320px);
|
|
34439
|
+
`;
|
|
34440
|
+
const TooltipTag = styled(Tag)`
|
|
34441
|
+
margin: 0;
|
|
34442
|
+
width: 100%;
|
|
34443
|
+
white-space: nowrap;
|
|
34444
|
+
overflow: hidden;
|
|
34445
|
+
text-overflow: ellipsis;
|
|
34446
|
+
`;
|
|
34447
|
+
const Styled$z = {
|
|
34448
|
+
TableTag,
|
|
34449
|
+
TooltipTagsContainer,
|
|
34450
|
+
TooltipTag
|
|
34451
|
+
};
|
|
34452
|
+
|
|
34432
34453
|
const TrimmedTags = ({ tags, trimLength }) => {
|
|
34433
|
-
const
|
|
34454
|
+
const renderTableTags = (tags2) => tags2.map((tag) => /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$z.TableTag, { children: tag }, tag));
|
|
34455
|
+
const popoverTheme = { components: { Popover: { zIndexPopup: 2100 } } };
|
|
34456
|
+
const renderTooltipTags = (tags2) => /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$z.TooltipTagsContainer, { vertical: true, gap: 4, children: tags2.map((tag) => /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$z.TooltipTag, { children: tag }, tag)) });
|
|
34434
34457
|
if (trimLength && trimLength < tags.length) {
|
|
34435
34458
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { wrap: "nowrap", gap: "4px", children: [
|
|
34436
|
-
|
|
34437
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
34438
|
-
|
|
34439
|
-
|
|
34440
|
-
|
|
34459
|
+
renderTableTags(tags.slice(0, trimLength)),
|
|
34460
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ConfigProvider, { theme: popoverTheme, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
34461
|
+
Popover,
|
|
34462
|
+
{
|
|
34463
|
+
content: renderTooltipTags(tags.slice(trimLength)),
|
|
34464
|
+
styles: { root: { maxWidth: "min(95vw, 900px)" } },
|
|
34465
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$z.TableTag, { children: [
|
|
34466
|
+
"+",
|
|
34467
|
+
tags.length - trimLength
|
|
34468
|
+
] }, "more")
|
|
34469
|
+
}
|
|
34470
|
+
) })
|
|
34441
34471
|
] });
|
|
34442
34472
|
}
|
|
34443
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Flex, { wrap: "nowrap", gap: "4px", children:
|
|
34473
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Flex, { wrap: "nowrap", gap: "4px", children: renderTableTags(tags) });
|
|
34444
34474
|
};
|
|
34445
34475
|
|
|
34446
34476
|
const isFlatObject = (obj) => {
|
|
@@ -35010,8 +35040,100 @@ const AntdTabs = ({
|
|
|
35010
35040
|
data,
|
|
35011
35041
|
children
|
|
35012
35042
|
}) => {
|
|
35013
|
-
const { id, ...tabsProps } = data;
|
|
35014
|
-
|
|
35043
|
+
const { id, syncActiveKeyWithHash, allowOpenInNewBrowserTab, unmountOnTabChange, ...tabsProps } = data;
|
|
35044
|
+
const destroyOnHidden = unmountOnTabChange ?? tabsProps.destroyOnHidden ?? true;
|
|
35045
|
+
const tabKeys = useMemo(
|
|
35046
|
+
() => (tabsProps.items || []).map((item) => item?.key).filter((key) => typeof key === "string"),
|
|
35047
|
+
[tabsProps.items]
|
|
35048
|
+
);
|
|
35049
|
+
const [hashActiveKey, setHashActiveKey] = useState(() => {
|
|
35050
|
+
if (typeof window === "undefined") return void 0;
|
|
35051
|
+
const hashValue = decodeURIComponent(window.location.hash.replace(/^#/, ""));
|
|
35052
|
+
return hashValue || void 0;
|
|
35053
|
+
});
|
|
35054
|
+
const tabItemsWithLinks = useMemo(() => {
|
|
35055
|
+
if (!allowOpenInNewBrowserTab || !tabsProps.items || typeof window === "undefined") {
|
|
35056
|
+
return tabsProps.items;
|
|
35057
|
+
}
|
|
35058
|
+
return tabsProps.items.map((item) => {
|
|
35059
|
+
const tabKey = item?.key !== void 0 && item?.key !== null ? String(item.key) : "";
|
|
35060
|
+
if (!tabKey) return item;
|
|
35061
|
+
const href = `${window.location.pathname}${window.location.search}#${encodeURIComponent(tabKey)}`;
|
|
35062
|
+
return {
|
|
35063
|
+
...item,
|
|
35064
|
+
label: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
35065
|
+
"a",
|
|
35066
|
+
{
|
|
35067
|
+
href,
|
|
35068
|
+
target: "_blank",
|
|
35069
|
+
rel: "noopener noreferrer",
|
|
35070
|
+
style: { color: "inherit", textDecoration: "none" },
|
|
35071
|
+
onClick: (event) => {
|
|
35072
|
+
if (event.button === 0 && !event.metaKey && !event.ctrlKey && !event.shiftKey && !event.altKey) {
|
|
35073
|
+
event.preventDefault();
|
|
35074
|
+
}
|
|
35075
|
+
},
|
|
35076
|
+
children: item.label
|
|
35077
|
+
}
|
|
35078
|
+
)
|
|
35079
|
+
};
|
|
35080
|
+
});
|
|
35081
|
+
}, [allowOpenInNewBrowserTab, tabsProps.items]);
|
|
35082
|
+
const updateUrlHash = (nextKey) => {
|
|
35083
|
+
if (typeof window === "undefined") return;
|
|
35084
|
+
const currentHash = decodeURIComponent(window.location.hash.replace(/^#/, ""));
|
|
35085
|
+
if (currentHash === nextKey) return;
|
|
35086
|
+
const oldUrl = window.location.href;
|
|
35087
|
+
const nextHash = `#${encodeURIComponent(nextKey)}`;
|
|
35088
|
+
const nextUrl = `${window.location.pathname}${window.location.search}${nextHash}`;
|
|
35089
|
+
window.history.replaceState(window.history.state, "", nextUrl);
|
|
35090
|
+
if (typeof HashChangeEvent === "function") {
|
|
35091
|
+
window.dispatchEvent(new HashChangeEvent("hashchange", { oldURL: oldUrl, newURL: window.location.href }));
|
|
35092
|
+
} else {
|
|
35093
|
+
window.dispatchEvent(new Event("hashchange"));
|
|
35094
|
+
}
|
|
35095
|
+
};
|
|
35096
|
+
useEffect(() => {
|
|
35097
|
+
if (!syncActiveKeyWithHash || typeof window === "undefined") {
|
|
35098
|
+
return void 0;
|
|
35099
|
+
}
|
|
35100
|
+
const readHashKey = () => {
|
|
35101
|
+
const hashValue = decodeURIComponent(window.location.hash.replace(/^#/, ""));
|
|
35102
|
+
setHashActiveKey(hashValue || void 0);
|
|
35103
|
+
};
|
|
35104
|
+
readHashKey();
|
|
35105
|
+
window.addEventListener("hashchange", readHashKey);
|
|
35106
|
+
return () => window.removeEventListener("hashchange", readHashKey);
|
|
35107
|
+
}, [syncActiveKeyWithHash]);
|
|
35108
|
+
const fallbackKey = (tabsProps.activeKey !== void 0 ? String(tabsProps.activeKey) : void 0) || (tabsProps.defaultActiveKey !== void 0 ? String(tabsProps.defaultActiveKey) : void 0) || tabKeys[0];
|
|
35109
|
+
const shouldValidateHashAgainstItems = tabKeys.length > 0;
|
|
35110
|
+
const isHashKeyValid = !!hashActiveKey && (!shouldValidateHashAgainstItems || tabKeys.includes(hashActiveKey));
|
|
35111
|
+
const resolvedActiveKey = isHashKeyValid ? hashActiveKey : fallbackKey;
|
|
35112
|
+
useEffect(() => {
|
|
35113
|
+
if (!syncActiveKeyWithHash || typeof window === "undefined") return;
|
|
35114
|
+
if (!resolvedActiveKey) return;
|
|
35115
|
+
updateUrlHash(resolvedActiveKey);
|
|
35116
|
+
}, [resolvedActiveKey, syncActiveKeyWithHash]);
|
|
35117
|
+
const onTabChange = (activeKey) => {
|
|
35118
|
+
tabsProps.onChange?.(activeKey);
|
|
35119
|
+
if (!syncActiveKeyWithHash || typeof window === "undefined") return;
|
|
35120
|
+
updateUrlHash(activeKey);
|
|
35121
|
+
setHashActiveKey(activeKey);
|
|
35122
|
+
};
|
|
35123
|
+
if (!syncActiveKeyWithHash) {
|
|
35124
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Tabs, { ...tabsProps, items: tabItemsWithLinks, destroyOnHidden, children });
|
|
35125
|
+
}
|
|
35126
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
35127
|
+
Tabs,
|
|
35128
|
+
{
|
|
35129
|
+
...tabsProps,
|
|
35130
|
+
items: tabItemsWithLinks,
|
|
35131
|
+
destroyOnHidden,
|
|
35132
|
+
activeKey: resolvedActiveKey,
|
|
35133
|
+
onChange: onTabChange,
|
|
35134
|
+
children
|
|
35135
|
+
}
|
|
35136
|
+
);
|
|
35015
35137
|
};
|
|
35016
35138
|
|
|
35017
35139
|
const AntdButton = ({
|
|
@@ -43444,14 +43566,55 @@ const findManagedFieldsLine = (model) => {
|
|
|
43444
43566
|
}
|
|
43445
43567
|
return null;
|
|
43446
43568
|
};
|
|
43447
|
-
const
|
|
43569
|
+
const findManagedFieldsRange = (model) => {
|
|
43570
|
+
const startLineNumber = findManagedFieldsLine(model);
|
|
43571
|
+
if (startLineNumber === null) return null;
|
|
43572
|
+
const startLine = model.getLineContent(startLineNumber);
|
|
43573
|
+
const managedFieldsIndent = startLine.match(/^\s*/)?.[0].length ?? 0;
|
|
43574
|
+
for (let lineNumber = startLineNumber + 1; lineNumber <= model.getLineCount(); lineNumber++) {
|
|
43575
|
+
const line = model.getLineContent(lineNumber);
|
|
43576
|
+
const trimmed = line.trim();
|
|
43577
|
+
const indent = line.match(/^\s*/)?.[0].length ?? 0;
|
|
43578
|
+
if (trimmed && indent <= managedFieldsIndent) {
|
|
43579
|
+
const endLineNumber = lineNumber - 1;
|
|
43580
|
+
if (endLineNumber <= startLineNumber) return null;
|
|
43581
|
+
return { startLineNumber, endLineNumber };
|
|
43582
|
+
}
|
|
43583
|
+
}
|
|
43584
|
+
if (startLineNumber >= model.getLineCount()) return null;
|
|
43585
|
+
return { startLineNumber, endLineNumber: model.getLineCount() };
|
|
43586
|
+
};
|
|
43587
|
+
const collapseManagedFieldsInEditor = async (editor) => {
|
|
43448
43588
|
const model = editor.getModel();
|
|
43449
|
-
if (!model) return;
|
|
43450
|
-
const
|
|
43451
|
-
if (
|
|
43452
|
-
|
|
43453
|
-
editor.
|
|
43454
|
-
|
|
43589
|
+
if (!model) return false;
|
|
43590
|
+
const range = findManagedFieldsRange(model);
|
|
43591
|
+
if (!range) return false;
|
|
43592
|
+
const managedFieldsLine = range.startLineNumber;
|
|
43593
|
+
const foldingController = editor.getContribution?.(
|
|
43594
|
+
"editor.contrib.folding"
|
|
43595
|
+
);
|
|
43596
|
+
if (!foldingController?.getFoldingModel) {
|
|
43597
|
+
editor.trigger("managed-fields-collapse", "editor.fold", {
|
|
43598
|
+
selectionLines: [managedFieldsLine],
|
|
43599
|
+
levels: 1,
|
|
43600
|
+
direction: "down"
|
|
43601
|
+
});
|
|
43602
|
+
return true;
|
|
43603
|
+
}
|
|
43604
|
+
const foldingModel = await foldingController.getFoldingModel();
|
|
43605
|
+
if (!foldingModel) return false;
|
|
43606
|
+
const { regions } = foldingModel;
|
|
43607
|
+
let managedFieldsRegionIndex = -1;
|
|
43608
|
+
for (let index = 0; index < regions.length; index++) {
|
|
43609
|
+
if (regions.getStartLineNumber(index) === managedFieldsLine) {
|
|
43610
|
+
managedFieldsRegionIndex = index;
|
|
43611
|
+
break;
|
|
43612
|
+
}
|
|
43613
|
+
}
|
|
43614
|
+
if (managedFieldsRegionIndex === -1) return false;
|
|
43615
|
+
if (regions.isCollapsed(managedFieldsRegionIndex)) return true;
|
|
43616
|
+
foldingModel.toggleCollapseState([{ regionIndex: managedFieldsRegionIndex }]);
|
|
43617
|
+
return regions.isCollapsed(managedFieldsRegionIndex);
|
|
43455
43618
|
};
|
|
43456
43619
|
|
|
43457
43620
|
const NOTIFICATION_KEY = "yaml-data-changed";
|
|
@@ -43481,18 +43644,43 @@ const YamlEditorSingleton$1 = ({
|
|
|
43481
43644
|
const latestPrefillYamlRef = useRef(null);
|
|
43482
43645
|
const firstLoadRef = useRef(true);
|
|
43483
43646
|
const editorRef = useRef(null);
|
|
43647
|
+
const shouldCollapseOnNextYamlRef = useRef(false);
|
|
43648
|
+
const collapseRetriesRef = useRef(0);
|
|
43484
43649
|
const collapseManagedFieldsIfNeeded = useCallback(() => {
|
|
43485
43650
|
const editor = editorRef.current;
|
|
43486
|
-
if (!editor) return;
|
|
43487
|
-
collapseManagedFieldsInEditor(editor);
|
|
43651
|
+
if (!editor) return Promise.resolve(false);
|
|
43652
|
+
return collapseManagedFieldsInEditor(editor);
|
|
43653
|
+
}, []);
|
|
43654
|
+
const setYamlDataWithManagedFieldsCollapsed = useCallback((nextYaml) => {
|
|
43655
|
+
shouldCollapseOnNextYamlRef.current = true;
|
|
43656
|
+
collapseRetriesRef.current = 0;
|
|
43657
|
+
setYamlData(nextYaml);
|
|
43488
43658
|
}, []);
|
|
43659
|
+
const tryCollapseManagedFields = useCallback(() => {
|
|
43660
|
+
if (!shouldCollapseOnNextYamlRef.current) return;
|
|
43661
|
+
const MAX_RETRIES = 10;
|
|
43662
|
+
const RETRY_DELAY_MS = 50;
|
|
43663
|
+
setTimeout(() => {
|
|
43664
|
+
collapseManagedFieldsIfNeeded().then((collapsed) => {
|
|
43665
|
+
if (collapsed) {
|
|
43666
|
+
shouldCollapseOnNextYamlRef.current = false;
|
|
43667
|
+
collapseRetriesRef.current = 0;
|
|
43668
|
+
return;
|
|
43669
|
+
}
|
|
43670
|
+
collapseRetriesRef.current += 1;
|
|
43671
|
+
if (collapseRetriesRef.current <= MAX_RETRIES) {
|
|
43672
|
+
tryCollapseManagedFields();
|
|
43673
|
+
}
|
|
43674
|
+
});
|
|
43675
|
+
}, RETRY_DELAY_MS);
|
|
43676
|
+
}, [collapseManagedFieldsIfNeeded]);
|
|
43489
43677
|
const handleReload = useCallback(() => {
|
|
43490
43678
|
api.destroy(NOTIFICATION_KEY);
|
|
43491
43679
|
const nextYaml = latestPrefillYamlRef.current ?? initialPrefillYamlRef.current;
|
|
43492
43680
|
if (nextYaml !== null) {
|
|
43493
|
-
|
|
43681
|
+
setYamlDataWithManagedFieldsCollapsed(nextYaml);
|
|
43494
43682
|
}
|
|
43495
|
-
}, [api]);
|
|
43683
|
+
}, [api, setYamlDataWithManagedFieldsCollapsed]);
|
|
43496
43684
|
const openNotificationYamlChanged = useCallback(() => {
|
|
43497
43685
|
const btn = /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
43498
43686
|
Button,
|
|
@@ -43520,7 +43708,7 @@ const YamlEditorSingleton$1 = ({
|
|
|
43520
43708
|
if (firstLoadRef.current) {
|
|
43521
43709
|
initialPrefillYamlRef.current = nextYaml;
|
|
43522
43710
|
latestPrefillYamlRef.current = nextYaml;
|
|
43523
|
-
|
|
43711
|
+
setYamlDataWithManagedFieldsCollapsed(nextYaml);
|
|
43524
43712
|
firstLoadRef.current = false;
|
|
43525
43713
|
return;
|
|
43526
43714
|
}
|
|
@@ -43528,13 +43716,12 @@ const YamlEditorSingleton$1 = ({
|
|
|
43528
43716
|
openNotificationYamlChanged();
|
|
43529
43717
|
}
|
|
43530
43718
|
latestPrefillYamlRef.current = nextYaml;
|
|
43531
|
-
}, [prefillValuesSchema, openNotificationYamlChanged]);
|
|
43719
|
+
}, [prefillValuesSchema, openNotificationYamlChanged, setYamlDataWithManagedFieldsCollapsed]);
|
|
43532
43720
|
useEffect(() => {
|
|
43533
|
-
|
|
43534
|
-
|
|
43535
|
-
|
|
43536
|
-
|
|
43537
|
-
}, [yamlData, collapseManagedFieldsIfNeeded]);
|
|
43721
|
+
if (!shouldCollapseOnNextYamlRef.current) return void 0;
|
|
43722
|
+
tryCollapseManagedFields();
|
|
43723
|
+
return void 0;
|
|
43724
|
+
}, [yamlData, tryCollapseManagedFields]);
|
|
43538
43725
|
const onSubmit = () => {
|
|
43539
43726
|
setIsLoading(true);
|
|
43540
43727
|
setError(void 0);
|
|
@@ -43594,9 +43781,9 @@ const YamlEditorSingleton$1 = ({
|
|
|
43594
43781
|
value: yamlData,
|
|
43595
43782
|
onMount: (editor) => {
|
|
43596
43783
|
editorRef.current = editor;
|
|
43597
|
-
|
|
43598
|
-
|
|
43599
|
-
}
|
|
43784
|
+
if (shouldCollapseOnNextYamlRef.current) {
|
|
43785
|
+
tryCollapseManagedFields();
|
|
43786
|
+
}
|
|
43600
43787
|
},
|
|
43601
43788
|
onChange: (value) => {
|
|
43602
43789
|
if (!readOnly) {
|
|
@@ -78364,7 +78551,7 @@ const TolerationsModal = ({
|
|
|
78364
78551
|
};
|
|
78365
78552
|
|
|
78366
78553
|
const LazyEnrichedTableModal = lazy(
|
|
78367
|
-
() => import('./index-
|
|
78554
|
+
() => import('./index-DlJkWTNK.mjs').then((mod) => ({ default: mod.EnrichedTableModal }))
|
|
78368
78555
|
);
|
|
78369
78556
|
const renderActiveType = (activeType, extraProps) => {
|
|
78370
78557
|
if (!activeType) return null;
|
|
@@ -79497,7 +79684,9 @@ const getMenuItems = (visibleActions, onActionClick, permissions) => visibleActi
|
|
|
79497
79684
|
icon: getActionIcon(action),
|
|
79498
79685
|
disabled: action.props.disabled || isActionDisabledByPermission(actionKey, permissions),
|
|
79499
79686
|
danger: action.props.danger,
|
|
79500
|
-
onClick: () =>
|
|
79687
|
+
onClick: () => {
|
|
79688
|
+
onActionClick(action);
|
|
79689
|
+
}
|
|
79501
79690
|
}));
|
|
79502
79691
|
|
|
79503
79692
|
const parseValueIfString = (value, ctx) => {
|
|
@@ -79814,6 +80003,96 @@ const useRerunHandlers = (ctx, multiQueryData, { showSuccess, showError }) => {
|
|
|
79814
80003
|
};
|
|
79815
80004
|
return { rerunModalData, isRerunLoading, handleRerunLastAction, handleRerunConfirm, handleRerunCancel };
|
|
79816
80005
|
};
|
|
80006
|
+
const MAX_FAILED_PODS_SHOWN = 5;
|
|
80007
|
+
const buildDrainFailureDescription = ({ drained, failed, skipped }) => {
|
|
80008
|
+
const lines = [`Evicted ${drained}, skipped ${skipped}, failed ${failed.length}`];
|
|
80009
|
+
const shown = failed.slice(0, MAX_FAILED_PODS_SHOWN);
|
|
80010
|
+
shown.forEach((pod) => {
|
|
80011
|
+
lines.push(React__default.createElement("br", null), `${pod.namespace}/${pod.name}: ${pod.error}`);
|
|
80012
|
+
});
|
|
80013
|
+
if (failed.length > MAX_FAILED_PODS_SHOWN) {
|
|
80014
|
+
lines.push(React__default.createElement("br", null), `+${failed.length - MAX_FAILED_PODS_SHOWN} more`);
|
|
80015
|
+
}
|
|
80016
|
+
return React__default.createElement(React__default.Fragment, null, ...lines);
|
|
80017
|
+
};
|
|
80018
|
+
const useDrainHandlers = (ctx, { showError }, notificationApi, invalidateMultiQuery) => {
|
|
80019
|
+
const [drainModalData, setDrainModalData] = useState(null);
|
|
80020
|
+
const [isDrainLoading, setIsDrainLoading] = useState(false);
|
|
80021
|
+
const handleDrainAction = (action) => {
|
|
80022
|
+
const bffEndpointPrepared = parseAll({ text: action.props.bffEndpoint, ...ctx });
|
|
80023
|
+
const nodeNamePrepared = parseAll({ text: action.props.nodeName, ...ctx });
|
|
80024
|
+
setDrainModalData({ bffEndpoint: bffEndpointPrepared, nodeName: nodeNamePrepared });
|
|
80025
|
+
};
|
|
80026
|
+
const handleDrainConfirm = () => {
|
|
80027
|
+
if (!drainModalData) return;
|
|
80028
|
+
setIsDrainLoading(true);
|
|
80029
|
+
const drainLabel = `Drain ${drainModalData.nodeName}`;
|
|
80030
|
+
axios.post(drainModalData.bffEndpoint, {
|
|
80031
|
+
nodeName: drainModalData.nodeName,
|
|
80032
|
+
apiPath: `/api/v1/nodes/${drainModalData.nodeName}`
|
|
80033
|
+
}).then((response) => {
|
|
80034
|
+
invalidateMultiQuery();
|
|
80035
|
+
const { drained, failed, skipped } = response.data;
|
|
80036
|
+
if (failed.length > 0) {
|
|
80037
|
+
notificationApi.warning({
|
|
80038
|
+
message: `${drainLabel} partially completed`,
|
|
80039
|
+
description: buildDrainFailureDescription({ drained, failed, skipped }),
|
|
80040
|
+
placement: "bottomRight",
|
|
80041
|
+
duration: 0
|
|
80042
|
+
});
|
|
80043
|
+
} else {
|
|
80044
|
+
notificationApi.success({
|
|
80045
|
+
message: `${drainLabel} successful`,
|
|
80046
|
+
description: `Evicted ${drained} pod(s), skipped ${skipped}`,
|
|
80047
|
+
placement: "bottomRight"
|
|
80048
|
+
});
|
|
80049
|
+
}
|
|
80050
|
+
}).catch((error) => {
|
|
80051
|
+
showError(drainLabel, error);
|
|
80052
|
+
}).finally(() => {
|
|
80053
|
+
setIsDrainLoading(false);
|
|
80054
|
+
setDrainModalData(null);
|
|
80055
|
+
});
|
|
80056
|
+
};
|
|
80057
|
+
const handleDrainCancel = () => {
|
|
80058
|
+
setDrainModalData(null);
|
|
80059
|
+
setIsDrainLoading(false);
|
|
80060
|
+
};
|
|
80061
|
+
return { drainModalData, isDrainLoading, handleDrainAction, handleDrainConfirm, handleDrainCancel };
|
|
80062
|
+
};
|
|
80063
|
+
const useRollbackHandlers = (ctx, { showSuccess, showError }) => {
|
|
80064
|
+
const [rollbackModalData, setRollbackModalData] = useState(null);
|
|
80065
|
+
const [isRollbackLoading, setIsRollbackLoading] = useState(false);
|
|
80066
|
+
const handleRollbackAction = (action) => {
|
|
80067
|
+
const bffEndpointPrepared = parseAll({ text: action.props.bffEndpoint, ...ctx });
|
|
80068
|
+
const resourceNamePrepared = parseAll({ text: action.props.resourceName, ...ctx });
|
|
80069
|
+
const resourceEndpointPrepared = parseAll({ text: action.props.resourceEndpoint, ...ctx });
|
|
80070
|
+
setRollbackModalData({
|
|
80071
|
+
bffEndpoint: bffEndpointPrepared,
|
|
80072
|
+
resourceName: resourceNamePrepared,
|
|
80073
|
+
resourceEndpoint: resourceEndpointPrepared
|
|
80074
|
+
});
|
|
80075
|
+
};
|
|
80076
|
+
const handleRollbackConfirm = () => {
|
|
80077
|
+
if (!rollbackModalData) return;
|
|
80078
|
+
setIsRollbackLoading(true);
|
|
80079
|
+
const rollbackLabel = `Rollback ${rollbackModalData.resourceName}`;
|
|
80080
|
+
axios.post(rollbackModalData.bffEndpoint, {
|
|
80081
|
+
resourceEndpoint: rollbackModalData.resourceEndpoint,
|
|
80082
|
+
resourceName: rollbackModalData.resourceName
|
|
80083
|
+
}).then(() => showSuccess(rollbackLabel)).catch((error) => {
|
|
80084
|
+
showError(rollbackLabel, error);
|
|
80085
|
+
}).finally(() => {
|
|
80086
|
+
setIsRollbackLoading(false);
|
|
80087
|
+
setRollbackModalData(null);
|
|
80088
|
+
});
|
|
80089
|
+
};
|
|
80090
|
+
const handleRollbackCancel = () => {
|
|
80091
|
+
setRollbackModalData(null);
|
|
80092
|
+
setIsRollbackLoading(false);
|
|
80093
|
+
};
|
|
80094
|
+
return { rollbackModalData, isRollbackLoading, handleRollbackAction, handleRollbackConfirm, handleRollbackCancel };
|
|
80095
|
+
};
|
|
79817
80096
|
const fireTriggerRunAction = (action, ctx, multiQueryData, { showSuccess, showError }) => {
|
|
79818
80097
|
const createEndpointPrepared = parseAll({ text: action.props.createEndpoint, ...ctx });
|
|
79819
80098
|
const cronJobNamePrepared = parseAll({ text: action.props.cronJobName, ...ctx });
|
|
@@ -79886,6 +80165,13 @@ const useActionsDropdownHandlers = ({ replaceValues, multiQueryData }) => {
|
|
|
79886
80165
|
);
|
|
79887
80166
|
const { evictModalData, isEvictLoading, setEvictModalData, handleEvictConfirm, handleEvictCancel } = useEvictHandlers(notificationCallbacks);
|
|
79888
80167
|
const { rerunModalData, isRerunLoading, handleRerunLastAction, handleRerunConfirm, handleRerunCancel } = useRerunHandlers(ctx, multiQueryData, notificationCallbacks);
|
|
80168
|
+
const { drainModalData, isDrainLoading, handleDrainAction, handleDrainConfirm, handleDrainCancel } = useDrainHandlers(
|
|
80169
|
+
ctx,
|
|
80170
|
+
notificationCallbacks,
|
|
80171
|
+
notificationApi,
|
|
80172
|
+
invalidateMultiQuery
|
|
80173
|
+
);
|
|
80174
|
+
const { rollbackModalData, isRollbackLoading, handleRollbackAction, handleRollbackConfirm, handleRollbackCancel } = useRollbackHandlers(ctx, notificationCallbacks);
|
|
79889
80175
|
const handleDeleteChildrenAction = (action) => {
|
|
79890
80176
|
try {
|
|
79891
80177
|
const data = buildDeleteChildrenData(action, ctx);
|
|
@@ -79941,7 +80227,12 @@ const useActionsDropdownHandlers = ({ replaceValues, multiQueryData }) => {
|
|
|
79941
80227
|
handleRerunLastAction(action);
|
|
79942
80228
|
return;
|
|
79943
80229
|
}
|
|
79944
|
-
if (action.type === "drain"
|
|
80230
|
+
if (action.type === "drain") {
|
|
80231
|
+
handleDrainAction(action);
|
|
80232
|
+
return;
|
|
80233
|
+
}
|
|
80234
|
+
if (action.type === "rollback") {
|
|
80235
|
+
handleRollbackAction(action);
|
|
79945
80236
|
return;
|
|
79946
80237
|
}
|
|
79947
80238
|
setActiveAction(action);
|
|
@@ -79973,6 +80264,10 @@ const useActionsDropdownHandlers = ({ replaceValues, multiQueryData }) => {
|
|
|
79973
80264
|
deleteChildrenModalData,
|
|
79974
80265
|
rerunModalData,
|
|
79975
80266
|
isRerunLoading,
|
|
80267
|
+
drainModalData,
|
|
80268
|
+
isDrainLoading,
|
|
80269
|
+
rollbackModalData,
|
|
80270
|
+
isRollbackLoading,
|
|
79976
80271
|
handleActionClick,
|
|
79977
80272
|
handleCloseModal,
|
|
79978
80273
|
handleDeleteModalClose,
|
|
@@ -79982,7 +80277,11 @@ const useActionsDropdownHandlers = ({ replaceValues, multiQueryData }) => {
|
|
|
79982
80277
|
handleScaleCancel,
|
|
79983
80278
|
handleDeleteChildrenClose,
|
|
79984
80279
|
handleRerunConfirm,
|
|
79985
|
-
handleRerunCancel
|
|
80280
|
+
handleRerunCancel,
|
|
80281
|
+
handleDrainConfirm,
|
|
80282
|
+
handleDrainCancel,
|
|
80283
|
+
handleRollbackConfirm,
|
|
80284
|
+
handleRollbackCancel
|
|
79986
80285
|
};
|
|
79987
80286
|
};
|
|
79988
80287
|
|
|
@@ -80262,6 +80561,10 @@ const ActionsDropdown = ({ data, children }) => {
|
|
|
80262
80561
|
deleteChildrenModalData,
|
|
80263
80562
|
rerunModalData,
|
|
80264
80563
|
isRerunLoading,
|
|
80564
|
+
drainModalData,
|
|
80565
|
+
isDrainLoading,
|
|
80566
|
+
rollbackModalData,
|
|
80567
|
+
isRollbackLoading,
|
|
80265
80568
|
handleActionClick,
|
|
80266
80569
|
handleCloseModal,
|
|
80267
80570
|
handleDeleteModalClose,
|
|
@@ -80271,7 +80574,11 @@ const ActionsDropdown = ({ data, children }) => {
|
|
|
80271
80574
|
handleScaleCancel,
|
|
80272
80575
|
handleDeleteChildrenClose,
|
|
80273
80576
|
handleRerunConfirm,
|
|
80274
|
-
handleRerunCancel
|
|
80577
|
+
handleRerunCancel,
|
|
80578
|
+
handleDrainConfirm,
|
|
80579
|
+
handleDrainCancel,
|
|
80580
|
+
handleRollbackConfirm,
|
|
80581
|
+
handleRollbackCancel
|
|
80275
80582
|
} = useActionsDropdownHandlers({
|
|
80276
80583
|
replaceValues,
|
|
80277
80584
|
multiQueryData: safeMultiQueryData
|
|
@@ -80344,6 +80651,30 @@ const ActionsDropdown = ({ data, children }) => {
|
|
|
80344
80651
|
children: "This will create a new Job with the same spec."
|
|
80345
80652
|
}
|
|
80346
80653
|
),
|
|
80654
|
+
drainModalData && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
80655
|
+
ConfirmModal,
|
|
80656
|
+
{
|
|
80657
|
+
title: `Drain node «${drainModalData.nodeName}»?`,
|
|
80658
|
+
onConfirm: handleDrainConfirm,
|
|
80659
|
+
onClose: handleDrainCancel,
|
|
80660
|
+
confirmText: "Drain",
|
|
80661
|
+
confirmLoading: isDrainLoading,
|
|
80662
|
+
danger: true,
|
|
80663
|
+
children: "This will cordon the node and evict all eligible pods. DaemonSet pods will be skipped."
|
|
80664
|
+
}
|
|
80665
|
+
),
|
|
80666
|
+
rollbackModalData && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
80667
|
+
ConfirmModal,
|
|
80668
|
+
{
|
|
80669
|
+
title: `Rollback «${rollbackModalData.resourceName}»?`,
|
|
80670
|
+
onConfirm: handleRollbackConfirm,
|
|
80671
|
+
onClose: handleRollbackCancel,
|
|
80672
|
+
confirmText: "Rollback",
|
|
80673
|
+
confirmLoading: isRollbackLoading,
|
|
80674
|
+
danger: true,
|
|
80675
|
+
children: "This will revert the resource to its previous revision."
|
|
80676
|
+
}
|
|
80677
|
+
),
|
|
80347
80678
|
children
|
|
80348
80679
|
] });
|
|
80349
80680
|
};
|
|
@@ -80582,6 +80913,7 @@ const getEnrichedColumns = ({
|
|
|
80582
80913
|
additionalPrinterColumnsUndefinedValues,
|
|
80583
80914
|
additionalPrinterColumnsTrimLengths,
|
|
80584
80915
|
additionalPrinterColumnsColWidths,
|
|
80916
|
+
additionalPrinterColumnsTooltips,
|
|
80585
80917
|
additionalPrinterColumnsKeyTypeProps,
|
|
80586
80918
|
additionalPrinterColumnsCustomSortersAndFilters,
|
|
80587
80919
|
theme,
|
|
@@ -80599,6 +80931,7 @@ const getEnrichedColumns = ({
|
|
|
80599
80931
|
const possibleUndefinedValue = additionalPrinterColumnsUndefinedValues?.find(({ key }) => key === el.key)?.value;
|
|
80600
80932
|
const possibleTrimLength = additionalPrinterColumnsTrimLengths?.find(({ key }) => key === el.key)?.value;
|
|
80601
80933
|
const possibleColWidth = additionalPrinterColumnsColWidths?.find(({ key }) => key === el.key)?.value;
|
|
80934
|
+
const possibleTooltip = additionalPrinterColumnsTooltips?.find(({ key }) => key === el.key)?.value;
|
|
80602
80935
|
const possibleCustomTypeWithProps = additionalPrinterColumnsKeyTypeProps && el.key ? additionalPrinterColumnsKeyTypeProps[el.key.toString()] : void 0;
|
|
80603
80936
|
const useFactorySearch = possibleCustomTypeWithProps?.type === "factory";
|
|
80604
80937
|
const colKey = el.key != null && String(el.key) || (Array.isArray(el.dataIndex) ? el.dataIndex.join(".") : String(el.dataIndex ?? colIndex));
|
|
@@ -80639,8 +80972,22 @@ const getEnrichedColumns = ({
|
|
|
80639
80972
|
if (bNaN) return -1;
|
|
80640
80973
|
return a - b;
|
|
80641
80974
|
};
|
|
80975
|
+
const columnTitle = possibleTooltip && typeof el.title !== "function" ? /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { align: "center", gap: 4, children: [
|
|
80976
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: el.title || String(el.key || "") }),
|
|
80977
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip$1, { title: possibleTooltip, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
80978
|
+
"span",
|
|
80979
|
+
{
|
|
80980
|
+
onClick: (e) => e.stopPropagation(),
|
|
80981
|
+
onMouseDown: (e) => e.stopPropagation(),
|
|
80982
|
+
onKeyDown: (e) => e.stopPropagation(),
|
|
80983
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(QuestionCircleOutlined, {})
|
|
80984
|
+
}
|
|
80985
|
+
) })
|
|
80986
|
+
] }) : el.title;
|
|
80642
80987
|
return {
|
|
80643
80988
|
...el,
|
|
80989
|
+
title: columnTitle,
|
|
80990
|
+
showSorterTooltip: false,
|
|
80644
80991
|
render: (value, record) => getCellRender({
|
|
80645
80992
|
value,
|
|
80646
80993
|
record,
|
|
@@ -80852,6 +81199,7 @@ const EnrichedTable = ({
|
|
|
80852
81199
|
additionalPrinterColumnsUndefinedValues,
|
|
80853
81200
|
additionalPrinterColumnsTrimLengths,
|
|
80854
81201
|
additionalPrinterColumnsColWidths,
|
|
81202
|
+
additionalPrinterColumnsTooltips,
|
|
80855
81203
|
additionalPrinterColumnsKeyTypeProps,
|
|
80856
81204
|
additionalPrinterColumnsCustomSortersAndFilters,
|
|
80857
81205
|
selectData,
|
|
@@ -80868,6 +81216,7 @@ const EnrichedTable = ({
|
|
|
80868
81216
|
additionalPrinterColumnsUndefinedValues,
|
|
80869
81217
|
additionalPrinterColumnsTrimLengths,
|
|
80870
81218
|
additionalPrinterColumnsColWidths,
|
|
81219
|
+
additionalPrinterColumnsTooltips,
|
|
80871
81220
|
additionalPrinterColumnsKeyTypeProps,
|
|
80872
81221
|
additionalPrinterColumnsCustomSortersAndFilters,
|
|
80873
81222
|
theme,
|
|
@@ -81285,6 +81634,7 @@ const EnrichedTableProvider = ({
|
|
|
81285
81634
|
additionalPrinterColumnsUndefinedValues: preparedProps.additionalPrinterColumnsUndefinedValues,
|
|
81286
81635
|
additionalPrinterColumnsTrimLengths: preparedProps.additionalPrinterColumnsTrimLengths,
|
|
81287
81636
|
additionalPrinterColumnsColWidths: preparedProps.additionalPrinterColumnsColWidths,
|
|
81637
|
+
additionalPrinterColumnsTooltips: preparedProps.additionalPrinterColumnsTooltips,
|
|
81288
81638
|
additionalPrinterColumnsKeyTypeProps: preparedProps.additionalPrinterColumnsKeyTypeProps,
|
|
81289
81639
|
additionalPrinterColumnsCustomSortersAndFilters: preparedProps.additionalPrinterColumnsCustomSortersAndFilters,
|
|
81290
81640
|
selectData,
|
|
@@ -89781,4 +90131,4 @@ const usePluginManifest = ({
|
|
|
89781
90131
|
};
|
|
89782
90132
|
|
|
89783
90133
|
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, parseQuotaValueMemoryAndStorage 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, getEnrichedColumns as aB, getEnrichedColumnsWithControls as aC, YamlEditorSingleton$1 as aD, BlackholeFormProvider as aE, BlackholeForm as aF, getObjectFormItemsDraft as aG, MarketPlace as aH, MarketplaceCard as aI, ProjectInfoCard as aJ, PodTerminal as aK, NodeTerminal as aL, PodLogs as aM, PodLogsMonaco as aN, VMVNC as aO, Search as aP, Events as aQ, DynamicRenderer as aR, DynamicComponents as aS, DynamicRendererWithProviders as aT, prepareTemplate as aU, isFlatObject as aV, filterSelectOptions as aW, getStringByName as aX, floorToDecimal as aY, parseQuotaValue as aZ, parseQuotaValueCpu 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, normalizeValuesForQuotasToNumber as b0, getAllPathsFromObj as b1, getPrefixSubarrays as b2, groupsToTreeData as b3, getBuiltinTreeData as b4, getGroupsByCategory as b5, createContextFactory as b6, prepareUrlsToFetchForDynamicRenderer as b7, deepMerge as b8, getSortedKinds as b9, getSortedKindsAll as ba, hslFromString as bb, getUppercase as bc, kindByGvr as bd, pluralByKind as be, namespacedByGvr as bf, getLinkToBuiltinForm as bg, getLinkToApiForm as bh, isMultilineString as bi, isMultilineFromYaml as bj, includesArray as bk, getResourceLink as bl, getNamespaceLink as bm, convertBytes as bn, formatBytesAuto as bo, toBytes as bp, convertStorage as bq, parseValueWithUnit as br, convertCores as bs, formatCoresAuto as bt, toCores as bu, convertCompute as bv, parseCoresWithUnit as bw, formatDateAuto as bx, isValidRFC3339 as by, 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 };
|
|
89784
|
-
//# sourceMappingURL=index-
|
|
90134
|
+
//# sourceMappingURL=index-CWMOa8gQ.mjs.map
|