Commit 1aa1b21e authored by Raphaël Hertzog's avatar Raphaël Hertzog

Make the security tracker relocatable to another base URL

Hosting the tracker at an URL different from /tracker/ was not possible
without these changes. There's still one small glitch left with the
hardcoding of /tracker/logo.png in static/style.css.
parent f0c78bad
Pipeline #8187 passed with stage
in 33 seconds
......@@ -121,11 +121,6 @@ class BugFilter:
return no_dsa_reason == 'postponed' and not self.params['nopostponed']
class TrackerService(webservice_base_class):
head_contents = compose(
LINK(' ', href="/tracker/style.css"),
SCRIPT(' ', src="/tracker/script.js"),
).toHTML()
nvd_text = P('''If a "**" is included, the urgency field was automatically
assigned by the NVD (National Vulnerability Database). Note that this
rating is automatically derived from a set of known factors about the
......@@ -1492,8 +1487,12 @@ Debian bug number.'''),
on_load = "selectSearch()"
else:
on_load = None
head_contents = compose(
LINK(' ', href=url.scriptRelative("style.css")),
SCRIPT(' ', src=url.scriptRelative("script.js")),
).toHTML()
return HTMLResult(self.add_title(title, body,
head_contents=self.head_contents,
head_contents=head_contents,
body_attribs={'onload': on_load}),
doctype=self.html_dtd(),
status=status)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment