Skip to content

Commit

Permalink
Risk level indicator styling (#1810)
Browse files Browse the repository at this point in the history
Co-authored-by: Patrick <[email protected]>
Co-authored-by: Jeroen Dekkers <[email protected]>
  • Loading branch information
3 people authored Sep 26, 2023
1 parent 6baf7e3 commit 9387222
Show file tree
Hide file tree
Showing 8 changed files with 68 additions and 27 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
form.inline.column {
flex-direction: column;
}

form.inline.layout-wide {
width: 100%;
}
61 changes: 61 additions & 0 deletions rocky/assets/css/components/risk-level-indicator.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/* Risk level indicator */

table .critical,
table .high,
table .medium,
table .low,
table .informational,
table .recommendation,
table .pending,
table .unknown {
--risk-level-critical: #f84638;
--risk-level-high: #ff9a4d;
--risk-level-medium: #fbe366;
--risk-level-low: #a6e5b7;
--risk-level-informational: #c6e6fa;
--risk-level-pending: #a4a4a4;
--risk-level-unkown: #a4a4a4;

display: flex;
align-items: center;
gap: 0.5rem;
padding: 0;

&::before {
content: "";
display: block;
width: 0.75rem;
height: 0.75rem;
border-radius: 50%;
margin: 0;
}
}

table .critical::before {
background-color: var(--risk-level-critical);
}

table .high::before {
background-color: var(--risk-level-high);
}

table .medium::before {
background-color: var(--risk-level-medium);
}

table .low::before {
background-color: var(--risk-level-low);
}

table .informational::before,
table .recommendation::before {
background-color: var(--risk-level-informational);
}

table .pending::before {
background-color: var(--risk-level-pending);
}

table .unknown::before {
background-color: var(--risk-level-unkown);
}
3 changes: 2 additions & 1 deletion rocky/assets/css/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
@import "components/fmea";
@import "components/footer-logo";
@import "components/footer";
@import "components/form-inline-column";
@import "components/form-inline";
@import "components/form";
@import "components/header-navigation";
@import "components/hover-block";
Expand All @@ -51,6 +51,7 @@
@import "components/plugins";
@import "components/pre";
@import "components/qr-code";
@import "components/risk-level-indicator";
@import "components/scan-level-indicator";
@import "components/select";
@import "components/stepper";
Expand Down
4 changes: 0 additions & 4 deletions rocky/assets/css/manon-components.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
/* Color sets */
@use "@minvws/manon/colors/critical-informational";
@use "@minvws/manon/tag-colors-soft";
@use "@minvws/manon/spot-large";

/* Labels */
@use "@minvws/manon/critical-informational-labels";

/* States */
@use "@minvws/manon/disabled";

Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion rocky/assets/css/themes/soft/manon/manon-variables.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* theme: KAT Soft based on manon components */
:root {
--critical-informational-labels-min-width: 8rem;
--de-emphasized-text-color: #000000;
--h1-font-size: var(--heading-xl-font-size);
--h2-font-size: var(--heading-large-font-size);
Expand Down
1 change: 0 additions & 1 deletion rocky/assets/css/themes/soft/soft.scss
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
@import "manon/emphasized";
@import "manon/expando-rows";
@import "manon/collapsing-element";
@import "manon/critical-informational-labels";
@import "manon/filter";
@import "manon/header-navigation";
@import "manon/header-navigation-content-wrapper";
Expand Down
2 changes: 1 addition & 1 deletion rocky/rocky/templates/findings/finding_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ <h1>{% translate "Findings @ " %}{{ valid_time|date }}</h1>
{% translate "Object list" as filter_title %}
{% if object_list|length > 1 and perms.tools.can_mute_findings %}
<form method="post"
class="inline"
class="inline layout-wide"
action="{% url 'finding_mute_bulk' organization.code %}">
{% csrf_token %}
{% endif %}
Expand Down

0 comments on commit 9387222

Please sign in to comment.