Skip to content

Commit

Permalink
Replaced text for changing views with icons (#501)
Browse files Browse the repository at this point in the history
* Added project count

* Added graphs

* Fix #480

* Added icons
  • Loading branch information
asa1997 authored Jan 2, 2024
1 parent 2c88f9f commit 368262e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
Binary file added src/assets/images/arc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/cells.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/data-flow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 6 additions & 3 deletions src/examples/Button/ThreeWayToggle/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import ToggleButton from '@mui/material/ToggleButton';
import ToggleButtonGroup from '@mui/material/ToggleButtonGroup';
import ModelTable from '../../../pages/ModelOfInterest/ModelDisplay/ModelTable';
import SearchVoiList from '../../../pages/VulnerabilityOfInterest/VoiTable/SearchVoiList';
import graphIcon from "../../../assets/images/data-flow.png"
import tableIcon from "../../../assets/images/cells.png"
import arcIcon from "../../../assets/images/arc.png"

function switchView(viewValue:any, filteredCveReport: any, filterName: any, handleFilterByName: any) {
switch (viewValue) {
Expand Down Expand Up @@ -46,9 +49,9 @@ export default function ThreeWayToggleButton({filteredCveReport, filterName, han
aria-label="Platform"
style={{ float: 'right', paddingTop: "2%", paddingRight: "1%"}}
>
<ToggleButton style={{ color: "black", fontWeight: "bold" }} value="table">Table</ToggleButton>
<ToggleButton style={{ color: "black", fontWeight: "bold" }} value="graph">Graph</ToggleButton>
<ToggleButton style={{ color: "black", fontWeight: "bold" }} value="arc">Arc</ToggleButton>
<ToggleButton style={{ color: "black", fontWeight: "bold" }} value="table" title='Table view of models'><img style={{ display: "block", width: "17px" }} src={tableIcon} /></ToggleButton>
<ToggleButton style={{ color: "black", fontWeight: "bold" }} value="graph" title='Force directed graph that show the models and its dependencies'><img style={{ display: "block", width: "17px" }} src={graphIcon} /></ToggleButton>
<ToggleButton style={{ color: "black", fontWeight: "bold" }} value="arc" title='Arc graph that shows the dependencies between models, vulnerabilities and projects'><img style={{ display: "block", width: "17px" }} src={arcIcon} /></ToggleButton>
</ToggleButtonGroup>
{switchView(view, filteredCveReport, filterName, handleFilterByName)}
</>
Expand Down

0 comments on commit 368262e

Please sign in to comment.