@prorobotech/openapi-k8s-toolkit 1.2.0-alpha.11 → 1.2.0-alpha.13
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 +794 -133
- package/dist/openapi-k8s-toolkit.es.js.map +1 -1
- package/dist/openapi-k8s-toolkit.umd.js +795 -134
- package/dist/openapi-k8s-toolkit.umd.js.map +1 -1
- package/dist/types/components/atoms/ContentCard/ContentCard.styled.d.ts +2 -0
- package/dist/types/components/molecules/BlackholeForm/atoms/HiddenContainer/utils.test.d.ts +1 -0
- package/dist/types/components/molecules/BlackholeForm/molecules/FormListInput/utils.test.d.ts +1 -0
- package/dist/types/components/molecules/BlackholeForm/molecules/FormRangeInput/utils.test.d.ts +1 -0
- package/dist/types/components/molecules/BlackholeForm/molecules/FormStringMultilineInput/helpers.test.d.ts +1 -0
- package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/BlackholeForm.test.d.ts +1 -0
- package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/context.test.d.ts +1 -0
- package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/helpers/casts.test.d.ts +1 -0
- package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/helpers/getSortedPropertyKeys.test.d.ts +1 -0
- package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/helpers/hiddenExpanded.test.d.ts +1 -0
- package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/helpers/prefills.test.d.ts +1 -0
- package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/utils.test.d.ts +1 -0
- package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/utilsErrorHandler.test.d.ts +1 -0
- package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeFormProvider/BlackholeFormProvider.test.d.ts +2 -0
- package/dist/types/components/molecules/EnrichedTable/organisms/EnrichedTable/utils.test.d.ts +8 -0
- package/dist/types/components/molecules/EnrichedTable/organisms/EnrichedTableProvider/utils.test.d.ts +1 -0
- package/dist/types/components/molecules/Events/molecules/EventRow/utils.test.d.ts +1 -0
- package/dist/types/components/molecules/Events/reducer.test.d.ts +1 -0
- package/dist/types/components/molecules/Events/utils.test.d.ts +1 -0
- package/dist/types/components/molecules/ManageableBreadcrumbs/organisms/ManageableBreadcrumbsProvider/utils.test.d.ts +1 -0
- package/dist/types/components/molecules/ManageableSidebar/organisms/ManageableSidebarProvider/utils.test.d.ts +1 -0
- package/dist/types/components/molecules/MarketPlace/molecules/MarketplaceCard/utils.test.d.ts +1 -0
- package/dist/types/components/molecules/Terminals/VMVNC/VMVNC.d.ts +9 -0
- package/dist/types/components/molecules/Terminals/VMVNC/hooks/useVNCClient.d.ts +29 -0
- package/dist/types/components/molecules/Terminals/VMVNC/hooks/useVNCClient.test.d.ts +1 -0
- package/dist/types/components/molecules/Terminals/VMVNC/index.d.ts +2 -0
- package/dist/types/components/molecules/Terminals/VMVNC/molecules/VMVNCToolbar/VMVNCToolbar.d.ts +17 -0
- package/dist/types/components/molecules/Terminals/VMVNC/molecules/VMVNCToolbar/index.d.ts +1 -0
- package/dist/types/components/molecules/Terminals/VMVNC/molecules/VMVNCToolbar/styled.d.ts +1364 -0
- package/dist/types/components/molecules/Terminals/VMVNC/molecules/index.d.ts +1 -0
- package/dist/types/components/molecules/Terminals/VMVNC/styled.d.ts +834 -0
- package/dist/types/components/molecules/Terminals/index.d.ts +2 -0
- package/dist/types/components/molecules/index.d.ts +2 -2
- package/dist/types/components/organisms/DynamicComponents/molecules/Annotations/utils.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/ArrayOfObjectsToKeyValues/utils.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/EnrichedTable/utils.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/Events/utils.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/ItemCounter/utils.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/KeyCounter/utils.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/Labels/utils.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/LabelsToSearchParams/utils.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/OwnerRefs/guard.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/OwnerRefs/organsisms/RefsList/molecules/RefElement/utils.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/ParsedText/utils.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PodLogs/utils.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PodTerminal/utils.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/hooks/usePrometheusQueryRange.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/hooks/usePrometheusQueryRangeMulti.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/prometheusAdapter.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/StatusText/utils.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/Taints/utils.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/Tolerations/utils.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/VMVNC/VMVNC.d.ts +6 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/VMVNC/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/YamlEditorSingleton/utils.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/types.d.ts +8 -0
- package/dist/types/components/organisms/DynamicRenderer/DynamicRenderer.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicRendererWithProviders/DynamicRendererWithProviders.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicRendererWithProviders/providers/factoryConfigProvider/factoryConfigProvider.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicRendererWithProviders/providers/factoryConfigProvider/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicRendererWithProviders/{hybridDataProvider.d.ts → providers/hybridDataProvider/hybridDataProvider.d.ts} +1 -1
- package/dist/types/components/organisms/DynamicRendererWithProviders/providers/hybridDataProvider/hybridDataProvider.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicRendererWithProviders/providers/hybridDataProvider/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicRendererWithProviders/providers/multiK8sProvider/index.d.ts +2 -0
- package/dist/types/components/organisms/DynamicRendererWithProviders/{multiK8sProvider.d.ts → providers/multiK8sProvider/multiK8sProvider.d.ts} +1 -1
- package/dist/types/components/organisms/DynamicRendererWithProviders/providers/multiK8sProvider/multiK8sProvider.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicRendererWithProviders/providers/multiQueryProvider/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicRendererWithProviders/providers/multiQueryProvider/multiQueryProvider.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicRendererWithProviders/providers/partsOfUrlContext/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicRendererWithProviders/providers/partsOfUrlContext/partsOfUrlContext.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicRendererWithProviders/providers/themeContext/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicRendererWithProviders/providers/themeContext/themeContext.test.d.ts +1 -0
- package/dist/types/hooks/useApiResource.d.ts +1 -0
- package/dist/types/hooks/useBuiltinResource.d.ts +1 -0
- package/dist/types/hooks/useCrdResource.d.ts +1 -0
- package/dist/types/hooks/useK8sSmartResource/useK8sSmartResource.test.d.ts +2 -0
- package/dist/types/hooks/useK8sSmartResource/useK8sSmartResourceWithoutKinds.test.d.ts +2 -0
- package/dist/types/hooks/useK8sSmartResource/useManyK8sSmartResource.test.d.ts +2 -0
- package/dist/types/hooks/useK8sSmartResource/useSmartResourceParams.test.d.ts +2 -0
- package/dist/types/hooks/useListThenWatch/reducer.test.d.ts +1 -0
- package/dist/types/hooks/useListThenWatch/useInfiniteSentinel.test.d.ts +2 -0
- package/dist/types/hooks/useListThenWatch/useListWatch.test.d.ts +2 -0
- package/dist/types/hooks/useListThenWatch/utils.test.d.ts +1 -0
- package/dist/types/hooks/useResourceScope/useResourceScope.test.d.ts +2 -0
- package/dist/types/localTypes/k8s.d.ts +1 -0
- package/dist/types/utils/createContextFactory/createContextFactory.test.d.ts +2 -0
- package/dist/types/utils/deepMerge/deepMerge.test.d.ts +1 -0
- package/dist/types/utils/filterSelectOptions/filterSelectOptions.test.d.ts +1 -0
- package/dist/types/utils/getAllPathsFromObj/getAllPathsFromObj.test.d.ts +1 -0
- package/dist/types/utils/getGroupsByCategory/getGroupsByCategory.test.d.ts +2 -0
- package/dist/types/utils/getPrefixSubArrays/getPrefixSubArrays.test.d.ts +1 -0
- package/dist/types/utils/getResourceLink/getResourceLink.test.d.ts +1 -0
- package/dist/types/utils/getSortedKinds/getSortedKinds.test.d.ts +1 -0
- package/dist/types/utils/getSortedKindsAll/getSortedKindsAll.test.d.ts +1 -0
- package/dist/types/utils/getStringByName/getStringByName.test.d.ts +1 -0
- package/dist/types/utils/getUppercase/getUppercase.test.d.ts +1 -0
- package/dist/types/utils/groupsToTreeData/groupsToTreeData.test.d.ts +1 -0
- package/dist/types/utils/hslFromString/hslFromString.test.d.ts +1 -0
- package/dist/types/utils/isFlatObject/isFlatObject.test.d.ts +1 -0
- package/dist/types/utils/kindByGvr/kindByGvr.test.d.ts +1 -0
- package/dist/types/utils/namespacedByGvr/namespacedByGvr.test.d.ts +1 -0
- package/dist/types/utils/nestedStringsArrayInclude/nestedStringsArrayInclude.test.d.ts +1 -0
- package/dist/types/utils/normalizeValuesForQuotas/normalizeValuesForQuotas.test.d.ts +1 -0
- package/dist/types/utils/parseForQuotaValues/parseForQuotaValues.test.d.ts +1 -0
- package/dist/types/utils/pluralByKind/pluralByKind.test.d.ts +1 -0
- package/dist/types/utils/prepareUrlsToFetchForDynamicRenderer/prepareUrlsToFetchForDynamicRenderer.test.d.ts +1 -0
- package/dist/types/utils/tableLocations/tableLocations.test.d.ts +1 -0
- package/package.json +3 -1
- /package/dist/types/components/organisms/DynamicRendererWithProviders/{factoryConfigProvider.d.ts → providers/factoryConfigProvider/factoryConfigProvider.d.ts} +0 -0
- /package/dist/types/components/organisms/DynamicRendererWithProviders/{multiQueryProvider.d.ts → providers/multiQueryProvider/multiQueryProvider.d.ts} +0 -0
- /package/dist/types/components/organisms/DynamicRendererWithProviders/{partsOfUrlContext.d.ts → providers/partsOfUrlContext/partsOfUrlContext.d.ts} +0 -0
- /package/dist/types/components/organisms/DynamicRendererWithProviders/{themeContext.d.ts → providers/themeContext/themeContext.d.ts} +0 -0
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import styled, { createGlobalStyle } from 'styled-components';
|
|
2
2
|
import K, { useState, useRef, useLayoutEffect, useReducer, useEffect, useCallback, useMemo, Fragment, createContext, useContext, memo, createElement, isValidElement, cloneElement, useInsertionEffect, useSyncExternalStore, Suspense } from 'react';
|
|
3
|
-
import { Input, Tree, Modal, Alert, theme, Select, Tag, Flex, Typography, Breadcrumb, Spin, Menu, Tooltip, Space, Button, Card as Card$1, Row, Col, Tabs, notification, Form, Popover, Switch, Segmented, Dropdown, Table, Slider, InputNumber, Result, Progress, Checkbox, Empty } from 'antd';
|
|
4
|
-
import { LoadingOutlined, ExclamationCircleFilled, CloseCircleFilled, CheckCircleFilled, PlusOutlined, ClearOutlined, MinusOutlined, CaretDownOutlined, CaretRightOutlined, InfoCircleOutlined, EyeOutlined, EyeInvisibleOutlined, SearchOutlined, MoreOutlined, CheckOutlined, CloseOutlined, BugOutlined, EllipsisOutlined } from '@ant-design/icons';
|
|
3
|
+
import { Input, Tree, Modal, Alert, theme, Select, Tag, Flex, Typography, Breadcrumb, Spin, Menu, Tooltip, Space, Button, Card as Card$1, Row, Col, Tabs, notification, Form, Popover, Switch, Segmented, Dropdown, Table, Slider, InputNumber, Result, Progress, Radio, Checkbox, Empty } from 'antd';
|
|
4
|
+
import { LoadingOutlined, ExclamationCircleFilled, CloseCircleFilled, CheckCircleFilled, PlusOutlined, ClearOutlined, MinusOutlined, CaretDownOutlined, CaretRightOutlined, InfoCircleOutlined, EyeOutlined, EyeInvisibleOutlined, SearchOutlined, MoreOutlined, CheckOutlined, CloseOutlined, BugOutlined, EllipsisOutlined, PoweroffOutlined, FullscreenExitOutlined, FullscreenOutlined, SettingOutlined, ReloadOutlined } from '@ant-design/icons';
|
|
5
5
|
import { useNavigate, useSearchParams, Link, useLocation, useParams } from 'react-router-dom';
|
|
6
6
|
import { useQuery, useQueries, useQueryClient } from '@tanstack/react-query';
|
|
7
|
+
import RFB from 'novnc-next';
|
|
7
8
|
|
|
8
9
|
const Spacer$1 = styled.div`
|
|
9
10
|
height: ${({ $space, $spaceMob, $samespace }) => {
|
|
@@ -1574,7 +1575,7 @@ const CustomTreeProvider = styled.div`
|
|
|
1574
1575
|
justify-content: center;
|
|
1575
1576
|
}
|
|
1576
1577
|
`;
|
|
1577
|
-
const Styled$
|
|
1578
|
+
const Styled$E = {
|
|
1578
1579
|
CustomTreeProvider
|
|
1579
1580
|
};
|
|
1580
1581
|
|
|
@@ -1639,7 +1640,7 @@ const TreeWithSearch = ({ treeData, onSelect }) => {
|
|
|
1639
1640
|
});
|
|
1640
1641
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
1641
1642
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Search$1, { style: { marginBottom: 8 }, placeholder: "Search", onChange }),
|
|
1642
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
1643
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$E.CustomTreeProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1643
1644
|
Tree,
|
|
1644
1645
|
{
|
|
1645
1646
|
treeData: loop(treeData),
|
|
@@ -8197,14 +8198,14 @@ const ContentContainer = styled.div`
|
|
|
8197
8198
|
display: ${({ $displayFlex }) => $displayFlex ? "flex" : "block"};
|
|
8198
8199
|
flex-flow: ${({ $flexFlow }) => $flexFlow};
|
|
8199
8200
|
`;
|
|
8200
|
-
const Styled$
|
|
8201
|
+
const Styled$D = {
|
|
8201
8202
|
ContentContainer
|
|
8202
8203
|
};
|
|
8203
8204
|
|
|
8204
8205
|
const ContentCard$1 = ({ children, flexGrow, displayFlex, flexFlow, maxHeight }) => {
|
|
8205
8206
|
const { token } = theme.useToken();
|
|
8206
8207
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8207
|
-
Styled$
|
|
8208
|
+
Styled$D.ContentContainer,
|
|
8208
8209
|
{
|
|
8209
8210
|
$flexGrow: flexGrow,
|
|
8210
8211
|
$bgColor: token.colorBgContainer,
|
|
@@ -8265,13 +8266,13 @@ const UncontrolledSelect$1 = styled(Select)`
|
|
|
8265
8266
|
padding-inline: 8px;
|
|
8266
8267
|
}
|
|
8267
8268
|
`;
|
|
8268
|
-
const Styled$
|
|
8269
|
+
const Styled$C = {
|
|
8269
8270
|
UncontrolledSelect: UncontrolledSelect$1
|
|
8270
8271
|
};
|
|
8271
8272
|
|
|
8272
8273
|
const UncontrolledSelect = (props) => {
|
|
8273
8274
|
const { isCursorPointer } = props;
|
|
8274
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
8275
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$C.UncontrolledSelect, { ...props, $isCursorPointer: isCursorPointer });
|
|
8275
8276
|
};
|
|
8276
8277
|
|
|
8277
8278
|
const CustomSelect$5 = styled(Select)`
|
|
@@ -8319,13 +8320,13 @@ const CustomSelect$5 = styled(Select)`
|
|
|
8319
8320
|
margin-block: 0 !important;
|
|
8320
8321
|
}
|
|
8321
8322
|
`;
|
|
8322
|
-
const Styled$
|
|
8323
|
+
const Styled$B = {
|
|
8323
8324
|
CustomSelect: CustomSelect$5
|
|
8324
8325
|
};
|
|
8325
8326
|
|
|
8326
8327
|
const CustomSelect$4 = (props) => {
|
|
8327
8328
|
const { paddingContainerEnd, ...rest } = props;
|
|
8328
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
8329
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$B.CustomSelect, { $paddingContainerEnd: paddingContainerEnd, ...rest });
|
|
8329
8330
|
};
|
|
8330
8331
|
|
|
8331
8332
|
const CursorPointerTag = styled(Tag)`
|
|
@@ -8472,7 +8473,7 @@ const Abbr$2 = styled.span`
|
|
|
8472
8473
|
height: min-content;
|
|
8473
8474
|
margin-right: 4px;
|
|
8474
8475
|
`;
|
|
8475
|
-
const Styled$
|
|
8476
|
+
const Styled$A = {
|
|
8476
8477
|
Abbr: Abbr$2
|
|
8477
8478
|
};
|
|
8478
8479
|
|
|
@@ -8512,7 +8513,7 @@ const ResourceLink = ({
|
|
|
8512
8513
|
baseFactoriesMapping
|
|
8513
8514
|
});
|
|
8514
8515
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { align: "center", gap: 8, children: [
|
|
8515
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
8516
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$A.Abbr, { $bgColor: bgColor, children: abbr }),
|
|
8516
8517
|
resourceLink ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8517
8518
|
Typography.Link,
|
|
8518
8519
|
{
|
|
@@ -8551,7 +8552,7 @@ const NoWrapContainer = styled.div`
|
|
|
8551
8552
|
flex-wrap: nowrap !important;
|
|
8552
8553
|
}
|
|
8553
8554
|
`;
|
|
8554
|
-
const Styled$
|
|
8555
|
+
const Styled$z = {
|
|
8555
8556
|
PositionRelativeContainer,
|
|
8556
8557
|
FullWidthContainer,
|
|
8557
8558
|
NoWrapContainer
|
|
@@ -8594,9 +8595,9 @@ const CollapsibleBreadcrumb = ({ items }) => {
|
|
|
8594
8595
|
};
|
|
8595
8596
|
return [firstItem, ellipsisItem, lastItem];
|
|
8596
8597
|
};
|
|
8597
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$
|
|
8598
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
8599
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
8598
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$z.PositionRelativeContainer, { children: [
|
|
8599
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$z.FullWidthContainer, { ref: containerRef, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Breadcrumb, { separator: ">", items: renderItems() }) }),
|
|
8600
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$z.NoWrapContainer, { ref: breadcrumbRef, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Breadcrumb, { separator: ">", items, style: { display: "flex", flexWrap: "nowrap" } }) })
|
|
8600
8601
|
] });
|
|
8601
8602
|
};
|
|
8602
8603
|
|
|
@@ -8604,12 +8605,12 @@ const HeightDiv$1 = styled.div`
|
|
|
8604
8605
|
min-height: 22px;
|
|
8605
8606
|
width: 100%;
|
|
8606
8607
|
`;
|
|
8607
|
-
const Styled$
|
|
8608
|
+
const Styled$y = {
|
|
8608
8609
|
HeightDiv: HeightDiv$1
|
|
8609
8610
|
};
|
|
8610
8611
|
|
|
8611
8612
|
const ManageableBreadcrumbs = ({ data }) => {
|
|
8612
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
8613
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$y.HeightDiv, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(CollapsibleBreadcrumb, { items: data.breadcrumbItems }) });
|
|
8613
8614
|
};
|
|
8614
8615
|
|
|
8615
8616
|
const getKinds = async ({ cluster }) => {
|
|
@@ -9595,7 +9596,7 @@ const HeightDiv = styled.div`
|
|
|
9595
9596
|
min-height: 22px;
|
|
9596
9597
|
width: 100%;
|
|
9597
9598
|
`;
|
|
9598
|
-
const Styled$
|
|
9599
|
+
const Styled$x = {
|
|
9599
9600
|
HeightDiv
|
|
9600
9601
|
};
|
|
9601
9602
|
|
|
@@ -9624,7 +9625,7 @@ const ManageableBreadcrumbsProvider = ({
|
|
|
9624
9625
|
return null;
|
|
9625
9626
|
}
|
|
9626
9627
|
if (rawDataLoading) {
|
|
9627
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
9628
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$x.HeightDiv, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Spin, {}) });
|
|
9628
9629
|
}
|
|
9629
9630
|
if (!rawData) {
|
|
9630
9631
|
return null;
|
|
@@ -9639,7 +9640,7 @@ const ManageableBreadcrumbsProvider = ({
|
|
|
9639
9640
|
idToCompare
|
|
9640
9641
|
});
|
|
9641
9642
|
if (!result) {
|
|
9642
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
9643
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$x.HeightDiv, {});
|
|
9643
9644
|
}
|
|
9644
9645
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(ManageableBreadcrumbs, { data: result }, JSON.stringify(idToCompare));
|
|
9645
9646
|
};
|
|
@@ -9667,7 +9668,7 @@ const CustomMenu = styled(Menu)`
|
|
|
9667
9668
|
margin: 0 !important;
|
|
9668
9669
|
}
|
|
9669
9670
|
`;
|
|
9670
|
-
const Styled$
|
|
9671
|
+
const Styled$w = {
|
|
9671
9672
|
CustomMenu
|
|
9672
9673
|
};
|
|
9673
9674
|
|
|
@@ -9694,7 +9695,7 @@ const ManageableSidebar = ({ data, noMarginTop }) => {
|
|
|
9694
9695
|
setSelectedKeys(data.selectedKeys);
|
|
9695
9696
|
}, [data.selectedKeys]);
|
|
9696
9697
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9697
|
-
Styled$
|
|
9698
|
+
Styled$w.CustomMenu,
|
|
9698
9699
|
{
|
|
9699
9700
|
selectedKeys,
|
|
9700
9701
|
onSelect: () => {
|
|
@@ -33882,7 +33883,7 @@ const ShortenedText = styled.div`
|
|
|
33882
33883
|
white-space: nowrap;
|
|
33883
33884
|
text-overflow: ellipsis;
|
|
33884
33885
|
`;
|
|
33885
|
-
const Styled$
|
|
33886
|
+
const Styled$v = {
|
|
33886
33887
|
ShortenedText
|
|
33887
33888
|
};
|
|
33888
33889
|
|
|
@@ -33891,7 +33892,7 @@ const ShortenedTextWithTooltip = ({ text, trimLength, maxWidth = 200 }) => {
|
|
|
33891
33892
|
const trimmedText = text.substring(0, trimLength);
|
|
33892
33893
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: text, placement: "top", children: trimmedText });
|
|
33893
33894
|
}
|
|
33894
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: text, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
33895
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: text, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$v.ShortenedText, { $maxWidth: maxWidth, children: text }) });
|
|
33895
33896
|
};
|
|
33896
33897
|
|
|
33897
33898
|
const FilterDropdown = ({
|
|
@@ -43044,7 +43045,7 @@ const BigText$1 = styled.div`
|
|
|
43044
43045
|
font-size: 16px;
|
|
43045
43046
|
line-height: 24px;
|
|
43046
43047
|
`;
|
|
43047
|
-
const Styled$
|
|
43048
|
+
const Styled$u = {
|
|
43048
43049
|
BorderRadiusContainer: BorderRadiusContainer$1,
|
|
43049
43050
|
ControlsRowContainer: ControlsRowContainer$1,
|
|
43050
43051
|
BigText: BigText$1
|
|
@@ -43168,7 +43169,7 @@ const YamlEditorSingleton$1 = ({
|
|
|
43168
43169
|
};
|
|
43169
43170
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
43170
43171
|
contextHolder,
|
|
43171
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
43172
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$u.BorderRadiusContainer, { $designNewLayoutHeight: designNewLayoutHeight, $colorBorder: token.colorBorder, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
43172
43173
|
Ft$1,
|
|
43173
43174
|
{
|
|
43174
43175
|
defaultLanguage: "yaml",
|
|
@@ -43187,7 +43188,7 @@ const YamlEditorSingleton$1 = ({
|
|
|
43187
43188
|
}
|
|
43188
43189
|
}
|
|
43189
43190
|
) }),
|
|
43190
|
-
!readOnly && /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
43191
|
+
!readOnly && /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$u.ControlsRowContainer, { $bgColor: token.colorPrimaryBg, $designNewLayout: designNewLayout, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { gap: designNewLayout ? 10 : 16, align: "center", children: [
|
|
43191
43192
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Button, { type: "primary", onClick: onSubmit, loading: isLoading, children: "Submit" }),
|
|
43192
43193
|
backlink && /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { onClick: () => navigate(backlink), children: "Cancel" }),
|
|
43193
43194
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Button, { onClick: handleReload, children: "Reload" })
|
|
@@ -43198,7 +43199,7 @@ const YamlEditorSingleton$1 = ({
|
|
|
43198
43199
|
open: !!error,
|
|
43199
43200
|
onOk: () => setError(void 0),
|
|
43200
43201
|
onCancel: () => setError(void 0),
|
|
43201
|
-
title: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { type: "danger", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
43202
|
+
title: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { type: "danger", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$u.BigText, { children: "Error!" }) }),
|
|
43202
43203
|
cancelButtonProps: { style: { display: "none" } },
|
|
43203
43204
|
children: [
|
|
43204
43205
|
"An error has occurred: ",
|
|
@@ -43314,7 +43315,7 @@ const YamlEditorSingleton = ({
|
|
|
43314
43315
|
const VisibilityContainer$2 = styled.div`
|
|
43315
43316
|
display: ${({ $hidden }) => $hidden ? "none" : "block"};
|
|
43316
43317
|
`;
|
|
43317
|
-
const Styled$
|
|
43318
|
+
const Styled$t = {
|
|
43318
43319
|
VisibilityContainer: VisibilityContainer$2
|
|
43319
43320
|
};
|
|
43320
43321
|
|
|
@@ -43337,7 +43338,7 @@ const VisibilityContainer$1 = ({
|
|
|
43337
43338
|
if (isMultiqueryLoading) {
|
|
43338
43339
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading multiquery" });
|
|
43339
43340
|
}
|
|
43340
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
43341
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$t.VisibilityContainer, { $hidden: valuePrepared === "~undefined-value~", children });
|
|
43341
43342
|
};
|
|
43342
43343
|
|
|
43343
43344
|
const unknownToString = (value) => {
|
|
@@ -43576,7 +43577,7 @@ const useUpdateIsTouchedPersisted = () => {
|
|
|
43576
43577
|
return dispatch;
|
|
43577
43578
|
};
|
|
43578
43579
|
|
|
43579
|
-
const Container$
|
|
43580
|
+
const Container$3 = styled.div`
|
|
43580
43581
|
display: flex;
|
|
43581
43582
|
flex-direction: column;
|
|
43582
43583
|
gap: ${({ $designNewLayout }) => $designNewLayout ? "4px" : "8px"};
|
|
@@ -43602,8 +43603,8 @@ const Content$1 = styled.div`
|
|
|
43602
43603
|
display: ${({ $isOpen }) => $isOpen ? "block" : "none"};
|
|
43603
43604
|
padding: ${({ $designNewLayout }) => $designNewLayout ? "0 0 0 6px" : "4px"};
|
|
43604
43605
|
`;
|
|
43605
|
-
const Styled$
|
|
43606
|
-
Container: Container$
|
|
43606
|
+
const Styled$s = {
|
|
43607
|
+
Container: Container$3,
|
|
43607
43608
|
TitleBar,
|
|
43608
43609
|
Content: Content$1
|
|
43609
43610
|
};
|
|
@@ -43629,14 +43630,14 @@ const CustomCollapse = ({
|
|
|
43629
43630
|
}
|
|
43630
43631
|
};
|
|
43631
43632
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
43632
|
-
Styled$
|
|
43633
|
+
Styled$s.Container,
|
|
43633
43634
|
{
|
|
43634
43635
|
$designNewLayout: designNewLayout,
|
|
43635
43636
|
$borderColor: token.colorBorder,
|
|
43636
43637
|
$bgColor: token.colorBgContainer,
|
|
43637
43638
|
children: [
|
|
43638
43639
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { justify: "space-between", children: [
|
|
43639
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$
|
|
43640
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$s.TitleBar, { onClick: () => toggleCollapse(), children: [
|
|
43640
43641
|
!designNewLayout && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: isOpen ? /* @__PURE__ */ jsxRuntimeExports.jsx(CaretDownOutlined, { size: 14 }) : /* @__PURE__ */ jsxRuntimeExports.jsx(CaretRightOutlined, { size: 14 }) }),
|
|
43641
43642
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: title }),
|
|
43642
43643
|
designNewLayout && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: isOpen ? /* @__PURE__ */ jsxRuntimeExports.jsx(DownIcon, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(UpIcon, {}) })
|
|
@@ -43647,7 +43648,7 @@ const CustomCollapse = ({
|
|
|
43647
43648
|
persistedCheckbox
|
|
43648
43649
|
] })
|
|
43649
43650
|
] }),
|
|
43650
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
43651
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$s.Content, { $isOpen: isOpen, $designNewLayout: designNewLayout, children })
|
|
43651
43652
|
]
|
|
43652
43653
|
}
|
|
43653
43654
|
);
|
|
@@ -43681,13 +43682,13 @@ const CustomSizeTitle = styled.div`
|
|
|
43681
43682
|
const Content = styled.div`
|
|
43682
43683
|
padding: ${({ $designNewLayout }) => $designNewLayout ? "0 0 0 6px" : "4px"};
|
|
43683
43684
|
`;
|
|
43684
|
-
const Styled$
|
|
43685
|
+
const Styled$r = {
|
|
43685
43686
|
Content
|
|
43686
43687
|
};
|
|
43687
43688
|
|
|
43688
43689
|
const ArrayInsideContainer = ({ children }) => {
|
|
43689
43690
|
const designNewLayout = useDesignNewLayout();
|
|
43690
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
43691
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$r.Content, { $designNewLayout: designNewLayout, children });
|
|
43691
43692
|
};
|
|
43692
43693
|
|
|
43693
43694
|
const includesPath = (haystack, needle) => haystack.some((h) => h.length === needle.length && h.every((seg, i) => seg === String(needle[i])));
|
|
@@ -44240,7 +44241,7 @@ const LabelsToSearchParams = ({ data, children }) => {
|
|
|
44240
44241
|
const ResetedFormList$3 = styled(Form.List)`
|
|
44241
44242
|
margin-bottom: 8px;
|
|
44242
44243
|
`;
|
|
44243
|
-
const Styled$
|
|
44244
|
+
const Styled$q = {
|
|
44244
44245
|
ResetedFormList: ResetedFormList$3
|
|
44245
44246
|
};
|
|
44246
44247
|
|
|
@@ -44325,7 +44326,7 @@ const EditModal$2 = ({
|
|
|
44325
44326
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Col, { span: cols[3], children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", {}) })
|
|
44326
44327
|
] }),
|
|
44327
44328
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Spacer$1, { $space: 10, $samespace: true }),
|
|
44328
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
44329
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$q.ResetedFormList, { name: "taints", children: (fields, { add, remove }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
44329
44330
|
fields.map(({ key, name, ...restField }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(Row, { gutter: [16, 16], children: [
|
|
44330
44331
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Col, { span: cols[0], children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
44331
44332
|
ResetedFormItem$1,
|
|
@@ -44565,7 +44566,7 @@ const Taints = ({ data, children }) => {
|
|
|
44565
44566
|
const ResetedFormList$2 = styled(Form.List)`
|
|
44566
44567
|
margin-bottom: 8px;
|
|
44567
44568
|
`;
|
|
44568
|
-
const Styled$
|
|
44569
|
+
const Styled$p = {
|
|
44569
44570
|
ResetedFormList: ResetedFormList$2
|
|
44570
44571
|
};
|
|
44571
44572
|
|
|
@@ -44660,7 +44661,7 @@ const EditModal$1 = ({
|
|
|
44660
44661
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Col, { span: cols[4], children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", {}) })
|
|
44661
44662
|
] }),
|
|
44662
44663
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Spacer$1, { $space: 10, $samespace: true }),
|
|
44663
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
44664
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$p.ResetedFormList, { name: "tolerations", children: (fields, { add, remove }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
44664
44665
|
fields.map(({ key, name, ...restField }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(Row, { gutter: [16, 16], children: [
|
|
44665
44666
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Col, { span: cols[0], children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
44666
44667
|
ResetedFormItem$1,
|
|
@@ -44942,7 +44943,7 @@ const Tolerations = ({
|
|
|
44942
44943
|
const ResetedFormList$1 = styled(Form.List)`
|
|
44943
44944
|
margin-bottom: 8px;
|
|
44944
44945
|
`;
|
|
44945
|
-
const Styled$
|
|
44946
|
+
const Styled$o = {
|
|
44946
44947
|
ResetedFormList: ResetedFormList$1
|
|
44947
44948
|
};
|
|
44948
44949
|
|
|
@@ -45032,7 +45033,7 @@ const EditModal = ({
|
|
|
45032
45033
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Col, { span: cols[2], children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", {}) })
|
|
45033
45034
|
] }),
|
|
45034
45035
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Spacer$1, { $space: 10, $samespace: true }),
|
|
45035
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
45036
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$o.ResetedFormList, { name: "annotations", children: (fields, { add, remove }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
45036
45037
|
fields.map(({ key, name, ...restField }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(Row, { gutter: [16, 16], children: [
|
|
45037
45038
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Col, { span: cols[0], children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
45038
45039
|
ResetedFormItem$1,
|
|
@@ -46181,7 +46182,7 @@ const NotificationOverrides = createGlobalStyle`
|
|
|
46181
46182
|
margin-bottom: 0 !important;
|
|
46182
46183
|
}
|
|
46183
46184
|
`;
|
|
46184
|
-
const Styled$
|
|
46185
|
+
const Styled$n = {
|
|
46185
46186
|
NoSelect,
|
|
46186
46187
|
DisabledInput,
|
|
46187
46188
|
NotificationOverrides
|
|
@@ -46247,10 +46248,10 @@ const SecretBase64Plain = ({ data }) => {
|
|
|
46247
46248
|
}
|
|
46248
46249
|
};
|
|
46249
46250
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: containerStyle, children: [
|
|
46250
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
46251
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$n.NotificationOverrides, {}),
|
|
46251
46252
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { gap: 8, ...flexProps, children: [
|
|
46252
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
46253
|
-
Styled$
|
|
46253
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$n.NoSelect, { style: inputContainerStyle, children: niceLooking ? /* @__PURE__ */ jsxRuntimeExports.jsx(te, { theme, hidden, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
46254
|
+
Styled$n.DisabledInput,
|
|
46254
46255
|
{
|
|
46255
46256
|
$hidden: hidden,
|
|
46256
46257
|
ref: inputRef,
|
|
@@ -46265,7 +46266,7 @@ const SecretBase64Plain = ({ data }) => {
|
|
|
46265
46266
|
value: decodedText
|
|
46266
46267
|
}
|
|
46267
46268
|
) }) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
46268
|
-
Styled$
|
|
46269
|
+
Styled$n.DisabledInput,
|
|
46269
46270
|
{
|
|
46270
46271
|
$hidden: hidden,
|
|
46271
46272
|
ref: inputRef,
|
|
@@ -46299,7 +46300,7 @@ const RoundSpan = styled.span`
|
|
|
46299
46300
|
letter-spacing: 0.02em;
|
|
46300
46301
|
box-sizing: content-box;
|
|
46301
46302
|
`;
|
|
46302
|
-
const Styled$
|
|
46303
|
+
const Styled$m = {
|
|
46303
46304
|
RoundSpan
|
|
46304
46305
|
};
|
|
46305
46306
|
|
|
@@ -46338,7 +46339,7 @@ const ResourceBadge = ({ data }) => {
|
|
|
46338
46339
|
multiQueryData
|
|
46339
46340
|
}) : getUppercase(parsedValue);
|
|
46340
46341
|
const bgColor = hslFromString(parsedValue, theme);
|
|
46341
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
46342
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$m.RoundSpan, { $bgColor: bgColor, style, children: parsedAbbreviation });
|
|
46342
46343
|
};
|
|
46343
46344
|
|
|
46344
46345
|
const serializeLabelsWithNoEncoding = (input) => {
|
|
@@ -47016,6 +47017,50 @@ const TogglerSegmented = ({
|
|
|
47016
47017
|
] });
|
|
47017
47018
|
};
|
|
47018
47019
|
|
|
47020
|
+
const VMVNC$1 = ({
|
|
47021
|
+
data,
|
|
47022
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
47023
|
+
children
|
|
47024
|
+
}) => {
|
|
47025
|
+
const { data: multiQueryData, isLoading: isMultiqueryLoading } = useMultiQuery();
|
|
47026
|
+
const {
|
|
47027
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
47028
|
+
id,
|
|
47029
|
+
cluster,
|
|
47030
|
+
namespace,
|
|
47031
|
+
vmName,
|
|
47032
|
+
forcedFullWsPath,
|
|
47033
|
+
substractHeight,
|
|
47034
|
+
...props
|
|
47035
|
+
} = data;
|
|
47036
|
+
const partsOfUrl = usePartsOfUrl();
|
|
47037
|
+
const replaceValues = partsOfUrl.partsOfUrl.reduce((acc, value, index) => {
|
|
47038
|
+
acc[index.toString()] = value;
|
|
47039
|
+
return acc;
|
|
47040
|
+
}, {});
|
|
47041
|
+
const clusterPrepared = cluster ? parseAll({ text: cluster, replaceValues, multiQueryData }) : void 0;
|
|
47042
|
+
const namespacePrepared = namespace ? parseAll({ text: namespace, replaceValues, multiQueryData }) : void 0;
|
|
47043
|
+
const vmNamePrepared = vmName ? parseAll({ text: vmName, replaceValues, multiQueryData }) : void 0;
|
|
47044
|
+
const forcedFullWsPathPrepared = forcedFullWsPath ? parseAll({ text: forcedFullWsPath, replaceValues, multiQueryData }) : void 0;
|
|
47045
|
+
if (isMultiqueryLoading) {
|
|
47046
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading multiquery" });
|
|
47047
|
+
}
|
|
47048
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
47049
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
47050
|
+
VMVNC,
|
|
47051
|
+
{
|
|
47052
|
+
cluster: clusterPrepared,
|
|
47053
|
+
namespace: namespacePrepared,
|
|
47054
|
+
vmName: vmNamePrepared,
|
|
47055
|
+
forcedFullWsPath: forcedFullWsPathPrepared,
|
|
47056
|
+
substractHeight: substractHeight || 400,
|
|
47057
|
+
...props
|
|
47058
|
+
}
|
|
47059
|
+
),
|
|
47060
|
+
children
|
|
47061
|
+
] });
|
|
47062
|
+
};
|
|
47063
|
+
|
|
47019
47064
|
const DynamicComponents = {
|
|
47020
47065
|
DefaultDiv,
|
|
47021
47066
|
antdText: AntdText,
|
|
@@ -47056,7 +47101,8 @@ const DynamicComponents = {
|
|
|
47056
47101
|
Events: Events$1,
|
|
47057
47102
|
OwnerRefs,
|
|
47058
47103
|
Toggler,
|
|
47059
|
-
TogglerSegmented
|
|
47104
|
+
TogglerSegmented,
|
|
47105
|
+
VMVNC: VMVNC$1
|
|
47060
47106
|
};
|
|
47061
47107
|
|
|
47062
47108
|
const prepareUrlsToFetchForDynamicRenderer = ({
|
|
@@ -48485,7 +48531,7 @@ const BorderRadiusContainer = styled.div`
|
|
|
48485
48531
|
border-radius: 8px;
|
|
48486
48532
|
}
|
|
48487
48533
|
`;
|
|
48488
|
-
const Styled$
|
|
48534
|
+
const Styled$l = {
|
|
48489
48535
|
BorderRadiusContainer
|
|
48490
48536
|
};
|
|
48491
48537
|
|
|
@@ -48532,7 +48578,7 @@ const YamlEditor = ({ theme: theme$1, currentValues, onChange, editorUri }) => {
|
|
|
48532
48578
|
}
|
|
48533
48579
|
}
|
|
48534
48580
|
}, [yamlData, editorUri]);
|
|
48535
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
48581
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$l.BorderRadiusContainer, { $colorBorder: token.colorBorder, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
48536
48582
|
Ft$1,
|
|
48537
48583
|
{
|
|
48538
48584
|
language: "yaml",
|
|
@@ -49289,7 +49335,7 @@ const fromBase64 = (b64) => {
|
|
|
49289
49335
|
const MarginBottom = styled.div`
|
|
49290
49336
|
margin-bottom: 8px;
|
|
49291
49337
|
`;
|
|
49292
|
-
const Styled$
|
|
49338
|
+
const Styled$k = {
|
|
49293
49339
|
MarginBottom
|
|
49294
49340
|
};
|
|
49295
49341
|
|
|
@@ -49355,7 +49401,7 @@ const FormStringMultilineInput = ({
|
|
|
49355
49401
|
},
|
|
49356
49402
|
arrKey !== void 0 ? arrKey : Array.isArray(name) ? name.slice(-1)[0] : name
|
|
49357
49403
|
),
|
|
49358
|
-
isBase64 && /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
49404
|
+
isBase64 && /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$k.MarginBottom, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
49359
49405
|
Input.TextArea,
|
|
49360
49406
|
{
|
|
49361
49407
|
placeholder: getStringByName(name),
|
|
@@ -49382,7 +49428,7 @@ const CrossContainer = styled.div`
|
|
|
49382
49428
|
cursor: pointer;
|
|
49383
49429
|
padding-top: 11px;
|
|
49384
49430
|
`;
|
|
49385
|
-
const Styled$
|
|
49431
|
+
const Styled$j = {
|
|
49386
49432
|
SwitchAndCrossContainer,
|
|
49387
49433
|
CrossContainer
|
|
49388
49434
|
};
|
|
@@ -49407,7 +49453,7 @@ const FormBooleanInput = ({
|
|
|
49407
49453
|
onRemoveByMinus && /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { size: "small", type: "text", onClick: onRemoveByMinus, children: /* @__PURE__ */ jsxRuntimeExports.jsx(MinusIcon, {}) })
|
|
49408
49454
|
] })
|
|
49409
49455
|
] }),
|
|
49410
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$
|
|
49456
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$j.SwitchAndCrossContainer, { children: [
|
|
49411
49457
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
49412
49458
|
ResetedFormItem$1,
|
|
49413
49459
|
{
|
|
@@ -49417,7 +49463,7 @@ const FormBooleanInput = ({
|
|
|
49417
49463
|
arrKey !== void 0 ? arrKey : Array.isArray(name) ? name.slice(-1)[0] : name
|
|
49418
49464
|
),
|
|
49419
49465
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
49420
|
-
Styled$
|
|
49466
|
+
Styled$j.CrossContainer,
|
|
49421
49467
|
{
|
|
49422
49468
|
onClick: () => {
|
|
49423
49469
|
if (makeValueUndefined) {
|
|
@@ -49605,7 +49651,7 @@ const FormArrayHeader = ({
|
|
|
49605
49651
|
] });
|
|
49606
49652
|
};
|
|
49607
49653
|
|
|
49608
|
-
const Container$
|
|
49654
|
+
const Container$2 = styled.div`
|
|
49609
49655
|
height: 140px;
|
|
49610
49656
|
border: 1px solid ${({ $colorBorder }) => $colorBorder};
|
|
49611
49657
|
border-radius: 8px;
|
|
@@ -49616,8 +49662,8 @@ const Container$1 = styled.div`
|
|
|
49616
49662
|
border-radius: 8px;
|
|
49617
49663
|
}
|
|
49618
49664
|
`;
|
|
49619
|
-
const Styled$
|
|
49620
|
-
Container: Container$
|
|
49665
|
+
const Styled$i = {
|
|
49666
|
+
Container: Container$2
|
|
49621
49667
|
};
|
|
49622
49668
|
|
|
49623
49669
|
const FormInlineYamlEditor = ({ path, persistedControls, externalValue }) => {
|
|
@@ -49670,7 +49716,7 @@ const FormInlineYamlEditor = ({ path, persistedControls, externalValue }) => {
|
|
|
49670
49716
|
}
|
|
49671
49717
|
}
|
|
49672
49718
|
}, [yamlText, modelUri]);
|
|
49673
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
49719
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$i.Container, { $colorBorder: token.colorBorder, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
49674
49720
|
Ft$1,
|
|
49675
49721
|
{
|
|
49676
49722
|
language: "yaml",
|
|
@@ -49809,7 +49855,7 @@ const getSortedPropertyKeys = ({
|
|
|
49809
49855
|
});
|
|
49810
49856
|
};
|
|
49811
49857
|
|
|
49812
|
-
const Container = styled.div`
|
|
49858
|
+
const Container$1 = styled.div`
|
|
49813
49859
|
display: grid;
|
|
49814
49860
|
grid-template-columns: repeat(2, 1fr);
|
|
49815
49861
|
gap: ${({ $designNewLayout }) => $designNewLayout ? "36px" : "8px"};
|
|
@@ -49837,9 +49883,9 @@ const BigText = styled.div`
|
|
|
49837
49883
|
font-size: 16px;
|
|
49838
49884
|
line-height: 24px;
|
|
49839
49885
|
`;
|
|
49840
|
-
const Styled$
|
|
49886
|
+
const Styled$h = {
|
|
49841
49887
|
ResetedFormList,
|
|
49842
|
-
Container,
|
|
49888
|
+
Container: Container$1,
|
|
49843
49889
|
OverflowContainer: OverflowContainer$1,
|
|
49844
49890
|
ControlsRowContainer,
|
|
49845
49891
|
DebugContainer,
|
|
@@ -50119,7 +50165,7 @@ const getArrayFormItemFromSwagger = ({
|
|
|
50119
50165
|
}
|
|
50120
50166
|
),
|
|
50121
50167
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
50122
|
-
Styled$
|
|
50168
|
+
Styled$h.ResetedFormList,
|
|
50123
50169
|
{
|
|
50124
50170
|
name: arrName || name,
|
|
50125
50171
|
rules: !forceNonRequired && required?.includes(getStringByName(name)) ? [
|
|
@@ -51560,8 +51606,8 @@ const BlackholeForm = ({
|
|
|
51560
51606
|
setPersistedKeys([...persistedKeys.filter((arr) => JSON.stringify(arr) !== JSON.stringify(value))]);
|
|
51561
51607
|
};
|
|
51562
51608
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
51563
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$
|
|
51564
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
51609
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$h.Container, { $designNewLayout: designNewLayout, $designNewLayoutHeight: designNewLayoutHeight, children: [
|
|
51610
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$h.OverflowContainer, { ref: overflowRef, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
51565
51611
|
Form,
|
|
51566
51612
|
{
|
|
51567
51613
|
form,
|
|
@@ -51615,7 +51661,7 @@ const BlackholeForm = ({
|
|
|
51615
51661
|
) })
|
|
51616
51662
|
] }),
|
|
51617
51663
|
/* @__PURE__ */ jsxRuntimeExports.jsx(FlexGrow, {}),
|
|
51618
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
51664
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$h.ControlsRowContainer, { $bgColor: token.colorPrimaryBg, $designNewLayout: designNewLayout, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { gap: designNewLayout ? 10 : 16, align: "center", children: [
|
|
51619
51665
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Button, { type: "primary", onClick: onSubmit, loading: isLoading, children: "Submit" }),
|
|
51620
51666
|
backlink && /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { onClick: () => navigate(backlink), children: "Cancel" }),
|
|
51621
51667
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Button, { onClick: () => setIsDebugModalOpen(true), icon: /* @__PURE__ */ jsxRuntimeExports.jsx(BugOutlined, {}) }),
|
|
@@ -51627,7 +51673,7 @@ const BlackholeForm = ({
|
|
|
51627
51673
|
open: !!error,
|
|
51628
51674
|
onOk: () => setError(void 0),
|
|
51629
51675
|
onCancel: () => setError(void 0),
|
|
51630
|
-
title: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { type: "danger", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
51676
|
+
title: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { type: "danger", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$h.BigText, { children: "Error!" }) }),
|
|
51631
51677
|
cancelButtonProps: { style: { display: "none" } },
|
|
51632
51678
|
children: [
|
|
51633
51679
|
"An error has occurred: ",
|
|
@@ -51643,7 +51689,7 @@ const BlackholeForm = ({
|
|
|
51643
51689
|
onCancel: () => setIsDebugModalOpen(false),
|
|
51644
51690
|
title: "Debug for properties",
|
|
51645
51691
|
width: "90vw",
|
|
51646
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
51692
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$h.DebugContainer, { $designNewLayoutHeight: designNewLayoutHeight, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading..." }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
51647
51693
|
Editor,
|
|
51648
51694
|
{
|
|
51649
51695
|
defaultLanguage: "json",
|
|
@@ -51698,7 +51744,7 @@ const BlackholeFormProvider = ({
|
|
|
51698
51744
|
}
|
|
51699
51745
|
if (data2.result === "error") {
|
|
51700
51746
|
setIsError(data2.error);
|
|
51701
|
-
console.
|
|
51747
|
+
console.warn(data2.error);
|
|
51702
51748
|
fallbackToManualMode();
|
|
51703
51749
|
} else {
|
|
51704
51750
|
setPreparedData({
|
|
@@ -51741,15 +51787,15 @@ const BlackholeFormProvider = ({
|
|
|
51741
51787
|
}
|
|
51742
51788
|
);
|
|
51743
51789
|
}
|
|
51790
|
+
if (isError) {
|
|
51791
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Alert, { message: isError, type: "error" });
|
|
51792
|
+
}
|
|
51744
51793
|
if (!preparedData?.properties && !isError) {
|
|
51745
51794
|
return null;
|
|
51746
51795
|
}
|
|
51747
51796
|
if (!preparedData?.properties) {
|
|
51748
51797
|
return null;
|
|
51749
51798
|
}
|
|
51750
|
-
if (isError) {
|
|
51751
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Alert, { message: isError, type: "error" });
|
|
51752
|
-
}
|
|
51753
51799
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
51754
51800
|
BlackholeForm,
|
|
51755
51801
|
{
|
|
@@ -51780,7 +51826,7 @@ const BlackholeFormProvider = ({
|
|
|
51780
51826
|
);
|
|
51781
51827
|
};
|
|
51782
51828
|
|
|
51783
|
-
const CustomCard$
|
|
51829
|
+
const CustomCard$6 = styled(Card$1)`
|
|
51784
51830
|
display: flex;
|
|
51785
51831
|
justify-content: center;
|
|
51786
51832
|
align-items: center;
|
|
@@ -51800,12 +51846,12 @@ const CustomCard$5 = styled(Card$1)`
|
|
|
51800
51846
|
padding: 8px;
|
|
51801
51847
|
}
|
|
51802
51848
|
`;
|
|
51803
|
-
const Styled$
|
|
51804
|
-
CustomCard: CustomCard$
|
|
51849
|
+
const Styled$g = {
|
|
51850
|
+
CustomCard: CustomCard$6
|
|
51805
51851
|
};
|
|
51806
51852
|
|
|
51807
51853
|
const AddCard = ({ onAddClick }) => {
|
|
51808
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
51854
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$g.CustomCard, { onClick: onAddClick, children: /* @__PURE__ */ jsxRuntimeExports.jsx(PlusOutlined, {}) });
|
|
51809
51855
|
};
|
|
51810
51856
|
|
|
51811
51857
|
const byteToHex = [];
|
|
@@ -52022,7 +52068,7 @@ const getCreatePathToNav = ({
|
|
|
52022
52068
|
return `/${baseprefix}/${cluster}/${namespace}/forms/builtin/${apiVersion}/${plural}?backlink=${window.location.pathname}`;
|
|
52023
52069
|
};
|
|
52024
52070
|
|
|
52025
|
-
const CustomCard$
|
|
52071
|
+
const CustomCard$5 = styled(Card$1)`
|
|
52026
52072
|
position: relative;
|
|
52027
52073
|
width: 238px;
|
|
52028
52074
|
overflow-x: auto;
|
|
@@ -52093,8 +52139,8 @@ const EditButtonContainer = styled.div`
|
|
|
52093
52139
|
bottom: 6px;
|
|
52094
52140
|
right: 6px;
|
|
52095
52141
|
`;
|
|
52096
|
-
const Styled$
|
|
52097
|
-
CustomCard: CustomCard$
|
|
52142
|
+
const Styled$f = {
|
|
52143
|
+
CustomCard: CustomCard$5,
|
|
52098
52144
|
ImageContainer,
|
|
52099
52145
|
OverflowContainer,
|
|
52100
52146
|
TitleContainer,
|
|
@@ -52165,14 +52211,14 @@ const MarketplaceCard = ({
|
|
|
52165
52211
|
return null;
|
|
52166
52212
|
}
|
|
52167
52213
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
52168
|
-
Styled$
|
|
52214
|
+
Styled$f.CustomCard,
|
|
52169
52215
|
{
|
|
52170
52216
|
$isDisabled: disabled,
|
|
52171
52217
|
$hoverColor: token.colorPrimary,
|
|
52172
52218
|
onClick: () => disabled ? null : navigate(navigateUrl),
|
|
52173
52219
|
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { vertical: true, style: { width: "100%", height: "100%" }, justify: "spaceBetween", children: [
|
|
52174
52220
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { justify: "space-between", children: [
|
|
52175
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
52221
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$f.ImageContainer, { dangerouslySetInnerHTML: { __html: decodedIcon } }),
|
|
52176
52222
|
isEditMode && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
52177
52223
|
"div",
|
|
52178
52224
|
{
|
|
@@ -52193,8 +52239,8 @@ const MarketplaceCard = ({
|
|
|
52193
52239
|
}
|
|
52194
52240
|
)
|
|
52195
52241
|
] }),
|
|
52196
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$
|
|
52197
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$
|
|
52242
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$f.OverflowContainer, { children: [
|
|
52243
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$f.TitleContainer, { children: [
|
|
52198
52244
|
name,
|
|
52199
52245
|
" ",
|
|
52200
52246
|
addedMode && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
|
|
@@ -52202,10 +52248,10 @@ const MarketplaceCard = ({
|
|
|
52202
52248
|
k8sList?.items?.length
|
|
52203
52249
|
] })
|
|
52204
52250
|
] }),
|
|
52205
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
52206
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
52251
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$f.TagsContainer, { children: tags.map((tag) => /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$f.CustomTag, { children: tag }, tag)) }),
|
|
52252
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$f.DescriptionContainer, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { type: "secondary", children: description }) })
|
|
52207
52253
|
] }),
|
|
52208
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
52254
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$f.EditButtonContainer, { children: isEditMode && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
52209
52255
|
"div",
|
|
52210
52256
|
{
|
|
52211
52257
|
onClick: (e) => {
|
|
@@ -52263,7 +52309,7 @@ const BigValue = styled.div`
|
|
|
52263
52309
|
line-clamp: 1;
|
|
52264
52310
|
word-break: break-all;
|
|
52265
52311
|
`;
|
|
52266
|
-
const Styled$
|
|
52312
|
+
const Styled$e = {
|
|
52267
52313
|
BigValue
|
|
52268
52314
|
};
|
|
52269
52315
|
|
|
@@ -52373,7 +52419,7 @@ const MarketPlace = ({
|
|
|
52373
52419
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { justify: "space-between", children: [
|
|
52374
52420
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { gap: 12, vertical: true, children: [
|
|
52375
52421
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { type: "secondary", children: "Available Products" }) }),
|
|
52376
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
52422
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$e.BigValue, { children: "Marketplace" }) })
|
|
52377
52423
|
] }) }),
|
|
52378
52424
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { gap: 12, vertical: true, children: [
|
|
52379
52425
|
/* @__PURE__ */ jsxRuntimeExports.jsx(SearchTextInput, { uniqueTags, selectedTags, onSelectedTags: setSelectedTags }),
|
|
@@ -52579,7 +52625,7 @@ styled.div`
|
|
|
52579
52625
|
line-clamp: 1;
|
|
52580
52626
|
word-break: break-all;
|
|
52581
52627
|
`;
|
|
52582
|
-
const Styled$
|
|
52628
|
+
const Styled$d = {
|
|
52583
52629
|
ActionMenuPlaceholder};
|
|
52584
52630
|
|
|
52585
52631
|
const ProjectInfoCard = ({
|
|
@@ -52658,7 +52704,7 @@ const ProjectInfoCard = ({
|
|
|
52658
52704
|
} : void 0,
|
|
52659
52705
|
onUpdate: updatePermission.data?.status.allowed ? openUpdate : void 0
|
|
52660
52706
|
}
|
|
52661
|
-
) : /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
52707
|
+
) : /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$d.ActionMenuPlaceholder, {}) }),
|
|
52662
52708
|
/* @__PURE__ */ jsxRuntimeExports.jsx(DropdownAccessGroups, { accessGroups })
|
|
52663
52709
|
] }) })
|
|
52664
52710
|
] }),
|
|
@@ -52731,7 +52777,7 @@ var addonFit = {exports: {}};
|
|
|
52731
52777
|
|
|
52732
52778
|
var addonFitExports = addonFit.exports;
|
|
52733
52779
|
|
|
52734
|
-
const CustomCard$
|
|
52780
|
+
const CustomCard$4 = styled.div`
|
|
52735
52781
|
visibility: ${({ $isVisible }) => $isVisible ? "visible" : "hidden"};
|
|
52736
52782
|
height: calc(100vh - ${({ $substractHeight }) => $substractHeight}px);
|
|
52737
52783
|
|
|
@@ -52739,15 +52785,15 @@ const CustomCard$3 = styled.div`
|
|
|
52739
52785
|
scrollbar-width: thin;
|
|
52740
52786
|
}
|
|
52741
52787
|
`;
|
|
52742
|
-
const FullWidthDiv$
|
|
52788
|
+
const FullWidthDiv$4 = styled.div`
|
|
52743
52789
|
display: flex;
|
|
52744
52790
|
justify-content: center;
|
|
52745
52791
|
width: 100%;
|
|
52746
52792
|
height: calc(100vh - ${({ $substractHeight }) => $substractHeight}px);
|
|
52747
52793
|
`;
|
|
52748
|
-
const Styled$
|
|
52749
|
-
FullWidthDiv: FullWidthDiv$
|
|
52750
|
-
CustomCard: CustomCard$
|
|
52794
|
+
const Styled$c = {
|
|
52795
|
+
FullWidthDiv: FullWidthDiv$4,
|
|
52796
|
+
CustomCard: CustomCard$4
|
|
52751
52797
|
};
|
|
52752
52798
|
|
|
52753
52799
|
const XTerminal$2 = ({ endpoint, namespace, podName, container, substractHeight }) => {
|
|
@@ -52830,7 +52876,7 @@ const XTerminal$2 = ({ endpoint, namespace, podName, container, substractHeight
|
|
|
52830
52876
|
};
|
|
52831
52877
|
}, [terminal, endpoint, namespace, podName, container]);
|
|
52832
52878
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
52833
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
52879
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$c.CustomCard, { $isVisible: !isLoading && !error, $substractHeight: substractHeight, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$c.FullWidthDiv, { $substractHeight: substractHeight, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: terminalRef, style: { width: "100%", height: "100%" } }) }) }),
|
|
52834
52880
|
isLoading && !error && /* @__PURE__ */ jsxRuntimeExports.jsx(Spin, {}),
|
|
52835
52881
|
error && /* @__PURE__ */ jsxRuntimeExports.jsx(Result, { status: "error", title: "Error", subTitle: JSON.stringify(error) })
|
|
52836
52882
|
] });
|
|
@@ -52841,7 +52887,7 @@ const CustomSelect$3 = styled.div`
|
|
|
52841
52887
|
width: 200px;
|
|
52842
52888
|
}
|
|
52843
52889
|
`;
|
|
52844
|
-
const Styled$
|
|
52890
|
+
const Styled$b = {
|
|
52845
52891
|
CustomSelect: CustomSelect$3
|
|
52846
52892
|
};
|
|
52847
52893
|
|
|
@@ -52852,7 +52898,7 @@ const PodTerminal = ({ cluster, namespace, podName, containers, substractHeight
|
|
|
52852
52898
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: "No Running Containers" });
|
|
52853
52899
|
}
|
|
52854
52900
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
52855
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
52901
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$b.CustomSelect, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
52856
52902
|
Select,
|
|
52857
52903
|
{
|
|
52858
52904
|
placeholder: "Select container",
|
|
@@ -52881,7 +52927,7 @@ const PodTerminal = ({ cluster, namespace, podName, containers, substractHeight
|
|
|
52881
52927
|
] });
|
|
52882
52928
|
};
|
|
52883
52929
|
|
|
52884
|
-
const CustomCard$
|
|
52930
|
+
const CustomCard$3 = styled.div`
|
|
52885
52931
|
visibility: ${({ $isVisible }) => $isVisible ? "visible" : "hidden"};
|
|
52886
52932
|
height: calc(100vh - ${({ $substractHeight }) => $substractHeight}px);
|
|
52887
52933
|
|
|
@@ -52889,7 +52935,7 @@ const CustomCard$2 = styled.div`
|
|
|
52889
52935
|
scrollbar-width: thin;
|
|
52890
52936
|
}
|
|
52891
52937
|
`;
|
|
52892
|
-
const FullWidthDiv$
|
|
52938
|
+
const FullWidthDiv$3 = styled.div`
|
|
52893
52939
|
display: flex;
|
|
52894
52940
|
justify-content: center;
|
|
52895
52941
|
width: 100%;
|
|
@@ -52904,9 +52950,9 @@ const ProgressContainer = styled.div`
|
|
|
52904
52950
|
align-items: center;
|
|
52905
52951
|
gap: 8px;
|
|
52906
52952
|
`;
|
|
52907
|
-
const Styled$
|
|
52908
|
-
FullWidthDiv: FullWidthDiv$
|
|
52909
|
-
CustomCard: CustomCard$
|
|
52953
|
+
const Styled$a = {
|
|
52954
|
+
FullWidthDiv: FullWidthDiv$3,
|
|
52955
|
+
CustomCard: CustomCard$3,
|
|
52910
52956
|
ProgressContainer
|
|
52911
52957
|
};
|
|
52912
52958
|
|
|
@@ -53036,8 +53082,8 @@ const XTerminal$1 = ({ endpoint, nodeName, profile, substractHeight }) => {
|
|
|
53036
53082
|
};
|
|
53037
53083
|
}, [terminal, endpoint, nodeName, profile]);
|
|
53038
53084
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
53039
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
53040
|
-
!isTerminalVisible && !error && isWarmingUp && /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$
|
|
53085
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$a.CustomCard, { $isVisible: isTerminalVisible, $substractHeight: substractHeight, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$a.FullWidthDiv, { $substractHeight: substractHeight, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: terminalRef, style: { width: "100%", height: "100%" } }) }) }),
|
|
53086
|
+
!isTerminalVisible && !error && isWarmingUp && /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$a.ProgressContainer, { $substractHeight: substractHeight, children: [
|
|
53041
53087
|
isLoading && /* @__PURE__ */ jsxRuntimeExports.jsx(Spin, {}),
|
|
53042
53088
|
!isLoading && /* @__PURE__ */ jsxRuntimeExports.jsx(Progress, { type: "circle", percent: progressPercent }),
|
|
53043
53089
|
warmupMessage && /* @__PURE__ */ jsxRuntimeExports.jsxs(Typography.Text, { children: [
|
|
@@ -53058,7 +53104,7 @@ const CustomSelect$2 = styled.div`
|
|
|
53058
53104
|
width: 200px;
|
|
53059
53105
|
}
|
|
53060
53106
|
`;
|
|
53061
|
-
const Styled$
|
|
53107
|
+
const Styled$9 = {
|
|
53062
53108
|
CustomSelect: CustomSelect$2
|
|
53063
53109
|
};
|
|
53064
53110
|
|
|
@@ -53067,7 +53113,7 @@ const NodeTerminal = ({ cluster, nodeName, substractHeight, defaultProfile }) =>
|
|
|
53067
53113
|
const endpoint = `/api/clusters/${cluster}/openapi-bff-ws/terminal/terminalNode/terminalNode`;
|
|
53068
53114
|
const profiles = ["legacy", "general", "baseline", "netadmin", "restricted", "sysadmin"];
|
|
53069
53115
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
53070
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
53116
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$9.CustomSelect, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
53071
53117
|
Select,
|
|
53072
53118
|
{
|
|
53073
53119
|
placeholder: "Select profile",
|
|
@@ -53092,7 +53138,7 @@ const NodeTerminal = ({ cluster, nodeName, substractHeight, defaultProfile }) =>
|
|
|
53092
53138
|
] });
|
|
53093
53139
|
};
|
|
53094
53140
|
|
|
53095
|
-
const CustomCard$
|
|
53141
|
+
const CustomCard$2 = styled.div`
|
|
53096
53142
|
visibility: ${({ $isVisible }) => $isVisible ? "visible" : "hidden"};
|
|
53097
53143
|
height: calc(100vh - ${({ $substractHeight }) => $substractHeight}px);
|
|
53098
53144
|
|
|
@@ -53100,15 +53146,15 @@ const CustomCard$1 = styled.div`
|
|
|
53100
53146
|
scrollbar-width: thin;
|
|
53101
53147
|
}
|
|
53102
53148
|
`;
|
|
53103
|
-
const FullWidthDiv$
|
|
53149
|
+
const FullWidthDiv$2 = styled.div`
|
|
53104
53150
|
display: flex;
|
|
53105
53151
|
justify-content: center;
|
|
53106
53152
|
width: 100%;
|
|
53107
53153
|
height: calc(100vh - ${({ $substractHeight }) => $substractHeight}px);
|
|
53108
53154
|
`;
|
|
53109
|
-
const Styled$
|
|
53110
|
-
FullWidthDiv: FullWidthDiv$
|
|
53111
|
-
CustomCard: CustomCard$
|
|
53155
|
+
const Styled$8 = {
|
|
53156
|
+
FullWidthDiv: FullWidthDiv$2,
|
|
53157
|
+
CustomCard: CustomCard$2
|
|
53112
53158
|
};
|
|
53113
53159
|
|
|
53114
53160
|
const XTerminal = ({ endpoint, namespace, podName, container, substractHeight }) => {
|
|
@@ -53187,7 +53233,7 @@ const XTerminal = ({ endpoint, namespace, podName, container, substractHeight })
|
|
|
53187
53233
|
};
|
|
53188
53234
|
}, [terminal, endpoint, namespace, podName, container]);
|
|
53189
53235
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
53190
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
53236
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$8.CustomCard, { $isVisible: isTerminalVisible, $substractHeight: substractHeight, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$8.FullWidthDiv, { $substractHeight: substractHeight, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: terminalRef, style: { width: "100%", height: "100%" } }) }) }),
|
|
53191
53237
|
isLoading && !error && /* @__PURE__ */ jsxRuntimeExports.jsx(Spin, {}),
|
|
53192
53238
|
error && /* @__PURE__ */ jsxRuntimeExports.jsx(Result, { status: "error", title: "Error", subTitle: JSON.stringify(error) })
|
|
53193
53239
|
] });
|
|
@@ -53198,7 +53244,7 @@ const CustomSelect$1 = styled.div`
|
|
|
53198
53244
|
width: 200px;
|
|
53199
53245
|
}
|
|
53200
53246
|
`;
|
|
53201
|
-
const Styled$
|
|
53247
|
+
const Styled$7 = {
|
|
53202
53248
|
CustomSelect: CustomSelect$1
|
|
53203
53249
|
};
|
|
53204
53250
|
|
|
@@ -53209,7 +53255,7 @@ const PodLogs = ({ cluster, namespace, podName, containers, substractHeight }) =
|
|
|
53209
53255
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: "No Running Containers" });
|
|
53210
53256
|
}
|
|
53211
53257
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
53212
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
53258
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$7.CustomSelect, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
53213
53259
|
Select,
|
|
53214
53260
|
{
|
|
53215
53261
|
placeholder: "Select container",
|
|
@@ -53238,12 +53284,12 @@ const PodLogs = ({ cluster, namespace, podName, containers, substractHeight }) =
|
|
|
53238
53284
|
] });
|
|
53239
53285
|
};
|
|
53240
53286
|
|
|
53241
|
-
const FullWidthDiv = styled.div`
|
|
53287
|
+
const FullWidthDiv$1 = styled.div`
|
|
53242
53288
|
display: flex;
|
|
53243
53289
|
justify-content: center;
|
|
53244
53290
|
width: 100%;
|
|
53245
53291
|
`;
|
|
53246
|
-
const CustomCard = styled.div`
|
|
53292
|
+
const CustomCard$1 = styled.div`
|
|
53247
53293
|
visibility: ${({ $isVisible }) => $isVisible ? "visible" : "hidden"};
|
|
53248
53294
|
max-height: calc(100vh - 158px);
|
|
53249
53295
|
|
|
@@ -53259,9 +53305,9 @@ const CursorPointerDiv$1 = styled.div`
|
|
|
53259
53305
|
cursor: pointer;
|
|
53260
53306
|
user-select: none;
|
|
53261
53307
|
`;
|
|
53262
|
-
const Styled$
|
|
53263
|
-
FullWidthDiv,
|
|
53264
|
-
CustomCard,
|
|
53308
|
+
const Styled$6 = {
|
|
53309
|
+
FullWidthDiv: FullWidthDiv$1,
|
|
53310
|
+
CustomCard: CustomCard$1,
|
|
53265
53311
|
VisibilityContainer,
|
|
53266
53312
|
CursorPointerDiv: CursorPointerDiv$1
|
|
53267
53313
|
};
|
|
@@ -53338,9 +53384,9 @@ const MonacoEditor = ({
|
|
|
53338
53384
|
};
|
|
53339
53385
|
}, [endpoint, namespace, podName, container, previous, editorReady]);
|
|
53340
53386
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
53341
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
53387
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$6.VisibilityContainer, { $isVisible: isTerminalVisible, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { justify: "start", align: "center", gap: 16, children: [
|
|
53342
53388
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
53343
|
-
Styled$
|
|
53389
|
+
Styled$6.CursorPointerDiv,
|
|
53344
53390
|
{
|
|
53345
53391
|
onClick: () => {
|
|
53346
53392
|
if (isPaused) {
|
|
@@ -53365,7 +53411,7 @@ const MonacoEditor = ({
|
|
|
53365
53411
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: isPaused ? "Not streaming events" : "Streaming events" })
|
|
53366
53412
|
] }) }),
|
|
53367
53413
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Spacer$1, { $space: 16, $samespace: true }),
|
|
53368
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
53414
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$6.CustomCard, { $isVisible: isTerminalVisible, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$6.FullWidthDiv, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
53369
53415
|
Ft$1,
|
|
53370
53416
|
{
|
|
53371
53417
|
defaultLanguage: "plaintext",
|
|
@@ -53396,7 +53442,7 @@ const CustomSelect = styled.div`
|
|
|
53396
53442
|
width: 200px;
|
|
53397
53443
|
}
|
|
53398
53444
|
`;
|
|
53399
|
-
const Styled$
|
|
53445
|
+
const Styled$5 = {
|
|
53400
53446
|
TopRowContent,
|
|
53401
53447
|
CustomSelect
|
|
53402
53448
|
};
|
|
@@ -53442,8 +53488,8 @@ const PodLogsMonaco = ({
|
|
|
53442
53488
|
}
|
|
53443
53489
|
];
|
|
53444
53490
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
53445
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
53446
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
53491
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$5.TopRowContent, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { gap: 16, children: [
|
|
53492
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$5.CustomSelect, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
53447
53493
|
Select,
|
|
53448
53494
|
{
|
|
53449
53495
|
placeholder: "Select container",
|
|
@@ -53458,7 +53504,7 @@ const PodLogsMonaco = ({
|
|
|
53458
53504
|
}
|
|
53459
53505
|
}
|
|
53460
53506
|
) }),
|
|
53461
|
-
currentContainer && /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
53507
|
+
currentContainer && /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$5.CustomSelect, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
53462
53508
|
Select,
|
|
53463
53509
|
{
|
|
53464
53510
|
placeholder: "Select current/previous",
|
|
@@ -53494,6 +53540,621 @@ const PodLogsMonaco = ({
|
|
|
53494
53540
|
] });
|
|
53495
53541
|
};
|
|
53496
53542
|
|
|
53543
|
+
const buildDefaultWsPath = (cluster, namespace, vmName) => {
|
|
53544
|
+
const base = cluster ? `/k8s/clusters/${encodeURIComponent(cluster)}` : `/k8s`;
|
|
53545
|
+
return `${base}/apis/subresources.kubevirt.io/v1/namespaces/${encodeURIComponent(
|
|
53546
|
+
namespace
|
|
53547
|
+
)}/virtualmachineinstances/${encodeURIComponent(vmName)}/vnc`;
|
|
53548
|
+
};
|
|
53549
|
+
const normalizePath = (p) => p.startsWith("/") ? p : `/${p}`;
|
|
53550
|
+
const useVNCClient = ({
|
|
53551
|
+
cluster,
|
|
53552
|
+
namespace,
|
|
53553
|
+
vmName,
|
|
53554
|
+
forcedFullWsPath
|
|
53555
|
+
}) => {
|
|
53556
|
+
const [isLoading, setIsLoading] = useState(true);
|
|
53557
|
+
const [error, setError] = useState(null);
|
|
53558
|
+
const [status, setStatus] = useState("Loading VNC client...");
|
|
53559
|
+
const [isConnected, setIsConnected] = useState(false);
|
|
53560
|
+
const [showDotCursor, setShowDotCursor] = useState(false);
|
|
53561
|
+
const [scalingMode, setScalingModeState] = useState("local");
|
|
53562
|
+
const [screenEl, setScreenEl] = useState(null);
|
|
53563
|
+
const screenRef = useCallback((node) => {
|
|
53564
|
+
setScreenEl(node);
|
|
53565
|
+
}, []);
|
|
53566
|
+
const rfbRef = useRef(null);
|
|
53567
|
+
const [isManuallyDisconnected, setIsManuallyDisconnected] = useState(false);
|
|
53568
|
+
const [, setReconnectAttempts] = useState(0);
|
|
53569
|
+
const [shouldReconnect, setShouldReconnect] = useState(true);
|
|
53570
|
+
const [connectionKey, setConnectionKey] = useState(0);
|
|
53571
|
+
const reconnectTimeoutRef = useRef(null);
|
|
53572
|
+
const isManuallyDisconnectedRef = useRef(false);
|
|
53573
|
+
const shouldReconnectRef = useRef(true);
|
|
53574
|
+
const showDotCursorRef = useRef(showDotCursor);
|
|
53575
|
+
const maxReconnectAttempts = 5;
|
|
53576
|
+
const reconnectDelay = 3e3;
|
|
53577
|
+
useEffect(() => {
|
|
53578
|
+
isManuallyDisconnectedRef.current = isManuallyDisconnected;
|
|
53579
|
+
}, [isManuallyDisconnected]);
|
|
53580
|
+
useEffect(() => {
|
|
53581
|
+
shouldReconnectRef.current = shouldReconnect;
|
|
53582
|
+
}, [shouldReconnect]);
|
|
53583
|
+
useEffect(() => {
|
|
53584
|
+
showDotCursorRef.current = showDotCursor;
|
|
53585
|
+
if (rfbRef.current && typeof rfbRef.current.showDotCursor !== "undefined") {
|
|
53586
|
+
try {
|
|
53587
|
+
rfbRef.current.showDotCursor = showDotCursor;
|
|
53588
|
+
} catch (err) {
|
|
53589
|
+
console.error("Error updating dot cursor:", err);
|
|
53590
|
+
}
|
|
53591
|
+
}
|
|
53592
|
+
}, [showDotCursor, isConnected]);
|
|
53593
|
+
const applyScalingMode = (rfb, mode) => {
|
|
53594
|
+
if (!rfb) return;
|
|
53595
|
+
if (mode === "none") {
|
|
53596
|
+
rfb.scaleViewport = false;
|
|
53597
|
+
rfb.resizeSession = false;
|
|
53598
|
+
} else if (mode === "local") {
|
|
53599
|
+
rfb.scaleViewport = true;
|
|
53600
|
+
rfb.resizeSession = false;
|
|
53601
|
+
} else {
|
|
53602
|
+
rfb.scaleViewport = false;
|
|
53603
|
+
rfb.resizeSession = true;
|
|
53604
|
+
}
|
|
53605
|
+
};
|
|
53606
|
+
const setScalingMode = useCallback((mode) => {
|
|
53607
|
+
setScalingModeState(mode);
|
|
53608
|
+
if (rfbRef.current) {
|
|
53609
|
+
applyScalingMode(rfbRef.current, mode);
|
|
53610
|
+
}
|
|
53611
|
+
}, []);
|
|
53612
|
+
useEffect(() => {
|
|
53613
|
+
console.log("[VMVNC hook] effect run", {
|
|
53614
|
+
cluster,
|
|
53615
|
+
namespace,
|
|
53616
|
+
vmName,
|
|
53617
|
+
connectionKey,
|
|
53618
|
+
hasScreenEl: !!screenEl,
|
|
53619
|
+
forcedFullWsPath
|
|
53620
|
+
});
|
|
53621
|
+
const hasForced = !!forcedFullWsPath;
|
|
53622
|
+
const hasNamespaceVm = !!namespace && !!vmName;
|
|
53623
|
+
if (!hasForced && !hasNamespaceVm) {
|
|
53624
|
+
setIsLoading(false);
|
|
53625
|
+
setIsConnected(false);
|
|
53626
|
+
setStatus("VNC not configured");
|
|
53627
|
+
setError("Provide forcedFullWsPath or both namespace and vmName for VNC connection");
|
|
53628
|
+
return;
|
|
53629
|
+
}
|
|
53630
|
+
if (!screenEl) {
|
|
53631
|
+
setIsLoading(true);
|
|
53632
|
+
setError(null);
|
|
53633
|
+
setStatus("Waiting for VNC container...");
|
|
53634
|
+
return;
|
|
53635
|
+
}
|
|
53636
|
+
if (reconnectTimeoutRef.current) {
|
|
53637
|
+
window.clearTimeout(reconnectTimeoutRef.current);
|
|
53638
|
+
reconnectTimeoutRef.current = null;
|
|
53639
|
+
}
|
|
53640
|
+
setIsLoading(true);
|
|
53641
|
+
setError(null);
|
|
53642
|
+
setStatus("Connecting...");
|
|
53643
|
+
const protocol = window.location.protocol === "https:" ? "wss:" : "ws:";
|
|
53644
|
+
const { host } = window.location;
|
|
53645
|
+
const defaultWsPath = namespace && vmName ? buildDefaultWsPath(cluster, namespace, vmName) : void 0;
|
|
53646
|
+
const wsPath = (() => {
|
|
53647
|
+
if (forcedFullWsPath && !forcedFullWsPath.startsWith("ws")) {
|
|
53648
|
+
return normalizePath(forcedFullWsPath);
|
|
53649
|
+
}
|
|
53650
|
+
return defaultWsPath;
|
|
53651
|
+
})();
|
|
53652
|
+
const wsUrl = forcedFullWsPath && forcedFullWsPath.startsWith("ws") ? forcedFullWsPath : `${protocol}//${host}${wsPath ?? ""}`;
|
|
53653
|
+
console.log(`[VMVNC ${namespace ?? "no-ns"}/${vmName ?? "no-vm"}]: WebSocket URL: ${wsUrl}`);
|
|
53654
|
+
console.log(`[VMVNC ${namespace ?? "no-ns"}/${vmName ?? "no-vm"}]: WebSocket path: ${wsPath}`);
|
|
53655
|
+
if (!forcedFullWsPath?.startsWith("ws") && !wsPath) {
|
|
53656
|
+
setIsLoading(false);
|
|
53657
|
+
setIsConnected(false);
|
|
53658
|
+
setStatus("VNC not configured");
|
|
53659
|
+
setError("Unable to build WebSocket path. Provide forcedFullWsPath or namespace+vmName.");
|
|
53660
|
+
return;
|
|
53661
|
+
}
|
|
53662
|
+
let cancelled = false;
|
|
53663
|
+
try {
|
|
53664
|
+
const rfb = new RFB(screenEl, wsUrl, {
|
|
53665
|
+
credentials: { password: "" },
|
|
53666
|
+
showDotCursor: showDotCursorRef.current
|
|
53667
|
+
});
|
|
53668
|
+
rfbRef.current = rfb;
|
|
53669
|
+
applyScalingMode(rfb, scalingMode);
|
|
53670
|
+
if (typeof rfb.showDotCursor !== "undefined") {
|
|
53671
|
+
try {
|
|
53672
|
+
rfb.showDotCursor = showDotCursorRef.current;
|
|
53673
|
+
} catch (err) {
|
|
53674
|
+
console.error("Error setting dot cursor on RFB instance:", err);
|
|
53675
|
+
}
|
|
53676
|
+
}
|
|
53677
|
+
const handleConnect = () => {
|
|
53678
|
+
if (cancelled) return;
|
|
53679
|
+
console.log(`[VMVNC ${namespace}/${vmName}]: Connected`);
|
|
53680
|
+
setStatus("Connected");
|
|
53681
|
+
setIsLoading(false);
|
|
53682
|
+
setError(null);
|
|
53683
|
+
setIsConnected(true);
|
|
53684
|
+
setReconnectAttempts(0);
|
|
53685
|
+
if (reconnectTimeoutRef.current) {
|
|
53686
|
+
window.clearTimeout(reconnectTimeoutRef.current);
|
|
53687
|
+
reconnectTimeoutRef.current = null;
|
|
53688
|
+
}
|
|
53689
|
+
};
|
|
53690
|
+
const handleDisconnect = (e) => {
|
|
53691
|
+
if (cancelled) return;
|
|
53692
|
+
const detail = e?.detail;
|
|
53693
|
+
const wasManuallyDisconnected = isManuallyDisconnectedRef.current;
|
|
53694
|
+
const autoReconnectEnabled = shouldReconnectRef.current;
|
|
53695
|
+
console.log(
|
|
53696
|
+
`[VMVNC ${namespace}/${vmName}]: Disconnected (clean=${detail?.clean}, manual=${wasManuallyDisconnected}, autoReconnect=${autoReconnectEnabled})`
|
|
53697
|
+
);
|
|
53698
|
+
setIsConnected(false);
|
|
53699
|
+
setIsLoading(false);
|
|
53700
|
+
if (wasManuallyDisconnected) {
|
|
53701
|
+
setStatus("Disconnected");
|
|
53702
|
+
setError(null);
|
|
53703
|
+
return;
|
|
53704
|
+
}
|
|
53705
|
+
if (!autoReconnectEnabled) {
|
|
53706
|
+
if (detail?.clean) {
|
|
53707
|
+
setStatus("Disconnected");
|
|
53708
|
+
} else {
|
|
53709
|
+
setStatus("Connection closed");
|
|
53710
|
+
setError("Connection closed unexpectedly");
|
|
53711
|
+
}
|
|
53712
|
+
return;
|
|
53713
|
+
}
|
|
53714
|
+
if (detail?.clean) {
|
|
53715
|
+
setStatus("Disconnected - Reconnecting...");
|
|
53716
|
+
setError(null);
|
|
53717
|
+
} else {
|
|
53718
|
+
setStatus("Connection closed - Reconnecting...");
|
|
53719
|
+
setError("Connection closed unexpectedly");
|
|
53720
|
+
}
|
|
53721
|
+
reconnectTimeoutRef.current = window.setTimeout(() => {
|
|
53722
|
+
if (isManuallyDisconnectedRef.current || !shouldReconnectRef.current) {
|
|
53723
|
+
console.log(`[VMVNC ${namespace}/${vmName}]: Reconnect cancelled before attempting`);
|
|
53724
|
+
return;
|
|
53725
|
+
}
|
|
53726
|
+
setReconnectAttempts((prev) => {
|
|
53727
|
+
const next = prev + 1;
|
|
53728
|
+
if (next > maxReconnectAttempts) {
|
|
53729
|
+
console.log(`[VMVNC ${namespace}/${vmName}]: Max reconnect attempts reached (${maxReconnectAttempts})`);
|
|
53730
|
+
setStatus("Connection failed - Max reconnect attempts reached");
|
|
53731
|
+
setError("Failed to reconnect after multiple attempts");
|
|
53732
|
+
setIsLoading(false);
|
|
53733
|
+
setShouldReconnect(false);
|
|
53734
|
+
return prev;
|
|
53735
|
+
}
|
|
53736
|
+
console.log(
|
|
53737
|
+
`[VMVNC ${namespace}/${vmName}]: Reconnect attempt ${next}/${maxReconnectAttempts} (bump connectionKey)`
|
|
53738
|
+
);
|
|
53739
|
+
setStatus(`Reconnecting... (Attempt ${next}/${maxReconnectAttempts})`);
|
|
53740
|
+
setIsLoading(true);
|
|
53741
|
+
setError(null);
|
|
53742
|
+
setConnectionKey((k) => k + 1);
|
|
53743
|
+
return next;
|
|
53744
|
+
});
|
|
53745
|
+
}, reconnectDelay);
|
|
53746
|
+
};
|
|
53747
|
+
const handleCredentialsRequired = () => {
|
|
53748
|
+
if (cancelled) return;
|
|
53749
|
+
console.log(`[VMVNC ${namespace}/${vmName}]: Credentials required`);
|
|
53750
|
+
setStatus("Credentials required");
|
|
53751
|
+
};
|
|
53752
|
+
const handleSecurityFailure = (e) => {
|
|
53753
|
+
if (cancelled) return;
|
|
53754
|
+
const detail = e?.detail;
|
|
53755
|
+
console.error(`[VMVNC ${namespace}/${vmName}]: Security failure`, detail);
|
|
53756
|
+
setError(`Security failure: ${detail?.reason || "Unknown error"}`);
|
|
53757
|
+
setIsLoading(false);
|
|
53758
|
+
setIsConnected(false);
|
|
53759
|
+
};
|
|
53760
|
+
const handleDesktopName = (e) => {
|
|
53761
|
+
if (cancelled) return;
|
|
53762
|
+
const detail = e?.detail;
|
|
53763
|
+
if (detail?.name) {
|
|
53764
|
+
console.log(`[VMVNC ${namespace}/${vmName}]: Desktop name: ${detail.name}`);
|
|
53765
|
+
setStatus(`Connected to ${detail.name}`);
|
|
53766
|
+
}
|
|
53767
|
+
};
|
|
53768
|
+
rfb.addEventListener("connect", handleConnect);
|
|
53769
|
+
rfb.addEventListener("disconnect", handleDisconnect);
|
|
53770
|
+
rfb.addEventListener("credentialsrequired", handleCredentialsRequired);
|
|
53771
|
+
rfb.addEventListener("securityfailure", handleSecurityFailure);
|
|
53772
|
+
rfb.addEventListener("desktopname", handleDesktopName);
|
|
53773
|
+
return () => {
|
|
53774
|
+
cancelled = true;
|
|
53775
|
+
console.log(`[VMVNC ${namespace}/${vmName}]: Cleaning up connection`);
|
|
53776
|
+
if (reconnectTimeoutRef.current) {
|
|
53777
|
+
window.clearTimeout(reconnectTimeoutRef.current);
|
|
53778
|
+
reconnectTimeoutRef.current = null;
|
|
53779
|
+
}
|
|
53780
|
+
if (rfbRef.current) {
|
|
53781
|
+
try {
|
|
53782
|
+
rfbRef.current.disconnect();
|
|
53783
|
+
} catch (err) {
|
|
53784
|
+
console.error("Error disconnecting RFB during cleanup:", err);
|
|
53785
|
+
}
|
|
53786
|
+
rfbRef.current = null;
|
|
53787
|
+
}
|
|
53788
|
+
if (screenEl) {
|
|
53789
|
+
while (screenEl.firstChild) {
|
|
53790
|
+
screenEl.removeChild(screenEl.firstChild);
|
|
53791
|
+
}
|
|
53792
|
+
}
|
|
53793
|
+
};
|
|
53794
|
+
} catch (err) {
|
|
53795
|
+
console.error(`[VMVNC ${namespace}/${vmName}]: Error creating RFB connection:`, err);
|
|
53796
|
+
setError(`Failed to create VNC connection: ${err instanceof Error ? err.message : "Unknown error"}`);
|
|
53797
|
+
setIsLoading(false);
|
|
53798
|
+
setIsConnected(false);
|
|
53799
|
+
setStatus("Failed to create VNC connection");
|
|
53800
|
+
}
|
|
53801
|
+
}, [cluster, namespace, vmName, forcedFullWsPath, scalingMode, connectionKey, screenEl]);
|
|
53802
|
+
const disconnect = useCallback(() => {
|
|
53803
|
+
isManuallyDisconnectedRef.current = true;
|
|
53804
|
+
shouldReconnectRef.current = false;
|
|
53805
|
+
setIsManuallyDisconnected(true);
|
|
53806
|
+
setShouldReconnect(false);
|
|
53807
|
+
if (reconnectTimeoutRef.current) {
|
|
53808
|
+
window.clearTimeout(reconnectTimeoutRef.current);
|
|
53809
|
+
reconnectTimeoutRef.current = null;
|
|
53810
|
+
}
|
|
53811
|
+
if (rfbRef.current) {
|
|
53812
|
+
try {
|
|
53813
|
+
rfbRef.current.disconnect();
|
|
53814
|
+
} catch (err) {
|
|
53815
|
+
console.error("Error disconnecting RFB:", err);
|
|
53816
|
+
}
|
|
53817
|
+
rfbRef.current = null;
|
|
53818
|
+
}
|
|
53819
|
+
setStatus("Disconnected");
|
|
53820
|
+
setIsLoading(false);
|
|
53821
|
+
setIsConnected(false);
|
|
53822
|
+
}, []);
|
|
53823
|
+
const reconnect = useCallback(() => {
|
|
53824
|
+
isManuallyDisconnectedRef.current = false;
|
|
53825
|
+
shouldReconnectRef.current = true;
|
|
53826
|
+
setIsManuallyDisconnected(false);
|
|
53827
|
+
setShouldReconnect(true);
|
|
53828
|
+
setReconnectAttempts(0);
|
|
53829
|
+
setError(null);
|
|
53830
|
+
setIsLoading(true);
|
|
53831
|
+
setStatus("Reconnecting...");
|
|
53832
|
+
if (reconnectTimeoutRef.current) {
|
|
53833
|
+
window.clearTimeout(reconnectTimeoutRef.current);
|
|
53834
|
+
reconnectTimeoutRef.current = null;
|
|
53835
|
+
}
|
|
53836
|
+
if (rfbRef.current) {
|
|
53837
|
+
try {
|
|
53838
|
+
rfbRef.current.disconnect();
|
|
53839
|
+
} catch (err) {
|
|
53840
|
+
console.error("Error disconnecting RFB before manual reconnect:", err);
|
|
53841
|
+
}
|
|
53842
|
+
rfbRef.current = null;
|
|
53843
|
+
}
|
|
53844
|
+
setConnectionKey((k) => k + 1);
|
|
53845
|
+
}, []);
|
|
53846
|
+
const sendCtrlAltDel = () => {
|
|
53847
|
+
if (!rfbRef.current) return;
|
|
53848
|
+
try {
|
|
53849
|
+
rfbRef.current.sendCtrlAltDel();
|
|
53850
|
+
} catch (err) {
|
|
53851
|
+
console.error("Error sending Ctrl+Alt+Del:", err);
|
|
53852
|
+
}
|
|
53853
|
+
};
|
|
53854
|
+
return {
|
|
53855
|
+
screenRef,
|
|
53856
|
+
isLoading,
|
|
53857
|
+
error,
|
|
53858
|
+
status,
|
|
53859
|
+
isConnected,
|
|
53860
|
+
showDotCursor,
|
|
53861
|
+
scalingMode,
|
|
53862
|
+
setShowDotCursor,
|
|
53863
|
+
setScalingMode,
|
|
53864
|
+
disconnect,
|
|
53865
|
+
reconnect,
|
|
53866
|
+
sendCtrlAltDel
|
|
53867
|
+
};
|
|
53868
|
+
};
|
|
53869
|
+
|
|
53870
|
+
const ShowCursorDiv = styled.div`
|
|
53871
|
+
display: flex;
|
|
53872
|
+
justify-content: space-between;
|
|
53873
|
+
align-items: center;
|
|
53874
|
+
min-width: 200px;
|
|
53875
|
+
`;
|
|
53876
|
+
const ScalingModeContainer = styled.div`
|
|
53877
|
+
min-width: 200px;
|
|
53878
|
+
`;
|
|
53879
|
+
const ScalingModeTitle = styled.div`
|
|
53880
|
+
margin-bottom: 8px;
|
|
53881
|
+
font-weight: 500;
|
|
53882
|
+
`;
|
|
53883
|
+
const StatusBar = styled.div`
|
|
53884
|
+
background-color: #2d2d2d;
|
|
53885
|
+
color: white;
|
|
53886
|
+
padding: 8px 16px;
|
|
53887
|
+
font-size: 12px;
|
|
53888
|
+
border-bottom: 1px solid #3d3d3d;
|
|
53889
|
+
display: flex;
|
|
53890
|
+
align-items: center;
|
|
53891
|
+
justify-content: flex-start;
|
|
53892
|
+
flex-shrink: 0;
|
|
53893
|
+
z-index: 10;
|
|
53894
|
+
flex-wrap: wrap;
|
|
53895
|
+
gap: 4px;
|
|
53896
|
+
`;
|
|
53897
|
+
const StatusDivider = styled.span`
|
|
53898
|
+
color: #666;
|
|
53899
|
+
margin: 0 8px;
|
|
53900
|
+
user-select: none;
|
|
53901
|
+
`;
|
|
53902
|
+
const Styled$4 = {
|
|
53903
|
+
ShowCursorDiv,
|
|
53904
|
+
ScalingModeContainer,
|
|
53905
|
+
ScalingModeTitle,
|
|
53906
|
+
StatusBar,
|
|
53907
|
+
StatusDivider
|
|
53908
|
+
};
|
|
53909
|
+
|
|
53910
|
+
const VMVNCToolbar = ({
|
|
53911
|
+
status,
|
|
53912
|
+
isConnected,
|
|
53913
|
+
isFullscreen,
|
|
53914
|
+
isLoading,
|
|
53915
|
+
showDotCursor,
|
|
53916
|
+
scalingMode,
|
|
53917
|
+
onSendCtrlAltDel,
|
|
53918
|
+
onToggleFullscreen,
|
|
53919
|
+
onReconnect,
|
|
53920
|
+
onShowDotCursorChange,
|
|
53921
|
+
onScalingModeChange
|
|
53922
|
+
}) => {
|
|
53923
|
+
const optionsMenuItems = useMemo(
|
|
53924
|
+
() => [
|
|
53925
|
+
{
|
|
53926
|
+
key: "show-cursor",
|
|
53927
|
+
label: /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$4.ShowCursorDiv, { children: [
|
|
53928
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Show Cursor" }),
|
|
53929
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Switch, { checked: showDotCursor, onChange: onShowDotCursorChange, disabled: !isConnected, size: "small" })
|
|
53930
|
+
] })
|
|
53931
|
+
},
|
|
53932
|
+
{
|
|
53933
|
+
type: "divider"
|
|
53934
|
+
},
|
|
53935
|
+
{
|
|
53936
|
+
key: "scaling-mode",
|
|
53937
|
+
label: /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$4.ScalingModeContainer, { children: [
|
|
53938
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$4.ScalingModeTitle, { children: "Scaling Mode" }),
|
|
53939
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
53940
|
+
Radio.Group,
|
|
53941
|
+
{
|
|
53942
|
+
value: scalingMode,
|
|
53943
|
+
onChange: (e) => onScalingModeChange(e.target.value),
|
|
53944
|
+
disabled: !isConnected,
|
|
53945
|
+
style: { display: "flex", flexDirection: "column", gap: 8 },
|
|
53946
|
+
children: [
|
|
53947
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Radio, { value: "none", children: "None" }),
|
|
53948
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Radio, { value: "local", children: "Local scaling" }),
|
|
53949
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Radio, { value: "remote", children: "Remote resizing" })
|
|
53950
|
+
]
|
|
53951
|
+
}
|
|
53952
|
+
)
|
|
53953
|
+
] })
|
|
53954
|
+
}
|
|
53955
|
+
],
|
|
53956
|
+
[showDotCursor, scalingMode, isConnected, onShowDotCursorChange, onScalingModeChange]
|
|
53957
|
+
);
|
|
53958
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$4.StatusBar, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Space, { size: "small", children: [
|
|
53959
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: "Send Ctrl+Alt+Del", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
53960
|
+
Button,
|
|
53961
|
+
{
|
|
53962
|
+
type: "text",
|
|
53963
|
+
size: "small",
|
|
53964
|
+
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(PoweroffOutlined, {}),
|
|
53965
|
+
onClick: onSendCtrlAltDel,
|
|
53966
|
+
disabled: !isConnected,
|
|
53967
|
+
style: { color: "#ffffff" },
|
|
53968
|
+
children: "Send Ctrl+Alt+Del"
|
|
53969
|
+
}
|
|
53970
|
+
) }),
|
|
53971
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: isFullscreen ? "Exit Fullscreen" : "Fullscreen", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
53972
|
+
Button,
|
|
53973
|
+
{
|
|
53974
|
+
type: "text",
|
|
53975
|
+
size: "small",
|
|
53976
|
+
icon: isFullscreen ? /* @__PURE__ */ jsxRuntimeExports.jsx(FullscreenExitOutlined, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(FullscreenOutlined, {}),
|
|
53977
|
+
onClick: onToggleFullscreen,
|
|
53978
|
+
disabled: !isConnected,
|
|
53979
|
+
style: { color: "#ffffff" },
|
|
53980
|
+
children: "Fullscreen"
|
|
53981
|
+
}
|
|
53982
|
+
) }),
|
|
53983
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Dropdown, { menu: { items: optionsMenuItems }, trigger: ["click"], placement: "bottomRight", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { type: "text", size: "small", icon: /* @__PURE__ */ jsxRuntimeExports.jsx(SettingOutlined, {}), style: { color: "#ffffff" }, children: "Options" }) }),
|
|
53984
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: "Reconnect", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
53985
|
+
Button,
|
|
53986
|
+
{
|
|
53987
|
+
type: "text",
|
|
53988
|
+
size: "small",
|
|
53989
|
+
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(ReloadOutlined, {}),
|
|
53990
|
+
onClick: onReconnect,
|
|
53991
|
+
loading: isLoading,
|
|
53992
|
+
style: { color: "#ffffff" },
|
|
53993
|
+
children: "Reconnect"
|
|
53994
|
+
}
|
|
53995
|
+
) }),
|
|
53996
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$4.StatusDivider, { children: "|" }),
|
|
53997
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: status })
|
|
53998
|
+
] }) });
|
|
53999
|
+
};
|
|
54000
|
+
|
|
54001
|
+
const Container = styled.div`
|
|
54002
|
+
height: calc(100vh - ${({ $substractHeight }) => $substractHeight}px);
|
|
54003
|
+
display: flex;
|
|
54004
|
+
flex-direction: column;
|
|
54005
|
+
background-color: #1e1e1e;
|
|
54006
|
+
position: relative;
|
|
54007
|
+
|
|
54008
|
+
* {
|
|
54009
|
+
scrollbar-width: thin;
|
|
54010
|
+
}
|
|
54011
|
+
`;
|
|
54012
|
+
const CustomCard = styled.div`
|
|
54013
|
+
visibility: ${({ $isVisible }) => $isVisible ? "visible" : "hidden"};
|
|
54014
|
+
height: 100%;
|
|
54015
|
+
display: flex;
|
|
54016
|
+
flex-direction: column;
|
|
54017
|
+
background-color: #1e1e1e;
|
|
54018
|
+
position: relative;
|
|
54019
|
+
|
|
54020
|
+
* {
|
|
54021
|
+
scrollbar-width: thin;
|
|
54022
|
+
}
|
|
54023
|
+
`;
|
|
54024
|
+
const ContentWrapper = styled.div`
|
|
54025
|
+
display: flex;
|
|
54026
|
+
flex: 1;
|
|
54027
|
+
overflow: hidden;
|
|
54028
|
+
position: relative;
|
|
54029
|
+
min-width: 0; /* Allow flex item to shrink */
|
|
54030
|
+
`;
|
|
54031
|
+
const FullWidthDiv = styled.div`
|
|
54032
|
+
display: flex;
|
|
54033
|
+
justify-content: center;
|
|
54034
|
+
align-items: center;
|
|
54035
|
+
flex: 1;
|
|
54036
|
+
overflow: hidden;
|
|
54037
|
+
background-color: black;
|
|
54038
|
+
min-width: 0; /* Allow flex item to shrink */
|
|
54039
|
+
transition: margin-right 0.3s ease;
|
|
54040
|
+
`;
|
|
54041
|
+
const LoadingContainer = styled.div`
|
|
54042
|
+
display: flex;
|
|
54043
|
+
flex-direction: column;
|
|
54044
|
+
align-items: center;
|
|
54045
|
+
justify-content: center;
|
|
54046
|
+
padding: 40px;
|
|
54047
|
+
color: white;
|
|
54048
|
+
`;
|
|
54049
|
+
const ErrorContainer = styled.div`
|
|
54050
|
+
display: flex;
|
|
54051
|
+
flex-direction: column;
|
|
54052
|
+
align-items: center;
|
|
54053
|
+
justify-content: center;
|
|
54054
|
+
padding: 40px;
|
|
54055
|
+
color: white;
|
|
54056
|
+
`;
|
|
54057
|
+
const Styled$3 = {
|
|
54058
|
+
Container,
|
|
54059
|
+
CustomCard,
|
|
54060
|
+
ContentWrapper,
|
|
54061
|
+
FullWidthDiv,
|
|
54062
|
+
LoadingContainer,
|
|
54063
|
+
ErrorContainer
|
|
54064
|
+
};
|
|
54065
|
+
|
|
54066
|
+
const VMVNC = ({ cluster, namespace, vmName, forcedFullWsPath, substractHeight }) => {
|
|
54067
|
+
const containerRef = useRef(null);
|
|
54068
|
+
const [isFullscreen, setIsFullscreen] = useState(false);
|
|
54069
|
+
const {
|
|
54070
|
+
screenRef,
|
|
54071
|
+
isLoading,
|
|
54072
|
+
error,
|
|
54073
|
+
status,
|
|
54074
|
+
isConnected,
|
|
54075
|
+
showDotCursor,
|
|
54076
|
+
scalingMode,
|
|
54077
|
+
setShowDotCursor,
|
|
54078
|
+
setScalingMode,
|
|
54079
|
+
disconnect,
|
|
54080
|
+
reconnect,
|
|
54081
|
+
sendCtrlAltDel
|
|
54082
|
+
} = useVNCClient({ cluster, namespace, vmName, forcedFullWsPath });
|
|
54083
|
+
const handleToggleFullscreen = () => {
|
|
54084
|
+
const element = containerRef.current;
|
|
54085
|
+
if (!element) return;
|
|
54086
|
+
if (!isFullscreen) {
|
|
54087
|
+
if (element.requestFullscreen) {
|
|
54088
|
+
element.requestFullscreen();
|
|
54089
|
+
} else if (element.webkitRequestFullscreen) {
|
|
54090
|
+
element.webkitRequestFullscreen();
|
|
54091
|
+
} else if (element.msRequestFullscreen) {
|
|
54092
|
+
element.msRequestFullscreen();
|
|
54093
|
+
}
|
|
54094
|
+
return;
|
|
54095
|
+
}
|
|
54096
|
+
const fullscreenDoc = document;
|
|
54097
|
+
if (fullscreenDoc.exitFullscreen) {
|
|
54098
|
+
fullscreenDoc.exitFullscreen();
|
|
54099
|
+
} else if (fullscreenDoc.webkitExitFullscreen) {
|
|
54100
|
+
fullscreenDoc.webkitExitFullscreen();
|
|
54101
|
+
} else if (fullscreenDoc.msExitFullscreen) {
|
|
54102
|
+
fullscreenDoc.msExitFullscreen();
|
|
54103
|
+
}
|
|
54104
|
+
};
|
|
54105
|
+
useEffect(() => {
|
|
54106
|
+
const handleFullscreenChange = () => {
|
|
54107
|
+
setIsFullscreen(!!document.fullscreenElement);
|
|
54108
|
+
};
|
|
54109
|
+
document.addEventListener("fullscreenchange", handleFullscreenChange);
|
|
54110
|
+
document.addEventListener("webkitfullscreenchange", handleFullscreenChange);
|
|
54111
|
+
document.addEventListener("msfullscreenchange", handleFullscreenChange);
|
|
54112
|
+
return () => {
|
|
54113
|
+
document.removeEventListener("fullscreenchange", handleFullscreenChange);
|
|
54114
|
+
document.removeEventListener("webkitfullscreenchange", handleFullscreenChange);
|
|
54115
|
+
document.removeEventListener("msfullscreenchange", handleFullscreenChange);
|
|
54116
|
+
};
|
|
54117
|
+
}, []);
|
|
54118
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$3.Container, { ref: containerRef, $substractHeight: substractHeight, children: [
|
|
54119
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$3.CustomCard, { $isVisible: !isLoading && !error, $substractHeight: substractHeight, children: [
|
|
54120
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
54121
|
+
VMVNCToolbar,
|
|
54122
|
+
{
|
|
54123
|
+
status,
|
|
54124
|
+
isConnected,
|
|
54125
|
+
isFullscreen,
|
|
54126
|
+
isLoading,
|
|
54127
|
+
showDotCursor,
|
|
54128
|
+
scalingMode,
|
|
54129
|
+
onSendCtrlAltDel: sendCtrlAltDel,
|
|
54130
|
+
onToggleFullscreen: handleToggleFullscreen,
|
|
54131
|
+
onReconnect: reconnect,
|
|
54132
|
+
onShowDotCursorChange: setShowDotCursor,
|
|
54133
|
+
onScalingModeChange: setScalingMode
|
|
54134
|
+
}
|
|
54135
|
+
),
|
|
54136
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$3.ContentWrapper, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$3.FullWidthDiv, { $substractHeight: substractHeight, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { width: "100%", height: "100%" }, ref: screenRef }) }) })
|
|
54137
|
+
] }),
|
|
54138
|
+
isLoading && !error && /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$3.LoadingContainer, { children: [
|
|
54139
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Spin, { size: "large" }),
|
|
54140
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Spacer$1, { $space: 16, $samespace: true }),
|
|
54141
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: status })
|
|
54142
|
+
] }),
|
|
54143
|
+
error && !isLoading && /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$3.ErrorContainer, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
54144
|
+
Result,
|
|
54145
|
+
{
|
|
54146
|
+
status: "error",
|
|
54147
|
+
title: "VNC Connection Error",
|
|
54148
|
+
subTitle: error,
|
|
54149
|
+
extra: /* @__PURE__ */ jsxRuntimeExports.jsxs(Space, { children: [
|
|
54150
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Button, { onClick: disconnect, children: "Disconnect" }),
|
|
54151
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Button, { type: "primary", onClick: reconnect, loading: isLoading, children: "Reconnect" })
|
|
54152
|
+
] })
|
|
54153
|
+
}
|
|
54154
|
+
) })
|
|
54155
|
+
] });
|
|
54156
|
+
};
|
|
54157
|
+
|
|
53497
54158
|
const SelectTag = styled(Tag)`
|
|
53498
54159
|
margin-inline-end: 4px;
|
|
53499
54160
|
padding: 4px 6px;
|
|
@@ -55162,5 +55823,5 @@ const useResourceScope = ({ plural, cluster, apiGroup, apiVersion }) => {
|
|
|
55162
55823
|
});
|
|
55163
55824
|
};
|
|
55164
55825
|
|
|
55165
|
-
export { BackToDefaultIcon, BlackholeForm, BlackholeFormProvider, ContentCard$1 as ContentCard, CursorDefaultDiv, CursorPointerTag, CursorPointerTagMinContent, CustomSelect$4 as CustomSelect, DeleteIcon, DeleteModal, DeleteModalMany, DownIcon, DynamicComponents, DynamicRenderer, DynamicRendererWithProviders, EarthIcon, EditIcon, EnrichedTable, EnrichedTableProvider, Events, FlexGrow, LockedIcon, LookingGlassIcon, ManageableBreadcrumbs, ManageableBreadcrumbsProvider, ManageableSidebar, ManageableSidebarProvider, MarketPlace, MarketplaceCard, MinusIcon, NodeTerminal, PaddingContainer, PauseCircleIcon, PlusIcon, PodLogs, PodLogsMonaco, PodTerminal, ProjectInfoCard, ResourceLink, ResumeCircleIcon, Search, Spacer$1 as Spacer, SuccessIcon, TreeWithSearch, UncontrolledSelect, UnlockedIcon, UpIcon, YamlEditorSingleton$1 as YamlEditorSingleton, checkIfApiInstanceNamespaceScoped, checkIfBuiltInInstanceNamespaceScoped, checkPermission, convertBytes, convertCompute, convertCores, convertStorage, createContextFactory, createNewEntry, deepMerge, deleteEntry, feedbackIcons, filterIfApiInstanceNamespaceScoped, filterIfBuiltInInstanceNamespaceScoped, filterSelectOptions, floorToDecimal, formatBytesAuto, formatCoresAuto, getAllPathsFromObj, getApiResourceSingle, getApiResourceTypes, getApiResourceTypesByApiGroup, getApiResources, getBuiltinResourceSingle, getBuiltinResourceTypes, getBuiltinResources, getBuiltinTreeData, getClusterList, getCrdData, getCrdResourceSingle, getCrdResources, getDirectUnknownResource, getEnrichedColumns, getEnrichedColumnsWithControls, getGroupsByCategory, getKinds, getLinkToApiForm, getLinkToBuiltinForm, getLinkToForm, getNamespaceLink, getObjectFormItemsDraft, getPrefixSubarrays, getResourceLink, getSortedKinds, getSortedKindsAll, getStringByName, getSwagger, getUppercase, groupsToTreeData, hslFromString, includesArray, isFlatObject, isMultilineFromYaml, isMultilineString, kindByGvr, namespacedByGvr, normalizeValuesForQuotasToNumber, parseCoresWithUnit, parseQuotaValue, parseQuotaValueCpu, parseQuotaValueMemoryAndStorage, parseValueWithUnit, pluralByKind, prepareDataForManageableBreadcrumbs, prepareDataForManageableSidebar, prepareTemplate, prepareUrlsToFetchForDynamicRenderer, toBytes, toCores, updateEntry, useApiResourceSingle, useApiResourceTypesByGroup, useApiResources, useApisResourceTypes, useBuiltinResourceSingle, useBuiltinResourceTypes, useBuiltinResources, useClusterList, useCrdData, useCrdResourceSingle, useCrdResources, useDirectUnknownResource, useInfiniteSentinel, useK8sSmartResource, useK8sVerbs, useListWatch, useManyK8sSmartResource, usePermissions, useResourceScope, useSmartResourceParams };
|
|
55826
|
+
export { BackToDefaultIcon, BlackholeForm, BlackholeFormProvider, ContentCard$1 as ContentCard, CursorDefaultDiv, CursorPointerTag, CursorPointerTagMinContent, CustomSelect$4 as CustomSelect, DeleteIcon, DeleteModal, DeleteModalMany, DownIcon, DynamicComponents, DynamicRenderer, DynamicRendererWithProviders, EarthIcon, EditIcon, EnrichedTable, EnrichedTableProvider, Events, FlexGrow, LockedIcon, LookingGlassIcon, ManageableBreadcrumbs, ManageableBreadcrumbsProvider, ManageableSidebar, ManageableSidebarProvider, MarketPlace, MarketplaceCard, MinusIcon, NodeTerminal, PaddingContainer, PauseCircleIcon, PlusIcon, PodLogs, PodLogsMonaco, PodTerminal, ProjectInfoCard, ResourceLink, ResumeCircleIcon, Search, Spacer$1 as Spacer, SuccessIcon, TreeWithSearch, UncontrolledSelect, UnlockedIcon, UpIcon, VMVNC, YamlEditorSingleton$1 as YamlEditorSingleton, checkIfApiInstanceNamespaceScoped, checkIfBuiltInInstanceNamespaceScoped, checkPermission, convertBytes, convertCompute, convertCores, convertStorage, createContextFactory, createNewEntry, deepMerge, deleteEntry, feedbackIcons, filterIfApiInstanceNamespaceScoped, filterIfBuiltInInstanceNamespaceScoped, filterSelectOptions, floorToDecimal, formatBytesAuto, formatCoresAuto, getAllPathsFromObj, getApiResourceSingle, getApiResourceTypes, getApiResourceTypesByApiGroup, getApiResources, getBuiltinResourceSingle, getBuiltinResourceTypes, getBuiltinResources, getBuiltinTreeData, getClusterList, getCrdData, getCrdResourceSingle, getCrdResources, getDirectUnknownResource, getEnrichedColumns, getEnrichedColumnsWithControls, getGroupsByCategory, getKinds, getLinkToApiForm, getLinkToBuiltinForm, getLinkToForm, getNamespaceLink, getObjectFormItemsDraft, getPrefixSubarrays, getResourceLink, getSortedKinds, getSortedKindsAll, getStringByName, getSwagger, getUppercase, groupsToTreeData, hslFromString, includesArray, isFlatObject, isMultilineFromYaml, isMultilineString, kindByGvr, namespacedByGvr, normalizeValuesForQuotasToNumber, parseCoresWithUnit, parseQuotaValue, parseQuotaValueCpu, parseQuotaValueMemoryAndStorage, parseValueWithUnit, pluralByKind, prepareDataForManageableBreadcrumbs, prepareDataForManageableSidebar, prepareTemplate, prepareUrlsToFetchForDynamicRenderer, toBytes, toCores, updateEntry, useApiResourceSingle, useApiResourceTypesByGroup, useApiResources, useApisResourceTypes, useBuiltinResourceSingle, useBuiltinResourceTypes, useBuiltinResources, useClusterList, useCrdData, useCrdResourceSingle, useCrdResources, useDirectUnknownResource, useInfiniteSentinel, useK8sSmartResource, useK8sVerbs, useListWatch, useManyK8sSmartResource, usePermissions, useResourceScope, useSmartResourceParams };
|
|
55166
55827
|
//# sourceMappingURL=openapi-k8s-toolkit.es.js.map
|