Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Ui for project card and model Defense Model Capability #626

Merged
merged 1 commit into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading