Skip to content

Commit

Permalink
fix: remove console
Browse files Browse the repository at this point in the history
  • Loading branch information
Calvin Bui authored and Calvin Bui committed Sep 17, 2024
1 parent a3b8128 commit e2d46d3
Showing 1 changed file with 37 additions and 37 deletions.
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
import React, { useContext } from "react";
import { RolloutComponentContext } from "./RolloutComponentWrapper";
import { Box } from "@mui/material";
import { SquareCheckIcon } from "../utils/SquareCheckIcon";
import { SquareCancelIcon } from "../utils/SquareCancelIcon";
import React, {useContext} from "react";
import {RolloutComponentContext} from "./RolloutComponentWrapper";
import {Box} from "@mui/material";
import {SquareCheckIcon} from "../utils/SquareCheckIcon";
import {SquareCancelIcon} from "../utils/SquareCancelIcon";

export const PipelineRollout = () => {
const { props, kindToNodeMap } = useContext(RolloutComponentContext);
const {props, kindToNodeMap} = useContext(RolloutComponentContext);
const conditions = props?.resource?.status?.conditions
const hasChildResourcesHealthy = conditions.some(condition => condition.type === 'ChildResourcesHealthy');

return (
<Box>
<Box>
{kindToNodeMap.get("Pipeline")?.map((node) => {
return (
<Box key={node?.name}>
<Box>Pipeline Name: {node?.name}</Box>
<Box
sx={{
display: "flex",
flexDirection: "row",
width: "100%",
backgroundColor: "#dee6eb",
borderRadius: "3px",
padding: "6px",
flexWrap: "wrap",
marginRight: "-3px",
marginBottom: "-3px",
}}
>
Pipeline Status:{" "}
{hasChildResourcesHealthy ? (
<SquareCheckIcon tooltipTitle={node?.name} />
) : (
<SquareCancelIcon tooltipTitle={node?.name} />
)}
</Box>
<Box>
<Box>
{kindToNodeMap.get("Pipeline")?.map((node) => {
return (
<Box key={node?.name}>
<Box>Pipeline Name: {node?.name}</Box>
<Box
sx={{
display: "flex",
flexDirection: "row",
width: "100%",
backgroundColor: "#dee6eb",
borderRadius: "3px",
padding: "6px",
flexWrap: "wrap",
marginRight: "-3px",
marginBottom: "-3px",
}}
>
Pipeline Status:{" "}
{hasChildResourcesHealthy ? (
<SquareCheckIcon tooltipTitle={node?.name}/>
) : (
<SquareCancelIcon tooltipTitle={node?.name}/>
)}
</Box>
</Box>
);
})}
</Box>
);
})}
</Box>
</Box>
);
</Box>
);
};

0 comments on commit e2d46d3

Please sign in to comment.