corvix.web.app ============== .. py:module:: corvix.web.app .. autoapi-nested-parse:: Litestar app serving Corvix dashboard data and UI. Attributes ---------- .. autoapisummary:: corvix.web.app.logger corvix.web.app.THEMES corvix.web.app._STATIC_ROOT corvix.web.app._STATIC_ASSETS_DIR corvix.web.app._ASSET_FILENAMES corvix.web.app._ASSET_CACHE_CONTROL corvix.web.app._INDEX_HTML_TEMPLATE corvix.web.app.INDEX_HTML corvix.web.app.app Functions --------- .. autoapisummary:: corvix.web.app._asset_version_token corvix.web.app.index corvix.web.app.dashboard_index corvix.web.app.health corvix.web.app.api_themes corvix.web.app.dashboards corvix.web.app.snapshot corvix.web.app.dismiss_notification corvix.web.app.dismiss_notification_default_account corvix.web.app.mark_notification_read corvix.web.app.mark_notification_read_default_account corvix.web.app._dismiss_notification_impl corvix.web.app._mark_notification_read_impl corvix.web.app._require_account corvix.web.app._default_account_id corvix.web.app._load_runtime_config corvix.web.app._select_dashboard corvix.web.app._dashboard_names corvix.web.app.run Module Contents --------------- .. py:data:: logger .. py:data:: THEMES :type: dict[str, dict[str, str]] .. py:data:: _STATIC_ROOT .. py:data:: _STATIC_ASSETS_DIR :value: '' .. py:data:: _ASSET_FILENAMES :value: ('app.js', 'index.css', 'favicon.svg') .. py:data:: _ASSET_CACHE_CONTROL .. py:function:: _asset_version_token() -> str .. py:data:: _INDEX_HTML_TEMPLATE .. py:data:: INDEX_HTML .. py:function:: index() -> litestar.Response[str] Serve the dashboard single-page UI. .. py:function:: dashboard_index(dashboard_name: str) -> litestar.Response[str] Serve the dashboard SPA for bookmarkable dashboard URLs. .. py:function:: health() -> dict[str, str] Health endpoint for container checks. .. py:function:: api_themes() -> dict[str, object] Return available theme presets. .. py:function:: dashboards() -> dict[str, object] List configured dashboard names. .. py:function:: snapshot(dashboard: str | None = None) -> dict[str, object] Return the selected dashboard data from cache. .. py:function:: dismiss_notification(account_id: str, thread_id: str) -> litestar.Response[None] Dismiss a notification thread (removes it from the GitHub inbox). Calls DELETE /notifications/threads/{id} on GitHub, then marks the record as dismissed in local storage. Returns 204 No Content on success. .. py:function:: dismiss_notification_default_account(thread_id: str) -> litestar.Response[None] Backward-compatible dismiss endpoint for default account. .. py:function:: mark_notification_read(account_id: str, thread_id: str) -> litestar.Response[None] Mark a notification thread as read in GitHub and local storage. .. py:function:: mark_notification_read_default_account(thread_id: str) -> litestar.Response[None] Backward-compatible mark-read endpoint for default account. .. py:function:: _dismiss_notification_impl(account_id: str, thread_id: str) -> litestar.Response[None] .. py:function:: _mark_notification_read_impl(account_id: str, thread_id: str) -> litestar.Response[None] .. py:function:: _require_account(config: corvix.config.AppConfig, account_id: str) -> corvix.config.GitHubAccountConfig .. py:function:: _default_account_id(config: corvix.config.AppConfig) -> str .. py:function:: _load_runtime_config() -> corvix.config.AppConfig .. py:function:: _select_dashboard(dashboards: list[corvix.config.DashboardSpec], selected_name: str | None) -> corvix.config.DashboardSpec .. py:function:: _dashboard_names(dashboards: list[corvix.config.DashboardSpec]) -> list[str] .. py:data:: app .. py:function:: run() -> None Run app with uvicorn.