diff --git a/src/macaron/output_reporter/jinja2_extensions.py b/src/macaron/output_reporter/jinja2_extensions.py index 0c1f87932..e4ef836af 100644 --- a/src/macaron/output_reporter/jinja2_extensions.py +++ b/src/macaron/output_reporter/jinja2_extensions.py @@ -147,12 +147,12 @@ def j2_filter_get_flatten_dict(data: Any, has_key: bool = False) -> dict | Any: return {"0": str(data)} -def j2_filter_get_dep_status_color(dep_status: str) -> str: - """Return the html class name for the color of the dep status. +def j2_filter_get_dep_status_color(repo_url_status: str) -> str: + """Return the html class name for the color of the dep repo url status. Parameters ---------- - dep_status : str + repo_url_status : str The dep status as string. Returns @@ -161,7 +161,7 @@ def j2_filter_get_dep_status_color(dep_status: str) -> str: The css class name with the corresponding color or an empty string if the status is not recognized. """ try: - scm_status = SCMStatus(dep_status) + scm_status = SCMStatus(repo_url_status) match scm_status: case SCMStatus.AVAILABLE: return "green_bg" diff --git a/src/macaron/output_reporter/results.py b/src/macaron/output_reporter/results.py index 95985002c..ba9adb239 100644 --- a/src/macaron/output_reporter/results.py +++ b/src/macaron/output_reporter/results.py @@ -99,13 +99,13 @@ def get_summary(self) -> dict: Examples -------- >>> record.get_summary() - {'id': 'apache/maven', 'description': 'Analysis completed', 'report': 'apache.html', 'status': 'AVAILABLE'} + {'id': 'apache/maven', 'description': 'Analysis completed', 'report': 'apache.html', 'status': SCMStatus.AVAILABLE} """ return { "id": self.record_id, "description": self.description, "report": f"{self.context.component.report_file_name}.html" if self.context else "", - "status": self.status, + "repo_url_status": self.pre_config.get_value("available") or SCMStatus.MISSING_SCM, } def get_dict(self) -> dict: diff --git a/src/macaron/output_reporter/templates/macaron.html b/src/macaron/output_reporter/templates/macaron.html index 1ab03be54..1cb794ca9 100644 --- a/src/macaron/output_reporter/templates/macaron.html +++ b/src/macaron/output_reporter/templates/macaron.html @@ -153,7 +153,7 @@ {% else %}