feat: add ReconConfig API and UI for managing configurations

- Added a new API endpoint for managing ReconConfigs at /api/configs, including GET, POST, PUT, and a test URL feature.
- Implemented a new configuration editor UI at /configs for creating and editing ReconConfigs.
- Introduced a new configs list page at /configs to display existing configurations with options to edit.
- Updated base HTML template to include a link to the new configs page.
- Created stub configuration and authentication models for workspace development.
- Added a stub configuration module to handle database configuration without a real database.
This commit is contained in:
2026-05-26 21:58:04 +12:00
parent cf8ec5f094
commit 35d70a7746
10 changed files with 2181 additions and 725 deletions
+29
View File
@@ -0,0 +1,29 @@
"""Stub config module for the workspace.
The production repo has a full config with database URLs and connection maps.
This stub satisfies imports without a real database.
"""
from functools import lru_cache
from os import getenv
db_config_map = {
"NETREVEAL": "netreveal",
"DATAPRODUCT": "dataproduct",
"GROUPDW": "groupdw",
"SNOWFLAKE": "snowflake",
}
class DBConfig:
def __init__(self) -> None:
self.db_url = getenv("DATABASE_URL", "sqlite+aiosqlite:///./recon_ranger.db")
@lru_cache
def get_db_config() -> DBConfig:
return DBConfig()
db_config = get_db_config()
config = db_config