diff --git a/ogc/bblocks/validation/report.html.mako b/ogc/bblocks/validation/report.html.mako index bb6e23f..23f279c 100644 --- a/ogc/bblocks/validation/report.html.mako +++ b/ogc/bblocks/validation/report.html.mako @@ -1,4 +1,4 @@ -<% +<%! from html import escape as e from datetime import datetime, timezone from urllib.parse import urlparse, urljoin @@ -8,6 +8,13 @@ from ogc.na.util import is_url import re import os.path +uid = 0 +last_uid = None +def get_uid(): + global uid, last_uid + uid += 1 + last_uid = f"uid-{globals()['uid']}" + return last_uid get_filename = lambda s: basename(urlparse(s).path) %> @@ -16,11 +23,21 @@ get_filename = lambda s: basename(urlparse(s).path) Building Blocks validation report + @@ -89,7 +106,14 @@ get_filename = lambda s: basename(urlparse(s).path) % for item in report['items']:
-
+
+ ${e(re.sub(r'.*/', '', item['source']['filename']))} ${e(item['source']['type'].replace('_', ' ').capitalize())} % if item['source']['requireFail']: @@ -103,12 +127,14 @@ get_filename = lambda s: basename(urlparse(s).path) % endif
-
- % for subsection_title, section in item['sections'].items(): - % for entry in section: -
${e(entry['message'])}
+
+
+ % for subsection_title, section in item['sections'].items(): + % for entry in section: +
${e(entry['message'])}
+ % endfor % endfor - % endfor +
@@ -129,7 +155,6 @@ get_filename = lambda s: basename(urlparse(s).path)