Explorar o código

Merge branch 'belanger/agent-v3-integration' into dev

Alexander Belanger %!s(int64=3) %!d(string=hai) anos
pai
achega
25f10698d6

+ 8 - 2
dashboard/src/main/home/cluster-dashboard/expanded-chart/deploy-status-section/ControllerTab.tsx

@@ -161,7 +161,13 @@ const ControllerTabFC: React.FunctionComponent<Props> = ({
    * @param rawList A rawList of pods in case we don't want to use the state one. Useful to
    * avoid problems with reactivity
    */
-  const handleSelectPod = (pod: ControllerTabPodType, rawList?: any[], userSelected?: boolean) => {
+  const handleSelectPod = (
+    pod: ControllerTabPodType,
+    rawList?: any[],
+    userSelected?: boolean
+  ) => {
+    console.log(rawPodList, rawList, !!userSelected);
+
     const rawPod = [...rawPodList, ...(rawList || [])].find(
       (rawPod) => rawPod?.metadata?.name === pod?.name
     );
@@ -308,7 +314,7 @@ const ControllerTabFC: React.FunctionComponent<Props> = ({
             status === "failed" &&
               pod.status?.message &&
               setPodError(pod.status?.message);
-            handleSelectPod(pod, true);
+            handleSelectPod(pod, [], true);
             setUserSelectedPod(true);
           }}
           onDeleteClick={(e: MouseEvent) => {

+ 8 - 2
dashboard/src/main/home/cluster-dashboard/expanded-chart/deploy-status-section/DeployStatusSection.tsx

@@ -101,6 +101,12 @@ const DeployStatusSection: React.FC<Props> = (props) => {
             onUpdate={onUpdate}
             // Allow users to navigate to pod logs upon clicking the pod
             onSelectPod={(pod: any) => {
+              console.log(
+                "SET LOG DATA",
+                pod?.metadata?.name,
+                pod?.metadata?.annotations?.["helm.sh/revision"]
+              );
+
               props.setLogData({
                 podName: pod?.metadata?.name,
                 revision: pod?.metadata?.annotations?.["helm.sh/revision"],
@@ -135,7 +141,7 @@ const DropdownWrapper = styled.div<{
   position: absolute;
   left: ${(props) => (props.dropdownAlignRight ? "" : "0")};
   right: ${(props) => (props.dropdownAlignRight ? "0" : "")};
-  z-index: 1;
+  z-index: 5;
   top: calc(100% + 7px);
   width: 35%;
   min-width: 400px;
@@ -196,7 +202,7 @@ const StatusWrapper = styled.div`
   display: flex;
   justify-content: space-between;
   align-items: center;
-  gap: 5px;
+  gap: 10px;
 `;
 
 const StatusColor = styled.div`

+ 8 - 8
dashboard/src/main/home/cluster-dashboard/expanded-chart/deploy-status-section/PodRow.tsx

@@ -29,12 +29,12 @@ const PodRow: React.FunctionComponent<PodRowProps> = ({
         <Rail lastTab={isLastItem} />
       </Gutter>
       <Name
-        onMouseOver={() => {
-          setShowTooltip(true);
-        }}
-        onMouseOut={() => {
-          setShowTooltip(false);
-        }}
+      // onMouseOver={() => {
+      //   setShowTooltip(true);
+      // }}
+      // onMouseOut={() => {
+      //   setShowTooltip(false);
+      // }}
       >
         {pod?.name}
       </Name>
@@ -57,14 +57,14 @@ const PodRow: React.FunctionComponent<PodRowProps> = ({
       <Status>
         {podStatus}
         <StatusColor status={podStatus} />
-        {podStatus === "failed" && (
+        {/* {podStatus === "failed" && (
           <CloseIcon
             className="material-icons-outlined"
             onClick={onDeleteClick}
           >
             close
           </CloseIcon>
-        )}
+        )} */}
       </Status>
     </Tab>
   );

+ 3 - 3
dashboard/src/main/home/cluster-dashboard/expanded-chart/logs-section/LogsSection.tsx

@@ -343,7 +343,7 @@ export default LogsSection;
 const BackButton = styled.div`
   display: flex;
   width: 30px;
-  z-index: 999;
+  z-index: 2;
   cursor: pointer;
   height: 30px;
   align-items: center;
@@ -627,7 +627,7 @@ const ToggleOption = styled.div<{ selected: boolean; nudgeLeft?: boolean }>`
     props.nudgeLeft ? "0 5px 5px 0" : "5px 0 0 5px"};
   :hover {
     border: 1px solid #7a7b80;
-    z-index: 999;
+    z-index: 2;
   }
 `;
 
@@ -644,7 +644,7 @@ const ToggleButton = styled.div`
 const TimeIcon = styled.img<{ selected?: boolean }>`
   width: 16px;
   height: 16px;
-  z-index: 999;
+  z-index: 2;
   opacity: ${(props) => (props.selected ? "" : "50%")};
 `;