diff --git a/monitoring/monitorlib/fetch/__init__.py b/monitoring/monitorlib/fetch/__init__.py
index 2cddcc87c2..5f08013028 100644
--- a/monitoring/monitorlib/fetch/__init__.py
+++ b/monitoring/monitorlib/fetch/__init__.py
@@ -254,6 +254,9 @@ class QueryType(str, Enum):
"interuss.automated_testing.flight_planning.v1.DeleteFlightPlan"
)
+ def __str__(self):
+ return self.value
+
@staticmethod
def flight_details(rid_version: RIDVersion):
if rid_version == RIDVersion.f3411_19:
diff --git a/monitoring/uss_qualifier/reports/sequence_view.py b/monitoring/uss_qualifier/reports/sequence_view.py
index a03f3b758c..16f75fcd60 100644
--- a/monitoring/uss_qualifier/reports/sequence_view.py
+++ b/monitoring/uss_qualifier/reports/sequence_view.py
@@ -26,6 +26,7 @@
TestScenarioReport,
PassedCheck,
FailedCheck,
+ Severity,
SkippedActionReport,
ErrorReport,
)
@@ -150,6 +151,7 @@ def rows(self) -> int:
@dataclass
class TestedParticipant(object):
has_failures: bool = False
+ has_infos: bool = False
has_successes: bool = False
has_queries: bool = False
@@ -337,7 +339,10 @@ def append_notes(new_notes):
)
for pid in participants:
p = scenario_participants.get(pid, TestedParticipant())
- p.has_failures = True
+ if failed_check.severity == Severity.Low:
+ p.has_infos = True
+ else:
+ p.has_failures = True
scenario_participants[pid] = p
if "notes" in report and report.notes:
for key, note in report.notes.items():
@@ -618,6 +623,7 @@ def _generate_scenario_pages(
UNATTRIBUTED_PARTICIPANT=UNATTRIBUTED_PARTICIPANT,
len=len,
str=str,
+ Severity=Severity,
)
)
else:
@@ -654,5 +660,6 @@ def generate_sequence_view(
ActionNodeType=ActionNodeType,
UNATTRIBUTED_PARTICIPANT=UNATTRIBUTED_PARTICIPANT,
len=len,
+ Severity=Severity,
)
)
diff --git a/monitoring/uss_qualifier/reports/templates/sequence_view/overview.html b/monitoring/uss_qualifier/reports/templates/sequence_view/overview.html
index 6e6f5d638e..d20a5e531f 100644
--- a/monitoring/uss_qualifier/reports/templates/sequence_view/overview.html
+++ b/monitoring/uss_qualifier/reports/templates/sequence_view/overview.html
@@ -3,71 +3,7 @@
TR-{{ test_run.test_run_id[0:7] }} sequence view
-
+ {% include "sequence_view/style.html" %}
{{ explorer_header() }}
@@ -200,6 +136,8 @@ Scenarios executed
{% if row.scenario_node and participant_id in row.scenario_node.scenario.participants %}
{% if row.scenario_node.scenario.participants[participant_id].has_failures %}
❌ |
+ {% elif row.scenario_node.scenario.participants[participant_id].has_infos %}
+ ℹ️ |
{% elif row.scenario_node.scenario.participants[participant_id].has_successes %}
✅ |
{% elif row.scenario_node.scenario.participants[participant_id].has_queries %}
diff --git a/monitoring/uss_qualifier/reports/templates/sequence_view/scenario.html b/monitoring/uss_qualifier/reports/templates/sequence_view/scenario.html
index f7f7aed65d..c6a2a03d67 100644
--- a/monitoring/uss_qualifier/reports/templates/sequence_view/scenario.html
+++ b/monitoring/uss_qualifier/reports/templates/sequence_view/scenario.html
@@ -1,69 +1,11 @@
{% from "explorer.html" import explorer_header, explorer_content, explorer_footer %}
+{% from "sequence_view/severity.html" import severity_symbol, severity_class with context %}
s{{ test_scenario.scenario_index }} - {{ test_scenario.name }}
-
+ {% include "sequence_view/style.html" %}
{{ explorer_header() }}
@@ -131,8 +73,8 @@ {{ test_scenario.type }}
{% endif %}
{% endfor %}
{% elif event.type == EventType.FailedCheck %}
- ❌ |
-
+ | {{ severity_symbol(event.failed_check.severity) }} |
+
{% if event.failed_check.documentation_url %}
{{ event.failed_check.name }}
{% else %}
@@ -152,7 +94,9 @@ {{ test_scenario.type }}
|
{% for participant_id in all_participants %}
{% if (participant_id != UNATTRIBUTED_PARTICIPANT and participant_id in event.failed_check.participants) or (participant_id == UNATTRIBUTED_PARTICIPANT and not event.failed_check.participants) %}
- ❌ |
+
+ {{ severity_symbol(event.failed_check.severity) }}
+ |
{% else %}
|
{% endif %}
@@ -160,9 +104,9 @@ {{ test_scenario.type }}
{% elif event.type == EventType.Query %}
🌐 |
- {{ event.query.request.method }} {{ event.query.request.url_hostname }}
+ {% set query_dict = {event.query.request.method + " " + event.query.request.url_hostname + " " + str(event.query.response.status_code): event.query} %}
{% set query_id = "e" + str(event.event_index) + "query" %}
- {{ explorer_content(query_id, event.query) }}
+ {{ explorer_content(query_id, query_dict) }}
{% set collapsible.queries = collapsible.queries + [query_id] %}
|
{% for participant_id in all_participants %}
diff --git a/monitoring/uss_qualifier/reports/templates/sequence_view/severity.html b/monitoring/uss_qualifier/reports/templates/sequence_view/severity.html
new file mode 100644
index 0000000000..a755cdce35
--- /dev/null
+++ b/monitoring/uss_qualifier/reports/templates/sequence_view/severity.html
@@ -0,0 +1,21 @@
+{% macro severity_symbol(s) %}
+ {% if s == Severity.Low %}
+ ℹ️
+ {% elif s == Severity.Medium %}
+ ⚠️
+ {% elif s == Severity.High %}
+ 🛑
+ {% elif s == Severity.Critical %}
+ ☢️
+ {% else %}
+ ?
+ {% endif %}
+{% endmacro %}
+
+{% macro severity_class(s) %}
+ {% if s == Severity.Low %}
+ info_result
+ {% else %}
+ fail_result
+ {% endif %}
+{% endmacro %}
diff --git a/monitoring/uss_qualifier/reports/templates/sequence_view/style.html b/monitoring/uss_qualifier/reports/templates/sequence_view/style.html
new file mode 100644
index 0000000000..05095c4925
--- /dev/null
+++ b/monitoring/uss_qualifier/reports/templates/sequence_view/style.html
@@ -0,0 +1,72 @@
+
+
diff --git a/monitoring/uss_qualifier/scenarios/documentation/parsing.py b/monitoring/uss_qualifier/scenarios/documentation/parsing.py
index d04f902f91..282ee6c3b5 100644
--- a/monitoring/uss_qualifier/scenarios/documentation/parsing.py
+++ b/monitoring/uss_qualifier/scenarios/documentation/parsing.py
@@ -33,6 +33,8 @@
def _length_of_section(values, start_of_section: int) -> int:
+ if start_of_section + 1 >= len(values):
+ return 1
level = values[start_of_section].level
c = start_of_section + 1
while c < len(values):
diff --git a/monitoring/uss_qualifier/suites/suite.py b/monitoring/uss_qualifier/suites/suite.py
index a3c4696715..a41e0b2ebe 100644
--- a/monitoring/uss_qualifier/suites/suite.py
+++ b/monitoring/uss_qualifier/suites/suite.py
@@ -37,6 +37,7 @@
TestSuiteReport,
TestSuiteActionReport,
ParticipantCapabilityEvaluationReport,
+ Severity,
SkippedActionReport,
)
from monitoring.uss_qualifier.resources.definitions import ResourceID
@@ -62,9 +63,14 @@
def _print_failed_check(failed_check: FailedCheck) -> None:
yaml_lines = yaml.dump(json.loads(json.dumps(failed_check))).split("\n")
- logger.warning(
- "New failed check:\n{}", "\n".join(" " + line for line in yaml_lines)
- )
+ if failed_check.severity == Severity.Low:
+ logger.info(
+ "Informational finding:\n{}", "\n".join(" " + line for line in yaml_lines)
+ )
+ else:
+ logger.warning(
+ "New failed check:\n{}", "\n".join(" " + line for line in yaml_lines)
+ )
class TestSuiteAction(object):