diff --git a/owrx/controllers/status.py b/owrx/controllers/status.py index 61f7102..beded28 100644 --- a/owrx/controllers/status.py +++ b/owrx/controllers/status.py @@ -9,26 +9,6 @@ import pkg_resources class StatusController(Controller): - def indexAction(self): - pm = Config.get() - # convert to old format - gps = (pm["receiver_gps"]["lat"], pm["receiver_gps"]["lon"]) - avatar_path = pkg_resources.resource_filename("htdocs", "gfx/openwebrx-avatar.png") - # TODO keys that have been left out since they are no longer simple strings: sdr_hw, bands, antenna - vars = { - "status": "active", - "name": pm["receiver_name"], - "op_email": pm["receiver_admin"], - "users": ClientRegistry.getSharedInstance().clientCount(), - "users_max": pm["max_clients"], - "gps": gps, - "asl": pm["receiver_asl"], - "loc": pm["receiver_location"], - "sw_version": openwebrx_version, - "avatar_ctime": os.path.getctime(avatar_path), - } - self.send_response("\n".join(["{key}={value}".format(key=key, value=value) for key, value in vars.items()])) - def getProfileStats(self, profile): return { "name": profile["name"], @@ -45,7 +25,7 @@ class StatusController(Controller): } return stats - def jsonAction(self): + def indexAction(self): pm = Config.get() status = { diff --git a/owrx/http.py b/owrx/http.py index 8381646..812bec0 100644 --- a/owrx/http.py +++ b/owrx/http.py @@ -89,15 +89,12 @@ class Router(object): def __init__(self): self.routes = [ StaticRoute("/", IndexController), - StaticRoute("/status", StatusController), - StaticRoute("/status.json", StatusController, options={"action": "jsonAction"}), + StaticRoute("/status.json", StatusController), RegexRoute("/static/(.+)", OwrxAssetsController), RegexRoute("/compiled/(.+)", CompiledAssetsController), RegexRoute("/aprs-symbols/(.+)", AprsSymbolsController), StaticRoute("/ws/", WebSocketController), RegexRoute("(/favicon.ico)", OwrxAssetsController), - # backwards compatibility for the sdr.hu portal - RegexRoute("(/gfx/openwebrx-avatar.png)", OwrxAssetsController), StaticRoute("/map", MapController), StaticRoute("/features", FeatureController), StaticRoute("/api/features", ApiController),