@prorobotech/openapi-k8s-toolkit 1.2.1-alpha.4 → 1.2.1-alpha.5

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.
@@ -1,7 +1,7 @@
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';
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, DatePicker, Checkbox, Empty } from 'antd';
5
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';
6
6
  import { useNavigate, useSearchParams, Link, useLocation, useParams } from 'react-router-dom';
7
7
  import { useQuery, useQueries, useQueryClient } from '@tanstack/react-query';
@@ -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();
@@ -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
  ),
@@ -76073,7 +76081,8 @@ const MatrixToTableRows = ({
76073
76081
  refetchInterval,
76074
76082
  title = "Memory usage (min / max / current)",
76075
76083
  formatValue,
76076
- formatTimestamp: formatTimestamp$1
76084
+ formatTimestamp: formatTimestamp$1,
76085
+ tableColumns
76077
76086
  }) => {
76078
76087
  const {
76079
76088
  data: series = [],
@@ -76090,11 +76099,15 @@ const MatrixToTableRows = ({
76090
76099
  const pts = s.data ?? [];
76091
76100
  let min = null;
76092
76101
  let max = null;
76102
+ let sum = 0;
76103
+ let count = 0;
76093
76104
  let current = null;
76094
76105
  let currentTs = null;
76095
76106
  for (const p of pts) {
76096
76107
  const v = Number(p.value);
76097
76108
  if (!Number.isFinite(v)) continue;
76109
+ sum += v;
76110
+ count += 1;
76098
76111
  if (min == null || v < min) min = v;
76099
76112
  if (max == null || v > max) max = v;
76100
76113
  if (currentTs == null || p.timestamp > currentTs) {
@@ -76108,6 +76121,7 @@ const MatrixToTableRows = ({
76108
76121
  metric: s.metric ?? {},
76109
76122
  min,
76110
76123
  max,
76124
+ mean: count > 0 ? sum / count : null,
76111
76125
  current,
76112
76126
  currentTs
76113
76127
  };
@@ -76115,9 +76129,16 @@ const MatrixToTableRows = ({
76115
76129
  }, [series]);
76116
76130
  const valueFormatter = formatValue ?? formatBytes;
76117
76131
  const timestampFormatter = formatTimestamp$1 ?? formatTimestamp;
76118
- const columns = useMemo(
76119
- () => [
76120
- {
76132
+ const showSeries = tableColumns?.series !== false;
76133
+ const showMin = tableColumns?.min !== false;
76134
+ const showMax = tableColumns?.max !== false;
76135
+ const showMean = tableColumns?.mean === true;
76136
+ const showCurrent = tableColumns?.current !== false;
76137
+ const showCurrentTs = tableColumns?.currentTs !== false;
76138
+ const columns = useMemo(() => {
76139
+ const cols = [];
76140
+ if (showSeries) {
76141
+ cols.push({
76121
76142
  title: "Series",
76122
76143
  dataIndex: "id",
76123
76144
  key: "id",
@@ -76127,8 +76148,10 @@ const MatrixToTableRows = ({
76127
76148
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { strong: true, children: row.id }) });
76128
76149
  },
76129
76150
  sorter: (a, b) => a.id.localeCompare(b.id)
76130
- },
76131
- {
76151
+ });
76152
+ }
76153
+ if (showMin) {
76154
+ cols.push({
76132
76155
  title: "Min",
76133
76156
  dataIndex: "min",
76134
76157
  key: "min",
@@ -76136,16 +76159,30 @@ const MatrixToTableRows = ({
76136
76159
  render: (v) => v == null ? "-" : valueFormatter(v),
76137
76160
  sorter: (a, b) => (a.min ?? -Infinity) - (b.min ?? -Infinity),
76138
76161
  defaultSortOrder: void 0
76139
- },
76140
- {
76162
+ });
76163
+ }
76164
+ if (showMax) {
76165
+ cols.push({
76141
76166
  title: "Max",
76142
76167
  dataIndex: "max",
76143
76168
  key: "max",
76144
76169
  align: "right",
76145
76170
  render: (v) => v == null ? "-" : valueFormatter(v),
76146
76171
  sorter: (a, b) => (a.max ?? -Infinity) - (b.max ?? -Infinity)
76147
- },
76148
- {
76172
+ });
76173
+ }
76174
+ if (showMean) {
76175
+ cols.push({
76176
+ title: "Mean",
76177
+ dataIndex: "mean",
76178
+ key: "mean",
76179
+ align: "right",
76180
+ render: (v) => v == null ? "-" : valueFormatter(v),
76181
+ sorter: (a, b) => (a.mean ?? -Infinity) - (b.mean ?? -Infinity)
76182
+ });
76183
+ }
76184
+ if (showCurrent) {
76185
+ cols.push({
76149
76186
  title: "Current",
76150
76187
  dataIndex: "current",
76151
76188
  key: "current",
@@ -76153,18 +76190,20 @@ const MatrixToTableRows = ({
76153
76190
  render: (v) => v == null ? "-" : valueFormatter(v),
76154
76191
  sorter: (a, b) => (a.current ?? -Infinity) - (b.current ?? -Infinity),
76155
76192
  defaultSortOrder: "descend"
76156
- },
76157
- {
76193
+ });
76194
+ }
76195
+ if (showCurrentTs) {
76196
+ cols.push({
76158
76197
  title: "Current @",
76159
76198
  dataIndex: "currentTs",
76160
76199
  key: "currentTs",
76161
76200
  width: 180,
76162
76201
  render: (ts) => ts == null ? "-" : timestampFormatter(ts),
76163
76202
  sorter: (a, b) => (a.currentTs ?? -Infinity) - (b.currentTs ?? -Infinity)
76164
- }
76165
- ],
76166
- [valueFormatter, timestampFormatter]
76167
- );
76203
+ });
76204
+ }
76205
+ return cols;
76206
+ }, [showSeries, showMin, showMax, showMean, showCurrent, showCurrentTs, valueFormatter, timestampFormatter]);
76168
76207
  if (error) {
76169
76208
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
76170
76209
  "❌ Error: ",
@@ -76480,7 +76519,8 @@ const VectorToTableRows = ({
76480
76519
  refetchInterval,
76481
76520
  formatValue,
76482
76521
  formatTimestamp: formatTimestamp$1,
76483
- title = "Vector → Table"
76522
+ title = "Vector → Table",
76523
+ tableColumns
76484
76524
  }) => {
76485
76525
  const { data, isLoading, error } = usePromVector({ baseUrl, query, refetchInterval });
76486
76526
  const dataSource = useMemo(() => {
@@ -76489,17 +76529,23 @@ const VectorToTableRows = ({
76489
76529
  }, [data]);
76490
76530
  const valueFormatter = formatValue ?? formatBytes;
76491
76531
  const timestampFormatter = formatTimestamp$1 ?? formatTimestamp;
76492
- const columns = useMemo(
76493
- () => [
76494
- {
76532
+ const showId = tableColumns?.id !== false;
76533
+ const showValue = tableColumns?.value !== false;
76534
+ const showTimestamp = tableColumns?.timestamp !== false;
76535
+ const columns = useMemo(() => {
76536
+ const cols = [];
76537
+ if (showId) {
76538
+ cols.push({
76495
76539
  title: "id",
76496
76540
  dataIndex: "id",
76497
76541
  key: "id",
76498
76542
  sorter: (a, b) => a.id.localeCompare(b.id),
76499
76543
  fixed: "left",
76500
76544
  width: 260
76501
- },
76502
- {
76545
+ });
76546
+ }
76547
+ if (showValue) {
76548
+ cols.push({
76503
76549
  title: "value",
76504
76550
  dataIndex: "value",
76505
76551
  key: "value",
@@ -76508,18 +76554,20 @@ const VectorToTableRows = ({
76508
76554
  sorter: (a, b) => a.value - b.value,
76509
76555
  defaultSortOrder: "descend",
76510
76556
  width: 160
76511
- },
76512
- {
76557
+ });
76558
+ }
76559
+ if (showTimestamp) {
76560
+ cols.push({
76513
76561
  title: "timestamp",
76514
76562
  dataIndex: "timestamp",
76515
76563
  key: "timestamp",
76516
76564
  render: (ts) => timestampFormatter(ts),
76517
76565
  sorter: (a, b) => a.timestamp - b.timestamp,
76518
76566
  width: 220
76519
- }
76520
- ],
76521
- [valueFormatter, timestampFormatter]
76522
- );
76567
+ });
76568
+ }
76569
+ return cols;
76570
+ }, [showId, showValue, showTimestamp, valueFormatter, timestampFormatter]);
76523
76571
  if (error) {
76524
76572
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
76525
76573
  "❌ Error: ",
@@ -76658,6 +76706,14 @@ const toDate = (input) => {
76658
76706
  const d = input instanceof Date ? input : new Date(input);
76659
76707
  return Number.isFinite(d.getTime()) ? d : null;
76660
76708
  };
76709
+ const isValidRFC3339 = (dateString) => {
76710
+ const rfc3339Regex = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:\d{2})$/;
76711
+ if (!rfc3339Regex.test(dateString)) {
76712
+ return false;
76713
+ }
76714
+ const date = new Date(dateString);
76715
+ return !Number.isNaN(date.getTime());
76716
+ };
76661
76717
  const formatRelative = (date, { locale, timeZone, relative }) => {
76662
76718
  const nowDate = relative?.now ? toDate(relative.now) ?? /* @__PURE__ */ new Date() : /* @__PURE__ */ new Date();
76663
76719
  const diffMs = date.getTime() - nowDate.getTime();
@@ -76833,6 +76889,7 @@ const PrometheusGraph = ({
76833
76889
  formatter,
76834
76890
  unit,
76835
76891
  dateFormatter,
76892
+ tableColumns,
76836
76893
  ...props
76837
76894
  } = data;
76838
76895
  const partsOfUrl = usePartsOfUrl();
@@ -76848,7 +76905,18 @@ const PrometheusGraph = ({
76848
76905
  );
76849
76906
  const formatValue = createValueFormatter({ formatter, unit });
76850
76907
  const formatTimestamp = createDateFormatter(dateFormatter);
76851
- const preparedProps = { width, height, refetchInterval, min, max, topN, formatValue, formatTimestamp, ...parsedProps };
76908
+ const preparedProps = {
76909
+ width,
76910
+ height,
76911
+ refetchInterval,
76912
+ min,
76913
+ max,
76914
+ topN,
76915
+ formatValue,
76916
+ formatTimestamp,
76917
+ tableColumns,
76918
+ ...parsedProps
76919
+ };
76852
76920
  if (isMultiqueryLoading) {
76853
76921
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading multiquery" });
76854
76922
  }
@@ -83309,7 +83377,6 @@ const CustomCard$1 = styled.div`
83309
83377
  `;
83310
83378
  const VisibilityContainer = styled.div`
83311
83379
  visibility: ${({ $isVisible }) => $isVisible ? "visible" : "hidden"};
83312
- margin-top: -51px;
83313
83380
  `;
83314
83381
  const CursorPointerDiv$1 = styled.div`
83315
83382
  cursor: pointer;
@@ -83329,14 +83396,20 @@ const MonacoEditor = ({
83329
83396
  container,
83330
83397
  theme,
83331
83398
  substractHeight,
83332
- previous
83399
+ previous,
83400
+ tailLines,
83401
+ sinceSeconds,
83402
+ sinceTime,
83403
+ limitBytes
83333
83404
  }) => {
83405
+ const [notificationApi, contextHolder] = notification.useNotification();
83334
83406
  const [isLoading, setIsLoading] = useState(true);
83335
83407
  const [error, setError] = useState();
83336
83408
  const [isTerminalVisible, setIsTerminalVisible] = useState(false);
83337
83409
  const [isPaused, setIsPaused] = useState(false);
83338
83410
  const socketRef = useRef(null);
83339
83411
  const editorRef = useRef(null);
83412
+ const shownErrorsRef = useRef(/* @__PURE__ */ new Set());
83340
83413
  const [editorReady, setEditorReady] = useState(false);
83341
83414
  const handleEditorDidMount = (editor) => {
83342
83415
  editorRef.current = editor;
@@ -83363,7 +83436,7 @@ const MonacoEditor = ({
83363
83436
  socket.send(
83364
83437
  JSON.stringify({
83365
83438
  type: "init",
83366
- payload: { namespace, podName, container, previous }
83439
+ payload: { namespace, podName, container, previous, tailLines, sinceSeconds, sinceTime, limitBytes }
83367
83440
  })
83368
83441
  );
83369
83442
  console.log(`[${namespace}/${podName}]: WebSocket Client Connected`);
@@ -83379,6 +83452,20 @@ const MonacoEditor = ({
83379
83452
  appendContent(data.payload);
83380
83453
  }
83381
83454
  }
83455
+ if (data.type === "error") {
83456
+ const errorKey = data.payload;
83457
+ if (!shownErrorsRef.current.has(errorKey)) {
83458
+ shownErrorsRef.current.add(errorKey);
83459
+ notificationApi.error({
83460
+ message: "Log fetch error",
83461
+ description: data.payload,
83462
+ placement: "bottomRight",
83463
+ duration: 10,
83464
+ style: { maxWidth: 400 }
83465
+ });
83466
+ }
83467
+ console.error("Log fetch error from server:", data.payload);
83468
+ }
83382
83469
  };
83383
83470
  socket.onclose = () => {
83384
83471
  console.log(`[${namespace}/${podName}]: WebSocket Client Closed`);
@@ -83392,8 +83479,9 @@ const MonacoEditor = ({
83392
83479
  socket.close();
83393
83480
  }
83394
83481
  };
83395
- }, [endpoint, namespace, podName, container, previous, editorReady]);
83482
+ }, [endpoint, namespace, podName, container, previous, tailLines, sinceSeconds, sinceTime, limitBytes, editorReady]);
83396
83483
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
83484
+ contextHolder,
83397
83485
  /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$6.VisibilityContainer, { $isVisible: isTerminalVisible, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { justify: "start", align: "center", gap: 16, children: [
83398
83486
  /* @__PURE__ */ jsxRuntimeExports.jsx(
83399
83487
  Styled$6.CursorPointerDiv,
@@ -83443,7 +83531,6 @@ const MonacoEditor = ({
83443
83531
 
83444
83532
  const TopRowContent = styled.div`
83445
83533
  height: 35px;
83446
- margin-left: 202px;
83447
83534
  display: flex;
83448
83535
  align-items: center;
83449
83536
  `;
@@ -83452,10 +83539,53 @@ const CustomSelect = styled.div`
83452
83539
  width: 200px;
83453
83540
  }
83454
83541
  `;
83542
+ const FilterRow = styled.div`
83543
+ display: flex;
83544
+ align-items: center;
83545
+ gap: 24px;
83546
+ flex-wrap: wrap;
83547
+ `;
83548
+ const FilterGroup = styled.div`
83549
+ display: flex;
83550
+ align-items: center;
83551
+ gap: 8px;
83552
+ `;
83553
+ const FilterLabel = styled.span`
83554
+ font-size: 13px;
83555
+ color: ${({ $color }) => $color};
83556
+ white-space: nowrap;
83557
+ `;
83558
+ const SinceControls = styled.div`
83559
+ display: flex;
83560
+ align-items: center;
83561
+ gap: 8px;
83562
+ `;
83563
+ const FilterTitle = styled.div`
83564
+ font-size: 16px;
83565
+ font-weight: 500;
83566
+ color: ${({ $color }) => $color};
83567
+ margin-bottom: 8px;
83568
+ `;
83455
83569
  const Styled$5 = {
83456
83570
  TopRowContent,
83457
- CustomSelect
83458
- };
83571
+ CustomSelect,
83572
+ FilterRow,
83573
+ FilterGroup,
83574
+ FilterLabel,
83575
+ SinceControls,
83576
+ FilterTitle
83577
+ };
83578
+
83579
+ const SINCE_PRESETS = [
83580
+ { label: "5 min", value: 300 },
83581
+ { label: "15 min", value: 900 },
83582
+ { label: "30 min", value: 1800 },
83583
+ { label: "1 hour", value: 3600 },
83584
+ { label: "2 hours", value: 7200 },
83585
+ { label: "6 hours", value: 21600 },
83586
+ { label: "12 hours", value: 43200 },
83587
+ { label: "24 hours", value: 86400 }
83588
+ ];
83459
83589
 
83460
83590
  const PodLogsMonaco = ({
83461
83591
  cluster,
@@ -83463,12 +83593,85 @@ const PodLogsMonaco = ({
83463
83593
  podName,
83464
83594
  containers,
83465
83595
  initContainers,
83466
- theme,
83596
+ theme: theme$1,
83467
83597
  substractHeight,
83468
- rawPodInfo
83598
+ rawPodInfo,
83599
+ tailLines,
83600
+ sinceSeconds,
83601
+ sinceTime,
83602
+ limitBytes
83469
83603
  }) => {
83604
+ const { token } = theme.useToken();
83605
+ const [notificationApi, contextHolder] = notification.useNotification();
83470
83606
  const [currentContainer, setCurrentContainer] = useState(containers[0] || void 0);
83471
83607
  const [previous, setPrevious] = useState(false);
83608
+ const warningShownRef = useRef(false);
83609
+ useEffect(() => {
83610
+ if (sinceTime && !isValidRFC3339(sinceTime) && !warningShownRef.current) {
83611
+ warningShownRef.current = true;
83612
+ notificationApi.warning({
83613
+ message: "Invalid sinceTime format",
83614
+ description: `Value "${sinceTime}" is not valid RFC3339. Expected format: "2024-01-01T00:00:00Z"`,
83615
+ placement: "bottomRight",
83616
+ duration: 10,
83617
+ style: { maxWidth: 400 }
83618
+ });
83619
+ }
83620
+ }, [sinceTime, notificationApi]);
83621
+ const [pendingTailLines, setPendingTailLines] = useState(tailLines);
83622
+ const [pendingSinceMode, setPendingSinceMode] = useState(sinceTime ? "absolute" : "relative");
83623
+ const [pendingSinceSeconds, setPendingSinceSeconds] = useState(sinceSeconds);
83624
+ const [pendingSinceTime, setPendingSinceTime] = useState(null);
83625
+ const [pendingLimitKB, setPendingLimitKB] = useState(
83626
+ limitBytes ? Math.round(limitBytes / 1024) : void 0
83627
+ );
83628
+ const [appliedFilters, setAppliedFilters] = useState({
83629
+ tailLines,
83630
+ sinceSeconds,
83631
+ sinceTime,
83632
+ limitBytes
83633
+ });
83634
+ const [filterKey, setFilterKey] = useState(0);
83635
+ useEffect(() => {
83636
+ setPendingTailLines(tailLines);
83637
+ setPendingSinceSeconds(sinceSeconds);
83638
+ setPendingLimitKB(limitBytes ? Math.round(limitBytes / 1024) : void 0);
83639
+ setPendingSinceMode(sinceTime ? "absolute" : "relative");
83640
+ }, [tailLines, sinceSeconds, sinceTime, limitBytes]);
83641
+ const matchingPreset = SINCE_PRESETS.find((p) => p.value === pendingSinceSeconds);
83642
+ const handlePresetChange = (value) => {
83643
+ if (value !== null) {
83644
+ setPendingSinceSeconds(value);
83645
+ }
83646
+ };
83647
+ const handleSecondsInputChange = (value) => {
83648
+ setPendingSinceSeconds(value ?? void 0);
83649
+ };
83650
+ const handleSinceModeChange = (e) => {
83651
+ setPendingSinceMode(e.target.value);
83652
+ };
83653
+ const handleDateTimeChange = (value) => {
83654
+ setPendingSinceTime(value);
83655
+ };
83656
+ const handleApply = () => {
83657
+ const newFilters = {
83658
+ tailLines: pendingTailLines,
83659
+ sinceSeconds: pendingSinceMode === "relative" ? pendingSinceSeconds : void 0,
83660
+ sinceTime: pendingSinceMode === "absolute" && pendingSinceTime ? pendingSinceTime.toISOString() : void 0,
83661
+ limitBytes: pendingLimitKB ? pendingLimitKB * 1024 : void 0
83662
+ };
83663
+ setAppliedFilters(newFilters);
83664
+ setFilterKey((prev) => prev + 1);
83665
+ };
83666
+ const handleReset = () => {
83667
+ setPendingTailLines(tailLines);
83668
+ setPendingSinceSeconds(sinceSeconds);
83669
+ setPendingSinceTime(null);
83670
+ setPendingLimitKB(limitBytes ? Math.round(limitBytes / 1024) : void 0);
83671
+ setPendingSinceMode(sinceTime ? "absolute" : "relative");
83672
+ setAppliedFilters({ tailLines, sinceSeconds, sinceTime, limitBytes });
83673
+ setFilterKey((prev) => prev + 1);
83674
+ };
83472
83675
  const endpoint = `/api/clusters/${cluster}/openapi-bff-ws/terminal/podLogs/podLogsNonWs`;
83473
83676
  if (containers.length === 0) {
83474
83677
  return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: "No Running Containers" });
@@ -83498,6 +83701,7 @@ const PodLogsMonaco = ({
83498
83701
  }
83499
83702
  ];
83500
83703
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
83704
+ contextHolder,
83501
83705
  /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$5.TopRowContent, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { gap: 16, children: [
83502
83706
  /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$5.CustomSelect, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
83503
83707
  Select,
@@ -83533,6 +83737,104 @@ const PodLogsMonaco = ({
83533
83737
  }
83534
83738
  ) })
83535
83739
  ] }) }),
83740
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Spacer$1, { $space: 8, $samespace: true }),
83741
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$5.FilterTitle, { $color: token.colorText, children: "Filters" }),
83742
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$5.FilterRow, { children: [
83743
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$5.FilterGroup, { children: [
83744
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$5.FilterLabel, { $color: token.colorTextSecondary, children: "Tail lines:" }),
83745
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
83746
+ InputNumber,
83747
+ {
83748
+ min: 1,
83749
+ placeholder: "All",
83750
+ value: pendingTailLines,
83751
+ onChange: (value) => setPendingTailLines(value ?? void 0),
83752
+ style: { width: 100 }
83753
+ }
83754
+ )
83755
+ ] }),
83756
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$5.FilterGroup, { children: [
83757
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$5.FilterLabel, { $color: token.colorTextSecondary, children: "Since:" }),
83758
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(Radio.Group, { value: pendingSinceMode, onChange: handleSinceModeChange, size: "small", children: [
83759
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Radio.Button, { value: "relative", children: "Relative" }),
83760
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Radio.Button, { value: "absolute", children: "Absolute" })
83761
+ ] })
83762
+ ] }),
83763
+ pendingSinceMode === "relative" && /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$5.SinceControls, { children: [
83764
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
83765
+ Select,
83766
+ {
83767
+ placeholder: "Preset",
83768
+ options: SINCE_PRESETS,
83769
+ value: matchingPreset?.value ?? null,
83770
+ onChange: handlePresetChange,
83771
+ allowClear: true,
83772
+ style: { width: 100 }
83773
+ }
83774
+ ),
83775
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
83776
+ InputNumber,
83777
+ {
83778
+ min: 1,
83779
+ placeholder: "sec",
83780
+ value: pendingSinceSeconds,
83781
+ onChange: handleSecondsInputChange,
83782
+ style: { width: 100 },
83783
+ addonAfter: "sec"
83784
+ }
83785
+ )
83786
+ ] }),
83787
+ pendingSinceMode === "absolute" && /* @__PURE__ */ jsxRuntimeExports.jsx(
83788
+ DatePicker,
83789
+ {
83790
+ showTime: true,
83791
+ value: pendingSinceTime,
83792
+ onChange: handleDateTimeChange,
83793
+ placeholder: "Select date & time"
83794
+ }
83795
+ ),
83796
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$5.FilterGroup, { children: [
83797
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$5.FilterLabel, { $color: token.colorTextSecondary, children: "Limit:" }),
83798
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
83799
+ InputNumber,
83800
+ {
83801
+ min: 1,
83802
+ placeholder: "No limit",
83803
+ value: pendingLimitKB,
83804
+ onChange: (value) => setPendingLimitKB(value ?? void 0),
83805
+ style: { width: 120 },
83806
+ addonAfter: "KB"
83807
+ }
83808
+ )
83809
+ ] }),
83810
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { gap: 8, children: [
83811
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
83812
+ Button,
83813
+ {
83814
+ size: "small",
83815
+ onClick: handleReset,
83816
+ style: {
83817
+ color: "#c77777",
83818
+ borderColor: "#c77777"
83819
+ },
83820
+ children: "Reset"
83821
+ }
83822
+ ),
83823
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
83824
+ Button,
83825
+ {
83826
+ size: "small",
83827
+ onClick: handleApply,
83828
+ style: {
83829
+ backgroundColor: "#5a9a5a",
83830
+ borderColor: "#5a9a5a",
83831
+ color: "#fff"
83832
+ },
83833
+ children: "Apply"
83834
+ }
83835
+ )
83836
+ ] })
83837
+ ] }),
83536
83838
  /* @__PURE__ */ jsxRuntimeExports.jsx(Spacer$1, { $space: 16, $samespace: true }),
83537
83839
  currentContainer && /* @__PURE__ */ jsxRuntimeExports.jsx(
83538
83840
  MonacoEditor,
@@ -83541,11 +83843,15 @@ const PodLogsMonaco = ({
83541
83843
  namespace,
83542
83844
  podName,
83543
83845
  container: currentContainer,
83544
- theme,
83846
+ theme: theme$1,
83545
83847
  substractHeight,
83546
- previous
83848
+ previous,
83849
+ tailLines: appliedFilters.tailLines,
83850
+ sinceSeconds: appliedFilters.sinceSeconds,
83851
+ sinceTime: appliedFilters.sinceTime,
83852
+ limitBytes: appliedFilters.limitBytes
83547
83853
  },
83548
- `${cluster}-${namespace}-${podName}-${currentContainer}-${previous}`
83854
+ `${cluster}-${namespace}-${podName}-${currentContainer}-${previous}-${filterKey}`
83549
83855
  )
83550
83856
  ] });
83551
83857
  };
@@ -85828,5 +86134,5 @@ const usePluginManifest = ({
85828
86134
  });
85829
86135
  };
85830
86136
 
85831
- 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, 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 };
86137
+ 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 };
85832
86138
  //# sourceMappingURL=openapi-k8s-toolkit.es.js.map