def start(): if not Config.get()["services_enabled"]: return for source in SdrService.getSources().values(): props = source.getProps() if "services" not in props or props["services"] is not False: Services.handlers.append(ServiceHandler(source))
def __sendProfiles(self): profiles = [ {"name": s.getName() + " " + p["name"], "id": sid + "|" + pid} for (sid, s) in SdrService.getSources().items() for (pid, p) in s.getProfiles().items() ] self.write_profiles(profiles)
def start(): if not PropertyManager.getSharedInstance()["services_enabled"]: return for source in SdrService.getSources().values(): props = source.getProps() if "services" not in props or props["services"] is not False: Services.handlers.append(ServiceHandler(source))
def indexAction(self): pm = Config.get() status = { "receiver": { "name": pm["receiver_name"], "admin": pm["receiver_admin"], "gps": pm["receiver_gps"], "asl": pm["receiver_asl"], "location": pm["receiver_location"], }, "max_clients": pm["max_clients"], "version": openwebrx_version, "sdrs": [self.getReceiverStats(r) for r in SdrService.getSources().values()] } self.send_response(json.dumps(status), content_type="application/json")
def indexAction(self): pm = Config.get() headers = None if "Authorization" in self.request.headers: try: headers = ReceiverId.getResponseHeader(self.request.headers["Authorization"]) except KeyException: logger.exception("error processing authorization header") status = { "receiver": { "name": pm["receiver_name"], "admin": pm["receiver_admin"], "gps": pm["receiver_gps"], "asl": pm["receiver_asl"], "location": pm["receiver_location"], }, "max_clients": pm["max_clients"], "version": openwebrx_version, "sdrs": [self.getReceiverStats(r) for r in SdrService.getSources().values()] } self.send_response(json.dumps(status), content_type="application/json", headers=headers)