@prorobotech/openapi-k8s-toolkit 0.0.1-alpha.67 → 0.0.1-alpha.69
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 +692 -215
- package/dist/openapi-k8s-toolkit.es.js.map +1 -1
- package/dist/openapi-k8s-toolkit.umd.js +693 -214
- package/dist/openapi-k8s-toolkit.umd.js.map +1 -1
- package/dist/types/components/molecules/{NodeTerminal → Terminals/NodeTerminal}/NodeTerminal.d.ts +1 -0
- package/dist/types/components/molecules/{NodeTerminal → Terminals/NodeTerminal}/molecules/XTerminal/XTerminal.d.ts +1 -0
- package/dist/types/components/molecules/{NodeTerminal → Terminals/NodeTerminal}/molecules/XTerminal/styled.d.ts +5 -272
- package/dist/types/components/molecules/Terminals/PodLogs/PodLogs.d.ts +8 -0
- package/dist/types/components/molecules/Terminals/PodLogs/index.d.ts +2 -0
- package/dist/types/components/molecules/{PodTerminal → Terminals/PodLogs}/molecules/XTerminal/styled.d.ts +4 -0
- package/dist/types/components/molecules/Terminals/PodLogs/styled.d.ts +276 -0
- package/dist/types/components/molecules/Terminals/PodLogsMonaco/PodLogsMonaco.d.ts +10 -0
- package/dist/types/components/molecules/Terminals/PodLogsMonaco/index.d.ts +2 -0
- package/dist/types/components/molecules/Terminals/PodLogsMonaco/molecules/MonacoEditor/MonacoEditor.d.ts +11 -0
- package/dist/types/components/molecules/Terminals/PodLogsMonaco/molecules/MonacoEditor/index.d.ts +1 -0
- package/dist/types/components/molecules/Terminals/PodLogsMonaco/molecules/MonacoEditor/styled.d.ts +285 -0
- package/dist/types/components/molecules/Terminals/PodLogsMonaco/molecules/index.d.ts +1 -0
- package/dist/types/components/molecules/Terminals/PodLogsMonaco/styled.d.ts +276 -0
- package/dist/types/components/molecules/{PodTerminal → Terminals/PodTerminal}/PodTerminal.d.ts +1 -0
- package/dist/types/components/molecules/Terminals/PodTerminal/molecules/XTerminal/XTerminal.d.ts +11 -0
- package/dist/types/components/molecules/Terminals/PodTerminal/molecules/XTerminal/index.d.ts +1 -0
- package/dist/types/components/molecules/Terminals/PodTerminal/molecules/XTerminal/styled.d.ts +13 -0
- package/dist/types/components/molecules/Terminals/PodTerminal/molecules/index.d.ts +1 -0
- package/dist/types/components/molecules/Terminals/PodTerminal/styled.d.ts +276 -0
- package/dist/types/components/molecules/Terminals/index.d.ts +4 -0
- package/dist/types/components/molecules/index.d.ts +1 -2
- package/dist/types/components/organisms/DynamicComponents/molecules/PodLogs/PodLogs.d.ts +6 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PodLogs/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PodLogs/utils.d.ts +18 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/types.d.ts +9 -0
- package/package.json +1 -1
- /package/dist/types/components/molecules/{NodeTerminal → Terminals/NodeTerminal}/index.d.ts +0 -0
- /package/dist/types/components/molecules/{NodeTerminal → Terminals/NodeTerminal}/molecules/XTerminal/index.d.ts +0 -0
- /package/dist/types/components/molecules/{NodeTerminal → Terminals/NodeTerminal}/molecules/index.d.ts +0 -0
- /package/dist/types/components/molecules/{NodeTerminal → Terminals/NodeTerminal}/styled.d.ts +0 -0
- /package/dist/types/components/molecules/{PodTerminal → Terminals/PodLogs}/molecules/XTerminal/XTerminal.d.ts +0 -0
- /package/dist/types/components/molecules/{PodTerminal → Terminals/PodLogs}/molecules/XTerminal/index.d.ts +0 -0
- /package/dist/types/components/molecules/{PodTerminal → Terminals/PodLogs}/molecules/index.d.ts +0 -0
- /package/dist/types/components/molecules/{PodTerminal → Terminals/PodTerminal}/index.d.ts +0 -0
|
@@ -2504,7 +2504,7 @@ const CustomTreeProvider = st.div`
|
|
|
2504
2504
|
justify-content: center;
|
|
2505
2505
|
}
|
|
2506
2506
|
`;
|
|
2507
|
-
const Styled$
|
|
2507
|
+
const Styled$n = {
|
|
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$n.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$m = {
|
|
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$m.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$l = {
|
|
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$l.PositionRelativeContainer, { children: [
|
|
8570
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$l.FullWidthContainer, { ref: containerRef, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Breadcrumb, { separator: ">", items: renderItems() }) }),
|
|
8571
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$l.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$k = {
|
|
8580
8580
|
HeightDiv
|
|
8581
8581
|
};
|
|
8582
8582
|
|
|
8583
8583
|
const ManageableBreadcrumbs = ({ data }) => {
|
|
8584
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
8584
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$k.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$k.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$k.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$j = {
|
|
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$j.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$i = {
|
|
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$i.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$h = {
|
|
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$h.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$g = {
|
|
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$g.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$g.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$g.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$f = {
|
|
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$f.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$f.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$f.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$e = {
|
|
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$e.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$d = {
|
|
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$d.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$d.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$c = {
|
|
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$c.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$c.Container, { $designNewLayout: designNewLayout, $designNewLayoutHeight: designNewLayoutHeight, children: [
|
|
43759
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$c.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$c.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$c.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$c.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$5 = st(Card)`
|
|
43965
43965
|
display: flex;
|
|
43966
43966
|
justify-content: center;
|
|
43967
43967
|
align-items: center;
|
|
@@ -43981,12 +43981,12 @@ const CustomCard$3 = st(Card)`
|
|
|
43981
43981
|
padding: 8px;
|
|
43982
43982
|
}
|
|
43983
43983
|
`;
|
|
43984
|
-
const Styled$
|
|
43985
|
-
CustomCard: CustomCard$
|
|
43984
|
+
const Styled$b = {
|
|
43985
|
+
CustomCard: CustomCard$5
|
|
43986
43986
|
};
|
|
43987
43987
|
|
|
43988
43988
|
const AddCard = ({ onAddClick }) => {
|
|
43989
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
43989
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$b.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$4 = 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$a = {
|
|
44294
|
+
CustomCard: CustomCard$4,
|
|
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$a.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$a.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$a.OverflowContainer, { children: [
|
|
44398
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$a.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$a.TagsContainer, { children: tags.map((tag) => /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$a.CustomTag, { children: tag }, tag)) }),
|
|
44407
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$a.DescriptionContainer, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { type: "secondary", children: description }) })
|
|
44408
44408
|
] }),
|
|
44409
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
44409
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$a.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$9 = {
|
|
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$9.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$8 = {
|
|
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$8.ActionMenuPlaceholder, {}) }),
|
|
44859
44859
|
/* @__PURE__ */ jsxRuntimeExports.jsx(DropdownAccessGroups, { accessGroups })
|
|
44860
44860
|
] }) })
|
|
44861
44861
|
] }),
|
|
@@ -44927,47 +44927,36 @@ var addonFit = {exports: {}};
|
|
|
44927
44927
|
|
|
44928
44928
|
var addonFitExports = addonFit.exports;
|
|
44929
44929
|
|
|
44930
|
-
const
|
|
44931
|
-
|
|
44932
|
-
|
|
44933
|
-
width: 100%;
|
|
44934
|
-
`;
|
|
44935
|
-
const CustomCard$1 = st.div`
|
|
44936
|
-
display: ${({ $isVisible }) => $isVisible ? "block" : "none"};
|
|
44937
|
-
max-height: calc(100vh - 158px);
|
|
44938
|
-
|
|
44939
|
-
/* overflow-y: auto; */
|
|
44940
|
-
|
|
44941
|
-
/* background: black; */
|
|
44942
|
-
|
|
44943
|
-
/* stylelint-disable declaration-no-important */
|
|
44930
|
+
const CustomCard$3 = st.div`
|
|
44931
|
+
visibility: ${({ $isVisible }) => $isVisible ? "visible" : "hidden"};
|
|
44932
|
+
height: calc(100vh - ${({ $substractHeight }) => $substractHeight}px);
|
|
44944
44933
|
|
|
44945
44934
|
* {
|
|
44946
44935
|
scrollbar-width: thin;
|
|
44947
44936
|
}
|
|
44948
|
-
|
|
44949
|
-
> div > div {
|
|
44950
|
-
width: 100% !important;
|
|
44951
|
-
}
|
|
44952
|
-
|
|
44953
|
-
.xterm {
|
|
44954
|
-
width: 100% !important;
|
|
44955
|
-
height: 100% !important; /* optional */
|
|
44956
|
-
}
|
|
44957
44937
|
`;
|
|
44958
|
-
const
|
|
44959
|
-
|
|
44960
|
-
|
|
44938
|
+
const FullWidthDiv$3 = st.div`
|
|
44939
|
+
display: flex;
|
|
44940
|
+
justify-content: center;
|
|
44941
|
+
width: 100%;
|
|
44942
|
+
height: calc(100vh - ${({ $substractHeight }) => $substractHeight}px);
|
|
44943
|
+
`;
|
|
44944
|
+
const Styled$7 = {
|
|
44945
|
+
FullWidthDiv: FullWidthDiv$3,
|
|
44946
|
+
CustomCard: CustomCard$3
|
|
44961
44947
|
};
|
|
44962
44948
|
|
|
44963
|
-
const XTerminal$
|
|
44949
|
+
const XTerminal$2 = ({ endpoint, namespace, podName, container, substractHeight }) => {
|
|
44964
44950
|
const [isLoading, setIsLoading] = useState(true);
|
|
44965
44951
|
const [error, setError] = useState();
|
|
44966
44952
|
const [terminal, setTerminal] = useState();
|
|
44953
|
+
const terminalInstance = useRef(null);
|
|
44967
44954
|
const terminalRef = useRef(null);
|
|
44968
|
-
const
|
|
44969
|
-
const fitAddon = new addonFitExports.FitAddon();
|
|
44955
|
+
const fitAddon = useRef(new addonFitExports.FitAddon());
|
|
44970
44956
|
useEffect(() => {
|
|
44957
|
+
if (!terminalRef.current) {
|
|
44958
|
+
return;
|
|
44959
|
+
}
|
|
44971
44960
|
const terminal2 = new xtermExports.Terminal({
|
|
44972
44961
|
cursorBlink: false,
|
|
44973
44962
|
cursorStyle: "block",
|
|
@@ -44975,34 +44964,20 @@ const XTerminal$1 = ({ endpoint, namespace, podName, container }) => {
|
|
|
44975
44964
|
fontSize: 16,
|
|
44976
44965
|
theme: themes.MaterialDark
|
|
44977
44966
|
});
|
|
44978
|
-
terminal2.loadAddon(fitAddon);
|
|
44967
|
+
terminal2.loadAddon(fitAddon.current);
|
|
44968
|
+
terminal2.open(terminalRef.current);
|
|
44969
|
+
terminalInstance.current = terminal2;
|
|
44979
44970
|
setTerminal(terminal2);
|
|
44980
|
-
fitAddon.fit();
|
|
44981
|
-
|
|
44982
|
-
|
|
44983
|
-
terminal2.dispose();
|
|
44984
|
-
}
|
|
44971
|
+
fitAddon.current.fit();
|
|
44972
|
+
const handleResize = () => {
|
|
44973
|
+
fitAddon.current.fit();
|
|
44985
44974
|
};
|
|
44986
|
-
|
|
44987
|
-
useEffect(() => {
|
|
44988
|
-
if (terminal) {
|
|
44989
|
-
if (terminalRef.current) {
|
|
44990
|
-
terminal.open(terminalRef.current);
|
|
44991
|
-
setTerminal(terminal);
|
|
44992
|
-
}
|
|
44993
|
-
}
|
|
44994
|
-
resizeObserverRef.current = new ResizeObserver(() => {
|
|
44995
|
-
fitAddon.fit();
|
|
44996
|
-
});
|
|
44997
|
-
if (terminalRef.current) {
|
|
44998
|
-
resizeObserverRef.current.observe(terminalRef.current);
|
|
44999
|
-
}
|
|
44975
|
+
window.addEventListener("resize", handleResize);
|
|
45000
44976
|
return () => {
|
|
45001
|
-
|
|
45002
|
-
|
|
45003
|
-
}
|
|
44977
|
+
window.removeEventListener("resize", handleResize);
|
|
44978
|
+
terminal2.dispose();
|
|
45004
44979
|
};
|
|
45005
|
-
}, [
|
|
44980
|
+
}, []);
|
|
45006
44981
|
useEffect(() => {
|
|
45007
44982
|
if (!terminal) {
|
|
45008
44983
|
return;
|
|
@@ -45051,80 +45026,96 @@ const XTerminal$1 = ({ endpoint, namespace, podName, container }) => {
|
|
|
45051
45026
|
};
|
|
45052
45027
|
}, [terminal, endpoint, namespace, podName, container]);
|
|
45053
45028
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
45054
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
45029
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$7.CustomCard, { $isVisible: !isLoading && !error, $substractHeight: substractHeight, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$7.FullWidthDiv, { $substractHeight: substractHeight, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: terminalRef, style: { width: "100%", height: "100%" } }) }) }),
|
|
45055
45030
|
isLoading && !error && /* @__PURE__ */ jsxRuntimeExports.jsx(Spin, {}),
|
|
45056
45031
|
error && /* @__PURE__ */ jsxRuntimeExports.jsx(Result, { status: "error", title: "Error", subTitle: JSON.stringify(error) })
|
|
45057
45032
|
] });
|
|
45058
45033
|
};
|
|
45059
45034
|
|
|
45060
|
-
const
|
|
45061
|
-
|
|
45035
|
+
const CustomSelect$3 = st.div`
|
|
45036
|
+
.ant-select {
|
|
45037
|
+
width: 200px;
|
|
45038
|
+
}
|
|
45039
|
+
`;
|
|
45040
|
+
const Styled$6 = {
|
|
45041
|
+
CustomSelect: CustomSelect$3
|
|
45042
|
+
};
|
|
45043
|
+
|
|
45044
|
+
const PodTerminal$1 = ({ cluster, namespace, podName, containers, substractHeight }) => {
|
|
45045
|
+
const [selectValue, setSelectValue] = useState(containers[0] || void 0);
|
|
45046
|
+
const [currentContainer, setCurrentContainer] = useState();
|
|
45047
|
+
const [hash, setHash] = useState(0);
|
|
45062
45048
|
const endpoint = `/api/clusters/${cluster}/openapi-bff-ws/terminal/terminalPod/terminalPod`;
|
|
45063
45049
|
if (containers.length === 0) {
|
|
45064
45050
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: "No Running Containers" });
|
|
45065
45051
|
}
|
|
45066
45052
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
45067
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
45068
|
-
|
|
45069
|
-
|
|
45070
|
-
|
|
45071
|
-
|
|
45072
|
-
|
|
45073
|
-
|
|
45074
|
-
|
|
45075
|
-
|
|
45076
|
-
|
|
45077
|
-
|
|
45078
|
-
|
|
45053
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { gap: 16, children: [
|
|
45054
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$6.CustomSelect, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
45055
|
+
Select,
|
|
45056
|
+
{
|
|
45057
|
+
placeholder: "Select container",
|
|
45058
|
+
options: containers.map((container) => ({ value: container, label: container })),
|
|
45059
|
+
filterOption: filterSelectOptions,
|
|
45060
|
+
disabled: containers.length === 0,
|
|
45061
|
+
showSearch: true,
|
|
45062
|
+
value: selectValue,
|
|
45063
|
+
onChange: (value) => {
|
|
45064
|
+
setHash(hash + 1);
|
|
45065
|
+
setSelectValue(value);
|
|
45066
|
+
}
|
|
45067
|
+
}
|
|
45068
|
+
) }),
|
|
45069
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
45070
|
+
Button,
|
|
45071
|
+
{
|
|
45072
|
+
type: "primary",
|
|
45073
|
+
onClick: () => {
|
|
45074
|
+
setCurrentContainer(selectValue);
|
|
45075
|
+
setHash(hash + 1);
|
|
45076
|
+
},
|
|
45077
|
+
disabled: !selectValue,
|
|
45078
|
+
children: "Open"
|
|
45079
|
+
}
|
|
45080
|
+
)
|
|
45081
|
+
] }),
|
|
45079
45082
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Spacer$1, { $space: 8, $samespace: true }),
|
|
45080
45083
|
currentContainer && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
45081
|
-
XTerminal$
|
|
45084
|
+
XTerminal$2,
|
|
45082
45085
|
{
|
|
45083
45086
|
endpoint,
|
|
45084
45087
|
namespace,
|
|
45085
45088
|
podName,
|
|
45086
|
-
container: currentContainer
|
|
45089
|
+
container: currentContainer,
|
|
45090
|
+
substractHeight
|
|
45087
45091
|
},
|
|
45088
|
-
`${cluster}-${namespace}-${podName}-${currentContainer}`
|
|
45092
|
+
`${cluster}-${namespace}-${podName}-${currentContainer}-${hash}`
|
|
45089
45093
|
)
|
|
45090
45094
|
] });
|
|
45091
45095
|
};
|
|
45092
45096
|
|
|
45093
|
-
const
|
|
45094
|
-
|
|
45095
|
-
|
|
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 */
|
|
45097
|
+
const CustomCard$2 = st.div`
|
|
45098
|
+
visibility: ${({ $isVisible }) => $isVisible ? "visible" : "hidden"};
|
|
45099
|
+
height: calc(100vh - ${({ $substractHeight }) => $substractHeight}px);
|
|
45107
45100
|
|
|
45108
45101
|
* {
|
|
45109
45102
|
scrollbar-width: thin;
|
|
45110
45103
|
}
|
|
45111
|
-
|
|
45112
|
-
> div > div {
|
|
45113
|
-
width: 100% !important;
|
|
45114
|
-
}
|
|
45115
|
-
|
|
45116
|
-
.xterm {
|
|
45117
|
-
width: 100% !important;
|
|
45118
|
-
height: 100% !important; /* optional */
|
|
45119
|
-
}
|
|
45120
45104
|
`;
|
|
45121
|
-
const
|
|
45122
|
-
display:
|
|
45105
|
+
const FullWidthDiv$2 = st.div`
|
|
45106
|
+
display: flex;
|
|
45107
|
+
justify-content: center;
|
|
45108
|
+
width: 100%;
|
|
45109
|
+
height: calc(100vh - ${({ $substractHeight }) => $substractHeight}px);
|
|
45110
|
+
`;
|
|
45111
|
+
const ShutdownContainer$1 = st.div`
|
|
45112
|
+
visibility: ${({ $isVisible }) => $isVisible ? "visible" : "hidden"};
|
|
45123
45113
|
margin-top: -40px;
|
|
45124
45114
|
display: flex;
|
|
45125
45115
|
justify-content: flex-end;
|
|
45126
45116
|
`;
|
|
45127
45117
|
const ProgressContainer = st.div`
|
|
45118
|
+
margin-top: -464px;
|
|
45128
45119
|
height: 464px;
|
|
45129
45120
|
display: flex;
|
|
45130
45121
|
flex-flow: column;
|
|
@@ -45132,14 +45123,14 @@ const ProgressContainer = st.div`
|
|
|
45132
45123
|
align-items: center;
|
|
45133
45124
|
gap: 8px;
|
|
45134
45125
|
`;
|
|
45135
|
-
const Styled$
|
|
45136
|
-
FullWidthDiv,
|
|
45137
|
-
CustomCard,
|
|
45138
|
-
ShutdownContainer,
|
|
45126
|
+
const Styled$5 = {
|
|
45127
|
+
FullWidthDiv: FullWidthDiv$2,
|
|
45128
|
+
CustomCard: CustomCard$2,
|
|
45129
|
+
ShutdownContainer: ShutdownContainer$1,
|
|
45139
45130
|
ProgressContainer
|
|
45140
45131
|
};
|
|
45141
45132
|
|
|
45142
|
-
const XTerminal = ({ endpoint, nodeName, profile }) => {
|
|
45133
|
+
const XTerminal$1 = ({ endpoint, nodeName, profile, substractHeight }) => {
|
|
45143
45134
|
const [isLoading, setIsLoading] = useState(true);
|
|
45144
45135
|
const [error, setError] = useState();
|
|
45145
45136
|
const [isTerminalVisible, setIsTerminalVisible] = useState(false);
|
|
@@ -45147,12 +45138,15 @@ const XTerminal = ({ endpoint, nodeName, profile }) => {
|
|
|
45147
45138
|
const [containerWaitingMessage, setContainerWaitingMessage] = useState();
|
|
45148
45139
|
const [progressPercent, setProgressPercent] = useState(0);
|
|
45149
45140
|
const [isWarmingUp, setIsWarmingUp] = useState(true);
|
|
45150
|
-
const [terminal, setTerminal] = useState();
|
|
45151
45141
|
const socketRef = useRef(null);
|
|
45142
|
+
const [terminal, setTerminal] = useState();
|
|
45143
|
+
const terminalInstance = useRef(null);
|
|
45152
45144
|
const terminalRef = useRef(null);
|
|
45153
|
-
const
|
|
45154
|
-
const fitAddon = new addonFitExports.FitAddon();
|
|
45145
|
+
const fitAddon = useRef(new addonFitExports.FitAddon());
|
|
45155
45146
|
useEffect(() => {
|
|
45147
|
+
if (!terminalRef.current) {
|
|
45148
|
+
return;
|
|
45149
|
+
}
|
|
45156
45150
|
const terminal2 = new xtermExports.Terminal({
|
|
45157
45151
|
cursorBlink: false,
|
|
45158
45152
|
cursorStyle: "block",
|
|
@@ -45160,34 +45154,20 @@ const XTerminal = ({ endpoint, nodeName, profile }) => {
|
|
|
45160
45154
|
fontSize: 16,
|
|
45161
45155
|
theme: themes.MaterialDark
|
|
45162
45156
|
});
|
|
45163
|
-
terminal2.loadAddon(fitAddon);
|
|
45157
|
+
terminal2.loadAddon(fitAddon.current);
|
|
45158
|
+
terminal2.open(terminalRef.current);
|
|
45159
|
+
terminalInstance.current = terminal2;
|
|
45164
45160
|
setTerminal(terminal2);
|
|
45165
|
-
fitAddon.fit();
|
|
45166
|
-
|
|
45167
|
-
|
|
45168
|
-
terminal2.dispose();
|
|
45169
|
-
}
|
|
45161
|
+
fitAddon.current.fit();
|
|
45162
|
+
const handleResize = () => {
|
|
45163
|
+
fitAddon.current.fit();
|
|
45170
45164
|
};
|
|
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
|
-
}
|
|
45165
|
+
window.addEventListener("resize", handleResize);
|
|
45185
45166
|
return () => {
|
|
45186
|
-
|
|
45187
|
-
|
|
45188
|
-
}
|
|
45167
|
+
window.removeEventListener("resize", handleResize);
|
|
45168
|
+
terminal2.dispose();
|
|
45189
45169
|
};
|
|
45190
|
-
}, [
|
|
45170
|
+
}, []);
|
|
45191
45171
|
useEffect(() => {
|
|
45192
45172
|
if (!terminal) {
|
|
45193
45173
|
return;
|
|
@@ -45279,22 +45259,25 @@ const XTerminal = ({ endpoint, nodeName, profile }) => {
|
|
|
45279
45259
|
};
|
|
45280
45260
|
}, [terminal, endpoint, nodeName, profile]);
|
|
45281
45261
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
45282
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
45262
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$5.ShutdownContainer, { $isVisible: isTerminalVisible, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
45283
45263
|
Button,
|
|
45284
45264
|
{
|
|
45285
45265
|
type: "dashed",
|
|
45286
45266
|
disabled: !socketRef.current,
|
|
45287
|
-
onClick: () =>
|
|
45288
|
-
|
|
45289
|
-
|
|
45290
|
-
|
|
45291
|
-
|
|
45267
|
+
onClick: () => {
|
|
45268
|
+
setIsTerminalVisible(false);
|
|
45269
|
+
socketRef.current?.send(
|
|
45270
|
+
JSON.stringify({
|
|
45271
|
+
type: "shutdown"
|
|
45272
|
+
})
|
|
45273
|
+
);
|
|
45274
|
+
},
|
|
45292
45275
|
children: "Terminate"
|
|
45293
45276
|
}
|
|
45294
45277
|
) }),
|
|
45295
45278
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Spacer$1, { $space: 8, $samespace: true }),
|
|
45296
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
45297
|
-
!isTerminalVisible && !error && isWarmingUp && /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$
|
|
45279
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$5.CustomCard, { $isVisible: isTerminalVisible, $substractHeight: substractHeight, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$5.FullWidthDiv, { $substractHeight: substractHeight, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: terminalRef, style: { width: "100%", height: "100%" } }) }) }),
|
|
45280
|
+
!isTerminalVisible && !error && isWarmingUp && /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$5.ProgressContainer, { children: [
|
|
45298
45281
|
isLoading && /* @__PURE__ */ jsxRuntimeExports.jsx(Spin, {}),
|
|
45299
45282
|
!isLoading && /* @__PURE__ */ jsxRuntimeExports.jsx(Progress, { type: "circle", percent: progressPercent }),
|
|
45300
45283
|
warmupMessage && /* @__PURE__ */ jsxRuntimeExports.jsxs(Typography.Text, { children: [
|
|
@@ -45310,16 +45293,16 @@ const XTerminal = ({ endpoint, nodeName, profile }) => {
|
|
|
45310
45293
|
] });
|
|
45311
45294
|
};
|
|
45312
45295
|
|
|
45313
|
-
const CustomSelect = st.div`
|
|
45296
|
+
const CustomSelect$2 = st.div`
|
|
45314
45297
|
.ant-select {
|
|
45315
45298
|
width: 200px;
|
|
45316
45299
|
}
|
|
45317
45300
|
`;
|
|
45318
|
-
const Styled = {
|
|
45319
|
-
CustomSelect
|
|
45301
|
+
const Styled$4 = {
|
|
45302
|
+
CustomSelect: CustomSelect$2
|
|
45320
45303
|
};
|
|
45321
45304
|
|
|
45322
|
-
const NodeTerminal$1 = ({ cluster, nodeName }) => {
|
|
45305
|
+
const NodeTerminal$1 = ({ cluster, nodeName, substractHeight }) => {
|
|
45323
45306
|
const [selectValue, setSelectValue] = useState();
|
|
45324
45307
|
const [currentProfile, setCurrentProfile] = useState();
|
|
45325
45308
|
const [hash, setHash] = useState(0);
|
|
@@ -45327,7 +45310,7 @@ const NodeTerminal$1 = ({ cluster, nodeName }) => {
|
|
|
45327
45310
|
const profiles = ["legacy", "general", "baseline", "netadmin", "restricted", "sysadmin"];
|
|
45328
45311
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
45329
45312
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { gap: 16, children: [
|
|
45330
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled.CustomSelect, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
45313
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$4.CustomSelect, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
45331
45314
|
Select,
|
|
45332
45315
|
{
|
|
45333
45316
|
placeholder: "Select profile",
|
|
@@ -45353,17 +45336,406 @@ const NodeTerminal$1 = ({ cluster, nodeName }) => {
|
|
|
45353
45336
|
] }),
|
|
45354
45337
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Spacer$1, { $space: 8, $samespace: true }),
|
|
45355
45338
|
currentProfile && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
45356
|
-
XTerminal,
|
|
45339
|
+
XTerminal$1,
|
|
45357
45340
|
{
|
|
45358
45341
|
endpoint,
|
|
45359
45342
|
nodeName,
|
|
45360
|
-
profile: currentProfile
|
|
45343
|
+
profile: currentProfile,
|
|
45344
|
+
substractHeight
|
|
45361
45345
|
},
|
|
45362
45346
|
`${cluster}-${nodeName}-${currentProfile}-${hash}`
|
|
45363
45347
|
)
|
|
45364
45348
|
] });
|
|
45365
45349
|
};
|
|
45366
45350
|
|
|
45351
|
+
const FullWidthDiv$1 = st.div`
|
|
45352
|
+
display: flex;
|
|
45353
|
+
justify-content: center;
|
|
45354
|
+
width: 100%;
|
|
45355
|
+
`;
|
|
45356
|
+
const CustomCard$1 = st.div`
|
|
45357
|
+
visibility: ${({ $isVisible }) => $isVisible ? "visible" : "hidden"};
|
|
45358
|
+
max-height: calc(100vh - 158px);
|
|
45359
|
+
|
|
45360
|
+
* {
|
|
45361
|
+
scrollbar-width: thin;
|
|
45362
|
+
}
|
|
45363
|
+
`;
|
|
45364
|
+
const ShutdownContainer = st.div`
|
|
45365
|
+
margin-top: -40px;
|
|
45366
|
+
display: flex;
|
|
45367
|
+
justify-content: flex-end;
|
|
45368
|
+
`;
|
|
45369
|
+
const Styled$3 = {
|
|
45370
|
+
FullWidthDiv: FullWidthDiv$1,
|
|
45371
|
+
CustomCard: CustomCard$1,
|
|
45372
|
+
ShutdownContainer
|
|
45373
|
+
};
|
|
45374
|
+
|
|
45375
|
+
const XTerminal = ({ endpoint, namespace, podName, container }) => {
|
|
45376
|
+
const [isLoading, setIsLoading] = useState(true);
|
|
45377
|
+
const [error, setError] = useState();
|
|
45378
|
+
const [isTerminalVisible, setIsTerminalVisible] = useState(false);
|
|
45379
|
+
const socketRef = useRef(null);
|
|
45380
|
+
const [terminal, setTerminal] = useState();
|
|
45381
|
+
const terminalInstance = useRef(null);
|
|
45382
|
+
const terminalRef = useRef(null);
|
|
45383
|
+
const fitAddon = useRef(new addonFitExports.FitAddon());
|
|
45384
|
+
useEffect(() => {
|
|
45385
|
+
if (!terminalRef.current) {
|
|
45386
|
+
return;
|
|
45387
|
+
}
|
|
45388
|
+
const terminal2 = new xtermExports.Terminal({
|
|
45389
|
+
cursorBlink: false,
|
|
45390
|
+
cursorStyle: "block",
|
|
45391
|
+
fontFamily: "monospace",
|
|
45392
|
+
fontSize: 16,
|
|
45393
|
+
theme: themes.MaterialDark,
|
|
45394
|
+
convertEol: true
|
|
45395
|
+
});
|
|
45396
|
+
terminal2.loadAddon(fitAddon.current);
|
|
45397
|
+
terminal2.open(terminalRef.current);
|
|
45398
|
+
terminalInstance.current = terminal2;
|
|
45399
|
+
setTerminal(terminal2);
|
|
45400
|
+
fitAddon.current.fit();
|
|
45401
|
+
const handleResize = () => {
|
|
45402
|
+
fitAddon.current.fit();
|
|
45403
|
+
};
|
|
45404
|
+
window.addEventListener("resize", handleResize);
|
|
45405
|
+
return () => {
|
|
45406
|
+
window.removeEventListener("resize", handleResize);
|
|
45407
|
+
terminal2.dispose();
|
|
45408
|
+
};
|
|
45409
|
+
}, []);
|
|
45410
|
+
useEffect(() => {
|
|
45411
|
+
if (!terminal) {
|
|
45412
|
+
return;
|
|
45413
|
+
}
|
|
45414
|
+
const socket = new WebSocket(endpoint);
|
|
45415
|
+
socketRef.current = socket;
|
|
45416
|
+
socket.onopen = () => {
|
|
45417
|
+
socket.send(
|
|
45418
|
+
JSON.stringify({
|
|
45419
|
+
type: "init",
|
|
45420
|
+
payload: { namespace, podName, container }
|
|
45421
|
+
})
|
|
45422
|
+
);
|
|
45423
|
+
console.log(`[${namespace}/${podName}]: WebSocket Client Connected`);
|
|
45424
|
+
setIsLoading(false);
|
|
45425
|
+
};
|
|
45426
|
+
socket.onmessage = (event) => {
|
|
45427
|
+
const data = JSON.parse(event.data);
|
|
45428
|
+
if (data.type === "ready") {
|
|
45429
|
+
setIsTerminalVisible(true);
|
|
45430
|
+
}
|
|
45431
|
+
if (data.type === "output") {
|
|
45432
|
+
if (data.payload) {
|
|
45433
|
+
terminal.write(data.payload);
|
|
45434
|
+
}
|
|
45435
|
+
}
|
|
45436
|
+
};
|
|
45437
|
+
socket.onclose = () => {
|
|
45438
|
+
console.log(`[${namespace}/${podName}]: WebSocket Client Closed`);
|
|
45439
|
+
};
|
|
45440
|
+
socket.onerror = (error2) => {
|
|
45441
|
+
console.error("WebSocket Error:", error2);
|
|
45442
|
+
setError(error2);
|
|
45443
|
+
};
|
|
45444
|
+
return () => {
|
|
45445
|
+
terminal.dispose();
|
|
45446
|
+
if (socket.readyState === WebSocket.OPEN) {
|
|
45447
|
+
socket.close();
|
|
45448
|
+
}
|
|
45449
|
+
};
|
|
45450
|
+
}, [terminal, endpoint, namespace, podName, container]);
|
|
45451
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
45452
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$3.ShutdownContainer, { $isVisible: isTerminalVisible, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
45453
|
+
Button,
|
|
45454
|
+
{
|
|
45455
|
+
type: "dashed",
|
|
45456
|
+
disabled: !socketRef.current,
|
|
45457
|
+
onClick: () => {
|
|
45458
|
+
setIsTerminalVisible(false);
|
|
45459
|
+
socketRef.current?.send(
|
|
45460
|
+
JSON.stringify({
|
|
45461
|
+
type: "close"
|
|
45462
|
+
})
|
|
45463
|
+
);
|
|
45464
|
+
},
|
|
45465
|
+
children: "Terminate"
|
|
45466
|
+
}
|
|
45467
|
+
) }),
|
|
45468
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Spacer$1, { $space: 8, $samespace: true }),
|
|
45469
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$3.CustomCard, { $isVisible: isTerminalVisible, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$3.FullWidthDiv, { children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: terminalRef, style: { width: "100%", height: "100%" } }) }) }),
|
|
45470
|
+
isLoading && !error && /* @__PURE__ */ jsxRuntimeExports.jsx(Spin, {}),
|
|
45471
|
+
error && /* @__PURE__ */ jsxRuntimeExports.jsx(Result, { status: "error", title: "Error", subTitle: JSON.stringify(error) })
|
|
45472
|
+
] });
|
|
45473
|
+
};
|
|
45474
|
+
|
|
45475
|
+
const CustomSelect$1 = st.div`
|
|
45476
|
+
.ant-select {
|
|
45477
|
+
width: 200px;
|
|
45478
|
+
}
|
|
45479
|
+
`;
|
|
45480
|
+
const Styled$2 = {
|
|
45481
|
+
CustomSelect: CustomSelect$1
|
|
45482
|
+
};
|
|
45483
|
+
|
|
45484
|
+
const PodLogs$1 = ({ cluster, namespace, podName, containers }) => {
|
|
45485
|
+
const [selectValue, setSelectValue] = useState(containers[0] || void 0);
|
|
45486
|
+
const [currentContainer, setCurrentContainer] = useState();
|
|
45487
|
+
const [hash, setHash] = useState(0);
|
|
45488
|
+
const endpoint = `/api/clusters/${cluster}/openapi-bff-ws/terminal/podLogs/podLogs`;
|
|
45489
|
+
if (containers.length === 0) {
|
|
45490
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: "No Running Containers" });
|
|
45491
|
+
}
|
|
45492
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
45493
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { gap: 16, children: [
|
|
45494
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$2.CustomSelect, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
45495
|
+
Select,
|
|
45496
|
+
{
|
|
45497
|
+
placeholder: "Select container",
|
|
45498
|
+
options: containers.map((container) => ({ value: container, label: container })),
|
|
45499
|
+
filterOption: filterSelectOptions,
|
|
45500
|
+
disabled: containers.length === 0,
|
|
45501
|
+
showSearch: true,
|
|
45502
|
+
value: selectValue,
|
|
45503
|
+
onChange: (value) => {
|
|
45504
|
+
setHash(hash + 1);
|
|
45505
|
+
setSelectValue(value);
|
|
45506
|
+
}
|
|
45507
|
+
}
|
|
45508
|
+
) }),
|
|
45509
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
45510
|
+
Button,
|
|
45511
|
+
{
|
|
45512
|
+
type: "primary",
|
|
45513
|
+
onClick: () => {
|
|
45514
|
+
setCurrentContainer(selectValue);
|
|
45515
|
+
setHash(hash + 1);
|
|
45516
|
+
},
|
|
45517
|
+
disabled: !selectValue,
|
|
45518
|
+
children: "Open"
|
|
45519
|
+
}
|
|
45520
|
+
)
|
|
45521
|
+
] }),
|
|
45522
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Spacer$1, { $space: 8, $samespace: true }),
|
|
45523
|
+
currentContainer && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
45524
|
+
XTerminal,
|
|
45525
|
+
{
|
|
45526
|
+
endpoint,
|
|
45527
|
+
namespace,
|
|
45528
|
+
podName,
|
|
45529
|
+
container: currentContainer
|
|
45530
|
+
},
|
|
45531
|
+
`${cluster}-${namespace}-${podName}-${currentContainer}-${hash}`
|
|
45532
|
+
)
|
|
45533
|
+
] });
|
|
45534
|
+
};
|
|
45535
|
+
|
|
45536
|
+
const FullWidthDiv = st.div`
|
|
45537
|
+
display: flex;
|
|
45538
|
+
justify-content: center;
|
|
45539
|
+
width: 100%;
|
|
45540
|
+
`;
|
|
45541
|
+
const CustomCard = st.div`
|
|
45542
|
+
visibility: ${({ $isVisible }) => $isVisible ? "visible" : "hidden"};
|
|
45543
|
+
max-height: calc(100vh - 158px);
|
|
45544
|
+
|
|
45545
|
+
* {
|
|
45546
|
+
scrollbar-width: thin;
|
|
45547
|
+
}
|
|
45548
|
+
`;
|
|
45549
|
+
const RightAboveContainer = st.div`
|
|
45550
|
+
margin-top: -40px;
|
|
45551
|
+
display: flex;
|
|
45552
|
+
justify-content: flex-end;
|
|
45553
|
+
`;
|
|
45554
|
+
const Styled$1 = {
|
|
45555
|
+
FullWidthDiv,
|
|
45556
|
+
CustomCard,
|
|
45557
|
+
RightAboveContainer
|
|
45558
|
+
};
|
|
45559
|
+
|
|
45560
|
+
const MonacoEditor = ({
|
|
45561
|
+
endpoint,
|
|
45562
|
+
namespace,
|
|
45563
|
+
podName,
|
|
45564
|
+
container,
|
|
45565
|
+
theme,
|
|
45566
|
+
substractHeight
|
|
45567
|
+
}) => {
|
|
45568
|
+
const [isLoading, setIsLoading] = useState(true);
|
|
45569
|
+
const [error, setError] = useState();
|
|
45570
|
+
const [isTerminalVisible, setIsTerminalVisible] = useState(false);
|
|
45571
|
+
const [isPaused, setIsPaused] = useState(false);
|
|
45572
|
+
const socketRef = useRef(null);
|
|
45573
|
+
const editorRef = useRef(null);
|
|
45574
|
+
const handleEditorDidMount = (editor) => {
|
|
45575
|
+
editorRef.current = editor;
|
|
45576
|
+
};
|
|
45577
|
+
const appendContent = (newContent) => {
|
|
45578
|
+
if (editorRef.current) {
|
|
45579
|
+
const currentContent = editorRef.current.getValue();
|
|
45580
|
+
editorRef.current.setValue(currentContent + newContent);
|
|
45581
|
+
const model = editorRef.current.getModel();
|
|
45582
|
+
if (model) {
|
|
45583
|
+
const lineCount = model.getLineCount();
|
|
45584
|
+
editorRef.current.revealLine(lineCount);
|
|
45585
|
+
}
|
|
45586
|
+
}
|
|
45587
|
+
};
|
|
45588
|
+
useEffect(() => {
|
|
45589
|
+
const socket = new WebSocket(endpoint);
|
|
45590
|
+
socketRef.current = socket;
|
|
45591
|
+
socket.onopen = () => {
|
|
45592
|
+
socket.send(
|
|
45593
|
+
JSON.stringify({
|
|
45594
|
+
type: "init",
|
|
45595
|
+
payload: { namespace, podName, container }
|
|
45596
|
+
})
|
|
45597
|
+
);
|
|
45598
|
+
console.log(`[${namespace}/${podName}]: WebSocket Client Connected`);
|
|
45599
|
+
setIsLoading(false);
|
|
45600
|
+
};
|
|
45601
|
+
socket.onmessage = (event) => {
|
|
45602
|
+
const data = JSON.parse(event.data);
|
|
45603
|
+
if (data.type === "ready") {
|
|
45604
|
+
setIsTerminalVisible(true);
|
|
45605
|
+
}
|
|
45606
|
+
if (data.type === "output") {
|
|
45607
|
+
if (data.payload) {
|
|
45608
|
+
appendContent(data.payload);
|
|
45609
|
+
}
|
|
45610
|
+
}
|
|
45611
|
+
};
|
|
45612
|
+
socket.onclose = () => {
|
|
45613
|
+
console.log(`[${namespace}/${podName}]: WebSocket Client Closed`);
|
|
45614
|
+
};
|
|
45615
|
+
socket.onerror = (error2) => {
|
|
45616
|
+
console.error("WebSocket Error:", error2);
|
|
45617
|
+
setError(error2);
|
|
45618
|
+
};
|
|
45619
|
+
return () => {
|
|
45620
|
+
if (socket.readyState === WebSocket.OPEN) {
|
|
45621
|
+
socket.close();
|
|
45622
|
+
}
|
|
45623
|
+
};
|
|
45624
|
+
}, [endpoint, namespace, podName, container]);
|
|
45625
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
45626
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$1.RightAboveContainer, { $isVisible: isTerminalVisible, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
45627
|
+
Button,
|
|
45628
|
+
{
|
|
45629
|
+
onClick: () => {
|
|
45630
|
+
if (isPaused) {
|
|
45631
|
+
setIsPaused(false);
|
|
45632
|
+
socketRef.current?.send(
|
|
45633
|
+
JSON.stringify({
|
|
45634
|
+
type: "continue"
|
|
45635
|
+
})
|
|
45636
|
+
);
|
|
45637
|
+
} else {
|
|
45638
|
+
setIsPaused(true);
|
|
45639
|
+
socketRef.current?.send(
|
|
45640
|
+
JSON.stringify({
|
|
45641
|
+
type: "stop"
|
|
45642
|
+
})
|
|
45643
|
+
);
|
|
45644
|
+
}
|
|
45645
|
+
},
|
|
45646
|
+
children: isPaused ? "Continue" : "Stop"
|
|
45647
|
+
}
|
|
45648
|
+
) }),
|
|
45649
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Spacer$1, { $space: 8, $samespace: true }),
|
|
45650
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$1.CustomCard, { $isVisible: isTerminalVisible, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$1.FullWidthDiv, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
45651
|
+
Ft,
|
|
45652
|
+
{
|
|
45653
|
+
defaultLanguage: "yaml",
|
|
45654
|
+
width: "100%",
|
|
45655
|
+
height: `calc(100vh - ${substractHeight}px`,
|
|
45656
|
+
theme: theme === "dark" ? "vs-dark" : theme === void 0 ? "vs-dark" : "vs",
|
|
45657
|
+
options: {
|
|
45658
|
+
theme: theme === "dark" ? "vs-dark" : theme === void 0 ? "vs-dark" : "vs",
|
|
45659
|
+
readOnly: true
|
|
45660
|
+
},
|
|
45661
|
+
onMount: handleEditorDidMount
|
|
45662
|
+
}
|
|
45663
|
+
) }) }),
|
|
45664
|
+
isLoading && !error && /* @__PURE__ */ jsxRuntimeExports.jsx(Spin, {}),
|
|
45665
|
+
error && /* @__PURE__ */ jsxRuntimeExports.jsx(Result, { status: "error", title: "Error", subTitle: JSON.stringify(error) })
|
|
45666
|
+
] });
|
|
45667
|
+
};
|
|
45668
|
+
|
|
45669
|
+
const CustomSelect = st.div`
|
|
45670
|
+
.ant-select {
|
|
45671
|
+
width: 200px;
|
|
45672
|
+
}
|
|
45673
|
+
`;
|
|
45674
|
+
const Styled = {
|
|
45675
|
+
CustomSelect
|
|
45676
|
+
};
|
|
45677
|
+
|
|
45678
|
+
const PodLogsMonaco = ({
|
|
45679
|
+
cluster,
|
|
45680
|
+
namespace,
|
|
45681
|
+
podName,
|
|
45682
|
+
containers,
|
|
45683
|
+
theme,
|
|
45684
|
+
substractHeight
|
|
45685
|
+
}) => {
|
|
45686
|
+
const [selectValue, setSelectValue] = useState(containers[0] || void 0);
|
|
45687
|
+
const [currentContainer, setCurrentContainer] = useState();
|
|
45688
|
+
const [hash, setHash] = useState(0);
|
|
45689
|
+
const endpoint = `/api/clusters/${cluster}/openapi-bff-ws/terminal/podLogs/podLogs`;
|
|
45690
|
+
if (containers.length === 0) {
|
|
45691
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: "No Running Containers" });
|
|
45692
|
+
}
|
|
45693
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
45694
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { gap: 16, children: [
|
|
45695
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled.CustomSelect, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
45696
|
+
Select,
|
|
45697
|
+
{
|
|
45698
|
+
placeholder: "Select container",
|
|
45699
|
+
options: containers.map((container) => ({ value: container, label: container })),
|
|
45700
|
+
filterOption: filterSelectOptions,
|
|
45701
|
+
disabled: containers.length === 0,
|
|
45702
|
+
showSearch: true,
|
|
45703
|
+
value: selectValue,
|
|
45704
|
+
onChange: (value) => {
|
|
45705
|
+
setHash(hash + 1);
|
|
45706
|
+
setSelectValue(value);
|
|
45707
|
+
}
|
|
45708
|
+
}
|
|
45709
|
+
) }),
|
|
45710
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
45711
|
+
Button,
|
|
45712
|
+
{
|
|
45713
|
+
type: "primary",
|
|
45714
|
+
onClick: () => {
|
|
45715
|
+
setCurrentContainer(selectValue);
|
|
45716
|
+
setHash(hash + 1);
|
|
45717
|
+
},
|
|
45718
|
+
disabled: !selectValue,
|
|
45719
|
+
children: "Open"
|
|
45720
|
+
}
|
|
45721
|
+
)
|
|
45722
|
+
] }),
|
|
45723
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Spacer$1, { $space: 8, $samespace: true }),
|
|
45724
|
+
currentContainer && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
45725
|
+
MonacoEditor,
|
|
45726
|
+
{
|
|
45727
|
+
endpoint,
|
|
45728
|
+
namespace,
|
|
45729
|
+
podName,
|
|
45730
|
+
container: currentContainer,
|
|
45731
|
+
theme,
|
|
45732
|
+
substractHeight
|
|
45733
|
+
},
|
|
45734
|
+
`${cluster}-${namespace}-${podName}-${currentContainer}-${hash}`
|
|
45735
|
+
)
|
|
45736
|
+
] });
|
|
45737
|
+
};
|
|
45738
|
+
|
|
45367
45739
|
const DynamicRendererInner = ({
|
|
45368
45740
|
items,
|
|
45369
45741
|
components
|
|
@@ -45738,7 +46110,7 @@ const useTheme = () => {
|
|
|
45738
46110
|
return useContext(ThemeContext);
|
|
45739
46111
|
};
|
|
45740
46112
|
|
|
45741
|
-
const parseMutliqueryText$
|
|
46113
|
+
const parseMutliqueryText$3 = ({ text, multiQueryData }) => {
|
|
45742
46114
|
if (!text) return "";
|
|
45743
46115
|
return text.replace(/\{reqs\[(\d+)\]\[((?:\s*['"][^'"]+['"]\s*,?)+)\]\}/g, (match, reqIndexStr, rawPath) => {
|
|
45744
46116
|
try {
|
|
@@ -45792,14 +46164,14 @@ const EnrichedTable = ({
|
|
|
45792
46164
|
replaceValues
|
|
45793
46165
|
});
|
|
45794
46166
|
const fetchUrlPrepared = prepareTemplate({
|
|
45795
|
-
template: parseMutliqueryText$
|
|
46167
|
+
template: parseMutliqueryText$3({ text: fetchUrl, multiQueryData }),
|
|
45796
46168
|
replaceValues
|
|
45797
46169
|
});
|
|
45798
46170
|
let labelsSuffix;
|
|
45799
46171
|
if (labelsSelector) {
|
|
45800
46172
|
const parsedObject = Object.fromEntries(
|
|
45801
46173
|
Object.entries(labelsSelector).map(
|
|
45802
|
-
([key, value]) => [key, prepareTemplate({ template: parseMutliqueryText$
|
|
46174
|
+
([key, value]) => [key, prepareTemplate({ template: parseMutliqueryText$3({ text: value, multiQueryData }), replaceValues })]
|
|
45803
46175
|
)
|
|
45804
46176
|
);
|
|
45805
46177
|
const serializedLabels = serializeLabels(parsedObject);
|
|
@@ -45812,7 +46184,7 @@ const EnrichedTable = ({
|
|
|
45812
46184
|
}
|
|
45813
46185
|
let fieldSelectorSuffix;
|
|
45814
46186
|
if (fieldSelector) {
|
|
45815
|
-
const preparedFieldSelectorValueText = parseMutliqueryText$
|
|
46187
|
+
const preparedFieldSelectorValueText = parseMutliqueryText$3({ text: fieldSelector?.parsedText, multiQueryData });
|
|
45816
46188
|
const preparedFieldSelectorValueTextWithPartsOfUrl = prepareTemplate({
|
|
45817
46189
|
template: preparedFieldSelectorValueText,
|
|
45818
46190
|
replaceValues
|
|
@@ -45875,7 +46247,7 @@ const EnrichedTable = ({
|
|
|
45875
46247
|
] });
|
|
45876
46248
|
};
|
|
45877
46249
|
|
|
45878
|
-
const parseMutliqueryText$
|
|
46250
|
+
const parseMutliqueryText$2 = ({ text, multiQueryData }) => {
|
|
45879
46251
|
if (!text) return "";
|
|
45880
46252
|
return text.replace(/\{reqs\[(\d+)\]\[((?:\s*['"][^'"]+['"]\s*,?)+)\]\}/g, (match, reqIndexStr, rawPath) => {
|
|
45881
46253
|
try {
|
|
@@ -45890,7 +46262,7 @@ const parseMutliqueryText$1 = ({ text, multiQueryData }) => {
|
|
|
45890
46262
|
}
|
|
45891
46263
|
});
|
|
45892
46264
|
};
|
|
45893
|
-
const getRunningContainerNames = (pod) => (pod.status?.containerStatuses ?? []).filter((st) => Boolean(st.state?.running)).map((st) => st.name);
|
|
46265
|
+
const getRunningContainerNames$1 = (pod) => (pod.status?.containerStatuses ?? []).filter((st) => Boolean(st.state?.running)).map((st) => st.name);
|
|
45894
46266
|
|
|
45895
46267
|
const PodTerminal = ({
|
|
45896
46268
|
data,
|
|
@@ -45904,6 +46276,7 @@ const PodTerminal = ({
|
|
|
45904
46276
|
cluster,
|
|
45905
46277
|
namespace,
|
|
45906
46278
|
podName,
|
|
46279
|
+
substractHeight,
|
|
45907
46280
|
...props
|
|
45908
46281
|
} = data;
|
|
45909
46282
|
const partsOfUrl = usePartsOfUrl();
|
|
@@ -45912,15 +46285,15 @@ const PodTerminal = ({
|
|
|
45912
46285
|
return acc;
|
|
45913
46286
|
}, {});
|
|
45914
46287
|
const clusterPrepared = prepareTemplate({
|
|
45915
|
-
template: parseMutliqueryText$
|
|
46288
|
+
template: parseMutliqueryText$2({ text: cluster, multiQueryData }),
|
|
45916
46289
|
replaceValues
|
|
45917
46290
|
});
|
|
45918
46291
|
const namespacePrepared = prepareTemplate({
|
|
45919
|
-
template: parseMutliqueryText$
|
|
46292
|
+
template: parseMutliqueryText$2({ text: namespace, multiQueryData }),
|
|
45920
46293
|
replaceValues
|
|
45921
46294
|
});
|
|
45922
46295
|
const podNamePrepared = prepareTemplate({
|
|
45923
|
-
template: parseMutliqueryText$
|
|
46296
|
+
template: parseMutliqueryText$2({ text: podName, multiQueryData }),
|
|
45924
46297
|
replaceValues
|
|
45925
46298
|
});
|
|
45926
46299
|
const {
|
|
@@ -45948,7 +46321,7 @@ const PodTerminal = ({
|
|
|
45948
46321
|
if (!podInfo) {
|
|
45949
46322
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: "No Pod Info" });
|
|
45950
46323
|
}
|
|
45951
|
-
const containers = getRunningContainerNames(podInfo);
|
|
46324
|
+
const containers = getRunningContainerNames$1(podInfo);
|
|
45952
46325
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
45953
46326
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
45954
46327
|
PodTerminal$1,
|
|
@@ -45957,6 +46330,7 @@ const PodTerminal = ({
|
|
|
45957
46330
|
namespace: namespacePrepared,
|
|
45958
46331
|
podName: podNamePrepared,
|
|
45959
46332
|
containers,
|
|
46333
|
+
substractHeight: substractHeight || 332,
|
|
45960
46334
|
...props
|
|
45961
46335
|
}
|
|
45962
46336
|
),
|
|
@@ -45964,7 +46338,7 @@ const PodTerminal = ({
|
|
|
45964
46338
|
] });
|
|
45965
46339
|
};
|
|
45966
46340
|
|
|
45967
|
-
const parseMutliqueryText = ({ text, multiQueryData }) => {
|
|
46341
|
+
const parseMutliqueryText$1 = ({ text, multiQueryData }) => {
|
|
45968
46342
|
if (!text) return "";
|
|
45969
46343
|
return text.replace(/\{reqs\[(\d+)\]\[((?:\s*['"][^'"]+['"]\s*,?)+)\]\}/g, (match, reqIndexStr, rawPath) => {
|
|
45970
46344
|
try {
|
|
@@ -45991,6 +46365,7 @@ const NodeTerminal = ({
|
|
|
45991
46365
|
id,
|
|
45992
46366
|
cluster,
|
|
45993
46367
|
nodeName,
|
|
46368
|
+
substractHeight,
|
|
45994
46369
|
...props
|
|
45995
46370
|
} = data;
|
|
45996
46371
|
const partsOfUrl = usePartsOfUrl();
|
|
@@ -45999,18 +46374,119 @@ const NodeTerminal = ({
|
|
|
45999
46374
|
return acc;
|
|
46000
46375
|
}, {});
|
|
46001
46376
|
const clusterPrepared = prepareTemplate({
|
|
46002
|
-
template: parseMutliqueryText({ text: cluster, multiQueryData }),
|
|
46377
|
+
template: parseMutliqueryText$1({ text: cluster, multiQueryData }),
|
|
46003
46378
|
replaceValues
|
|
46004
46379
|
});
|
|
46005
46380
|
const nodeNamePrepared = prepareTemplate({
|
|
46006
|
-
template: parseMutliqueryText({ text: nodeName, multiQueryData }),
|
|
46381
|
+
template: parseMutliqueryText$1({ text: nodeName, multiQueryData }),
|
|
46382
|
+
replaceValues
|
|
46383
|
+
});
|
|
46384
|
+
if (isMultiqueryLoading) {
|
|
46385
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading multiquery" });
|
|
46386
|
+
}
|
|
46387
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
46388
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
46389
|
+
NodeTerminal$1,
|
|
46390
|
+
{
|
|
46391
|
+
cluster: clusterPrepared,
|
|
46392
|
+
nodeName: nodeNamePrepared,
|
|
46393
|
+
substractHeight: substractHeight || 332,
|
|
46394
|
+
...props
|
|
46395
|
+
}
|
|
46396
|
+
),
|
|
46397
|
+
children
|
|
46398
|
+
] });
|
|
46399
|
+
};
|
|
46400
|
+
|
|
46401
|
+
const parseMutliqueryText = ({ text, multiQueryData }) => {
|
|
46402
|
+
if (!text) return "";
|
|
46403
|
+
return text.replace(/\{reqs\[(\d+)\]\[((?:\s*['"][^'"]+['"]\s*,?)+)\]\}/g, (match, reqIndexStr, rawPath) => {
|
|
46404
|
+
try {
|
|
46405
|
+
const reqIndex = parseInt(reqIndexStr, 10);
|
|
46406
|
+
const path = Array.from(rawPath.matchAll(/['"]([^'"]+)['"]/g)).map(
|
|
46407
|
+
(m) => m[1]
|
|
46408
|
+
);
|
|
46409
|
+
const value = _$1.get(multiQueryData[`req${reqIndex}`], path);
|
|
46410
|
+
return value != null ? String(value) : "";
|
|
46411
|
+
} catch {
|
|
46412
|
+
return match;
|
|
46413
|
+
}
|
|
46414
|
+
});
|
|
46415
|
+
};
|
|
46416
|
+
const getRunningContainerNames = (pod) => (pod.status?.containerStatuses ?? []).filter((st) => Boolean(st.state?.running)).map((st) => st.name);
|
|
46417
|
+
|
|
46418
|
+
const PodLogs = ({
|
|
46419
|
+
data,
|
|
46420
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
46421
|
+
children
|
|
46422
|
+
}) => {
|
|
46423
|
+
const { data: multiQueryData, isLoading: isMultiqueryLoading } = useMultiQuery();
|
|
46424
|
+
const theme = useTheme();
|
|
46425
|
+
const {
|
|
46426
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
46427
|
+
id,
|
|
46428
|
+
cluster,
|
|
46429
|
+
namespace,
|
|
46430
|
+
podName,
|
|
46431
|
+
substractHeight,
|
|
46432
|
+
...props
|
|
46433
|
+
} = data;
|
|
46434
|
+
const partsOfUrl = usePartsOfUrl();
|
|
46435
|
+
const replaceValues = partsOfUrl.partsOfUrl.reduce((acc, value, index) => {
|
|
46436
|
+
acc[index.toString()] = value;
|
|
46437
|
+
return acc;
|
|
46438
|
+
}, {});
|
|
46439
|
+
const clusterPrepared = prepareTemplate({
|
|
46440
|
+
template: parseMutliqueryText({ text: cluster, multiQueryData }),
|
|
46441
|
+
replaceValues
|
|
46442
|
+
});
|
|
46443
|
+
const namespacePrepared = prepareTemplate({
|
|
46444
|
+
template: parseMutliqueryText({ text: namespace, multiQueryData }),
|
|
46445
|
+
replaceValues
|
|
46446
|
+
});
|
|
46447
|
+
const podNamePrepared = prepareTemplate({
|
|
46448
|
+
template: parseMutliqueryText({ text: podName, multiQueryData }),
|
|
46007
46449
|
replaceValues
|
|
46008
46450
|
});
|
|
46451
|
+
const {
|
|
46452
|
+
data: podInfo,
|
|
46453
|
+
isError: isPodInfoError,
|
|
46454
|
+
isLoading: isLoadingPodInfo
|
|
46455
|
+
} = useDirectUnknownResource({
|
|
46456
|
+
uri: `/api/clusters/${clusterPrepared}/k8s/api/v1/namespaces/${namespacePrepared}/pods/${podNamePrepared}`,
|
|
46457
|
+
refetchInterval: 5e3,
|
|
46458
|
+
queryKey: [clusterPrepared || "no-cluster", "pods", podNamePrepared],
|
|
46459
|
+
isEnabled: clusterPrepared !== void 0 && namespacePrepared !== void 0 && podNamePrepared !== void 0
|
|
46460
|
+
});
|
|
46009
46461
|
if (isMultiqueryLoading) {
|
|
46010
46462
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading multiquery" });
|
|
46011
46463
|
}
|
|
46464
|
+
if (isLoadingPodInfo) {
|
|
46465
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Flex, { justify: "center", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Spin, {}) });
|
|
46466
|
+
}
|
|
46467
|
+
if (isPodInfoError) {
|
|
46468
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
46469
|
+
"Error: ",
|
|
46470
|
+
JSON.stringify(isPodInfoError)
|
|
46471
|
+
] });
|
|
46472
|
+
}
|
|
46473
|
+
if (!podInfo) {
|
|
46474
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: "No Pod Info" });
|
|
46475
|
+
}
|
|
46476
|
+
const containers = getRunningContainerNames(podInfo);
|
|
46012
46477
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
46013
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
46478
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
46479
|
+
PodLogsMonaco,
|
|
46480
|
+
{
|
|
46481
|
+
cluster: clusterPrepared,
|
|
46482
|
+
namespace: namespacePrepared,
|
|
46483
|
+
podName: podNamePrepared,
|
|
46484
|
+
containers,
|
|
46485
|
+
theme,
|
|
46486
|
+
substractHeight: substractHeight || 332,
|
|
46487
|
+
...props
|
|
46488
|
+
}
|
|
46489
|
+
),
|
|
46014
46490
|
children
|
|
46015
46491
|
] });
|
|
46016
46492
|
};
|
|
@@ -46035,7 +46511,8 @@ const DynamicComponents = {
|
|
|
46035
46511
|
SidebarProvider,
|
|
46036
46512
|
EnrichedTable,
|
|
46037
46513
|
PodTerminal,
|
|
46038
|
-
NodeTerminal
|
|
46514
|
+
NodeTerminal,
|
|
46515
|
+
PodLogs
|
|
46039
46516
|
};
|
|
46040
46517
|
|
|
46041
46518
|
const prepareUrlsToFetchForDynamicRenderer = ({
|
|
@@ -46537,5 +47014,5 @@ const useCrdData = ({
|
|
|
46537
47014
|
});
|
|
46538
47015
|
};
|
|
46539
47016
|
|
|
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 };
|
|
47017
|
+
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, PodLogs$1 as PodLogs, PodLogsMonaco, 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 };
|
|
46541
47018
|
//# sourceMappingURL=openapi-k8s-toolkit.es.js.map
|