Skip to content

Commit

Permalink
Reworded Dependencies messages (#584)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pramit Kumar Dutta authored Feb 13, 2024
1 parent d903d16 commit d29d9d0
Showing 1 changed file with 34 additions and 10 deletions.
44 changes: 34 additions & 10 deletions src/pages/BesVersionHistory/AssessmentReport/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -722,17 +722,18 @@ const FetchSBOM = ({data, masterData, name}: any) => {
display: "flex",
paddingLeft: "calc(0.1rem + 0.3vw)"
}}>
<b key={`BOLDSBOM1`}>Tracked under BeS :</b>
<b key={`BOLDSBOM1`}>Tracked in the lab:</b>
</MKTypography>
) : (
<MKTypography key="MKTypoSBOMMain" variant="body1"
color="inherit"

style={{
fontSize: "12px", display: "flex",
justifyContent: "center", alignItems: "center", position: "relative", top: "55px"
justifyContent: "center", position: "relative", top: "40px",
paddingLeft: "calc(0.1rem + 0.5vw)"
}}>
<b key={`BOLDSBOM1`}>No dependencies tracked under BeS</b>
<b key={`BOLDSBOM1`}>None of the dependencies detected are currently tracked in this lab</b>
</MKTypography>
)}
<Grid key={`GRIDSBOMSUBMAIN`}
Expand Down Expand Up @@ -1082,7 +1083,7 @@ const GetAssessmentData = ({ version, name, report, itemData, masterData }: any)
</>
);
}
let flag = false;

if (report === "Dependencies" && jsonDataLength !== 0) {
if (!(jsonData.packages.length === 1 && jsonData.packages[0].name.toLowerCase() === name.toLowerCase())){
return (<>
Expand Down Expand Up @@ -1119,7 +1120,34 @@ const GetAssessmentData = ({ version, name, report, itemData, masterData }: any)
</>
);
} else {
flag = true;
return (<>
<Typography variant="h6"
key="TYPOSBOMMAIN1"
color="inherit"
style={{
fontSize: "calc(0.6rem + 0.5vw)"
}}>
<Link to={""}
key="LINKSBOMMAIN1"
style={{
fontSize: "calc(0.6rem + 0.5vw)",
display: "flex",
justifyContent: "center"
}}>
{(jsonData.packages.length)-1}
</Link>
</Typography>
<MKTypography variant="h6"
key="TYPOSBOMMAINBLANK1"
color="inherit"
style={{
fontSize: "12px", display: "flex",
justifyContent: "center", alignItems: "center", position: "relative", top: "40px"
}}>
No dependent packages are identified
</MKTypography>
</>
);
}

}
Expand All @@ -1132,11 +1160,7 @@ const GetAssessmentData = ({ version, name, report, itemData, masterData }: any)
fontSize: "12px", display: "flex",
justifyContent: "center", alignItems: "center", position: "relative", top: "67px"
}}>
{flag ? (
"No dependent packages are available"
) : (
"Assessment report not available"
)}
Assessment report not available
</MKTypography>
);
};
Expand Down

0 comments on commit d29d9d0

Please sign in to comment.