@prorobotech/openapi-k8s-toolkit 0.0.1-alpha.65 → 0.0.1-alpha.66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/openapi-k8s-toolkit.es.js +401 -75
- package/dist/openapi-k8s-toolkit.es.js.map +1 -1
- package/dist/openapi-k8s-toolkit.umd.js +400 -73
- package/dist/openapi-k8s-toolkit.umd.js.map +1 -1
- package/dist/types/components/molecules/NodeTerminal/NodeTerminal.d.ts +6 -0
- package/dist/types/components/molecules/NodeTerminal/index.d.ts +2 -0
- package/dist/types/components/molecules/NodeTerminal/molecules/XTerminal/XTerminal.d.ts +9 -0
- package/dist/types/components/molecules/NodeTerminal/molecules/XTerminal/index.d.ts +1 -0
- package/dist/types/components/molecules/NodeTerminal/molecules/XTerminal/styled.d.ts +557 -0
- package/dist/types/components/molecules/NodeTerminal/molecules/index.d.ts +1 -0
- package/dist/types/components/molecules/NodeTerminal/styled.d.ts +276 -0
- package/dist/types/components/molecules/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/NodeTerminal/NodeTerminal.d.ts +6 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/NodeTerminal/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/NodeTerminal/utils.d.ts +8 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/types.d.ts +5 -0
- package/package.json +2 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import o, { useDebugValue, createElement, useRef, useContext, useState, useLayoutEffect, useEffect, useMemo, memo, useCallback, createContext, Suspense, Fragment } from 'react';
|
|
2
|
-
import { Input, Tree, Modal, Alert, theme, Breadcrumb, Spin, Menu, Tooltip, Space, Button, Flex, Tag, Table, Typography, Form, Select, Row, Col, Slider, InputNumber, Switch, Card, notification, Dropdown, Result, Tabs } from 'antd';
|
|
2
|
+
import { Input, Tree, Modal, Alert, theme, Breadcrumb, Spin, Menu, Tooltip, Space, Button, Flex, Tag, Table, Typography, Form, Select, Row, Col, Slider, InputNumber, Switch, Card, notification, Dropdown, Result, Progress, Tabs } from 'antd';
|
|
3
3
|
import { LoadingOutlined, ExclamationCircleFilled, CloseCircleFilled, CheckCircleFilled, SearchOutlined, CheckOutlined, CloseOutlined, EditOutlined, DeleteOutlined, CaretDownOutlined, CaretRightOutlined, BugOutlined, PlusOutlined, EllipsisOutlined } from '@ant-design/icons';
|
|
4
4
|
import { useQuery, useQueries } from '@tanstack/react-query';
|
|
5
5
|
import { Link, useNavigate, useLocation } from 'react-router-dom';
|
|
@@ -2504,7 +2504,7 @@ const CustomTreeProvider = st.div`
|
|
|
2504
2504
|
justify-content: center;
|
|
2505
2505
|
}
|
|
2506
2506
|
`;
|
|
2507
|
-
const Styled$
|
|
2507
|
+
const Styled$i = {
|
|
2508
2508
|
CustomTreeProvider
|
|
2509
2509
|
};
|
|
2510
2510
|
|
|
@@ -2569,7 +2569,7 @@ const TreeWithSearch = ({ treeData, onSelect }) => {
|
|
|
2569
2569
|
});
|
|
2570
2570
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
2571
2571
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Search, { style: { marginBottom: 8 }, placeholder: "Search", onChange }),
|
|
2572
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
2572
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$i.CustomTreeProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2573
2573
|
Tree,
|
|
2574
2574
|
{
|
|
2575
2575
|
treeData: loop(treeData),
|
|
@@ -8400,14 +8400,14 @@ const ContentContainer = st.div`
|
|
|
8400
8400
|
display: ${({ $displayFlex }) => $displayFlex ? "flex" : "block"};
|
|
8401
8401
|
flex-flow: ${({ $flexFlow }) => $flexFlow};
|
|
8402
8402
|
`;
|
|
8403
|
-
const Styled$
|
|
8403
|
+
const Styled$h = {
|
|
8404
8404
|
ContentContainer
|
|
8405
8405
|
};
|
|
8406
8406
|
|
|
8407
8407
|
const ContentCard$1 = ({ children, flexGrow, displayFlex, flexFlow, maxHeight }) => {
|
|
8408
8408
|
const { token } = theme.useToken();
|
|
8409
8409
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8410
|
-
Styled$
|
|
8410
|
+
Styled$h.ContentContainer,
|
|
8411
8411
|
{
|
|
8412
8412
|
$flexGrow: flexGrow,
|
|
8413
8413
|
$bgColor: token.colorBgContainer,
|
|
@@ -8523,7 +8523,7 @@ const NoWrapContainer = st.div`
|
|
|
8523
8523
|
flex-wrap: nowrap !important;
|
|
8524
8524
|
}
|
|
8525
8525
|
`;
|
|
8526
|
-
const Styled$
|
|
8526
|
+
const Styled$g = {
|
|
8527
8527
|
PositionRelativeContainer,
|
|
8528
8528
|
FullWidthContainer,
|
|
8529
8529
|
NoWrapContainer
|
|
@@ -8566,9 +8566,9 @@ const CollapsibleBreadcrumb = ({ items }) => {
|
|
|
8566
8566
|
};
|
|
8567
8567
|
return [firstItem, ellipsisItem, lastItem];
|
|
8568
8568
|
};
|
|
8569
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$
|
|
8570
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
8571
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
8569
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$g.PositionRelativeContainer, { children: [
|
|
8570
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$g.FullWidthContainer, { ref: containerRef, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Breadcrumb, { separator: ">", items: renderItems() }) }),
|
|
8571
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$g.NoWrapContainer, { ref: breadcrumbRef, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Breadcrumb, { separator: ">", items, style: { display: "flex", flexWrap: "nowrap" } }) })
|
|
8572
8572
|
] });
|
|
8573
8573
|
};
|
|
8574
8574
|
|
|
@@ -8576,12 +8576,12 @@ const HeightDiv = st.div`
|
|
|
8576
8576
|
min-height: 22px;
|
|
8577
8577
|
width: 100%;
|
|
8578
8578
|
`;
|
|
8579
|
-
const Styled$
|
|
8579
|
+
const Styled$f = {
|
|
8580
8580
|
HeightDiv
|
|
8581
8581
|
};
|
|
8582
8582
|
|
|
8583
8583
|
const ManageableBreadcrumbs = ({ data }) => {
|
|
8584
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
8584
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$f.HeightDiv, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(CollapsibleBreadcrumb, { items: data.breadcrumbItems }) });
|
|
8585
8585
|
};
|
|
8586
8586
|
const ManageableBreadcrumbsWithDataProvider = ({
|
|
8587
8587
|
uri,
|
|
@@ -8605,7 +8605,7 @@ const ManageableBreadcrumbsWithDataProvider = ({
|
|
|
8605
8605
|
return null;
|
|
8606
8606
|
}
|
|
8607
8607
|
if (rawDataLoading) {
|
|
8608
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
8608
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$f.HeightDiv, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Spin, {}) });
|
|
8609
8609
|
}
|
|
8610
8610
|
if (!rawData) {
|
|
8611
8611
|
return null;
|
|
@@ -8620,7 +8620,7 @@ const ManageableBreadcrumbsWithDataProvider = ({
|
|
|
8620
8620
|
idToCompare
|
|
8621
8621
|
});
|
|
8622
8622
|
if (!result) {
|
|
8623
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
8623
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$f.HeightDiv, {});
|
|
8624
8624
|
}
|
|
8625
8625
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(ManageableBreadcrumbs, { data: result });
|
|
8626
8626
|
};
|
|
@@ -8711,7 +8711,7 @@ const CustomMenu = st(Menu)`
|
|
|
8711
8711
|
margin: 0 !important;
|
|
8712
8712
|
}
|
|
8713
8713
|
`;
|
|
8714
|
-
const Styled$
|
|
8714
|
+
const Styled$e = {
|
|
8715
8715
|
CustomMenu
|
|
8716
8716
|
};
|
|
8717
8717
|
|
|
@@ -8738,7 +8738,7 @@ const ManageableSidebar = ({ data, noMarginTop }) => {
|
|
|
8738
8738
|
setSelectedKeys(data.selectedKeys);
|
|
8739
8739
|
}, [data.selectedKeys]);
|
|
8740
8740
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8741
|
-
Styled$
|
|
8741
|
+
Styled$e.CustomMenu,
|
|
8742
8742
|
{
|
|
8743
8743
|
selectedKeys,
|
|
8744
8744
|
onSelect: () => {
|
|
@@ -26015,7 +26015,7 @@ const ShortenedText = st.div`
|
|
|
26015
26015
|
white-space: nowrap;
|
|
26016
26016
|
text-overflow: ellipsis;
|
|
26017
26017
|
`;
|
|
26018
|
-
const Styled$
|
|
26018
|
+
const Styled$d = {
|
|
26019
26019
|
ShortenedText
|
|
26020
26020
|
};
|
|
26021
26021
|
|
|
@@ -26024,7 +26024,7 @@ const ShortenedTextWithTooltip = ({ text, trimLength, maxWidth = 200 }) => {
|
|
|
26024
26024
|
const trimmedText = text.substring(0, trimLength);
|
|
26025
26025
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: text, placement: "top", children: trimmedText });
|
|
26026
26026
|
}
|
|
26027
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: text, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
26027
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: text, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$d.ShortenedText, { $maxWidth: maxWidth, children: text }) });
|
|
26028
26028
|
};
|
|
26029
26029
|
|
|
26030
26030
|
const FilterDropdown = ({
|
|
@@ -41554,7 +41554,7 @@ const BorderRadiusContainer$1 = st.div`
|
|
|
41554
41554
|
border-radius: 8px;
|
|
41555
41555
|
}
|
|
41556
41556
|
`;
|
|
41557
|
-
const Styled$
|
|
41557
|
+
const Styled$c = {
|
|
41558
41558
|
BorderRadiusContainer: BorderRadiusContainer$1
|
|
41559
41559
|
};
|
|
41560
41560
|
|
|
@@ -41563,7 +41563,7 @@ const YamlEditor = ({ theme, currentValues, onChange }) => {
|
|
|
41563
41563
|
useEffect(() => {
|
|
41564
41564
|
setYamlData(stringify(currentValues));
|
|
41565
41565
|
}, [currentValues]);
|
|
41566
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
41566
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$c.BorderRadiusContainer, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
41567
41567
|
Ft,
|
|
41568
41568
|
{
|
|
41569
41569
|
defaultLanguage: "yaml",
|
|
@@ -41602,7 +41602,7 @@ const BigText$1 = st.div`
|
|
|
41602
41602
|
font-size: 16px;
|
|
41603
41603
|
line-height: 24px;
|
|
41604
41604
|
`;
|
|
41605
|
-
const Styled$
|
|
41605
|
+
const Styled$b = {
|
|
41606
41606
|
BorderRadiusContainer,
|
|
41607
41607
|
ControlsRowContainer: ControlsRowContainer$1,
|
|
41608
41608
|
BigText: BigText$1
|
|
@@ -41662,7 +41662,7 @@ const YamlEditorSingleton = ({
|
|
|
41662
41662
|
}
|
|
41663
41663
|
};
|
|
41664
41664
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
41665
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
41665
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$b.BorderRadiusContainer, { $designNewLayoutHeight: designNewLayoutHeight, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
41666
41666
|
Ft,
|
|
41667
41667
|
{
|
|
41668
41668
|
defaultLanguage: "yaml",
|
|
@@ -41678,7 +41678,7 @@ const YamlEditorSingleton = ({
|
|
|
41678
41678
|
}
|
|
41679
41679
|
}
|
|
41680
41680
|
) }),
|
|
41681
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
41681
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$b.ControlsRowContainer, { $bgColor: token.colorPrimaryBg, $designNewLayout: designNewLayout, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { gap: designNewLayout ? 10 : 16, align: "center", children: [
|
|
41682
41682
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Button, { type: "primary", onClick: onSubmit, loading: isLoading, children: "Submit" }),
|
|
41683
41683
|
backlink && /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { onClick: () => navigate(backlink), children: "Cancel" })
|
|
41684
41684
|
] }) }),
|
|
@@ -41688,7 +41688,7 @@ const YamlEditorSingleton = ({
|
|
|
41688
41688
|
open: !!error,
|
|
41689
41689
|
onOk: () => setError(void 0),
|
|
41690
41690
|
onCancel: () => setError(void 0),
|
|
41691
|
-
title: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { type: "danger", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
41691
|
+
title: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { type: "danger", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$b.BigText, { children: "Error!" }) }),
|
|
41692
41692
|
cancelButtonProps: { style: { display: "none" } },
|
|
41693
41693
|
children: [
|
|
41694
41694
|
"An error has occurred: ",
|
|
@@ -41768,7 +41768,7 @@ const Content$1 = st.div`
|
|
|
41768
41768
|
display: ${({ $isOpen }) => $isOpen ? "block" : "none"};
|
|
41769
41769
|
padding: ${({ $designNewLayout }) => $designNewLayout ? "0 0 0 6px" : "4px"};
|
|
41770
41770
|
`;
|
|
41771
|
-
const Styled$
|
|
41771
|
+
const Styled$a = {
|
|
41772
41772
|
Container: Container$1,
|
|
41773
41773
|
TitleBar,
|
|
41774
41774
|
Content: Content$1
|
|
@@ -41795,14 +41795,14 @@ const CustomCollapse = ({
|
|
|
41795
41795
|
}
|
|
41796
41796
|
};
|
|
41797
41797
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
41798
|
-
Styled$
|
|
41798
|
+
Styled$a.Container,
|
|
41799
41799
|
{
|
|
41800
41800
|
$designNewLayout: designNewLayout,
|
|
41801
41801
|
$borderColor: token.colorBorder,
|
|
41802
41802
|
$bgColor: token.colorBgContainer,
|
|
41803
41803
|
children: [
|
|
41804
41804
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { justify: "space-between", children: [
|
|
41805
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$
|
|
41805
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$a.TitleBar, { onClick: () => toggleCollapse(), children: [
|
|
41806
41806
|
!designNewLayout && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: isOpen ? /* @__PURE__ */ jsxRuntimeExports.jsx(CaretDownOutlined, { size: 14 }) : /* @__PURE__ */ jsxRuntimeExports.jsx(CaretRightOutlined, { size: 14 }) }),
|
|
41807
41807
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: title }),
|
|
41808
41808
|
designNewLayout && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: isOpen ? /* @__PURE__ */ jsxRuntimeExports.jsx(DownIcon, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(UpIcon, {}) })
|
|
@@ -41813,7 +41813,7 @@ const CustomCollapse = ({
|
|
|
41813
41813
|
persistedCheckbox
|
|
41814
41814
|
] })
|
|
41815
41815
|
] }),
|
|
41816
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
41816
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$a.Content, { $isOpen: isOpen, $designNewLayout: designNewLayout, children })
|
|
41817
41817
|
]
|
|
41818
41818
|
}
|
|
41819
41819
|
);
|
|
@@ -41847,13 +41847,13 @@ const CustomSizeTitle = st.div`
|
|
|
41847
41847
|
const Content = st.div`
|
|
41848
41848
|
padding: ${({ $designNewLayout }) => $designNewLayout ? "0 0 0 6px" : "4px"};
|
|
41849
41849
|
`;
|
|
41850
|
-
const Styled$
|
|
41850
|
+
const Styled$9 = {
|
|
41851
41851
|
Content
|
|
41852
41852
|
};
|
|
41853
41853
|
|
|
41854
41854
|
const ArrayInsideContainer = ({ children }) => {
|
|
41855
41855
|
const designNewLayout = useDesignNewLayout();
|
|
41856
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
41856
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$9.Content, { $designNewLayout: designNewLayout, children });
|
|
41857
41857
|
};
|
|
41858
41858
|
|
|
41859
41859
|
const arraysEqual = (arr1, arr2) => {
|
|
@@ -42529,7 +42529,7 @@ const CrossContainer = st.div`
|
|
|
42529
42529
|
cursor: pointer;
|
|
42530
42530
|
padding-top: 11px;
|
|
42531
42531
|
`;
|
|
42532
|
-
const Styled$
|
|
42532
|
+
const Styled$8 = {
|
|
42533
42533
|
SwitchAndCrossContainer,
|
|
42534
42534
|
CrossContainer
|
|
42535
42535
|
};
|
|
@@ -42554,7 +42554,7 @@ const FormBooleanInput = ({
|
|
|
42554
42554
|
onRemoveByMinus && /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { size: "small", type: "text", onClick: onRemoveByMinus, children: /* @__PURE__ */ jsxRuntimeExports.jsx(MinusIcon, {}) })
|
|
42555
42555
|
] })
|
|
42556
42556
|
] }),
|
|
42557
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$
|
|
42557
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$8.SwitchAndCrossContainer, { children: [
|
|
42558
42558
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
42559
42559
|
ResetedFormItem,
|
|
42560
42560
|
{
|
|
@@ -42564,7 +42564,7 @@ const FormBooleanInput = ({
|
|
|
42564
42564
|
arrKey !== void 0 ? arrKey : Array.isArray(name) ? name.slice(-1)[0] : name
|
|
42565
42565
|
),
|
|
42566
42566
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
42567
|
-
Styled$
|
|
42567
|
+
Styled$8.CrossContainer,
|
|
42568
42568
|
{
|
|
42569
42569
|
onClick: () => {
|
|
42570
42570
|
if (makeValueUndefined) {
|
|
@@ -42780,7 +42780,7 @@ const BigText = st.div`
|
|
|
42780
42780
|
font-size: 16px;
|
|
42781
42781
|
line-height: 24px;
|
|
42782
42782
|
`;
|
|
42783
|
-
const Styled$
|
|
42783
|
+
const Styled$7 = {
|
|
42784
42784
|
ResetedFormList,
|
|
42785
42785
|
Container,
|
|
42786
42786
|
OverflowContainer: OverflowContainer$1,
|
|
@@ -43028,7 +43028,7 @@ const getArrayFormItemFromSwagger = ({
|
|
|
43028
43028
|
}
|
|
43029
43029
|
),
|
|
43030
43030
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
43031
|
-
Styled$
|
|
43031
|
+
Styled$7.ResetedFormList,
|
|
43032
43032
|
{
|
|
43033
43033
|
name: arrName || name,
|
|
43034
43034
|
rules: !forceNonRequired && required?.includes(getStringByName(name)) ? [
|
|
@@ -43755,8 +43755,8 @@ const BlackholeForm = ({
|
|
|
43755
43755
|
setPersistedKeys([...persistedKeys.filter((arr) => JSON.stringify(arr) !== JSON.stringify(value))]);
|
|
43756
43756
|
};
|
|
43757
43757
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
43758
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$
|
|
43759
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
43758
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$7.Container, { $designNewLayout: designNewLayout, $designNewLayoutHeight: designNewLayoutHeight, children: [
|
|
43759
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$7.OverflowContainer, { ref: overflowRef, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
43760
43760
|
Form,
|
|
43761
43761
|
{
|
|
43762
43762
|
form,
|
|
@@ -43799,7 +43799,7 @@ const BlackholeForm = ({
|
|
|
43799
43799
|
) }),
|
|
43800
43800
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(YamlEditor, { theme: theme$1, currentValues: yamlValues || {}, onChange: onYamlChangeCallback }) })
|
|
43801
43801
|
] }),
|
|
43802
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
43802
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$7.ControlsRowContainer, { $bgColor: token.colorPrimaryBg, $designNewLayout: designNewLayout, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { gap: designNewLayout ? 10 : 16, align: "center", children: [
|
|
43803
43803
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Button, { type: "primary", onClick: onSubmit, loading: isLoading, children: "Submit" }),
|
|
43804
43804
|
backlink && /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { onClick: () => navigate(backlink), children: "Cancel" }),
|
|
43805
43805
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Button, { onClick: () => setIsDebugModalOpen(true), icon: /* @__PURE__ */ jsxRuntimeExports.jsx(BugOutlined, {}) }),
|
|
@@ -43811,7 +43811,7 @@ const BlackholeForm = ({
|
|
|
43811
43811
|
open: !!error,
|
|
43812
43812
|
onOk: () => setError(void 0),
|
|
43813
43813
|
onCancel: () => setError(void 0),
|
|
43814
|
-
title: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { type: "danger", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
43814
|
+
title: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { type: "danger", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$7.BigText, { children: "Error!" }) }),
|
|
43815
43815
|
cancelButtonProps: { style: { display: "none" } },
|
|
43816
43816
|
children: [
|
|
43817
43817
|
"An error has occurred: ",
|
|
@@ -43827,7 +43827,7 @@ const BlackholeForm = ({
|
|
|
43827
43827
|
onCancel: () => setIsDebugModalOpen(false),
|
|
43828
43828
|
title: "Debug for properties",
|
|
43829
43829
|
width: "90vw",
|
|
43830
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
43830
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$7.DebugContainer, { $designNewLayoutHeight: designNewLayoutHeight, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading..." }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
43831
43831
|
Editor,
|
|
43832
43832
|
{
|
|
43833
43833
|
defaultLanguage: "json",
|
|
@@ -43961,7 +43961,7 @@ const BlackholeFormDataProvider = ({
|
|
|
43961
43961
|
);
|
|
43962
43962
|
};
|
|
43963
43963
|
|
|
43964
|
-
const CustomCard$
|
|
43964
|
+
const CustomCard$3 = st(Card)`
|
|
43965
43965
|
display: flex;
|
|
43966
43966
|
justify-content: center;
|
|
43967
43967
|
align-items: center;
|
|
@@ -43981,12 +43981,12 @@ const CustomCard$2 = st(Card)`
|
|
|
43981
43981
|
padding: 8px;
|
|
43982
43982
|
}
|
|
43983
43983
|
`;
|
|
43984
|
-
const Styled$
|
|
43985
|
-
CustomCard: CustomCard$
|
|
43984
|
+
const Styled$6 = {
|
|
43985
|
+
CustomCard: CustomCard$3
|
|
43986
43986
|
};
|
|
43987
43987
|
|
|
43988
43988
|
const AddCard = ({ onAddClick }) => {
|
|
43989
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
43989
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$6.CustomCard, { onClick: onAddClick, children: /* @__PURE__ */ jsxRuntimeExports.jsx(PlusOutlined, {}) });
|
|
43990
43990
|
};
|
|
43991
43991
|
|
|
43992
43992
|
const byteToHex = [];
|
|
@@ -44219,7 +44219,7 @@ const getListPath = ({
|
|
|
44219
44219
|
return `/api/clusters/${clusterName}/k8s/api/v1${namespace ? `/namespaces/${namespace}` : ""}/${typeName}`;
|
|
44220
44220
|
};
|
|
44221
44221
|
|
|
44222
|
-
const CustomCard$
|
|
44222
|
+
const CustomCard$2 = st(Card)`
|
|
44223
44223
|
position: relative;
|
|
44224
44224
|
width: 238px;
|
|
44225
44225
|
overflow-x: auto;
|
|
@@ -44290,8 +44290,8 @@ const EditButtonContainer = st.div`
|
|
|
44290
44290
|
bottom: 6px;
|
|
44291
44291
|
right: 6px;
|
|
44292
44292
|
`;
|
|
44293
|
-
const Styled$
|
|
44294
|
-
CustomCard: CustomCard$
|
|
44293
|
+
const Styled$5 = {
|
|
44294
|
+
CustomCard: CustomCard$2,
|
|
44295
44295
|
ImageContainer,
|
|
44296
44296
|
OverflowContainer,
|
|
44297
44297
|
TitleContainer,
|
|
@@ -44366,14 +44366,14 @@ const MarketplaceCard$1 = ({
|
|
|
44366
44366
|
return null;
|
|
44367
44367
|
}
|
|
44368
44368
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
44369
|
-
Styled$
|
|
44369
|
+
Styled$5.CustomCard,
|
|
44370
44370
|
{
|
|
44371
44371
|
$isDisabled: disabled,
|
|
44372
44372
|
$hoverColor: token.colorPrimary,
|
|
44373
44373
|
onClick: () => disabled ? null : navigate(navigateUrl),
|
|
44374
44374
|
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { vertical: true, style: { width: "100%", height: "100%" }, justify: "spaceBetween", children: [
|
|
44375
44375
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { justify: "space-between", children: [
|
|
44376
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
44376
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$5.ImageContainer, { dangerouslySetInnerHTML: { __html: decodedIcon } }),
|
|
44377
44377
|
isEditMode && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
44378
44378
|
"div",
|
|
44379
44379
|
{
|
|
@@ -44394,8 +44394,8 @@ const MarketplaceCard$1 = ({
|
|
|
44394
44394
|
}
|
|
44395
44395
|
)
|
|
44396
44396
|
] }),
|
|
44397
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$
|
|
44398
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$
|
|
44397
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$5.OverflowContainer, { children: [
|
|
44398
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$5.TitleContainer, { children: [
|
|
44399
44399
|
name,
|
|
44400
44400
|
" ",
|
|
44401
44401
|
addedMode && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
|
|
@@ -44403,10 +44403,10 @@ const MarketplaceCard$1 = ({
|
|
|
44403
44403
|
k8sList?.items?.length
|
|
44404
44404
|
] })
|
|
44405
44405
|
] }),
|
|
44406
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
44407
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
44406
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$5.TagsContainer, { children: tags.map((tag) => /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$5.CustomTag, { children: tag }, tag)) }),
|
|
44407
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$5.DescriptionContainer, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { type: "secondary", children: description }) })
|
|
44408
44408
|
] }),
|
|
44409
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
44409
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$5.EditButtonContainer, { children: isEditMode && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
44410
44410
|
"div",
|
|
44411
44411
|
{
|
|
44412
44412
|
onClick: (e) => {
|
|
@@ -44464,7 +44464,7 @@ const BigValue = st.div`
|
|
|
44464
44464
|
line-clamp: 1;
|
|
44465
44465
|
word-break: break-all;
|
|
44466
44466
|
`;
|
|
44467
|
-
const Styled$
|
|
44467
|
+
const Styled$4 = {
|
|
44468
44468
|
BigValue
|
|
44469
44469
|
};
|
|
44470
44470
|
|
|
@@ -44574,7 +44574,7 @@ const MarketPlace = ({
|
|
|
44574
44574
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { justify: "space-between", children: [
|
|
44575
44575
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { gap: 12, vertical: true, children: [
|
|
44576
44576
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { type: "secondary", children: "Available Products" }) }),
|
|
44577
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
44577
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$4.BigValue, { children: "Marketplace" }) })
|
|
44578
44578
|
] }) }),
|
|
44579
44579
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { gap: 12, vertical: true, children: [
|
|
44580
44580
|
/* @__PURE__ */ jsxRuntimeExports.jsx(SearchTextInput, { uniqueTags, selectedTags, onSelectedTags: setSelectedTags }),
|
|
@@ -44777,7 +44777,7 @@ st.div`
|
|
|
44777
44777
|
line-clamp: 1;
|
|
44778
44778
|
word-break: break-all;
|
|
44779
44779
|
`;
|
|
44780
|
-
const Styled$
|
|
44780
|
+
const Styled$3 = {
|
|
44781
44781
|
ActionMenuPlaceholder};
|
|
44782
44782
|
|
|
44783
44783
|
const ProjectInfoCard$1 = ({
|
|
@@ -44855,7 +44855,7 @@ const ProjectInfoCard$1 = ({
|
|
|
44855
44855
|
} : void 0,
|
|
44856
44856
|
onUpdate: updatePermission.data?.status.allowed ? openUpdate : void 0
|
|
44857
44857
|
}
|
|
44858
|
-
) : /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
44858
|
+
) : /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$3.ActionMenuPlaceholder, {}) }),
|
|
44859
44859
|
/* @__PURE__ */ jsxRuntimeExports.jsx(DropdownAccessGroups, { accessGroups })
|
|
44860
44860
|
] }) })
|
|
44861
44861
|
] }),
|
|
@@ -44927,12 +44927,12 @@ var addonFit = {exports: {}};
|
|
|
44927
44927
|
|
|
44928
44928
|
var addonFitExports = addonFit.exports;
|
|
44929
44929
|
|
|
44930
|
-
const FullWidthDiv = st.div`
|
|
44930
|
+
const FullWidthDiv$1 = st.div`
|
|
44931
44931
|
display: flex;
|
|
44932
44932
|
justify-content: center;
|
|
44933
44933
|
width: 100%;
|
|
44934
44934
|
`;
|
|
44935
|
-
const CustomCard = st.div`
|
|
44935
|
+
const CustomCard$1 = st.div`
|
|
44936
44936
|
display: ${({ $isVisible }) => $isVisible ? "block" : "none"};
|
|
44937
44937
|
max-height: calc(100vh - 158px);
|
|
44938
44938
|
|
|
@@ -44955,12 +44955,12 @@ const CustomCard = st.div`
|
|
|
44955
44955
|
height: 100% !important; /* optional */
|
|
44956
44956
|
}
|
|
44957
44957
|
`;
|
|
44958
|
-
const Styled = {
|
|
44959
|
-
FullWidthDiv,
|
|
44960
|
-
CustomCard
|
|
44958
|
+
const Styled$2 = {
|
|
44959
|
+
FullWidthDiv: FullWidthDiv$1,
|
|
44960
|
+
CustomCard: CustomCard$1
|
|
44961
44961
|
};
|
|
44962
44962
|
|
|
44963
|
-
const XTerminal = ({ endpoint, namespace, podName, container }) => {
|
|
44963
|
+
const XTerminal$1 = ({ endpoint, namespace, podName, container }) => {
|
|
44964
44964
|
const [isLoading, setIsLoading] = useState(true);
|
|
44965
44965
|
const [error, setError] = useState();
|
|
44966
44966
|
const [terminal, setTerminal] = useState();
|
|
@@ -45051,7 +45051,7 @@ const XTerminal = ({ endpoint, namespace, podName, container }) => {
|
|
|
45051
45051
|
};
|
|
45052
45052
|
}, [terminal, endpoint, namespace, podName, container]);
|
|
45053
45053
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
45054
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled.CustomCard, { $isVisible: !isLoading && !error, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled.FullWidthDiv, { children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: terminalRef }) }) }),
|
|
45054
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$2.CustomCard, { $isVisible: !isLoading && !error, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$2.FullWidthDiv, { children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: terminalRef }) }) }),
|
|
45055
45055
|
isLoading && !error && /* @__PURE__ */ jsxRuntimeExports.jsx(Spin, {}),
|
|
45056
45056
|
error && /* @__PURE__ */ jsxRuntimeExports.jsx(Result, { status: "error", title: "Error", subTitle: JSON.stringify(error) })
|
|
45057
45057
|
] });
|
|
@@ -45078,7 +45078,7 @@ const PodTerminal$1 = ({ cluster, namespace, podName, containers }) => {
|
|
|
45078
45078
|
),
|
|
45079
45079
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Spacer$1, { $space: 8, $samespace: true }),
|
|
45080
45080
|
currentContainer && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
45081
|
-
XTerminal,
|
|
45081
|
+
XTerminal$1,
|
|
45082
45082
|
{
|
|
45083
45083
|
endpoint,
|
|
45084
45084
|
namespace,
|
|
@@ -45090,6 +45090,280 @@ const PodTerminal$1 = ({ cluster, namespace, podName, containers }) => {
|
|
|
45090
45090
|
] });
|
|
45091
45091
|
};
|
|
45092
45092
|
|
|
45093
|
+
const FullWidthDiv = st.div`
|
|
45094
|
+
display: flex;
|
|
45095
|
+
justify-content: center;
|
|
45096
|
+
width: 100%;
|
|
45097
|
+
`;
|
|
45098
|
+
const CustomCard = st.div`
|
|
45099
|
+
display: ${({ $isVisible }) => $isVisible ? "block" : "none"};
|
|
45100
|
+
max-height: calc(100vh - 158px);
|
|
45101
|
+
|
|
45102
|
+
/* overflow-y: auto; */
|
|
45103
|
+
|
|
45104
|
+
/* background: black; */
|
|
45105
|
+
|
|
45106
|
+
/* stylelint-disable declaration-no-important */
|
|
45107
|
+
|
|
45108
|
+
* {
|
|
45109
|
+
scrollbar-width: thin;
|
|
45110
|
+
}
|
|
45111
|
+
|
|
45112
|
+
> div > div {
|
|
45113
|
+
width: 100% !important;
|
|
45114
|
+
}
|
|
45115
|
+
|
|
45116
|
+
.xterm {
|
|
45117
|
+
width: 100% !important;
|
|
45118
|
+
height: 100% !important; /* optional */
|
|
45119
|
+
}
|
|
45120
|
+
`;
|
|
45121
|
+
const ShutdownContainer = st.div`
|
|
45122
|
+
display: ${({ $isVisible }) => $isVisible ? "block" : "none"};
|
|
45123
|
+
margin-top: -40px;
|
|
45124
|
+
display: flex;
|
|
45125
|
+
justify-content: flex-end;
|
|
45126
|
+
`;
|
|
45127
|
+
const ProgressContainer = st.div`
|
|
45128
|
+
height: 464px;
|
|
45129
|
+
display: flex;
|
|
45130
|
+
flex-flow: column;
|
|
45131
|
+
justify-content: center;
|
|
45132
|
+
align-items: center;
|
|
45133
|
+
gap: 8px;
|
|
45134
|
+
`;
|
|
45135
|
+
const Styled$1 = {
|
|
45136
|
+
FullWidthDiv,
|
|
45137
|
+
CustomCard,
|
|
45138
|
+
ShutdownContainer,
|
|
45139
|
+
ProgressContainer
|
|
45140
|
+
};
|
|
45141
|
+
|
|
45142
|
+
const XTerminal = ({ endpoint, nodeName, profile }) => {
|
|
45143
|
+
const [isLoading, setIsLoading] = useState(true);
|
|
45144
|
+
const [error, setError] = useState();
|
|
45145
|
+
const [isTerminalVisible, setIsTerminalVisible] = useState(false);
|
|
45146
|
+
const [warmupMessage, setWarmupMessage] = useState();
|
|
45147
|
+
const [containerWaitingMessage, setContainerWaitingMessage] = useState();
|
|
45148
|
+
const [progressPercent, setProgressPercent] = useState(0);
|
|
45149
|
+
const [isWarmingUp, setIsWarmingUp] = useState(true);
|
|
45150
|
+
const [terminal, setTerminal] = useState();
|
|
45151
|
+
const socketRef = useRef(null);
|
|
45152
|
+
const terminalRef = useRef(null);
|
|
45153
|
+
const resizeObserverRef = useRef(null);
|
|
45154
|
+
const fitAddon = new addonFitExports.FitAddon();
|
|
45155
|
+
useEffect(() => {
|
|
45156
|
+
const terminal2 = new xtermExports.Terminal({
|
|
45157
|
+
cursorBlink: false,
|
|
45158
|
+
cursorStyle: "block",
|
|
45159
|
+
fontFamily: "monospace",
|
|
45160
|
+
fontSize: 16,
|
|
45161
|
+
theme: themes.MaterialDark
|
|
45162
|
+
});
|
|
45163
|
+
terminal2.loadAddon(fitAddon);
|
|
45164
|
+
setTerminal(terminal2);
|
|
45165
|
+
fitAddon.fit();
|
|
45166
|
+
return () => {
|
|
45167
|
+
if (terminal2) {
|
|
45168
|
+
terminal2.dispose();
|
|
45169
|
+
}
|
|
45170
|
+
};
|
|
45171
|
+
}, []);
|
|
45172
|
+
useEffect(() => {
|
|
45173
|
+
if (terminal) {
|
|
45174
|
+
if (terminalRef.current) {
|
|
45175
|
+
terminal.open(terminalRef.current);
|
|
45176
|
+
setTerminal(terminal);
|
|
45177
|
+
}
|
|
45178
|
+
}
|
|
45179
|
+
resizeObserverRef.current = new ResizeObserver(() => {
|
|
45180
|
+
fitAddon.fit();
|
|
45181
|
+
});
|
|
45182
|
+
if (terminalRef.current) {
|
|
45183
|
+
resizeObserverRef.current.observe(terminalRef.current);
|
|
45184
|
+
}
|
|
45185
|
+
return () => {
|
|
45186
|
+
if (resizeObserverRef.current) {
|
|
45187
|
+
resizeObserverRef.current.disconnect();
|
|
45188
|
+
}
|
|
45189
|
+
};
|
|
45190
|
+
}, [terminal]);
|
|
45191
|
+
useEffect(() => {
|
|
45192
|
+
if (!terminal) {
|
|
45193
|
+
return;
|
|
45194
|
+
}
|
|
45195
|
+
const socket = new WebSocket(endpoint);
|
|
45196
|
+
socketRef.current = socket;
|
|
45197
|
+
socket.onopen = () => {
|
|
45198
|
+
socket.send(
|
|
45199
|
+
JSON.stringify({
|
|
45200
|
+
type: "init",
|
|
45201
|
+
payload: { nodeName, profile }
|
|
45202
|
+
})
|
|
45203
|
+
);
|
|
45204
|
+
console.log(`[${nodeName}/${profile}]: WebSocket Client Connected`);
|
|
45205
|
+
setIsLoading(false);
|
|
45206
|
+
};
|
|
45207
|
+
socket.onmessage = (event) => {
|
|
45208
|
+
const data = JSON.parse(event.data);
|
|
45209
|
+
if (data.type === "warmup") {
|
|
45210
|
+
if (data.payload) {
|
|
45211
|
+
if (data.payload === "Container ready") {
|
|
45212
|
+
setWarmupMessage(void 0);
|
|
45213
|
+
setContainerWaitingMessage(void 0);
|
|
45214
|
+
setIsTerminalVisible(true);
|
|
45215
|
+
setIsWarmingUp(false);
|
|
45216
|
+
} else if (data.payload === "Container never ready") {
|
|
45217
|
+
setError(data.payload);
|
|
45218
|
+
setIsTerminalVisible(false);
|
|
45219
|
+
setWarmupMessage(void 0);
|
|
45220
|
+
setContainerWaitingMessage(void 0);
|
|
45221
|
+
} else {
|
|
45222
|
+
setWarmupMessage(data.payload);
|
|
45223
|
+
if (data.payload === "Namespace creating") {
|
|
45224
|
+
setProgressPercent(15);
|
|
45225
|
+
}
|
|
45226
|
+
if (data.payload === "Namespace created") {
|
|
45227
|
+
setProgressPercent(30);
|
|
45228
|
+
}
|
|
45229
|
+
if (data.payload === "Pod creating") {
|
|
45230
|
+
setProgressPercent(45);
|
|
45231
|
+
}
|
|
45232
|
+
if (data.payload === "Pod creating") {
|
|
45233
|
+
setProgressPercent(60);
|
|
45234
|
+
}
|
|
45235
|
+
}
|
|
45236
|
+
}
|
|
45237
|
+
}
|
|
45238
|
+
if (data.type === "containerWaiting") {
|
|
45239
|
+
if (data.payload) {
|
|
45240
|
+
if (data.payload.includes("Container is ready")) {
|
|
45241
|
+
setContainerWaitingMessage(void 0);
|
|
45242
|
+
} else {
|
|
45243
|
+
setContainerWaitingMessage(data.payload);
|
|
45244
|
+
}
|
|
45245
|
+
}
|
|
45246
|
+
}
|
|
45247
|
+
if (data.type === "shutdown") {
|
|
45248
|
+
setIsTerminalVisible(false);
|
|
45249
|
+
}
|
|
45250
|
+
if (data.type === "output") {
|
|
45251
|
+
if (data.payload.type === "Buffer" && Array.isArray(data.payload.data)) {
|
|
45252
|
+
const text = Buffer.from(data.payload.data);
|
|
45253
|
+
terminal.write(text.toString("utf8"));
|
|
45254
|
+
} else {
|
|
45255
|
+
terminal.write(String(data.payload));
|
|
45256
|
+
}
|
|
45257
|
+
}
|
|
45258
|
+
};
|
|
45259
|
+
socket.onclose = () => {
|
|
45260
|
+
console.log(`[${nodeName}/${profile}]: WebSocket Client Closed`);
|
|
45261
|
+
};
|
|
45262
|
+
socket.onerror = (error2) => {
|
|
45263
|
+
console.error("WebSocket Error:", error2);
|
|
45264
|
+
setError(error2);
|
|
45265
|
+
setIsTerminalVisible(false);
|
|
45266
|
+
};
|
|
45267
|
+
terminal.onData((data) => {
|
|
45268
|
+
if (data === "\x1BOP") {
|
|
45269
|
+
socket.send(JSON.stringify({ type: "input", payload: "\x1B[11~" }));
|
|
45270
|
+
return;
|
|
45271
|
+
}
|
|
45272
|
+
socket.send(JSON.stringify({ type: "input", payload: data }));
|
|
45273
|
+
});
|
|
45274
|
+
return () => {
|
|
45275
|
+
terminal.dispose();
|
|
45276
|
+
if (socket.readyState === WebSocket.OPEN) {
|
|
45277
|
+
socket.close();
|
|
45278
|
+
}
|
|
45279
|
+
};
|
|
45280
|
+
}, [terminal, endpoint, nodeName, profile]);
|
|
45281
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
45282
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$1.ShutdownContainer, { $isVisible: isTerminalVisible, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
45283
|
+
Button,
|
|
45284
|
+
{
|
|
45285
|
+
type: "dashed",
|
|
45286
|
+
disabled: !socketRef.current,
|
|
45287
|
+
onClick: () => socketRef.current?.send(
|
|
45288
|
+
JSON.stringify({
|
|
45289
|
+
type: "shutdown"
|
|
45290
|
+
})
|
|
45291
|
+
),
|
|
45292
|
+
children: "Terminate"
|
|
45293
|
+
}
|
|
45294
|
+
) }),
|
|
45295
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Spacer$1, { $space: 8, $samespace: true }),
|
|
45296
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$1.CustomCard, { $isVisible: isTerminalVisible, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$1.FullWidthDiv, { children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: terminalRef }) }) }),
|
|
45297
|
+
!isTerminalVisible && !error && isWarmingUp && /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$1.ProgressContainer, { children: [
|
|
45298
|
+
isLoading && /* @__PURE__ */ jsxRuntimeExports.jsx(Spin, {}),
|
|
45299
|
+
!isLoading && /* @__PURE__ */ jsxRuntimeExports.jsx(Progress, { type: "circle", percent: progressPercent }),
|
|
45300
|
+
warmupMessage && /* @__PURE__ */ jsxRuntimeExports.jsxs(Typography.Text, { children: [
|
|
45301
|
+
"Warming Up: ",
|
|
45302
|
+
warmupMessage
|
|
45303
|
+
] }),
|
|
45304
|
+
containerWaitingMessage && /* @__PURE__ */ jsxRuntimeExports.jsxs(Typography.Text, { children: [
|
|
45305
|
+
"Container Waiting: ",
|
|
45306
|
+
containerWaitingMessage
|
|
45307
|
+
] })
|
|
45308
|
+
] }),
|
|
45309
|
+
error && /* @__PURE__ */ jsxRuntimeExports.jsx(Result, { status: "error", title: "Error", subTitle: JSON.stringify(error) })
|
|
45310
|
+
] });
|
|
45311
|
+
};
|
|
45312
|
+
|
|
45313
|
+
const CustomSelect = st.div`
|
|
45314
|
+
.ant-select {
|
|
45315
|
+
width: 200px;
|
|
45316
|
+
}
|
|
45317
|
+
`;
|
|
45318
|
+
const Styled = {
|
|
45319
|
+
CustomSelect
|
|
45320
|
+
};
|
|
45321
|
+
|
|
45322
|
+
const NodeTerminal$1 = ({ cluster, nodeName }) => {
|
|
45323
|
+
const [selectValue, setSelectValue] = useState();
|
|
45324
|
+
const [currentProfile, setCurrentProfile] = useState();
|
|
45325
|
+
const [hash, setHash] = useState(0);
|
|
45326
|
+
const endpoint = `/api/clusters/${cluster}/openapi-bff-ws/terminal/terminalNode/terminalNode`;
|
|
45327
|
+
const profiles = ["legacy", "general", "baseline", "netadmin", "sysadmin"];
|
|
45328
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
45329
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { gap: 16, children: [
|
|
45330
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled.CustomSelect, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
45331
|
+
Select,
|
|
45332
|
+
{
|
|
45333
|
+
placeholder: "Select profile",
|
|
45334
|
+
options: profiles.map((profile) => ({ value: profile, label: profile })),
|
|
45335
|
+
filterOption: filterSelectOptions,
|
|
45336
|
+
showSearch: true,
|
|
45337
|
+
value: selectValue,
|
|
45338
|
+
onChange: (value) => setSelectValue(value)
|
|
45339
|
+
}
|
|
45340
|
+
) }),
|
|
45341
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
45342
|
+
Button,
|
|
45343
|
+
{
|
|
45344
|
+
type: "primary",
|
|
45345
|
+
onClick: () => {
|
|
45346
|
+
setCurrentProfile(selectValue);
|
|
45347
|
+
setHash(hash + 1);
|
|
45348
|
+
},
|
|
45349
|
+
disabled: !selectValue,
|
|
45350
|
+
children: "Open"
|
|
45351
|
+
}
|
|
45352
|
+
)
|
|
45353
|
+
] }),
|
|
45354
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Spacer$1, { $space: 8, $samespace: true }),
|
|
45355
|
+
currentProfile && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
45356
|
+
XTerminal,
|
|
45357
|
+
{
|
|
45358
|
+
endpoint,
|
|
45359
|
+
nodeName,
|
|
45360
|
+
profile: currentProfile
|
|
45361
|
+
},
|
|
45362
|
+
`${cluster}-${nodeName}-${currentProfile}-${hash}`
|
|
45363
|
+
)
|
|
45364
|
+
] });
|
|
45365
|
+
};
|
|
45366
|
+
|
|
45093
45367
|
const DynamicRendererInner = ({
|
|
45094
45368
|
items,
|
|
45095
45369
|
components
|
|
@@ -45464,7 +45738,7 @@ const useTheme = () => {
|
|
|
45464
45738
|
return useContext(ThemeContext);
|
|
45465
45739
|
};
|
|
45466
45740
|
|
|
45467
|
-
const parseMutliqueryText$
|
|
45741
|
+
const parseMutliqueryText$2 = ({ text, multiQueryData }) => {
|
|
45468
45742
|
if (!text) return "";
|
|
45469
45743
|
return text.replace(/\{reqs\[(\d+)\]\[((?:\s*['"][^'"]+['"]\s*,?)+)\]\}/g, (match, reqIndexStr, rawPath) => {
|
|
45470
45744
|
try {
|
|
@@ -45518,14 +45792,14 @@ const EnrichedTable = ({
|
|
|
45518
45792
|
replaceValues
|
|
45519
45793
|
});
|
|
45520
45794
|
const fetchUrlPrepared = prepareTemplate({
|
|
45521
|
-
template: parseMutliqueryText$
|
|
45795
|
+
template: parseMutliqueryText$2({ text: fetchUrl, multiQueryData }),
|
|
45522
45796
|
replaceValues
|
|
45523
45797
|
});
|
|
45524
45798
|
let labelsSuffix;
|
|
45525
45799
|
if (labelsSelector) {
|
|
45526
45800
|
const parsedObject = Object.fromEntries(
|
|
45527
45801
|
Object.entries(labelsSelector).map(
|
|
45528
|
-
([key, value]) => [key, prepareTemplate({ template: parseMutliqueryText$
|
|
45802
|
+
([key, value]) => [key, prepareTemplate({ template: parseMutliqueryText$2({ text: value, multiQueryData }), replaceValues })]
|
|
45529
45803
|
)
|
|
45530
45804
|
);
|
|
45531
45805
|
const serializedLabels = serializeLabels(parsedObject);
|
|
@@ -45538,7 +45812,7 @@ const EnrichedTable = ({
|
|
|
45538
45812
|
}
|
|
45539
45813
|
let fieldSelectorSuffix;
|
|
45540
45814
|
if (fieldSelector) {
|
|
45541
|
-
const preparedFieldSelectorValueText = parseMutliqueryText$
|
|
45815
|
+
const preparedFieldSelectorValueText = parseMutliqueryText$2({ text: fieldSelector?.parsedText, multiQueryData });
|
|
45542
45816
|
const preparedFieldSelectorValueTextWithPartsOfUrl = prepareTemplate({
|
|
45543
45817
|
template: preparedFieldSelectorValueText,
|
|
45544
45818
|
replaceValues
|
|
@@ -45601,7 +45875,7 @@ const EnrichedTable = ({
|
|
|
45601
45875
|
] });
|
|
45602
45876
|
};
|
|
45603
45877
|
|
|
45604
|
-
const parseMutliqueryText = ({ text, multiQueryData }) => {
|
|
45878
|
+
const parseMutliqueryText$1 = ({ text, multiQueryData }) => {
|
|
45605
45879
|
if (!text) return "";
|
|
45606
45880
|
return text.replace(/\{reqs\[(\d+)\]\[((?:\s*['"][^'"]+['"]\s*,?)+)\]\}/g, (match, reqIndexStr, rawPath) => {
|
|
45607
45881
|
try {
|
|
@@ -45638,15 +45912,15 @@ const PodTerminal = ({
|
|
|
45638
45912
|
return acc;
|
|
45639
45913
|
}, {});
|
|
45640
45914
|
const clusterPrepared = prepareTemplate({
|
|
45641
|
-
template: parseMutliqueryText({ text: cluster, multiQueryData }),
|
|
45915
|
+
template: parseMutliqueryText$1({ text: cluster, multiQueryData }),
|
|
45642
45916
|
replaceValues
|
|
45643
45917
|
});
|
|
45644
45918
|
const namespacePrepared = prepareTemplate({
|
|
45645
|
-
template: parseMutliqueryText({ text: namespace, multiQueryData }),
|
|
45919
|
+
template: parseMutliqueryText$1({ text: namespace, multiQueryData }),
|
|
45646
45920
|
replaceValues
|
|
45647
45921
|
});
|
|
45648
45922
|
const podNamePrepared = prepareTemplate({
|
|
45649
|
-
template: parseMutliqueryText({ text: podName, multiQueryData }),
|
|
45923
|
+
template: parseMutliqueryText$1({ text: podName, multiQueryData }),
|
|
45650
45924
|
replaceValues
|
|
45651
45925
|
});
|
|
45652
45926
|
const {
|
|
@@ -45690,6 +45964,57 @@ const PodTerminal = ({
|
|
|
45690
45964
|
] });
|
|
45691
45965
|
};
|
|
45692
45966
|
|
|
45967
|
+
const parseMutliqueryText = ({ text, multiQueryData }) => {
|
|
45968
|
+
if (!text) return "";
|
|
45969
|
+
return text.replace(/\{reqs\[(\d+)\]\[((?:\s*['"][^'"]+['"]\s*,?)+)\]\}/g, (match, reqIndexStr, rawPath) => {
|
|
45970
|
+
try {
|
|
45971
|
+
const reqIndex = parseInt(reqIndexStr, 10);
|
|
45972
|
+
const path = Array.from(rawPath.matchAll(/['"]([^'"]+)['"]/g)).map(
|
|
45973
|
+
(m) => m[1]
|
|
45974
|
+
);
|
|
45975
|
+
const value = _$1.get(multiQueryData[`req${reqIndex}`], path);
|
|
45976
|
+
return value != null ? String(value) : "";
|
|
45977
|
+
} catch {
|
|
45978
|
+
return match;
|
|
45979
|
+
}
|
|
45980
|
+
});
|
|
45981
|
+
};
|
|
45982
|
+
|
|
45983
|
+
const NodeTerminal = ({
|
|
45984
|
+
data,
|
|
45985
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
45986
|
+
children
|
|
45987
|
+
}) => {
|
|
45988
|
+
const { data: multiQueryData, isLoading: isMultiqueryLoading } = useMultiQuery();
|
|
45989
|
+
const {
|
|
45990
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
45991
|
+
id,
|
|
45992
|
+
cluster,
|
|
45993
|
+
nodeName,
|
|
45994
|
+
...props
|
|
45995
|
+
} = data;
|
|
45996
|
+
const partsOfUrl = usePartsOfUrl();
|
|
45997
|
+
const replaceValues = partsOfUrl.partsOfUrl.reduce((acc, value, index) => {
|
|
45998
|
+
acc[index.toString()] = value;
|
|
45999
|
+
return acc;
|
|
46000
|
+
}, {});
|
|
46001
|
+
const clusterPrepared = prepareTemplate({
|
|
46002
|
+
template: parseMutliqueryText({ text: cluster, multiQueryData }),
|
|
46003
|
+
replaceValues
|
|
46004
|
+
});
|
|
46005
|
+
const nodeNamePrepared = prepareTemplate({
|
|
46006
|
+
template: parseMutliqueryText({ text: nodeName, multiQueryData }),
|
|
46007
|
+
replaceValues
|
|
46008
|
+
});
|
|
46009
|
+
if (isMultiqueryLoading) {
|
|
46010
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading multiquery" });
|
|
46011
|
+
}
|
|
46012
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
46013
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(NodeTerminal$1, { cluster: clusterPrepared, nodeName: nodeNamePrepared, ...props }),
|
|
46014
|
+
children
|
|
46015
|
+
] });
|
|
46016
|
+
};
|
|
46017
|
+
|
|
45693
46018
|
const DynamicComponents = {
|
|
45694
46019
|
DefaultDiv,
|
|
45695
46020
|
antdText: AntdText,
|
|
@@ -45709,7 +46034,8 @@ const DynamicComponents = {
|
|
|
45709
46034
|
StatusText,
|
|
45710
46035
|
SidebarProvider,
|
|
45711
46036
|
EnrichedTable,
|
|
45712
|
-
PodTerminal
|
|
46037
|
+
PodTerminal,
|
|
46038
|
+
NodeTerminal
|
|
45713
46039
|
};
|
|
45714
46040
|
|
|
45715
46041
|
const prepareUrlsToFetchForDynamicRenderer = ({
|
|
@@ -46211,5 +46537,5 @@ const useCrdData = ({
|
|
|
46211
46537
|
});
|
|
46212
46538
|
};
|
|
46213
46539
|
|
|
46214
|
-
export { BackToDefaultIcon, BlackholeForm, BlackholeFormDataProvider, ContentCard$1 as ContentCard, DeleteIcon, DeleteModal, DeleteModalMany, DownIcon, DynamicComponents, DynamicRenderer, DynamicRendererWithProviders, EditIcon, EnrichedTable$1 as EnrichedTable, EnrichedTableProvider, LockedIcon, ManageableBreadcrumbs, ManageableBreadcrumbsWithDataProvider, ManageableSidebar, ManageableSidebarWithDataProvider, MarketPlace, MarketplaceCard$1 as MarketplaceCard, MinusIcon, PlusIcon, PodTerminal$1 as PodTerminal, ProjectInfoCard$1 as ProjectInfoCard, Spacer$1 as Spacer, SuccessIcon, TreeWithSearch, UnlockedIcon, UpIcon, checkIfApiInstanceNamespaceScoped, checkIfBuiltInInstanceNamespaceScoped, checkPermission, createContextFactory, createNewEntry, deleteEntry, feedbackIcons, filterIfApiInstanceNamespaceScoped, filterIfBuiltInInstanceNamespaceScoped, filterSelectOptions, floorToDecimal, getAllPathsFromObj, getApiResourceSingle, getApiResourceTypes, getApiResourceTypesByApiGroup, getApiResources, getBuiltinResourceSingle, getBuiltinResourceTypes, getBuiltinResources, getBuiltinTreeData, getClusterList, getCrdData, getCrdResourceSingle, getCrdResources, getDirectUnknownResource, getEnrichedColumns, getEnrichedColumnsWithControls, getGroupsByCategory, getObjectFormItemsDraft, getPrefixSubarrays, getStringByName, getSwagger, groupsToTreeData, isFlatObject, normalizeValuesForQuotasToNumber, parseQuotaValue, parseQuotaValueCpu, parseQuotaValueMemoryAndStorage, prepareDataForManageableBreadcrumbs, prepareDataForManageableSidebar, prepareTemplate, prepareUrlsToFetchForDynamicRenderer, updateEntry, useApiResourceSingle, useApiResourceTypesByGroup, useApiResources, useApisResourceTypes, useBuiltinResourceSingle, useBuiltinResourceTypes, useBuiltinResources, useClusterList, useCrdData, useCrdResourceSingle, useCrdResources, useDirectUnknownResource, usePermissions };
|
|
46540
|
+
export { BackToDefaultIcon, BlackholeForm, BlackholeFormDataProvider, ContentCard$1 as ContentCard, DeleteIcon, DeleteModal, DeleteModalMany, DownIcon, DynamicComponents, DynamicRenderer, DynamicRendererWithProviders, EditIcon, EnrichedTable$1 as EnrichedTable, EnrichedTableProvider, LockedIcon, ManageableBreadcrumbs, ManageableBreadcrumbsWithDataProvider, ManageableSidebar, ManageableSidebarWithDataProvider, MarketPlace, MarketplaceCard$1 as MarketplaceCard, MinusIcon, NodeTerminal$1 as NodeTerminal, PlusIcon, PodTerminal$1 as PodTerminal, ProjectInfoCard$1 as ProjectInfoCard, Spacer$1 as Spacer, SuccessIcon, TreeWithSearch, UnlockedIcon, UpIcon, checkIfApiInstanceNamespaceScoped, checkIfBuiltInInstanceNamespaceScoped, checkPermission, createContextFactory, createNewEntry, deleteEntry, feedbackIcons, filterIfApiInstanceNamespaceScoped, filterIfBuiltInInstanceNamespaceScoped, filterSelectOptions, floorToDecimal, getAllPathsFromObj, getApiResourceSingle, getApiResourceTypes, getApiResourceTypesByApiGroup, getApiResources, getBuiltinResourceSingle, getBuiltinResourceTypes, getBuiltinResources, getBuiltinTreeData, getClusterList, getCrdData, getCrdResourceSingle, getCrdResources, getDirectUnknownResource, getEnrichedColumns, getEnrichedColumnsWithControls, getGroupsByCategory, getObjectFormItemsDraft, getPrefixSubarrays, getStringByName, getSwagger, groupsToTreeData, isFlatObject, normalizeValuesForQuotasToNumber, parseQuotaValue, parseQuotaValueCpu, parseQuotaValueMemoryAndStorage, prepareDataForManageableBreadcrumbs, prepareDataForManageableSidebar, prepareTemplate, prepareUrlsToFetchForDynamicRenderer, updateEntry, useApiResourceSingle, useApiResourceTypesByGroup, useApiResources, useApisResourceTypes, useBuiltinResourceSingle, useBuiltinResourceTypes, useBuiltinResources, useClusterList, useCrdData, useCrdResourceSingle, useCrdResources, useDirectUnknownResource, usePermissions };
|
|
46215
46541
|
//# sourceMappingURL=openapi-k8s-toolkit.es.js.map
|