|
@@ -879,12 +879,12 @@ def boolean_str(b):
|
|
|
|
|
|
|
|
|
def dump_html_pkg(f, pkg):
|
|
|
- f.write(f'<div id=\"package_{pkg.name}\" \
|
|
|
- class=\"package data {pkg.name}\">{pkg.path}</div>\n')
|
|
|
+ f.write(f'<div id=\"package__{pkg.name}\" \
|
|
|
+ class=\"package data _{pkg.name}\">{pkg.path}</div>\n')
|
|
|
# Patch count
|
|
|
- data_field_id = f'patch_count_{pkg.name}'
|
|
|
+ data_field_id = f'patch_count__{pkg.name}'
|
|
|
div_class = ["centered patch_count data"]
|
|
|
- div_class.append(pkg.name)
|
|
|
+ div_class.append(f'_{pkg.name}')
|
|
|
if pkg.patch_count == 0:
|
|
|
div_class.append("nopatches")
|
|
|
elif pkg.patch_count < 5:
|
|
@@ -895,10 +895,10 @@ def dump_html_pkg(f, pkg):
|
|
|
\">{str(pkg.patch_count)}</div>\n')
|
|
|
|
|
|
# Infrastructure
|
|
|
- data_field_id = f'infrastructure_{pkg.name}'
|
|
|
+ data_field_id = f'infrastructure__{pkg.name}'
|
|
|
infra = infra_str(pkg.infras)
|
|
|
div_class = ["centered infrastructure data"]
|
|
|
- div_class.append(pkg.name)
|
|
|
+ div_class.append(f'_{pkg.name}')
|
|
|
if infra == "Unknown":
|
|
|
div_class.append("wrong")
|
|
|
else:
|
|
@@ -907,9 +907,9 @@ def dump_html_pkg(f, pkg):
|
|
|
\">{infra_str(pkg.infras)}</div>\n')
|
|
|
|
|
|
# License
|
|
|
- data_field_id = f'license_{pkg.name}'
|
|
|
+ data_field_id = f'license__{pkg.name}'
|
|
|
div_class = ["centered license data"]
|
|
|
- div_class.append(pkg.name)
|
|
|
+ div_class.append(f'_{pkg.name}')
|
|
|
if pkg.is_status_ok('license'):
|
|
|
div_class.append("correct")
|
|
|
else:
|
|
@@ -918,9 +918,9 @@ def dump_html_pkg(f, pkg):
|
|
|
\">{boolean_str(pkg.is_status_ok("license"))}</div>\n')
|
|
|
|
|
|
# License files
|
|
|
- data_field_id = f'license_files_{pkg.name}'
|
|
|
+ data_field_id = f'license_files__{pkg.name}'
|
|
|
div_class = ["centered license_files data"]
|
|
|
- div_class.append(pkg.name)
|
|
|
+ div_class.append(f'_{pkg.name}')
|
|
|
if pkg.is_status_ok('license-files'):
|
|
|
div_class.append("correct")
|
|
|
else:
|
|
@@ -929,9 +929,9 @@ def dump_html_pkg(f, pkg):
|
|
|
\">{boolean_str(pkg.is_status_ok("license-files"))}</div>\n')
|
|
|
|
|
|
# Hash
|
|
|
- data_field_id = f'hash_file_{pkg.name}'
|
|
|
+ data_field_id = f'hash_file__{pkg.name}'
|
|
|
div_class = ["centered hash_file data"]
|
|
|
- div_class.append(pkg.name)
|
|
|
+ div_class.append(f'_{pkg.name}')
|
|
|
if pkg.is_status_ok('hash'):
|
|
|
div_class.append("correct")
|
|
|
else:
|
|
@@ -940,7 +940,7 @@ def dump_html_pkg(f, pkg):
|
|
|
\">{boolean_str(pkg.is_status_ok("hash"))}</div>\n')
|
|
|
|
|
|
# Current version
|
|
|
- data_field_id = f'current_version_{pkg.name}'
|
|
|
+ data_field_id = f'current_version__{pkg.name}'
|
|
|
if len(pkg.current_version) > 20:
|
|
|
current_version = pkg.current_version[:20] + "..."
|
|
|
else:
|
|
@@ -949,8 +949,8 @@ def dump_html_pkg(f, pkg):
|
|
|
class=\"centered current_version data {pkg.name}\">{current_version}</div>\n')
|
|
|
|
|
|
# Latest version
|
|
|
- data_field_id = f'latest_version_{pkg.name}'
|
|
|
- div_class.append(pkg.name)
|
|
|
+ data_field_id = f'latest_version__{pkg.name}'
|
|
|
+ div_class.append(f'_{pkg.name}')
|
|
|
div_class.append("latest_version data")
|
|
|
if pkg.latest_version['status'] == RM_API_STATUS_ERROR:
|
|
|
div_class.append("version-error")
|
|
@@ -982,9 +982,9 @@ def dump_html_pkg(f, pkg):
|
|
|
f.write(f' <div id=\"{data_field_id}\" class=\"{" ".join(div_class)}\">{latest_version_text}</div>\n')
|
|
|
|
|
|
# Warnings
|
|
|
- data_field_id = f'warnings_{pkg.name}'
|
|
|
+ data_field_id = f'warnings__{pkg.name}'
|
|
|
div_class = ["centered warnings data"]
|
|
|
- div_class.append(pkg.name)
|
|
|
+ div_class.append(f'_{pkg.name}')
|
|
|
if pkg.warnings == 0:
|
|
|
div_class.append("correct")
|
|
|
else:
|
|
@@ -992,9 +992,9 @@ def dump_html_pkg(f, pkg):
|
|
|
f.write(f' <div id=\"{data_field_id}\" class=\"{" ".join(div_class)}\">{pkg.warnings}</div>\n')
|
|
|
|
|
|
# URL status
|
|
|
- data_field_id = f'upstream_url_{pkg.name}'
|
|
|
+ data_field_id = f'upstream_url__{pkg.name}'
|
|
|
div_class = ["centered upstream_url data"]
|
|
|
- div_class.append(pkg.name)
|
|
|
+ div_class.append(f'_{pkg.name}')
|
|
|
url_str = pkg.status['url'][1]
|
|
|
if pkg.status['url'][0] in ("error", "warning"):
|
|
|
div_class.append("missing_url")
|
|
@@ -1007,9 +1007,9 @@ def dump_html_pkg(f, pkg):
|
|
|
f.write(f' <div id=\"{data_field_id}\" class=\"{" ".join(div_class)}\">{url_str}</div>\n')
|
|
|
|
|
|
# CVEs
|
|
|
- data_field_id = f'cves_{pkg.name}'
|
|
|
+ data_field_id = f'cves__{pkg.name}'
|
|
|
div_class = ["centered cves data"]
|
|
|
- div_class.append(pkg.name)
|
|
|
+ div_class.append(f'_{pkg.name}')
|
|
|
if pkg.is_status_ok("cve"):
|
|
|
div_class.append("cve-ok")
|
|
|
elif pkg.is_status_error("cve"):
|
|
@@ -1031,9 +1031,9 @@ def dump_html_pkg(f, pkg):
|
|
|
f.write(" </div>\n")
|
|
|
|
|
|
# CVEs Ignored
|
|
|
- data_field_id = f'ignored_cves_{pkg.name}'
|
|
|
+ data_field_id = f'ignored_cves__{pkg.name}'
|
|
|
div_class = ["centered data ignored_cves"]
|
|
|
- div_class.append(pkg.name)
|
|
|
+ div_class.append(f'_{pkg.name}')
|
|
|
if pkg.ignored_cves:
|
|
|
div_class.append("cve_ignored")
|
|
|
f.write(f' <div id=\"{data_field_id}\" class=\"{" ".join(div_class)}\">\n')
|
|
@@ -1042,9 +1042,9 @@ def dump_html_pkg(f, pkg):
|
|
|
f.write(" </div>\n")
|
|
|
|
|
|
# CPE ID
|
|
|
- data_field_id = f'cpe_id_{pkg.name}'
|
|
|
+ data_field_id = f'cpe_id__{pkg.name}'
|
|
|
div_class = ["left cpe_id data"]
|
|
|
- div_class.append(pkg.name)
|
|
|
+ div_class.append(f'_{pkg.name}')
|
|
|
if pkg.is_status_ok("cpe"):
|
|
|
div_class.append("cpe-ok")
|
|
|
elif pkg.is_status_error("cpe"):
|