Skip to content

Commit

Permalink
Rename the graph view to better represent its features
Browse files Browse the repository at this point in the history
  • Loading branch information
RickdeJager committed Oct 13, 2022
1 parent f19e0d3 commit b79ca6e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
16 changes: 7 additions & 9 deletions frontend/src/components/Corrie.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,16 +107,16 @@ export const Corrie = () => {
packets
</button>
<button
className={mode == "tags" ? activeButtonClass : inactiveButtonClass}
onClick={() => setCorrelationMode("tags")}
className={mode == "volume" ? activeButtonClass : inactiveButtonClass}
onClick={() => setCorrelationMode("volume")}
>
tags
volume
</button>
</div>
</div>
<div className="flex-1 w-full overflow-hidden p-4">
{(mode == "packets" || mode == "time") && TimePacketGraph(graphProps)}
{mode == "tags" && TagGraph(graphProps)}
{mode == "volume" && VolumeGraph(graphProps)}
</div>
</div>
);
Expand Down Expand Up @@ -197,7 +197,7 @@ function TimePacketGraph(graphProps: GraphProps) {
);
}

function TagGraph(graphProps: GraphProps) {
function VolumeGraph(graphProps: GraphProps) {
const flowList = graphProps.flowList;
const mode = graphProps.mode;
const searchParams = graphProps.searchParams;
Expand All @@ -218,9 +218,7 @@ function TagGraph(graphProps: GraphProps) {
ts = 0;
acc = 0;
} else {
if (flow.tags.includes("flag-out")) {
acc++;
}
acc++;
}
});

Expand All @@ -229,7 +227,7 @@ function TagGraph(graphProps: GraphProps) {

const series_out: ApexAxisChartSeries = [
{
name: "Flag-out",
name: "Volume",
data: chunkData(flowList),
},
];
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ export function Header() {
</div>
<Link to={`/corrie?${searchParams}`}>
<div className="bg-blue-100 text-gray-800 rounded-md px-2 py-1">
Time Correlation
Graph view
</div>
</Link>
<div className="ml-auto mr-4" style={{ display: "flex" }}>
Expand Down

0 comments on commit b79ca6e

Please sign in to comment.