diff --git a/framework/python/src/common/testreport.py b/framework/python/src/common/testreport.py index da5081641..fbd993a8e 100644 --- a/framework/python/src/common/testreport.py +++ b/framework/python/src/common/testreport.py @@ -18,6 +18,7 @@ from io import BytesIO from common import util, logger from common.statuses import TestrunStatus, TestrunResult +from test_orc import test_pack import base64 import os from test_orc.test_case import TestCase @@ -31,7 +32,10 @@ TESTS_FIRST_PAGE = 11 TESTS_PER_PAGE = 20 TEST_REPORT_STYLES = 'test_report_styles.css' -TEST_REPORT_TEMPLATE = 'test_report_template.html' +TEMPLATES_FOLDER = 'report_templates' +TEST_REPORT_TEMPLATE = 'report_template.html' +ICON = 'icon.png' + LOGGER = logger.get_logger('REPORT') @@ -218,13 +222,22 @@ def to_pdf(self): def to_html(self): + # Obtain test pack + current_test_pack = test_pack.TestPack.get_test_pack( + self._device['test_pack']) + template_folder = os.path.join(current_test_pack.path, + TEMPLATES_FOLDER) # Jinja template template_env = Environment( - loader=FileSystemLoader(report_resource_dir), + loader=FileSystemLoader( + template_folder + ), trim_blocks=True, lstrip_blocks=True ) template = template_env.get_template(TEST_REPORT_TEMPLATE) + + # Report styles with open(os.path.join(report_resource_dir, TEST_REPORT_STYLES), 'r', @@ -236,13 +249,11 @@ def to_html(self): with open(test_run_img_file, 'rb') as f: logo = base64.b64encode(f.read()).decode('utf-8') - json_data=self.to_json() + # Icon + with open(os.path.join(template_folder, ICON), 'rb') as f: + icon = base64.b64encode(f.read()).decode('utf-8') - # Icons - with open(qualification_icon, 'rb') as f: - icon_qualification = base64.b64encode(f.read()).decode('utf-8') - with open(pilot_icon, 'rb') as f: - icon_pilot = base64.b64encode(f.read()).decode('utf-8') + json_data=self.to_json() # Convert the timestamp strings to datetime objects start_time = datetime.strptime(json_data['started'], '%Y-%m-%d %H:%M:%S') @@ -258,30 +269,27 @@ def to_html(self): successful_tests += 1 # Obtain the steps to resolve - steps_to_resolve = self._get_steps_to_resolve(json_data) + logic = current_test_pack.get_logic() + steps_to_resolve_ = logic.get_steps_to_resolve(json_data) - # Obtain optional recommendations - optional_steps_to_resolve = self._get_optional_steps_to_resolve(json_data) + LOGGER.debug(steps_to_resolve_) module_reports = self._module_reports env_module = Environment(loader=BaseLoader()) pages_num = self._pages_num(json_data) - is_pilot = json_data['device']['test_pack'] == 'Pilot Assessment' module_templates = [ env_module.from_string(s).render( - json_data=json_data, + name=current_test_pack.name, device=json_data['device'], logo=logo, - icon_qualification=icon_qualification, - icon_pilot=icon_pilot, + icon=icon, version=self._version, ) for s in self._module_templates ] return self._add_page_counter(template.render(styles=styles, logo=logo, - icon_qualification=icon_qualification, - icon_pilot=icon_pilot, + icon=icon, version=self._version, json_data=json_data, device=json_data['device'], @@ -291,13 +299,11 @@ def to_html(self): successful_tests=successful_tests, total_tests=self._total_tests, test_results=json_data['tests']['results'], - steps_to_resolve=steps_to_resolve, - optional_steps_to_resolve=optional_steps_to_resolve, + steps_to_resolve=steps_to_resolve_, module_reports=module_reports, pages_num=pages_num, tests_first_page=TESTS_FIRST_PAGE, tests_per_page=TESTS_PER_PAGE, - is_pilot = is_pilot, module_templates=module_templates )) @@ -348,40 +354,3 @@ def _device_modules(self, device): reverse=True) ) return sorted_modules - - def _get_steps_to_resolve(self, json_data): - tests_with_recommendations = [] - - # Collect all tests with recommendations - for test in json_data['tests']['results']: - if 'recommendations' in test: - tests_with_recommendations.append(test) - - return self._split_steps_to_resolve_to_pages( - tests_with_recommendations, 4, 4) - - def _get_optional_steps_to_resolve(self, json_data): - tests_with_recommendations = [] - - # Collect all tests with recommendations - for test in json_data['tests']['results']: - if 'optional_recommendations' in test: - tests_with_recommendations.append(test) - - return self._split_steps_to_resolve_to_pages( - tests_with_recommendations, 3, 4) - - def _split_steps_to_resolve_to_pages(self, steps, start_page=4, page=4): - # Split steps to resolve to pages. - # First steps, steps on other pages. - if len(steps) < start_page: - return [steps] - - splitted = [steps[:3]] - - index = start_page - while index < len(steps): - splitted.append(steps[index:index + page]) - index += page - - return splitted diff --git a/framework/python/src/test_orc/test_orchestrator.py b/framework/python/src/test_orc/test_orchestrator.py index 21ecdffea..ae65c0f87 100644 --- a/framework/python/src/test_orc/test_orchestrator.py +++ b/framework/python/src/test_orc/test_orchestrator.py @@ -18,9 +18,7 @@ import re import time import shutil -import sys import docker -import importlib.util from datetime import datetime from common import logger, util from common.testreport import TestReport @@ -665,46 +663,7 @@ def _get_module_container(self, module): def _load_test_packs(self): - for test_pack_folder in os.listdir(TEST_PACKS_DIR): - - LOGGER.debug(f"Loading test pack {test_pack_folder}") - - test_pack_path = os.path.join( - self._root_path, - TEST_PACKS_DIR, - test_pack_folder - ) - - with open(os.path.join( - test_pack_path, - TEST_PACK_CONFIG_FILE), encoding="utf-8") as f: - test_pack_json = json.load(f) - - test_pack: TestPack = TestPack( - name = test_pack_json["name"], - tests = test_pack_json["tests"], - language = test_pack_json["language"], - pack_logic = self._load_logic( - os.path.join(test_pack_path, TEST_PACK_LOGIC_FILE), - "test_pack_" + test_pack_folder + "_logic" - ) - ) - - self._test_packs.append(test_pack) - - def _load_logic(self, source, module_name=None): - """Reads file source and loads it as a module""" - - spec = importlib.util.spec_from_file_location(module_name, source) - module = importlib.util.module_from_spec(spec) - - # Add the module to sys.modules - sys.modules[module_name] = module - - # Execute the module - spec.loader.exec_module(module) - - return module + self._test_packs = TestPack.get_test_packs() def _load_test_modules(self): """Load network modules from module_config.json.""" @@ -767,10 +726,7 @@ def get_test_packs(self) -> List[TestPack]: return self._test_packs def get_test_pack(self, name: str) -> TestPack: - for test_pack in self._test_packs: - if test_pack.name.lower() == name.lower(): - return test_pack - return None + return TestPack.get_test_pack(name, self._test_packs) def _stop_modules(self, kill=False): LOGGER.info("Stopping test modules") diff --git a/framework/python/src/test_orc/test_pack.py b/framework/python/src/test_orc/test_pack.py index b1efaf6f8..eb9c852c2 100644 --- a/framework/python/src/test_orc/test_pack.py +++ b/framework/python/src/test_orc/test_pack.py @@ -17,6 +17,16 @@ from typing import List, Dict from dataclasses import dataclass, field from collections import defaultdict +import os +import sys +import json +import importlib + +RESOURCES_DIR = "resources" + +TEST_PACKS_DIR = os.path.join(RESOURCES_DIR, "test_packs") +TEST_PACK_CONFIG_FILE = "config.json" +TEST_PACK_LOGIC_FILE = "test_pack.py" @dataclass @@ -28,6 +38,7 @@ class TestPack: # pylint: disable=too-few-public-methods,too-many-instance-attr tests: List[dict] = field(default_factory=lambda: []) language: Dict = field(default_factory=lambda: defaultdict(dict)) pack_logic: ModuleType = None + path: str = "" def get_test(self, test_name: str) -> str: """Get details of a test from the test pack""" @@ -61,3 +72,62 @@ def to_dict(self): "tests": self.tests, "language": self.language } + + @staticmethod + def load_logic(source, module_name=None): + """Reads file source and loads it as a module""" + + spec = importlib.util.spec_from_file_location(module_name, source) + module = importlib.util.module_from_spec(spec) + + # Add the module to sys.modules + sys.modules[module_name] = module + + # Execute the module + spec.loader.exec_module(module) + + return module + + @staticmethod + def get_test_packs() -> List["TestPack"]: + + root_path = os.path.dirname( + os.path.dirname( + os.path.dirname( + os.path.dirname(os.path.dirname(os.path.realpath(__file__)))))) + test_packs = [] + + for test_pack_folder in os.listdir(TEST_PACKS_DIR): + test_pack_path = os.path.join( + root_path, + TEST_PACKS_DIR, + test_pack_folder + ) + + with open(os.path.join( + test_pack_path, + TEST_PACK_CONFIG_FILE), encoding="utf-8") as f: + test_pack_json = json.load(f) + + test_pack: TestPack = TestPack( + name = test_pack_json["name"], + tests = test_pack_json["tests"], + language = test_pack_json["language"], + pack_logic = TestPack.load_logic( + os.path.join(test_pack_path, TEST_PACK_LOGIC_FILE), + "test_pack_" + test_pack_folder + "_logic" + ), + path = test_pack_path + ) + test_packs.append(test_pack) + + return test_packs + + @staticmethod + def get_test_pack(name: str, test_packs: List["TestPack"]=None) -> "TestPack": + if test_packs is None: + test_packs = TestPack.get_test_packs() + for test_pack in test_packs: + if test_pack.name.lower() == name.lower(): + return test_pack + return None diff --git a/modules/test/dns/python/src/dns_module.py b/modules/test/dns/python/src/dns_module.py index 47afff71f..c1db567ae 100644 --- a/modules/test/dns/python/src/dns_module.py +++ b/modules/test/dns/python/src/dns_module.py @@ -51,10 +51,10 @@ def __init__(self, # pylint: disable=R0917 def generate_module_report(self): # Load Jinja2 template - page_max_height = 910 + page_max_height = 850 header_height = 48 summary_height = 135 - row_height = 42 + row_height = 44 loader=FileSystemLoader(self._report_template_folder) template = Environment( loader=loader, diff --git a/resources/report/module_report_base.jinja2 b/resources/report/module_report_base.jinja2 index c86c94b16..6e159c264 100644 --- a/resources/report/module_report_base.jinja2 +++ b/resources/report/module_report_base.jinja2 @@ -4,13 +4,8 @@
{# Badge #}

- {% if json_data['device']['test_pack'] == 'Device Qualification' %} - - Device Qualification - {% else %} - - Pilot Assessment - {% endif %} + + {{ name }}

{{ title }}
diff --git a/resources/report/test_report_template.html b/resources/report/test_report_template.html deleted file mode 100644 index be236bb62..000000000 --- a/resources/report/test_report_template.html +++ /dev/null @@ -1,295 +0,0 @@ -{% import 'header_macros.jinja' as header_macros %} - - - - - - - Testrun Report - - - - - {% set step_index = namespace(value=0) %} - {% set opt_step_index = namespace(value=0) %} - {# Test Results #} - {% for page in range(pages_num) %} -
- {{ header_macros.header(loop.first, "Testrun report", json_data, device, logo, icon_qualification, icon_pilot)}} - {% if loop.first %} -
-
-
-

Manufacturer

-
{{ device['manufacturer']}}
-
-

Model

-
{{ device['model'] }}
-
-

Firmware

-
{{ device['firmware']}}
-
-

MAC Address

-
{{ device['mac_addr'] }}
-
-
-
-
-

Device Configuration

-
- {% for module, enabled in modules.items() %} -
- {% if enabled %} - - {% else %} - - {% endif %} - {{ module }} -
- {% endfor %} -
- {% if test_status in ['Compliant', 'Proceed'] %} -
- {% else %} -
- {% endif %} - - {% if is_pilot %} -
Pilot Recommendation
- {% else %} -
Test Status
- {% endif %} -
{{ json_data['status'] }}
- -
Test Result
-
{{ json_data['result'] }}
- -
Started
-
{{ json_data['started']}}
-
Duration
-
- {% if duration.seconds//3600 > 0 %}{{ duration.seconds//3600 }}h {% endif %} - {% if duration.seconds//60 > 0 %}{{ duration.seconds//60 }}m {% endif %} - {{ duration.seconds%60 }}s -
-
-
- {% endif %} - {% if loop.first %} - {% set results_from = 0 %} - {% set results_to = [tests_first_page, test_results|length]|min %} - {% else %} - {% set results_from = tests_first_page + (loop.index0 - 1) * tests_per_page %} - {% set results_to = [results_from + tests_per_page, test_results|length]|min %} - {% endif %} -
-

Results List ({{ successful_tests }}/{{ total_tests }})

-
-
Name
-
Description
-
Result
-
Required result
-
- {% for i in range(results_from, results_to) %} - {% if test_results[i]['result'] == 'Non-Compliant' and test_results[i]['required_result'] == "Required" %} -
- {% else %} -
- {% endif %} -
{{ test_results[i]['name'] }}
-
{{ test_results[i]['description'] }}
-
- {% elif test_results[i]['result'] == 'Compliant' %} - result-test-result-compliant"> - {% elif test_results[i]['result'] == 'Error' %} - result-test-result-error"> - {% elif test_results[i]['result'] == 'Feature Not Detected' %} - result-test-result-feature-not-detected"> - {% elif test_results[i]['result'] == 'Informational' %} - result-test-result-informational"> - {% else %} - result-test-result-skipped"> - {% endif %} - {{ test_results[i]['result'] }}
- {# Required resul badges #} - {% if test_results[i]['required_result'] == "Required" %} -
- asterisk - {{ test_results[i]['required_result'] }} -
- {% elif test_results[i]['required_result'] == "Required if Applicable" %} -
- asterisk - {{ test_results[i]['required_result'] }} -
- {% elif test_results[i]['required_result'] == "Informational" %} -
- info_i - {{ test_results[i]['required_result'] }} -
- {% elif test_results[i]['required_result'] == "Roadmap" %} -
- road - {{ test_results[i]['required_result'] }} -
- {% elif test_results[i]['required_result'] == "Recommended" %} - - {% else %} -
- {{ test_results[i]['required_result'] }} -
- {% endif %} -
- {% endfor %} -
- -
-
- {% endfor %} - {# Steps to resolve Device qualification #} - {% if steps_to_resolve|length > 0 and not is_pilot %} - {% for step in steps_to_resolve%} -
- {{ header_macros.header(False, "Testrun report", json_data, device, logo, icon_qualification, icon_pilot)}} - {% if loop.first %} -

Non-compliant tests and suggested steps to resolve

- {% endif %} - {% for line in step %} - {% set step_index.value = step_index.value + 1 %} -
-
- {{ step_index.value }}. -
- Name
{{ line['name'] }} -
-
- Description
{{ line["description"] }} -
-
-
- Steps to resolve - {% for recommedtation in line['recommendations'] %} -
{{ loop.index }}. {{ recommedtation }} - {% endfor %} -
-
- {% endfor %} - -
- {% endfor %} - {% endif %} - {# Pilot steps to resolve#} - {% if is_pilot and optional_steps_to_resolve|length > 0 %} - {% for step in optional_steps_to_resolve%} -
- {{ header_macros.header(False, "Testrun report", json_data, device, logo, icon_qualification, icon_pilot)}} - {% if loop.first %} -

Recommendations for Device Qualification

-
-

Attention

-

- The following recommendations are required solely for full device qualification. - They are optional for the pilot assessment - but you may find it valuable to understand what will be required in the future - and our recommendations for your device. -

-
- {% endif %} - {% for line in step %} - {% set opt_step_index.value = opt_step_index.value + 1 %} -
-
- - {{ opt_step_index.value }}. - -
- Name
- {{ line['name'] }} -
-
- Description
- {{ line["description"] }} -
-
-
- Steps to resolve - {% for recommedtation in line['optional_recommendations'] %} -
- - {{ loop.index }}. {{ recommedtation }} - - {% endfor %} -
-
- {% endfor %} - -
- {% endfor %} - {% endif %} - {# Modules reports Jinja #} - {% for template in module_templates %} - {{ template }} - {% endfor %} - {# Modules reports #} - {% for module in module_reports %} -
- {{ header_macros.header(False, "Testrun report", json_data, device, logo, icon_qualification, icon_pilot)}} -
- {{ module }} -
- -
-
- {% endfor %} - {# Device profile #} -
- {{ header_macros.header(False, "Testrun report", json_data, device, logo, icon_qualification, icon_pilot)}} -

Device profile

-
-
-
Question
-
Answer
-
- {% for question in json_data['device']['device_profile'] %} -
-
{{loop.index}}.
-
{{ question['question'] }}
-
- {% if question['answer'] is string %} - {{ question['answer'] }} - {% elif question['answer'] is sequence %} -
    - {% for answer in question['answer'] %} -
  • {{ answer }}
  • - {% endfor %} -
- {% endif %} -
-
- {% endfor %} -
- -
-
- - diff --git a/resources/test_packs/pilot/report_template.html b/resources/test_packs/pilot/report_template.html deleted file mode 100644 index c28e75072..000000000 --- a/resources/test_packs/pilot/report_template.html +++ /dev/null @@ -1,244 +0,0 @@ -{% import 'header_macros.jinja' as header_macros %} - - - - - - - Testrun Report - - - - - {% set page_index = namespace(value=0) %} - {% set step_index = namespace(value=0) %} - {% set opt_step_index = namespace(value=0) %} - {# Test Results #} - {% for page in range(pages_num) %} - {% set page_index.value = page_index.value+1 %} -
- {{ header_macros.header(loop.first, "Testrun report", json_data, device, logo, icon_qualification, icon_pilot)}} - {% if loop.first %} -
-
-
-

Manufacturer

-
{{ device['manufacturer']}}
-
-

Model

-
{{ device['model'] }}
-
-

Firmware

-
{{ device['firmware']}}
-
-

MAC Address

-
{{ device['mac_addr'] }}
-
-
-
-
-

Device Configuration

-
- {% for module, enabled in modules.items() %} -
- {% if enabled %} - - {% else %} - - {% endif %} - {{ module }} -
- {% endfor %} -
- {% if test_status in ['Compliant', 'Proceed'] %} -
- {% else %} -
- {% endif %} -
Test Status
-
Complete
-
Pilot Recommendation
-
{{ test_status }}
-
Started
-
{{ json_data['started']}}
-
Duration
-
- {% if duration.seconds//3600 > 0 %}{{ duration.seconds//3600 }}h {% endif %} - {% if duration.seconds//60 > 0 %}{{ duration.seconds//60 }}m {% endif %} - {{ duration.seconds%60 }}s -
-
-
- {% endif %} - {% if loop.first %} - {% set results_from = 0 %} - {% set results_to = [tests_first_page, test_results|length]|min %} - {% else %} - {% set results_from = tests_first_page + (loop.index0 - 1) * tests_per_page %} - {% set results_to = [results_from + tests_per_page, test_results|length]|min %} - {% endif %} -
-

Results List ({{ successful_tests }}/{{ total_tests }})

-
-
Name
-
Description
-
Result
-
Required result
-
- {% for i in range(results_from, results_to) %} - {% if test_results[i]['result'] == 'Non-Compliant' and test_results[i]['required_result'] == "Required" %} -
- {% else %} -
- {% endif %} -
{{ test_results[i]['name'] }}
-
{{ test_results[i]['description'] }}
-
- {% elif test_results[i]['result'] == 'Compliant' %} - result-test-result-compliant"> - {% elif test_results[i]['result'] == 'Error' %} - result-test-result-error"> - {% elif test_results[i]['result'] == 'Feature Not Detected' %} - result-test-result-feature-not-detected"> - {% elif test_results[i]['result'] == 'Informational' %} - result-test-result-informational"> - {% else %} - result-test-result-skipped"> - {% endif %} - {{ test_results[i]['result'] }}
- {# Required resul badges #} - {% if test_results[i]['required_result'] == "Required" %} -
- asterisk - {{ test_results[i]['required_result'] }} -
- {% elif test_results[i]['required_result'] == "Required if Applicable" %} -
- asterisk - {{ test_results[i]['required_result'] }} -
- {% elif test_results[i]['required_result'] == "Informational" %} -
- info_i - {{ test_results[i]['required_result'] }} -
- {% else %} -
- {{ test_results[i]['required_result'] }} -
- {% endif %} -
- {% endfor %} -
- -
-
- {% endfor %} - {# Pilot steps to resolve#} - {% if optional_steps_to_resolve|length > 0 %} - {% for step in optional_steps_to_resolve%} - {% set page_index.value = page_index.value + 1 %} -
- {{ header_macros.header(False, "Testrun report", json_data, device, logo, icon_qualification, icon_pilot)}} - {% if loop.first %} -

Recommendations for Device Qualification

-
-

Attention

-

- The following recommendations are required solely for full device qualification. - They are optional for the pilot assessment - but you may find it valuable to understand what will be required in the future - and our recommendations for your device. -

-
- {% endif %} - {% for line in step %} - {% set opt_step_index.value = opt_step_index.value + 1 %} -
-
- - {{ opt_step_index.value }}. - -
- Name
- {{ line['name'] }} -
-
- Description
- {{ line["description"] }} -
-
-
- Steps to resolve - {% for recommedtation in line['optional_recommendations'] %} -
- - {{ loop.index }}. {{ recommedtation }} - - {% endfor %} -
-
- {% endfor %} - -
- {% endfor %} - {% endif %} - {# Modules reports #} - {% for module in module_reports %} - {% set page_index.value = page_index.value+1 %} -
- {{ header_macros.header(False, "Testrun report", json_data, device, logo, icon_qualification, icon_pilot)}} -
- {{ module }} -
- -
-
- {% endfor %} - {# Device profile #} - {% set page_index.value = page_index.value+1 %} -
- {{ header_macros.header(False, "Testrun report", json_data, device, logo, icon_qualification, icon_pilot)}} -

Device profile

-
-
-
Question
-
Answer
-
- {% for question in json_data['device']['device_profile'] %} -
-
{{loop.index}}.
-
{{ question['question'] }}
-
- {% if question['answer'] is string %} - {{ question['answer'] }} - {% elif question['answer'] is sequence %} -
    - {% for answer in question['answer'] %} -
  • {{ answer }}
  • - {% endfor %} -
- {% endif %} -
-
- {% endfor %} -
- -
-
- - diff --git a/resources/test_packs/pilot/report_templates/device_profile.jinja b/resources/test_packs/pilot/report_templates/device_profile.jinja new file mode 100644 index 000000000..8fb03c063 --- /dev/null +++ b/resources/test_packs/pilot/report_templates/device_profile.jinja @@ -0,0 +1,26 @@ +{% macro insert(device_profile) %} +

Device profile

+
+
+
Question
+
Answer
+
+ {% for question in device_profile %} +
+
{{loop.index}}.
+
{{ question['question'] }}
+
+ {% if question['answer'] is string %} + {{ question['answer'] }} + {% elif question['answer'] is sequence %} +
    + {% for answer in question['answer'] %} +
  • {{ answer }}
  • + {% endfor %} +
+ {% endif %} +
+
+ {% endfor %} +
+{% endmacro %} \ No newline at end of file diff --git a/resources/test_packs/pilot/report_templates/header.jinja b/resources/test_packs/pilot/report_templates/header.jinja new file mode 100644 index 000000000..2e020f558 --- /dev/null +++ b/resources/test_packs/pilot/report_templates/header.jinja @@ -0,0 +1,33 @@ +{% macro insert(is_first, device, logo, icon) %} +{% if is_first %} +
+
+ {# Badge #} +

+ + Pilot Assessment +

+

Testrun report

+
+

+ {{ device['manufacturer'] }} + {{ device['model']}} +

+ {% else %} +
+
+ {# Badge #} +

+ + Pilot Assessment +

+ Testrun report +
+ + {{ device['manufacturer'] }} + {{ device['model']}} + + {% endif %} + Testrun +
+{% endmacro %} \ No newline at end of file diff --git a/resources/report/pilot-icon.png b/resources/test_packs/pilot/report_templates/icon.png similarity index 100% rename from resources/report/pilot-icon.png rename to resources/test_packs/pilot/report_templates/icon.png diff --git a/resources/test_packs/pilot/report_templates/report_template.html b/resources/test_packs/pilot/report_templates/report_template.html new file mode 100644 index 000000000..2ea2beea9 --- /dev/null +++ b/resources/test_packs/pilot/report_templates/report_template.html @@ -0,0 +1,98 @@ +{% import 'header.jinja' as header %} +{% import 'summary.jinja' as summary %} +{% import 'results.jinja' as result %} +{% import 'resolve_steps.jinja' as resolve_steps %} +{% import 'device_profile.jinja' as device_profile %} + +{% set opt_step_index = namespace(value=0) %} + + + + + + + Testrun Report + + + + {# Test Results #} + {% for page in range(pages_num) %} +
+ {{ header.insert(loop.first, device, logo, icon) }} + {% if loop.first %} + {# Report summary #} + {{ summary.insert(json_data, device, modules, duration) }} + {% endif %} + {% if loop.first %} + {% set results_from = 0 %} + {% set results_to = [tests_first_page, test_results|length]|min %} + {% else %} + {% set results_from = tests_first_page + (loop.index0 - 1) * tests_per_page %} + {% set results_to = [results_from + tests_per_page, test_results|length]|min %} + {% endif %} + {{ result.insert(successful_tests, total_tests, test_results, results_from, results_to) }} + +
+
+ {% endfor %} + {# Steps to resolve #} + {% if steps_to_resolve|length > 0 %} + {% for step in steps_to_resolve%} +
+ {{ header.insert(False, device, logo, icon) }} + {% if loop.first %} +

Recommendations for Device Qualification

+
+

Attention

+

+ The following recommendations are required solely for full device qualification. + They are optional for the pilot assessment + but you may find it valuable to understand what will be required in the future + and our recommendations for your device. +

+
+ {% endif %} + {% for line in step %} + {% set opt_step_index.value = opt_step_index.value + 1 %} + {{ resolve_steps.insert(opt_step_index.value, line) }} + {% endfor %} + +
+ {% endfor %} + {% endif %} + {# Modules reports Jinja #} + {% for template in module_templates %} + {{ template }} + {% endfor %} + {# Modules reports #} + {% for module in module_reports %} +
+ {{ header.insert(False, device, logo, icon) }} +
+ {{ module }} +
+ +
+
+ {% endfor %} + {# Device profile #} +
+ {{ header.insert(False, device, logo, icon) }} + {{ device_profile.insert(json_data['device']['device_profile']) }} + +
+
+ + diff --git a/resources/test_packs/pilot/report_templates/resolve_steps.jinja b/resources/test_packs/pilot/report_templates/resolve_steps.jinja new file mode 100644 index 000000000..560c31744 --- /dev/null +++ b/resources/test_packs/pilot/report_templates/resolve_steps.jinja @@ -0,0 +1,19 @@ +{% macro insert(step_index, line) %} +
+
+ {{ step_index }}. +
+ Name
{{ line['name'] }} +
+
+ Description
{{ line["description"] }} +
+
+
+ Steps to resolve + {% for recommedtation in line['recommendations'] %} +
{{ loop.index }}. {{ recommedtation }} + {% endfor %} +
+
+{% endmacro %} \ No newline at end of file diff --git a/resources/test_packs/pilot/report_templates/results.jinja b/resources/test_packs/pilot/report_templates/results.jinja new file mode 100644 index 000000000..131cda8d1 --- /dev/null +++ b/resources/test_packs/pilot/report_templates/results.jinja @@ -0,0 +1,67 @@ +{% macro insert(successful_tests, total_tests, test_results, results_from, results_to) %} +
+

Results List ({{ successful_tests }}/{{ total_tests }})

+
+
Name
+
Description
+
Result
+
Required result
+
+ {% for i in range(results_from, results_to) %} + {% if test_results[i]['result'] == 'Non-Compliant' and test_results[i]['required_result'] == "Required" %} +
+ {% else %} +
+ {% endif %} +
{{ test_results[i]['name'] }}
+
{{ test_results[i]['description'] }}
+
+ {% elif test_results[i]['result'] == 'Compliant' %} + result-test-result-compliant"> + {% elif test_results[i]['result'] == 'Error' %} + result-test-result-error"> + {% elif test_results[i]['result'] == 'Feature Not Detected' %} + result-test-result-feature-not-detected"> + {% elif test_results[i]['result'] == 'Informational' %} + result-test-result-informational"> + {% else %} + result-test-result-skipped"> + {% endif %} + {{ test_results[i]['result'] }}
+ {# Required result badges #} + {% if test_results[i]['required_result'] == "Required" %} +
+ asterisk + {{ test_results[i]['required_result'] }} +
+ {% elif test_results[i]['required_result'] == "Required if Applicable" %} +
+ asterisk + {{ test_results[i]['required_result'] }} +
+ {% elif test_results[i]['required_result'] == "Informational" %} +
+ info_i + {{ test_results[i]['required_result'] }} +
+ {% elif test_results[i]['required_result'] == "Roadmap" %} +
+ road + {{ test_results[i]['required_result'] }} +
+ {% elif test_results[i]['required_result'] == "Recommended" %} + + {% else %} +
+ {{ test_results[i]['required_result'] }} +
+ {% endif %} +
+ {% endfor %} +
+{% endmacro %} \ No newline at end of file diff --git a/resources/test_packs/pilot/report_templates/summary.jinja b/resources/test_packs/pilot/report_templates/summary.jinja new file mode 100644 index 000000000..cd46fdd3e --- /dev/null +++ b/resources/test_packs/pilot/report_templates/summary.jinja @@ -0,0 +1,54 @@ +{% macro insert(json_data, device, modules, duration) %} +
+
+
+

Manufacturer

+
{{ device['manufacturer']}}
+
+

Model

+
{{ device['model'] }}
+
+

Firmware

+
{{ device['firmware']}}
+
+

MAC Address

+
{{ device['mac_addr'] }}
+
+
+
+
+

Device Configuration

+
+ {% for module, enabled in modules.items() %} +
+ {% if enabled %} + + {% else %} + + {% endif %} + {{ module }} +
+ {% endfor %} +
+ {% if test_status in ['Compliant', 'Proceed'] %} +
+ {% else %} +
+ {% endif %} +
Test Status
+
Complete
+
Pilot Recommendation
+
{{ json_data['status'] }}
+
Test Result
+
{{ json_data['result'] }}
+
Started
+
{{ json_data['started']}}
+
Duration
+
+ {% if duration.seconds//3600 > 0 %}{{ duration.seconds//3600 }}h {% endif %} + {% if duration.seconds//60 > 0 %}{{ duration.seconds//60 }}m {% endif %} + {{ duration.seconds%60 }}s +
+
+
+{% endmacro %} \ No newline at end of file diff --git a/resources/test_packs/pilot/test_pack.py b/resources/test_packs/pilot/test_pack.py index 71b73fb45..42cbe2dcc 100644 --- a/resources/test_packs/pilot/test_pack.py +++ b/resources/test_packs/pilot/test_pack.py @@ -39,3 +39,22 @@ def calculate_status(result, json): # pylint: disable=unused-argument status = TestrunStatus.DO_NOT_PROCEED return status + + +def get_steps_to_resolve(json_data): + steps = [] + + # Collect all tests with recommendations + for test in json_data["tests"]["results"]: + if "optional_recommendations" in test: + steps.append(test) + + if len(steps) < 3: + return [steps] + splitted = [steps[:3]] + index = 3 + while index < len(steps): + splitted.append(steps[index:index + 4]) + index += 4 + + return splitted diff --git a/resources/test_packs/qualification/report_template.html b/resources/test_packs/qualification/report_template.html deleted file mode 100644 index 0a22e2d3f..000000000 --- a/resources/test_packs/qualification/report_template.html +++ /dev/null @@ -1,228 +0,0 @@ -{% import 'header_macros.jinja' as header_macros %} - - - - - - - Testrun Report - - - - - {% set page_index = namespace(value=0) %} - {% set step_index = namespace(value=0) %} - {% set opt_step_index = namespace(value=0) %} - {# Test Results #} - {% for page in range(pages_num) %} - {% set page_index.value = page_index.value+1 %} -
- {{ header_macros.header(loop.first, "Testrun report", json_data, device, logo, icon_qualification, icon_pilot)}} - {% if loop.first %} -
-
-
-

Manufacturer

-
{{ device['manufacturer']}}
-
-

Model

-
{{ device['model'] }}
-
-

Firmware

-
{{ device['firmware']}}
-
-

MAC Address

-
{{ device['mac_addr'] }}
-
-
-
-
-

Device Configuration

-
- {% for module, enabled in modules.items() %} -
- {% if enabled %} - - {% else %} - - {% endif %} - {{ module }} -
- {% endfor %} -
- {% if test_status in ['Compliant', 'Proceed'] %} -
- {% else %} -
- {% endif %} -
Test Status
-
Complete
-
Test Result
-
{{ test_status }}
-
Started
-
{{ json_data['started']}}
-
Duration
-
- {% if duration.seconds//3600 > 0 %}{{ duration.seconds//3600 }}h {% endif %} - {% if duration.seconds//60 > 0 %}{{ duration.seconds//60 }}m {% endif %} - {{ duration.seconds%60 }}s -
-
-
- {% endif %} - {% if loop.first %} - {% set results_from = 0 %} - {% set results_to = [tests_first_page, test_results|length]|min %} - {% else %} - {% set results_from = tests_first_page + (loop.index0 - 1) * tests_per_page %} - {% set results_to = [results_from + tests_per_page, test_results|length]|min %} - {% endif %} -
-

Results List ({{ successful_tests }}/{{ total_tests }})

-
-
Name
-
Description
-
Result
-
Required result
-
- {% for i in range(results_from, results_to) %} - {% if test_results[i]['result'] == 'Non-Compliant' and test_results[i]['required_result'] == "Required" %} -
- {% else %} -
- {% endif %} -
{{ test_results[i]['name'] }}
-
{{ test_results[i]['description'] }}
-
- {% elif test_results[i]['result'] == 'Compliant' %} - result-test-result-compliant"> - {% elif test_results[i]['result'] == 'Error' %} - result-test-result-error"> - {% elif test_results[i]['result'] == 'Feature Not Detected' %} - result-test-result-feature-not-detected"> - {% elif test_results[i]['result'] == 'Informational' %} - result-test-result-informational"> - {% else %} - result-test-result-skipped"> - {% endif %} - {{ test_results[i]['result'] }}
- {# Required resul badges #} - {% if test_results[i]['required_result'] == "Required" %} -
- asterisk - {{ test_results[i]['required_result'] }} -
- {% elif test_results[i]['required_result'] == "Required if Applicable" %} -
- asterisk - {{ test_results[i]['required_result'] }} -
- {% elif test_results[i]['required_result'] == "Informational" %} -
- info_i - {{ test_results[i]['required_result'] }} -
- {% else %} -
- {{ test_results[i]['required_result'] }} -
- {% endif %} -
- {% endfor %} -
- -
-
- {% endfor %} - {# Steps to resolve Device qualification #} - {% if steps_to_resolve|length > 0 %} - {% for step in steps_to_resolve%} - {% set page_index.value = page_index.value + 1 %} -
- {{ header_macros.header(False, "Testrun report", json_data, device, logo, icon_qualification, icon_pilot)}} - {% if loop.first %} -

Non-compliant tests and suggested steps to resolve

- {% endif %} - {% for line in step %} - {% set step_index.value = step_index.value + 1 %} -
-
- {{ step_index.value }}. -
- Name
{{ line['name'] }} -
-
- Description
{{ line["description"] }} -
-
-
- Steps to resolve - {% for recommedtation in line['recommendations'] %} -
{{ loop.index }}. {{ recommedtation }} - {% endfor %} -
-
- {% endfor %} - -
- {% endfor %} - {% endif %} - {# Modules reports #} - {% for module in module_reports %} - {% set page_index.value = page_index.value+1 %} -
- {{ header_macros.header(False, "Testrun report", json_data, device, logo, icon_qualification, icon_pilot)}} -
- {{ module }} -
- -
-
- {% endfor %} - {# Device profile #} - {% set page_index.value = page_index.value+1 %} -
- {{ header_macros.header(False, "Testrun report", json_data, device, logo, icon_qualification, icon_pilot)}} -

Device profile

-
-
-
Question
-
Answer
-
- {% for question in json_data['device']['device_profile'] %} -
-
{{loop.index}}.
-
{{ question['question'] }}
-
- {% if question['answer'] is string %} - {{ question['answer'] }} - {% elif question['answer'] is sequence %} -
    - {% for answer in question['answer'] %} -
  • {{ answer }}
  • - {% endfor %} -
- {% endif %} -
-
- {% endfor %} -
- -
-
- - diff --git a/resources/test_packs/qualification/report_templates/device_profile.jinja b/resources/test_packs/qualification/report_templates/device_profile.jinja new file mode 100644 index 000000000..8fb03c063 --- /dev/null +++ b/resources/test_packs/qualification/report_templates/device_profile.jinja @@ -0,0 +1,26 @@ +{% macro insert(device_profile) %} +

Device profile

+
+
+
Question
+
Answer
+
+ {% for question in device_profile %} +
+
{{loop.index}}.
+
{{ question['question'] }}
+
+ {% if question['answer'] is string %} + {{ question['answer'] }} + {% elif question['answer'] is sequence %} +
    + {% for answer in question['answer'] %} +
  • {{ answer }}
  • + {% endfor %} +
+ {% endif %} +
+
+ {% endfor %} +
+{% endmacro %} \ No newline at end of file diff --git a/resources/report/header_macros.jinja b/resources/test_packs/qualification/report_templates/header.jinja similarity index 51% rename from resources/report/header_macros.jinja rename to resources/test_packs/qualification/report_templates/header.jinja index 93ae64f4b..616880b17 100644 --- a/resources/report/header_macros.jinja +++ b/resources/test_packs/qualification/report_templates/header.jinja @@ -1,18 +1,13 @@ -{% macro header(is_first, title, json_data, device, logo, icon_qualification, icon_pilot) %} +{% macro insert(is_first, device, logo, icon) %} {% if is_first %}
{# Badge #}

- {% if json_data['device']['test_pack'] == 'Device Qualification' %} - + Device Qualification - {% else %} - - Pilot Assessment - {% endif %}

-

{{ title }}

+

Testrun report

{{ device['manufacturer'] }} @@ -23,15 +18,10 @@
{# Badge #}

- {% if json_data['device']['test_pack'] == 'Device Qualification' %} - + Device Qualification - {% else %} - - Pilot Assessment - {% endif %}

- {{ title }} + Testrun report
{{ device['manufacturer'] }} diff --git a/resources/report/qualification-icon.png b/resources/test_packs/qualification/report_templates/icon.png similarity index 100% rename from resources/report/qualification-icon.png rename to resources/test_packs/qualification/report_templates/icon.png diff --git a/resources/test_packs/qualification/report_templates/report_template.html b/resources/test_packs/qualification/report_templates/report_template.html new file mode 100644 index 000000000..7521e9261 --- /dev/null +++ b/resources/test_packs/qualification/report_templates/report_template.html @@ -0,0 +1,90 @@ +{% import 'header.jinja' as header %} +{% import 'summary.jinja' as summary %} +{% import 'results.jinja' as results %} +{% import 'resolve_steps.jinja' as resolve_steps %} +{% import 'device_profile.jinja' as device_profile %} + +{% set step_index = namespace(value=0) %} + + + + + + + Testrun Report + + + + {# Test Results #} + {% for page in range(pages_num) %} +
+ {{ header.insert(loop.first, device, logo, icon)}} + {% if loop.first %} + {# Report summary #} + {{ summary.insert(json_data, device, modules, duration) }} + {% endif %} + {% if loop.first %} + {% set results_from = 0 %} + {% set results_to = [tests_first_page, test_results|length]|min %} + {% else %} + {% set results_from = tests_first_page + (loop.index0 - 1) * tests_per_page %} + {% set results_to = [results_from + tests_per_page, test_results|length]|min %} + {% endif %} + {# Test results table #} + {{ results.insert(successful_tests, total_tests, test_results, results_from, results_to) }} + +
+
+ {% endfor %} + {# Steps to resolve #} + {% if steps_to_resolve|length > 0 %} + {% for step in steps_to_resolve %} +
+ {{ header.insert(False, device, logo, icon)}} + {% if loop.first %} +

Non-compliant tests and suggested steps to resolve

+ {% endif %} + {% for line in step %} + {% set step_index.value = step_index.value + 1 %} + {{ resolve_steps.insert(step_index.value, line) }} + {% endfor %} + +
+ {% endfor %} + {% endif %} + {# Modules reports Jinja #} + {% for template in module_templates %} + {{ template }} + {% endfor %} + {# Modules reports as html #} + {% for module in module_reports %} +
+ {{ header.insert(False, device, logo, icon)}} +
+ {{ module }} +
+ +
+
+ {% endfor %} + {# Device profile #} +
+ {{ header.insert(False, device, logo, icon)}} + {{ device_profile.insert(json_data['device']['device_profile']) }} + +
+
+ + diff --git a/resources/test_packs/qualification/report_templates/resolve_steps.jinja b/resources/test_packs/qualification/report_templates/resolve_steps.jinja new file mode 100644 index 000000000..560c31744 --- /dev/null +++ b/resources/test_packs/qualification/report_templates/resolve_steps.jinja @@ -0,0 +1,19 @@ +{% macro insert(step_index, line) %} +
+
+ {{ step_index }}. +
+ Name
{{ line['name'] }} +
+
+ Description
{{ line["description"] }} +
+
+
+ Steps to resolve + {% for recommedtation in line['recommendations'] %} +
{{ loop.index }}. {{ recommedtation }} + {% endfor %} +
+
+{% endmacro %} \ No newline at end of file diff --git a/resources/test_packs/qualification/report_templates/results.jinja b/resources/test_packs/qualification/report_templates/results.jinja new file mode 100644 index 000000000..76c2c491c --- /dev/null +++ b/resources/test_packs/qualification/report_templates/results.jinja @@ -0,0 +1,67 @@ +{% macro insert(successful_tests, total_tests, test_results, results_from, results_to) %} +
+

Results List ({{ successful_tests }}/{{ total_tests }})

+
+
Name
+
Description
+
Result
+
Required result
+
+ {% for i in range(results_from, results_to) %} + {% if test_results[i]['result'] == 'Non-Compliant' and test_results[i]['required_result'] == "Required" %} +
+ {% else %} +
+ {% endif %} +
{{ test_results[i]['name'] }}
+
{{ test_results[i]['description'] }}
+
+ {% elif test_results[i]['result'] == 'Compliant' %} + result-test-result-compliant"> + {% elif test_results[i]['result'] == 'Error' %} + result-test-result-error"> + {% elif test_results[i]['result'] == 'Feature Not Detected' %} + result-test-result-feature-not-detected"> + {% elif test_results[i]['result'] == 'Informational' %} + result-test-result-informational"> + {% else %} + result-test-result-skipped"> + {% endif %} + {{ test_results[i]['result'] }}
+ {# Required result badges #} + {% if test_results[i]['required_result'] == "Required" %} +
+ asterisk + {{ test_results[i]['required_result'] }} +
+ {% elif test_results[i]['required_result'] == "Required if Applicable" %} +
+ asterisk + {{ test_results[i]['required_result'] }} +
+ {% elif test_results[i]['required_result'] == "Informational" %} +
+ info_i + {{ test_results[i]['required_result'] }} +
+ {% elif test_results[i]['required_result'] == "Roadmap" %} +
+ road + {{ test_results[i]['required_result'] }} +
+ {% elif test_results[i]['required_result'] == "Recommended" %} + + {% else %} +
+ {{ test_results[i]['required_result'] }} +
+ {% endif %} +
+ {% endfor %} +
+{% endmacro %} \ No newline at end of file diff --git a/resources/test_packs/qualification/report_templates/summary.jinja b/resources/test_packs/qualification/report_templates/summary.jinja new file mode 100644 index 000000000..eb3e367dc --- /dev/null +++ b/resources/test_packs/qualification/report_templates/summary.jinja @@ -0,0 +1,52 @@ +{% macro insert(json_data, device, modules, duration) %} +
+
+
+

Manufacturer

+
{{ device['manufacturer']}}
+
+

Model

+
{{ device['model'] }}
+
+

Firmware

+
{{ device['firmware']}}
+
+

MAC Address

+
{{ device['mac_addr'] }}
+
+
+
+
+

Device Configuration

+
+ {% for module, enabled in modules.items() %} +
+ {% if enabled %} + + {% else %} + + {% endif %} + {{ module }} +
+ {% endfor %} +
+ {% if test_status == 'Compliant' %} +
+ {% else %} +
+ {% endif %} +
Test Status
+
{{ json_data['status'] }}
+
Test Result
+
{{ json_data['result'] }}
+
Started
+
{{ json_data['started']}}
+
Duration
+
+ {% if duration.seconds//3600 > 0 %}{{ duration.seconds//3600 }}h {% endif %} + {% if duration.seconds//60 > 0 %}{{ duration.seconds//60 }}m {% endif %} + {{ duration.seconds%60 }}s +
+
+
+{% endmacro %} \ No newline at end of file diff --git a/resources/test_packs/qualification/test_pack.py b/resources/test_packs/qualification/test_pack.py index 263c5d04b..4dee8c12e 100644 --- a/resources/test_packs/qualification/test_pack.py +++ b/resources/test_packs/qualification/test_pack.py @@ -35,3 +35,22 @@ def calculate_status(result, json): # pylint: disable=unused-argument status = TestrunStatus.COMPLETE return status + + +def get_steps_to_resolve(json_data): + steps = [] + + # Collect all tests with recommendations + for test in json_data["tests"]["results"]: + if "recommendations" in test: + steps.append(test) + + if len(steps) < 4: + return [steps] + splitted = [steps[:4]] + index = 4 + while index < len(steps): + splitted.append(steps[index:index + 4]) + index += 4 + + return splitted diff --git a/testing/unit/dns/reports/dns_report_local.html b/testing/unit/dns/reports/dns_report_local.html index c61264f86..6d4d80a88 100644 --- a/testing/unit/dns/reports/dns_report_local.html +++ b/testing/unit/dns/reports/dns_report_local.html @@ -4,13 +4,8 @@
{# Badge #}

- {% if json_data['device']['test_pack'] == 'Device Qualification' %} - - Device Qualification - {% else %} - - Pilot Assessment - {% endif %} + + {{ name }}

{{ title }}
diff --git a/testing/unit/dns/reports/dns_report_local_no_dns.html b/testing/unit/dns/reports/dns_report_local_no_dns.html index 2aba1215c..f81521cbe 100644 --- a/testing/unit/dns/reports/dns_report_local_no_dns.html +++ b/testing/unit/dns/reports/dns_report_local_no_dns.html @@ -4,13 +4,8 @@
{# Badge #}

- {% if json_data['device']['test_pack'] == 'Device Qualification' %} - - Device Qualification - {% else %} - - Pilot Assessment - {% endif %} + + {{ name }}

{{ title }}
diff --git a/testing/unit/ntp/reports/ntp_report_local.html b/testing/unit/ntp/reports/ntp_report_local.html index a65844d62..7ca4b2e19 100644 --- a/testing/unit/ntp/reports/ntp_report_local.html +++ b/testing/unit/ntp/reports/ntp_report_local.html @@ -4,13 +4,8 @@
{# Badge #}

- {% if json_data['device']['test_pack'] == 'Device Qualification' %} - - Device Qualification - {% else %} - - Pilot Assessment - {% endif %} + + {{ name }}

{{ title }}
diff --git a/testing/unit/ntp/reports/ntp_report_local_no_ntp.html b/testing/unit/ntp/reports/ntp_report_local_no_ntp.html index 35fdf9776..f67207fca 100644 --- a/testing/unit/ntp/reports/ntp_report_local_no_ntp.html +++ b/testing/unit/ntp/reports/ntp_report_local_no_ntp.html @@ -4,13 +4,8 @@
{# Badge #}

- {% if json_data['device']['test_pack'] == 'Device Qualification' %} - - Device Qualification - {% else %} - - Pilot Assessment - {% endif %} + + {{ name }}

{{ title }}
diff --git a/testing/unit/services/reports/services_report_all_closed_local.html b/testing/unit/services/reports/services_report_all_closed_local.html index 194dcb27e..01b6ec0f0 100644 --- a/testing/unit/services/reports/services_report_all_closed_local.html +++ b/testing/unit/services/reports/services_report_all_closed_local.html @@ -4,13 +4,8 @@
{# Badge #}

- {% if json_data['device']['test_pack'] == 'Device Qualification' %} - - Device Qualification - {% else %} - - Pilot Assessment - {% endif %} + + {{ name }}

{{ title }}
diff --git a/testing/unit/services/reports/services_report_local.html b/testing/unit/services/reports/services_report_local.html index 082dc1bbd..786a98f1d 100644 --- a/testing/unit/services/reports/services_report_local.html +++ b/testing/unit/services/reports/services_report_local.html @@ -4,13 +4,8 @@
{# Badge #}

- {% if json_data['device']['test_pack'] == 'Device Qualification' %} - - Device Qualification - {% else %} - - Pilot Assessment - {% endif %} + + {{ name }}

{{ title }}
diff --git a/testing/unit/tls/reports/tls_report_ext_local.html b/testing/unit/tls/reports/tls_report_ext_local.html index 41d112699..e9e3b1930 100644 --- a/testing/unit/tls/reports/tls_report_ext_local.html +++ b/testing/unit/tls/reports/tls_report_ext_local.html @@ -4,13 +4,8 @@
{# Badge #}

- {% if json_data['device']['test_pack'] == 'Device Qualification' %} - - Device Qualification - {% else %} - - Pilot Assessment - {% endif %} + + {{ name }}

{{ title }}
diff --git a/testing/unit/tls/reports/tls_report_local.html b/testing/unit/tls/reports/tls_report_local.html index 2a7c16e09..087447b95 100644 --- a/testing/unit/tls/reports/tls_report_local.html +++ b/testing/unit/tls/reports/tls_report_local.html @@ -4,13 +4,8 @@
{# Badge #}

- {% if json_data['device']['test_pack'] == 'Device Qualification' %} - - Device Qualification - {% else %} - - Pilot Assessment - {% endif %} + + {{ name }}

{{ title }}
diff --git a/testing/unit/tls/reports/tls_report_no_cert_local.html b/testing/unit/tls/reports/tls_report_no_cert_local.html index 0675c321d..c641abbf0 100644 --- a/testing/unit/tls/reports/tls_report_no_cert_local.html +++ b/testing/unit/tls/reports/tls_report_no_cert_local.html @@ -4,13 +4,8 @@
{# Badge #}

- {% if json_data['device']['test_pack'] == 'Device Qualification' %} - - Device Qualification - {% else %} - - Pilot Assessment - {% endif %} + + {{ name }}

{{ title }}
diff --git a/testing/unit/tls/reports/tls_report_single.html b/testing/unit/tls/reports/tls_report_single.html index def8e7252..4fb2be16d 100644 --- a/testing/unit/tls/reports/tls_report_single.html +++ b/testing/unit/tls/reports/tls_report_single.html @@ -4,13 +4,8 @@
{# Badge #}

- {% if json_data['device']['test_pack'] == 'Device Qualification' %} - - Device Qualification - {% else %} - - Pilot Assessment - {% endif %} + + {{ name }}

{{ title }}