diff --git a/hyperglass/configuration/__init__.py b/hyperglass/configuration/__init__.py index 11c0023..bd901d8 100644 --- a/hyperglass/configuration/__init__.py +++ b/hyperglass/configuration/__init__.py @@ -421,3 +421,12 @@ _frontend_params.update( } ) frontend_params = _frontend_params + +URL_DEV = f"http://localhost:{str(params.general.listen_port)}/api/" +URL_PROD = "/api/" + +REDIS_CONFIG = { + "host": str(params.general.redis_host), + "port": params.general.redis_port, + "decode_responses": True, +} diff --git a/hyperglass/configuration/models/docs.py b/hyperglass/configuration/models/docs.py index 4511b53..566789c 100644 --- a/hyperglass/configuration/models/docs.py +++ b/hyperglass/configuration/models/docs.py @@ -18,3 +18,4 @@ class Docs(HyperglassModel): endpoint_summary: StrictStr = "Query Endpoint" endpoint_description: StrictStr = "Request a query response per-location." group_title: StrictStr = "Queries" + openapi_url: AnyUri = "/openapi.json" diff --git a/hyperglass/constants.py b/hyperglass/constants.py index 48ecade..bfaf89b 100644 --- a/hyperglass/constants.py +++ b/hyperglass/constants.py @@ -34,6 +34,8 @@ LOG_HANDLER = {"sink": sys.stdout, "format": LOG_FMT, "level": "INFO"} LOG_HANDLER_FILE = {"format": LOG_FMT, "level": "INFO"} +STATUS_CODE_MAP = {"warning": 400, "error": 400, "danger": 500} + CREDIT = """ Powered by [**hyperglass**](https://github.com/checktheroads/hyperglass). Source code \ licensed \