mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-06-24 05:35:10 +00:00
Add an API-only mode that hides the server's web UI. Closes #111
This commit is contained in:
@@ -3,7 +3,7 @@ from datetime import datetime
|
||||
import pytz
|
||||
import tornado
|
||||
|
||||
from core.config import ALLOW_SPOTTING, WEB_UI_OPTIONS, BASE_URL
|
||||
from core.config import ALLOW_SPOTTING, WEB_UI_OPTIONS, BASE_URL, SERVER_OWNER_CALLSIGN
|
||||
from core.constants import SOFTWARE_VERSION
|
||||
from core.prometheus_metrics_handler import page_requests_counter
|
||||
|
||||
@@ -26,7 +26,8 @@ class PageTemplateHandler(tornado.web.RequestHandler):
|
||||
page_requests_counter.inc()
|
||||
|
||||
# Load named template, and provide variables used in templates
|
||||
self.render(self._template_name + ".html", software_version=SOFTWARE_VERSION, allow_spotting=ALLOW_SPOTTING,
|
||||
self.render(self._template_name + ".html", software_version=SOFTWARE_VERSION,
|
||||
server_owner_callsign=SERVER_OWNER_CALLSIGN, allow_spotting=ALLOW_SPOTTING,
|
||||
web_ui_options=WEB_UI_OPTIONS, baseurl=BASE_URL, current_path=self.request.path,
|
||||
has_hamqsl=self._has_hamqsl, has_noaa_forecast=self._has_noaa_forecast,
|
||||
has_giro_ionosonde=self._has_giro_ionosonde)
|
||||
Reference in New Issue
Block a user