split config and property code, first test
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
from . import Controller
|
||||
from owrx.config import PropertyManager
|
||||
from owrx.config import Config
|
||||
from datetime import datetime
|
||||
import mimetypes
|
||||
import os
|
||||
@ -47,7 +47,7 @@ class OwrxAssetsController(AssetsController):
|
||||
|
||||
class AprsSymbolsController(AssetsController):
|
||||
def __init__(self, handler, request, options):
|
||||
pm = PropertyManager.getSharedInstance()
|
||||
pm = Config.get()
|
||||
path = pm["aprs_symbols_path"]
|
||||
if not path.endswith("/"):
|
||||
path += "/"
|
||||
|
@ -2,14 +2,14 @@ from . import Controller
|
||||
from owrx.client import ClientRegistry
|
||||
from owrx.version import openwebrx_version
|
||||
from owrx.sdr import SdrService
|
||||
from owrx.config import PropertyManager
|
||||
from owrx.config import Config
|
||||
import os
|
||||
import json
|
||||
|
||||
|
||||
class StatusController(Controller):
|
||||
def indexAction(self):
|
||||
pm = PropertyManager.getSharedInstance()
|
||||
pm = Config.get()
|
||||
# TODO keys that have been left out since they are no longer simple strings: sdr_hw, bands, antenna
|
||||
vars = {
|
||||
"status": "active",
|
||||
@ -42,7 +42,7 @@ class StatusController(Controller):
|
||||
return stats
|
||||
|
||||
def jsonAction(self):
|
||||
pm = PropertyManager.getSharedInstance()
|
||||
pm = Config.get()
|
||||
|
||||
gps = pm["receiver_gps"]
|
||||
status = {
|
||||
|
Reference in New Issue
Block a user