From dd14a61ed1c8e59cace989e9991c469493512caf Mon Sep 17 00:00:00 2001 From: Adam Setch Date: Sun, 28 Jan 2024 11:40:52 -0500 Subject: [PATCH] refactor(dashboard): set progress colors via scss Signed-off-by: Adam Setch --- src/assets/scss/_custom.scss | 22 ++++++++++++-- src/views/Dashboard.vue | 56 +++++++++--------------------------- 2 files changed, 33 insertions(+), 45 deletions(-) diff --git a/src/assets/scss/_custom.scss b/src/assets/scss/_custom.scss index 4d2ceb832..c145337ce 100644 --- a/src/assets/scss/_custom.scss +++ b/src/assets/scss/_custom.scss @@ -11,21 +11,39 @@ html { } .severity-critical, .status-failed { color: $severity-critical; + .progress-bar { + background-color: $severity-critical; + } } .severity-high { color:$severity-high; + .progress-bar { + background-color: $severity-high; + } } .severity-medium, .status-warning { color: $severity-medium; + .progress-bar { + background-color: $severity-medium; + } } .severity-low, .status-passed { color: $severity-low; + .progress-bar { + background-color: $severity-low; + } } -.severity-info { +.severity-info, .status-info { color: $severity-info; + .progress-bar { + background-color: $severity-info; + } } .severity-unassigned { color: $severity-unassigned; + .progress-bar { + background-color: $severity-unassigned; + } } // Fixes the width for the bootstrap progress bar in tables .table-progress { @@ -469,4 +487,4 @@ td a.detail-icon { .keep-together { display: inline; white-space: nowrap; -} \ No newline at end of file +} diff --git a/src/views/Dashboard.vue b/src/views/Dashboard.vue index 8bdb5ed5b..f37b1d3cf 100644 --- a/src/views/Dashboard.vue +++ b/src/views/Dashboard.vue @@ -18,22 +18,22 @@
{{ $t('message.vulnerable_projects') }}
{{vulnerableProjects}} ({{vulnerableProjectPercent}}%) - +
{{ $t('message.violations_audited') }}
{{auditedViolations}} ({{auditedViolationsPercent}}%) - +
{{ $t('message.vulnerable_components') }}
{{vulnerableComponents}} ({{vulnerableComponentPercent}}%) - +
{{ $t('message.findings_audited') }}
{{auditedFindings}} ({{auditedFindingPercent}}%) - +
@@ -53,49 +53,19 @@
-
- {{ $t("policy_violation.fails") }} -
- {{ failViolations }} ({{ failViolationsPercent }}%) - +
{{ $t("policy_violation.fails") }}
+ {{ failViolations }} ({{ failViolationsPercent }}%) +
-
- {{ $t("policy_violation.warns") }} -
- {{ warnViolations }} ({{ warnViolationsPercent }}%) - +
{{ $t("policy_violation.warns") }}
+ {{ warnViolations }} ({{ warnViolationsPercent }}%) +
-
- {{ $t("policy_violation.infos") }} -
- {{ infoViolations }} ({{ infoViolationsPercent }}%) - +
{{ $t("policy_violation.infos") }}
+ {{ infoViolations }} ({{ infoViolationsPercent }}%) +