summaryrefslogtreecommitdiffstats
path: root/bin/tracker_service.py
diff options
context:
space:
mode:
authorRaphaël Hertzog <hertzog@debian.org>2018-05-31 10:12:49 +0200
committerRaphaël Hertzog <hertzog@debian.org>2018-05-31 10:12:49 +0200
commit1aa1b21eeddbf4da94d35e8edeb8d397157d3ac2 (patch)
treee061ddbb06754fc0d7699b924628624872e22353 /bin/tracker_service.py
parentf0c78bad812ad2d092efb64c3eebb12ec7ba7523 (diff)
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.
Diffstat (limited to 'bin/tracker_service.py')
-rwxr-xr-xbin/tracker_service.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/bin/tracker_service.py b/bin/tracker_service.py
index 6727b67d63..8757d0c4da 100755
--- a/bin/tracker_service.py
+++ b/bin/tracker_service.py
@@ -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)

© 2014-2024 Faster IT GmbH | imprint | privacy policy