@prorobotech/openapi-k8s-toolkit 1.2.1-alpha.1 → 1.2.1-alpha.10
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 +1540 -892
- package/dist/openapi-k8s-toolkit.es.js.map +1 -1
- package/dist/openapi-k8s-toolkit.umd.js +1537 -887
- package/dist/openapi-k8s-toolkit.umd.js.map +1 -1
- package/dist/types/api/bff/plugins/getPlugins.d.ts +4 -0
- package/dist/types/components/molecules/Terminals/PodLogsMonaco/PodLogsMonaco.d.ts +4 -0
- package/dist/types/components/molecules/Terminals/PodLogsMonaco/constants.d.ts +8 -0
- package/dist/types/components/molecules/Terminals/PodLogsMonaco/molecules/MonacoEditor/MonacoEditor.d.ts +4 -0
- package/dist/types/components/molecules/Terminals/PodLogsMonaco/molecules/MonacoEditor/styled.d.ts +275 -2
- package/dist/types/components/molecules/Terminals/PodLogsMonaco/styled.d.ts +2778 -2
- package/dist/types/components/organisms/DynamicComponents/atoms/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/{molecules/Annotations/molecules/EditModal/EditModal.d.ts → atoms/modals/AnnotationsEditModal/AnnotationsEditModal.d.ts} +3 -3
- package/dist/types/components/organisms/DynamicComponents/atoms/modals/AnnotationsEditModal/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/atoms/modals/AnnotationsEditModal/types.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/{molecules/Labels/molecules/EditModal/EditModal.d.ts → atoms/modals/LabelsEditModal/LabelsEditModal.d.ts} +2 -2
- package/dist/types/components/organisms/DynamicComponents/atoms/modals/LabelsEditModal/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/atoms/modals/LabelsEditModal/utils.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/atoms/modals/LabelsEditModal/utils.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/{molecules/Taints/molecules/EditModal/EditModal.d.ts → atoms/modals/TaintsEditModal/TaintsEditModal.d.ts} +3 -3
- package/dist/types/components/organisms/DynamicComponents/atoms/modals/TaintsEditModal/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/atoms/modals/TaintsEditModal/types.d.ts +6 -0
- package/dist/types/components/organisms/DynamicComponents/{molecules/Tolerations/molecules/EditModal/EditModal.d.ts → atoms/modals/TolerationsEditModal/TolerationsEditModal.d.ts} +3 -3
- package/dist/types/components/organisms/DynamicComponents/atoms/modals/TolerationsEditModal/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/atoms/modals/TolerationsEditModal/types.d.ts +8 -0
- package/dist/types/components/organisms/DynamicComponents/atoms/modals/index.d.ts +4 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/CopyButton/CopyButton.d.ts +6 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/CopyButton/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/DefaultIframe/DefaultIframe.d.ts +6 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/DefaultIframe/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/DropdownRedirect/DropdownRedirect.d.ts +6 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/DropdownRedirect/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/DropdownRedirect/styled.d.ts +158 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PodLogs/utils.d.ts +1 -4
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/types/chartsProps.d.ts +19 -2
- package/dist/types/components/organisms/DynamicComponents/molecules/index.d.ts +3 -0
- package/dist/types/components/organisms/DynamicComponents/types/Annotations.d.ts +20 -0
- package/dist/types/components/organisms/DynamicComponents/types/ArrayOfObjectsToKeyValues.d.ts +13 -0
- package/dist/types/components/organisms/DynamicComponents/types/ContentCard.d.ts +4 -0
- package/dist/types/components/organisms/DynamicComponents/types/ConverterBytes.d.ts +20 -0
- package/dist/types/components/organisms/DynamicComponents/types/ConverterCores.d.ts +21 -0
- package/dist/types/components/organisms/DynamicComponents/types/CopyButton.d.ts +10 -0
- package/dist/types/components/organisms/DynamicComponents/types/DefaultDiv.d.ts +4 -0
- package/dist/types/components/organisms/DynamicComponents/types/DefaultIframe.d.ts +4 -0
- package/dist/types/components/organisms/DynamicComponents/types/DropdownRedirect.d.ts +16 -0
- package/dist/types/components/organisms/DynamicComponents/types/EnrichedTable.d.ts +21 -0
- package/dist/types/components/organisms/DynamicComponents/types/Events.d.ts +22 -0
- package/dist/types/components/organisms/DynamicComponents/types/ItemCounter.d.ts +9 -0
- package/dist/types/components/organisms/DynamicComponents/types/KeyCounter.d.ts +9 -0
- package/dist/types/components/organisms/DynamicComponents/types/Labels.d.ts +30 -0
- package/dist/types/components/organisms/DynamicComponents/types/LabelsToSearchParams.d.ts +10 -0
- package/dist/types/components/organisms/DynamicComponents/types/MarketplaceCard.d.ts +13 -0
- package/dist/types/components/organisms/DynamicComponents/types/OwnerRefs.d.ts +28 -0
- package/dist/types/components/organisms/DynamicComponents/types/ProjectInfoCard.d.ts +14 -0
- package/dist/types/components/organisms/DynamicComponents/types/PrometheusGraph.d.ts +31 -0
- package/dist/types/components/organisms/DynamicComponents/types/ResourceBadge.d.ts +7 -0
- package/dist/types/components/organisms/DynamicComponents/types/SecretBase64Plain.d.ts +13 -0
- package/dist/types/components/organisms/DynamicComponents/types/SidebarProvider.d.ts +4 -0
- package/dist/types/components/organisms/DynamicComponents/types/Spacer.d.ts +4 -0
- package/dist/types/components/organisms/DynamicComponents/types/StatusText.d.ts +13 -0
- package/dist/types/components/organisms/DynamicComponents/types/Taints.d.ts +21 -0
- package/dist/types/components/organisms/DynamicComponents/types/Terminals.d.ts +25 -0
- package/dist/types/components/organisms/DynamicComponents/types/Toggler.d.ts +23 -0
- package/dist/types/components/organisms/DynamicComponents/types/TogglerSegmented.d.ts +18 -0
- package/dist/types/components/organisms/DynamicComponents/types/Tolerations.d.ts +20 -0
- package/dist/types/components/organisms/DynamicComponents/types/VMVNC.d.ts +8 -0
- package/dist/types/components/organisms/DynamicComponents/types/VisibilityContainer.d.ts +6 -0
- package/dist/types/components/organisms/DynamicComponents/types/YamlEditorSingleton.d.ts +14 -0
- package/dist/types/components/organisms/DynamicComponents/types/antdComponents.d.ts +31 -0
- package/dist/types/components/organisms/DynamicComponents/types/index.d.ts +83 -0
- package/dist/types/components/organisms/DynamicComponents/types/multiQuery.d.ts +4 -0
- package/dist/types/components/organisms/DynamicComponents/types/parsedText.d.ts +7 -0
- package/dist/types/components/organisms/DynamicComponents/types/partsOfUrl.d.ts +4 -0
- package/dist/types/components/organisms/DynamicComponents/types.d.ts +42 -0
- package/dist/types/hooks/usePlugins.d.ts +5 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/localTypes/bff/plugins.d.ts +6 -0
- package/dist/types/utils/converterDates/converterDates.d.ts +5 -0
- package/dist/types/utils/converterDates/index.d.ts +1 -1
- package/dist/types/utils/index.d.ts +1 -1
- package/package.json +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/Annotations/molecules/EditModal/index.d.ts +0 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/Annotations/molecules/index.d.ts +0 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/Labels/molecules/EditModal/index.d.ts +0 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/Labels/molecules/index.d.ts +0 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/Taints/molecules/EditModal/index.d.ts +0 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/Taints/molecules/index.d.ts +0 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/Tolerations/molecules/EditModal/index.d.ts +0 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/Tolerations/molecules/index.d.ts +0 -1
- /package/dist/types/components/organisms/DynamicComponents/{molecules/Annotations/molecules/EditModal → atoms/modals/AnnotationsEditModal}/styled.d.ts +0 -0
- /package/dist/types/components/organisms/DynamicComponents/{molecules/Taints/molecules/EditModal → atoms/modals/TaintsEditModal}/styled.d.ts +0 -0
- /package/dist/types/components/organisms/DynamicComponents/{molecules/Tolerations/molecules/EditModal → atoms/modals/TolerationsEditModal}/styled.d.ts +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import styled, { createGlobalStyle } from 'styled-components';
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
3
|
import React__default, { useState, useRef, useLayoutEffect, useReducer, useEffect, useCallback, useMemo, Fragment, createContext, useContext, memo, createElement, isValidElement, cloneElement, useInsertionEffect, useSyncExternalStore, forwardRef, useImperativeHandle, PureComponent, Children, Component, Suspense } from 'react';
|
|
4
|
-
import { Input, Tree, Modal, Alert, theme, Select, Tag, Flex, Typography, Breadcrumb, Spin, Menu, Tooltip as Tooltip$1, Space, Button, Card as Card$1, Row, Col, Tabs, notification, Form, Popover, Switch, Segmented, Table, Progress, Statistic, Dropdown, Slider, InputNumber, Result, Radio, Checkbox, Empty } from 'antd';
|
|
5
|
-
import { LoadingOutlined, ExclamationCircleFilled, CloseCircleFilled, CheckCircleFilled, PlusOutlined, ClearOutlined, MinusOutlined, CaretDownOutlined, CaretRightOutlined, InfoCircleOutlined, EyeOutlined, EyeInvisibleOutlined, SearchOutlined, MoreOutlined, CheckOutlined, CloseOutlined, BugOutlined, EllipsisOutlined, PoweroffOutlined, FullscreenExitOutlined, FullscreenOutlined, SettingOutlined, ReloadOutlined } from '@ant-design/icons';
|
|
4
|
+
import { Input, Tree, Modal, Alert, theme, Select, Tag, Flex, Typography, Breadcrumb, Spin, Menu, Tooltip as Tooltip$1, Space, Button, Card as Card$1, Row, Col, Tabs, notification, Form, Popover, Switch, Segmented, Table, Progress, Statistic, message, Dropdown, Slider, InputNumber, Result, DatePicker, Radio, Checkbox, Empty } from 'antd';
|
|
5
|
+
import { LoadingOutlined, ExclamationCircleFilled, CloseCircleFilled, CheckCircleFilled, PlusOutlined, ClearOutlined, MinusOutlined, CaretDownOutlined, CaretRightOutlined, InfoCircleOutlined, EyeOutlined, EyeInvisibleOutlined, CopyOutlined, SearchOutlined, MoreOutlined, CheckOutlined, CloseOutlined, BugOutlined, EllipsisOutlined, PoweroffOutlined, FullscreenExitOutlined, FullscreenOutlined, SettingOutlined, ReloadOutlined } from '@ant-design/icons';
|
|
6
6
|
import { useNavigate, useSearchParams, Link, useLocation, useParams } from 'react-router-dom';
|
|
7
7
|
import { useQuery, useQueries, useQueryClient } from '@tanstack/react-query';
|
|
8
8
|
import RFB from 'novnc-next';
|
|
@@ -1577,7 +1577,7 @@ const CustomTreeProvider = styled.div`
|
|
|
1577
1577
|
justify-content: center;
|
|
1578
1578
|
}
|
|
1579
1579
|
`;
|
|
1580
|
-
const Styled$
|
|
1580
|
+
const Styled$F = {
|
|
1581
1581
|
CustomTreeProvider
|
|
1582
1582
|
};
|
|
1583
1583
|
|
|
@@ -1642,7 +1642,7 @@ const TreeWithSearch = ({ treeData, onSelect }) => {
|
|
|
1642
1642
|
});
|
|
1643
1643
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
1644
1644
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Search$1, { style: { marginBottom: 8 }, placeholder: "Search", onChange }),
|
|
1645
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
1645
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$F.CustomTreeProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1646
1646
|
Tree,
|
|
1647
1647
|
{
|
|
1648
1648
|
treeData: loop(treeData),
|
|
@@ -8200,14 +8200,14 @@ const ContentContainer = styled.div`
|
|
|
8200
8200
|
display: ${({ $displayFlex }) => $displayFlex ? "flex" : "block"};
|
|
8201
8201
|
flex-flow: ${({ $flexFlow }) => $flexFlow};
|
|
8202
8202
|
`;
|
|
8203
|
-
const Styled$
|
|
8203
|
+
const Styled$E = {
|
|
8204
8204
|
ContentContainer
|
|
8205
8205
|
};
|
|
8206
8206
|
|
|
8207
8207
|
const ContentCard$1 = ({ children, flexGrow, displayFlex, flexFlow, maxHeight }) => {
|
|
8208
8208
|
const { token } = theme.useToken();
|
|
8209
8209
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8210
|
-
Styled$
|
|
8210
|
+
Styled$E.ContentContainer,
|
|
8211
8211
|
{
|
|
8212
8212
|
$flexGrow: flexGrow,
|
|
8213
8213
|
$bgColor: token.colorBgContainer,
|
|
@@ -8268,13 +8268,13 @@ const UncontrolledSelect$1 = styled(Select)`
|
|
|
8268
8268
|
padding-inline: 8px;
|
|
8269
8269
|
}
|
|
8270
8270
|
`;
|
|
8271
|
-
const Styled$
|
|
8271
|
+
const Styled$D = {
|
|
8272
8272
|
UncontrolledSelect: UncontrolledSelect$1
|
|
8273
8273
|
};
|
|
8274
8274
|
|
|
8275
8275
|
const UncontrolledSelect = (props) => {
|
|
8276
8276
|
const { isCursorPointer } = props;
|
|
8277
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
8277
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$D.UncontrolledSelect, { ...props, $isCursorPointer: isCursorPointer });
|
|
8278
8278
|
};
|
|
8279
8279
|
|
|
8280
8280
|
const CustomSelect$5 = styled(Select)`
|
|
@@ -8322,13 +8322,13 @@ const CustomSelect$5 = styled(Select)`
|
|
|
8322
8322
|
margin-block: 0 !important;
|
|
8323
8323
|
}
|
|
8324
8324
|
`;
|
|
8325
|
-
const Styled$
|
|
8325
|
+
const Styled$C = {
|
|
8326
8326
|
CustomSelect: CustomSelect$5
|
|
8327
8327
|
};
|
|
8328
8328
|
|
|
8329
8329
|
const CustomSelect$4 = (props) => {
|
|
8330
8330
|
const { paddingContainerEnd, ...rest } = props;
|
|
8331
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
8331
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$C.CustomSelect, { $paddingContainerEnd: paddingContainerEnd, ...rest });
|
|
8332
8332
|
};
|
|
8333
8333
|
|
|
8334
8334
|
const CursorPointerTag = styled(Tag)`
|
|
@@ -8475,7 +8475,7 @@ const Abbr$2 = styled.span`
|
|
|
8475
8475
|
height: min-content;
|
|
8476
8476
|
margin-right: 4px;
|
|
8477
8477
|
`;
|
|
8478
|
-
const Styled$
|
|
8478
|
+
const Styled$B = {
|
|
8479
8479
|
Abbr: Abbr$2
|
|
8480
8480
|
};
|
|
8481
8481
|
|
|
@@ -8515,7 +8515,7 @@ const ResourceLink = ({
|
|
|
8515
8515
|
baseFactoriesMapping
|
|
8516
8516
|
});
|
|
8517
8517
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { align: "center", gap: 8, children: [
|
|
8518
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
8518
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$B.Abbr, { $bgColor: bgColor, children: abbr }),
|
|
8519
8519
|
resourceLink ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8520
8520
|
Typography.Link,
|
|
8521
8521
|
{
|
|
@@ -8554,7 +8554,7 @@ const NoWrapContainer = styled.div`
|
|
|
8554
8554
|
flex-wrap: nowrap !important;
|
|
8555
8555
|
}
|
|
8556
8556
|
`;
|
|
8557
|
-
const Styled$
|
|
8557
|
+
const Styled$A = {
|
|
8558
8558
|
PositionRelativeContainer,
|
|
8559
8559
|
FullWidthContainer,
|
|
8560
8560
|
NoWrapContainer
|
|
@@ -8597,9 +8597,9 @@ const CollapsibleBreadcrumb = ({ items }) => {
|
|
|
8597
8597
|
};
|
|
8598
8598
|
return [firstItem, ellipsisItem, lastItem];
|
|
8599
8599
|
};
|
|
8600
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$
|
|
8601
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
8602
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
8600
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$A.PositionRelativeContainer, { children: [
|
|
8601
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$A.FullWidthContainer, { ref: containerRef, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Breadcrumb, { separator: ">", items: renderItems() }) }),
|
|
8602
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$A.NoWrapContainer, { ref: breadcrumbRef, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Breadcrumb, { separator: ">", items, style: { display: "flex", flexWrap: "nowrap" } }) })
|
|
8603
8603
|
] });
|
|
8604
8604
|
};
|
|
8605
8605
|
|
|
@@ -8607,12 +8607,12 @@ const HeightDiv$1 = styled.div`
|
|
|
8607
8607
|
min-height: 22px;
|
|
8608
8608
|
width: 100%;
|
|
8609
8609
|
`;
|
|
8610
|
-
const Styled$
|
|
8610
|
+
const Styled$z = {
|
|
8611
8611
|
HeightDiv: HeightDiv$1
|
|
8612
8612
|
};
|
|
8613
8613
|
|
|
8614
8614
|
const ManageableBreadcrumbs = ({ data }) => {
|
|
8615
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
8615
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$z.HeightDiv, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(CollapsibleBreadcrumb, { items: data.breadcrumbItems }) });
|
|
8616
8616
|
};
|
|
8617
8617
|
|
|
8618
8618
|
const kindByGvr = (entries) => (gvr) => {
|
|
@@ -9598,7 +9598,7 @@ const HeightDiv = styled.div`
|
|
|
9598
9598
|
min-height: 22px;
|
|
9599
9599
|
width: 100%;
|
|
9600
9600
|
`;
|
|
9601
|
-
const Styled$
|
|
9601
|
+
const Styled$y = {
|
|
9602
9602
|
HeightDiv
|
|
9603
9603
|
};
|
|
9604
9604
|
|
|
@@ -9627,7 +9627,7 @@ const ManageableBreadcrumbsProvider = ({
|
|
|
9627
9627
|
return null;
|
|
9628
9628
|
}
|
|
9629
9629
|
if (rawDataLoading) {
|
|
9630
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
9630
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$y.HeightDiv, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Spin, {}) });
|
|
9631
9631
|
}
|
|
9632
9632
|
if (!rawData) {
|
|
9633
9633
|
return null;
|
|
@@ -9642,7 +9642,7 @@ const ManageableBreadcrumbsProvider = ({
|
|
|
9642
9642
|
idToCompare
|
|
9643
9643
|
});
|
|
9644
9644
|
if (!result) {
|
|
9645
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
9645
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$y.HeightDiv, {});
|
|
9646
9646
|
}
|
|
9647
9647
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(ManageableBreadcrumbs, { data: result }, JSON.stringify(idToCompare));
|
|
9648
9648
|
};
|
|
@@ -9670,7 +9670,7 @@ const CustomMenu = styled(Menu)`
|
|
|
9670
9670
|
margin: 0 !important;
|
|
9671
9671
|
}
|
|
9672
9672
|
`;
|
|
9673
|
-
const Styled$
|
|
9673
|
+
const Styled$x = {
|
|
9674
9674
|
CustomMenu
|
|
9675
9675
|
};
|
|
9676
9676
|
|
|
@@ -9697,7 +9697,7 @@ const ManageableSidebar = ({ data, noMarginTop }) => {
|
|
|
9697
9697
|
setSelectedKeys(data.selectedKeys);
|
|
9698
9698
|
}, [data.selectedKeys]);
|
|
9699
9699
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9700
|
-
Styled$
|
|
9700
|
+
Styled$x.CustomMenu,
|
|
9701
9701
|
{
|
|
9702
9702
|
selectedKeys,
|
|
9703
9703
|
onSelect: () => {
|
|
@@ -33885,7 +33885,7 @@ const ShortenedText = styled.div`
|
|
|
33885
33885
|
white-space: nowrap;
|
|
33886
33886
|
text-overflow: ellipsis;
|
|
33887
33887
|
`;
|
|
33888
|
-
const Styled$
|
|
33888
|
+
const Styled$w = {
|
|
33889
33889
|
ShortenedText
|
|
33890
33890
|
};
|
|
33891
33891
|
|
|
@@ -33894,7 +33894,7 @@ const ShortenedTextWithTooltip = ({ text, trimLength, maxWidth = 200 }) => {
|
|
|
33894
33894
|
const trimmedText = text.substring(0, trimLength);
|
|
33895
33895
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip$1, { title: text, placement: "top", children: trimmedText });
|
|
33896
33896
|
}
|
|
33897
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip$1, { title: text, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
33897
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip$1, { title: text, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$w.ShortenedText, { $maxWidth: maxWidth, children: text }) });
|
|
33898
33898
|
};
|
|
33899
33899
|
|
|
33900
33900
|
const FilterDropdown = ({
|
|
@@ -35329,7 +35329,7 @@ const EnrichedTable$1 = ({
|
|
|
35329
35329
|
] });
|
|
35330
35330
|
};
|
|
35331
35331
|
|
|
35332
|
-
const getRunningContainerNames
|
|
35332
|
+
const getRunningContainerNames = (pod) => (pod.status?.containerStatuses ?? []).filter((st) => Boolean(st.state?.running)).map((st) => st.name);
|
|
35333
35333
|
|
|
35334
35334
|
const PodTerminal$1 = ({
|
|
35335
35335
|
data,
|
|
@@ -35382,7 +35382,7 @@ const PodTerminal$1 = ({
|
|
|
35382
35382
|
if (!podInfo) {
|
|
35383
35383
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: "No Pod Info" });
|
|
35384
35384
|
}
|
|
35385
|
-
const containers = getRunningContainerNames
|
|
35385
|
+
const containers = getRunningContainerNames(podInfo);
|
|
35386
35386
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
35387
35387
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
35388
35388
|
PodTerminal,
|
|
@@ -35438,8 +35438,8 @@ const NodeTerminal$1 = ({
|
|
|
35438
35438
|
] });
|
|
35439
35439
|
};
|
|
35440
35440
|
|
|
35441
|
-
const
|
|
35442
|
-
const containers = (pod.status?.containerStatuses ?? []).
|
|
35441
|
+
const getContainerNames = (pod) => {
|
|
35442
|
+
const containers = (pod.status?.containerStatuses ?? []).map((st) => st.name);
|
|
35443
35443
|
const initContainers = (pod.status?.initContainerStatuses ?? []).map((st) => st.name);
|
|
35444
35444
|
return { containers, initContainers };
|
|
35445
35445
|
};
|
|
@@ -35458,6 +35458,10 @@ const PodLogs$1 = ({
|
|
|
35458
35458
|
namespace,
|
|
35459
35459
|
podName,
|
|
35460
35460
|
substractHeight,
|
|
35461
|
+
tailLines,
|
|
35462
|
+
sinceSeconds,
|
|
35463
|
+
sinceTime,
|
|
35464
|
+
limitBytes,
|
|
35461
35465
|
...props
|
|
35462
35466
|
} = data;
|
|
35463
35467
|
const partsOfUrl = usePartsOfUrl();
|
|
@@ -35496,7 +35500,7 @@ const PodLogs$1 = ({
|
|
|
35496
35500
|
if (!podInfo) {
|
|
35497
35501
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: "No Pod Info" });
|
|
35498
35502
|
}
|
|
35499
|
-
const { containers, initContainers } =
|
|
35503
|
+
const { containers, initContainers } = getContainerNames(podInfo);
|
|
35500
35504
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
35501
35505
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
35502
35506
|
PodLogsMonaco,
|
|
@@ -35509,6 +35513,10 @@ const PodLogs$1 = ({
|
|
|
35509
35513
|
theme,
|
|
35510
35514
|
substractHeight: substractHeight || 340 + 35 + 8,
|
|
35511
35515
|
rawPodInfo: podInfo,
|
|
35516
|
+
tailLines,
|
|
35517
|
+
sinceSeconds,
|
|
35518
|
+
sinceTime,
|
|
35519
|
+
limitBytes,
|
|
35512
35520
|
...props
|
|
35513
35521
|
}
|
|
35514
35522
|
),
|
|
@@ -43044,7 +43052,7 @@ const BigText$1 = styled.div`
|
|
|
43044
43052
|
font-size: 16px;
|
|
43045
43053
|
line-height: 24px;
|
|
43046
43054
|
`;
|
|
43047
|
-
const Styled$
|
|
43055
|
+
const Styled$v = {
|
|
43048
43056
|
BorderRadiusContainer: BorderRadiusContainer$1,
|
|
43049
43057
|
ControlsRowContainer: ControlsRowContainer$1,
|
|
43050
43058
|
BigText: BigText$1
|
|
@@ -43168,7 +43176,7 @@ const YamlEditorSingleton$1 = ({
|
|
|
43168
43176
|
};
|
|
43169
43177
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
43170
43178
|
contextHolder,
|
|
43171
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
43179
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$v.BorderRadiusContainer, { $designNewLayoutHeight: designNewLayoutHeight, $colorBorder: token.colorBorder, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
43172
43180
|
Ft$1,
|
|
43173
43181
|
{
|
|
43174
43182
|
defaultLanguage: "yaml",
|
|
@@ -43187,7 +43195,7 @@ const YamlEditorSingleton$1 = ({
|
|
|
43187
43195
|
}
|
|
43188
43196
|
}
|
|
43189
43197
|
) }),
|
|
43190
|
-
!readOnly && /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
43198
|
+
!readOnly && /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$v.ControlsRowContainer, { $bgColor: token.colorPrimaryBg, $designNewLayout: designNewLayout, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { gap: designNewLayout ? 10 : 16, align: "center", children: [
|
|
43191
43199
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Button, { type: "primary", onClick: onSubmit, loading: isLoading, children: "Submit" }),
|
|
43192
43200
|
backlink && /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { onClick: () => navigate(backlink), children: "Cancel" }),
|
|
43193
43201
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Button, { onClick: handleReload, children: "Reload" })
|
|
@@ -43198,7 +43206,7 @@ const YamlEditorSingleton$1 = ({
|
|
|
43198
43206
|
open: !!error,
|
|
43199
43207
|
onOk: () => setError(void 0),
|
|
43200
43208
|
onCancel: () => setError(void 0),
|
|
43201
|
-
title: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { type: "danger", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
43209
|
+
title: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { type: "danger", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$v.BigText, { children: "Error!" }) }),
|
|
43202
43210
|
cancelButtonProps: { style: { display: "none" } },
|
|
43203
43211
|
children: [
|
|
43204
43212
|
"An error has occurred: ",
|
|
@@ -43311,14 +43319,14 @@ const YamlEditorSingleton = ({
|
|
|
43311
43319
|
] });
|
|
43312
43320
|
};
|
|
43313
43321
|
|
|
43314
|
-
const VisibilityContainer$
|
|
43322
|
+
const VisibilityContainer$1 = styled.div`
|
|
43315
43323
|
display: ${({ $hidden }) => $hidden ? "none" : "block"};
|
|
43316
43324
|
`;
|
|
43317
|
-
const Styled$
|
|
43318
|
-
VisibilityContainer: VisibilityContainer$
|
|
43325
|
+
const Styled$u = {
|
|
43326
|
+
VisibilityContainer: VisibilityContainer$1
|
|
43319
43327
|
};
|
|
43320
43328
|
|
|
43321
|
-
const VisibilityContainer
|
|
43329
|
+
const VisibilityContainer = ({
|
|
43322
43330
|
data,
|
|
43323
43331
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
43324
43332
|
children
|
|
@@ -43360,7 +43368,7 @@ const VisibilityContainer$1 = ({
|
|
|
43360
43368
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading multiquery" });
|
|
43361
43369
|
}
|
|
43362
43370
|
const shouldAutoHide = !criteria && (!valuePrepared || valuePrepared === "~undefined-value~");
|
|
43363
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
43371
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$u.VisibilityContainer, { $hidden: shouldAutoHide || shouldHideByCriteria, children });
|
|
43364
43372
|
};
|
|
43365
43373
|
|
|
43366
43374
|
const unknownToString = (value) => {
|
|
@@ -43625,7 +43633,7 @@ const Content$1 = styled.div`
|
|
|
43625
43633
|
display: ${({ $isOpen }) => $isOpen ? "block" : "none"};
|
|
43626
43634
|
padding: ${({ $designNewLayout }) => $designNewLayout ? "0 0 0 6px" : "4px"};
|
|
43627
43635
|
`;
|
|
43628
|
-
const Styled$
|
|
43636
|
+
const Styled$t = {
|
|
43629
43637
|
Container: Container$3,
|
|
43630
43638
|
TitleBar,
|
|
43631
43639
|
Content: Content$1
|
|
@@ -43652,14 +43660,14 @@ const CustomCollapse = ({
|
|
|
43652
43660
|
}
|
|
43653
43661
|
};
|
|
43654
43662
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
43655
|
-
Styled$
|
|
43663
|
+
Styled$t.Container,
|
|
43656
43664
|
{
|
|
43657
43665
|
$designNewLayout: designNewLayout,
|
|
43658
43666
|
$borderColor: token.colorBorder,
|
|
43659
43667
|
$bgColor: token.colorBgContainer,
|
|
43660
43668
|
children: [
|
|
43661
43669
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { justify: "space-between", children: [
|
|
43662
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$
|
|
43670
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$t.TitleBar, { onClick: () => toggleCollapse(), children: [
|
|
43663
43671
|
!designNewLayout && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: isOpen ? /* @__PURE__ */ jsxRuntimeExports.jsx(CaretDownOutlined, { size: 14 }) : /* @__PURE__ */ jsxRuntimeExports.jsx(CaretRightOutlined, { size: 14 }) }),
|
|
43664
43672
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: title }),
|
|
43665
43673
|
designNewLayout && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: isOpen ? /* @__PURE__ */ jsxRuntimeExports.jsx(DownIcon, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(UpIcon, {}) })
|
|
@@ -43670,7 +43678,7 @@ const CustomCollapse = ({
|
|
|
43670
43678
|
persistedCheckbox
|
|
43671
43679
|
] })
|
|
43672
43680
|
] }),
|
|
43673
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
43681
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$t.Content, { $isOpen: isOpen, $designNewLayout: designNewLayout, children })
|
|
43674
43682
|
]
|
|
43675
43683
|
}
|
|
43676
43684
|
);
|
|
@@ -43704,13 +43712,13 @@ const CustomSizeTitle = styled.div`
|
|
|
43704
43712
|
const Content = styled.div`
|
|
43705
43713
|
padding: ${({ $designNewLayout }) => $designNewLayout ? "0 0 0 6px" : "4px"};
|
|
43706
43714
|
`;
|
|
43707
|
-
const Styled$
|
|
43715
|
+
const Styled$s = {
|
|
43708
43716
|
Content
|
|
43709
43717
|
};
|
|
43710
43718
|
|
|
43711
43719
|
const ArrayInsideContainer = ({ children }) => {
|
|
43712
43720
|
const designNewLayout = useDesignNewLayout();
|
|
43713
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
43721
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$s.Content, { $designNewLayout: designNewLayout, children });
|
|
43714
43722
|
};
|
|
43715
43723
|
|
|
43716
43724
|
const includesPath = (haystack, needle) => haystack.some((h) => h.length === needle.length && h.every((seg, i) => seg === String(needle[i])));
|
|
@@ -43734,24 +43742,14 @@ const HeightContainer = styled.div`
|
|
|
43734
43742
|
|
|
43735
43743
|
const filterSelectOptions = (input, option) => (typeof option?.label === "string" ? option.label : "").toLowerCase().includes(input.toLowerCase());
|
|
43736
43744
|
|
|
43737
|
-
const
|
|
43738
|
-
const parseArrayOfAny$1 = (value) => {
|
|
43739
|
-
if (!Array.isArray(value)) {
|
|
43740
|
-
return { error: "Value on jsonPath is not an array" };
|
|
43741
|
-
}
|
|
43742
|
-
if (isRecordStringNumber$1(value[0])) {
|
|
43743
|
-
return { data: value[0] };
|
|
43744
|
-
}
|
|
43745
|
-
return { error: "Value on jsonPath is not a record array" };
|
|
43746
|
-
};
|
|
43747
|
-
const truncate$2 = (text, max) => {
|
|
43745
|
+
const truncate$3 = (text, max) => {
|
|
43748
43746
|
if (!max) {
|
|
43749
43747
|
return text;
|
|
43750
43748
|
}
|
|
43751
43749
|
return text.length > max ? text.slice(0, max) + "..." : text;
|
|
43752
43750
|
};
|
|
43753
43751
|
|
|
43754
|
-
const
|
|
43752
|
+
const LabelsEditModal = ({
|
|
43755
43753
|
open,
|
|
43756
43754
|
close,
|
|
43757
43755
|
values,
|
|
@@ -43865,7 +43863,7 @@ const EditModal$3 = ({
|
|
|
43865
43863
|
onClick: (e) => {
|
|
43866
43864
|
e.stopPropagation();
|
|
43867
43865
|
},
|
|
43868
|
-
children: typeof label === "string" ? truncate$
|
|
43866
|
+
children: typeof label === "string" ? truncate$3(label, maxEditTagTextLength) : "Not a string value"
|
|
43869
43867
|
}
|
|
43870
43868
|
) });
|
|
43871
43869
|
},
|
|
@@ -43880,394 +43878,14 @@ const EditModal$3 = ({
|
|
|
43880
43878
|
);
|
|
43881
43879
|
};
|
|
43882
43880
|
|
|
43883
|
-
const Labels = ({ data, children }) => {
|
|
43884
|
-
const {
|
|
43885
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
43886
|
-
id,
|
|
43887
|
-
reqIndex,
|
|
43888
|
-
jsonPathToLabels,
|
|
43889
|
-
linkPrefix,
|
|
43890
|
-
selectProps,
|
|
43891
|
-
maxTagKeyLength,
|
|
43892
|
-
maxTagValueLength,
|
|
43893
|
-
verticalViewList,
|
|
43894
|
-
verticalViewListFlexProps,
|
|
43895
|
-
emptyListMessage,
|
|
43896
|
-
emptyListMessageStyle,
|
|
43897
|
-
readOnly,
|
|
43898
|
-
notificationSuccessMessage,
|
|
43899
|
-
notificationSuccessMessageDescription,
|
|
43900
|
-
modalTitle,
|
|
43901
|
-
modalDescriptionText,
|
|
43902
|
-
modalDescriptionTextStyle,
|
|
43903
|
-
inputLabel,
|
|
43904
|
-
inputLabelStyle,
|
|
43905
|
-
containerStyle,
|
|
43906
|
-
maxEditTagTextLength,
|
|
43907
|
-
allowClearEditSelect,
|
|
43908
|
-
endpoint,
|
|
43909
|
-
pathToValue,
|
|
43910
|
-
editModalWidth,
|
|
43911
|
-
paddingContainerEnd
|
|
43912
|
-
} = data;
|
|
43913
|
-
const [api, contextHolder] = notification.useNotification();
|
|
43914
|
-
const navigate = useNavigate();
|
|
43915
|
-
const [open, setOpen] = useState(false);
|
|
43916
|
-
const { maxTagTextLength, ...restSelectProps } = selectProps || { maxTagTextLength: void 0 };
|
|
43917
|
-
const { data: multiQueryData, isLoading: isMultiQueryLoading, isError: isMultiQueryErrors, errors } = useMultiQuery();
|
|
43918
|
-
const partsOfUrl = usePartsOfUrl();
|
|
43919
|
-
if (isMultiQueryLoading) {
|
|
43920
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading..." });
|
|
43921
|
-
}
|
|
43922
|
-
if (isMultiQueryErrors) {
|
|
43923
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
43924
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("h4", { children: "Errors:" }),
|
|
43925
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("ul", { children: errors.map((e, i) => e && /* @__PURE__ */ jsxRuntimeExports.jsx("li", { children: typeof e === "string" ? e : e.message }, i)) })
|
|
43926
|
-
] });
|
|
43927
|
-
}
|
|
43928
|
-
const replaceValues = partsOfUrl.partsOfUrl.reduce((acc, value, index) => {
|
|
43929
|
-
acc[index.toString()] = value;
|
|
43930
|
-
return acc;
|
|
43931
|
-
}, {});
|
|
43932
|
-
const jsonRoot = multiQueryData[`req${reqIndex}`];
|
|
43933
|
-
if (jsonRoot === void 0) {
|
|
43934
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "No root for json path" });
|
|
43935
|
-
}
|
|
43936
|
-
const anythingForNow = jp.query(jsonRoot || {}, `$${jsonPathToLabels}`);
|
|
43937
|
-
const { data: labelsRaw, error: errorArrayOfObjects } = parseArrayOfAny$1(anythingForNow);
|
|
43938
|
-
const notificationSuccessMessagePrepared = notificationSuccessMessage ? parseAll({
|
|
43939
|
-
text: notificationSuccessMessage,
|
|
43940
|
-
replaceValues,
|
|
43941
|
-
multiQueryData
|
|
43942
|
-
}) : "Success";
|
|
43943
|
-
const notificationSuccessMessageDescriptionPrepared = notificationSuccessMessageDescription ? parseAll({
|
|
43944
|
-
text: notificationSuccessMessageDescription,
|
|
43945
|
-
replaceValues,
|
|
43946
|
-
multiQueryData
|
|
43947
|
-
}) : "Success";
|
|
43948
|
-
const modalTitlePrepared = modalTitle ? parseAll({ text: modalTitle, replaceValues, multiQueryData }) : "Edit";
|
|
43949
|
-
const modalDescriptionTextPrepared = modalDescriptionText ? parseAll({ text: modalDescriptionText, replaceValues, multiQueryData }) : void 0;
|
|
43950
|
-
const inputLabelPrepared = inputLabel ? parseAll({ text: inputLabel, replaceValues, multiQueryData }) : void 0;
|
|
43951
|
-
const endpointPrepared = endpoint ? parseAll({ text: endpoint, replaceValues, multiQueryData }) : "no-endpoint-provided";
|
|
43952
|
-
const pathToValuePrepared = pathToValue ? parseAll({ text: pathToValue, replaceValues, multiQueryData }) : "no-pathToValue-provided";
|
|
43953
|
-
const linkPrefixPrepared = linkPrefix ? parseAll({ text: linkPrefix, replaceValues, multiQueryData }) : void 0;
|
|
43954
|
-
const openNotificationSuccess = () => {
|
|
43955
|
-
api.success({
|
|
43956
|
-
message: notificationSuccessMessagePrepared,
|
|
43957
|
-
description: notificationSuccessMessageDescriptionPrepared,
|
|
43958
|
-
placement: "bottomRight"
|
|
43959
|
-
});
|
|
43960
|
-
};
|
|
43961
|
-
const EmptySelect = /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: containerStyle, children: [
|
|
43962
|
-
!readOnly && !verticalViewList && /* @__PURE__ */ jsxRuntimeExports.jsx(Flex, { justify: "flex-end", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
43963
|
-
Button,
|
|
43964
|
-
{
|
|
43965
|
-
type: "text",
|
|
43966
|
-
size: "small",
|
|
43967
|
-
onClick: (e) => {
|
|
43968
|
-
e.stopPropagation();
|
|
43969
|
-
setOpen(true);
|
|
43970
|
-
},
|
|
43971
|
-
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(EditIcon, {})
|
|
43972
|
-
}
|
|
43973
|
-
) }),
|
|
43974
|
-
verticalViewList ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: emptyListMessageStyle, children: emptyListMessage }) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
43975
|
-
UncontrolledSelect,
|
|
43976
|
-
{
|
|
43977
|
-
mode: "multiple",
|
|
43978
|
-
...restSelectProps,
|
|
43979
|
-
value: [],
|
|
43980
|
-
options: [],
|
|
43981
|
-
open: false,
|
|
43982
|
-
showSearch: false,
|
|
43983
|
-
removeIcon: () => {
|
|
43984
|
-
return null;
|
|
43985
|
-
},
|
|
43986
|
-
suffixIcon: null,
|
|
43987
|
-
isCursorPointer: true
|
|
43988
|
-
}
|
|
43989
|
-
),
|
|
43990
|
-
!readOnly && verticalViewList && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
43991
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Spacer$1, { $space: 8, $samespace: true }),
|
|
43992
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Flex, { justify: "flex-start", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
43993
|
-
Button,
|
|
43994
|
-
{
|
|
43995
|
-
type: "text",
|
|
43996
|
-
size: "small",
|
|
43997
|
-
onClick: (e) => {
|
|
43998
|
-
e.stopPropagation();
|
|
43999
|
-
setOpen(true);
|
|
44000
|
-
},
|
|
44001
|
-
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(EditIcon, {}),
|
|
44002
|
-
iconPosition: "end",
|
|
44003
|
-
children: "Edit"
|
|
44004
|
-
}
|
|
44005
|
-
) })
|
|
44006
|
-
] }),
|
|
44007
|
-
children,
|
|
44008
|
-
contextHolder,
|
|
44009
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
44010
|
-
EditModal$3,
|
|
44011
|
-
{
|
|
44012
|
-
open,
|
|
44013
|
-
close: () => setOpen(false),
|
|
44014
|
-
openNotificationSuccess,
|
|
44015
|
-
modalTitle: modalTitlePrepared,
|
|
44016
|
-
modalDescriptionText: modalDescriptionTextPrepared,
|
|
44017
|
-
inputLabel: inputLabelPrepared,
|
|
44018
|
-
maxEditTagTextLength,
|
|
44019
|
-
allowClearEditSelect,
|
|
44020
|
-
endpoint: endpointPrepared,
|
|
44021
|
-
pathToValue: pathToValuePrepared,
|
|
44022
|
-
editModalWidth,
|
|
44023
|
-
paddingContainerEnd,
|
|
44024
|
-
modalDescriptionTextStyle,
|
|
44025
|
-
inputLabelStyle
|
|
44026
|
-
}
|
|
44027
|
-
)
|
|
44028
|
-
] });
|
|
44029
|
-
if (!labelsRaw) {
|
|
44030
|
-
if (errorArrayOfObjects) {
|
|
44031
|
-
return EmptySelect;
|
|
44032
|
-
}
|
|
44033
|
-
return EmptySelect;
|
|
44034
|
-
}
|
|
44035
|
-
const labels = Object.entries(labelsRaw).map(([key, value]) => `${key}=${value}`);
|
|
44036
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: containerStyle, children: [
|
|
44037
|
-
!readOnly && !verticalViewList && /* @__PURE__ */ jsxRuntimeExports.jsx(Flex, { justify: "flex-end", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
44038
|
-
Button,
|
|
44039
|
-
{
|
|
44040
|
-
type: "text",
|
|
44041
|
-
size: "small",
|
|
44042
|
-
onClick: (e) => {
|
|
44043
|
-
e.stopPropagation();
|
|
44044
|
-
setOpen(true);
|
|
44045
|
-
},
|
|
44046
|
-
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(EditIcon, {})
|
|
44047
|
-
}
|
|
44048
|
-
) }),
|
|
44049
|
-
verticalViewList ? /* @__PURE__ */ jsxRuntimeExports.jsx(Flex, { vertical: true, gap: 8, ...verticalViewListFlexProps, children: labels.map((label) => {
|
|
44050
|
-
let labelToRender = "Not a string value";
|
|
44051
|
-
if (typeof label === "string") {
|
|
44052
|
-
if (maxTagKeyLength || maxTagValueLength) {
|
|
44053
|
-
const splittedLabel = label.split("=");
|
|
44054
|
-
if (splittedLabel[0] && splittedLabel[0].length > 0) {
|
|
44055
|
-
labelToRender = maxTagKeyLength ? truncate$2(splittedLabel[0], maxTagKeyLength) : splittedLabel[0];
|
|
44056
|
-
}
|
|
44057
|
-
labelToRender += "=";
|
|
44058
|
-
if (splittedLabel[1] && splittedLabel[1].length > 0) {
|
|
44059
|
-
labelToRender += maxTagValueLength ? truncate$2(splittedLabel[1], maxTagValueLength) : splittedLabel[1];
|
|
44060
|
-
}
|
|
44061
|
-
} else {
|
|
44062
|
-
labelToRender = truncate$2(label, maxTagTextLength);
|
|
44063
|
-
}
|
|
44064
|
-
}
|
|
44065
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Popover, { content: label, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
44066
|
-
CursorPointerTagMinContent,
|
|
44067
|
-
{
|
|
44068
|
-
onClick: (e) => {
|
|
44069
|
-
if (typeof label === "string" && linkPrefix) {
|
|
44070
|
-
navigate(`${linkPrefixPrepared}${encodeURIComponent(label)}`);
|
|
44071
|
-
}
|
|
44072
|
-
e.stopPropagation();
|
|
44073
|
-
},
|
|
44074
|
-
children: labelToRender
|
|
44075
|
-
}
|
|
44076
|
-
) }, label);
|
|
44077
|
-
}) }) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
44078
|
-
UncontrolledSelect,
|
|
44079
|
-
{
|
|
44080
|
-
mode: "multiple",
|
|
44081
|
-
...restSelectProps,
|
|
44082
|
-
value: labels.map((el) => ({ label: el, value: el })),
|
|
44083
|
-
options: labels.map((el) => ({ label: el, value: el })),
|
|
44084
|
-
open: false,
|
|
44085
|
-
showSearch: false,
|
|
44086
|
-
removeIcon: () => {
|
|
44087
|
-
return null;
|
|
44088
|
-
},
|
|
44089
|
-
suffixIcon: null,
|
|
44090
|
-
tagRender: ({ label }) => {
|
|
44091
|
-
let labelToRender = "Not a string value";
|
|
44092
|
-
if (typeof label === "string") {
|
|
44093
|
-
if (maxTagKeyLength || maxTagValueLength) {
|
|
44094
|
-
const splittedLabel = label.split("=");
|
|
44095
|
-
if (splittedLabel[0] && splittedLabel[0].length > 0) {
|
|
44096
|
-
labelToRender = maxTagKeyLength ? truncate$2(splittedLabel[0], maxTagKeyLength) : splittedLabel[0];
|
|
44097
|
-
}
|
|
44098
|
-
labelToRender += "=";
|
|
44099
|
-
if (splittedLabel[1] && splittedLabel[1].length > 0) {
|
|
44100
|
-
labelToRender += maxTagValueLength ? truncate$2(splittedLabel[1], maxTagValueLength) : splittedLabel[1];
|
|
44101
|
-
}
|
|
44102
|
-
} else {
|
|
44103
|
-
labelToRender = truncate$2(label, maxTagTextLength);
|
|
44104
|
-
}
|
|
44105
|
-
}
|
|
44106
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Popover, { content: label, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
44107
|
-
CursorPointerTag,
|
|
44108
|
-
{
|
|
44109
|
-
onClick: (e) => {
|
|
44110
|
-
if (typeof label === "string" && linkPrefix) {
|
|
44111
|
-
navigate(`${linkPrefixPrepared}${encodeURIComponent(label)}`);
|
|
44112
|
-
}
|
|
44113
|
-
e.stopPropagation();
|
|
44114
|
-
},
|
|
44115
|
-
children: labelToRender
|
|
44116
|
-
}
|
|
44117
|
-
) });
|
|
44118
|
-
}
|
|
44119
|
-
}
|
|
44120
|
-
),
|
|
44121
|
-
!readOnly && verticalViewList && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
44122
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Spacer$1, { $space: 8, $samespace: true }),
|
|
44123
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Flex, { justify: "flex-start", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
44124
|
-
Button,
|
|
44125
|
-
{
|
|
44126
|
-
type: "text",
|
|
44127
|
-
size: "small",
|
|
44128
|
-
onClick: (e) => {
|
|
44129
|
-
e.stopPropagation();
|
|
44130
|
-
setOpen(true);
|
|
44131
|
-
},
|
|
44132
|
-
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(EditIcon, {}),
|
|
44133
|
-
iconPosition: "end",
|
|
44134
|
-
children: "Edit"
|
|
44135
|
-
}
|
|
44136
|
-
) })
|
|
44137
|
-
] }),
|
|
44138
|
-
children,
|
|
44139
|
-
contextHolder,
|
|
44140
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
44141
|
-
EditModal$3,
|
|
44142
|
-
{
|
|
44143
|
-
open,
|
|
44144
|
-
close: () => setOpen(false),
|
|
44145
|
-
values: labelsRaw,
|
|
44146
|
-
openNotificationSuccess,
|
|
44147
|
-
modalTitle: modalTitlePrepared,
|
|
44148
|
-
modalDescriptionText: modalDescriptionTextPrepared,
|
|
44149
|
-
inputLabel: inputLabelPrepared,
|
|
44150
|
-
maxEditTagTextLength,
|
|
44151
|
-
allowClearEditSelect,
|
|
44152
|
-
endpoint: endpointPrepared,
|
|
44153
|
-
pathToValue: pathToValuePrepared,
|
|
44154
|
-
editModalWidth,
|
|
44155
|
-
paddingContainerEnd,
|
|
44156
|
-
modalDescriptionTextStyle,
|
|
44157
|
-
inputLabelStyle
|
|
44158
|
-
}
|
|
44159
|
-
)
|
|
44160
|
-
] });
|
|
44161
|
-
};
|
|
44162
|
-
|
|
44163
|
-
const isRecordStringNumber = (value) => typeof value === "object" && value !== null && !Array.isArray(value) && Object.entries(value).every(([k, v]) => typeof k === "string" && (typeof v === "string" || typeof v === "number"));
|
|
44164
|
-
const parseArrayOfAny = (value) => {
|
|
44165
|
-
if (!Array.isArray(value)) {
|
|
44166
|
-
return { error: "Value on jsonPath is not an array" };
|
|
44167
|
-
}
|
|
44168
|
-
if (isRecordStringNumber(value[0])) {
|
|
44169
|
-
return { data: value[0] };
|
|
44170
|
-
}
|
|
44171
|
-
return { error: "Value on jsonPath is not a record array" };
|
|
44172
|
-
};
|
|
44173
|
-
const truncate$1 = (text, max) => {
|
|
44174
|
-
if (!max) {
|
|
44175
|
-
return text;
|
|
44176
|
-
}
|
|
44177
|
-
return text.length > max ? text.slice(0, max) + "..." : text;
|
|
44178
|
-
};
|
|
44179
|
-
|
|
44180
|
-
const LabelsToSearchParams = ({ data, children }) => {
|
|
44181
|
-
const {
|
|
44182
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
44183
|
-
id,
|
|
44184
|
-
reqIndex,
|
|
44185
|
-
jsonPathToLabels,
|
|
44186
|
-
linkPrefix,
|
|
44187
|
-
textLink,
|
|
44188
|
-
errorText,
|
|
44189
|
-
maxTextLength,
|
|
44190
|
-
...linkProps
|
|
44191
|
-
} = data;
|
|
44192
|
-
const { data: multiQueryData, isLoading: isMultiQueryLoading, isError: isMultiQueryErrors, errors } = useMultiQuery();
|
|
44193
|
-
const partsOfUrl = usePartsOfUrl();
|
|
44194
|
-
if (isMultiQueryLoading) {
|
|
44195
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading..." });
|
|
44196
|
-
}
|
|
44197
|
-
if (isMultiQueryErrors) {
|
|
44198
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
44199
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("h4", { children: "Errors:" }),
|
|
44200
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("ul", { children: errors.map((e, i) => e && /* @__PURE__ */ jsxRuntimeExports.jsx("li", { children: typeof e === "string" ? e : e.message }, i)) })
|
|
44201
|
-
] });
|
|
44202
|
-
}
|
|
44203
|
-
const replaceValues = partsOfUrl.partsOfUrl.reduce((acc, value, index) => {
|
|
44204
|
-
acc[index.toString()] = value;
|
|
44205
|
-
return acc;
|
|
44206
|
-
}, {});
|
|
44207
|
-
const jsonRoot = multiQueryData[`req${reqIndex}`];
|
|
44208
|
-
if (jsonRoot === void 0) {
|
|
44209
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "No root for json path" });
|
|
44210
|
-
}
|
|
44211
|
-
const anythingForNow = jp.query(jsonRoot || {}, `$${jsonPathToLabels}`);
|
|
44212
|
-
const { data: labelsRaw, error: errorArrayOfObjects } = parseArrayOfAny(anythingForNow);
|
|
44213
|
-
const linkPrefixPrepared = parseAll({ text: linkPrefix, replaceValues, multiQueryData });
|
|
44214
|
-
if (!labelsRaw) {
|
|
44215
|
-
if (errorArrayOfObjects) {
|
|
44216
|
-
console.log(errorArrayOfObjects);
|
|
44217
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Typography.Link, { href: linkPrefixPrepared, ...linkProps, children: [
|
|
44218
|
-
errorText,
|
|
44219
|
-
children
|
|
44220
|
-
] });
|
|
44221
|
-
}
|
|
44222
|
-
console.log("Not a valid data structure");
|
|
44223
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Typography.Link, { href: linkPrefixPrepared, ...linkProps, children: [
|
|
44224
|
-
errorText,
|
|
44225
|
-
children
|
|
44226
|
-
] });
|
|
44227
|
-
}
|
|
44228
|
-
const labels = Object.entries(labelsRaw).map(([key, value]) => `${key}=${value}`).join(",");
|
|
44229
|
-
const labelsEncoded = encodeURIComponent(labels);
|
|
44230
|
-
const hrefPrepared = `${linkPrefixPrepared}${labelsEncoded}`;
|
|
44231
|
-
if (maxTextLength && !textLink) {
|
|
44232
|
-
const truncatedLabels = maxTextLength ? truncate$1(labels, maxTextLength) : labels;
|
|
44233
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
44234
|
-
Popover,
|
|
44235
|
-
{
|
|
44236
|
-
content: /* @__PURE__ */ jsxRuntimeExports.jsx(Flex, { vertical: true, gap: 8, children: Object.entries(labelsRaw).map(([key, value]) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: `${key}=${value}` }, key)) }),
|
|
44237
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Typography.Link, { href: hrefPrepared, ...linkProps, children: [
|
|
44238
|
-
truncatedLabels,
|
|
44239
|
-
children
|
|
44240
|
-
] })
|
|
44241
|
-
}
|
|
44242
|
-
);
|
|
44243
|
-
}
|
|
44244
|
-
if (textLink) {
|
|
44245
|
-
const truncatedTextLink = maxTextLength ? truncate$1(textLink, maxTextLength) : textLink;
|
|
44246
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
44247
|
-
Popover,
|
|
44248
|
-
{
|
|
44249
|
-
content: /* @__PURE__ */ jsxRuntimeExports.jsx(Flex, { vertical: true, gap: 8, children: Object.entries(labelsRaw).map(([key, value]) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: `${key}=${value}` }, key)) }),
|
|
44250
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Typography.Link, { href: hrefPrepared, ...linkProps, children: [
|
|
44251
|
-
truncatedTextLink,
|
|
44252
|
-
children
|
|
44253
|
-
] })
|
|
44254
|
-
}
|
|
44255
|
-
);
|
|
44256
|
-
}
|
|
44257
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Typography.Link, { href: hrefPrepared, ...linkProps, children: [
|
|
44258
|
-
textLink || labels,
|
|
44259
|
-
children
|
|
44260
|
-
] });
|
|
44261
|
-
};
|
|
44262
|
-
|
|
44263
43881
|
const ResetedFormList$3 = styled(Form.List)`
|
|
44264
43882
|
margin-bottom: 8px;
|
|
44265
43883
|
`;
|
|
44266
|
-
const Styled$
|
|
43884
|
+
const Styled$r = {
|
|
44267
43885
|
ResetedFormList: ResetedFormList$3
|
|
44268
43886
|
};
|
|
44269
43887
|
|
|
44270
|
-
const
|
|
43888
|
+
const TaintsEditModal = ({
|
|
44271
43889
|
open,
|
|
44272
43890
|
close,
|
|
44273
43891
|
values,
|
|
@@ -44348,7 +43966,7 @@ const EditModal$2 = ({
|
|
|
44348
43966
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Col, { span: cols[3], children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", {}) })
|
|
44349
43967
|
] }),
|
|
44350
43968
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Spacer$1, { $space: 10, $samespace: true }),
|
|
44351
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
43969
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$r.ResetedFormList, { name: "taints", children: (fields, { add, remove }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
44352
43970
|
fields.map(({ key, name, ...restField }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(Row, { gutter: [16, 16], children: [
|
|
44353
43971
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Col, { span: cols[0], children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
44354
43972
|
ResetedFormItem$1,
|
|
@@ -44406,193 +44024,14 @@ const EditModal$2 = ({
|
|
|
44406
44024
|
);
|
|
44407
44025
|
};
|
|
44408
44026
|
|
|
44409
|
-
const flattenOnce$1 = (arr) => arr.reduce((acc, row) => [...acc, ...row], []);
|
|
44410
|
-
const ALLOWED_EFFECTS$1 = /* @__PURE__ */ new Set(["NoSchedule", "PreferNoSchedule", "NoExecute"]);
|
|
44411
|
-
const isTaintLike = (x) => {
|
|
44412
|
-
if (x === null || typeof x !== "object" || Array.isArray(x)) return false;
|
|
44413
|
-
const o = x;
|
|
44414
|
-
if (typeof o.effect !== "string" || !ALLOWED_EFFECTS$1.has(o.effect)) return false;
|
|
44415
|
-
if ("key" in o && typeof o.key !== "string") return false;
|
|
44416
|
-
if ("value" in o && typeof o.value !== "string") return false;
|
|
44417
|
-
return true;
|
|
44418
|
-
};
|
|
44419
|
-
const filterTaintLikes = (input) => {
|
|
44420
|
-
if (!Array.isArray(input)) return [];
|
|
44421
|
-
return input.filter(isTaintLike);
|
|
44422
|
-
};
|
|
44423
|
-
const getItemsInside$2 = (value) => {
|
|
44424
|
-
if (!Array.isArray(value)) {
|
|
44425
|
-
return { error: "Value on jsonPath is not an array" };
|
|
44426
|
-
}
|
|
44427
|
-
let flattenArrayOfUnknown = [];
|
|
44428
|
-
try {
|
|
44429
|
-
flattenArrayOfUnknown = flattenOnce$1(value);
|
|
44430
|
-
} catch (e) {
|
|
44431
|
-
console.log(e);
|
|
44432
|
-
return { error: "Error while flattening" };
|
|
44433
|
-
}
|
|
44434
|
-
return { counter: flattenArrayOfUnknown.length, taints: filterTaintLikes(flattenArrayOfUnknown) };
|
|
44435
|
-
};
|
|
44436
|
-
|
|
44437
|
-
const Taints = ({ data, children }) => {
|
|
44438
|
-
const {
|
|
44439
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
44440
|
-
id,
|
|
44441
|
-
reqIndex,
|
|
44442
|
-
jsonPathToArray,
|
|
44443
|
-
text,
|
|
44444
|
-
errorText,
|
|
44445
|
-
style,
|
|
44446
|
-
notificationSuccessMessage,
|
|
44447
|
-
notificationSuccessMessageDescription,
|
|
44448
|
-
modalTitle,
|
|
44449
|
-
modalDescriptionText,
|
|
44450
|
-
modalDescriptionTextStyle,
|
|
44451
|
-
inputLabel,
|
|
44452
|
-
inputLabelStyle,
|
|
44453
|
-
containerStyle,
|
|
44454
|
-
endpoint,
|
|
44455
|
-
pathToValue,
|
|
44456
|
-
editModalWidth,
|
|
44457
|
-
cols
|
|
44458
|
-
} = data;
|
|
44459
|
-
const [api, contextHolder] = notification.useNotification();
|
|
44460
|
-
const [open, setOpen] = useState(false);
|
|
44461
|
-
const { data: multiQueryData, isLoading: isMultiQueryLoading, isError: isMultiQueryErrors, errors } = useMultiQuery();
|
|
44462
|
-
const partsOfUrl = usePartsOfUrl();
|
|
44463
|
-
if (isMultiQueryLoading) {
|
|
44464
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading..." });
|
|
44465
|
-
}
|
|
44466
|
-
if (isMultiQueryErrors) {
|
|
44467
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
44468
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("h4", { children: "Errors:" }),
|
|
44469
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("ul", { children: errors.map((e, i) => e && /* @__PURE__ */ jsxRuntimeExports.jsx("li", { children: typeof e === "string" ? e : e.message }, i)) })
|
|
44470
|
-
] });
|
|
44471
|
-
}
|
|
44472
|
-
const replaceValues = partsOfUrl.partsOfUrl.reduce((acc, value, index) => {
|
|
44473
|
-
acc[index.toString()] = value;
|
|
44474
|
-
return acc;
|
|
44475
|
-
}, {});
|
|
44476
|
-
const jsonRoot = multiQueryData[`req${reqIndex}`];
|
|
44477
|
-
if (jsonRoot === void 0) {
|
|
44478
|
-
console.log(`Item Counter: ${id}: No root for json path`);
|
|
44479
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style, children: errorText });
|
|
44480
|
-
}
|
|
44481
|
-
const anythingForNow = jp.query(jsonRoot || {}, `$${jsonPathToArray}`);
|
|
44482
|
-
const { counter, taints, error: errorArrayOfObjects } = getItemsInside$2(anythingForNow);
|
|
44483
|
-
const notificationSuccessMessagePrepared = notificationSuccessMessage ? parseAll({
|
|
44484
|
-
text: notificationSuccessMessage,
|
|
44485
|
-
replaceValues,
|
|
44486
|
-
multiQueryData
|
|
44487
|
-
}) : "Success";
|
|
44488
|
-
const notificationSuccessMessageDescriptionPrepared = notificationSuccessMessageDescription ? parseAll({
|
|
44489
|
-
text: notificationSuccessMessageDescription,
|
|
44490
|
-
replaceValues,
|
|
44491
|
-
multiQueryData
|
|
44492
|
-
}) : "Success";
|
|
44493
|
-
const modalTitlePrepared = modalTitle ? parseAll({ text: modalTitle, replaceValues, multiQueryData }) : "Edit";
|
|
44494
|
-
const modalDescriptionTextPrepared = modalDescriptionText ? parseAll({ text: modalDescriptionText, replaceValues, multiQueryData }) : void 0;
|
|
44495
|
-
const inputLabelPrepared = inputLabel ? parseAll({ text: inputLabel, replaceValues, multiQueryData }) : void 0;
|
|
44496
|
-
const endpointPrepared = endpoint ? parseAll({ text: endpoint, replaceValues, multiQueryData }) : "no-endpoint-provided";
|
|
44497
|
-
const pathToValuePrepared = pathToValue ? parseAll({ text: pathToValue, replaceValues, multiQueryData }) : "no-pathToValue-provided";
|
|
44498
|
-
const openNotificationSuccess = () => {
|
|
44499
|
-
api.success({
|
|
44500
|
-
message: notificationSuccessMessagePrepared,
|
|
44501
|
-
description: notificationSuccessMessageDescriptionPrepared,
|
|
44502
|
-
placement: "bottomRight"
|
|
44503
|
-
});
|
|
44504
|
-
};
|
|
44505
|
-
if (errorArrayOfObjects) {
|
|
44506
|
-
console.log(`Item Counter: ${id}: ${errorArrayOfObjects}`);
|
|
44507
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
44508
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: containerStyle, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { align: "center", gap: 8, children: [
|
|
44509
|
-
errorText,
|
|
44510
|
-
" ",
|
|
44511
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
44512
|
-
Button,
|
|
44513
|
-
{
|
|
44514
|
-
type: "text",
|
|
44515
|
-
size: "small",
|
|
44516
|
-
onClick: (e) => {
|
|
44517
|
-
e.stopPropagation();
|
|
44518
|
-
setOpen(true);
|
|
44519
|
-
},
|
|
44520
|
-
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(EditIcon, {})
|
|
44521
|
-
}
|
|
44522
|
-
)
|
|
44523
|
-
] }) }),
|
|
44524
|
-
contextHolder,
|
|
44525
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
44526
|
-
EditModal$2,
|
|
44527
|
-
{
|
|
44528
|
-
open,
|
|
44529
|
-
close: () => setOpen(false),
|
|
44530
|
-
values: taints,
|
|
44531
|
-
openNotificationSuccess,
|
|
44532
|
-
modalTitle: modalTitlePrepared,
|
|
44533
|
-
modalDescriptionText: modalDescriptionTextPrepared,
|
|
44534
|
-
inputLabel: inputLabelPrepared,
|
|
44535
|
-
endpoint: endpointPrepared,
|
|
44536
|
-
pathToValue: pathToValuePrepared,
|
|
44537
|
-
editModalWidth,
|
|
44538
|
-
cols,
|
|
44539
|
-
modalDescriptionTextStyle,
|
|
44540
|
-
inputLabelStyle
|
|
44541
|
-
}
|
|
44542
|
-
)
|
|
44543
|
-
] });
|
|
44544
|
-
}
|
|
44545
|
-
const parsedText = parseAll({ text, replaceValues, multiQueryData });
|
|
44546
|
-
const parsedTextWithCounter = parsedText.replace("~counter~", String(counter || 0));
|
|
44547
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
44548
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: containerStyle, children: [
|
|
44549
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { align: "center", gap: 8, children: [
|
|
44550
|
-
parsedTextWithCounter,
|
|
44551
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
44552
|
-
Button,
|
|
44553
|
-
{
|
|
44554
|
-
type: "text",
|
|
44555
|
-
size: "small",
|
|
44556
|
-
onClick: (e) => {
|
|
44557
|
-
e.stopPropagation();
|
|
44558
|
-
setOpen(true);
|
|
44559
|
-
},
|
|
44560
|
-
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(EditIcon, {})
|
|
44561
|
-
}
|
|
44562
|
-
)
|
|
44563
|
-
] }),
|
|
44564
|
-
children
|
|
44565
|
-
] }),
|
|
44566
|
-
contextHolder,
|
|
44567
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
44568
|
-
EditModal$2,
|
|
44569
|
-
{
|
|
44570
|
-
open,
|
|
44571
|
-
close: () => setOpen(false),
|
|
44572
|
-
values: taints,
|
|
44573
|
-
openNotificationSuccess,
|
|
44574
|
-
modalTitle: modalTitlePrepared,
|
|
44575
|
-
modalDescriptionText: modalDescriptionTextPrepared,
|
|
44576
|
-
inputLabel: inputLabelPrepared,
|
|
44577
|
-
endpoint: endpointPrepared,
|
|
44578
|
-
pathToValue: pathToValuePrepared,
|
|
44579
|
-
editModalWidth,
|
|
44580
|
-
cols,
|
|
44581
|
-
modalDescriptionTextStyle,
|
|
44582
|
-
inputLabelStyle
|
|
44583
|
-
}
|
|
44584
|
-
)
|
|
44585
|
-
] });
|
|
44586
|
-
};
|
|
44587
|
-
|
|
44588
44027
|
const ResetedFormList$2 = styled(Form.List)`
|
|
44589
44028
|
margin-bottom: 8px;
|
|
44590
44029
|
`;
|
|
44591
|
-
const Styled$
|
|
44030
|
+
const Styled$q = {
|
|
44592
44031
|
ResetedFormList: ResetedFormList$2
|
|
44593
44032
|
};
|
|
44594
44033
|
|
|
44595
|
-
const
|
|
44034
|
+
const TolerationsEditModal = ({
|
|
44596
44035
|
open,
|
|
44597
44036
|
close,
|
|
44598
44037
|
values,
|
|
@@ -44683,7 +44122,7 @@ const EditModal$1 = ({
|
|
|
44683
44122
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Col, { span: cols[4], children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", {}) })
|
|
44684
44123
|
] }),
|
|
44685
44124
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Spacer$1, { $space: 10, $samespace: true }),
|
|
44686
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
44125
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$q.ResetedFormList, { name: "tolerations", children: (fields, { add, remove }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
44687
44126
|
fields.map(({ key, name, ...restField }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(Row, { gutter: [16, 16], children: [
|
|
44688
44127
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Col, { span: cols[0], children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
44689
44128
|
ResetedFormItem$1,
|
|
@@ -44772,48 +44211,547 @@ const EditModal$1 = ({
|
|
|
44772
44211
|
);
|
|
44773
44212
|
};
|
|
44774
44213
|
|
|
44775
|
-
const
|
|
44776
|
-
|
|
44777
|
-
|
|
44778
|
-
const
|
|
44779
|
-
|
|
44780
|
-
|
|
44781
|
-
|
|
44782
|
-
|
|
44783
|
-
|
|
44784
|
-
|
|
44785
|
-
|
|
44214
|
+
const ResetedFormList$1 = styled(Form.List)`
|
|
44215
|
+
margin-bottom: 8px;
|
|
44216
|
+
`;
|
|
44217
|
+
const Styled$p = {
|
|
44218
|
+
ResetedFormList: ResetedFormList$1
|
|
44219
|
+
};
|
|
44220
|
+
|
|
44221
|
+
const AnnotationsEditModal = ({
|
|
44222
|
+
open,
|
|
44223
|
+
close,
|
|
44224
|
+
values,
|
|
44225
|
+
openNotificationSuccess,
|
|
44226
|
+
modalTitle,
|
|
44227
|
+
modalDescriptionText,
|
|
44228
|
+
inputLabel,
|
|
44229
|
+
endpoint,
|
|
44230
|
+
pathToValue,
|
|
44231
|
+
editModalWidth,
|
|
44232
|
+
cols,
|
|
44233
|
+
modalDescriptionTextStyle,
|
|
44234
|
+
inputLabelStyle
|
|
44235
|
+
}) => {
|
|
44236
|
+
const queryClient = useQueryClient();
|
|
44237
|
+
const [error, setError] = useState();
|
|
44238
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
44239
|
+
const [form] = Form.useForm();
|
|
44240
|
+
const annotations = Form.useWatch("annotations", form);
|
|
44241
|
+
useEffect(() => {
|
|
44242
|
+
if (open) {
|
|
44243
|
+
form.setFieldsValue({
|
|
44244
|
+
annotations: values ? Object.entries(values).map(([key, value]) => ({
|
|
44245
|
+
key,
|
|
44246
|
+
value
|
|
44247
|
+
})) : []
|
|
44248
|
+
});
|
|
44249
|
+
}
|
|
44250
|
+
}, [open, form]);
|
|
44251
|
+
const submit = () => {
|
|
44252
|
+
form.validateFields().then(() => {
|
|
44253
|
+
const result = {};
|
|
44254
|
+
annotations.forEach(({ key, value }) => {
|
|
44255
|
+
result[key] = value || "";
|
|
44256
|
+
});
|
|
44257
|
+
console.log(JSON.stringify(result));
|
|
44258
|
+
setIsLoading(true);
|
|
44259
|
+
setError(void 0);
|
|
44260
|
+
patchEntryWithReplaceOp({ endpoint, pathToValue, body: result }).then(() => {
|
|
44261
|
+
queryClient.invalidateQueries({ queryKey: ["multi"] });
|
|
44262
|
+
if (openNotificationSuccess) {
|
|
44263
|
+
openNotificationSuccess();
|
|
44264
|
+
}
|
|
44265
|
+
setIsLoading(false);
|
|
44266
|
+
setError(void 0);
|
|
44267
|
+
close();
|
|
44268
|
+
}).catch((error2) => {
|
|
44269
|
+
setIsLoading(false);
|
|
44270
|
+
setError(error2);
|
|
44271
|
+
});
|
|
44272
|
+
}).catch(() => console.log("Validating error"));
|
|
44273
|
+
};
|
|
44274
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
44275
|
+
Modal,
|
|
44276
|
+
{
|
|
44277
|
+
title: modalTitle,
|
|
44278
|
+
open,
|
|
44279
|
+
onOk: () => submit(),
|
|
44280
|
+
onCancel: () => {
|
|
44281
|
+
close();
|
|
44282
|
+
form.resetFields();
|
|
44283
|
+
setIsLoading(false);
|
|
44284
|
+
setError(void 0);
|
|
44285
|
+
},
|
|
44286
|
+
okText: "Save",
|
|
44287
|
+
confirmLoading: isLoading,
|
|
44288
|
+
maskClosable: false,
|
|
44289
|
+
width: editModalWidth || 520,
|
|
44290
|
+
destroyOnHidden: true,
|
|
44291
|
+
centered: true,
|
|
44292
|
+
children: [
|
|
44293
|
+
error && /* @__PURE__ */ jsxRuntimeExports.jsx(Alert, { type: "error", message: "Error while submitting", description: error?.response?.data?.message }),
|
|
44294
|
+
modalDescriptionText && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
44295
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: modalDescriptionTextStyle, children: modalDescriptionText }),
|
|
44296
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Spacer$1, { $space: 10, $samespace: true })
|
|
44297
|
+
] }),
|
|
44298
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Form, { form, children: [
|
|
44299
|
+
inputLabel && /* @__PURE__ */ jsxRuntimeExports.jsx(CustomSizeTitle, { $designNewLayout: true, style: inputLabelStyle, children: inputLabel }),
|
|
44300
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Spacer$1, { $space: 10, $samespace: true }),
|
|
44301
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Row, { gutter: [16, 16], children: [
|
|
44302
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Col, { span: cols[0], children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Key" }) }),
|
|
44303
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Col, { span: cols[1], children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Value" }) }),
|
|
44304
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Col, { span: cols[2], children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", {}) })
|
|
44305
|
+
] }),
|
|
44306
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Spacer$1, { $space: 10, $samespace: true }),
|
|
44307
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$p.ResetedFormList, { name: "annotations", children: (fields, { add, remove }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
44308
|
+
fields.map(({ key, name, ...restField }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(Row, { gutter: [16, 16], children: [
|
|
44309
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Col, { span: cols[0], children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
44310
|
+
ResetedFormItem$1,
|
|
44311
|
+
{
|
|
44312
|
+
...restField,
|
|
44313
|
+
name: [name, "key"],
|
|
44314
|
+
rules: [{ required: true, message: "Key is required" }],
|
|
44315
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Input, { placeholder: "key" })
|
|
44316
|
+
}
|
|
44317
|
+
) }),
|
|
44318
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Col, { span: cols[1], children: /* @__PURE__ */ jsxRuntimeExports.jsx(ResetedFormItem$1, { ...restField, name: [name, "value"], children: /* @__PURE__ */ jsxRuntimeExports.jsx(Input, { placeholder: "value" }) }) }),
|
|
44319
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Col, { span: cols[2], children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { size: "small", type: "text", onClick: () => remove(name), children: /* @__PURE__ */ jsxRuntimeExports.jsx(MinusIcon, {}) }) })
|
|
44320
|
+
] }, key)),
|
|
44321
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ResetedFormItem$1, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { type: "text", size: "small", onClick: () => add(), children: /* @__PURE__ */ jsxRuntimeExports.jsx(PlusIcon, {}) }) })
|
|
44322
|
+
] }) })
|
|
44323
|
+
] })
|
|
44324
|
+
]
|
|
44786
44325
|
}
|
|
44326
|
+
);
|
|
44327
|
+
};
|
|
44328
|
+
|
|
44329
|
+
const isRecordStringNumber$1 = (value) => typeof value === "object" && value !== null && !Array.isArray(value) && Object.entries(value).every(([k, v]) => typeof k === "string" && (typeof v === "string" || typeof v === "number"));
|
|
44330
|
+
const parseArrayOfAny$1 = (value) => {
|
|
44331
|
+
if (!Array.isArray(value)) {
|
|
44332
|
+
return { error: "Value on jsonPath is not an array" };
|
|
44787
44333
|
}
|
|
44788
|
-
if (
|
|
44789
|
-
|
|
44790
|
-
|
|
44334
|
+
if (isRecordStringNumber$1(value[0])) {
|
|
44335
|
+
return { data: value[0] };
|
|
44336
|
+
}
|
|
44337
|
+
return { error: "Value on jsonPath is not a record array" };
|
|
44338
|
+
};
|
|
44339
|
+
const truncate$2 = (text, max) => {
|
|
44340
|
+
if (!max) {
|
|
44341
|
+
return text;
|
|
44342
|
+
}
|
|
44343
|
+
return text.length > max ? text.slice(0, max) + "..." : text;
|
|
44344
|
+
};
|
|
44345
|
+
|
|
44346
|
+
const Labels = ({ data, children }) => {
|
|
44347
|
+
const {
|
|
44348
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
44349
|
+
id,
|
|
44350
|
+
reqIndex,
|
|
44351
|
+
jsonPathToLabels,
|
|
44352
|
+
linkPrefix,
|
|
44353
|
+
selectProps,
|
|
44354
|
+
maxTagKeyLength,
|
|
44355
|
+
maxTagValueLength,
|
|
44356
|
+
verticalViewList,
|
|
44357
|
+
verticalViewListFlexProps,
|
|
44358
|
+
emptyListMessage,
|
|
44359
|
+
emptyListMessageStyle,
|
|
44360
|
+
readOnly,
|
|
44361
|
+
notificationSuccessMessage,
|
|
44362
|
+
notificationSuccessMessageDescription,
|
|
44363
|
+
modalTitle,
|
|
44364
|
+
modalDescriptionText,
|
|
44365
|
+
modalDescriptionTextStyle,
|
|
44366
|
+
inputLabel,
|
|
44367
|
+
inputLabelStyle,
|
|
44368
|
+
containerStyle,
|
|
44369
|
+
maxEditTagTextLength,
|
|
44370
|
+
allowClearEditSelect,
|
|
44371
|
+
endpoint,
|
|
44372
|
+
pathToValue,
|
|
44373
|
+
editModalWidth,
|
|
44374
|
+
paddingContainerEnd
|
|
44375
|
+
} = data;
|
|
44376
|
+
const [api, contextHolder] = notification.useNotification();
|
|
44377
|
+
const navigate = useNavigate();
|
|
44378
|
+
const [open, setOpen] = useState(false);
|
|
44379
|
+
const { maxTagTextLength, ...restSelectProps } = selectProps || { maxTagTextLength: void 0 };
|
|
44380
|
+
const { data: multiQueryData, isLoading: isMultiQueryLoading, isError: isMultiQueryErrors, errors } = useMultiQuery();
|
|
44381
|
+
const partsOfUrl = usePartsOfUrl();
|
|
44382
|
+
if (isMultiQueryLoading) {
|
|
44383
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading..." });
|
|
44384
|
+
}
|
|
44385
|
+
if (isMultiQueryErrors) {
|
|
44386
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
44387
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("h4", { children: "Errors:" }),
|
|
44388
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("ul", { children: errors.map((e, i) => e && /* @__PURE__ */ jsxRuntimeExports.jsx("li", { children: typeof e === "string" ? e : e.message }, i)) })
|
|
44389
|
+
] });
|
|
44390
|
+
}
|
|
44391
|
+
const replaceValues = partsOfUrl.partsOfUrl.reduce((acc, value, index) => {
|
|
44392
|
+
acc[index.toString()] = value;
|
|
44393
|
+
return acc;
|
|
44394
|
+
}, {});
|
|
44395
|
+
const jsonRoot = multiQueryData[`req${reqIndex}`];
|
|
44396
|
+
if (jsonRoot === void 0) {
|
|
44397
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "No root for json path" });
|
|
44398
|
+
}
|
|
44399
|
+
const anythingForNow = jp.query(jsonRoot || {}, `$${jsonPathToLabels}`);
|
|
44400
|
+
const { data: labelsRaw, error: errorArrayOfObjects } = parseArrayOfAny$1(anythingForNow);
|
|
44401
|
+
const notificationSuccessMessagePrepared = notificationSuccessMessage ? parseAll({
|
|
44402
|
+
text: notificationSuccessMessage,
|
|
44403
|
+
replaceValues,
|
|
44404
|
+
multiQueryData
|
|
44405
|
+
}) : "Success";
|
|
44406
|
+
const notificationSuccessMessageDescriptionPrepared = notificationSuccessMessageDescription ? parseAll({
|
|
44407
|
+
text: notificationSuccessMessageDescription,
|
|
44408
|
+
replaceValues,
|
|
44409
|
+
multiQueryData
|
|
44410
|
+
}) : "Success";
|
|
44411
|
+
const modalTitlePrepared = modalTitle ? parseAll({ text: modalTitle, replaceValues, multiQueryData }) : "Edit";
|
|
44412
|
+
const modalDescriptionTextPrepared = modalDescriptionText ? parseAll({ text: modalDescriptionText, replaceValues, multiQueryData }) : void 0;
|
|
44413
|
+
const inputLabelPrepared = inputLabel ? parseAll({ text: inputLabel, replaceValues, multiQueryData }) : void 0;
|
|
44414
|
+
const endpointPrepared = endpoint ? parseAll({ text: endpoint, replaceValues, multiQueryData }) : "no-endpoint-provided";
|
|
44415
|
+
const pathToValuePrepared = pathToValue ? parseAll({ text: pathToValue, replaceValues, multiQueryData }) : "no-pathToValue-provided";
|
|
44416
|
+
const linkPrefixPrepared = linkPrefix ? parseAll({ text: linkPrefix, replaceValues, multiQueryData }) : void 0;
|
|
44417
|
+
const openNotificationSuccess = () => {
|
|
44418
|
+
api.success({
|
|
44419
|
+
message: notificationSuccessMessagePrepared,
|
|
44420
|
+
description: notificationSuccessMessageDescriptionPrepared,
|
|
44421
|
+
placement: "bottomRight"
|
|
44422
|
+
});
|
|
44423
|
+
};
|
|
44424
|
+
const EmptySelect = /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: containerStyle, children: [
|
|
44425
|
+
!readOnly && !verticalViewList && /* @__PURE__ */ jsxRuntimeExports.jsx(Flex, { justify: "flex-end", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
44426
|
+
Button,
|
|
44427
|
+
{
|
|
44428
|
+
type: "text",
|
|
44429
|
+
size: "small",
|
|
44430
|
+
onClick: (e) => {
|
|
44431
|
+
e.stopPropagation();
|
|
44432
|
+
setOpen(true);
|
|
44433
|
+
},
|
|
44434
|
+
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(EditIcon, {})
|
|
44435
|
+
}
|
|
44436
|
+
) }),
|
|
44437
|
+
verticalViewList ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: emptyListMessageStyle, children: emptyListMessage }) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
44438
|
+
UncontrolledSelect,
|
|
44439
|
+
{
|
|
44440
|
+
mode: "multiple",
|
|
44441
|
+
...restSelectProps,
|
|
44442
|
+
value: [],
|
|
44443
|
+
options: [],
|
|
44444
|
+
open: false,
|
|
44445
|
+
showSearch: false,
|
|
44446
|
+
removeIcon: () => {
|
|
44447
|
+
return null;
|
|
44448
|
+
},
|
|
44449
|
+
suffixIcon: null,
|
|
44450
|
+
isCursorPointer: true
|
|
44451
|
+
}
|
|
44452
|
+
),
|
|
44453
|
+
!readOnly && verticalViewList && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
44454
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Spacer$1, { $space: 8, $samespace: true }),
|
|
44455
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Flex, { justify: "flex-start", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
44456
|
+
Button,
|
|
44457
|
+
{
|
|
44458
|
+
type: "text",
|
|
44459
|
+
size: "small",
|
|
44460
|
+
onClick: (e) => {
|
|
44461
|
+
e.stopPropagation();
|
|
44462
|
+
setOpen(true);
|
|
44463
|
+
},
|
|
44464
|
+
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(EditIcon, {}),
|
|
44465
|
+
iconPosition: "end",
|
|
44466
|
+
children: "Edit"
|
|
44467
|
+
}
|
|
44468
|
+
) })
|
|
44469
|
+
] }),
|
|
44470
|
+
children,
|
|
44471
|
+
contextHolder,
|
|
44472
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
44473
|
+
LabelsEditModal,
|
|
44474
|
+
{
|
|
44475
|
+
open,
|
|
44476
|
+
close: () => setOpen(false),
|
|
44477
|
+
openNotificationSuccess,
|
|
44478
|
+
modalTitle: modalTitlePrepared,
|
|
44479
|
+
modalDescriptionText: modalDescriptionTextPrepared,
|
|
44480
|
+
inputLabel: inputLabelPrepared,
|
|
44481
|
+
maxEditTagTextLength,
|
|
44482
|
+
allowClearEditSelect,
|
|
44483
|
+
endpoint: endpointPrepared,
|
|
44484
|
+
pathToValue: pathToValuePrepared,
|
|
44485
|
+
editModalWidth,
|
|
44486
|
+
paddingContainerEnd,
|
|
44487
|
+
modalDescriptionTextStyle,
|
|
44488
|
+
inputLabelStyle
|
|
44489
|
+
}
|
|
44490
|
+
)
|
|
44491
|
+
] });
|
|
44492
|
+
if (!labelsRaw) {
|
|
44493
|
+
if (errorArrayOfObjects) {
|
|
44494
|
+
return EmptySelect;
|
|
44495
|
+
}
|
|
44496
|
+
return EmptySelect;
|
|
44497
|
+
}
|
|
44498
|
+
const labels = Object.entries(labelsRaw).map(([key, value]) => `${key}=${value}`);
|
|
44499
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: containerStyle, children: [
|
|
44500
|
+
!readOnly && !verticalViewList && /* @__PURE__ */ jsxRuntimeExports.jsx(Flex, { justify: "flex-end", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
44501
|
+
Button,
|
|
44502
|
+
{
|
|
44503
|
+
type: "text",
|
|
44504
|
+
size: "small",
|
|
44505
|
+
onClick: (e) => {
|
|
44506
|
+
e.stopPropagation();
|
|
44507
|
+
setOpen(true);
|
|
44508
|
+
},
|
|
44509
|
+
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(EditIcon, {})
|
|
44510
|
+
}
|
|
44511
|
+
) }),
|
|
44512
|
+
verticalViewList ? /* @__PURE__ */ jsxRuntimeExports.jsx(Flex, { vertical: true, gap: 8, ...verticalViewListFlexProps, children: labels.map((label) => {
|
|
44513
|
+
let labelToRender = "Not a string value";
|
|
44514
|
+
if (typeof label === "string") {
|
|
44515
|
+
if (maxTagKeyLength || maxTagValueLength) {
|
|
44516
|
+
const splittedLabel = label.split("=");
|
|
44517
|
+
if (splittedLabel[0] && splittedLabel[0].length > 0) {
|
|
44518
|
+
labelToRender = maxTagKeyLength ? truncate$2(splittedLabel[0], maxTagKeyLength) : splittedLabel[0];
|
|
44519
|
+
}
|
|
44520
|
+
labelToRender += "=";
|
|
44521
|
+
if (splittedLabel[1] && splittedLabel[1].length > 0) {
|
|
44522
|
+
labelToRender += maxTagValueLength ? truncate$2(splittedLabel[1], maxTagValueLength) : splittedLabel[1];
|
|
44523
|
+
}
|
|
44524
|
+
} else {
|
|
44525
|
+
labelToRender = truncate$2(label, maxTagTextLength);
|
|
44526
|
+
}
|
|
44527
|
+
}
|
|
44528
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Popover, { content: label, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
44529
|
+
CursorPointerTagMinContent,
|
|
44530
|
+
{
|
|
44531
|
+
onClick: (e) => {
|
|
44532
|
+
if (typeof label === "string" && linkPrefix) {
|
|
44533
|
+
navigate(`${linkPrefixPrepared}${encodeURIComponent(label)}`);
|
|
44534
|
+
}
|
|
44535
|
+
e.stopPropagation();
|
|
44536
|
+
},
|
|
44537
|
+
children: labelToRender
|
|
44538
|
+
}
|
|
44539
|
+
) }, label);
|
|
44540
|
+
}) }) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
44541
|
+
UncontrolledSelect,
|
|
44542
|
+
{
|
|
44543
|
+
mode: "multiple",
|
|
44544
|
+
...restSelectProps,
|
|
44545
|
+
value: labels.map((el) => ({ label: el, value: el })),
|
|
44546
|
+
options: labels.map((el) => ({ label: el, value: el })),
|
|
44547
|
+
open: false,
|
|
44548
|
+
showSearch: false,
|
|
44549
|
+
removeIcon: () => {
|
|
44550
|
+
return null;
|
|
44551
|
+
},
|
|
44552
|
+
suffixIcon: null,
|
|
44553
|
+
tagRender: ({ label }) => {
|
|
44554
|
+
let labelToRender = "Not a string value";
|
|
44555
|
+
if (typeof label === "string") {
|
|
44556
|
+
if (maxTagKeyLength || maxTagValueLength) {
|
|
44557
|
+
const splittedLabel = label.split("=");
|
|
44558
|
+
if (splittedLabel[0] && splittedLabel[0].length > 0) {
|
|
44559
|
+
labelToRender = maxTagKeyLength ? truncate$2(splittedLabel[0], maxTagKeyLength) : splittedLabel[0];
|
|
44560
|
+
}
|
|
44561
|
+
labelToRender += "=";
|
|
44562
|
+
if (splittedLabel[1] && splittedLabel[1].length > 0) {
|
|
44563
|
+
labelToRender += maxTagValueLength ? truncate$2(splittedLabel[1], maxTagValueLength) : splittedLabel[1];
|
|
44564
|
+
}
|
|
44565
|
+
} else {
|
|
44566
|
+
labelToRender = truncate$2(label, maxTagTextLength);
|
|
44567
|
+
}
|
|
44568
|
+
}
|
|
44569
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Popover, { content: label, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
44570
|
+
CursorPointerTag,
|
|
44571
|
+
{
|
|
44572
|
+
onClick: (e) => {
|
|
44573
|
+
if (typeof label === "string" && linkPrefix) {
|
|
44574
|
+
navigate(`${linkPrefixPrepared}${encodeURIComponent(label)}`);
|
|
44575
|
+
}
|
|
44576
|
+
e.stopPropagation();
|
|
44577
|
+
},
|
|
44578
|
+
children: labelToRender
|
|
44579
|
+
}
|
|
44580
|
+
) });
|
|
44581
|
+
}
|
|
44582
|
+
}
|
|
44583
|
+
),
|
|
44584
|
+
!readOnly && verticalViewList && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
44585
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Spacer$1, { $space: 8, $samespace: true }),
|
|
44586
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Flex, { justify: "flex-start", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
44587
|
+
Button,
|
|
44588
|
+
{
|
|
44589
|
+
type: "text",
|
|
44590
|
+
size: "small",
|
|
44591
|
+
onClick: (e) => {
|
|
44592
|
+
e.stopPropagation();
|
|
44593
|
+
setOpen(true);
|
|
44594
|
+
},
|
|
44595
|
+
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(EditIcon, {}),
|
|
44596
|
+
iconPosition: "end",
|
|
44597
|
+
children: "Edit"
|
|
44598
|
+
}
|
|
44599
|
+
) })
|
|
44600
|
+
] }),
|
|
44601
|
+
children,
|
|
44602
|
+
contextHolder,
|
|
44603
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
44604
|
+
LabelsEditModal,
|
|
44605
|
+
{
|
|
44606
|
+
open,
|
|
44607
|
+
close: () => setOpen(false),
|
|
44608
|
+
values: labelsRaw,
|
|
44609
|
+
openNotificationSuccess,
|
|
44610
|
+
modalTitle: modalTitlePrepared,
|
|
44611
|
+
modalDescriptionText: modalDescriptionTextPrepared,
|
|
44612
|
+
inputLabel: inputLabelPrepared,
|
|
44613
|
+
maxEditTagTextLength,
|
|
44614
|
+
allowClearEditSelect,
|
|
44615
|
+
endpoint: endpointPrepared,
|
|
44616
|
+
pathToValue: pathToValuePrepared,
|
|
44617
|
+
editModalWidth,
|
|
44618
|
+
paddingContainerEnd,
|
|
44619
|
+
modalDescriptionTextStyle,
|
|
44620
|
+
inputLabelStyle
|
|
44621
|
+
}
|
|
44622
|
+
)
|
|
44623
|
+
] });
|
|
44624
|
+
};
|
|
44625
|
+
|
|
44626
|
+
const isRecordStringNumber = (value) => typeof value === "object" && value !== null && !Array.isArray(value) && Object.entries(value).every(([k, v]) => typeof k === "string" && (typeof v === "string" || typeof v === "number"));
|
|
44627
|
+
const parseArrayOfAny = (value) => {
|
|
44628
|
+
if (!Array.isArray(value)) {
|
|
44629
|
+
return { error: "Value on jsonPath is not an array" };
|
|
44630
|
+
}
|
|
44631
|
+
if (isRecordStringNumber(value[0])) {
|
|
44632
|
+
return { data: value[0] };
|
|
44633
|
+
}
|
|
44634
|
+
return { error: "Value on jsonPath is not a record array" };
|
|
44635
|
+
};
|
|
44636
|
+
const truncate$1 = (text, max) => {
|
|
44637
|
+
if (!max) {
|
|
44638
|
+
return text;
|
|
44639
|
+
}
|
|
44640
|
+
return text.length > max ? text.slice(0, max) + "..." : text;
|
|
44641
|
+
};
|
|
44642
|
+
|
|
44643
|
+
const LabelsToSearchParams = ({ data, children }) => {
|
|
44644
|
+
const {
|
|
44645
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
44646
|
+
id,
|
|
44647
|
+
reqIndex,
|
|
44648
|
+
jsonPathToLabels,
|
|
44649
|
+
linkPrefix,
|
|
44650
|
+
textLink,
|
|
44651
|
+
errorText,
|
|
44652
|
+
maxTextLength,
|
|
44653
|
+
...linkProps
|
|
44654
|
+
} = data;
|
|
44655
|
+
const { data: multiQueryData, isLoading: isMultiQueryLoading, isError: isMultiQueryErrors, errors } = useMultiQuery();
|
|
44656
|
+
const partsOfUrl = usePartsOfUrl();
|
|
44657
|
+
if (isMultiQueryLoading) {
|
|
44658
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading..." });
|
|
44659
|
+
}
|
|
44660
|
+
if (isMultiQueryErrors) {
|
|
44661
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
44662
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("h4", { children: "Errors:" }),
|
|
44663
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("ul", { children: errors.map((e, i) => e && /* @__PURE__ */ jsxRuntimeExports.jsx("li", { children: typeof e === "string" ? e : e.message }, i)) })
|
|
44664
|
+
] });
|
|
44665
|
+
}
|
|
44666
|
+
const replaceValues = partsOfUrl.partsOfUrl.reduce((acc, value, index) => {
|
|
44667
|
+
acc[index.toString()] = value;
|
|
44668
|
+
return acc;
|
|
44669
|
+
}, {});
|
|
44670
|
+
const jsonRoot = multiQueryData[`req${reqIndex}`];
|
|
44671
|
+
if (jsonRoot === void 0) {
|
|
44672
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "No root for json path" });
|
|
44673
|
+
}
|
|
44674
|
+
const anythingForNow = jp.query(jsonRoot || {}, `$${jsonPathToLabels}`);
|
|
44675
|
+
const { data: labelsRaw, error: errorArrayOfObjects } = parseArrayOfAny(anythingForNow);
|
|
44676
|
+
const linkPrefixPrepared = parseAll({ text: linkPrefix, replaceValues, multiQueryData });
|
|
44677
|
+
if (!labelsRaw) {
|
|
44678
|
+
if (errorArrayOfObjects) {
|
|
44679
|
+
console.log(errorArrayOfObjects);
|
|
44680
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Typography.Link, { href: linkPrefixPrepared, ...linkProps, children: [
|
|
44681
|
+
errorText,
|
|
44682
|
+
children
|
|
44683
|
+
] });
|
|
44791
44684
|
}
|
|
44685
|
+
console.log("Not a valid data structure");
|
|
44686
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Typography.Link, { href: linkPrefixPrepared, ...linkProps, children: [
|
|
44687
|
+
errorText,
|
|
44688
|
+
children
|
|
44689
|
+
] });
|
|
44792
44690
|
}
|
|
44691
|
+
const labels = Object.entries(labelsRaw).map(([key, value]) => `${key}=${value}`).join(",");
|
|
44692
|
+
const labelsEncoded = encodeURIComponent(labels);
|
|
44693
|
+
const hrefPrepared = `${linkPrefixPrepared}${labelsEncoded}`;
|
|
44694
|
+
if (maxTextLength && !textLink) {
|
|
44695
|
+
const truncatedLabels = maxTextLength ? truncate$1(labels, maxTextLength) : labels;
|
|
44696
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
44697
|
+
Popover,
|
|
44698
|
+
{
|
|
44699
|
+
content: /* @__PURE__ */ jsxRuntimeExports.jsx(Flex, { vertical: true, gap: 8, children: Object.entries(labelsRaw).map(([key, value]) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: `${key}=${value}` }, key)) }),
|
|
44700
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Typography.Link, { href: hrefPrepared, ...linkProps, children: [
|
|
44701
|
+
truncatedLabels,
|
|
44702
|
+
children
|
|
44703
|
+
] })
|
|
44704
|
+
}
|
|
44705
|
+
);
|
|
44706
|
+
}
|
|
44707
|
+
if (textLink) {
|
|
44708
|
+
const truncatedTextLink = maxTextLength ? truncate$1(textLink, maxTextLength) : textLink;
|
|
44709
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
44710
|
+
Popover,
|
|
44711
|
+
{
|
|
44712
|
+
content: /* @__PURE__ */ jsxRuntimeExports.jsx(Flex, { vertical: true, gap: 8, children: Object.entries(labelsRaw).map(([key, value]) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: `${key}=${value}` }, key)) }),
|
|
44713
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Typography.Link, { href: hrefPrepared, ...linkProps, children: [
|
|
44714
|
+
truncatedTextLink,
|
|
44715
|
+
children
|
|
44716
|
+
] })
|
|
44717
|
+
}
|
|
44718
|
+
);
|
|
44719
|
+
}
|
|
44720
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Typography.Link, { href: hrefPrepared, ...linkProps, children: [
|
|
44721
|
+
textLink || labels,
|
|
44722
|
+
children
|
|
44723
|
+
] });
|
|
44724
|
+
};
|
|
44725
|
+
|
|
44726
|
+
const flattenOnce$1 = (arr) => arr.reduce((acc, row) => [...acc, ...row], []);
|
|
44727
|
+
const ALLOWED_EFFECTS$1 = /* @__PURE__ */ new Set(["NoSchedule", "PreferNoSchedule", "NoExecute"]);
|
|
44728
|
+
const isTaintLike = (x) => {
|
|
44729
|
+
if (x === null || typeof x !== "object" || Array.isArray(x)) return false;
|
|
44730
|
+
const o = x;
|
|
44731
|
+
if (typeof o.effect !== "string" || !ALLOWED_EFFECTS$1.has(o.effect)) return false;
|
|
44732
|
+
if ("key" in o && typeof o.key !== "string") return false;
|
|
44733
|
+
if ("value" in o && typeof o.value !== "string") return false;
|
|
44793
44734
|
return true;
|
|
44794
44735
|
};
|
|
44795
|
-
const
|
|
44736
|
+
const filterTaintLikes = (input) => {
|
|
44796
44737
|
if (!Array.isArray(input)) return [];
|
|
44797
|
-
return input.filter(
|
|
44738
|
+
return input.filter(isTaintLike);
|
|
44798
44739
|
};
|
|
44799
|
-
const getItemsInside$
|
|
44740
|
+
const getItemsInside$2 = (value) => {
|
|
44800
44741
|
if (!Array.isArray(value)) {
|
|
44801
44742
|
return { error: "Value on jsonPath is not an array" };
|
|
44802
44743
|
}
|
|
44803
44744
|
let flattenArrayOfUnknown = [];
|
|
44804
44745
|
try {
|
|
44805
|
-
flattenArrayOfUnknown = flattenOnce(value);
|
|
44746
|
+
flattenArrayOfUnknown = flattenOnce$1(value);
|
|
44806
44747
|
} catch (e) {
|
|
44807
44748
|
console.log(e);
|
|
44808
44749
|
return { error: "Error while flattening" };
|
|
44809
44750
|
}
|
|
44810
|
-
return { counter: flattenArrayOfUnknown.length,
|
|
44751
|
+
return { counter: flattenArrayOfUnknown.length, taints: filterTaintLikes(flattenArrayOfUnknown) };
|
|
44811
44752
|
};
|
|
44812
44753
|
|
|
44813
|
-
const
|
|
44814
|
-
data,
|
|
44815
|
-
children
|
|
44816
|
-
}) => {
|
|
44754
|
+
const Taints = ({ data, children }) => {
|
|
44817
44755
|
const {
|
|
44818
44756
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
44819
44757
|
id,
|
|
@@ -44821,6 +44759,7 @@ const Tolerations = ({
|
|
|
44821
44759
|
jsonPathToArray,
|
|
44822
44760
|
text,
|
|
44823
44761
|
errorText,
|
|
44762
|
+
style,
|
|
44824
44763
|
notificationSuccessMessage,
|
|
44825
44764
|
notificationSuccessMessageDescription,
|
|
44826
44765
|
modalTitle,
|
|
@@ -44854,10 +44793,10 @@ const Tolerations = ({
|
|
|
44854
44793
|
const jsonRoot = multiQueryData[`req${reqIndex}`];
|
|
44855
44794
|
if (jsonRoot === void 0) {
|
|
44856
44795
|
console.log(`Item Counter: ${id}: No root for json path`);
|
|
44857
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("
|
|
44796
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style, children: errorText });
|
|
44858
44797
|
}
|
|
44859
44798
|
const anythingForNow = jp.query(jsonRoot || {}, `$${jsonPathToArray}`);
|
|
44860
|
-
const { counter,
|
|
44799
|
+
const { counter, taints, error: errorArrayOfObjects } = getItemsInside$2(anythingForNow);
|
|
44861
44800
|
const notificationSuccessMessagePrepared = notificationSuccessMessage ? parseAll({
|
|
44862
44801
|
text: notificationSuccessMessage,
|
|
44863
44802
|
replaceValues,
|
|
@@ -44885,6 +44824,7 @@ const Tolerations = ({
|
|
|
44885
44824
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
44886
44825
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: containerStyle, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { align: "center", gap: 8, children: [
|
|
44887
44826
|
errorText,
|
|
44827
|
+
" ",
|
|
44888
44828
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
44889
44829
|
Button,
|
|
44890
44830
|
{
|
|
@@ -44900,11 +44840,11 @@ const Tolerations = ({
|
|
|
44900
44840
|
] }) }),
|
|
44901
44841
|
contextHolder,
|
|
44902
44842
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
44903
|
-
|
|
44843
|
+
TaintsEditModal,
|
|
44904
44844
|
{
|
|
44905
44845
|
open,
|
|
44906
44846
|
close: () => setOpen(false),
|
|
44907
|
-
values:
|
|
44847
|
+
values: taints,
|
|
44908
44848
|
openNotificationSuccess,
|
|
44909
44849
|
modalTitle: modalTitlePrepared,
|
|
44910
44850
|
modalDescriptionText: modalDescriptionTextPrepared,
|
|
@@ -44942,11 +44882,11 @@ const Tolerations = ({
|
|
|
44942
44882
|
] }),
|
|
44943
44883
|
contextHolder,
|
|
44944
44884
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
44945
|
-
|
|
44885
|
+
TaintsEditModal,
|
|
44946
44886
|
{
|
|
44947
44887
|
open,
|
|
44948
44888
|
close: () => setOpen(false),
|
|
44949
|
-
values:
|
|
44889
|
+
values: taints,
|
|
44950
44890
|
openNotificationSuccess,
|
|
44951
44891
|
modalTitle: modalTitlePrepared,
|
|
44952
44892
|
modalDescriptionText: modalDescriptionTextPrepared,
|
|
@@ -44962,119 +44902,194 @@ const Tolerations = ({
|
|
|
44962
44902
|
] });
|
|
44963
44903
|
};
|
|
44964
44904
|
|
|
44965
|
-
const
|
|
44966
|
-
|
|
44967
|
-
|
|
44968
|
-
const
|
|
44969
|
-
|
|
44905
|
+
const flattenOnce = (arr) => arr.reduce((acc, row) => [...acc, ...row], []);
|
|
44906
|
+
const ALLOWED_OPERATORS = /* @__PURE__ */ new Set(["Exists", "Equal"]);
|
|
44907
|
+
const ALLOWED_EFFECTS = /* @__PURE__ */ new Set(["NoSchedule", "PreferNoSchedule", "NoExecute"]);
|
|
44908
|
+
const isToleration = (x) => {
|
|
44909
|
+
if (x === null || typeof x !== "object" || Array.isArray(x)) return false;
|
|
44910
|
+
const o = x;
|
|
44911
|
+
if ("key" in o && typeof o.key !== "string") return false;
|
|
44912
|
+
if ("value" in o && typeof o.value !== "string") return false;
|
|
44913
|
+
if ("operator" in o) {
|
|
44914
|
+
if (typeof o.operator !== "string" || !ALLOWED_OPERATORS.has(o.operator)) {
|
|
44915
|
+
return false;
|
|
44916
|
+
}
|
|
44917
|
+
}
|
|
44918
|
+
if ("effect" in o) {
|
|
44919
|
+
if (typeof o.effect !== "string" || !ALLOWED_EFFECTS.has(o.effect)) {
|
|
44920
|
+
return false;
|
|
44921
|
+
}
|
|
44922
|
+
}
|
|
44923
|
+
return true;
|
|
44924
|
+
};
|
|
44925
|
+
const filterTolerations = (input) => {
|
|
44926
|
+
if (!Array.isArray(input)) return [];
|
|
44927
|
+
return input.filter(isToleration);
|
|
44928
|
+
};
|
|
44929
|
+
const getItemsInside$1 = (value) => {
|
|
44930
|
+
if (!Array.isArray(value)) {
|
|
44931
|
+
return { error: "Value on jsonPath is not an array" };
|
|
44932
|
+
}
|
|
44933
|
+
let flattenArrayOfUnknown = [];
|
|
44934
|
+
try {
|
|
44935
|
+
flattenArrayOfUnknown = flattenOnce(value);
|
|
44936
|
+
} catch (e) {
|
|
44937
|
+
console.log(e);
|
|
44938
|
+
return { error: "Error while flattening" };
|
|
44939
|
+
}
|
|
44940
|
+
return { counter: flattenArrayOfUnknown.length, tolerations: filterTolerations(flattenArrayOfUnknown) };
|
|
44970
44941
|
};
|
|
44971
44942
|
|
|
44972
|
-
const
|
|
44973
|
-
|
|
44974
|
-
|
|
44975
|
-
values,
|
|
44976
|
-
openNotificationSuccess,
|
|
44977
|
-
modalTitle,
|
|
44978
|
-
modalDescriptionText,
|
|
44979
|
-
inputLabel,
|
|
44980
|
-
endpoint,
|
|
44981
|
-
pathToValue,
|
|
44982
|
-
editModalWidth,
|
|
44983
|
-
cols,
|
|
44984
|
-
modalDescriptionTextStyle,
|
|
44985
|
-
inputLabelStyle
|
|
44943
|
+
const Tolerations = ({
|
|
44944
|
+
data,
|
|
44945
|
+
children
|
|
44986
44946
|
}) => {
|
|
44987
|
-
const
|
|
44988
|
-
|
|
44989
|
-
|
|
44990
|
-
|
|
44991
|
-
|
|
44992
|
-
|
|
44993
|
-
|
|
44994
|
-
|
|
44995
|
-
|
|
44996
|
-
|
|
44997
|
-
|
|
44998
|
-
|
|
44999
|
-
|
|
45000
|
-
|
|
45001
|
-
|
|
45002
|
-
|
|
45003
|
-
|
|
45004
|
-
|
|
45005
|
-
|
|
45006
|
-
|
|
45007
|
-
|
|
45008
|
-
|
|
45009
|
-
|
|
45010
|
-
|
|
45011
|
-
|
|
45012
|
-
|
|
45013
|
-
|
|
45014
|
-
|
|
45015
|
-
|
|
45016
|
-
|
|
45017
|
-
|
|
45018
|
-
|
|
45019
|
-
|
|
45020
|
-
|
|
45021
|
-
|
|
45022
|
-
|
|
45023
|
-
|
|
44947
|
+
const {
|
|
44948
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
44949
|
+
id,
|
|
44950
|
+
reqIndex,
|
|
44951
|
+
jsonPathToArray,
|
|
44952
|
+
text,
|
|
44953
|
+
errorText,
|
|
44954
|
+
notificationSuccessMessage,
|
|
44955
|
+
notificationSuccessMessageDescription,
|
|
44956
|
+
modalTitle,
|
|
44957
|
+
modalDescriptionText,
|
|
44958
|
+
modalDescriptionTextStyle,
|
|
44959
|
+
inputLabel,
|
|
44960
|
+
inputLabelStyle,
|
|
44961
|
+
containerStyle,
|
|
44962
|
+
endpoint,
|
|
44963
|
+
pathToValue,
|
|
44964
|
+
editModalWidth,
|
|
44965
|
+
cols
|
|
44966
|
+
} = data;
|
|
44967
|
+
const [api, contextHolder] = notification.useNotification();
|
|
44968
|
+
const [open, setOpen] = useState(false);
|
|
44969
|
+
const { data: multiQueryData, isLoading: isMultiQueryLoading, isError: isMultiQueryErrors, errors } = useMultiQuery();
|
|
44970
|
+
const partsOfUrl = usePartsOfUrl();
|
|
44971
|
+
if (isMultiQueryLoading) {
|
|
44972
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading..." });
|
|
44973
|
+
}
|
|
44974
|
+
if (isMultiQueryErrors) {
|
|
44975
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
44976
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("h4", { children: "Errors:" }),
|
|
44977
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("ul", { children: errors.map((e, i) => e && /* @__PURE__ */ jsxRuntimeExports.jsx("li", { children: typeof e === "string" ? e : e.message }, i)) })
|
|
44978
|
+
] });
|
|
44979
|
+
}
|
|
44980
|
+
const replaceValues = partsOfUrl.partsOfUrl.reduce((acc, value, index) => {
|
|
44981
|
+
acc[index.toString()] = value;
|
|
44982
|
+
return acc;
|
|
44983
|
+
}, {});
|
|
44984
|
+
const jsonRoot = multiQueryData[`req${reqIndex}`];
|
|
44985
|
+
if (jsonRoot === void 0) {
|
|
44986
|
+
console.log(`Item Counter: ${id}: No root for json path`);
|
|
44987
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: containerStyle, children: errorText });
|
|
44988
|
+
}
|
|
44989
|
+
const anythingForNow = jp.query(jsonRoot || {}, `$${jsonPathToArray}`);
|
|
44990
|
+
const { counter, tolerations, error: errorArrayOfObjects } = getItemsInside$1(anythingForNow);
|
|
44991
|
+
const notificationSuccessMessagePrepared = notificationSuccessMessage ? parseAll({
|
|
44992
|
+
text: notificationSuccessMessage,
|
|
44993
|
+
replaceValues,
|
|
44994
|
+
multiQueryData
|
|
44995
|
+
}) : "Success";
|
|
44996
|
+
const notificationSuccessMessageDescriptionPrepared = notificationSuccessMessageDescription ? parseAll({
|
|
44997
|
+
text: notificationSuccessMessageDescription,
|
|
44998
|
+
replaceValues,
|
|
44999
|
+
multiQueryData
|
|
45000
|
+
}) : "Success";
|
|
45001
|
+
const modalTitlePrepared = modalTitle ? parseAll({ text: modalTitle, replaceValues, multiQueryData }) : "Edit";
|
|
45002
|
+
const modalDescriptionTextPrepared = modalDescriptionText ? parseAll({ text: modalDescriptionText, replaceValues, multiQueryData }) : void 0;
|
|
45003
|
+
const inputLabelPrepared = inputLabel ? parseAll({ text: inputLabel, replaceValues, multiQueryData }) : void 0;
|
|
45004
|
+
const endpointPrepared = endpoint ? parseAll({ text: endpoint, replaceValues, multiQueryData }) : "no-endpoint-provided";
|
|
45005
|
+
const pathToValuePrepared = pathToValue ? parseAll({ text: pathToValue, replaceValues, multiQueryData }) : "no-pathToValue-provided";
|
|
45006
|
+
const openNotificationSuccess = () => {
|
|
45007
|
+
api.success({
|
|
45008
|
+
message: notificationSuccessMessagePrepared,
|
|
45009
|
+
description: notificationSuccessMessageDescriptionPrepared,
|
|
45010
|
+
placement: "bottomRight"
|
|
45011
|
+
});
|
|
45024
45012
|
};
|
|
45025
|
-
|
|
45026
|
-
|
|
45027
|
-
{
|
|
45028
|
-
|
|
45029
|
-
|
|
45030
|
-
|
|
45031
|
-
|
|
45032
|
-
|
|
45033
|
-
|
|
45034
|
-
|
|
45035
|
-
|
|
45036
|
-
|
|
45037
|
-
|
|
45038
|
-
|
|
45039
|
-
|
|
45040
|
-
|
|
45041
|
-
|
|
45042
|
-
|
|
45043
|
-
|
|
45044
|
-
|
|
45045
|
-
|
|
45046
|
-
|
|
45047
|
-
|
|
45048
|
-
|
|
45049
|
-
|
|
45050
|
-
|
|
45051
|
-
|
|
45052
|
-
|
|
45053
|
-
|
|
45054
|
-
|
|
45055
|
-
|
|
45056
|
-
|
|
45057
|
-
|
|
45058
|
-
|
|
45059
|
-
|
|
45060
|
-
|
|
45061
|
-
|
|
45062
|
-
|
|
45063
|
-
|
|
45064
|
-
|
|
45065
|
-
|
|
45066
|
-
|
|
45067
|
-
|
|
45068
|
-
|
|
45069
|
-
|
|
45070
|
-
|
|
45071
|
-
|
|
45072
|
-
|
|
45073
|
-
|
|
45074
|
-
|
|
45075
|
-
|
|
45076
|
-
|
|
45077
|
-
|
|
45013
|
+
if (errorArrayOfObjects) {
|
|
45014
|
+
console.log(`Item Counter: ${id}: ${errorArrayOfObjects}`);
|
|
45015
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
45016
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: containerStyle, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { align: "center", gap: 8, children: [
|
|
45017
|
+
errorText,
|
|
45018
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
45019
|
+
Button,
|
|
45020
|
+
{
|
|
45021
|
+
type: "text",
|
|
45022
|
+
size: "small",
|
|
45023
|
+
onClick: (e) => {
|
|
45024
|
+
e.stopPropagation();
|
|
45025
|
+
setOpen(true);
|
|
45026
|
+
},
|
|
45027
|
+
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(EditIcon, {})
|
|
45028
|
+
}
|
|
45029
|
+
)
|
|
45030
|
+
] }) }),
|
|
45031
|
+
contextHolder,
|
|
45032
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
45033
|
+
TolerationsEditModal,
|
|
45034
|
+
{
|
|
45035
|
+
open,
|
|
45036
|
+
close: () => setOpen(false),
|
|
45037
|
+
values: tolerations,
|
|
45038
|
+
openNotificationSuccess,
|
|
45039
|
+
modalTitle: modalTitlePrepared,
|
|
45040
|
+
modalDescriptionText: modalDescriptionTextPrepared,
|
|
45041
|
+
inputLabel: inputLabelPrepared,
|
|
45042
|
+
endpoint: endpointPrepared,
|
|
45043
|
+
pathToValue: pathToValuePrepared,
|
|
45044
|
+
editModalWidth,
|
|
45045
|
+
cols,
|
|
45046
|
+
modalDescriptionTextStyle,
|
|
45047
|
+
inputLabelStyle
|
|
45048
|
+
}
|
|
45049
|
+
)
|
|
45050
|
+
] });
|
|
45051
|
+
}
|
|
45052
|
+
const parsedText = parseAll({ text, replaceValues, multiQueryData });
|
|
45053
|
+
const parsedTextWithCounter = parsedText.replace("~counter~", String(counter || 0));
|
|
45054
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
45055
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: containerStyle, children: [
|
|
45056
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { align: "center", gap: 8, children: [
|
|
45057
|
+
parsedTextWithCounter,
|
|
45058
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
45059
|
+
Button,
|
|
45060
|
+
{
|
|
45061
|
+
type: "text",
|
|
45062
|
+
size: "small",
|
|
45063
|
+
onClick: (e) => {
|
|
45064
|
+
e.stopPropagation();
|
|
45065
|
+
setOpen(true);
|
|
45066
|
+
},
|
|
45067
|
+
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(EditIcon, {})
|
|
45068
|
+
}
|
|
45069
|
+
)
|
|
45070
|
+
] }),
|
|
45071
|
+
children
|
|
45072
|
+
] }),
|
|
45073
|
+
contextHolder,
|
|
45074
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
45075
|
+
TolerationsEditModal,
|
|
45076
|
+
{
|
|
45077
|
+
open,
|
|
45078
|
+
close: () => setOpen(false),
|
|
45079
|
+
values: tolerations,
|
|
45080
|
+
openNotificationSuccess,
|
|
45081
|
+
modalTitle: modalTitlePrepared,
|
|
45082
|
+
modalDescriptionText: modalDescriptionTextPrepared,
|
|
45083
|
+
inputLabel: inputLabelPrepared,
|
|
45084
|
+
endpoint: endpointPrepared,
|
|
45085
|
+
pathToValue: pathToValuePrepared,
|
|
45086
|
+
editModalWidth,
|
|
45087
|
+
cols,
|
|
45088
|
+
modalDescriptionTextStyle,
|
|
45089
|
+
inputLabelStyle
|
|
45090
|
+
}
|
|
45091
|
+
)
|
|
45092
|
+
] });
|
|
45078
45093
|
};
|
|
45079
45094
|
|
|
45080
45095
|
const isObject$2 = (x) => typeof x === "object" && x !== null;
|
|
@@ -45181,7 +45196,7 @@ const Annotations = ({
|
|
|
45181
45196
|
] }) }),
|
|
45182
45197
|
contextHolder,
|
|
45183
45198
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
45184
|
-
|
|
45199
|
+
AnnotationsEditModal,
|
|
45185
45200
|
{
|
|
45186
45201
|
open,
|
|
45187
45202
|
close: () => setOpen(false),
|
|
@@ -45223,7 +45238,7 @@ const Annotations = ({
|
|
|
45223
45238
|
] }),
|
|
45224
45239
|
contextHolder,
|
|
45225
45240
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
45226
|
-
|
|
45241
|
+
AnnotationsEditModal,
|
|
45227
45242
|
{
|
|
45228
45243
|
open,
|
|
45229
45244
|
close: () => setOpen(false),
|
|
@@ -46204,7 +46219,7 @@ const NotificationOverrides = createGlobalStyle`
|
|
|
46204
46219
|
margin-bottom: 0 !important;
|
|
46205
46220
|
}
|
|
46206
46221
|
`;
|
|
46207
|
-
const Styled$
|
|
46222
|
+
const Styled$o = {
|
|
46208
46223
|
NoSelect,
|
|
46209
46224
|
DisabledInput,
|
|
46210
46225
|
NotificationOverrides
|
|
@@ -46270,10 +46285,10 @@ const SecretBase64Plain = ({ data }) => {
|
|
|
46270
46285
|
}
|
|
46271
46286
|
};
|
|
46272
46287
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: containerStyle, children: [
|
|
46273
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
46288
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$o.NotificationOverrides, {}),
|
|
46274
46289
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { gap: 8, ...flexProps, children: [
|
|
46275
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
46276
|
-
Styled$
|
|
46290
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$o.NoSelect, { style: inputContainerStyle, children: niceLooking ? /* @__PURE__ */ jsxRuntimeExports.jsx(te, { theme, hidden, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
46291
|
+
Styled$o.DisabledInput,
|
|
46277
46292
|
{
|
|
46278
46293
|
$hidden: hidden,
|
|
46279
46294
|
ref: inputRef,
|
|
@@ -46288,7 +46303,7 @@ const SecretBase64Plain = ({ data }) => {
|
|
|
46288
46303
|
value: decodedText
|
|
46289
46304
|
}
|
|
46290
46305
|
) }) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
46291
|
-
Styled$
|
|
46306
|
+
Styled$o.DisabledInput,
|
|
46292
46307
|
{
|
|
46293
46308
|
$hidden: hidden,
|
|
46294
46309
|
ref: inputRef,
|
|
@@ -46322,7 +46337,7 @@ const RoundSpan = styled.span`
|
|
|
46322
46337
|
letter-spacing: 0.02em;
|
|
46323
46338
|
box-sizing: content-box;
|
|
46324
46339
|
`;
|
|
46325
|
-
const Styled$
|
|
46340
|
+
const Styled$n = {
|
|
46326
46341
|
RoundSpan
|
|
46327
46342
|
};
|
|
46328
46343
|
|
|
@@ -46361,7 +46376,7 @@ const ResourceBadge = ({ data }) => {
|
|
|
46361
46376
|
multiQueryData
|
|
46362
46377
|
}) : getUppercase(parsedValue);
|
|
46363
46378
|
const bgColor = hslFromString(parsedValue, theme);
|
|
46364
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
46379
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$n.RoundSpan, { $bgColor: bgColor, style, children: parsedAbbreviation });
|
|
46365
46380
|
};
|
|
46366
46381
|
|
|
46367
46382
|
const serializeLabelsWithNoEncoding = (input) => {
|
|
@@ -47003,7 +47018,7 @@ const TogglerSegmented = ({
|
|
|
47003
47018
|
const pathToValuePrepared = pathToValue ? parseAll({ text: pathToValue, replaceValues, multiQueryData }) : "no-pathToValue-provided";
|
|
47004
47019
|
const onChange = (renderedValue) => {
|
|
47005
47020
|
const valueFromMap = valuesMap?.find((el) => el.renderedValue === renderedValue)?.value;
|
|
47006
|
-
const valueToSend = valueFromMap
|
|
47021
|
+
const valueToSend = valueFromMap ?? renderedValue;
|
|
47007
47022
|
patchEntryWithReplaceOp({
|
|
47008
47023
|
endpoint: endpointPrepared,
|
|
47009
47024
|
pathToValue: pathToValuePrepared,
|
|
@@ -76073,7 +76088,8 @@ const MatrixToTableRows = ({
|
|
|
76073
76088
|
refetchInterval,
|
|
76074
76089
|
title = "Memory usage (min / max / current)",
|
|
76075
76090
|
formatValue,
|
|
76076
|
-
formatTimestamp: formatTimestamp$1
|
|
76091
|
+
formatTimestamp: formatTimestamp$1,
|
|
76092
|
+
tableColumns
|
|
76077
76093
|
}) => {
|
|
76078
76094
|
const {
|
|
76079
76095
|
data: series = [],
|
|
@@ -76090,11 +76106,15 @@ const MatrixToTableRows = ({
|
|
|
76090
76106
|
const pts = s.data ?? [];
|
|
76091
76107
|
let min = null;
|
|
76092
76108
|
let max = null;
|
|
76109
|
+
let sum = 0;
|
|
76110
|
+
let count = 0;
|
|
76093
76111
|
let current = null;
|
|
76094
76112
|
let currentTs = null;
|
|
76095
76113
|
for (const p of pts) {
|
|
76096
76114
|
const v = Number(p.value);
|
|
76097
76115
|
if (!Number.isFinite(v)) continue;
|
|
76116
|
+
sum += v;
|
|
76117
|
+
count += 1;
|
|
76098
76118
|
if (min == null || v < min) min = v;
|
|
76099
76119
|
if (max == null || v > max) max = v;
|
|
76100
76120
|
if (currentTs == null || p.timestamp > currentTs) {
|
|
@@ -76108,6 +76128,7 @@ const MatrixToTableRows = ({
|
|
|
76108
76128
|
metric: s.metric ?? {},
|
|
76109
76129
|
min,
|
|
76110
76130
|
max,
|
|
76131
|
+
mean: count > 0 ? sum / count : null,
|
|
76111
76132
|
current,
|
|
76112
76133
|
currentTs
|
|
76113
76134
|
};
|
|
@@ -76115,9 +76136,16 @@ const MatrixToTableRows = ({
|
|
|
76115
76136
|
}, [series]);
|
|
76116
76137
|
const valueFormatter = formatValue ?? formatBytes;
|
|
76117
76138
|
const timestampFormatter = formatTimestamp$1 ?? formatTimestamp;
|
|
76118
|
-
const
|
|
76119
|
-
|
|
76120
|
-
|
|
76139
|
+
const showSeries = tableColumns?.series !== false;
|
|
76140
|
+
const showMin = tableColumns?.min !== false;
|
|
76141
|
+
const showMax = tableColumns?.max !== false;
|
|
76142
|
+
const showMean = tableColumns?.mean === true;
|
|
76143
|
+
const showCurrent = tableColumns?.current !== false;
|
|
76144
|
+
const showCurrentTs = tableColumns?.currentTs !== false;
|
|
76145
|
+
const columns = useMemo(() => {
|
|
76146
|
+
const cols = [];
|
|
76147
|
+
if (showSeries) {
|
|
76148
|
+
cols.push({
|
|
76121
76149
|
title: "Series",
|
|
76122
76150
|
dataIndex: "id",
|
|
76123
76151
|
key: "id",
|
|
@@ -76127,8 +76155,10 @@ const MatrixToTableRows = ({
|
|
|
76127
76155
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { strong: true, children: row.id }) });
|
|
76128
76156
|
},
|
|
76129
76157
|
sorter: (a, b) => a.id.localeCompare(b.id)
|
|
76130
|
-
}
|
|
76131
|
-
|
|
76158
|
+
});
|
|
76159
|
+
}
|
|
76160
|
+
if (showMin) {
|
|
76161
|
+
cols.push({
|
|
76132
76162
|
title: "Min",
|
|
76133
76163
|
dataIndex: "min",
|
|
76134
76164
|
key: "min",
|
|
@@ -76136,16 +76166,30 @@ const MatrixToTableRows = ({
|
|
|
76136
76166
|
render: (v) => v == null ? "-" : valueFormatter(v),
|
|
76137
76167
|
sorter: (a, b) => (a.min ?? -Infinity) - (b.min ?? -Infinity),
|
|
76138
76168
|
defaultSortOrder: void 0
|
|
76139
|
-
}
|
|
76140
|
-
|
|
76169
|
+
});
|
|
76170
|
+
}
|
|
76171
|
+
if (showMax) {
|
|
76172
|
+
cols.push({
|
|
76141
76173
|
title: "Max",
|
|
76142
76174
|
dataIndex: "max",
|
|
76143
76175
|
key: "max",
|
|
76144
76176
|
align: "right",
|
|
76145
76177
|
render: (v) => v == null ? "-" : valueFormatter(v),
|
|
76146
76178
|
sorter: (a, b) => (a.max ?? -Infinity) - (b.max ?? -Infinity)
|
|
76147
|
-
}
|
|
76148
|
-
|
|
76179
|
+
});
|
|
76180
|
+
}
|
|
76181
|
+
if (showMean) {
|
|
76182
|
+
cols.push({
|
|
76183
|
+
title: "Mean",
|
|
76184
|
+
dataIndex: "mean",
|
|
76185
|
+
key: "mean",
|
|
76186
|
+
align: "right",
|
|
76187
|
+
render: (v) => v == null ? "-" : valueFormatter(v),
|
|
76188
|
+
sorter: (a, b) => (a.mean ?? -Infinity) - (b.mean ?? -Infinity)
|
|
76189
|
+
});
|
|
76190
|
+
}
|
|
76191
|
+
if (showCurrent) {
|
|
76192
|
+
cols.push({
|
|
76149
76193
|
title: "Current",
|
|
76150
76194
|
dataIndex: "current",
|
|
76151
76195
|
key: "current",
|
|
@@ -76153,18 +76197,20 @@ const MatrixToTableRows = ({
|
|
|
76153
76197
|
render: (v) => v == null ? "-" : valueFormatter(v),
|
|
76154
76198
|
sorter: (a, b) => (a.current ?? -Infinity) - (b.current ?? -Infinity),
|
|
76155
76199
|
defaultSortOrder: "descend"
|
|
76156
|
-
}
|
|
76157
|
-
|
|
76200
|
+
});
|
|
76201
|
+
}
|
|
76202
|
+
if (showCurrentTs) {
|
|
76203
|
+
cols.push({
|
|
76158
76204
|
title: "Current @",
|
|
76159
76205
|
dataIndex: "currentTs",
|
|
76160
76206
|
key: "currentTs",
|
|
76161
76207
|
width: 180,
|
|
76162
76208
|
render: (ts) => ts == null ? "-" : timestampFormatter(ts),
|
|
76163
76209
|
sorter: (a, b) => (a.currentTs ?? -Infinity) - (b.currentTs ?? -Infinity)
|
|
76164
|
-
}
|
|
76165
|
-
|
|
76166
|
-
|
|
76167
|
-
);
|
|
76210
|
+
});
|
|
76211
|
+
}
|
|
76212
|
+
return cols;
|
|
76213
|
+
}, [showSeries, showMin, showMax, showMean, showCurrent, showCurrentTs, valueFormatter, timestampFormatter]);
|
|
76168
76214
|
if (error) {
|
|
76169
76215
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
76170
76216
|
"❌ Error: ",
|
|
@@ -76480,7 +76526,8 @@ const VectorToTableRows = ({
|
|
|
76480
76526
|
refetchInterval,
|
|
76481
76527
|
formatValue,
|
|
76482
76528
|
formatTimestamp: formatTimestamp$1,
|
|
76483
|
-
title = "Vector → Table"
|
|
76529
|
+
title = "Vector → Table",
|
|
76530
|
+
tableColumns
|
|
76484
76531
|
}) => {
|
|
76485
76532
|
const { data, isLoading, error } = usePromVector({ baseUrl, query, refetchInterval });
|
|
76486
76533
|
const dataSource = useMemo(() => {
|
|
@@ -76489,17 +76536,23 @@ const VectorToTableRows = ({
|
|
|
76489
76536
|
}, [data]);
|
|
76490
76537
|
const valueFormatter = formatValue ?? formatBytes;
|
|
76491
76538
|
const timestampFormatter = formatTimestamp$1 ?? formatTimestamp;
|
|
76492
|
-
const
|
|
76493
|
-
|
|
76494
|
-
|
|
76539
|
+
const showId = tableColumns?.id !== false;
|
|
76540
|
+
const showValue = tableColumns?.value !== false;
|
|
76541
|
+
const showTimestamp = tableColumns?.timestamp !== false;
|
|
76542
|
+
const columns = useMemo(() => {
|
|
76543
|
+
const cols = [];
|
|
76544
|
+
if (showId) {
|
|
76545
|
+
cols.push({
|
|
76495
76546
|
title: "id",
|
|
76496
76547
|
dataIndex: "id",
|
|
76497
76548
|
key: "id",
|
|
76498
76549
|
sorter: (a, b) => a.id.localeCompare(b.id),
|
|
76499
76550
|
fixed: "left",
|
|
76500
76551
|
width: 260
|
|
76501
|
-
}
|
|
76502
|
-
|
|
76552
|
+
});
|
|
76553
|
+
}
|
|
76554
|
+
if (showValue) {
|
|
76555
|
+
cols.push({
|
|
76503
76556
|
title: "value",
|
|
76504
76557
|
dataIndex: "value",
|
|
76505
76558
|
key: "value",
|
|
@@ -76508,18 +76561,20 @@ const VectorToTableRows = ({
|
|
|
76508
76561
|
sorter: (a, b) => a.value - b.value,
|
|
76509
76562
|
defaultSortOrder: "descend",
|
|
76510
76563
|
width: 160
|
|
76511
|
-
}
|
|
76512
|
-
|
|
76564
|
+
});
|
|
76565
|
+
}
|
|
76566
|
+
if (showTimestamp) {
|
|
76567
|
+
cols.push({
|
|
76513
76568
|
title: "timestamp",
|
|
76514
76569
|
dataIndex: "timestamp",
|
|
76515
76570
|
key: "timestamp",
|
|
76516
76571
|
render: (ts) => timestampFormatter(ts),
|
|
76517
76572
|
sorter: (a, b) => a.timestamp - b.timestamp,
|
|
76518
76573
|
width: 220
|
|
76519
|
-
}
|
|
76520
|
-
|
|
76521
|
-
|
|
76522
|
-
);
|
|
76574
|
+
});
|
|
76575
|
+
}
|
|
76576
|
+
return cols;
|
|
76577
|
+
}, [showId, showValue, showTimestamp, valueFormatter, timestampFormatter]);
|
|
76523
76578
|
if (error) {
|
|
76524
76579
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
76525
76580
|
"❌ Error: ",
|
|
@@ -76658,6 +76713,14 @@ const toDate = (input) => {
|
|
|
76658
76713
|
const d = input instanceof Date ? input : new Date(input);
|
|
76659
76714
|
return Number.isFinite(d.getTime()) ? d : null;
|
|
76660
76715
|
};
|
|
76716
|
+
const isValidRFC3339 = (dateString) => {
|
|
76717
|
+
const rfc3339Regex = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:\d{2})$/;
|
|
76718
|
+
if (!rfc3339Regex.test(dateString)) {
|
|
76719
|
+
return false;
|
|
76720
|
+
}
|
|
76721
|
+
const date = new Date(dateString);
|
|
76722
|
+
return !Number.isNaN(date.getTime());
|
|
76723
|
+
};
|
|
76661
76724
|
const formatRelative = (date, { locale, timeZone, relative }) => {
|
|
76662
76725
|
const nowDate = relative?.now ? toDate(relative.now) ?? /* @__PURE__ */ new Date() : /* @__PURE__ */ new Date();
|
|
76663
76726
|
const diffMs = date.getTime() - nowDate.getTime();
|
|
@@ -76833,6 +76896,7 @@ const PrometheusGraph = ({
|
|
|
76833
76896
|
formatter,
|
|
76834
76897
|
unit,
|
|
76835
76898
|
dateFormatter,
|
|
76899
|
+
tableColumns,
|
|
76836
76900
|
...props
|
|
76837
76901
|
} = data;
|
|
76838
76902
|
const partsOfUrl = usePartsOfUrl();
|
|
@@ -76848,7 +76912,18 @@ const PrometheusGraph = ({
|
|
|
76848
76912
|
);
|
|
76849
76913
|
const formatValue = createValueFormatter({ formatter, unit });
|
|
76850
76914
|
const formatTimestamp = createDateFormatter(dateFormatter);
|
|
76851
|
-
const preparedProps = {
|
|
76915
|
+
const preparedProps = {
|
|
76916
|
+
width,
|
|
76917
|
+
height,
|
|
76918
|
+
refetchInterval,
|
|
76919
|
+
min,
|
|
76920
|
+
max,
|
|
76921
|
+
topN,
|
|
76922
|
+
formatValue,
|
|
76923
|
+
formatTimestamp,
|
|
76924
|
+
tableColumns,
|
|
76925
|
+
...parsedProps
|
|
76926
|
+
};
|
|
76852
76927
|
if (isMultiqueryLoading) {
|
|
76853
76928
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading multiquery" });
|
|
76854
76929
|
}
|
|
@@ -76859,6 +76934,223 @@ const PrometheusGraph = ({
|
|
|
76859
76934
|
] });
|
|
76860
76935
|
};
|
|
76861
76936
|
|
|
76937
|
+
const DefaultIframe = ({ data, children }) => {
|
|
76938
|
+
const {
|
|
76939
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
76940
|
+
id,
|
|
76941
|
+
src,
|
|
76942
|
+
title,
|
|
76943
|
+
...props
|
|
76944
|
+
} = data;
|
|
76945
|
+
const theme = useTheme();
|
|
76946
|
+
const { data: multiQueryData, isLoading: isMultiQueryLoading, isError: isMultiQueryErrors, errors } = useMultiQuery();
|
|
76947
|
+
const partsOfUrl = usePartsOfUrl();
|
|
76948
|
+
if (isMultiQueryLoading) {
|
|
76949
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading..." });
|
|
76950
|
+
}
|
|
76951
|
+
if (isMultiQueryErrors) {
|
|
76952
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
76953
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("h4", { children: "Errors:" }),
|
|
76954
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("ul", { children: errors.map((e, i) => e && /* @__PURE__ */ jsxRuntimeExports.jsx("li", { children: typeof e === "string" ? e : e.message }, i)) })
|
|
76955
|
+
] });
|
|
76956
|
+
}
|
|
76957
|
+
const replaceValues = partsOfUrl.partsOfUrl.reduce((acc, value, index) => {
|
|
76958
|
+
acc[index.toString()] = value;
|
|
76959
|
+
return acc;
|
|
76960
|
+
}, {});
|
|
76961
|
+
const replaceValuesWithTheme = { ...replaceValues, theme };
|
|
76962
|
+
const srcPrepared = src ? parseAll({ text: src, replaceValues: replaceValuesWithTheme, multiQueryData }) : void 0;
|
|
76963
|
+
const titlePrepared = title ? parseAll({ text: title, replaceValues: replaceValuesWithTheme, multiQueryData }) : void 0;
|
|
76964
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
76965
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("iframe", { src: srcPrepared, title: titlePrepared, ...props }),
|
|
76966
|
+
children
|
|
76967
|
+
] });
|
|
76968
|
+
};
|
|
76969
|
+
|
|
76970
|
+
const TitleSelect = styled(Select)`
|
|
76971
|
+
&&.ant-select {
|
|
76972
|
+
cursor: pointer;
|
|
76973
|
+
|
|
76974
|
+
.ant-select-selector {
|
|
76975
|
+
border: none;
|
|
76976
|
+
background: transparent;
|
|
76977
|
+
box-shadow: none;
|
|
76978
|
+
padding: 0;
|
|
76979
|
+
height: auto;
|
|
76980
|
+
cursor: pointer;
|
|
76981
|
+
}
|
|
76982
|
+
|
|
76983
|
+
.ant-select-selection-item {
|
|
76984
|
+
font-size: 20px;
|
|
76985
|
+
line-height: 24px;
|
|
76986
|
+
padding-inline-end: 24px;
|
|
76987
|
+
cursor: pointer;
|
|
76988
|
+
}
|
|
76989
|
+
|
|
76990
|
+
.ant-select-arrow {
|
|
76991
|
+
font-size: 14px;
|
|
76992
|
+
right: 0;
|
|
76993
|
+
cursor: pointer;
|
|
76994
|
+
color: inherit;
|
|
76995
|
+
}
|
|
76996
|
+
|
|
76997
|
+
&:hover .ant-select-selector {
|
|
76998
|
+
border: none;
|
|
76999
|
+
}
|
|
77000
|
+
|
|
77001
|
+
&.ant-select-focused .ant-select-selector {
|
|
77002
|
+
border: none;
|
|
77003
|
+
box-shadow: none;
|
|
77004
|
+
}
|
|
77005
|
+
}
|
|
77006
|
+
`;
|
|
77007
|
+
const Styled$m = {
|
|
77008
|
+
TitleSelect
|
|
77009
|
+
};
|
|
77010
|
+
|
|
77011
|
+
const DropdownRedirect = ({
|
|
77012
|
+
data,
|
|
77013
|
+
children
|
|
77014
|
+
}) => {
|
|
77015
|
+
const {
|
|
77016
|
+
cluster,
|
|
77017
|
+
apiVersion,
|
|
77018
|
+
apiGroup,
|
|
77019
|
+
namespace,
|
|
77020
|
+
plural,
|
|
77021
|
+
jsonPath,
|
|
77022
|
+
redirectUrl,
|
|
77023
|
+
currentValue,
|
|
77024
|
+
placeholder = "Select...",
|
|
77025
|
+
style,
|
|
77026
|
+
showSearch = true,
|
|
77027
|
+
loading: externalLoading
|
|
77028
|
+
} = data;
|
|
77029
|
+
const navigate = useNavigate();
|
|
77030
|
+
const { data: multiQueryData, isLoading: isMultiQueryLoading } = useMultiQuery();
|
|
77031
|
+
const partsOfUrl = usePartsOfUrl();
|
|
77032
|
+
const replaceValues = partsOfUrl.partsOfUrl.reduce((acc, value, index) => {
|
|
77033
|
+
acc[index.toString()] = value;
|
|
77034
|
+
return acc;
|
|
77035
|
+
}, {});
|
|
77036
|
+
const clusterPrepared = parseAll({ text: cluster, replaceValues, multiQueryData });
|
|
77037
|
+
const apiVersionPrepared = parseAll({ text: apiVersion, replaceValues, multiQueryData });
|
|
77038
|
+
const apiGroupPrepared = apiGroup ? parseAll({ text: apiGroup, replaceValues, multiQueryData }) : void 0;
|
|
77039
|
+
const namespacePrepared = namespace ? parseAll({ text: namespace, replaceValues, multiQueryData }) : void 0;
|
|
77040
|
+
const pluralPrepared = parseAll({ text: plural, replaceValues, multiQueryData });
|
|
77041
|
+
const currentValuePrepared = currentValue ? parseAll({ text: currentValue, replaceValues, multiQueryData }) : void 0;
|
|
77042
|
+
const {
|
|
77043
|
+
data: resourceList,
|
|
77044
|
+
isLoading: isResourceLoading,
|
|
77045
|
+
isError
|
|
77046
|
+
} = useK8sSmartResource({
|
|
77047
|
+
cluster: clusterPrepared,
|
|
77048
|
+
apiGroup: apiGroupPrepared,
|
|
77049
|
+
apiVersion: apiVersionPrepared,
|
|
77050
|
+
plural: pluralPrepared,
|
|
77051
|
+
namespace: namespacePrepared,
|
|
77052
|
+
isEnabled: Boolean(clusterPrepared && apiVersionPrepared && pluralPrepared && !isMultiQueryLoading)
|
|
77053
|
+
});
|
|
77054
|
+
const options = useMemo(() => {
|
|
77055
|
+
if (!resourceList?.items?.length) return [];
|
|
77056
|
+
return resourceList.items.map((item) => {
|
|
77057
|
+
try {
|
|
77058
|
+
const results = jp.query(item, `$${jsonPath}`);
|
|
77059
|
+
const value = results?.[0];
|
|
77060
|
+
return value !== void 0 && value !== null ? String(value) : null;
|
|
77061
|
+
} catch {
|
|
77062
|
+
return null;
|
|
77063
|
+
}
|
|
77064
|
+
}).filter((v) => v !== null).map((value) => ({ label: value, value }));
|
|
77065
|
+
}, [resourceList, jsonPath]);
|
|
77066
|
+
const isLoading = isMultiQueryLoading || isResourceLoading || externalLoading;
|
|
77067
|
+
const handleChange = (selectedValue) => {
|
|
77068
|
+
if (typeof selectedValue !== "string") return;
|
|
77069
|
+
const urlWithChosenValue = redirectUrl.replace(/\{chosenEntryValue\}/g, selectedValue);
|
|
77070
|
+
const finalUrl = parseAll({
|
|
77071
|
+
text: urlWithChosenValue,
|
|
77072
|
+
replaceValues,
|
|
77073
|
+
multiQueryData
|
|
77074
|
+
});
|
|
77075
|
+
navigate(finalUrl);
|
|
77076
|
+
};
|
|
77077
|
+
if (isLoading) {
|
|
77078
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Spin, { size: "small" });
|
|
77079
|
+
}
|
|
77080
|
+
if (isError) {
|
|
77081
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Error loading resources" });
|
|
77082
|
+
}
|
|
77083
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
77084
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
77085
|
+
Styled$m.TitleSelect,
|
|
77086
|
+
{
|
|
77087
|
+
value: currentValuePrepared,
|
|
77088
|
+
onChange: handleChange,
|
|
77089
|
+
options,
|
|
77090
|
+
placeholder,
|
|
77091
|
+
style,
|
|
77092
|
+
showSearch,
|
|
77093
|
+
filterOption: (input, option) => (option?.label ?? "").toLowerCase().includes(input.toLowerCase()),
|
|
77094
|
+
variant: "borderless"
|
|
77095
|
+
}
|
|
77096
|
+
),
|
|
77097
|
+
children
|
|
77098
|
+
] });
|
|
77099
|
+
};
|
|
77100
|
+
|
|
77101
|
+
const CopyButton = ({
|
|
77102
|
+
data,
|
|
77103
|
+
children
|
|
77104
|
+
}) => {
|
|
77105
|
+
const {
|
|
77106
|
+
copyText,
|
|
77107
|
+
successMessage = "Copied!",
|
|
77108
|
+
errorMessage = "Failed to copy",
|
|
77109
|
+
buttonType = "text",
|
|
77110
|
+
tooltip,
|
|
77111
|
+
style
|
|
77112
|
+
} = data;
|
|
77113
|
+
const [messageApi, contextHolder] = message.useMessage();
|
|
77114
|
+
const { data: multiQueryData, isLoading } = useMultiQuery();
|
|
77115
|
+
const partsOfUrl = usePartsOfUrl();
|
|
77116
|
+
const replaceValues = partsOfUrl.partsOfUrl.reduce((acc, value, index) => {
|
|
77117
|
+
acc[index.toString()] = value;
|
|
77118
|
+
return acc;
|
|
77119
|
+
}, {});
|
|
77120
|
+
const copyTextPrepared = parseAll({ text: copyText, replaceValues, multiQueryData });
|
|
77121
|
+
const handleCopy = async () => {
|
|
77122
|
+
try {
|
|
77123
|
+
if (copyTextPrepared !== null && copyTextPrepared !== void 0 && copyTextPrepared !== "") {
|
|
77124
|
+
await navigator.clipboard.writeText(copyTextPrepared);
|
|
77125
|
+
messageApi.success(successMessage);
|
|
77126
|
+
} else {
|
|
77127
|
+
messageApi.error(errorMessage);
|
|
77128
|
+
}
|
|
77129
|
+
} catch (error) {
|
|
77130
|
+
console.error("Copy to clipboard failed:", error);
|
|
77131
|
+
messageApi.error(errorMessage);
|
|
77132
|
+
}
|
|
77133
|
+
};
|
|
77134
|
+
if (isLoading) {
|
|
77135
|
+
return null;
|
|
77136
|
+
}
|
|
77137
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
77138
|
+
contextHolder,
|
|
77139
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
77140
|
+
Button,
|
|
77141
|
+
{
|
|
77142
|
+
type: buttonType,
|
|
77143
|
+
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(CopyOutlined, {}),
|
|
77144
|
+
onClick: handleCopy,
|
|
77145
|
+
title: tooltip,
|
|
77146
|
+
style,
|
|
77147
|
+
size: "large"
|
|
77148
|
+
}
|
|
77149
|
+
),
|
|
77150
|
+
children
|
|
77151
|
+
] });
|
|
77152
|
+
};
|
|
77153
|
+
|
|
76862
77154
|
const DynamicComponents = {
|
|
76863
77155
|
DefaultDiv,
|
|
76864
77156
|
antdText: AntdText,
|
|
@@ -76883,7 +77175,7 @@ const DynamicComponents = {
|
|
|
76883
77175
|
NodeTerminal: NodeTerminal$1,
|
|
76884
77176
|
PodLogs: PodLogs$1,
|
|
76885
77177
|
YamlEditorSingleton,
|
|
76886
|
-
VisibilityContainer
|
|
77178
|
+
VisibilityContainer,
|
|
76887
77179
|
ArrayOfObjectsToKeyValues,
|
|
76888
77180
|
ItemCounter,
|
|
76889
77181
|
Labels,
|
|
@@ -76901,7 +77193,10 @@ const DynamicComponents = {
|
|
|
76901
77193
|
Toggler,
|
|
76902
77194
|
TogglerSegmented,
|
|
76903
77195
|
VMVNC: VMVNC$1,
|
|
76904
|
-
PrometheusGraph
|
|
77196
|
+
PrometheusGraph,
|
|
77197
|
+
DefaultIframe,
|
|
77198
|
+
DropdownRedirect,
|
|
77199
|
+
CopyButton
|
|
76905
77200
|
};
|
|
76906
77201
|
|
|
76907
77202
|
const prepareUrlsToFetchForDynamicRenderer = ({
|
|
@@ -83260,6 +83555,15 @@ const PodLogs = ({ cluster, namespace, podName, containers, substractHeight }) =
|
|
|
83260
83555
|
] });
|
|
83261
83556
|
};
|
|
83262
83557
|
|
|
83558
|
+
var dayjs_min = {exports: {}};
|
|
83559
|
+
|
|
83560
|
+
(function (module, exports) {
|
|
83561
|
+
!function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return "["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p="$isDayjsObject",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,true),this.parse(t),this.$x=this.$x||t.x||{},this[p]=true;}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return b},m.isValid=function(){return !(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+"Hours",0);case u:return $(v+"Minutes",1);case s:return $(v+"Seconds",2);case i:return $(v+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,false)},m.$set=function(t,e){var n,o=b.p(t),f="set"+(this.$u?"UTC":""),l=(n={},n[a]=f+"Date",n[d]=f+"Date",n[c]=f+"Month",n[h]=f+"FullYear",n[u]=f+"Hours",n[s]=f+"Minutes",n[i]=f+"Seconds",n[r]=f+"Milliseconds",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,"0")},$=f||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case "YY":return String(e.$y).slice(-2);case "YYYY":return b.s(e.$y,4,"0");case "M":return a+1;case "MM":return b.s(a+1,2,"0");case "MMM":return h(n.monthsShort,a,c,3);case "MMMM":return h(c,a);case "D":return e.$D;case "DD":return b.s(e.$D,2,"0");case "d":return String(e.$W);case "dd":return h(n.weekdaysMin,e.$W,o,2);case "ddd":return h(n.weekdaysShort,e.$W,o,3);case "dddd":return o[e.$W];case "H":return String(s);case "HH":return b.s(s,2,"0");case "h":return d(1);case "hh":return d(2);case "a":return $(s,u,true);case "A":return $(s,u,false);case "m":return String(u);case "mm":return b.s(u,2,"0");case "s":return String(e.$s);case "ss":return b.s(e.$s,2,"0");case "SSS":return b.s(e.$ms,3,"0");case "Z":return i}return null}(t)||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g;}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,true);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),k=_.prototype;return O.prototype=k,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",c],["$y",h],["$D",d]].forEach((function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=true),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));
|
|
83562
|
+
} (dayjs_min));
|
|
83563
|
+
|
|
83564
|
+
var dayjs_minExports = dayjs_min.exports;
|
|
83565
|
+
const dayjs = /*@__PURE__*/getDefaultExportFromCjs(dayjs_minExports);
|
|
83566
|
+
|
|
83263
83567
|
const FullWidthDiv$1 = styled.div`
|
|
83264
83568
|
display: flex;
|
|
83265
83569
|
justify-content: center;
|
|
@@ -83273,9 +83577,17 @@ const CustomCard$1 = styled.div`
|
|
|
83273
83577
|
scrollbar-width: thin;
|
|
83274
83578
|
}
|
|
83275
83579
|
`;
|
|
83276
|
-
|
|
83580
|
+
styled.div`
|
|
83581
|
+
position: relative;
|
|
83582
|
+
width: 100%;
|
|
83583
|
+
`;
|
|
83584
|
+
const StreamingBar = styled.div`
|
|
83585
|
+
display: flex;
|
|
83586
|
+
align-items: center;
|
|
83587
|
+
gap: 16px;
|
|
83588
|
+
padding: 12px;
|
|
83589
|
+
background-color: ${({ $isDark }) => $isDark ? "#1e1e1e" : "#fffffe"};
|
|
83277
83590
|
visibility: ${({ $isVisible }) => $isVisible ? "visible" : "hidden"};
|
|
83278
|
-
margin-top: -51px;
|
|
83279
83591
|
`;
|
|
83280
83592
|
const CursorPointerDiv$1 = styled.div`
|
|
83281
83593
|
cursor: pointer;
|
|
@@ -83284,7 +83596,7 @@ const CursorPointerDiv$1 = styled.div`
|
|
|
83284
83596
|
const Styled$6 = {
|
|
83285
83597
|
FullWidthDiv: FullWidthDiv$1,
|
|
83286
83598
|
CustomCard: CustomCard$1,
|
|
83287
|
-
|
|
83599
|
+
StreamingBar,
|
|
83288
83600
|
CursorPointerDiv: CursorPointerDiv$1
|
|
83289
83601
|
};
|
|
83290
83602
|
|
|
@@ -83295,14 +83607,20 @@ const MonacoEditor = ({
|
|
|
83295
83607
|
container,
|
|
83296
83608
|
theme,
|
|
83297
83609
|
substractHeight,
|
|
83298
|
-
previous
|
|
83610
|
+
previous,
|
|
83611
|
+
tailLines,
|
|
83612
|
+
sinceSeconds,
|
|
83613
|
+
sinceTime,
|
|
83614
|
+
limitBytes
|
|
83299
83615
|
}) => {
|
|
83616
|
+
const [notificationApi, contextHolder] = notification.useNotification();
|
|
83300
83617
|
const [isLoading, setIsLoading] = useState(true);
|
|
83301
83618
|
const [error, setError] = useState();
|
|
83302
83619
|
const [isTerminalVisible, setIsTerminalVisible] = useState(false);
|
|
83303
83620
|
const [isPaused, setIsPaused] = useState(false);
|
|
83304
83621
|
const socketRef = useRef(null);
|
|
83305
83622
|
const editorRef = useRef(null);
|
|
83623
|
+
const shownErrorsRef = useRef(/* @__PURE__ */ new Set());
|
|
83306
83624
|
const [editorReady, setEditorReady] = useState(false);
|
|
83307
83625
|
const handleEditorDidMount = (editor) => {
|
|
83308
83626
|
editorRef.current = editor;
|
|
@@ -83329,7 +83647,7 @@ const MonacoEditor = ({
|
|
|
83329
83647
|
socket.send(
|
|
83330
83648
|
JSON.stringify({
|
|
83331
83649
|
type: "init",
|
|
83332
|
-
payload: { namespace, podName, container, previous }
|
|
83650
|
+
payload: { namespace, podName, container, previous, tailLines, sinceSeconds, sinceTime, limitBytes }
|
|
83333
83651
|
})
|
|
83334
83652
|
);
|
|
83335
83653
|
console.log(`[${namespace}/${podName}]: WebSocket Client Connected`);
|
|
@@ -83345,6 +83663,20 @@ const MonacoEditor = ({
|
|
|
83345
83663
|
appendContent(data.payload);
|
|
83346
83664
|
}
|
|
83347
83665
|
}
|
|
83666
|
+
if (data.type === "error") {
|
|
83667
|
+
const errorKey = data.payload;
|
|
83668
|
+
if (!shownErrorsRef.current.has(errorKey)) {
|
|
83669
|
+
shownErrorsRef.current.add(errorKey);
|
|
83670
|
+
notificationApi.error({
|
|
83671
|
+
message: "Log fetch error",
|
|
83672
|
+
description: data.payload,
|
|
83673
|
+
placement: "bottomRight",
|
|
83674
|
+
duration: 10,
|
|
83675
|
+
style: { maxWidth: 400 }
|
|
83676
|
+
});
|
|
83677
|
+
}
|
|
83678
|
+
console.error("Log fetch error from server:", data.payload);
|
|
83679
|
+
}
|
|
83348
83680
|
};
|
|
83349
83681
|
socket.onclose = () => {
|
|
83350
83682
|
console.log(`[${namespace}/${podName}]: WebSocket Client Closed`);
|
|
@@ -83358,70 +83690,210 @@ const MonacoEditor = ({
|
|
|
83358
83690
|
socket.close();
|
|
83359
83691
|
}
|
|
83360
83692
|
};
|
|
83361
|
-
}, [endpoint, namespace, podName, container, previous, editorReady]);
|
|
83693
|
+
}, [endpoint, namespace, podName, container, previous, tailLines, sinceSeconds, sinceTime, limitBytes, editorReady]);
|
|
83694
|
+
const isDark = theme === "dark";
|
|
83362
83695
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
83363
|
-
|
|
83364
|
-
|
|
83365
|
-
|
|
83696
|
+
contextHolder,
|
|
83697
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$6.CustomCard, { $isVisible: isTerminalVisible, children: [
|
|
83698
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$6.StreamingBar, { $isVisible: isTerminalVisible, $isDark: isDark, children: [
|
|
83699
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
83700
|
+
Styled$6.CursorPointerDiv,
|
|
83701
|
+
{
|
|
83702
|
+
onClick: () => {
|
|
83703
|
+
if (isPaused) {
|
|
83704
|
+
setIsPaused(false);
|
|
83705
|
+
socketRef.current?.send(
|
|
83706
|
+
JSON.stringify({
|
|
83707
|
+
type: "continue"
|
|
83708
|
+
})
|
|
83709
|
+
);
|
|
83710
|
+
} else {
|
|
83711
|
+
setIsPaused(true);
|
|
83712
|
+
socketRef.current?.send(
|
|
83713
|
+
JSON.stringify({
|
|
83714
|
+
type: "stop"
|
|
83715
|
+
})
|
|
83716
|
+
);
|
|
83717
|
+
}
|
|
83718
|
+
},
|
|
83719
|
+
children: isPaused ? /* @__PURE__ */ jsxRuntimeExports.jsx(ResumeCircleIcon, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(PauseCircleIcon, {})
|
|
83720
|
+
}
|
|
83721
|
+
),
|
|
83722
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: isPaused ? "Not streaming events" : "Streaming events..." })
|
|
83723
|
+
] }),
|
|
83724
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$6.FullWidthDiv, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
83725
|
+
Ft$1,
|
|
83366
83726
|
{
|
|
83367
|
-
|
|
83368
|
-
|
|
83369
|
-
|
|
83370
|
-
|
|
83371
|
-
|
|
83372
|
-
|
|
83373
|
-
|
|
83374
|
-
|
|
83375
|
-
} else {
|
|
83376
|
-
setIsPaused(true);
|
|
83377
|
-
socketRef.current?.send(
|
|
83378
|
-
JSON.stringify({
|
|
83379
|
-
type: "stop"
|
|
83380
|
-
})
|
|
83381
|
-
);
|
|
83382
|
-
}
|
|
83727
|
+
defaultLanguage: "plaintext",
|
|
83728
|
+
language: "plaintext",
|
|
83729
|
+
width: "100%",
|
|
83730
|
+
height: `calc(100vh - ${substractHeight}px)`,
|
|
83731
|
+
theme: isDark ? "vs-dark" : "vs",
|
|
83732
|
+
options: {
|
|
83733
|
+
theme: isDark ? "vs-dark" : "vs",
|
|
83734
|
+
readOnly: true
|
|
83383
83735
|
},
|
|
83384
|
-
|
|
83736
|
+
onMount: handleEditorDidMount
|
|
83385
83737
|
}
|
|
83386
|
-
)
|
|
83387
|
-
|
|
83388
|
-
] }) }),
|
|
83389
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Spacer$1, { $space: 16, $samespace: true }),
|
|
83390
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$6.CustomCard, { $isVisible: isTerminalVisible, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$6.FullWidthDiv, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
83391
|
-
Ft$1,
|
|
83392
|
-
{
|
|
83393
|
-
defaultLanguage: "plaintext",
|
|
83394
|
-
language: "plaintext",
|
|
83395
|
-
width: "100%",
|
|
83396
|
-
height: `calc(100vh - ${substractHeight}px)`,
|
|
83397
|
-
theme: theme === "dark" ? "vs-dark" : theme === void 0 ? "vs-dark" : "vs",
|
|
83398
|
-
options: {
|
|
83399
|
-
theme: theme === "dark" ? "vs-dark" : theme === void 0 ? "vs-dark" : "vs",
|
|
83400
|
-
readOnly: true
|
|
83401
|
-
},
|
|
83402
|
-
onMount: handleEditorDidMount
|
|
83403
|
-
}
|
|
83404
|
-
) }) }),
|
|
83738
|
+
) })
|
|
83739
|
+
] }),
|
|
83405
83740
|
isLoading && !error && /* @__PURE__ */ jsxRuntimeExports.jsx(Spin, {}),
|
|
83406
83741
|
error && /* @__PURE__ */ jsxRuntimeExports.jsx(Result, { status: "error", title: "Error", subTitle: JSON.stringify(error) })
|
|
83407
83742
|
] });
|
|
83408
83743
|
};
|
|
83409
83744
|
|
|
83410
|
-
const
|
|
83745
|
+
const ControlsRow = styled.div`
|
|
83746
|
+
display: flex;
|
|
83747
|
+
align-items: center;
|
|
83748
|
+
justify-content: space-between;
|
|
83749
|
+
gap: 16px;
|
|
83750
|
+
flex-wrap: wrap;
|
|
83751
|
+
`;
|
|
83752
|
+
const ControlsLeft = styled.div`
|
|
83753
|
+
display: flex;
|
|
83754
|
+
align-items: center;
|
|
83755
|
+
gap: 16px;
|
|
83756
|
+
`;
|
|
83757
|
+
const ControlsRight = styled.div`
|
|
83758
|
+
display: flex;
|
|
83759
|
+
align-items: center;
|
|
83760
|
+
gap: 24px;
|
|
83761
|
+
`;
|
|
83762
|
+
const FiltersGroup = styled.div`
|
|
83763
|
+
display: flex;
|
|
83764
|
+
align-items: center;
|
|
83765
|
+
gap: 8px;
|
|
83766
|
+
`;
|
|
83767
|
+
const ButtonsGroup = styled.div`
|
|
83768
|
+
display: flex;
|
|
83769
|
+
align-items: center;
|
|
83770
|
+
gap: 8px;
|
|
83771
|
+
`;
|
|
83772
|
+
styled.div`
|
|
83411
83773
|
height: 35px;
|
|
83412
|
-
margin-left: 202px;
|
|
83413
83774
|
display: flex;
|
|
83414
83775
|
align-items: center;
|
|
83415
83776
|
`;
|
|
83416
83777
|
const CustomSelect = styled.div`
|
|
83417
83778
|
.ant-select {
|
|
83418
|
-
width:
|
|
83779
|
+
width: 120px;
|
|
83780
|
+
|
|
83781
|
+
@media (min-width: 1420px) {
|
|
83782
|
+
width: 160px;
|
|
83783
|
+
}
|
|
83784
|
+
|
|
83785
|
+
@media (min-width: 1512px) {
|
|
83786
|
+
width: 200px;
|
|
83787
|
+
}
|
|
83788
|
+
}
|
|
83789
|
+
|
|
83790
|
+
.ant-select-selection-placeholder {
|
|
83791
|
+
overflow: hidden;
|
|
83792
|
+
text-overflow: ellipsis;
|
|
83793
|
+
white-space: nowrap;
|
|
83794
|
+
}
|
|
83795
|
+
`;
|
|
83796
|
+
const FilterInput = styled.div`
|
|
83797
|
+
.ant-select,
|
|
83798
|
+
.ant-input-number,
|
|
83799
|
+
.ant-picker {
|
|
83800
|
+
width: 120px;
|
|
83801
|
+
height: 32px;
|
|
83802
|
+
}
|
|
83803
|
+
|
|
83804
|
+
.ant-select-selection-placeholder {
|
|
83805
|
+
overflow: hidden;
|
|
83806
|
+
text-overflow: ellipsis;
|
|
83807
|
+
white-space: nowrap;
|
|
83419
83808
|
}
|
|
83420
83809
|
`;
|
|
83810
|
+
styled.div`
|
|
83811
|
+
display: flex;
|
|
83812
|
+
align-items: center;
|
|
83813
|
+
gap: 24px;
|
|
83814
|
+
flex-wrap: wrap;
|
|
83815
|
+
`;
|
|
83816
|
+
styled.div`
|
|
83817
|
+
display: flex;
|
|
83818
|
+
align-items: center;
|
|
83819
|
+
gap: 8px;
|
|
83820
|
+
`;
|
|
83821
|
+
styled.span`
|
|
83822
|
+
font-size: 13px;
|
|
83823
|
+
color: ${({ $color }) => $color};
|
|
83824
|
+
white-space: nowrap;
|
|
83825
|
+
`;
|
|
83826
|
+
styled.div`
|
|
83827
|
+
display: flex;
|
|
83828
|
+
align-items: center;
|
|
83829
|
+
gap: 8px;
|
|
83830
|
+
`;
|
|
83831
|
+
styled.div`
|
|
83832
|
+
font-size: 16px;
|
|
83833
|
+
font-weight: 500;
|
|
83834
|
+
color: ${({ $color }) => $color};
|
|
83835
|
+
margin-bottom: 8px;
|
|
83836
|
+
`;
|
|
83837
|
+
const DarkSegmented = styled.div`
|
|
83838
|
+
.ant-segmented {
|
|
83839
|
+
background-color: ${({ $colorBgLayout }) => $colorBgLayout};
|
|
83840
|
+
height: 32px;
|
|
83841
|
+
}
|
|
83842
|
+
|
|
83843
|
+
.ant-segmented-item {
|
|
83844
|
+
color: ${({ $colorTextSecondary }) => $colorTextSecondary};
|
|
83845
|
+
|
|
83846
|
+
&:hover {
|
|
83847
|
+
color: ${({ $colorTextSecondary }) => $colorTextSecondary};
|
|
83848
|
+
}
|
|
83849
|
+
}
|
|
83850
|
+
|
|
83851
|
+
.ant-segmented-item-selected {
|
|
83852
|
+
background-color: ${({ $colorBgContainer }) => $colorBgContainer};
|
|
83853
|
+
color: ${({ $colorText }) => $colorText};
|
|
83854
|
+
|
|
83855
|
+
&:hover {
|
|
83856
|
+
color: ${({ $colorText }) => $colorText};
|
|
83857
|
+
}
|
|
83858
|
+
}
|
|
83859
|
+
|
|
83860
|
+
.ant-segmented-thumb {
|
|
83861
|
+
background-color: ${({ $colorBgContainer }) => $colorBgContainer};
|
|
83862
|
+
}
|
|
83863
|
+
`;
|
|
83864
|
+
const FilterButton = styled(Button)`
|
|
83865
|
+
height: 32px;
|
|
83866
|
+
`;
|
|
83421
83867
|
const Styled$5 = {
|
|
83422
|
-
|
|
83423
|
-
|
|
83424
|
-
|
|
83868
|
+
ControlsRow,
|
|
83869
|
+
ControlsLeft,
|
|
83870
|
+
ControlsRight,
|
|
83871
|
+
FiltersGroup,
|
|
83872
|
+
ButtonsGroup,
|
|
83873
|
+
CustomSelect,
|
|
83874
|
+
FilterInput,
|
|
83875
|
+
DarkSegmented,
|
|
83876
|
+
FilterButton
|
|
83877
|
+
};
|
|
83878
|
+
|
|
83879
|
+
const SINCE_PRESETS = [
|
|
83880
|
+
{ label: "5 min", value: 300 },
|
|
83881
|
+
{ label: "15 min", value: 900 },
|
|
83882
|
+
{ label: "30 min", value: 1800 },
|
|
83883
|
+
{ label: "1 hour", value: 3600 },
|
|
83884
|
+
{ label: "2 hours", value: 7200 },
|
|
83885
|
+
{ label: "6 hours", value: 21600 },
|
|
83886
|
+
{ label: "12 hours", value: 43200 },
|
|
83887
|
+
{ label: "24 hours", value: 86400 }
|
|
83888
|
+
];
|
|
83889
|
+
const TAIL_LINES_PRESETS = [
|
|
83890
|
+
{ label: "50 lines", value: 50 },
|
|
83891
|
+
{ label: "100 lines", value: 100 },
|
|
83892
|
+
{ label: "200 lines", value: 200 },
|
|
83893
|
+
{ label: "500 lines", value: 500 },
|
|
83894
|
+
{ label: "1000 lines", value: 1e3 },
|
|
83895
|
+
{ label: "5000 lines", value: 5e3 }
|
|
83896
|
+
];
|
|
83425
83897
|
|
|
83426
83898
|
const PodLogsMonaco = ({
|
|
83427
83899
|
cluster,
|
|
@@ -83429,15 +83901,85 @@ const PodLogsMonaco = ({
|
|
|
83429
83901
|
podName,
|
|
83430
83902
|
containers,
|
|
83431
83903
|
initContainers,
|
|
83432
|
-
theme,
|
|
83904
|
+
theme: theme$1,
|
|
83433
83905
|
substractHeight,
|
|
83434
|
-
rawPodInfo
|
|
83906
|
+
rawPodInfo,
|
|
83907
|
+
tailLines,
|
|
83908
|
+
sinceSeconds,
|
|
83909
|
+
sinceTime,
|
|
83910
|
+
limitBytes
|
|
83435
83911
|
}) => {
|
|
83912
|
+
const { token } = theme.useToken();
|
|
83913
|
+
const [notificationApi, contextHolder] = notification.useNotification();
|
|
83436
83914
|
const [currentContainer, setCurrentContainer] = useState(containers[0] || void 0);
|
|
83437
83915
|
const [previous, setPrevious] = useState(false);
|
|
83916
|
+
const warningShownRef = useRef(false);
|
|
83917
|
+
useEffect(() => {
|
|
83918
|
+
if (sinceTime && !isValidRFC3339(sinceTime) && !warningShownRef.current) {
|
|
83919
|
+
warningShownRef.current = true;
|
|
83920
|
+
notificationApi.warning({
|
|
83921
|
+
message: "Invalid sinceTime format",
|
|
83922
|
+
description: `Value "${sinceTime}" is not valid RFC3339. Expected format: "2024-01-01T00:00:00Z"`,
|
|
83923
|
+
placement: "bottomRight",
|
|
83924
|
+
duration: 10,
|
|
83925
|
+
style: { maxWidth: 400 }
|
|
83926
|
+
});
|
|
83927
|
+
}
|
|
83928
|
+
}, [sinceTime, notificationApi]);
|
|
83929
|
+
const [pendingTailLines, setPendingTailLines] = useState(tailLines);
|
|
83930
|
+
const [pendingSinceMode, setPendingSinceMode] = useState(sinceTime ? "absolute" : "relative");
|
|
83931
|
+
const [pendingSinceSeconds, setPendingSinceSeconds] = useState(sinceSeconds);
|
|
83932
|
+
const [pendingSinceTime, setPendingSinceTime] = useState(null);
|
|
83933
|
+
const [pendingLimitKB, setPendingLimitKB] = useState(
|
|
83934
|
+
limitBytes ? Math.round(limitBytes / 1024) : void 0
|
|
83935
|
+
);
|
|
83936
|
+
const [appliedFilters, setAppliedFilters] = useState({
|
|
83937
|
+
tailLines,
|
|
83938
|
+
sinceSeconds,
|
|
83939
|
+
sinceTime,
|
|
83940
|
+
limitBytes
|
|
83941
|
+
});
|
|
83942
|
+
const [filterKey, setFilterKey] = useState(0);
|
|
83943
|
+
useEffect(() => {
|
|
83944
|
+
setPendingTailLines(tailLines);
|
|
83945
|
+
setPendingSinceSeconds(sinceSeconds);
|
|
83946
|
+
setPendingLimitKB(limitBytes ? Math.round(limitBytes / 1024) : void 0);
|
|
83947
|
+
setPendingSinceMode(sinceTime ? "absolute" : "relative");
|
|
83948
|
+
}, [tailLines, sinceSeconds, sinceTime, limitBytes]);
|
|
83949
|
+
const matchingPreset = SINCE_PRESETS.find((p) => p.value === pendingSinceSeconds);
|
|
83950
|
+
const handlePresetChange = (value) => {
|
|
83951
|
+
if (value !== null) {
|
|
83952
|
+
setPendingSinceSeconds(value);
|
|
83953
|
+
}
|
|
83954
|
+
};
|
|
83955
|
+
const handleSinceModeChange = (value) => {
|
|
83956
|
+
setPendingSinceMode(value);
|
|
83957
|
+
};
|
|
83958
|
+
const handleDateTimeChange = (value) => {
|
|
83959
|
+
setPendingSinceTime(value);
|
|
83960
|
+
};
|
|
83961
|
+
const handleApply = () => {
|
|
83962
|
+
const newFilters = {
|
|
83963
|
+
tailLines: pendingTailLines,
|
|
83964
|
+
sinceSeconds: pendingSinceMode === "relative" ? pendingSinceSeconds : void 0,
|
|
83965
|
+
sinceTime: pendingSinceMode === "absolute" && pendingSinceTime ? pendingSinceTime.toISOString() : void 0,
|
|
83966
|
+
limitBytes: pendingLimitKB ? pendingLimitKB * 1024 : void 0
|
|
83967
|
+
};
|
|
83968
|
+
setAppliedFilters(newFilters);
|
|
83969
|
+
setFilterKey((prev) => prev + 1);
|
|
83970
|
+
};
|
|
83971
|
+
const handleReset = () => {
|
|
83972
|
+
setPendingTailLines(tailLines);
|
|
83973
|
+
setPendingSinceSeconds(sinceSeconds);
|
|
83974
|
+
setPendingSinceTime(null);
|
|
83975
|
+
setPendingLimitKB(limitBytes ? Math.round(limitBytes / 1024) : void 0);
|
|
83976
|
+
setPendingSinceMode(sinceTime ? "absolute" : "relative");
|
|
83977
|
+
setAppliedFilters({ tailLines, sinceSeconds, sinceTime, limitBytes });
|
|
83978
|
+
setFilterKey((prev) => prev + 1);
|
|
83979
|
+
};
|
|
83438
83980
|
const endpoint = `/api/clusters/${cluster}/openapi-bff-ws/terminal/podLogs/podLogsNonWs`;
|
|
83439
83981
|
if (containers.length === 0) {
|
|
83440
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: "No
|
|
83982
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: "No Containers" });
|
|
83441
83983
|
}
|
|
83442
83984
|
const restartCount = rawPodInfo.status.containerStatuses.find((s) => s.name === currentContainer)?.restartCount ?? 0;
|
|
83443
83985
|
const withPrevious = restartCount > 0;
|
|
@@ -83463,42 +84005,127 @@ const PodLogsMonaco = ({
|
|
|
83463
84005
|
options: containers.map((container) => ({ value: container, label: container }))
|
|
83464
84006
|
}
|
|
83465
84007
|
];
|
|
84008
|
+
const disabledDate = (current) => current && current.isAfter(dayjs());
|
|
84009
|
+
const disabledTime = (current) => {
|
|
84010
|
+
const now = dayjs();
|
|
84011
|
+
const isToday = current && current.isSame(now, "day");
|
|
84012
|
+
if (!isToday) return {};
|
|
84013
|
+
const currentHour = now.hour();
|
|
84014
|
+
const currentMinute = now.minute();
|
|
84015
|
+
const currentSecond = now.second();
|
|
84016
|
+
return {
|
|
84017
|
+
disabledHours: () => Array.from({ length: 24 }, (_, i) => i).filter((h) => h > currentHour),
|
|
84018
|
+
disabledMinutes: (selectedHour) => selectedHour === currentHour ? Array.from({ length: 60 }, (_, i) => i).filter((m) => m > currentMinute) : [],
|
|
84019
|
+
disabledSeconds: (selectedHour, selectedMinute) => selectedHour === currentHour && selectedMinute === currentMinute ? Array.from({ length: 60 }, (_, i) => i).filter((s) => s > currentSecond) : []
|
|
84020
|
+
};
|
|
84021
|
+
};
|
|
83466
84022
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
83467
|
-
|
|
83468
|
-
|
|
83469
|
-
|
|
83470
|
-
{
|
|
83471
|
-
|
|
83472
|
-
|
|
83473
|
-
|
|
83474
|
-
|
|
83475
|
-
|
|
83476
|
-
|
|
83477
|
-
|
|
83478
|
-
|
|
83479
|
-
|
|
83480
|
-
|
|
83481
|
-
}
|
|
83482
|
-
) }),
|
|
83483
|
-
currentContainer && /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$5.CustomSelect, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
83484
|
-
Select,
|
|
83485
|
-
{
|
|
83486
|
-
placeholder: "Select current/previous",
|
|
83487
|
-
options: prevCurOptions,
|
|
83488
|
-
filterOption: filterSelectOptions,
|
|
83489
|
-
disabled: !withPrevious,
|
|
83490
|
-
showSearch: true,
|
|
83491
|
-
value: previous ? "previous" : "current",
|
|
83492
|
-
onChange: (value) => {
|
|
83493
|
-
if (value === "previous") {
|
|
83494
|
-
setPrevious(true);
|
|
83495
|
-
} else {
|
|
84023
|
+
contextHolder,
|
|
84024
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$5.ControlsRow, { children: [
|
|
84025
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$5.ControlsLeft, { children: [
|
|
84026
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$5.CustomSelect, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
84027
|
+
Select,
|
|
84028
|
+
{
|
|
84029
|
+
placeholder: "Container",
|
|
84030
|
+
options,
|
|
84031
|
+
filterOption: filterSelectOptions,
|
|
84032
|
+
disabled: containers.length === 0,
|
|
84033
|
+
showSearch: true,
|
|
84034
|
+
value: currentContainer,
|
|
84035
|
+
onChange: (value) => {
|
|
84036
|
+
setCurrentContainer(value);
|
|
83496
84037
|
setPrevious(false);
|
|
83497
84038
|
}
|
|
83498
84039
|
}
|
|
83499
|
-
}
|
|
83500
|
-
|
|
83501
|
-
|
|
84040
|
+
) }),
|
|
84041
|
+
currentContainer && /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$5.CustomSelect, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
84042
|
+
Select,
|
|
84043
|
+
{
|
|
84044
|
+
placeholder: "Current/previous",
|
|
84045
|
+
options: prevCurOptions,
|
|
84046
|
+
filterOption: filterSelectOptions,
|
|
84047
|
+
disabled: !withPrevious,
|
|
84048
|
+
showSearch: true,
|
|
84049
|
+
value: previous ? "previous" : "current",
|
|
84050
|
+
onChange: (value) => {
|
|
84051
|
+
if (value === "previous") {
|
|
84052
|
+
setPrevious(true);
|
|
84053
|
+
} else {
|
|
84054
|
+
setPrevious(false);
|
|
84055
|
+
}
|
|
84056
|
+
}
|
|
84057
|
+
}
|
|
84058
|
+
) })
|
|
84059
|
+
] }),
|
|
84060
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$5.ControlsRight, { children: [
|
|
84061
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$5.FiltersGroup, { children: [
|
|
84062
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$5.FilterInput, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
84063
|
+
Select,
|
|
84064
|
+
{
|
|
84065
|
+
placeholder: "Tail lines",
|
|
84066
|
+
options: TAIL_LINES_PRESETS,
|
|
84067
|
+
value: pendingTailLines,
|
|
84068
|
+
onChange: (value) => setPendingTailLines(value ?? void 0),
|
|
84069
|
+
allowClear: true
|
|
84070
|
+
}
|
|
84071
|
+
) }),
|
|
84072
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
84073
|
+
Styled$5.DarkSegmented,
|
|
84074
|
+
{
|
|
84075
|
+
$colorBgLayout: token.colorBgLayout,
|
|
84076
|
+
$colorBgContainer: token.colorBgContainer,
|
|
84077
|
+
$colorTextSecondary: token.colorTextSecondary,
|
|
84078
|
+
$colorText: token.colorText,
|
|
84079
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
84080
|
+
Segmented,
|
|
84081
|
+
{
|
|
84082
|
+
value: pendingSinceMode,
|
|
84083
|
+
onChange: handleSinceModeChange,
|
|
84084
|
+
options: [
|
|
84085
|
+
{ label: "Relative", value: "relative" },
|
|
84086
|
+
{ label: "Absolute", value: "absolute" }
|
|
84087
|
+
]
|
|
84088
|
+
}
|
|
84089
|
+
)
|
|
84090
|
+
}
|
|
84091
|
+
),
|
|
84092
|
+
pendingSinceMode === "relative" && /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$5.FilterInput, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
84093
|
+
Select,
|
|
84094
|
+
{
|
|
84095
|
+
placeholder: "Time range",
|
|
84096
|
+
options: SINCE_PRESETS,
|
|
84097
|
+
value: matchingPreset?.value ?? null,
|
|
84098
|
+
onChange: handlePresetChange,
|
|
84099
|
+
allowClear: true
|
|
84100
|
+
}
|
|
84101
|
+
) }),
|
|
84102
|
+
pendingSinceMode === "absolute" && /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$5.FilterInput, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
84103
|
+
DatePicker,
|
|
84104
|
+
{
|
|
84105
|
+
showTime: true,
|
|
84106
|
+
value: pendingSinceTime,
|
|
84107
|
+
onChange: handleDateTimeChange,
|
|
84108
|
+
placeholder: "Date & time",
|
|
84109
|
+
disabledDate,
|
|
84110
|
+
disabledTime
|
|
84111
|
+
}
|
|
84112
|
+
) }),
|
|
84113
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$5.FilterInput, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
84114
|
+
InputNumber,
|
|
84115
|
+
{
|
|
84116
|
+
min: 1,
|
|
84117
|
+
placeholder: "Limit KB",
|
|
84118
|
+
value: pendingLimitKB,
|
|
84119
|
+
onChange: (value) => setPendingLimitKB(value ?? void 0)
|
|
84120
|
+
}
|
|
84121
|
+
) })
|
|
84122
|
+
] }),
|
|
84123
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$5.ButtonsGroup, { children: [
|
|
84124
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$5.FilterButton, { onClick: handleReset, children: "Clear" }),
|
|
84125
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$5.FilterButton, { type: "primary", onClick: handleApply, children: "Apply" })
|
|
84126
|
+
] })
|
|
84127
|
+
] })
|
|
84128
|
+
] }),
|
|
83502
84129
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Spacer$1, { $space: 16, $samespace: true }),
|
|
83503
84130
|
currentContainer && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
83504
84131
|
MonacoEditor,
|
|
@@ -83507,11 +84134,15 @@ const PodLogsMonaco = ({
|
|
|
83507
84134
|
namespace,
|
|
83508
84135
|
podName,
|
|
83509
84136
|
container: currentContainer,
|
|
83510
|
-
theme,
|
|
84137
|
+
theme: theme$1,
|
|
83511
84138
|
substractHeight,
|
|
83512
|
-
previous
|
|
84139
|
+
previous,
|
|
84140
|
+
tailLines: appliedFilters.tailLines,
|
|
84141
|
+
sinceSeconds: appliedFilters.sinceSeconds,
|
|
84142
|
+
sinceTime: appliedFilters.sinceTime,
|
|
84143
|
+
limitBytes: appliedFilters.limitBytes
|
|
83513
84144
|
},
|
|
83514
|
-
`${cluster}-${namespace}-${podName}-${currentContainer}-${previous}`
|
|
84145
|
+
`${cluster}-${namespace}-${podName}-${currentContainer}-${previous}-${filterKey}`
|
|
83515
84146
|
)
|
|
83516
84147
|
] });
|
|
83517
84148
|
};
|
|
@@ -85777,5 +86408,22 @@ const useResourceScope = ({ plural, cluster, apiGroup, apiVersion }) => {
|
|
|
85777
86408
|
});
|
|
85778
86409
|
};
|
|
85779
86410
|
|
|
85780
|
-
|
|
86411
|
+
const getPlugins = async ({ cluster }) => {
|
|
86412
|
+
return axios.get(`/api/clusters/${cluster}/openapi-bff/plugins/getPlugins`);
|
|
86413
|
+
};
|
|
86414
|
+
|
|
86415
|
+
const usePluginManifest = ({
|
|
86416
|
+
cluster,
|
|
86417
|
+
refetchInterval,
|
|
86418
|
+
isEnabled
|
|
86419
|
+
}) => {
|
|
86420
|
+
return useQuery({
|
|
86421
|
+
queryKey: ["usePluginManifest", cluster],
|
|
86422
|
+
queryFn: () => getPlugins({ cluster }),
|
|
86423
|
+
refetchInterval: refetchInterval !== void 0 ? refetchInterval : 6e4,
|
|
86424
|
+
enabled: isEnabled
|
|
86425
|
+
});
|
|
86426
|
+
};
|
|
86427
|
+
|
|
86428
|
+
export { BackToDefaultIcon, BlackholeForm, BlackholeFormProvider, ContentCard$1 as ContentCard, CursorDefaultDiv, CursorPointerTag, CursorPointerTagMinContent, CustomSelect$4 as CustomSelect, DeleteIcon, DeleteModal, DeleteModalMany, DownIcon, DynamicComponents, DynamicRenderer, DynamicRendererWithProviders, EarthIcon, EditIcon, EnrichedTable, EnrichedTableProvider, Events, FlexGrow, LockedIcon, LookingGlassIcon, ManageableBreadcrumbs, ManageableBreadcrumbsProvider, ManageableSidebar, ManageableSidebarProvider, MarketPlace, MarketplaceCard, MinusIcon, NodeTerminal, PaddingContainer, PauseCircleIcon, PlusIcon, PodLogs, PodLogsMonaco, PodTerminal, ProjectInfoCard, ResourceLink, ResumeCircleIcon, Search, Spacer$1 as Spacer, SuccessIcon, TreeWithSearch, UncontrolledSelect, UnlockedIcon, UpIcon, VMVNC, YamlEditorSingleton$1 as YamlEditorSingleton, checkIfApiInstanceNamespaceScoped, checkIfBuiltInInstanceNamespaceScoped, checkPermission, convertBytes, convertCompute, convertCores, convertStorage, createContextFactory, createNewEntry, deepMerge, deleteEntry, feedbackIcons, filterIfApiInstanceNamespaceScoped, filterIfBuiltInInstanceNamespaceScoped, filterSelectOptions, floorToDecimal, formatBytesAuto, formatCoresAuto, formatDateAuto, getAllPathsFromObj, getApiResourceSingle, getApiResourceTypes, getApiResourceTypesByApiGroup, getApiResources, getBuiltinResourceSingle, getBuiltinResourceTypes, getBuiltinResources, getBuiltinTreeData, getClusterList, getCrdData, getCrdResourceSingle, getCrdResources, getDirectUnknownResource, getEnrichedColumns, getEnrichedColumnsWithControls, getGroupsByCategory, getKinds, getLinkToApiForm, getLinkToBuiltinForm, getLinkToForm, getNamespaceLink, getObjectFormItemsDraft, getPrefixSubarrays, getResourceLink, getSortedKinds, getSortedKindsAll, getStringByName, getSwagger, getUppercase, groupsToTreeData, hslFromString, includesArray, isFlatObject, isMultilineFromYaml, isMultilineString, isValidRFC3339, kindByGvr, namespacedByGvr, normalizeValuesForQuotasToNumber, parseCoresWithUnit, parseQuotaValue, parseQuotaValueCpu, parseQuotaValueMemoryAndStorage, parseValueWithUnit, pluralByKind, prepareDataForManageableBreadcrumbs, prepareDataForManageableSidebar, prepareTemplate, prepareUrlsToFetchForDynamicRenderer, toBytes, toCores, updateEntry, useApiResourceSingle, useApiResourceTypesByGroup, useApiResources, useApisResourceTypes, useBuiltinResourceSingle, useBuiltinResourceTypes, useBuiltinResources, useClusterList, useCrdData, useCrdResourceSingle, useCrdResources, useDirectUnknownResource, useInfiniteSentinel, useK8sSmartResource, useK8sVerbs, useKinds, useListWatch, useManyK8sSmartResource, usePermissions, usePluginManifest, useResourceScope, useSmartResourceParams };
|
|
85781
86429
|
//# sourceMappingURL=openapi-k8s-toolkit.es.js.map
|