@prorobotech/openapi-k8s-toolkit 0.0.1-alpha.151 → 0.0.1-alpha.152
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 +977 -221
- package/dist/openapi-k8s-toolkit.es.js.map +1 -1
- package/dist/openapi-k8s-toolkit.umd.js +972 -215
- package/dist/openapi-k8s-toolkit.umd.js.map +1 -1
- package/dist/types/api/bff/scopes/checkScopes.d.ts +1 -1
- package/dist/types/api/bff/scopes/filterScopes.d.ts +2 -2
- package/dist/types/api/bff/search/getKinds.d.ts +1 -1
- package/dist/types/api/bff/swagger/getSwagger.d.ts +1 -1
- package/dist/types/api/getClusterList.d.ts +1 -1
- package/dist/types/components/molecules/BlackholeForm/atoms/CustomCollapse/CustomCollapse.d.ts +1 -1
- package/dist/types/components/molecules/BlackholeForm/atoms/DebugNameViewer/DebugNameViewer.d.ts +1 -1
- package/dist/types/components/molecules/BlackholeForm/atoms/HiddenContainer/HiddenContainer.d.ts +1 -1
- package/dist/types/components/molecules/BlackholeForm/atoms/HiddenContainer/utils.d.ts +1 -1
- package/dist/types/components/molecules/BlackholeForm/atoms/PersistedCheckbox/PersistedCheckbox.d.ts +1 -1
- package/dist/types/components/molecules/BlackholeForm/molecules/FormArrayHeader/FormArrayHeader.d.ts +1 -1
- package/dist/types/components/molecules/BlackholeForm/molecules/FormBooleanInput/FormBooleanInput.d.ts +1 -1
- package/dist/types/components/molecules/BlackholeForm/molecules/FormEnumStringInput/FormEnumStringInput.d.ts +1 -1
- package/dist/types/components/molecules/BlackholeForm/molecules/FormInlineYamlEditor/FormInlineYamlEditor.d.ts +1 -1
- package/dist/types/components/molecules/BlackholeForm/molecules/FormListInput/FormListInput.d.ts +2 -2
- package/dist/types/components/molecules/BlackholeForm/molecules/FormNamespaceInput/FormNamespaceInput.d.ts +1 -1
- package/dist/types/components/molecules/BlackholeForm/molecules/FormNumberInput/FormNumberInput.d.ts +1 -1
- package/dist/types/components/molecules/BlackholeForm/molecules/FormObjectFromSwagger/FormObjectFromSwagger.d.ts +1 -1
- package/dist/types/components/molecules/BlackholeForm/molecules/FormRangeInput/FormRangeInput.d.ts +2 -2
- package/dist/types/components/molecules/BlackholeForm/molecules/FormRangeInput/molecules/RangeInput/RangeInput.d.ts +1 -1
- package/dist/types/components/molecules/BlackholeForm/molecules/FormRangeInput/utils.d.ts +1 -1
- package/dist/types/components/molecules/BlackholeForm/molecules/FormStringInput/FormStringInput.d.ts +1 -1
- package/dist/types/components/molecules/BlackholeForm/molecules/YamlEditorSingleton/YamlEditorSingleton.d.ts +1 -1
- package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/BlackholeForm.d.ts +3 -3
- package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/helpers/casts.d.ts +1 -1
- package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/helpers/hiddenExpanded.d.ts +1 -1
- package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/utils.d.ts +2 -2
- package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/utilsErrorHandler.d.ts +1 -1
- package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeFormDataProvider/BlackholeFormDataProvider.d.ts +2 -2
- package/dist/types/components/molecules/EnrichedTable/organisms/EnrichedTable/EnrichedTable.d.ts +1 -1
- package/dist/types/components/molecules/EnrichedTable/organisms/EnrichedTable/utils.d.ts +2 -2
- package/dist/types/components/molecules/EnrichedTable/organisms/EnrichedTableProvider/EnrichedTableProvider.d.ts +2 -2
- package/dist/types/components/molecules/EnrichedTable/organisms/EnrichedTableProvider/utils.d.ts +2 -2
- package/dist/types/components/molecules/Events/Events.d.ts +16 -0
- package/dist/types/components/molecules/Events/index.d.ts +1 -0
- package/dist/types/components/molecules/Events/molecules/EventRow/EventRow.d.ts +16 -0
- package/dist/types/components/molecules/Events/molecules/EventRow/index.d.ts +1 -0
- package/dist/types/components/molecules/Events/molecules/EventRow/styled.d.ts +830 -0
- package/dist/types/components/molecules/Events/molecules/EventRow/utils.d.ts +24 -0
- package/dist/types/components/molecules/Events/molecules/index.d.ts +1 -0
- package/dist/types/components/molecules/Events/reducer.d.ts +20 -0
- package/dist/types/components/molecules/Events/styled.d.ts +1650 -0
- package/dist/types/components/molecules/Events/types.d.ts +57 -0
- package/dist/types/components/molecules/Events/utils.d.ts +11 -0
- package/dist/types/components/molecules/MarketPlace/molecules/AddEditFormModal/AddEditFormModal.d.ts +1 -1
- package/dist/types/components/molecules/MarketPlace/molecules/MarketplaceCard/MarketplaceCard.d.ts +1 -1
- package/dist/types/components/molecules/Search/Search.d.ts +1 -1
- package/dist/types/components/molecules/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/DynamicComponents.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/Events/Events.d.ts +6 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/Events/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/Events/utils.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 +25 -2
- package/dist/types/components/organisms/DynamicRenderer/DynamicRenderer.d.ts +1 -1
- package/dist/types/components/organisms/DynamicRendererWithProviders/DynamicRendererWithProviders.d.ts +1 -1
- package/dist/types/hooks/useApiResource.d.ts +1 -1
- package/dist/types/hooks/useBuiltinResourceTypes.d.ts +1 -1
- package/dist/types/hooks/useCrdResource.d.ts +1 -1
- package/dist/types/localTypes/bff/table.d.ts +1 -1
- package/dist/types/localTypes/search.d.ts +1 -1
- package/dist/types/utils/getGroupsByCategory/getGroupsByCategory.d.ts +1 -1
- package/dist/types/utils/getSortedKinds/getSortedKinds.d.ts +2 -2
- package/dist/types/utils/getSortedKindsAll/getSortedKindsAll.d.ts +2 -2
- package/dist/types/utils/getStringByName/getStringByName.d.ts +1 -1
- package/dist/types/utils/kindByGvr/kindByGvr.d.ts +1 -1
- package/dist/types/utils/namespacedByGvr/namespacedByGvr.d.ts +1 -1
- package/dist/types/utils/pluralByKind/pluralByKind.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styled, { createGlobalStyle } from 'styled-components';
|
|
2
|
-
import K, { useState, useRef, useLayoutEffect, useEffect, Fragment, createContext, useContext, useMemo, createElement, isValidElement, cloneElement, useCallback, useInsertionEffect, useSyncExternalStore, memo, Suspense } from 'react';
|
|
3
|
-
import { Input, Tree, Modal, Alert, theme, Select, Tag, Breadcrumb, Spin, Menu, Tooltip, Space, Button, Flex, Typography, Card, Row, Col, Tabs, Form, Popover, notification, Dropdown, Table, Slider, InputNumber, Switch, Result, Progress, Checkbox } from 'antd';
|
|
2
|
+
import K, { useState, useRef, useLayoutEffect, useEffect, Fragment, createContext, useContext, useMemo, createElement, isValidElement, cloneElement, useCallback, useInsertionEffect, useSyncExternalStore, memo, Suspense, useReducer } from 'react';
|
|
3
|
+
import { Input, Tree, Modal, Alert, theme, Select, Tag, Breadcrumb, Spin, Menu, Tooltip, Space, Button, Flex, Typography, Card as Card$1, Row, Col, Tabs, Form, Popover, notification, Dropdown, Table, Slider, InputNumber, Switch, Result, Progress, Checkbox, Empty } from 'antd';
|
|
4
4
|
import { LoadingOutlined, ExclamationCircleFilled, CloseCircleFilled, CheckCircleFilled, PlusOutlined, ClearOutlined, MinusOutlined, CaretDownOutlined, CaretRightOutlined, InfoCircleOutlined, EyeOutlined, EyeInvisibleOutlined, SearchOutlined, MoreOutlined, CheckOutlined, CloseOutlined, BugOutlined, EllipsisOutlined } from '@ant-design/icons';
|
|
5
5
|
import { useQuery, useQueries, useQueryClient } from '@tanstack/react-query';
|
|
6
6
|
import { Link, useNavigate, useLocation, useParams, useSearchParams } from 'react-router-dom';
|
|
@@ -1574,7 +1574,7 @@ const CustomTreeProvider = styled.div`
|
|
|
1574
1574
|
justify-content: center;
|
|
1575
1575
|
}
|
|
1576
1576
|
`;
|
|
1577
|
-
const Styled$
|
|
1577
|
+
const Styled$z = {
|
|
1578
1578
|
CustomTreeProvider
|
|
1579
1579
|
};
|
|
1580
1580
|
|
|
@@ -1639,7 +1639,7 @@ const TreeWithSearch = ({ treeData, onSelect }) => {
|
|
|
1639
1639
|
});
|
|
1640
1640
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
1641
1641
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Search$1, { style: { marginBottom: 8 }, placeholder: "Search", onChange }),
|
|
1642
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
1642
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$z.CustomTreeProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1643
1643
|
Tree,
|
|
1644
1644
|
{
|
|
1645
1645
|
treeData: loop(treeData),
|
|
@@ -8168,14 +8168,14 @@ const ContentContainer = styled.div`
|
|
|
8168
8168
|
display: ${({ $displayFlex }) => $displayFlex ? "flex" : "block"};
|
|
8169
8169
|
flex-flow: ${({ $flexFlow }) => $flexFlow};
|
|
8170
8170
|
`;
|
|
8171
|
-
const Styled$
|
|
8171
|
+
const Styled$y = {
|
|
8172
8172
|
ContentContainer
|
|
8173
8173
|
};
|
|
8174
8174
|
|
|
8175
8175
|
const ContentCard$1 = ({ children, flexGrow, displayFlex, flexFlow, maxHeight }) => {
|
|
8176
8176
|
const { token } = theme.useToken();
|
|
8177
8177
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8178
|
-
Styled$
|
|
8178
|
+
Styled$y.ContentContainer,
|
|
8179
8179
|
{
|
|
8180
8180
|
$flexGrow: flexGrow,
|
|
8181
8181
|
$bgColor: token.colorBgContainer,
|
|
@@ -8236,13 +8236,13 @@ const UncontrolledSelect$1 = styled(Select)`
|
|
|
8236
8236
|
padding-inline: 8px;
|
|
8237
8237
|
}
|
|
8238
8238
|
`;
|
|
8239
|
-
const Styled$
|
|
8239
|
+
const Styled$x = {
|
|
8240
8240
|
UncontrolledSelect: UncontrolledSelect$1
|
|
8241
8241
|
};
|
|
8242
8242
|
|
|
8243
8243
|
const UncontrolledSelect = (props) => {
|
|
8244
8244
|
const { isCursorPointer } = props;
|
|
8245
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
8245
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$x.UncontrolledSelect, { ...props, $isCursorPointer: isCursorPointer });
|
|
8246
8246
|
};
|
|
8247
8247
|
|
|
8248
8248
|
const CustomSelect$5 = styled(Select)`
|
|
@@ -8290,13 +8290,13 @@ const CustomSelect$5 = styled(Select)`
|
|
|
8290
8290
|
margin-block: 0 !important;
|
|
8291
8291
|
}
|
|
8292
8292
|
`;
|
|
8293
|
-
const Styled$
|
|
8293
|
+
const Styled$w = {
|
|
8294
8294
|
CustomSelect: CustomSelect$5
|
|
8295
8295
|
};
|
|
8296
8296
|
|
|
8297
8297
|
const CustomSelect$4 = (props) => {
|
|
8298
8298
|
const { paddingContainerEnd, ...rest } = props;
|
|
8299
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
8299
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$w.CustomSelect, { $paddingContainerEnd: paddingContainerEnd, ...rest });
|
|
8300
8300
|
};
|
|
8301
8301
|
|
|
8302
8302
|
const CursorPointerTag = styled(Tag)`
|
|
@@ -8419,7 +8419,7 @@ const NoWrapContainer = styled.div`
|
|
|
8419
8419
|
flex-wrap: nowrap !important;
|
|
8420
8420
|
}
|
|
8421
8421
|
`;
|
|
8422
|
-
const Styled$
|
|
8422
|
+
const Styled$v = {
|
|
8423
8423
|
PositionRelativeContainer,
|
|
8424
8424
|
FullWidthContainer,
|
|
8425
8425
|
NoWrapContainer
|
|
@@ -8462,9 +8462,9 @@ const CollapsibleBreadcrumb = ({ items }) => {
|
|
|
8462
8462
|
};
|
|
8463
8463
|
return [firstItem, ellipsisItem, lastItem];
|
|
8464
8464
|
};
|
|
8465
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$
|
|
8466
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
8467
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
8465
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$v.PositionRelativeContainer, { children: [
|
|
8466
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$v.FullWidthContainer, { ref: containerRef, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Breadcrumb, { separator: ">", items: renderItems() }) }),
|
|
8467
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$v.NoWrapContainer, { ref: breadcrumbRef, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Breadcrumb, { separator: ">", items, style: { display: "flex", flexWrap: "nowrap" } }) })
|
|
8468
8468
|
] });
|
|
8469
8469
|
};
|
|
8470
8470
|
|
|
@@ -8472,12 +8472,12 @@ const HeightDiv = styled.div`
|
|
|
8472
8472
|
min-height: 22px;
|
|
8473
8473
|
width: 100%;
|
|
8474
8474
|
`;
|
|
8475
|
-
const Styled$
|
|
8475
|
+
const Styled$u = {
|
|
8476
8476
|
HeightDiv
|
|
8477
8477
|
};
|
|
8478
8478
|
|
|
8479
8479
|
const ManageableBreadcrumbs = ({ data }) => {
|
|
8480
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
8480
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$u.HeightDiv, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(CollapsibleBreadcrumb, { items: data.breadcrumbItems }) });
|
|
8481
8481
|
};
|
|
8482
8482
|
const ManageableBreadcrumbsWithDataProvider = ({
|
|
8483
8483
|
uri,
|
|
@@ -8501,7 +8501,7 @@ const ManageableBreadcrumbsWithDataProvider = ({
|
|
|
8501
8501
|
return null;
|
|
8502
8502
|
}
|
|
8503
8503
|
if (rawDataLoading) {
|
|
8504
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
8504
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$u.HeightDiv, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Spin, {}) });
|
|
8505
8505
|
}
|
|
8506
8506
|
if (!rawData) {
|
|
8507
8507
|
return null;
|
|
@@ -8516,7 +8516,7 @@ const ManageableBreadcrumbsWithDataProvider = ({
|
|
|
8516
8516
|
idToCompare
|
|
8517
8517
|
});
|
|
8518
8518
|
if (!result) {
|
|
8519
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
8519
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$u.HeightDiv, {});
|
|
8520
8520
|
}
|
|
8521
8521
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(ManageableBreadcrumbs, { data: result });
|
|
8522
8522
|
};
|
|
@@ -8638,7 +8638,7 @@ const CustomMenu = styled(Menu)`
|
|
|
8638
8638
|
margin: 0 !important;
|
|
8639
8639
|
}
|
|
8640
8640
|
`;
|
|
8641
|
-
const Styled$
|
|
8641
|
+
const Styled$t = {
|
|
8642
8642
|
CustomMenu
|
|
8643
8643
|
};
|
|
8644
8644
|
|
|
@@ -8665,7 +8665,7 @@ const ManageableSidebar = ({ data, noMarginTop }) => {
|
|
|
8665
8665
|
setSelectedKeys(data.selectedKeys);
|
|
8666
8666
|
}, [data.selectedKeys]);
|
|
8667
8667
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8668
|
-
Styled$
|
|
8668
|
+
Styled$t.CustomMenu,
|
|
8669
8669
|
{
|
|
8670
8670
|
selectedKeys,
|
|
8671
8671
|
onSelect: () => {
|
|
@@ -32752,7 +32752,7 @@ const ShortenedText = styled.div`
|
|
|
32752
32752
|
white-space: nowrap;
|
|
32753
32753
|
text-overflow: ellipsis;
|
|
32754
32754
|
`;
|
|
32755
|
-
const Styled$
|
|
32755
|
+
const Styled$s = {
|
|
32756
32756
|
ShortenedText
|
|
32757
32757
|
};
|
|
32758
32758
|
|
|
@@ -32761,7 +32761,7 @@ const ShortenedTextWithTooltip = ({ text, trimLength, maxWidth = 200 }) => {
|
|
|
32761
32761
|
const trimmedText = text.substring(0, trimLength);
|
|
32762
32762
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: text, placement: "top", children: trimmedText });
|
|
32763
32763
|
}
|
|
32764
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: text, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
32764
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: text, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$s.ShortenedText, { $maxWidth: maxWidth, children: text }) });
|
|
32765
32765
|
};
|
|
32766
32766
|
|
|
32767
32767
|
const FilterDropdown = ({
|
|
@@ -33168,7 +33168,7 @@ const AntdCard = ({
|
|
|
33168
33168
|
children
|
|
33169
33169
|
}) => {
|
|
33170
33170
|
const { id, ...cardProps } = data;
|
|
33171
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Card, { ...cardProps, children });
|
|
33171
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Card$1, { ...cardProps, children });
|
|
33172
33172
|
};
|
|
33173
33173
|
|
|
33174
33174
|
const AntdFlex = ({
|
|
@@ -33379,7 +33379,7 @@ const getResult = ({
|
|
|
33379
33379
|
return { type: "warning", text: fallbackText };
|
|
33380
33380
|
};
|
|
33381
33381
|
|
|
33382
|
-
const StatusText = ({
|
|
33382
|
+
const StatusText$1 = ({
|
|
33383
33383
|
data,
|
|
33384
33384
|
children
|
|
33385
33385
|
}) => {
|
|
@@ -34038,7 +34038,7 @@ const YamlEditorSingleton$1 = ({
|
|
|
34038
34038
|
const VisibilityContainer$2 = styled.div`
|
|
34039
34039
|
display: ${({ $hidden }) => $hidden ? "none" : "block"};
|
|
34040
34040
|
`;
|
|
34041
|
-
const Styled$
|
|
34041
|
+
const Styled$r = {
|
|
34042
34042
|
VisibilityContainer: VisibilityContainer$2
|
|
34043
34043
|
};
|
|
34044
34044
|
|
|
@@ -34061,7 +34061,7 @@ const VisibilityContainer$1 = ({
|
|
|
34061
34061
|
if (isMultiqueryLoading) {
|
|
34062
34062
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading multiquery" });
|
|
34063
34063
|
}
|
|
34064
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
34064
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$r.VisibilityContainer, { $hidden: valuePrepared === "~undefined-value~", children });
|
|
34065
34065
|
};
|
|
34066
34066
|
|
|
34067
34067
|
const unknownToString = (value) => {
|
|
@@ -34326,7 +34326,7 @@ const Content$1 = styled.div`
|
|
|
34326
34326
|
display: ${({ $isOpen }) => $isOpen ? "block" : "none"};
|
|
34327
34327
|
padding: ${({ $designNewLayout }) => $designNewLayout ? "0 0 0 6px" : "4px"};
|
|
34328
34328
|
`;
|
|
34329
|
-
const Styled$
|
|
34329
|
+
const Styled$q = {
|
|
34330
34330
|
Container: Container$2,
|
|
34331
34331
|
TitleBar,
|
|
34332
34332
|
Content: Content$1
|
|
@@ -34353,14 +34353,14 @@ const CustomCollapse = ({
|
|
|
34353
34353
|
}
|
|
34354
34354
|
};
|
|
34355
34355
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
34356
|
-
Styled$
|
|
34356
|
+
Styled$q.Container,
|
|
34357
34357
|
{
|
|
34358
34358
|
$designNewLayout: designNewLayout,
|
|
34359
34359
|
$borderColor: token.colorBorder,
|
|
34360
34360
|
$bgColor: token.colorBgContainer,
|
|
34361
34361
|
children: [
|
|
34362
34362
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { justify: "space-between", children: [
|
|
34363
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$
|
|
34363
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$q.TitleBar, { onClick: () => toggleCollapse(), children: [
|
|
34364
34364
|
!designNewLayout && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: isOpen ? /* @__PURE__ */ jsxRuntimeExports.jsx(CaretDownOutlined, { size: 14 }) : /* @__PURE__ */ jsxRuntimeExports.jsx(CaretRightOutlined, { size: 14 }) }),
|
|
34365
34365
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: title }),
|
|
34366
34366
|
designNewLayout && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: isOpen ? /* @__PURE__ */ jsxRuntimeExports.jsx(DownIcon, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(UpIcon, {}) })
|
|
@@ -34371,7 +34371,7 @@ const CustomCollapse = ({
|
|
|
34371
34371
|
persistedCheckbox
|
|
34372
34372
|
] })
|
|
34373
34373
|
] }),
|
|
34374
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
34374
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$q.Content, { $isOpen: isOpen, $designNewLayout: designNewLayout, children })
|
|
34375
34375
|
]
|
|
34376
34376
|
}
|
|
34377
34377
|
);
|
|
@@ -34405,13 +34405,13 @@ const CustomSizeTitle = styled.div`
|
|
|
34405
34405
|
const Content = styled.div`
|
|
34406
34406
|
padding: ${({ $designNewLayout }) => $designNewLayout ? "0 0 0 6px" : "4px"};
|
|
34407
34407
|
`;
|
|
34408
|
-
const Styled$
|
|
34408
|
+
const Styled$p = {
|
|
34409
34409
|
Content
|
|
34410
34410
|
};
|
|
34411
34411
|
|
|
34412
34412
|
const ArrayInsideContainer = ({ children }) => {
|
|
34413
34413
|
const designNewLayout = useDesignNewLayout();
|
|
34414
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
34414
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$p.Content, { $designNewLayout: designNewLayout, children });
|
|
34415
34415
|
};
|
|
34416
34416
|
|
|
34417
34417
|
const includesPath = (haystack, needle) => haystack.some((h) => h.length === needle.length && h.every((seg, i) => seg === String(needle[i])));
|
|
@@ -34968,7 +34968,7 @@ const LabelsToSearchParams = ({ data, children }) => {
|
|
|
34968
34968
|
const ResetedFormList$3 = styled(Form.List)`
|
|
34969
34969
|
margin-bottom: 8px;
|
|
34970
34970
|
`;
|
|
34971
|
-
const Styled$
|
|
34971
|
+
const Styled$o = {
|
|
34972
34972
|
ResetedFormList: ResetedFormList$3
|
|
34973
34973
|
};
|
|
34974
34974
|
|
|
@@ -35053,7 +35053,7 @@ const EditModal$2 = ({
|
|
|
35053
35053
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Col, { span: cols[3], children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", {}) })
|
|
35054
35054
|
] }),
|
|
35055
35055
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Spacer$1, { $space: 10, $samespace: true }),
|
|
35056
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
35056
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$o.ResetedFormList, { name: "taints", children: (fields, { add, remove }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
35057
35057
|
fields.map(({ key, name, ...restField }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(Row, { gutter: [16, 16], children: [
|
|
35058
35058
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Col, { span: cols[0], children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
35059
35059
|
ResetedFormItem$1,
|
|
@@ -35293,7 +35293,7 @@ const Taints = ({ data, children }) => {
|
|
|
35293
35293
|
const ResetedFormList$2 = styled(Form.List)`
|
|
35294
35294
|
margin-bottom: 8px;
|
|
35295
35295
|
`;
|
|
35296
|
-
const Styled$
|
|
35296
|
+
const Styled$n = {
|
|
35297
35297
|
ResetedFormList: ResetedFormList$2
|
|
35298
35298
|
};
|
|
35299
35299
|
|
|
@@ -35388,7 +35388,7 @@ const EditModal$1 = ({
|
|
|
35388
35388
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Col, { span: cols[4], children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", {}) })
|
|
35389
35389
|
] }),
|
|
35390
35390
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Spacer$1, { $space: 10, $samespace: true }),
|
|
35391
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
35391
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$n.ResetedFormList, { name: "tolerations", children: (fields, { add, remove }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
35392
35392
|
fields.map(({ key, name, ...restField }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(Row, { gutter: [16, 16], children: [
|
|
35393
35393
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Col, { span: cols[0], children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
35394
35394
|
ResetedFormItem$1,
|
|
@@ -35665,7 +35665,7 @@ const Tolerations = ({
|
|
|
35665
35665
|
const ResetedFormList$1 = styled(Form.List)`
|
|
35666
35666
|
margin-bottom: 8px;
|
|
35667
35667
|
`;
|
|
35668
|
-
const Styled$
|
|
35668
|
+
const Styled$m = {
|
|
35669
35669
|
ResetedFormList: ResetedFormList$1
|
|
35670
35670
|
};
|
|
35671
35671
|
|
|
@@ -35755,7 +35755,7 @@ const EditModal = ({
|
|
|
35755
35755
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Col, { span: cols[2], children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", {}) })
|
|
35756
35756
|
] }),
|
|
35757
35757
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Spacer$1, { $space: 10, $samespace: true }),
|
|
35758
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
35758
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$m.ResetedFormList, { name: "annotations", children: (fields, { add, remove }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
35759
35759
|
fields.map(({ key, name, ...restField }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(Row, { gutter: [16, 16], children: [
|
|
35760
35760
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Col, { span: cols[0], children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
35761
35761
|
ResetedFormItem$1,
|
|
@@ -36829,7 +36829,7 @@ const NotificationOverrides = createGlobalStyle`
|
|
|
36829
36829
|
margin-bottom: 0 !important;
|
|
36830
36830
|
}
|
|
36831
36831
|
`;
|
|
36832
|
-
const Styled$
|
|
36832
|
+
const Styled$l = {
|
|
36833
36833
|
NoSelect,
|
|
36834
36834
|
DisabledInput,
|
|
36835
36835
|
NotificationOverrides
|
|
@@ -36895,10 +36895,10 @@ const SecretBase64Plain = ({ data }) => {
|
|
|
36895
36895
|
}
|
|
36896
36896
|
};
|
|
36897
36897
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: containerStyle, children: [
|
|
36898
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
36898
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$l.NotificationOverrides, {}),
|
|
36899
36899
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { gap: 8, ...flexProps, children: [
|
|
36900
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
36901
|
-
Styled$
|
|
36900
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$l.NoSelect, { style: inputContainerStyle, children: niceLooking ? /* @__PURE__ */ jsxRuntimeExports.jsx(te$1, { theme, hidden, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
36901
|
+
Styled$l.DisabledInput,
|
|
36902
36902
|
{
|
|
36903
36903
|
$hidden: hidden,
|
|
36904
36904
|
ref: inputRef,
|
|
@@ -36913,7 +36913,7 @@ const SecretBase64Plain = ({ data }) => {
|
|
|
36913
36913
|
value: decodedText
|
|
36914
36914
|
}
|
|
36915
36915
|
) }) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
36916
|
-
Styled$
|
|
36916
|
+
Styled$l.DisabledInput,
|
|
36917
36917
|
{
|
|
36918
36918
|
$hidden: hidden,
|
|
36919
36919
|
ref: inputRef,
|
|
@@ -36971,7 +36971,7 @@ const RoundSpan = styled.span`
|
|
|
36971
36971
|
letter-spacing: 0.02em;
|
|
36972
36972
|
box-sizing: content-box;
|
|
36973
36973
|
`;
|
|
36974
|
-
const Styled$
|
|
36974
|
+
const Styled$k = {
|
|
36975
36975
|
RoundSpan
|
|
36976
36976
|
};
|
|
36977
36977
|
|
|
@@ -37010,7 +37010,108 @@ const ResourceBadge = ({ data }) => {
|
|
|
37010
37010
|
multiQueryData
|
|
37011
37011
|
}) : getUppercase(parsedValue);
|
|
37012
37012
|
const bgColor = hslFromString(parsedValue, theme);
|
|
37013
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
37013
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$k.RoundSpan, { $bgColor: bgColor, style, children: parsedAbbreviation });
|
|
37014
|
+
};
|
|
37015
|
+
|
|
37016
|
+
const serializeLabelsWithNoEncoding = (input) => {
|
|
37017
|
+
if (typeof input !== "object" || input === null || Array.isArray(input) || Object.getPrototypeOf(input) !== Object.prototype) {
|
|
37018
|
+
return "Expected a plain object";
|
|
37019
|
+
}
|
|
37020
|
+
const entries = Object.entries(input);
|
|
37021
|
+
if (!entries.map(([, v]) => v).every((v) => typeof v === "string" || typeof v === "number")) {
|
|
37022
|
+
return "All values must be string or number";
|
|
37023
|
+
}
|
|
37024
|
+
return entries.map(([k, v]) => `${k}=${v}`).join(",");
|
|
37025
|
+
};
|
|
37026
|
+
|
|
37027
|
+
const Events$1 = ({
|
|
37028
|
+
data,
|
|
37029
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
37030
|
+
children
|
|
37031
|
+
}) => {
|
|
37032
|
+
const { data: multiQueryData, isLoading: isMultiqueryLoading } = useMultiQuery();
|
|
37033
|
+
const {
|
|
37034
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
37035
|
+
id,
|
|
37036
|
+
baseprefix,
|
|
37037
|
+
clusterNamePartOfUrl,
|
|
37038
|
+
wsUrl,
|
|
37039
|
+
pageSize,
|
|
37040
|
+
substractHeight,
|
|
37041
|
+
limit,
|
|
37042
|
+
labelsSelector,
|
|
37043
|
+
labelsSelectorFull,
|
|
37044
|
+
fieldSelector,
|
|
37045
|
+
baseFactoryNamespacedAPIKey,
|
|
37046
|
+
baseFactoryClusterSceopedAPIKey,
|
|
37047
|
+
baseFactoryNamespacedBuiltinKey,
|
|
37048
|
+
baseFactoryClusterSceopedBuiltinKey,
|
|
37049
|
+
baseNamespaceFactoryKey,
|
|
37050
|
+
...props
|
|
37051
|
+
} = data;
|
|
37052
|
+
const theme = useTheme();
|
|
37053
|
+
const partsOfUrl = usePartsOfUrl();
|
|
37054
|
+
const replaceValues = partsOfUrl.partsOfUrl.reduce((acc, value, index) => {
|
|
37055
|
+
acc[index.toString()] = value;
|
|
37056
|
+
return acc;
|
|
37057
|
+
}, {});
|
|
37058
|
+
const clusterName = prepareTemplate({
|
|
37059
|
+
template: clusterNamePartOfUrl,
|
|
37060
|
+
replaceValues
|
|
37061
|
+
});
|
|
37062
|
+
const wsUrlPrepared = parseAll({ text: wsUrl, replaceValues, multiQueryData });
|
|
37063
|
+
const params = new URLSearchParams();
|
|
37064
|
+
if (limit) {
|
|
37065
|
+
params.set("limit", limit.toString());
|
|
37066
|
+
}
|
|
37067
|
+
if (labelsSelector && Object.keys(labelsSelector).length > 0) {
|
|
37068
|
+
const parsedObject = Object.fromEntries(
|
|
37069
|
+
Object.entries(labelsSelector).map(
|
|
37070
|
+
([k, v]) => [k, parseAll({ text: v, replaceValues, multiQueryData })]
|
|
37071
|
+
)
|
|
37072
|
+
);
|
|
37073
|
+
const serializedLabels = serializeLabelsWithNoEncoding(parsedObject);
|
|
37074
|
+
if (serializedLabels.length > 0) params.set("labelSelector", serializedLabels);
|
|
37075
|
+
}
|
|
37076
|
+
if (labelsSelectorFull) {
|
|
37077
|
+
const root = multiQueryData[`req${labelsSelectorFull.reqIndex}`];
|
|
37078
|
+
const value = Array.isArray(labelsSelectorFull.pathToLabels) ? _$1.get(root, labelsSelectorFull.pathToLabels) : jp.query(root, `$${labelsSelectorFull.pathToLabels}`)[0];
|
|
37079
|
+
const serializedLabels = serializeLabelsWithNoEncoding(value);
|
|
37080
|
+
if (serializedLabels.length > 0) params.set("labelSelector", serializedLabels);
|
|
37081
|
+
}
|
|
37082
|
+
if (fieldSelector) {
|
|
37083
|
+
const preparedFieldSelectorValueText = parseAll({ text: fieldSelector?.parsedText, replaceValues, multiQueryData });
|
|
37084
|
+
const preparedFieldSelectorValueTextWithPartsOfUrl = prepareTemplate({
|
|
37085
|
+
template: preparedFieldSelectorValueText,
|
|
37086
|
+
replaceValues
|
|
37087
|
+
});
|
|
37088
|
+
params.set("fieldSelector", `${fieldSelector.fieldName}=${preparedFieldSelectorValueTextWithPartsOfUrl}`);
|
|
37089
|
+
}
|
|
37090
|
+
const searchParams = params.toString();
|
|
37091
|
+
const wsUrlWithParams = `${wsUrlPrepared}${searchParams ? `?${searchParams}` : ""}`;
|
|
37092
|
+
if (isMultiqueryLoading) {
|
|
37093
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading multiquery" });
|
|
37094
|
+
}
|
|
37095
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
37096
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
37097
|
+
Events,
|
|
37098
|
+
{
|
|
37099
|
+
theme,
|
|
37100
|
+
baseprefix,
|
|
37101
|
+
cluster: clusterName,
|
|
37102
|
+
wsUrl: wsUrlWithParams,
|
|
37103
|
+
pageSize,
|
|
37104
|
+
substractHeight: substractHeight || 340,
|
|
37105
|
+
baseFactoryNamespacedAPIKey,
|
|
37106
|
+
baseFactoryClusterSceopedAPIKey,
|
|
37107
|
+
baseFactoryNamespacedBuiltinKey,
|
|
37108
|
+
baseFactoryClusterSceopedBuiltinKey,
|
|
37109
|
+
baseNamespaceFactoryKey,
|
|
37110
|
+
...props
|
|
37111
|
+
}
|
|
37112
|
+
),
|
|
37113
|
+
children
|
|
37114
|
+
] });
|
|
37014
37115
|
};
|
|
37015
37116
|
|
|
37016
37117
|
const DynamicComponents = {
|
|
@@ -37030,7 +37131,7 @@ const DynamicComponents = {
|
|
|
37030
37131
|
MarketplaceCard: MarketplaceCard$1,
|
|
37031
37132
|
ContentCard,
|
|
37032
37133
|
Spacer,
|
|
37033
|
-
StatusText,
|
|
37134
|
+
StatusText: StatusText$1,
|
|
37034
37135
|
SidebarProvider,
|
|
37035
37136
|
EnrichedTable: EnrichedTable$1,
|
|
37036
37137
|
PodTerminal: PodTerminal$1,
|
|
@@ -37048,7 +37149,8 @@ const DynamicComponents = {
|
|
|
37048
37149
|
Annotations,
|
|
37049
37150
|
ConverterBytes,
|
|
37050
37151
|
SecretBase64Plain,
|
|
37051
|
-
ResourceBadge
|
|
37152
|
+
ResourceBadge,
|
|
37153
|
+
Events: Events$1
|
|
37052
37154
|
};
|
|
37053
37155
|
|
|
37054
37156
|
const prepareUrlsToFetchForDynamicRenderer = ({
|
|
@@ -45783,7 +45885,7 @@ const BorderRadiusContainer$1 = styled.div`
|
|
|
45783
45885
|
border-radius: 8px;
|
|
45784
45886
|
}
|
|
45785
45887
|
`;
|
|
45786
|
-
const Styled$
|
|
45888
|
+
const Styled$j = {
|
|
45787
45889
|
BorderRadiusContainer: BorderRadiusContainer$1
|
|
45788
45890
|
};
|
|
45789
45891
|
|
|
@@ -45823,7 +45925,7 @@ const YamlEditor = ({ theme: theme$1, currentValues, onChange, editorUri }) => {
|
|
|
45823
45925
|
}
|
|
45824
45926
|
}
|
|
45825
45927
|
}, [yamlData, editorUri]);
|
|
45826
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
45928
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$j.BorderRadiusContainer, { $colorBorder: token.colorBorder, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
45827
45929
|
Ft,
|
|
45828
45930
|
{
|
|
45829
45931
|
language: "yaml",
|
|
@@ -45903,7 +46005,7 @@ const BigText$1 = styled.div`
|
|
|
45903
46005
|
font-size: 16px;
|
|
45904
46006
|
line-height: 24px;
|
|
45905
46007
|
`;
|
|
45906
|
-
const Styled$
|
|
46008
|
+
const Styled$i = {
|
|
45907
46009
|
BorderRadiusContainer,
|
|
45908
46010
|
ControlsRowContainer: ControlsRowContainer$1,
|
|
45909
46011
|
BigText: BigText$1
|
|
@@ -45982,7 +46084,7 @@ const YamlEditorSingleton = ({
|
|
|
45982
46084
|
};
|
|
45983
46085
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
45984
46086
|
contextHolder,
|
|
45985
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
46087
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$i.BorderRadiusContainer, { $designNewLayoutHeight: designNewLayoutHeight, $colorBorder: token.colorBorder, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
45986
46088
|
Ft,
|
|
45987
46089
|
{
|
|
45988
46090
|
defaultLanguage: "yaml",
|
|
@@ -45998,7 +46100,7 @@ const YamlEditorSingleton = ({
|
|
|
45998
46100
|
}
|
|
45999
46101
|
}
|
|
46000
46102
|
) }),
|
|
46001
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
46103
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$i.ControlsRowContainer, { $bgColor: token.colorPrimaryBg, $designNewLayout: designNewLayout, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { gap: designNewLayout ? 10 : 16, align: "center", children: [
|
|
46002
46104
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Button, { type: "primary", onClick: onSubmit, loading: isLoading, children: "Submit" }),
|
|
46003
46105
|
backlink && /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { onClick: () => navigate(backlink), children: "Cancel" })
|
|
46004
46106
|
] }) }),
|
|
@@ -46008,7 +46110,7 @@ const YamlEditorSingleton = ({
|
|
|
46008
46110
|
open: !!error,
|
|
46009
46111
|
onOk: () => setError(void 0),
|
|
46010
46112
|
onCancel: () => setError(void 0),
|
|
46011
|
-
title: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { type: "danger", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
46113
|
+
title: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { type: "danger", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$i.BigText, { children: "Error!" }) }),
|
|
46012
46114
|
cancelButtonProps: { style: { display: "none" } },
|
|
46013
46115
|
children: [
|
|
46014
46116
|
"An error has occurred: ",
|
|
@@ -46706,7 +46808,7 @@ const CrossContainer = styled.div`
|
|
|
46706
46808
|
cursor: pointer;
|
|
46707
46809
|
padding-top: 11px;
|
|
46708
46810
|
`;
|
|
46709
|
-
const Styled$
|
|
46811
|
+
const Styled$h = {
|
|
46710
46812
|
SwitchAndCrossContainer,
|
|
46711
46813
|
CrossContainer
|
|
46712
46814
|
};
|
|
@@ -46731,7 +46833,7 @@ const FormBooleanInput = ({
|
|
|
46731
46833
|
onRemoveByMinus && /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { size: "small", type: "text", onClick: onRemoveByMinus, children: /* @__PURE__ */ jsxRuntimeExports.jsx(MinusIcon, {}) })
|
|
46732
46834
|
] })
|
|
46733
46835
|
] }),
|
|
46734
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$
|
|
46836
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$h.SwitchAndCrossContainer, { children: [
|
|
46735
46837
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
46736
46838
|
ResetedFormItem$1,
|
|
46737
46839
|
{
|
|
@@ -46741,7 +46843,7 @@ const FormBooleanInput = ({
|
|
|
46741
46843
|
arrKey !== void 0 ? arrKey : Array.isArray(name) ? name.slice(-1)[0] : name
|
|
46742
46844
|
),
|
|
46743
46845
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
46744
|
-
Styled$
|
|
46846
|
+
Styled$h.CrossContainer,
|
|
46745
46847
|
{
|
|
46746
46848
|
onClick: () => {
|
|
46747
46849
|
if (makeValueUndefined) {
|
|
@@ -46940,7 +47042,7 @@ const Container$1 = styled.div`
|
|
|
46940
47042
|
border-radius: 8px;
|
|
46941
47043
|
}
|
|
46942
47044
|
`;
|
|
46943
|
-
const Styled$
|
|
47045
|
+
const Styled$g = {
|
|
46944
47046
|
Container: Container$1
|
|
46945
47047
|
};
|
|
46946
47048
|
|
|
@@ -46994,7 +47096,7 @@ const FormInlineYamlEditor = ({ path, persistedControls, externalValue }) => {
|
|
|
46994
47096
|
}
|
|
46995
47097
|
}
|
|
46996
47098
|
}, [yamlText, modelUri]);
|
|
46997
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
47099
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$g.Container, { $colorBorder: token.colorBorder, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
46998
47100
|
Ft,
|
|
46999
47101
|
{
|
|
47000
47102
|
language: "yaml",
|
|
@@ -47129,7 +47231,7 @@ const BigText = styled.div`
|
|
|
47129
47231
|
font-size: 16px;
|
|
47130
47232
|
line-height: 24px;
|
|
47131
47233
|
`;
|
|
47132
|
-
const Styled$
|
|
47234
|
+
const Styled$f = {
|
|
47133
47235
|
ResetedFormList,
|
|
47134
47236
|
Container,
|
|
47135
47237
|
OverflowContainer: OverflowContainer$1,
|
|
@@ -47377,7 +47479,7 @@ const getArrayFormItemFromSwagger = ({
|
|
|
47377
47479
|
}
|
|
47378
47480
|
),
|
|
47379
47481
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
47380
|
-
Styled$
|
|
47482
|
+
Styled$f.ResetedFormList,
|
|
47381
47483
|
{
|
|
47382
47484
|
name: arrName || name,
|
|
47383
47485
|
rules: !forceNonRequired && required?.includes(getStringByName(name)) ? [
|
|
@@ -48758,8 +48860,8 @@ const BlackholeForm = ({
|
|
|
48758
48860
|
setPersistedKeys([...persistedKeys.filter((arr) => JSON.stringify(arr) !== JSON.stringify(value))]);
|
|
48759
48861
|
};
|
|
48760
48862
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
48761
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$
|
|
48762
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
48863
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$f.Container, { $designNewLayout: designNewLayout, $designNewLayoutHeight: designNewLayoutHeight, children: [
|
|
48864
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$f.OverflowContainer, { ref: overflowRef, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
48763
48865
|
Form,
|
|
48764
48866
|
{
|
|
48765
48867
|
form,
|
|
@@ -48812,7 +48914,7 @@ const BlackholeForm = ({
|
|
|
48812
48914
|
) })
|
|
48813
48915
|
] }),
|
|
48814
48916
|
/* @__PURE__ */ jsxRuntimeExports.jsx(FlexGrow, {}),
|
|
48815
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
48917
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$f.ControlsRowContainer, { $bgColor: token.colorPrimaryBg, $designNewLayout: designNewLayout, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { gap: designNewLayout ? 10 : 16, align: "center", children: [
|
|
48816
48918
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Button, { type: "primary", onClick: onSubmit, loading: isLoading, children: "Submit" }),
|
|
48817
48919
|
backlink && /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { onClick: () => navigate(backlink), children: "Cancel" }),
|
|
48818
48920
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Button, { onClick: () => setIsDebugModalOpen(true), icon: /* @__PURE__ */ jsxRuntimeExports.jsx(BugOutlined, {}) }),
|
|
@@ -48824,7 +48926,7 @@ const BlackholeForm = ({
|
|
|
48824
48926
|
open: !!error,
|
|
48825
48927
|
onOk: () => setError(void 0),
|
|
48826
48928
|
onCancel: () => setError(void 0),
|
|
48827
|
-
title: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { type: "danger", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
48929
|
+
title: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { type: "danger", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$f.BigText, { children: "Error!" }) }),
|
|
48828
48930
|
cancelButtonProps: { style: { display: "none" } },
|
|
48829
48931
|
children: [
|
|
48830
48932
|
"An error has occurred: ",
|
|
@@ -48840,7 +48942,7 @@ const BlackholeForm = ({
|
|
|
48840
48942
|
onCancel: () => setIsDebugModalOpen(false),
|
|
48841
48943
|
title: "Debug for properties",
|
|
48842
48944
|
width: "90vw",
|
|
48843
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
48945
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$f.DebugContainer, { $designNewLayoutHeight: designNewLayoutHeight, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading..." }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
48844
48946
|
Editor,
|
|
48845
48947
|
{
|
|
48846
48948
|
defaultLanguage: "json",
|
|
@@ -48974,7 +49076,7 @@ const BlackholeFormDataProvider = ({
|
|
|
48974
49076
|
);
|
|
48975
49077
|
};
|
|
48976
49078
|
|
|
48977
|
-
const CustomCard$5 = styled(Card)`
|
|
49079
|
+
const CustomCard$5 = styled(Card$1)`
|
|
48978
49080
|
display: flex;
|
|
48979
49081
|
justify-content: center;
|
|
48980
49082
|
align-items: center;
|
|
@@ -48994,12 +49096,12 @@ const CustomCard$5 = styled(Card)`
|
|
|
48994
49096
|
padding: 8px;
|
|
48995
49097
|
}
|
|
48996
49098
|
`;
|
|
48997
|
-
const Styled$
|
|
49099
|
+
const Styled$e = {
|
|
48998
49100
|
CustomCard: CustomCard$5
|
|
48999
49101
|
};
|
|
49000
49102
|
|
|
49001
49103
|
const AddCard = ({ onAddClick }) => {
|
|
49002
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
49104
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$e.CustomCard, { onClick: onAddClick, children: /* @__PURE__ */ jsxRuntimeExports.jsx(PlusOutlined, {}) });
|
|
49003
49105
|
};
|
|
49004
49106
|
|
|
49005
49107
|
const byteToHex = [];
|
|
@@ -49232,7 +49334,7 @@ const getListPath = ({
|
|
|
49232
49334
|
return `/api/clusters/${clusterName}/k8s/api/v1${namespace ? `/namespaces/${namespace}` : ""}/${typeName}`;
|
|
49233
49335
|
};
|
|
49234
49336
|
|
|
49235
|
-
const CustomCard$4 = styled(Card)`
|
|
49337
|
+
const CustomCard$4 = styled(Card$1)`
|
|
49236
49338
|
position: relative;
|
|
49237
49339
|
width: 238px;
|
|
49238
49340
|
overflow-x: auto;
|
|
@@ -49303,7 +49405,7 @@ const EditButtonContainer = styled.div`
|
|
|
49303
49405
|
bottom: 6px;
|
|
49304
49406
|
right: 6px;
|
|
49305
49407
|
`;
|
|
49306
|
-
const Styled$
|
|
49408
|
+
const Styled$d = {
|
|
49307
49409
|
CustomCard: CustomCard$4,
|
|
49308
49410
|
ImageContainer,
|
|
49309
49411
|
OverflowContainer,
|
|
@@ -49381,14 +49483,14 @@ const MarketplaceCard = ({
|
|
|
49381
49483
|
return null;
|
|
49382
49484
|
}
|
|
49383
49485
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
49384
|
-
Styled$
|
|
49486
|
+
Styled$d.CustomCard,
|
|
49385
49487
|
{
|
|
49386
49488
|
$isDisabled: disabled,
|
|
49387
49489
|
$hoverColor: token.colorPrimary,
|
|
49388
49490
|
onClick: () => disabled ? null : navigate(navigateUrl),
|
|
49389
49491
|
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { vertical: true, style: { width: "100%", height: "100%" }, justify: "spaceBetween", children: [
|
|
49390
49492
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { justify: "space-between", children: [
|
|
49391
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
49493
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$d.ImageContainer, { dangerouslySetInnerHTML: { __html: decodedIcon } }),
|
|
49392
49494
|
isEditMode && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
49393
49495
|
"div",
|
|
49394
49496
|
{
|
|
@@ -49409,8 +49511,8 @@ const MarketplaceCard = ({
|
|
|
49409
49511
|
}
|
|
49410
49512
|
)
|
|
49411
49513
|
] }),
|
|
49412
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$
|
|
49413
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$
|
|
49514
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$d.OverflowContainer, { children: [
|
|
49515
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$d.TitleContainer, { children: [
|
|
49414
49516
|
name,
|
|
49415
49517
|
" ",
|
|
49416
49518
|
addedMode && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
|
|
@@ -49418,10 +49520,10 @@ const MarketplaceCard = ({
|
|
|
49418
49520
|
k8sList?.items?.length
|
|
49419
49521
|
] })
|
|
49420
49522
|
] }),
|
|
49421
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
49422
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
49523
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$d.TagsContainer, { children: tags.map((tag) => /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$d.CustomTag, { children: tag }, tag)) }),
|
|
49524
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$d.DescriptionContainer, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { type: "secondary", children: description }) })
|
|
49423
49525
|
] }),
|
|
49424
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
49526
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$d.EditButtonContainer, { children: isEditMode && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
49425
49527
|
"div",
|
|
49426
49528
|
{
|
|
49427
49529
|
onClick: (e) => {
|
|
@@ -49479,7 +49581,7 @@ const BigValue = styled.div`
|
|
|
49479
49581
|
line-clamp: 1;
|
|
49480
49582
|
word-break: break-all;
|
|
49481
49583
|
`;
|
|
49482
|
-
const Styled$
|
|
49584
|
+
const Styled$c = {
|
|
49483
49585
|
BigValue
|
|
49484
49586
|
};
|
|
49485
49587
|
|
|
@@ -49589,7 +49691,7 @@ const MarketPlace = ({
|
|
|
49589
49691
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { justify: "space-between", children: [
|
|
49590
49692
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { gap: 12, vertical: true, children: [
|
|
49591
49693
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { type: "secondary", children: "Available Products" }) }),
|
|
49592
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
49694
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$c.BigValue, { children: "Marketplace" }) })
|
|
49593
49695
|
] }) }),
|
|
49594
49696
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { gap: 12, vertical: true, children: [
|
|
49595
49697
|
/* @__PURE__ */ jsxRuntimeExports.jsx(SearchTextInput, { uniqueTags, selectedTags, onSelectedTags: setSelectedTags }),
|
|
@@ -49795,7 +49897,7 @@ styled.div`
|
|
|
49795
49897
|
line-clamp: 1;
|
|
49796
49898
|
word-break: break-all;
|
|
49797
49899
|
`;
|
|
49798
|
-
const Styled$
|
|
49900
|
+
const Styled$b = {
|
|
49799
49901
|
ActionMenuPlaceholder};
|
|
49800
49902
|
|
|
49801
49903
|
const ProjectInfoCard = ({
|
|
@@ -49872,7 +49974,7 @@ const ProjectInfoCard = ({
|
|
|
49872
49974
|
} : void 0,
|
|
49873
49975
|
onUpdate: updatePermission.data?.status.allowed ? openUpdate : void 0
|
|
49874
49976
|
}
|
|
49875
|
-
) : /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
49977
|
+
) : /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$b.ActionMenuPlaceholder, {}) }),
|
|
49876
49978
|
/* @__PURE__ */ jsxRuntimeExports.jsx(DropdownAccessGroups, { accessGroups })
|
|
49877
49979
|
] }) })
|
|
49878
49980
|
] }),
|
|
@@ -49959,7 +50061,7 @@ const FullWidthDiv$3 = styled.div`
|
|
|
49959
50061
|
width: 100%;
|
|
49960
50062
|
height: calc(100vh - ${({ $substractHeight }) => $substractHeight}px);
|
|
49961
50063
|
`;
|
|
49962
|
-
const Styled$
|
|
50064
|
+
const Styled$a = {
|
|
49963
50065
|
FullWidthDiv: FullWidthDiv$3,
|
|
49964
50066
|
CustomCard: CustomCard$3
|
|
49965
50067
|
};
|
|
@@ -50044,7 +50146,7 @@ const XTerminal$2 = ({ endpoint, namespace, podName, container, substractHeight
|
|
|
50044
50146
|
};
|
|
50045
50147
|
}, [terminal, endpoint, namespace, podName, container]);
|
|
50046
50148
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
50047
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
50149
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$a.CustomCard, { $isVisible: !isLoading && !error, $substractHeight: substractHeight, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$a.FullWidthDiv, { $substractHeight: substractHeight, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: terminalRef, style: { width: "100%", height: "100%" } }) }) }),
|
|
50048
50150
|
isLoading && !error && /* @__PURE__ */ jsxRuntimeExports.jsx(Spin, {}),
|
|
50049
50151
|
error && /* @__PURE__ */ jsxRuntimeExports.jsx(Result, { status: "error", title: "Error", subTitle: JSON.stringify(error) })
|
|
50050
50152
|
] });
|
|
@@ -50055,7 +50157,7 @@ const CustomSelect$3 = styled.div`
|
|
|
50055
50157
|
width: 200px;
|
|
50056
50158
|
}
|
|
50057
50159
|
`;
|
|
50058
|
-
const Styled$
|
|
50160
|
+
const Styled$9 = {
|
|
50059
50161
|
CustomSelect: CustomSelect$3
|
|
50060
50162
|
};
|
|
50061
50163
|
|
|
@@ -50066,7 +50168,7 @@ const PodTerminal = ({ cluster, namespace, podName, containers, substractHeight
|
|
|
50066
50168
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: "No Running Containers" });
|
|
50067
50169
|
}
|
|
50068
50170
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
50069
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
50171
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$9.CustomSelect, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
50070
50172
|
Select,
|
|
50071
50173
|
{
|
|
50072
50174
|
placeholder: "Select container",
|
|
@@ -50118,7 +50220,7 @@ const ProgressContainer = styled.div`
|
|
|
50118
50220
|
align-items: center;
|
|
50119
50221
|
gap: 8px;
|
|
50120
50222
|
`;
|
|
50121
|
-
const Styled$
|
|
50223
|
+
const Styled$8 = {
|
|
50122
50224
|
FullWidthDiv: FullWidthDiv$2,
|
|
50123
50225
|
CustomCard: CustomCard$2,
|
|
50124
50226
|
ProgressContainer
|
|
@@ -50250,8 +50352,8 @@ const XTerminal$1 = ({ endpoint, nodeName, profile, substractHeight }) => {
|
|
|
50250
50352
|
};
|
|
50251
50353
|
}, [terminal, endpoint, nodeName, profile]);
|
|
50252
50354
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
50253
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
50254
|
-
!isTerminalVisible && !error && isWarmingUp && /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$
|
|
50355
|
+
/* @__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%" } }) }) }),
|
|
50356
|
+
!isTerminalVisible && !error && isWarmingUp && /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$8.ProgressContainer, { $substractHeight: substractHeight, children: [
|
|
50255
50357
|
isLoading && /* @__PURE__ */ jsxRuntimeExports.jsx(Spin, {}),
|
|
50256
50358
|
!isLoading && /* @__PURE__ */ jsxRuntimeExports.jsx(Progress, { type: "circle", percent: progressPercent }),
|
|
50257
50359
|
warmupMessage && /* @__PURE__ */ jsxRuntimeExports.jsxs(Typography.Text, { children: [
|
|
@@ -50272,7 +50374,7 @@ const CustomSelect$2 = styled.div`
|
|
|
50272
50374
|
width: 200px;
|
|
50273
50375
|
}
|
|
50274
50376
|
`;
|
|
50275
|
-
const Styled$
|
|
50377
|
+
const Styled$7 = {
|
|
50276
50378
|
CustomSelect: CustomSelect$2
|
|
50277
50379
|
};
|
|
50278
50380
|
|
|
@@ -50281,7 +50383,7 @@ const NodeTerminal = ({ cluster, nodeName, substractHeight, defaultProfile }) =>
|
|
|
50281
50383
|
const endpoint = `/api/clusters/${cluster}/openapi-bff-ws/terminal/terminalNode/terminalNode`;
|
|
50282
50384
|
const profiles = ["legacy", "general", "baseline", "netadmin", "restricted", "sysadmin"];
|
|
50283
50385
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
50284
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
50386
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$7.CustomSelect, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
50285
50387
|
Select,
|
|
50286
50388
|
{
|
|
50287
50389
|
placeholder: "Select profile",
|
|
@@ -50320,7 +50422,7 @@ const FullWidthDiv$1 = styled.div`
|
|
|
50320
50422
|
width: 100%;
|
|
50321
50423
|
height: calc(100vh - ${({ $substractHeight }) => $substractHeight}px);
|
|
50322
50424
|
`;
|
|
50323
|
-
const Styled$
|
|
50425
|
+
const Styled$6 = {
|
|
50324
50426
|
FullWidthDiv: FullWidthDiv$1,
|
|
50325
50427
|
CustomCard: CustomCard$1
|
|
50326
50428
|
};
|
|
@@ -50401,7 +50503,7 @@ const XTerminal = ({ endpoint, namespace, podName, container, substractHeight })
|
|
|
50401
50503
|
};
|
|
50402
50504
|
}, [terminal, endpoint, namespace, podName, container]);
|
|
50403
50505
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
50404
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
50506
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$6.CustomCard, { $isVisible: isTerminalVisible, $substractHeight: substractHeight, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$6.FullWidthDiv, { $substractHeight: substractHeight, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: terminalRef, style: { width: "100%", height: "100%" } }) }) }),
|
|
50405
50507
|
isLoading && !error && /* @__PURE__ */ jsxRuntimeExports.jsx(Spin, {}),
|
|
50406
50508
|
error && /* @__PURE__ */ jsxRuntimeExports.jsx(Result, { status: "error", title: "Error", subTitle: JSON.stringify(error) })
|
|
50407
50509
|
] });
|
|
@@ -50412,7 +50514,7 @@ const CustomSelect$1 = styled.div`
|
|
|
50412
50514
|
width: 200px;
|
|
50413
50515
|
}
|
|
50414
50516
|
`;
|
|
50415
|
-
const Styled$
|
|
50517
|
+
const Styled$5 = {
|
|
50416
50518
|
CustomSelect: CustomSelect$1
|
|
50417
50519
|
};
|
|
50418
50520
|
|
|
@@ -50423,7 +50525,7 @@ const PodLogs = ({ cluster, namespace, podName, containers, substractHeight }) =
|
|
|
50423
50525
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: "No Running Containers" });
|
|
50424
50526
|
}
|
|
50425
50527
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
50426
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
50528
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$5.CustomSelect, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
50427
50529
|
Select,
|
|
50428
50530
|
{
|
|
50429
50531
|
placeholder: "Select container",
|
|
@@ -50469,15 +50571,15 @@ const VisibilityContainer = styled.div`
|
|
|
50469
50571
|
visibility: ${({ $isVisible }) => $isVisible ? "visible" : "hidden"};
|
|
50470
50572
|
margin-top: -51px;
|
|
50471
50573
|
`;
|
|
50472
|
-
const CursorPointerDiv = styled.div`
|
|
50574
|
+
const CursorPointerDiv$1 = styled.div`
|
|
50473
50575
|
cursor: pointer;
|
|
50474
50576
|
user-select: none;
|
|
50475
50577
|
`;
|
|
50476
|
-
const Styled$
|
|
50578
|
+
const Styled$4 = {
|
|
50477
50579
|
FullWidthDiv,
|
|
50478
50580
|
CustomCard,
|
|
50479
50581
|
VisibilityContainer,
|
|
50480
|
-
CursorPointerDiv
|
|
50582
|
+
CursorPointerDiv: CursorPointerDiv$1
|
|
50481
50583
|
};
|
|
50482
50584
|
|
|
50483
50585
|
const MonacoEditor = ({
|
|
@@ -50552,9 +50654,9 @@ const MonacoEditor = ({
|
|
|
50552
50654
|
};
|
|
50553
50655
|
}, [endpoint, namespace, podName, container, previous, editorReady]);
|
|
50554
50656
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
50555
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
50657
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$4.VisibilityContainer, { $isVisible: isTerminalVisible, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { justify: "start", align: "center", gap: 16, children: [
|
|
50556
50658
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
50557
|
-
Styled$
|
|
50659
|
+
Styled$4.CursorPointerDiv,
|
|
50558
50660
|
{
|
|
50559
50661
|
onClick: () => {
|
|
50560
50662
|
if (isPaused) {
|
|
@@ -50579,7 +50681,7 @@ const MonacoEditor = ({
|
|
|
50579
50681
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: isPaused ? "Not streaming events" : "Streaming events" })
|
|
50580
50682
|
] }) }),
|
|
50581
50683
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Spacer$1, { $space: 16, $samespace: true }),
|
|
50582
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
50684
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$4.CustomCard, { $isVisible: isTerminalVisible, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$4.FullWidthDiv, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
50583
50685
|
Ft,
|
|
50584
50686
|
{
|
|
50585
50687
|
defaultLanguage: "plaintext",
|
|
@@ -50610,7 +50712,7 @@ const CustomSelect = styled.div`
|
|
|
50610
50712
|
width: 200px;
|
|
50611
50713
|
}
|
|
50612
50714
|
`;
|
|
50613
|
-
const Styled$
|
|
50715
|
+
const Styled$3 = {
|
|
50614
50716
|
TopRowContent,
|
|
50615
50717
|
CustomSelect
|
|
50616
50718
|
};
|
|
@@ -50656,8 +50758,8 @@ const PodLogsMonaco = ({
|
|
|
50656
50758
|
}
|
|
50657
50759
|
];
|
|
50658
50760
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
50659
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
50660
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
50761
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$3.TopRowContent, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { gap: 16, children: [
|
|
50762
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$3.CustomSelect, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
50661
50763
|
Select,
|
|
50662
50764
|
{
|
|
50663
50765
|
placeholder: "Select container",
|
|
@@ -50672,7 +50774,7 @@ const PodLogsMonaco = ({
|
|
|
50672
50774
|
}
|
|
50673
50775
|
}
|
|
50674
50776
|
) }),
|
|
50675
|
-
currentContainer && /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
50777
|
+
currentContainer && /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$3.CustomSelect, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
50676
50778
|
Select,
|
|
50677
50779
|
{
|
|
50678
50780
|
placeholder: "Select current/previous",
|
|
@@ -50812,7 +50914,7 @@ const CustomTag = styled(Tag)`
|
|
|
50812
50914
|
/* stylelint-disable declaration-no-important */
|
|
50813
50915
|
margin-inline-end: 0 !important;
|
|
50814
50916
|
`;
|
|
50815
|
-
const Abbr = styled.span`
|
|
50917
|
+
const Abbr$1 = styled.span`
|
|
50816
50918
|
background-color: ${({ $bgColor }) => $bgColor};
|
|
50817
50919
|
border-radius: 13px;
|
|
50818
50920
|
padding: 1px 5px;
|
|
@@ -50824,7 +50926,7 @@ const ClearButtonHolder = styled.div`
|
|
|
50824
50926
|
display: flex;
|
|
50825
50927
|
justify-content: flex-end;
|
|
50826
50928
|
`;
|
|
50827
|
-
const Styled = {
|
|
50929
|
+
const Styled$2 = {
|
|
50828
50930
|
SelectTag,
|
|
50829
50931
|
SelectTagSpan,
|
|
50830
50932
|
MaxTagPlacheolder,
|
|
@@ -50845,7 +50947,7 @@ const Styled = {
|
|
|
50845
50947
|
BottomTagsRowText,
|
|
50846
50948
|
BottomTagsHolder,
|
|
50847
50949
|
CustomTag,
|
|
50848
|
-
Abbr,
|
|
50950
|
+
Abbr: Abbr$1,
|
|
50849
50951
|
ClearButtonHolder
|
|
50850
50952
|
};
|
|
50851
50953
|
|
|
@@ -50863,17 +50965,17 @@ const Search = ({ theme: theme$1, form, constants, kindsWithVersion }) => {
|
|
|
50863
50965
|
const bgColor = kind && kind.length ? hslFromString(kind, theme$1) : "";
|
|
50864
50966
|
return {
|
|
50865
50967
|
label: /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { gap: 8, align: "center", children: [
|
|
50866
|
-
bgColor.length && /* @__PURE__ */ jsxRuntimeExports.jsx(Styled.Abbr, { $bgColor: bgColor, children: abbr }),
|
|
50968
|
+
bgColor.length && /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$2.Abbr, { $bgColor: bgColor, children: abbr }),
|
|
50867
50969
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { gap: 2, vertical: true, children: [
|
|
50868
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled.OptionLabelKind, { children: kind }),
|
|
50869
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled.OptionLabelVersion, { children: version.groupVersion })
|
|
50970
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$2.OptionLabelKind, { children: kind }),
|
|
50971
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$2.OptionLabelVersion, { children: version.groupVersion })
|
|
50870
50972
|
] })
|
|
50871
50973
|
] }),
|
|
50872
50974
|
value: `${group}~${version.version}~${version.resource}`
|
|
50873
50975
|
};
|
|
50874
50976
|
}) || [];
|
|
50875
50977
|
const tagRender = ({ label, closable, onClose }) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
50876
|
-
Styled.SelectTag,
|
|
50978
|
+
Styled$2.SelectTag,
|
|
50877
50979
|
{
|
|
50878
50980
|
onMouseDown: (e) => {
|
|
50879
50981
|
e.preventDefault();
|
|
@@ -50881,15 +50983,15 @@ const Search = ({ theme: theme$1, form, constants, kindsWithVersion }) => {
|
|
|
50881
50983
|
},
|
|
50882
50984
|
closable,
|
|
50883
50985
|
onClose,
|
|
50884
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled.SelectTagSpan, { children: label })
|
|
50986
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$2.SelectTagSpan, { children: label })
|
|
50885
50987
|
}
|
|
50886
50988
|
);
|
|
50887
50989
|
const maxTagPlaceholder = () => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
50888
50990
|
"Kinds",
|
|
50889
50991
|
" ",
|
|
50890
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled.MaxTagPlacheolderLength, { $colorBorder: token.colorBorder, children: watchedKinds?.length ? watchedKinds.length : "0" })
|
|
50992
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$2.MaxTagPlacheolderLength, { $colorBorder: token.colorBorder, children: watchedKinds?.length ? watchedKinds.length : "0" })
|
|
50891
50993
|
] });
|
|
50892
|
-
const maxTagTagRender = ({ label }) => /* @__PURE__ */ jsxRuntimeExports.jsx(Styled.MaxTagPlacheolder, { children: label });
|
|
50994
|
+
const maxTagTagRender = ({ label }) => /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$2.MaxTagPlacheolder, { children: label });
|
|
50893
50995
|
const getKindByGvr = kindByGvr(kindsWithVersion);
|
|
50894
50996
|
const removeKind = (value) => {
|
|
50895
50997
|
const cur = form.getFieldValue(FIELD_NAME) || [];
|
|
@@ -50915,7 +51017,7 @@ const Search = ({ theme: theme$1, form, constants, kindsWithVersion }) => {
|
|
|
50915
51017
|
] });
|
|
50916
51018
|
};
|
|
50917
51019
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
50918
|
-
Styled.BackgroundContainer,
|
|
51020
|
+
Styled$2.BackgroundContainer,
|
|
50919
51021
|
{
|
|
50920
51022
|
$colorBorder: token.colorBorder,
|
|
50921
51023
|
$colorBgLayout: token.colorBgLayout,
|
|
@@ -50923,8 +51025,8 @@ const Search = ({ theme: theme$1, form, constants, kindsWithVersion }) => {
|
|
|
50923
51025
|
watchedKinds && watchedKinds.length || watchedName && watchedName.length || watchedLabels && watchedLabels.length || watchedFields && watchedFields.length
|
|
50924
51026
|
),
|
|
50925
51027
|
children: [
|
|
50926
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Form, { form, layout: "vertical", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled.FormContainer, { children: [
|
|
50927
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled.ResetedFormItem, { name: FIELD_NAME, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
51028
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Form, { form, layout: "vertical", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$2.FormContainer, { children: [
|
|
51029
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$2.ResetedFormItem, { name: FIELD_NAME, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
50928
51030
|
Select,
|
|
50929
51031
|
{
|
|
50930
51032
|
mode: "multiple",
|
|
@@ -50940,7 +51042,7 @@ const Search = ({ theme: theme$1, form, constants, kindsWithVersion }) => {
|
|
|
50940
51042
|
optionRender: kindOptionRender
|
|
50941
51043
|
}
|
|
50942
51044
|
) }),
|
|
50943
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled.ResetedFormItem, { name: TYPE_SELECTOR, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
51045
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$2.ResetedFormItem, { name: TYPE_SELECTOR, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
50944
51046
|
Select,
|
|
50945
51047
|
{
|
|
50946
51048
|
placeholder: "Select",
|
|
@@ -50954,13 +51056,13 @@ const Search = ({ theme: theme$1, form, constants, kindsWithVersion }) => {
|
|
|
50954
51056
|
showSearch: true
|
|
50955
51057
|
}
|
|
50956
51058
|
) }),
|
|
50957
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled.HideableContainer, { $isHidden: watchedTypedSelector === "labels" || watchedTypedSelector === "fields", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled.ResetedFormItem, { name: FIELD_NAME_STRING, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Input, { allowClear: true, placeholder: "Name", disabled: !watchedKinds || !watchedKinds.length }) }) }),
|
|
51059
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$2.HideableContainer, { $isHidden: watchedTypedSelector === "labels" || watchedTypedSelector === "fields", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$2.ResetedFormItem, { name: FIELD_NAME_STRING, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Input, { allowClear: true, placeholder: "Name", disabled: !watchedKinds || !watchedKinds.length }) }) }),
|
|
50958
51060
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
50959
|
-
Styled.HideableContainer,
|
|
51061
|
+
Styled$2.HideableContainer,
|
|
50960
51062
|
{
|
|
50961
51063
|
$isHidden: watchedTypedSelector === "name" || watchedTypedSelector === "fields" || watchedTypedSelector === void 0,
|
|
50962
51064
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
50963
|
-
Styled.ResetedFormItem,
|
|
51065
|
+
Styled$2.ResetedFormItem,
|
|
50964
51066
|
{
|
|
50965
51067
|
name: FIELD_NAME_LABELS,
|
|
50966
51068
|
validateTrigger: "onBlur",
|
|
@@ -51000,11 +51102,11 @@ const Search = ({ theme: theme$1, form, constants, kindsWithVersion }) => {
|
|
|
51000
51102
|
}
|
|
51001
51103
|
),
|
|
51002
51104
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
51003
|
-
Styled.HideableContainer,
|
|
51105
|
+
Styled$2.HideableContainer,
|
|
51004
51106
|
{
|
|
51005
51107
|
$isHidden: watchedTypedSelector === "name" || watchedTypedSelector === "labels" || watchedTypedSelector === void 0,
|
|
51006
51108
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
51007
|
-
Styled.ResetedFormItem,
|
|
51109
|
+
Styled$2.ResetedFormItem,
|
|
51008
51110
|
{
|
|
51009
51111
|
name: FIELD_NAME_FIELDS,
|
|
51010
51112
|
validateTrigger: "onBlur",
|
|
@@ -51044,16 +51146,16 @@ const Search = ({ theme: theme$1, form, constants, kindsWithVersion }) => {
|
|
|
51044
51146
|
}
|
|
51045
51147
|
)
|
|
51046
51148
|
] }) }),
|
|
51047
|
-
watchedKinds && watchedKinds.length || watchedName && watchedName.length || watchedLabels && watchedLabels.length || watchedFields && watchedFields.length ? /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled.BottomTagsContainer, { children: [
|
|
51048
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(Styled.OptionsFlex, { children: [
|
|
51049
|
-
watchedKinds && watchedKinds.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled.BottomTagsRow, { children: [
|
|
51050
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled.BottomTagsRowText, { $colorDescription: token.colorTextDescription, children: "Kinds:" }),
|
|
51051
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled.BottomTagsHolder, { children: watchedKinds.map((fullKindName) => {
|
|
51149
|
+
watchedKinds && watchedKinds.length || watchedName && watchedName.length || watchedLabels && watchedLabels.length || watchedFields && watchedFields.length ? /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$2.BottomTagsContainer, { children: [
|
|
51150
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$2.OptionsFlex, { children: [
|
|
51151
|
+
watchedKinds && watchedKinds.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$2.BottomTagsRow, { children: [
|
|
51152
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$2.BottomTagsRowText, { $colorDescription: token.colorTextDescription, children: "Kinds:" }),
|
|
51153
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$2.BottomTagsHolder, { children: watchedKinds.map((fullKindName) => {
|
|
51052
51154
|
const kind = getKindByGvr(fullKindName);
|
|
51053
51155
|
const abbr = getUppercase(kind && kind.length ? kind : "Loading");
|
|
51054
51156
|
const bgColor = kind && kind.length ? hslFromString(kind, theme$1) : "";
|
|
51055
51157
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
51056
|
-
Styled.CustomTag,
|
|
51158
|
+
Styled$2.CustomTag,
|
|
51057
51159
|
{
|
|
51058
51160
|
onClose: (e) => {
|
|
51059
51161
|
e.preventDefault();
|
|
@@ -51061,7 +51163,7 @@ const Search = ({ theme: theme$1, form, constants, kindsWithVersion }) => {
|
|
|
51061
51163
|
},
|
|
51062
51164
|
closable: true,
|
|
51063
51165
|
children: [
|
|
51064
|
-
kind && kind.length && bgColor.length && /* @__PURE__ */ jsxRuntimeExports.jsx(Styled.Abbr, { $bgColor: bgColor, children: abbr }),
|
|
51166
|
+
kind && kind.length && bgColor.length && /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$2.Abbr, { $bgColor: bgColor, children: abbr }),
|
|
51065
51167
|
kind
|
|
51066
51168
|
]
|
|
51067
51169
|
},
|
|
@@ -51069,10 +51171,10 @@ const Search = ({ theme: theme$1, form, constants, kindsWithVersion }) => {
|
|
|
51069
51171
|
);
|
|
51070
51172
|
}) })
|
|
51071
51173
|
] }),
|
|
51072
|
-
watchedName && watchedName.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled.BottomTagsRow, { children: [
|
|
51073
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled.BottomTagsRowText, { $colorDescription: token.colorTextDescription, children: "Name:" }),
|
|
51074
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled.BottomTagsHolder, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
51075
|
-
Styled.CustomTag,
|
|
51174
|
+
watchedName && watchedName.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$2.BottomTagsRow, { children: [
|
|
51175
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$2.BottomTagsRowText, { $colorDescription: token.colorTextDescription, children: "Name:" }),
|
|
51176
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$2.BottomTagsHolder, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
51177
|
+
Styled$2.CustomTag,
|
|
51076
51178
|
{
|
|
51077
51179
|
onClose: (e) => {
|
|
51078
51180
|
e.preventDefault();
|
|
@@ -51083,10 +51185,10 @@ const Search = ({ theme: theme$1, form, constants, kindsWithVersion }) => {
|
|
|
51083
51185
|
}
|
|
51084
51186
|
) })
|
|
51085
51187
|
] }),
|
|
51086
|
-
watchedLabels && watchedLabels.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled.BottomTagsRow, { children: [
|
|
51087
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled.BottomTagsRowText, { $colorDescription: token.colorTextDescription, children: "Labels:" }),
|
|
51088
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled.BottomTagsHolder, { children: watchedLabels.map((label) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
51089
|
-
Styled.CustomTag,
|
|
51188
|
+
watchedLabels && watchedLabels.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$2.BottomTagsRow, { children: [
|
|
51189
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$2.BottomTagsRowText, { $colorDescription: token.colorTextDescription, children: "Labels:" }),
|
|
51190
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$2.BottomTagsHolder, { children: watchedLabels.map((label) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
51191
|
+
Styled$2.CustomTag,
|
|
51090
51192
|
{
|
|
51091
51193
|
onClose: (e) => {
|
|
51092
51194
|
e.preventDefault();
|
|
@@ -51098,10 +51200,10 @@ const Search = ({ theme: theme$1, form, constants, kindsWithVersion }) => {
|
|
|
51098
51200
|
label
|
|
51099
51201
|
)) })
|
|
51100
51202
|
] }),
|
|
51101
|
-
watchedFields && watchedFields.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled.BottomTagsRow, { children: [
|
|
51102
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled.BottomTagsRowText, { $colorDescription: token.colorTextDescription, children: "Fields:" }),
|
|
51103
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled.BottomTagsHolder, { children: watchedFields.map((field) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
51104
|
-
Styled.CustomTag,
|
|
51203
|
+
watchedFields && watchedFields.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$2.BottomTagsRow, { children: [
|
|
51204
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$2.BottomTagsRowText, { $colorDescription: token.colorTextDescription, children: "Fields:" }),
|
|
51205
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$2.BottomTagsHolder, { children: watchedFields.map((field) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
51206
|
+
Styled$2.CustomTag,
|
|
51105
51207
|
{
|
|
51106
51208
|
onClose: (e) => {
|
|
51107
51209
|
e.preventDefault();
|
|
@@ -51114,7 +51216,7 @@ const Search = ({ theme: theme$1, form, constants, kindsWithVersion }) => {
|
|
|
51114
51216
|
)) })
|
|
51115
51217
|
] })
|
|
51116
51218
|
] }),
|
|
51117
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled.ClearButtonHolder, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
51219
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$2.ClearButtonHolder, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
51118
51220
|
Button,
|
|
51119
51221
|
{
|
|
51120
51222
|
type: "primary",
|
|
@@ -51138,6 +51240,731 @@ const Search = ({ theme: theme$1, form, constants, kindsWithVersion }) => {
|
|
|
51138
51240
|
);
|
|
51139
51241
|
};
|
|
51140
51242
|
|
|
51243
|
+
const getKinds = async ({ clusterName }) => {
|
|
51244
|
+
const result = await axios.get(`/api/clusters/${clusterName}/openapi-bff/search/kinds/getKinds`);
|
|
51245
|
+
return result.data;
|
|
51246
|
+
};
|
|
51247
|
+
|
|
51248
|
+
const parseK8sVersion$1 = (raw) => {
|
|
51249
|
+
const m = /^v(?<major>\d+)(?:(?<stage>alpha|beta)(?<stageNum>\d+)?)?$/i.exec(raw ?? "");
|
|
51250
|
+
if (!m?.groups) return { rank: 0, major: -1, stageNum: -1 };
|
|
51251
|
+
const stage = (m.groups.stage ?? "").toLowerCase();
|
|
51252
|
+
const major = Number(m.groups.major);
|
|
51253
|
+
const stageNum = m.groups.stageNum ? Number(m.groups.stageNum) : 0;
|
|
51254
|
+
const rank = stage === "" ? 3 : stage === "beta" ? 2 : 1;
|
|
51255
|
+
return { rank, major, stageNum };
|
|
51256
|
+
};
|
|
51257
|
+
const versionToken$1 = (e) => e.version || (e.groupVersion?.split("/").pop() ?? "");
|
|
51258
|
+
const compareK8sVersionDesc$1 = (a, b) => {
|
|
51259
|
+
const pa = parseK8sVersion$1(versionToken$1(a));
|
|
51260
|
+
const pb = parseK8sVersion$1(versionToken$1(b));
|
|
51261
|
+
return pb.rank - pa.rank || pb.major - pa.major || pb.stageNum - pa.stageNum;
|
|
51262
|
+
};
|
|
51263
|
+
const orderVersions = (versions) => {
|
|
51264
|
+
const preferredIdx = versions.findIndex((v) => v.preferred === true);
|
|
51265
|
+
if (preferredIdx >= 0) {
|
|
51266
|
+
const preferred = versions[preferredIdx];
|
|
51267
|
+
const rest = versions.filter((_, i) => i !== preferredIdx).slice().sort(compareK8sVersionDesc$1);
|
|
51268
|
+
return [preferred, ...rest];
|
|
51269
|
+
}
|
|
51270
|
+
return versions.slice().sort(compareK8sVersionDesc$1);
|
|
51271
|
+
};
|
|
51272
|
+
const getSortedKindsAll = (index) => {
|
|
51273
|
+
const counts = index.items.reduce(
|
|
51274
|
+
(acc, item) => ({ ...acc, [item.kind]: (acc[item.kind] ?? 0) + 1 }),
|
|
51275
|
+
{}
|
|
51276
|
+
);
|
|
51277
|
+
const rows = index.items.flatMap((item) => {
|
|
51278
|
+
const ordered = orderVersions(item.versions);
|
|
51279
|
+
return ordered.map((v) => ({
|
|
51280
|
+
group: item.group,
|
|
51281
|
+
kind: item.kind,
|
|
51282
|
+
// clone to drop Readonly<> without changing fields (incl. preferred)
|
|
51283
|
+
version: { ...v },
|
|
51284
|
+
...counts[item.kind] > 1 ? { notUnique: true } : {}
|
|
51285
|
+
}));
|
|
51286
|
+
});
|
|
51287
|
+
return rows.sort(
|
|
51288
|
+
(a, b) => a.kind.localeCompare(b.kind, void 0, { sensitivity: "base" }) || a.group.localeCompare(b.group, void 0, { sensitivity: "base" })
|
|
51289
|
+
);
|
|
51290
|
+
};
|
|
51291
|
+
|
|
51292
|
+
const parseApiVersion = (apiVersion) => {
|
|
51293
|
+
const parts = apiVersion.trim().split("/");
|
|
51294
|
+
return parts.length === 1 ? { group: "", version: parts[0] } : { group: parts[0], version: parts[1] };
|
|
51295
|
+
};
|
|
51296
|
+
const pluralByKind = (entries) => (kind, apiVersion) => {
|
|
51297
|
+
const norm = (s) => s.trim();
|
|
51298
|
+
const kindNorm = norm(kind);
|
|
51299
|
+
const gv = apiVersion ? parseApiVersion(apiVersion) : void 0;
|
|
51300
|
+
const candidates = entries.filter((e) => norm(e.kind) === kindNorm);
|
|
51301
|
+
if (candidates.length === 0) return void 0;
|
|
51302
|
+
const filtered = gv ? candidates.filter((e) => norm(e.group) === norm(gv.group) && e.version.version === gv.version) : candidates;
|
|
51303
|
+
if (filtered.length === 0) return void 0;
|
|
51304
|
+
const preferredFirst = gv ? filtered : [...filtered.filter((e) => e.version.preferred), ...filtered.filter((e) => !e.version.preferred)];
|
|
51305
|
+
const resources = preferredFirst.map((e) => e.version.resource).filter(Boolean);
|
|
51306
|
+
const uniq = Array.from(new Set(resources));
|
|
51307
|
+
if (!gv && uniq.length > 1) {
|
|
51308
|
+
const first = preferredFirst[0]?.version.resource;
|
|
51309
|
+
return first ?? void 0;
|
|
51310
|
+
}
|
|
51311
|
+
return uniq.length === 1 ? uniq[0] : void 0;
|
|
51312
|
+
};
|
|
51313
|
+
|
|
51314
|
+
const eventKey = (e) => {
|
|
51315
|
+
const n = e.metadata?.name ?? "";
|
|
51316
|
+
const ns = e.metadata?.namespace ?? "";
|
|
51317
|
+
return `${ns}/${n}`;
|
|
51318
|
+
};
|
|
51319
|
+
const compareRV = (a, b) => {
|
|
51320
|
+
if (a.length !== b.length) return a.length > b.length ? 1 : -1;
|
|
51321
|
+
return a > b ? 1 : a < b ? -1 : 0;
|
|
51322
|
+
};
|
|
51323
|
+
const getRV = (item) => item?.metadata?.resourceVersion;
|
|
51324
|
+
const getMaxRV = (items) => {
|
|
51325
|
+
const rvs = items.map(getRV).filter((v) => Boolean(v)).sort(compareRV);
|
|
51326
|
+
return rvs.length ? rvs[rvs.length - 1] : void 0;
|
|
51327
|
+
};
|
|
51328
|
+
|
|
51329
|
+
const reducer = (state, action) => {
|
|
51330
|
+
switch (action.type) {
|
|
51331
|
+
case "RESET": {
|
|
51332
|
+
const order = action.items.map(eventKey);
|
|
51333
|
+
const byKey = {};
|
|
51334
|
+
action.items.forEach((it) => byKey[eventKey(it)] = it);
|
|
51335
|
+
return { order, byKey };
|
|
51336
|
+
}
|
|
51337
|
+
case "APPEND_PAGE": {
|
|
51338
|
+
const next = { ...state.byKey };
|
|
51339
|
+
const addKeys = [];
|
|
51340
|
+
action.items.forEach((it) => {
|
|
51341
|
+
const k = eventKey(it);
|
|
51342
|
+
if (!next[k]) addKeys.push(k);
|
|
51343
|
+
next[k] = it;
|
|
51344
|
+
});
|
|
51345
|
+
return { order: [...state.order, ...addKeys], byKey: next };
|
|
51346
|
+
}
|
|
51347
|
+
case "UPSERT": {
|
|
51348
|
+
const k = eventKey(action.item);
|
|
51349
|
+
const exists = Boolean(state.byKey[k]);
|
|
51350
|
+
const byKey = { ...state.byKey, [k]: action.item };
|
|
51351
|
+
const order = exists ? state.order : [k, ...state.order];
|
|
51352
|
+
return { order, byKey };
|
|
51353
|
+
}
|
|
51354
|
+
case "REMOVE": {
|
|
51355
|
+
if (!state.byKey[action.key]) return state;
|
|
51356
|
+
const byKey = { ...state.byKey };
|
|
51357
|
+
delete byKey[action.key];
|
|
51358
|
+
return { order: state.order.filter((k) => k !== action.key), byKey };
|
|
51359
|
+
}
|
|
51360
|
+
default:
|
|
51361
|
+
return state;
|
|
51362
|
+
}
|
|
51363
|
+
};
|
|
51364
|
+
|
|
51365
|
+
const eventText = (e) => e.note || e.message || "";
|
|
51366
|
+
const timeAgo = (iso) => {
|
|
51367
|
+
if (!iso) {
|
|
51368
|
+
return "";
|
|
51369
|
+
}
|
|
51370
|
+
const dt = new Date(iso).getTime();
|
|
51371
|
+
const diff = Date.now() - dt;
|
|
51372
|
+
if (diff < 6e4) {
|
|
51373
|
+
return `${Math.max(0, Math.floor(diff / 1e3))}s ago`;
|
|
51374
|
+
}
|
|
51375
|
+
if (diff < 36e5) {
|
|
51376
|
+
return `${Math.floor(diff / 6e4)}m ago`;
|
|
51377
|
+
}
|
|
51378
|
+
if (diff < 864e5) {
|
|
51379
|
+
return `${Math.floor(diff / 36e5)}h ago`;
|
|
51380
|
+
}
|
|
51381
|
+
return new Date(iso).toLocaleString();
|
|
51382
|
+
};
|
|
51383
|
+
const getResourceLink = ({
|
|
51384
|
+
baseprefix,
|
|
51385
|
+
cluster,
|
|
51386
|
+
namespace,
|
|
51387
|
+
apiGroupVersion,
|
|
51388
|
+
pluralName,
|
|
51389
|
+
name,
|
|
51390
|
+
baseFactoryNamespacedAPIKey,
|
|
51391
|
+
baseFactoryClusterSceopedAPIKey,
|
|
51392
|
+
baseFactoryNamespacedBuiltinKey,
|
|
51393
|
+
baseFactoryClusterSceopedBuiltinKey
|
|
51394
|
+
}) => {
|
|
51395
|
+
if (!pluralName || !name) {
|
|
51396
|
+
return void 0;
|
|
51397
|
+
}
|
|
51398
|
+
if (apiGroupVersion === "v1") {
|
|
51399
|
+
return `${baseprefix}/${cluster}${namespace ? `/${namespace}` : ""}/factory/${namespace ? baseFactoryNamespacedBuiltinKey : baseFactoryClusterSceopedBuiltinKey}/${apiGroupVersion}/${pluralName}/${name}`;
|
|
51400
|
+
}
|
|
51401
|
+
return `${baseprefix}/${cluster}${namespace ? `/${namespace}` : ""}/factory/${namespace ? baseFactoryNamespacedAPIKey : baseFactoryClusterSceopedAPIKey}/${apiGroupVersion}/${pluralName}/${name}`;
|
|
51402
|
+
};
|
|
51403
|
+
const getNamespaceLink = ({
|
|
51404
|
+
baseprefix,
|
|
51405
|
+
cluster,
|
|
51406
|
+
apiGroupVersion,
|
|
51407
|
+
pluralName,
|
|
51408
|
+
namespace,
|
|
51409
|
+
baseNamespaceFactoryKey
|
|
51410
|
+
}) => {
|
|
51411
|
+
if (!namespace) {
|
|
51412
|
+
return void 0;
|
|
51413
|
+
}
|
|
51414
|
+
return `${baseprefix}/${cluster}/factory/${baseNamespaceFactoryKey}/${apiGroupVersion}/${pluralName}/${namespace}`;
|
|
51415
|
+
};
|
|
51416
|
+
const formatEventSummary = (event) => {
|
|
51417
|
+
if (!event.deprecatedCount || !event.deprecatedFirstTimestamp) {
|
|
51418
|
+
return void 0;
|
|
51419
|
+
}
|
|
51420
|
+
const now = /* @__PURE__ */ new Date();
|
|
51421
|
+
const first = new Date(event.deprecatedFirstTimestamp);
|
|
51422
|
+
const days = Math.floor((now.getTime() - first.getTime()) / (1e3 * 60 * 60 * 24));
|
|
51423
|
+
return `${event.deprecatedCount} times ${days === 0 ? "today" : `in the last ${days} days`}`;
|
|
51424
|
+
};
|
|
51425
|
+
|
|
51426
|
+
const Card = styled.div`
|
|
51427
|
+
border-radius: 6px;
|
|
51428
|
+
padding: 16px 8px;
|
|
51429
|
+
border: ${({ $bigBorder }) => $bigBorder ? 2 : 1}px solid ${({ $mainColor }) => $mainColor};
|
|
51430
|
+
gap: 12px;
|
|
51431
|
+
margin-bottom: 16px;
|
|
51432
|
+
position: relative;
|
|
51433
|
+
|
|
51434
|
+
&:before {
|
|
51435
|
+
position: absolute;
|
|
51436
|
+
content: '';
|
|
51437
|
+
width: 36px;
|
|
51438
|
+
height: ${({ $bigBorder }) => $bigBorder ? 2 : 1}px;
|
|
51439
|
+
background: ${({ $mainColor }) => $mainColor};
|
|
51440
|
+
left: -37px;
|
|
51441
|
+
top: 50%; /* halfway down parent */
|
|
51442
|
+
transform: translateY(-50%); /* center vertically */
|
|
51443
|
+
}
|
|
51444
|
+
|
|
51445
|
+
&:after {
|
|
51446
|
+
position: absolute;
|
|
51447
|
+
content: '';
|
|
51448
|
+
width: ${({ $bigBorder }) => $bigBorder ? 7 : 6}px;
|
|
51449
|
+
height: ${({ $bigBorder }) => $bigBorder ? 7 : 6}px;
|
|
51450
|
+
border-radius: 50%;
|
|
51451
|
+
background: ${({ $mainColor }) => $mainColor};
|
|
51452
|
+
left: ${({ $bigBorder }) => $bigBorder ? -41 : -39}px;
|
|
51453
|
+
top: 50%;
|
|
51454
|
+
transform: translateY(-50%);
|
|
51455
|
+
}
|
|
51456
|
+
`;
|
|
51457
|
+
const Abbr = styled.span`
|
|
51458
|
+
background-color: ${({ $bgColor }) => $bgColor};
|
|
51459
|
+
border-radius: 13px;
|
|
51460
|
+
padding: 1px 5px;
|
|
51461
|
+
font-size: 13px;
|
|
51462
|
+
height: min-content;
|
|
51463
|
+
margin-right: 4px;
|
|
51464
|
+
`;
|
|
51465
|
+
const TimeStamp = styled.div`
|
|
51466
|
+
font-weight: 400;
|
|
51467
|
+
font-size: 12px;
|
|
51468
|
+
line-height: 20px;
|
|
51469
|
+
`;
|
|
51470
|
+
const Title = styled.div`
|
|
51471
|
+
font-weight: 700;
|
|
51472
|
+
`;
|
|
51473
|
+
const TimesInPeriod = styled.div`
|
|
51474
|
+
margin-top: -16px;
|
|
51475
|
+
`;
|
|
51476
|
+
const Styled$1 = {
|
|
51477
|
+
Card,
|
|
51478
|
+
Abbr,
|
|
51479
|
+
TimeStamp,
|
|
51480
|
+
Title,
|
|
51481
|
+
TimesInPeriod
|
|
51482
|
+
};
|
|
51483
|
+
|
|
51484
|
+
const EventRow = ({
|
|
51485
|
+
e,
|
|
51486
|
+
theme: theme$1,
|
|
51487
|
+
baseprefix,
|
|
51488
|
+
cluster,
|
|
51489
|
+
getPlural,
|
|
51490
|
+
baseFactoryNamespacedAPIKey,
|
|
51491
|
+
baseFactoryClusterSceopedAPIKey,
|
|
51492
|
+
baseFactoryNamespacedBuiltinKey,
|
|
51493
|
+
baseFactoryClusterSceopedBuiltinKey,
|
|
51494
|
+
baseNamespaceFactoryKey
|
|
51495
|
+
}) => {
|
|
51496
|
+
const { token } = theme.useToken();
|
|
51497
|
+
const navigate = useNavigate();
|
|
51498
|
+
const abbr = e.regarding?.kind ? getUppercase(e.regarding.kind) : void 0;
|
|
51499
|
+
const bgColor = e.regarding?.kind && abbr ? hslFromString(e.regarding?.kind, theme$1) : "initial";
|
|
51500
|
+
const bgColorNamespace = hslFromString("Namespace", theme$1);
|
|
51501
|
+
const regardingKind = e.regarding?.kind;
|
|
51502
|
+
const regardingApiVersion = e.regarding?.apiVersion || "v1";
|
|
51503
|
+
const pluralName = regardingKind && regardingApiVersion ? getPlural?.(regardingKind, regardingApiVersion) : void 0;
|
|
51504
|
+
const resourceLink = getResourceLink({
|
|
51505
|
+
baseprefix,
|
|
51506
|
+
cluster,
|
|
51507
|
+
namespace: e.regarding?.namespace,
|
|
51508
|
+
apiGroupVersion: regardingApiVersion,
|
|
51509
|
+
pluralName,
|
|
51510
|
+
name: e.regarding?.name,
|
|
51511
|
+
baseFactoryNamespacedAPIKey,
|
|
51512
|
+
baseFactoryClusterSceopedAPIKey,
|
|
51513
|
+
baseFactoryNamespacedBuiltinKey,
|
|
51514
|
+
baseFactoryClusterSceopedBuiltinKey
|
|
51515
|
+
});
|
|
51516
|
+
const namespaceLink = getNamespaceLink({
|
|
51517
|
+
baseprefix,
|
|
51518
|
+
cluster,
|
|
51519
|
+
apiGroupVersion: "v1",
|
|
51520
|
+
pluralName: "namespaces",
|
|
51521
|
+
namespace: e.regarding?.namespace,
|
|
51522
|
+
baseNamespaceFactoryKey
|
|
51523
|
+
});
|
|
51524
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
51525
|
+
Styled$1.Card,
|
|
51526
|
+
{
|
|
51527
|
+
$bigBorder: e.type === "Warning",
|
|
51528
|
+
$mainColor: e.type === "Warning" ? token.colorWarningActive : token.colorText,
|
|
51529
|
+
children: [
|
|
51530
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { justify: "space-between", align: "center", children: [
|
|
51531
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { align: "center", gap: 16, children: [
|
|
51532
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { align: "center", gap: 8, children: [
|
|
51533
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$1.Abbr, { $bgColor: bgColor, children: abbr }),
|
|
51534
|
+
resourceLink ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
51535
|
+
Typography.Link,
|
|
51536
|
+
{
|
|
51537
|
+
onClick: (e2) => {
|
|
51538
|
+
e2.preventDefault();
|
|
51539
|
+
navigate(resourceLink);
|
|
51540
|
+
},
|
|
51541
|
+
children: e.regarding?.name
|
|
51542
|
+
}
|
|
51543
|
+
) : /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { children: e.regarding?.name })
|
|
51544
|
+
] }),
|
|
51545
|
+
e.regarding?.namespace && /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { align: "center", gap: 8, children: [
|
|
51546
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$1.Abbr, { $bgColor: bgColorNamespace, children: "NS" }),
|
|
51547
|
+
namespaceLink ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
51548
|
+
Typography.Link,
|
|
51549
|
+
{
|
|
51550
|
+
onClick: (e2) => {
|
|
51551
|
+
e2.preventDefault();
|
|
51552
|
+
navigate(namespaceLink);
|
|
51553
|
+
},
|
|
51554
|
+
children: e.regarding?.namespace
|
|
51555
|
+
}
|
|
51556
|
+
) : /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { children: e.regarding?.namespace })
|
|
51557
|
+
] })
|
|
51558
|
+
] }),
|
|
51559
|
+
e.metadata?.creationTimestamp && /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { gap: 4, align: "center", children: [
|
|
51560
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(EarthIcon, {}) }),
|
|
51561
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$1.TimeStamp, { children: timeAgo(e.metadata?.creationTimestamp) })
|
|
51562
|
+
] })
|
|
51563
|
+
] }),
|
|
51564
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Spacer$1, { $space: 16, $samespace: true }),
|
|
51565
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { justify: "space-between", children: [
|
|
51566
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { gap: 8, align: "center", wrap: true, children: [
|
|
51567
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: e.deprecatedSource?.component && /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { gap: 8, align: "center", wrap: true, children: [
|
|
51568
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { gap: 6, align: "center", wrap: true, children: [
|
|
51569
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { type: "secondary", children: "Generated by" }),
|
|
51570
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$1.Title, { children: e.deprecatedSource?.component })
|
|
51571
|
+
] }),
|
|
51572
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { type: "secondary", children: "•" }) })
|
|
51573
|
+
] }) }),
|
|
51574
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$1.Title, { children: e.reason || e.action || "Event" })
|
|
51575
|
+
] }),
|
|
51576
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$1.TimesInPeriod, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { type: "secondary", children: formatEventSummary(e) }) })
|
|
51577
|
+
] }),
|
|
51578
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Spacer$1, { $space: 16, $samespace: true }),
|
|
51579
|
+
eventText(e) && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: eventText(e) })
|
|
51580
|
+
]
|
|
51581
|
+
}
|
|
51582
|
+
);
|
|
51583
|
+
};
|
|
51584
|
+
|
|
51585
|
+
const Root = styled.div`
|
|
51586
|
+
display: flex;
|
|
51587
|
+
flex-direction: column;
|
|
51588
|
+
width: 100%;
|
|
51589
|
+
height: 100%;
|
|
51590
|
+
max-height: calc(100vh - ${({ $substractHeight }) => $substractHeight}px);
|
|
51591
|
+
/* border-radius: 12px; */
|
|
51592
|
+
overflow: hidden;
|
|
51593
|
+
position: relative;
|
|
51594
|
+
`;
|
|
51595
|
+
const Header = styled.div`
|
|
51596
|
+
display: flex;
|
|
51597
|
+
align-items: center;
|
|
51598
|
+
gap: 16px;
|
|
51599
|
+
align-self: stretch;
|
|
51600
|
+
margin-bottom: 16px;
|
|
51601
|
+
padding-left: 19px;
|
|
51602
|
+
`;
|
|
51603
|
+
const HeaderLeftSide = styled.div`
|
|
51604
|
+
display: flex;
|
|
51605
|
+
align-items: center;
|
|
51606
|
+
gap: 10px;
|
|
51607
|
+
flex: 1 0 0;
|
|
51608
|
+
`;
|
|
51609
|
+
const CursorPointerDiv = styled.div`
|
|
51610
|
+
cursor: pointer;
|
|
51611
|
+
user-select: none;
|
|
51612
|
+
`;
|
|
51613
|
+
const StatusText = styled.div`
|
|
51614
|
+
font-size: 16px;
|
|
51615
|
+
line-height: 24px; /* 150% */
|
|
51616
|
+
`;
|
|
51617
|
+
const HeaderRightSide = styled.div`
|
|
51618
|
+
display: flex;
|
|
51619
|
+
gap: 4px;
|
|
51620
|
+
text-align: right;
|
|
51621
|
+
color: ${({ $colorTextDescription }) => $colorTextDescription};
|
|
51622
|
+
`;
|
|
51623
|
+
const List = styled.div`
|
|
51624
|
+
flex: 1;
|
|
51625
|
+
overflow-y: auto;
|
|
51626
|
+
padding: 8px 8px 8px 72px;
|
|
51627
|
+
z-index: 2;
|
|
51628
|
+
`;
|
|
51629
|
+
const Timeline = styled.div`
|
|
51630
|
+
width: 100%;
|
|
51631
|
+
height: calc(100vh - ${({ $substractHeight }) => $substractHeight}px);
|
|
51632
|
+
position: absolute;
|
|
51633
|
+
top: 40px;
|
|
51634
|
+
left: 36px;
|
|
51635
|
+
z-index: 1;
|
|
51636
|
+
|
|
51637
|
+
&:before {
|
|
51638
|
+
content: '';
|
|
51639
|
+
position: absolute;
|
|
51640
|
+
top: -2px;
|
|
51641
|
+
width: 1px;
|
|
51642
|
+
background: ${({ $colorText }) => $colorText};
|
|
51643
|
+
pointer-events: none;
|
|
51644
|
+
height: 100%;
|
|
51645
|
+
}
|
|
51646
|
+
`;
|
|
51647
|
+
const Sentinel = styled.div`
|
|
51648
|
+
height: 1px;
|
|
51649
|
+
`;
|
|
51650
|
+
const Styled = {
|
|
51651
|
+
Root,
|
|
51652
|
+
Header,
|
|
51653
|
+
HeaderLeftSide,
|
|
51654
|
+
CursorPointerDiv,
|
|
51655
|
+
StatusText,
|
|
51656
|
+
HeaderRightSide,
|
|
51657
|
+
Timeline,
|
|
51658
|
+
List,
|
|
51659
|
+
Sentinel
|
|
51660
|
+
};
|
|
51661
|
+
|
|
51662
|
+
const Events = ({
|
|
51663
|
+
theme: theme$1,
|
|
51664
|
+
baseprefix,
|
|
51665
|
+
cluster,
|
|
51666
|
+
wsUrl,
|
|
51667
|
+
pageSize = 50,
|
|
51668
|
+
substractHeight,
|
|
51669
|
+
baseFactoryNamespacedAPIKey,
|
|
51670
|
+
baseFactoryClusterSceopedAPIKey,
|
|
51671
|
+
baseFactoryNamespacedBuiltinKey,
|
|
51672
|
+
baseFactoryClusterSceopedBuiltinKey,
|
|
51673
|
+
baseNamespaceFactoryKey
|
|
51674
|
+
}) => {
|
|
51675
|
+
const { token } = theme.useToken();
|
|
51676
|
+
const [kindIndex, setKindIndex] = useState();
|
|
51677
|
+
const [kindsWithVersion, setKindWithVersion] = useState();
|
|
51678
|
+
useEffect(() => {
|
|
51679
|
+
getKinds({ clusterName: cluster }).then((data) => {
|
|
51680
|
+
setKindIndex(data);
|
|
51681
|
+
setKindWithVersion(getSortedKindsAll(data));
|
|
51682
|
+
}).catch((error) => {
|
|
51683
|
+
console.error(error);
|
|
51684
|
+
});
|
|
51685
|
+
}, [cluster]);
|
|
51686
|
+
const [isPaused, setIsPaused] = useState(false);
|
|
51687
|
+
const pausedRef = useRef(isPaused);
|
|
51688
|
+
useEffect(() => {
|
|
51689
|
+
pausedRef.current = isPaused;
|
|
51690
|
+
}, [isPaused]);
|
|
51691
|
+
const [isRemoveIgnored, setIsRemoveIgnored] = useState(true);
|
|
51692
|
+
const removeIgnoredRef = useRef(isRemoveIgnored);
|
|
51693
|
+
useEffect(() => {
|
|
51694
|
+
removeIgnoredRef.current = isRemoveIgnored;
|
|
51695
|
+
}, [isRemoveIgnored]);
|
|
51696
|
+
const latestRVRef = useRef(void 0);
|
|
51697
|
+
const [state, dispatch] = useReducer(reducer, { order: [], byKey: {} });
|
|
51698
|
+
const [contToken, setContToken] = useState(void 0);
|
|
51699
|
+
const [hasMore, setHasMore] = useState(false);
|
|
51700
|
+
const [connStatus, setConnStatus] = useState("connecting");
|
|
51701
|
+
const [lastError, setLastError] = useState(void 0);
|
|
51702
|
+
const wsRef = useRef(null);
|
|
51703
|
+
const listRef = useRef(null);
|
|
51704
|
+
const sentinelRef = useRef(null);
|
|
51705
|
+
const wantMoreRef = useRef(false);
|
|
51706
|
+
const fetchingRef = useRef(false);
|
|
51707
|
+
const backoffRef = useRef(750);
|
|
51708
|
+
const urlRef = useRef(wsUrl);
|
|
51709
|
+
const mountedRef = useRef(true);
|
|
51710
|
+
const reconnectTimerRef = useRef(null);
|
|
51711
|
+
const onMessageRef = useRef(() => {
|
|
51712
|
+
});
|
|
51713
|
+
const startedRef = useRef(false);
|
|
51714
|
+
const connectingRef = useRef(false);
|
|
51715
|
+
const haveAnchorRef = useRef(false);
|
|
51716
|
+
useEffect(() => {
|
|
51717
|
+
urlRef.current = wsUrl;
|
|
51718
|
+
}, [wsUrl]);
|
|
51719
|
+
const closeWS = useCallback(() => {
|
|
51720
|
+
try {
|
|
51721
|
+
wsRef.current?.close();
|
|
51722
|
+
} catch (e) {
|
|
51723
|
+
console.error(e);
|
|
51724
|
+
}
|
|
51725
|
+
wsRef.current = null;
|
|
51726
|
+
}, []);
|
|
51727
|
+
const sendScroll = useCallback(() => {
|
|
51728
|
+
const token2 = contToken;
|
|
51729
|
+
if (!wsRef.current || wsRef.current.readyState !== WebSocket.OPEN) return;
|
|
51730
|
+
if (!token2 || fetchingRef.current) return;
|
|
51731
|
+
fetchingRef.current = true;
|
|
51732
|
+
const msg = { type: "SCROLL", continue: token2, limit: pageSize };
|
|
51733
|
+
wsRef.current.send(JSON.stringify(msg));
|
|
51734
|
+
}, [contToken, pageSize]);
|
|
51735
|
+
const maybeAutoScroll = useCallback(() => {
|
|
51736
|
+
if (wantMoreRef.current && hasMore) sendScroll();
|
|
51737
|
+
}, [hasMore, sendScroll]);
|
|
51738
|
+
useEffect(() => {
|
|
51739
|
+
onMessageRef.current = (ev) => {
|
|
51740
|
+
let frame;
|
|
51741
|
+
try {
|
|
51742
|
+
frame = JSON.parse(String(ev.data));
|
|
51743
|
+
} catch {
|
|
51744
|
+
return;
|
|
51745
|
+
}
|
|
51746
|
+
if (!frame) return;
|
|
51747
|
+
if (frame.type === "INITIAL") {
|
|
51748
|
+
dispatch({ type: "RESET", items: frame.items });
|
|
51749
|
+
setContToken(frame.continue);
|
|
51750
|
+
setHasMore(Boolean(frame.continue));
|
|
51751
|
+
setLastError(void 0);
|
|
51752
|
+
fetchingRef.current = false;
|
|
51753
|
+
const snapshotRV = frame.resourceVersion || getMaxRV(frame.items);
|
|
51754
|
+
if (snapshotRV) {
|
|
51755
|
+
latestRVRef.current = snapshotRV;
|
|
51756
|
+
haveAnchorRef.current = true;
|
|
51757
|
+
}
|
|
51758
|
+
return;
|
|
51759
|
+
}
|
|
51760
|
+
if (frame.type === "PAGE") {
|
|
51761
|
+
dispatch({ type: "APPEND_PAGE", items: frame.items });
|
|
51762
|
+
setContToken(frame.continue);
|
|
51763
|
+
setHasMore(Boolean(frame.continue));
|
|
51764
|
+
fetchingRef.current = false;
|
|
51765
|
+
const batchRV = getMaxRV(frame.items);
|
|
51766
|
+
if (batchRV && (!latestRVRef.current || compareRV(batchRV, latestRVRef.current) > 0)) {
|
|
51767
|
+
latestRVRef.current = batchRV;
|
|
51768
|
+
}
|
|
51769
|
+
maybeAutoScroll();
|
|
51770
|
+
return;
|
|
51771
|
+
}
|
|
51772
|
+
if (frame.type === "PAGE_ERROR") {
|
|
51773
|
+
setLastError(frame.error || "Failed to load next page");
|
|
51774
|
+
fetchingRef.current = false;
|
|
51775
|
+
return;
|
|
51776
|
+
}
|
|
51777
|
+
if (frame.type === "ADDED" || frame.type === "MODIFIED" || frame.type === "DELETED") {
|
|
51778
|
+
const rv = getRV(frame.item);
|
|
51779
|
+
if (rv && (!latestRVRef.current || compareRV(rv, latestRVRef.current) > 0)) {
|
|
51780
|
+
latestRVRef.current = rv;
|
|
51781
|
+
}
|
|
51782
|
+
}
|
|
51783
|
+
if (!pausedRef.current) {
|
|
51784
|
+
if (frame.type === "ADDED" || frame.type === "MODIFIED") {
|
|
51785
|
+
dispatch({ type: "UPSERT", item: frame.item });
|
|
51786
|
+
return;
|
|
51787
|
+
}
|
|
51788
|
+
if (!removeIgnoredRef.current && frame.type === "DELETED") {
|
|
51789
|
+
dispatch({ type: "REMOVE", key: eventKey(frame.item) });
|
|
51790
|
+
}
|
|
51791
|
+
}
|
|
51792
|
+
};
|
|
51793
|
+
}, [maybeAutoScroll]);
|
|
51794
|
+
const buildWsUrl = useCallback((raw) => {
|
|
51795
|
+
try {
|
|
51796
|
+
const hasScheme = /^[a-z]+:/i.test(raw);
|
|
51797
|
+
const base = window.location.origin;
|
|
51798
|
+
let u = hasScheme ? new URL(raw) : new URL(raw.startsWith("/") ? raw : `/${raw}`, base);
|
|
51799
|
+
if (u.protocol === "http:") u.protocol = "ws:";
|
|
51800
|
+
if (u.protocol === "https:") u.protocol = "wss:";
|
|
51801
|
+
if (u.protocol !== "ws:" && u.protocol !== "wss:") {
|
|
51802
|
+
u = new URL(u.pathname + u.search + u.hash, base);
|
|
51803
|
+
u.protocol = window.location.protocol === "https:" ? "wss:" : "ws:";
|
|
51804
|
+
}
|
|
51805
|
+
if (haveAnchorRef.current && latestRVRef.current) {
|
|
51806
|
+
u.searchParams.set("sinceRV", latestRVRef.current);
|
|
51807
|
+
} else {
|
|
51808
|
+
u.searchParams.delete("sinceRV");
|
|
51809
|
+
}
|
|
51810
|
+
return u.toString();
|
|
51811
|
+
} catch {
|
|
51812
|
+
const origin = window.location.origin.replace(/^http/, "ws");
|
|
51813
|
+
const prefix = raw.startsWith("/") ? "" : "/";
|
|
51814
|
+
const rv = haveAnchorRef.current ? latestRVRef.current : void 0;
|
|
51815
|
+
const sep = raw.includes("?") ? "&" : "?";
|
|
51816
|
+
return `${origin}${prefix}${raw}${rv ? `${sep}sinceRV=${encodeURIComponent(rv)}` : ""}`;
|
|
51817
|
+
}
|
|
51818
|
+
}, []);
|
|
51819
|
+
const connect = useCallback(() => {
|
|
51820
|
+
if (!mountedRef.current) return;
|
|
51821
|
+
if (connectingRef.current) return;
|
|
51822
|
+
if (wsRef.current && (wsRef.current.readyState === WebSocket.OPEN || wsRef.current.readyState === WebSocket.CONNECTING)) {
|
|
51823
|
+
return;
|
|
51824
|
+
}
|
|
51825
|
+
connectingRef.current = true;
|
|
51826
|
+
setConnStatus("connecting");
|
|
51827
|
+
setLastError(void 0);
|
|
51828
|
+
const url = buildWsUrl(urlRef.current);
|
|
51829
|
+
const ws = new WebSocket(url);
|
|
51830
|
+
wsRef.current = ws;
|
|
51831
|
+
ws.addEventListener("open", () => {
|
|
51832
|
+
if (!mountedRef.current) return;
|
|
51833
|
+
backoffRef.current = 750;
|
|
51834
|
+
fetchingRef.current = false;
|
|
51835
|
+
setConnStatus("open");
|
|
51836
|
+
connectingRef.current = false;
|
|
51837
|
+
});
|
|
51838
|
+
ws.addEventListener("message", (ev) => onMessageRef.current(ev));
|
|
51839
|
+
const scheduleReconnect = () => {
|
|
51840
|
+
if (wsRef.current === ws) wsRef.current = null;
|
|
51841
|
+
setConnStatus("closed");
|
|
51842
|
+
connectingRef.current = false;
|
|
51843
|
+
const base = Math.min(backoffRef.current, 8e3);
|
|
51844
|
+
const jitter = Math.random() * 0.4 + 0.8;
|
|
51845
|
+
const wait = Math.floor(base * jitter);
|
|
51846
|
+
const next = Math.min(base * 2, 12e3);
|
|
51847
|
+
backoffRef.current = next;
|
|
51848
|
+
if (reconnectTimerRef.current) {
|
|
51849
|
+
window.clearTimeout(reconnectTimerRef.current);
|
|
51850
|
+
reconnectTimerRef.current = null;
|
|
51851
|
+
}
|
|
51852
|
+
reconnectTimerRef.current = window.setTimeout(() => {
|
|
51853
|
+
if (!mountedRef.current) return;
|
|
51854
|
+
connect();
|
|
51855
|
+
}, wait);
|
|
51856
|
+
};
|
|
51857
|
+
ws.addEventListener("close", scheduleReconnect);
|
|
51858
|
+
ws.addEventListener("error", () => {
|
|
51859
|
+
setLastError("WebSocket error");
|
|
51860
|
+
scheduleReconnect();
|
|
51861
|
+
});
|
|
51862
|
+
}, [buildWsUrl]);
|
|
51863
|
+
useEffect(() => {
|
|
51864
|
+
if (startedRef.current) return void 0;
|
|
51865
|
+
startedRef.current = true;
|
|
51866
|
+
mountedRef.current = true;
|
|
51867
|
+
connect();
|
|
51868
|
+
return () => {
|
|
51869
|
+
mountedRef.current = false;
|
|
51870
|
+
startedRef.current = false;
|
|
51871
|
+
if (reconnectTimerRef.current) {
|
|
51872
|
+
window.clearTimeout(reconnectTimerRef.current);
|
|
51873
|
+
reconnectTimerRef.current = null;
|
|
51874
|
+
}
|
|
51875
|
+
closeWS();
|
|
51876
|
+
wsRef.current = null;
|
|
51877
|
+
connectingRef.current = false;
|
|
51878
|
+
};
|
|
51879
|
+
}, []);
|
|
51880
|
+
useEffect(() => {
|
|
51881
|
+
const el = sentinelRef.current;
|
|
51882
|
+
if (!el) return void 0;
|
|
51883
|
+
const io = new IntersectionObserver((entries) => {
|
|
51884
|
+
const visible = entries.some((e) => e.isIntersecting);
|
|
51885
|
+
wantMoreRef.current = visible;
|
|
51886
|
+
if (visible && hasMore) sendScroll();
|
|
51887
|
+
});
|
|
51888
|
+
io.observe(el);
|
|
51889
|
+
return () => io.disconnect();
|
|
51890
|
+
}, [hasMore, sendScroll]);
|
|
51891
|
+
const onScroll = useCallback(() => {
|
|
51892
|
+
if (!listRef.current) return;
|
|
51893
|
+
const nearBottom = listRef.current.scrollTop + listRef.current.clientHeight >= listRef.current.scrollHeight - 24;
|
|
51894
|
+
if (nearBottom && hasMore) sendScroll();
|
|
51895
|
+
}, [hasMore, sendScroll]);
|
|
51896
|
+
const total = state.order.length;
|
|
51897
|
+
const getPlural = kindsWithVersion ? pluralByKind(kindsWithVersion) : void 0;
|
|
51898
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled.Root, { $substractHeight: substractHeight || 340, children: [
|
|
51899
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Styled.Header, { children: [
|
|
51900
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled.HeaderLeftSide, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { justify: "start", align: "center", gap: 10, children: [
|
|
51901
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
51902
|
+
Styled.CursorPointerDiv,
|
|
51903
|
+
{
|
|
51904
|
+
onClick: () => {
|
|
51905
|
+
if (isPaused) {
|
|
51906
|
+
setIsPaused(false);
|
|
51907
|
+
} else {
|
|
51908
|
+
setIsPaused(true);
|
|
51909
|
+
}
|
|
51910
|
+
},
|
|
51911
|
+
children: isPaused ? /* @__PURE__ */ jsxRuntimeExports.jsx(ResumeCircleIcon, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(PauseCircleIcon, {})
|
|
51912
|
+
}
|
|
51913
|
+
),
|
|
51914
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Styled.StatusText, { children: [
|
|
51915
|
+
isPaused && "Streaming paused",
|
|
51916
|
+
!isPaused && connStatus === "connecting" && "Connecting…",
|
|
51917
|
+
!isPaused && connStatus === "open" && "Streaming events...",
|
|
51918
|
+
!isPaused && connStatus === "closed" && "Reconnecting…"
|
|
51919
|
+
] })
|
|
51920
|
+
] }) }),
|
|
51921
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Styled.HeaderRightSide, { $colorTextDescription: token.colorTextDescription, children: [
|
|
51922
|
+
!hasMore && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "No more events · " }),
|
|
51923
|
+
typeof total === "number" ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
51924
|
+
"Loaded ",
|
|
51925
|
+
total,
|
|
51926
|
+
" events"
|
|
51927
|
+
] }) : "",
|
|
51928
|
+
lastError && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { "aria-live": "polite", children: [
|
|
51929
|
+
" · ",
|
|
51930
|
+
lastError
|
|
51931
|
+
] }),
|
|
51932
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
51933
|
+
Tooltip,
|
|
51934
|
+
{
|
|
51935
|
+
title: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
51936
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: isRemoveIgnored ? "Handle REMOVE signals" : "Ignore REMOVE signals" }),
|
|
51937
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Flex, { justify: "end", children: "Locked means ignore" })
|
|
51938
|
+
] }),
|
|
51939
|
+
placement: "left",
|
|
51940
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled.CursorPointerDiv, { onClick: () => setIsRemoveIgnored(!isRemoveIgnored), children: isRemoveIgnored ? /* @__PURE__ */ jsxRuntimeExports.jsx(LockedIcon, { size: 16 }) : /* @__PURE__ */ jsxRuntimeExports.jsx(UnlockedIcon, { size: 16 }) })
|
|
51941
|
+
}
|
|
51942
|
+
)
|
|
51943
|
+
] })
|
|
51944
|
+
] }),
|
|
51945
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Styled.List, { ref: listRef, onScroll, children: [
|
|
51946
|
+
state.order.length > 0 ? state.order.map((k) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
51947
|
+
EventRow,
|
|
51948
|
+
{
|
|
51949
|
+
e: state.byKey[k],
|
|
51950
|
+
theme: theme$1,
|
|
51951
|
+
baseprefix,
|
|
51952
|
+
cluster,
|
|
51953
|
+
getPlural,
|
|
51954
|
+
baseFactoryNamespacedAPIKey,
|
|
51955
|
+
baseFactoryClusterSceopedAPIKey,
|
|
51956
|
+
baseFactoryNamespacedBuiltinKey,
|
|
51957
|
+
baseFactoryClusterSceopedBuiltinKey,
|
|
51958
|
+
baseNamespaceFactoryKey
|
|
51959
|
+
},
|
|
51960
|
+
k
|
|
51961
|
+
)) : /* @__PURE__ */ jsxRuntimeExports.jsx(Empty, { description: "No events" }),
|
|
51962
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled.Sentinel, { ref: sentinelRef })
|
|
51963
|
+
] }),
|
|
51964
|
+
state.order.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(Styled.Timeline, { $colorText: token.colorText, $substractHeight: substractHeight || 340 })
|
|
51965
|
+
] });
|
|
51966
|
+
};
|
|
51967
|
+
|
|
51141
51968
|
const isLeafNode = (value) => {
|
|
51142
51969
|
return typeof value === "object" && "value" in value && "highlight" in value;
|
|
51143
51970
|
};
|
|
@@ -51250,7 +52077,7 @@ const getGroupsByCategory = async ({
|
|
|
51250
52077
|
return { crdGroups, nonCrdGroups, builtinGroups: filteredBuiltinData, apiExtensionVersion };
|
|
51251
52078
|
};
|
|
51252
52079
|
|
|
51253
|
-
const parseK8sVersion
|
|
52080
|
+
const parseK8sVersion = (raw) => {
|
|
51254
52081
|
const m = /^v(?<major>\d+)(?:(?<stage>alpha|beta)(?<stageNum>\d+)?)?$/i.exec(raw ?? "");
|
|
51255
52082
|
if (!m?.groups) return { rank: 0, major: -1, stageNum: -1 };
|
|
51256
52083
|
const stage = (m.groups.stage ?? "").toLowerCase();
|
|
@@ -51259,10 +52086,10 @@ const parseK8sVersion$1 = (raw) => {
|
|
|
51259
52086
|
const rank = stage === "" ? 3 : stage === "beta" ? 2 : 1;
|
|
51260
52087
|
return { rank, major, stageNum };
|
|
51261
52088
|
};
|
|
51262
|
-
const versionToken
|
|
51263
|
-
const compareK8sVersionDesc
|
|
51264
|
-
const pa = parseK8sVersion
|
|
51265
|
-
const pb = parseK8sVersion
|
|
52089
|
+
const versionToken = (e) => e.version || (e.groupVersion?.split("/").pop() ?? "");
|
|
52090
|
+
const compareK8sVersionDesc = (a, b) => {
|
|
52091
|
+
const pa = parseK8sVersion(versionToken(a));
|
|
52092
|
+
const pb = parseK8sVersion(versionToken(b));
|
|
51266
52093
|
return pb.rank - pa.rank || pb.major - pa.major || pb.stageNum - pa.stageNum;
|
|
51267
52094
|
};
|
|
51268
52095
|
const getSortedKinds = (index) => {
|
|
@@ -51270,7 +52097,7 @@ const getSortedKinds = (index) => {
|
|
|
51270
52097
|
(acc, item) => ({ ...acc, [item.kind]: (acc[item.kind] ?? 0) + 1 }),
|
|
51271
52098
|
{}
|
|
51272
52099
|
);
|
|
51273
|
-
const pickVersion = (versions) => versions.find((v) => v.preferred) ?? [...versions].sort(compareK8sVersionDesc
|
|
52100
|
+
const pickVersion = (versions) => versions.find((v) => v.preferred) ?? [...versions].sort(compareK8sVersionDesc)[0];
|
|
51274
52101
|
return index.items.map((item) => {
|
|
51275
52102
|
const version = pickVersion(item.versions);
|
|
51276
52103
|
return version ? {
|
|
@@ -51284,72 +52111,6 @@ const getSortedKinds = (index) => {
|
|
|
51284
52111
|
);
|
|
51285
52112
|
};
|
|
51286
52113
|
|
|
51287
|
-
const parseK8sVersion = (raw) => {
|
|
51288
|
-
const m = /^v(?<major>\d+)(?:(?<stage>alpha|beta)(?<stageNum>\d+)?)?$/i.exec(raw ?? "");
|
|
51289
|
-
if (!m?.groups) return { rank: 0, major: -1, stageNum: -1 };
|
|
51290
|
-
const stage = (m.groups.stage ?? "").toLowerCase();
|
|
51291
|
-
const major = Number(m.groups.major);
|
|
51292
|
-
const stageNum = m.groups.stageNum ? Number(m.groups.stageNum) : 0;
|
|
51293
|
-
const rank = stage === "" ? 3 : stage === "beta" ? 2 : 1;
|
|
51294
|
-
return { rank, major, stageNum };
|
|
51295
|
-
};
|
|
51296
|
-
const versionToken = (e) => e.version || (e.groupVersion?.split("/").pop() ?? "");
|
|
51297
|
-
const compareK8sVersionDesc = (a, b) => {
|
|
51298
|
-
const pa = parseK8sVersion(versionToken(a));
|
|
51299
|
-
const pb = parseK8sVersion(versionToken(b));
|
|
51300
|
-
return pb.rank - pa.rank || pb.major - pa.major || pb.stageNum - pa.stageNum;
|
|
51301
|
-
};
|
|
51302
|
-
const orderVersions = (versions) => {
|
|
51303
|
-
const preferredIdx = versions.findIndex((v) => v.preferred === true);
|
|
51304
|
-
if (preferredIdx >= 0) {
|
|
51305
|
-
const preferred = versions[preferredIdx];
|
|
51306
|
-
const rest = versions.filter((_, i) => i !== preferredIdx).slice().sort(compareK8sVersionDesc);
|
|
51307
|
-
return [preferred, ...rest];
|
|
51308
|
-
}
|
|
51309
|
-
return versions.slice().sort(compareK8sVersionDesc);
|
|
51310
|
-
};
|
|
51311
|
-
const getSortedKindsAll = (index) => {
|
|
51312
|
-
const counts = index.items.reduce(
|
|
51313
|
-
(acc, item) => ({ ...acc, [item.kind]: (acc[item.kind] ?? 0) + 1 }),
|
|
51314
|
-
{}
|
|
51315
|
-
);
|
|
51316
|
-
const rows = index.items.flatMap((item) => {
|
|
51317
|
-
const ordered = orderVersions(item.versions);
|
|
51318
|
-
return ordered.map((v) => ({
|
|
51319
|
-
group: item.group,
|
|
51320
|
-
kind: item.kind,
|
|
51321
|
-
// clone to drop Readonly<> without changing fields (incl. preferred)
|
|
51322
|
-
version: { ...v },
|
|
51323
|
-
...counts[item.kind] > 1 ? { notUnique: true } : {}
|
|
51324
|
-
}));
|
|
51325
|
-
});
|
|
51326
|
-
return rows.sort(
|
|
51327
|
-
(a, b) => a.kind.localeCompare(b.kind, void 0, { sensitivity: "base" }) || a.group.localeCompare(b.group, void 0, { sensitivity: "base" })
|
|
51328
|
-
);
|
|
51329
|
-
};
|
|
51330
|
-
|
|
51331
|
-
const parseApiVersion = (apiVersion) => {
|
|
51332
|
-
const parts = apiVersion.trim().split("/");
|
|
51333
|
-
return parts.length === 1 ? { group: "", version: parts[0] } : { group: parts[0], version: parts[1] };
|
|
51334
|
-
};
|
|
51335
|
-
const pluralByKind = (entries) => (kind, apiVersion) => {
|
|
51336
|
-
const norm = (s) => s.trim();
|
|
51337
|
-
const kindNorm = norm(kind);
|
|
51338
|
-
const gv = apiVersion ? parseApiVersion(apiVersion) : void 0;
|
|
51339
|
-
const candidates = entries.filter((e) => norm(e.kind) === kindNorm);
|
|
51340
|
-
if (candidates.length === 0) return void 0;
|
|
51341
|
-
const filtered = gv ? candidates.filter((e) => norm(e.group) === norm(gv.group) && e.version.version === gv.version) : candidates;
|
|
51342
|
-
if (filtered.length === 0) return void 0;
|
|
51343
|
-
const preferredFirst = gv ? filtered : [...filtered.filter((e) => e.version.preferred), ...filtered.filter((e) => !e.version.preferred)];
|
|
51344
|
-
const resources = preferredFirst.map((e) => e.version.resource).filter(Boolean);
|
|
51345
|
-
const uniq = Array.from(new Set(resources));
|
|
51346
|
-
if (!gv && uniq.length > 1) {
|
|
51347
|
-
const first = preferredFirst[0]?.version.resource;
|
|
51348
|
-
return first ?? void 0;
|
|
51349
|
-
}
|
|
51350
|
-
return uniq.length === 1 ? uniq[0] : void 0;
|
|
51351
|
-
};
|
|
51352
|
-
|
|
51353
52114
|
const namespacedByGvr = (entries) => (gvr) => {
|
|
51354
52115
|
const [group = "", v = "", resource = ""] = gvr.split("~", 3);
|
|
51355
52116
|
const norm = (s) => s.trim();
|
|
@@ -51526,11 +52287,6 @@ const checkIfBuiltInInstanceNamespaceScoped = async ({
|
|
|
51526
52287
|
return data;
|
|
51527
52288
|
};
|
|
51528
52289
|
|
|
51529
|
-
const getKinds = async ({ clusterName }) => {
|
|
51530
|
-
const result = await axios.get(`/api/clusters/${clusterName}/openapi-bff/search/kinds/getKinds`);
|
|
51531
|
-
return result.data;
|
|
51532
|
-
};
|
|
51533
|
-
|
|
51534
52290
|
const useClusterList = ({ refetchInterval }) => {
|
|
51535
52291
|
return useQuery({
|
|
51536
52292
|
queryKey: ["useClusterList"],
|
|
@@ -51784,5 +52540,5 @@ const useCrdData = ({
|
|
|
51784
52540
|
});
|
|
51785
52541
|
};
|
|
51786
52542
|
|
|
51787
|
-
export { BackToDefaultIcon, BlackholeForm, BlackholeFormDataProvider, ContentCard$1 as ContentCard, CursorDefaultDiv, CursorPointerTag, CursorPointerTagMinContent, CustomSelect$4 as CustomSelect, DeleteIcon, DeleteModal, DeleteModalMany, DownIcon, DynamicComponents, DynamicRenderer, DynamicRendererWithProviders, EarthIcon, EditIcon, EnrichedTable, EnrichedTableProvider, FlexGrow, LockedIcon, LookingGlassIcon, ManageableBreadcrumbs, ManageableBreadcrumbsWithDataProvider, ManageableSidebar, ManageableSidebarWithDataProvider, MarketPlace, MarketplaceCard, MinusIcon, NodeTerminal, PaddingContainer, PauseCircleIcon, PlusIcon, PodLogs, PodLogsMonaco, PodTerminal, ProjectInfoCard, ResumeCircleIcon, Search, Spacer$1 as Spacer, SuccessIcon, TreeWithSearch, UncontrolledSelect, UnlockedIcon, UpIcon, YamlEditorSingleton, checkIfApiInstanceNamespaceScoped, checkIfBuiltInInstanceNamespaceScoped, checkPermission, createContextFactory, createNewEntry, deepMerge, deleteEntry, feedbackIcons, filterIfApiInstanceNamespaceScoped, filterIfBuiltInInstanceNamespaceScoped, filterSelectOptions, floorToDecimal, getAllPathsFromObj, getApiResourceSingle, getApiResourceTypes, getApiResourceTypesByApiGroup, getApiResources, getBackLinkToTable, getBuiltinResourceSingle, getBuiltinResourceTypes, getBuiltinResources, getBuiltinTreeData, getClusterList, getCrdData, getCrdResourceSingle, getCrdResources, getDirectUnknownResource, getEnrichedColumns, getEnrichedColumnsWithControls, getGroupsByCategory, getKinds, getLinkToApiForm, getLinkToBuiltinForm, getLinkToForm, getObjectFormItemsDraft, getPrefixSubarrays, getSortedKinds, getSortedKindsAll, getStringByName, getSwagger, getUppercase, groupsToTreeData, hslFromString, isFlatObject, kindByGvr, namespacedByGvr, normalizeValuesForQuotasToNumber, parseQuotaValue, parseQuotaValueCpu, parseQuotaValueMemoryAndStorage, pluralByKind, prepareDataForManageableBreadcrumbs, prepareDataForManageableSidebar, prepareTemplate, prepareUrlsToFetchForDynamicRenderer, updateEntry, useApiResourceSingle, useApiResourceTypesByGroup, useApiResources, useApisResourceTypes, useBuiltinResourceSingle, useBuiltinResourceTypes, useBuiltinResources, useClusterList, useCrdData, useCrdResourceSingle, useCrdResources, useDirectUnknownResource, usePermissions };
|
|
52543
|
+
export { BackToDefaultIcon, BlackholeForm, BlackholeFormDataProvider, 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, ManageableBreadcrumbsWithDataProvider, ManageableSidebar, ManageableSidebarWithDataProvider, MarketPlace, MarketplaceCard, MinusIcon, NodeTerminal, PaddingContainer, PauseCircleIcon, PlusIcon, PodLogs, PodLogsMonaco, PodTerminal, ProjectInfoCard, ResumeCircleIcon, Search, Spacer$1 as Spacer, SuccessIcon, TreeWithSearch, UncontrolledSelect, UnlockedIcon, UpIcon, YamlEditorSingleton, checkIfApiInstanceNamespaceScoped, checkIfBuiltInInstanceNamespaceScoped, checkPermission, createContextFactory, createNewEntry, deepMerge, deleteEntry, feedbackIcons, filterIfApiInstanceNamespaceScoped, filterIfBuiltInInstanceNamespaceScoped, filterSelectOptions, floorToDecimal, getAllPathsFromObj, getApiResourceSingle, getApiResourceTypes, getApiResourceTypesByApiGroup, getApiResources, getBackLinkToTable, getBuiltinResourceSingle, getBuiltinResourceTypes, getBuiltinResources, getBuiltinTreeData, getClusterList, getCrdData, getCrdResourceSingle, getCrdResources, getDirectUnknownResource, getEnrichedColumns, getEnrichedColumnsWithControls, getGroupsByCategory, getKinds, getLinkToApiForm, getLinkToBuiltinForm, getLinkToForm, getObjectFormItemsDraft, getPrefixSubarrays, getSortedKinds, getSortedKindsAll, getStringByName, getSwagger, getUppercase, groupsToTreeData, hslFromString, isFlatObject, kindByGvr, namespacedByGvr, normalizeValuesForQuotasToNumber, parseQuotaValue, parseQuotaValueCpu, parseQuotaValueMemoryAndStorage, pluralByKind, prepareDataForManageableBreadcrumbs, prepareDataForManageableSidebar, prepareTemplate, prepareUrlsToFetchForDynamicRenderer, updateEntry, useApiResourceSingle, useApiResourceTypesByGroup, useApiResources, useApisResourceTypes, useBuiltinResourceSingle, useBuiltinResourceTypes, useBuiltinResources, useClusterList, useCrdData, useCrdResourceSingle, useCrdResources, useDirectUnknownResource, usePermissions };
|
|
51788
52544
|
//# sourceMappingURL=openapi-k8s-toolkit.es.js.map
|