Skip to content

Commit

Permalink
Fix Ui for project card and model Defense Model Capability
Browse files Browse the repository at this point in the history
  • Loading branch information
sudhirverma committed Apr 18, 2024
1 parent aad8691 commit 697a457
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 44 deletions.
4 changes: 2 additions & 2 deletions src/pages/BesVersionHistory/AssessmentReport/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@ function printText(item: string) {
} else if (item === "License Compliance") {
return "unique licenses found";
} else if (item === "ScoreCard" || item === "Criticality Score") {
return "on OpenSSF " + item;
return "OpenSSF " + item;
} else {
return "on " + item;
}
Expand Down Expand Up @@ -1086,7 +1086,7 @@ function AssessmentReport({ name, version, itemData, masterData }: any) {
return (
<>
{ reports.map((item, index) => (
<Grid item xs={ 6 } md={ 2 } lg={ 2 } xl={ 2 }>
<Grid item xs={ 6 } md={ 4 } lg={ 4 } xl={ 2 }>
<ReportModal
key={ item }
version={ version }
Expand Down
82 changes: 40 additions & 42 deletions src/pages/FuzzingModel/sections/DefenseSummary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,49 +99,47 @@ function DefenseSummary() {
>
Defense Model Capability
</MKTypography>
<Box sx={ { width: "100%" } } >
<Box sx={ { borderBottom: 1, borderColor: "divider" } }>
<Tabs
value={ value }
onChange={ handleChange }
aria-label="basic tabs example"
style={ { backgroundColor: "#90ee90" } }
>
<Tab
sx={ { fontSize: "12px" } }
label="Evasion"
{ ...a11yProps(0) }
/>
<Tab
sx={ { fontSize: "12px" } }
label="Inference"
{ ...a11yProps(1) }
/>
<Tab
sx={ { fontSize: "12px" } }
label="Extraction"
{ ...a11yProps(2) }
/>
<Tab
sx={ { fontSize: "12px" } }
label="Data Poisoning"
{ ...a11yProps(3) }
/>
</Tabs>
</Box>
<CustomTabPanel value={ value } index={ 0 }>
<DefenceData report={ evasion } reportName="evasion" />
</CustomTabPanel>
<CustomTabPanel value={ value } index={ 1 }>
<DefenceData report={ inference } reportName="inference" />
</CustomTabPanel>
<CustomTabPanel value={ value } index={ 2 }>
<DefenceData report={ extraction } reportName="extraction" />
</CustomTabPanel>
<CustomTabPanel value={ value } index={ 3 }>
<DefenceData report={ dataPoisoning } reportName="dataPoisoning" />
</CustomTabPanel>
<Box>
<Tabs
value={ value }
onChange={ handleChange }
aria-label="basic tabs example"
style={ { backgroundColor: "#90ee90" } }
>
<Tab
sx={ { fontSize: "12px", minWidth: '15px' } }
label="Evasion"
{ ...a11yProps(0) }
/>
<Tab
sx={ { fontSize: "12px", minWidth: '15px' } }
label="Inference"
{ ...a11yProps(1) }
/>
<Tab
sx={ { fontSize: "12px", minWidth: '15px' } }
label="Extraction"
{ ...a11yProps(2) }
/>
<Tab
sx={ { fontSize: "12px", minWidth: '15px' } }
label="Data Poisoning"
{ ...a11yProps(3) }
/>
</Tabs>
</Box>
<CustomTabPanel value={ value } index={ 0 }>
<DefenceData report={ evasion } reportName="evasion" />
</CustomTabPanel>
<CustomTabPanel value={ value } index={ 1 }>
<DefenceData report={ inference } reportName="inference" />
</CustomTabPanel>
<CustomTabPanel value={ value } index={ 2 }>
<DefenceData report={ extraction } reportName="extraction" />
</CustomTabPanel>
<CustomTabPanel value={ value } index={ 3 }>
<DefenceData report={ dataPoisoning } reportName="dataPoisoning" />
</CustomTabPanel>
</MKBox>
</Card>
</Grid>
Expand Down

0 comments on commit 697a457

Please sign in to comment.