def get_web_config(environ, start_response): status = '200 OK' headers = [('Content-type', 'application/json; charset=UTF-8'), ("Access-Control-Allow-Origin", "*")] start_response(status, headers) config = WebConfig( os.path.abspath(os.path.dirname(__file__)).replace('scripts', '')) config.time_series_status = time_series_tester(config) yield config.to_json().encode('utf8')
def get_web_config(_, start_response): status = "200 OK" headers = [("Content-type", "application/json; charset=UTF-8"), ("Access-Control-Allow-Origin", "*")] start_response(status, headers) db_path = os.path.abspath(os.path.dirname(__file__)).replace("scripts", "") config = WebConfig(db_path) config.time_series_status = time_series_tester(config) db_locals = MakeDBConfig(os.path.join(db_path, "data/db.locals.py")) config.data["available_metadata"] = db_locals.metadata_fields yield config.to_json().encode("utf8")