Skip to content

Commit

Permalink
fix: rc-4 bug bash bug fixes (#1343)
Browse files Browse the repository at this point in the history
Co-authored-by: Darshan Simha <[email protected]>
(cherry picked from commit f1af1f0)
Signed-off-by: Derek Wang <[email protected]>
  • Loading branch information
2 people authored and whynowy committed Nov 3, 2023
1 parent a53fae0 commit 660ff50
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 74 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ export function ISBServiceCard({

const isbType = GetISBType(data?.isbService?.spec) || UNKNOWN;
const isbStatus = data?.isbService?.status?.phase || UNKNOWN;
const isbSize =
isbType !== UNKNOWN && data?.isbService?.spec[isbType]
? data?.isbService?.spec[isbType].replicas
? data?.isbService?.spec[isbType].replicas
: 3
: UNKNOWN;

return (
<>
Expand All @@ -83,7 +89,7 @@ export function ISBServiceCard({
display: "flex",
flexDirection: "column",
width: "100%",
borderRadius: "1rem"
borderRadius: "1rem",
}}
>
<Box
Expand Down Expand Up @@ -145,9 +151,8 @@ export function ISBServiceCard({
paddingLeft: "1rem",
}}
>
<span>ISB Services:</span>
<span>ISB Type:</span>
<span>ISB Size:</span>
<span>Status:</span>
<span>Health:</span>
</Box>
<Box
sx={{
Expand All @@ -157,16 +162,29 @@ export function ISBServiceCard({
paddingLeft: "1rem",
}}
>
<span>{data?.name}</span>
<span>{isbType}</span>
<span>
{isbType && data?.isbService?.spec[isbType]
? data?.isbService?.spec[isbType].replicas
: UNKNOWN}
</span>
<img
src={IconsStatusMap[isbStatus]}
alt="Status"
className={"pipeline-logo"}
/>
<img
src={IconsStatusMap[data?.status]}
alt="Health"
className={"pipeline-logo"}
/>
</Box>
<Box
sx={{
display: "flex",
flexDirection: "column",
paddingTop: "1rem",
paddingLeft: "1rem",
}}
>
<span>{ISBStatusString[isbStatus]}</span>
<span>{ISBStatusString[data?.status]}</span>
</Box>
</Grid>

<Grid
container
spacing={2}
Expand All @@ -184,8 +202,9 @@ export function ISBServiceCard({
paddingLeft: "1rem",
}}
>
<span>Status:</span>
<span>Health:</span>
<span>Name:</span>
<span>Type:</span>
<span>Size:</span>
</Box>
<Box
sx={{
Expand All @@ -195,27 +214,9 @@ export function ISBServiceCard({
paddingLeft: "1rem",
}}
>
<img
src={IconsStatusMap[isbStatus]}
alt="Status"
className={"pipeline-logo"}
/>
<img
src={IconsStatusMap[data?.status]}
alt="Health"
className={"pipeline-logo"}
/>
</Box>
<Box
sx={{
display: "flex",
flexDirection: "column",
paddingTop: "1rem",
paddingLeft: "1rem",
}}
>
<span>{ISBStatusString[isbStatus]}</span>
<span>{ISBStatusString[data?.status]}</span>
<span>{data?.name}</span>
<span>{isbType}</span>
<span>{isbSize}</span>
</Box>
</Grid>
<Grid
Expand Down
70 changes: 33 additions & 37 deletions ui/src/components/pages/Namespace/partials/PipelineCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,12 @@ export function PipelineCard({
}, []);

const isbType = GetISBType(isbData?.isbService?.spec) || UNKNOWN;
const isbSize =
isbType !== UNKNOWN && isbData?.isbService?.spec[isbType]
? isbData?.isbService?.spec[isbType].replicas
? isbData?.isbService?.spec[isbType].replicas
: 3
: UNKNOWN;
const isbStatus = isbData?.isbService?.status?.phase || UNKNOWN;
const isbHealthStatus = isbData?.status || UNKNOWN;
const pipelineStatus = statusData?.pipeline?.status?.phase || UNKNOWN;
Expand Down Expand Up @@ -230,7 +236,7 @@ export function PipelineCard({
flexDirection: "column",
// padding: "1.5rem",
width: "100%",
borderRadius: "1rem"
borderRadius: "1rem",
}}
>
<Box
Expand Down Expand Up @@ -457,9 +463,7 @@ export function PipelineCard({
<span>{StatusString[statusData?.status]}</span>
</Box>
</Grid>

<Grid

container
spacing={2}
sx={{
Expand All @@ -476,9 +480,9 @@ export function PipelineCard({
paddingLeft: "1rem",
}}
>
<span>ISB Services:</span>
<span>ISB Type:</span>
<span>ISB Size:</span>
<span style={{ fontWeight: "500" }}>ISB Services</span>
<span>Status:</span>
<span>Health:</span>
</Box>
<Box
sx={{
Expand All @@ -488,16 +492,25 @@ export function PipelineCard({
paddingLeft: "1rem",
}}
>
<span>{isbData?.name}</span>
<span>{isbType}</span>
<span>
{isbType !== UNKNOWN && isbData?.isbService?.spec[isbType]
? isbData?.isbService?.spec[isbType].replicas
: UNKNOWN}
</span>
<Box sx={{ display: "flex", flexDirection: "row" }}>&nbsp;</Box>
<Box sx={{ display: "flex", flexDirection: "row" }}>
<img
src={IconsStatusMap[isbStatus]}
alt="Status"
className={"pipeline-logo"}
/>
&nbsp; &nbsp;<span>{ISBStatusString[isbStatus]}</span>
</Box>
<Box sx={{ display: "flex", flexDirection: "row" }}>
<img
src={IconsStatusMap[isbHealthStatus]}
alt="Health"
className={"pipeline-logo"}
/>
&nbsp; &nbsp;<span>{ISBStatusString[isbHealthStatus]}</span>
</Box>
</Box>
</Grid>

<Grid
container
spacing={2}
Expand All @@ -515,27 +528,9 @@ export function PipelineCard({
paddingLeft: "1rem",
}}
>
<span>Status:</span>
<span>Health:</span>
</Box>
<Box
sx={{
display: "flex",
flexDirection: "column",
paddingTop: "1rem",
paddingLeft: "1rem",
}}
>
<img
src={IconsStatusMap[isbStatus]}
alt="Status"
className={"pipeline-logo"}
/>
<img
src={IconsStatusMap[isbHealthStatus]}
alt="Health"
className={"pipeline-logo"}
/>
<span>Name:</span>
<span>Type:</span>
<span>Size:</span>
</Box>
<Box
sx={{
Expand All @@ -545,8 +540,9 @@ export function PipelineCard({
paddingLeft: "1rem",
}}
>
<span>{ISBStatusString[isbStatus]}</span>
<span>{ISBStatusString[isbHealthStatus]}</span>
<span>{isbData?.name}</span>
<span>{isbType}</span>
<span>{isbSize}</span>
</Box>
</Grid>
<Grid
Expand Down
5 changes: 4 additions & 1 deletion ui/src/components/pages/Pipeline/partials/Graph/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,10 @@ const Flow = (props: FlowProps) => {
<Panel
position="top-left"
className={"legend"}
style={{ marginTop: isCollapsed ? "5.75rem" : "9.5rem" }}
style={{
marginTop: isCollapsed ? "5.75rem" : "9.5rem",
cursor: "default",
}}
>
<Accordion>
<AccordionSummary
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 660ff50

Please sign in to comment.