Skip to content

Commit

Permalink
fix: better mobile layout
Browse files Browse the repository at this point in the history
  • Loading branch information
d-koppenhagen committed Dec 29, 2024
1 parent e01608b commit 0d657fa
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
27 changes: 26 additions & 1 deletion src/components/DataTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
value="ALL"
size="large"
v-on:click="severity = []"
class="mr-5"
class="mr-5 mb-2"
:active="severity.length === 0"
active-color="primary"
>
Expand All @@ -26,6 +26,14 @@
v-for="severityInformation in vulnerabilityStats.severityInformation"
:key="severityInformation.severity"
:value="severityInformation.severity"
:prepend-icon="getSeverityIcon(severityInformation.severity)"
:aria-label="
'Filter for severity ' +
severityInformation.severity +
' (' +
severityInformation.count +
')'
"
>
{{ severityInformation.severity }}:
{{ severityInformation.count }}
Expand Down Expand Up @@ -218,6 +226,23 @@ const vulnerabilityStats = computed(() => {
}
})
function getSeverityIcon(severity: Severity) {
switch (severity) {
case "CRITICAL":
return "mdi-alert-circle"
case "HIGH":
return "mdi-alert"
case "MEDIUM":
return "mdi-alert-outline"
case "LOW":
return "mdi-information-outline"
case "UNKNOWN":
return "mdi-help-circle-outline"
default:
return "mdi-help-circle-outline"
}
}
function compareBySeverity(a: Severity, b: Severity): number {
return orderedSeverityLevels.indexOf(a) - orderedSeverityLevels.indexOf(b)
}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/index.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div>
<v-container class="py-8">
<v-row justify="center" align="center" class="mb-8">
<v-row justify="center" align="center" class="mb-5">
<v-col cols="12" class="text-center">
<h2 class="headline">Instructions</h2>
<p class="mb-8">
Expand Down

0 comments on commit 0d657fa

Please sign in to comment.