--
This commit is contained in:
@@ -52,7 +52,7 @@
|
|||||||
msg.className = "tls-log-msg";
|
msg.className = "tls-log-msg";
|
||||||
if (severity && SEV_LABEL[severity] && severity !== "info") {
|
if (severity && SEV_LABEL[severity] && severity !== "info") {
|
||||||
const sev = document.createElement("span");
|
const sev = document.createElement("span");
|
||||||
sev.className = "text-" + (SEV_COLOR[severity] || "tx") + " font-bold";
|
sev.className = "text-" + (SEV_COLOR[severity] || "light-grey") + " font-bold";
|
||||||
sev.textContent = SEV_LABEL[severity];
|
sev.textContent = SEV_LABEL[severity];
|
||||||
msg.appendChild(sev);
|
msg.appendChild(sev);
|
||||||
msg.appendChild(document.createTextNode(" "));
|
msg.appendChild(document.createTextNode(" "));
|
||||||
@@ -60,7 +60,7 @@
|
|||||||
// Title is always in the default text color (white). Severity is
|
// Title is always in the default text color (white). Severity is
|
||||||
// communicated by the coloured label tag, not by tinting the title.
|
// communicated by the coloured label tag, not by tinting the title.
|
||||||
const msgText = document.createElement("span");
|
const msgText = document.createElement("span");
|
||||||
msgText.className = "textlight-grey";
|
msgText.className = "text-light-grey";
|
||||||
msgText.textContent = body || "";
|
msgText.textContent = body || "";
|
||||||
msg.appendChild(msgText);
|
msg.appendChild(msgText);
|
||||||
row.appendChild(msg);
|
row.appendChild(msg);
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
'Q': 'red', 'R': 'bright-purple'
|
'Q': 'red', 'R': 'bright-purple'
|
||||||
} %}
|
} %}
|
||||||
{% set rank = result.rank or job.rank or '?' %}
|
{% set rank = result.rank or job.rank or '?' %}
|
||||||
{% set rank_color = rank_color_map.get(rank, 'tx') %}
|
{% set rank_color = rank_color_map.get(rank, 'light-grey') %}
|
||||||
|
|
||||||
<header class="tls-results-header">
|
<header class="tls-results-header">
|
||||||
<div class="tls-results-head">
|
<div class="tls-results-head">
|
||||||
@@ -72,7 +72,7 @@
|
|||||||
<span class="tls-log-cat text-light-grey-alt">[{{ (f.step or f.group or f.category or 'info')|replace('_','-')|lower }}]</span>
|
<span class="tls-log-cat text-light-grey-alt">[{{ (f.step or f.group or f.category or 'info')|replace('_','-')|lower }}]</span>
|
||||||
<span class="tls-log-msg">
|
<span class="tls-log-msg">
|
||||||
<span class="text-{{ f.color }} font-bold">{{ f.severity_label|upper }}</span>
|
<span class="text-{{ f.color }} font-bold">{{ f.severity_label|upper }}</span>
|
||||||
<span class="textlight-grey">{{ f.title }}</span>
|
<span class="text-light-grey">{{ f.title }}</span>
|
||||||
</span>
|
</span>
|
||||||
<span class="tls-log-detail text-light-grey-alt">{{ f.detail or '' }}</span>
|
<span class="tls-log-detail text-light-grey-alt">{{ f.detail or '' }}</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -386,7 +386,7 @@
|
|||||||
{% if e.kind == 'phase' %}
|
{% if e.kind == 'phase' %}
|
||||||
<div class="tls-log-row">
|
<div class="tls-log-row">
|
||||||
<span class="tls-log-cat text-light-grey-alt">[{{ (e.phase or 'info')|replace('_','-')|lower }}]</span>
|
<span class="tls-log-cat text-light-grey-alt">[{{ (e.phase or 'info')|replace('_','-')|lower }}]</span>
|
||||||
<span class="tls-log-msg textlight-grey">{{ e.detail or '' }}</span>
|
<span class="tls-log-msg text-light-grey">{{ e.detail or '' }}</span>
|
||||||
<span class="tls-log-detail text-light-grey-alt"></span>
|
<span class="tls-log-detail text-light-grey-alt"></span>
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ class Finding:
|
|||||||
def to_dict(self) -> dict[str, Any]:
|
def to_dict(self) -> dict[str, Any]:
|
||||||
d = asdict(self)
|
d = asdict(self)
|
||||||
d["severity_label"] = SEVERITY_LABELS.get(self.severity, self.severity)
|
d["severity_label"] = SEVERITY_LABELS.get(self.severity, self.severity)
|
||||||
d["color"] = SEVERITY_COLORS.get(self.severity, "tx")
|
d["color"] = SEVERITY_COLORS.get(self.severity, "light-grey")
|
||||||
# impact is what the UI sorts by for the Summary tab.
|
# impact is what the UI sorts by for the Summary tab.
|
||||||
mul = {"good": 0.0, "normal": 0.0, "notgood": 1.0, "bad": 3.0, "serious": 9.0, "info": 0.0}.get(self.severity, 0.0)
|
mul = {"good": 0.0, "normal": 0.0, "notgood": 1.0, "bad": 3.0, "serious": 9.0, "info": 0.0}.get(self.severity, 0.0)
|
||||||
d["impact"] = mul * float(self.weight)
|
d["impact"] = mul * float(self.weight)
|
||||||
|
|||||||
Reference in New Issue
Block a user