@prorobotech/openapi-k8s-toolkit 0.0.1-alpha.68 → 0.0.1-alpha.69

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -44927,25 +44927,26 @@ var addonFit = {exports: {}};
44927
44927
 
44928
44928
  var addonFitExports = addonFit.exports;
44929
44929
 
44930
- const FullWidthDiv$3 = st.div`
44931
- display: flex;
44932
- justify-content: center;
44933
- width: 100%;
44934
- `;
44935
44930
  const CustomCard$3 = st.div`
44936
44931
  visibility: ${({ $isVisible }) => $isVisible ? "visible" : "hidden"};
44937
- max-height: calc(100vh - 158px);
44932
+ height: calc(100vh - ${({ $substractHeight }) => $substractHeight}px);
44938
44933
 
44939
44934
  * {
44940
44935
  scrollbar-width: thin;
44941
44936
  }
44942
44937
  `;
44938
+ const FullWidthDiv$3 = st.div`
44939
+ display: flex;
44940
+ justify-content: center;
44941
+ width: 100%;
44942
+ height: calc(100vh - ${({ $substractHeight }) => $substractHeight}px);
44943
+ `;
44943
44944
  const Styled$7 = {
44944
44945
  FullWidthDiv: FullWidthDiv$3,
44945
44946
  CustomCard: CustomCard$3
44946
44947
  };
44947
44948
 
44948
- const XTerminal$2 = ({ endpoint, namespace, podName, container }) => {
44949
+ const XTerminal$2 = ({ endpoint, namespace, podName, container, substractHeight }) => {
44949
44950
  const [isLoading, setIsLoading] = useState(true);
44950
44951
  const [error, setError] = useState();
44951
44952
  const [terminal, setTerminal] = useState();
@@ -45025,7 +45026,7 @@ const XTerminal$2 = ({ endpoint, namespace, podName, container }) => {
45025
45026
  };
45026
45027
  }, [terminal, endpoint, namespace, podName, container]);
45027
45028
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
45028
- /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$7.CustomCard, { $isVisible: !isLoading && !error, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$7.FullWidthDiv, { children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: terminalRef, style: { width: "100%", height: "100%" } }) }) }),
45029
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$7.CustomCard, { $isVisible: !isLoading && !error, $substractHeight: substractHeight, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$7.FullWidthDiv, { $substractHeight: substractHeight, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: terminalRef, style: { width: "100%", height: "100%" } }) }) }),
45029
45030
  isLoading && !error && /* @__PURE__ */ jsxRuntimeExports.jsx(Spin, {}),
45030
45031
  error && /* @__PURE__ */ jsxRuntimeExports.jsx(Result, { status: "error", title: "Error", subTitle: JSON.stringify(error) })
45031
45032
  ] });
@@ -45040,7 +45041,7 @@ const Styled$6 = {
45040
45041
  CustomSelect: CustomSelect$3
45041
45042
  };
45042
45043
 
45043
- const PodTerminal$1 = ({ cluster, namespace, podName, containers }) => {
45044
+ const PodTerminal$1 = ({ cluster, namespace, podName, containers, substractHeight }) => {
45044
45045
  const [selectValue, setSelectValue] = useState(containers[0] || void 0);
45045
45046
  const [currentContainer, setCurrentContainer] = useState();
45046
45047
  const [hash, setHash] = useState(0);
@@ -45085,27 +45086,29 @@ const PodTerminal$1 = ({ cluster, namespace, podName, containers }) => {
45085
45086
  endpoint,
45086
45087
  namespace,
45087
45088
  podName,
45088
- container: currentContainer
45089
+ container: currentContainer,
45090
+ substractHeight
45089
45091
  },
45090
45092
  `${cluster}-${namespace}-${podName}-${currentContainer}-${hash}`
45091
45093
  )
45092
45094
  ] });
45093
45095
  };
45094
45096
 
45095
- const FullWidthDiv$2 = st.div`
45096
- display: flex;
45097
- justify-content: center;
45098
- width: 100%;
45099
- `;
45100
45097
  const CustomCard$2 = st.div`
45101
45098
  visibility: ${({ $isVisible }) => $isVisible ? "visible" : "hidden"};
45102
- max-height: calc(100vh - 158px);
45099
+ height: calc(100vh - ${({ $substractHeight }) => $substractHeight}px);
45103
45100
 
45104
45101
  * {
45105
45102
  scrollbar-width: thin;
45106
45103
  }
45107
45104
  `;
45108
- const ShutdownContainer$2 = st.div`
45105
+ const FullWidthDiv$2 = st.div`
45106
+ display: flex;
45107
+ justify-content: center;
45108
+ width: 100%;
45109
+ height: calc(100vh - ${({ $substractHeight }) => $substractHeight}px);
45110
+ `;
45111
+ const ShutdownContainer$1 = st.div`
45109
45112
  visibility: ${({ $isVisible }) => $isVisible ? "visible" : "hidden"};
45110
45113
  margin-top: -40px;
45111
45114
  display: flex;
@@ -45123,11 +45126,11 @@ const ProgressContainer = st.div`
45123
45126
  const Styled$5 = {
45124
45127
  FullWidthDiv: FullWidthDiv$2,
45125
45128
  CustomCard: CustomCard$2,
45126
- ShutdownContainer: ShutdownContainer$2,
45129
+ ShutdownContainer: ShutdownContainer$1,
45127
45130
  ProgressContainer
45128
45131
  };
45129
45132
 
45130
- const XTerminal$1 = ({ endpoint, nodeName, profile }) => {
45133
+ const XTerminal$1 = ({ endpoint, nodeName, profile, substractHeight }) => {
45131
45134
  const [isLoading, setIsLoading] = useState(true);
45132
45135
  const [error, setError] = useState();
45133
45136
  const [isTerminalVisible, setIsTerminalVisible] = useState(false);
@@ -45273,7 +45276,7 @@ const XTerminal$1 = ({ endpoint, nodeName, profile }) => {
45273
45276
  }
45274
45277
  ) }),
45275
45278
  /* @__PURE__ */ jsxRuntimeExports.jsx(Spacer$1, { $space: 8, $samespace: true }),
45276
- /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$5.CustomCard, { $isVisible: isTerminalVisible, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$5.FullWidthDiv, { children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: terminalRef, style: { width: "100%", height: "100%" } }) }) }),
45279
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$5.CustomCard, { $isVisible: isTerminalVisible, $substractHeight: substractHeight, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$5.FullWidthDiv, { $substractHeight: substractHeight, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: terminalRef, style: { width: "100%", height: "100%" } }) }) }),
45277
45280
  !isTerminalVisible && !error && isWarmingUp && /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$5.ProgressContainer, { children: [
45278
45281
  isLoading && /* @__PURE__ */ jsxRuntimeExports.jsx(Spin, {}),
45279
45282
  !isLoading && /* @__PURE__ */ jsxRuntimeExports.jsx(Progress, { type: "circle", percent: progressPercent }),
@@ -45299,7 +45302,7 @@ const Styled$4 = {
45299
45302
  CustomSelect: CustomSelect$2
45300
45303
  };
45301
45304
 
45302
- const NodeTerminal$1 = ({ cluster, nodeName }) => {
45305
+ const NodeTerminal$1 = ({ cluster, nodeName, substractHeight }) => {
45303
45306
  const [selectValue, setSelectValue] = useState();
45304
45307
  const [currentProfile, setCurrentProfile] = useState();
45305
45308
  const [hash, setHash] = useState(0);
@@ -45337,7 +45340,8 @@ const NodeTerminal$1 = ({ cluster, nodeName }) => {
45337
45340
  {
45338
45341
  endpoint,
45339
45342
  nodeName,
45340
- profile: currentProfile
45343
+ profile: currentProfile,
45344
+ substractHeight
45341
45345
  },
45342
45346
  `${cluster}-${nodeName}-${currentProfile}-${hash}`
45343
45347
  )
@@ -45357,7 +45361,7 @@ const CustomCard$1 = st.div`
45357
45361
  scrollbar-width: thin;
45358
45362
  }
45359
45363
  `;
45360
- const ShutdownContainer$1 = st.div`
45364
+ const ShutdownContainer = st.div`
45361
45365
  margin-top: -40px;
45362
45366
  display: flex;
45363
45367
  justify-content: flex-end;
@@ -45365,7 +45369,7 @@ const ShutdownContainer$1 = st.div`
45365
45369
  const Styled$3 = {
45366
45370
  FullWidthDiv: FullWidthDiv$1,
45367
45371
  CustomCard: CustomCard$1,
45368
- ShutdownContainer: ShutdownContainer$1
45372
+ ShutdownContainer
45369
45373
  };
45370
45374
 
45371
45375
  const XTerminal = ({ endpoint, namespace, podName, container }) => {
@@ -45542,7 +45546,7 @@ const CustomCard = st.div`
45542
45546
  scrollbar-width: thin;
45543
45547
  }
45544
45548
  `;
45545
- const ShutdownContainer = st.div`
45549
+ const RightAboveContainer = st.div`
45546
45550
  margin-top: -40px;
45547
45551
  display: flex;
45548
45552
  justify-content: flex-end;
@@ -45550,13 +45554,21 @@ const ShutdownContainer = st.div`
45550
45554
  const Styled$1 = {
45551
45555
  FullWidthDiv,
45552
45556
  CustomCard,
45553
- ShutdownContainer
45557
+ RightAboveContainer
45554
45558
  };
45555
45559
 
45556
- const MonacoEditor = ({ endpoint, namespace, podName, container, theme }) => {
45560
+ const MonacoEditor = ({
45561
+ endpoint,
45562
+ namespace,
45563
+ podName,
45564
+ container,
45565
+ theme,
45566
+ substractHeight
45567
+ }) => {
45557
45568
  const [isLoading, setIsLoading] = useState(true);
45558
45569
  const [error, setError] = useState();
45559
45570
  const [isTerminalVisible, setIsTerminalVisible] = useState(false);
45571
+ const [isPaused, setIsPaused] = useState(false);
45560
45572
  const socketRef = useRef(null);
45561
45573
  const editorRef = useRef(null);
45562
45574
  const handleEditorDidMount = (editor) => {
@@ -45611,20 +45623,27 @@ const MonacoEditor = ({ endpoint, namespace, podName, container, theme }) => {
45611
45623
  };
45612
45624
  }, [endpoint, namespace, podName, container]);
45613
45625
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
45614
- /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$1.ShutdownContainer, { $isVisible: isTerminalVisible, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
45626
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$1.RightAboveContainer, { $isVisible: isTerminalVisible, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
45615
45627
  Button,
45616
45628
  {
45617
- type: "dashed",
45618
- disabled: !socketRef.current,
45619
45629
  onClick: () => {
45620
- setIsTerminalVisible(false);
45621
- socketRef.current?.send(
45622
- JSON.stringify({
45623
- type: "close"
45624
- })
45625
- );
45630
+ if (isPaused) {
45631
+ setIsPaused(false);
45632
+ socketRef.current?.send(
45633
+ JSON.stringify({
45634
+ type: "continue"
45635
+ })
45636
+ );
45637
+ } else {
45638
+ setIsPaused(true);
45639
+ socketRef.current?.send(
45640
+ JSON.stringify({
45641
+ type: "stop"
45642
+ })
45643
+ );
45644
+ }
45626
45645
  },
45627
- children: "Terminate"
45646
+ children: isPaused ? "Continue" : "Stop"
45628
45647
  }
45629
45648
  ) }),
45630
45649
  /* @__PURE__ */ jsxRuntimeExports.jsx(Spacer$1, { $space: 8, $samespace: true }),
@@ -45633,7 +45652,7 @@ const MonacoEditor = ({ endpoint, namespace, podName, container, theme }) => {
45633
45652
  {
45634
45653
  defaultLanguage: "yaml",
45635
45654
  width: "100%",
45636
- height: 464,
45655
+ height: `calc(100vh - ${substractHeight}px`,
45637
45656
  theme: theme === "dark" ? "vs-dark" : theme === void 0 ? "vs-dark" : "vs",
45638
45657
  options: {
45639
45658
  theme: theme === "dark" ? "vs-dark" : theme === void 0 ? "vs-dark" : "vs",
@@ -45656,7 +45675,14 @@ const Styled = {
45656
45675
  CustomSelect
45657
45676
  };
45658
45677
 
45659
- const PodLogsMonaco = ({ cluster, namespace, podName, containers, theme }) => {
45678
+ const PodLogsMonaco = ({
45679
+ cluster,
45680
+ namespace,
45681
+ podName,
45682
+ containers,
45683
+ theme,
45684
+ substractHeight
45685
+ }) => {
45660
45686
  const [selectValue, setSelectValue] = useState(containers[0] || void 0);
45661
45687
  const [currentContainer, setCurrentContainer] = useState();
45662
45688
  const [hash, setHash] = useState(0);
@@ -45702,7 +45728,8 @@ const PodLogsMonaco = ({ cluster, namespace, podName, containers, theme }) => {
45702
45728
  namespace,
45703
45729
  podName,
45704
45730
  container: currentContainer,
45705
- theme
45731
+ theme,
45732
+ substractHeight
45706
45733
  },
45707
45734
  `${cluster}-${namespace}-${podName}-${currentContainer}-${hash}`
45708
45735
  )
@@ -46249,6 +46276,7 @@ const PodTerminal = ({
46249
46276
  cluster,
46250
46277
  namespace,
46251
46278
  podName,
46279
+ substractHeight,
46252
46280
  ...props
46253
46281
  } = data;
46254
46282
  const partsOfUrl = usePartsOfUrl();
@@ -46302,6 +46330,7 @@ const PodTerminal = ({
46302
46330
  namespace: namespacePrepared,
46303
46331
  podName: podNamePrepared,
46304
46332
  containers,
46333
+ substractHeight: substractHeight || 332,
46305
46334
  ...props
46306
46335
  }
46307
46336
  ),
@@ -46336,6 +46365,7 @@ const NodeTerminal = ({
46336
46365
  id,
46337
46366
  cluster,
46338
46367
  nodeName,
46368
+ substractHeight,
46339
46369
  ...props
46340
46370
  } = data;
46341
46371
  const partsOfUrl = usePartsOfUrl();
@@ -46355,7 +46385,15 @@ const NodeTerminal = ({
46355
46385
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading multiquery" });
46356
46386
  }
46357
46387
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
46358
- /* @__PURE__ */ jsxRuntimeExports.jsx(NodeTerminal$1, { cluster: clusterPrepared, nodeName: nodeNamePrepared, ...props }),
46388
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
46389
+ NodeTerminal$1,
46390
+ {
46391
+ cluster: clusterPrepared,
46392
+ nodeName: nodeNamePrepared,
46393
+ substractHeight: substractHeight || 332,
46394
+ ...props
46395
+ }
46396
+ ),
46359
46397
  children
46360
46398
  ] });
46361
46399
  };
@@ -46390,6 +46428,7 @@ const PodLogs = ({
46390
46428
  cluster,
46391
46429
  namespace,
46392
46430
  podName,
46431
+ substractHeight,
46393
46432
  ...props
46394
46433
  } = data;
46395
46434
  const partsOfUrl = usePartsOfUrl();
@@ -46444,6 +46483,7 @@ const PodLogs = ({
46444
46483
  podName: podNamePrepared,
46445
46484
  containers,
46446
46485
  theme,
46486
+ substractHeight: substractHeight || 332,
46447
46487
  ...props
46448
46488
  }
46449
46489
  ),