82c7712613
- Created a new job_detail.html template extending base.html - Implemented a macro for rendering nested data structures - Added sections for job identification, schedule & timing, status, configuration, execution history, and results - Included a timeline for execution history with visual indicators for job status - Displayed job metrics including total executions, success rate, and average duration - Handled cases for displaying results or indicating absence of results based on job status
31 lines
1.7 KiB
Python
31 lines
1.7 KiB
Python
"""Fake recon-config data so dashboard metrics can run without a DB."""
|
|
from __future__ import annotations
|
|
|
|
from dataclasses import dataclass
|
|
from datetime import datetime, timedelta
|
|
|
|
|
|
@dataclass
|
|
class FakeReconConfig:
|
|
reference: str
|
|
name: str
|
|
status: str # "draft" | "published" | "archived"
|
|
frequency: str # "Ad Hoc" | "Intra Day" | "Daily" | "Weekly" | "Monthly" | "Quarterly"
|
|
business_process: str
|
|
start_datetime: datetime | None = None
|
|
|
|
|
|
def get_fake_configs(now: datetime) -> list[FakeReconConfig]:
|
|
base = now - timedelta(days=120)
|
|
return [
|
|
FakeReconConfig("fx-settlement", "FX Settlement Recon", "published", "Daily", "Treasury", base),
|
|
FakeReconConfig("cash-vs-ledger", "Cash vs Ledger", "published", "Daily", "Finance", base),
|
|
FakeReconConfig("intraday-liquidity", "Intraday Liquidity Sweep", "published", "Intra Day", "Treasury", base),
|
|
FakeReconConfig("eod-positions", "EOD Position Recon", "published", "Daily", "Trading", base),
|
|
FakeReconConfig("weekly-customers", "Customer Master Recon", "published", "Weekly", "Onboarding", base),
|
|
FakeReconConfig("monthly-reg", "Regulatory Reporting Recon", "published", "Monthly", "Compliance", base),
|
|
FakeReconConfig("ad-hoc-aml", "AML Spot Check", "published", "Ad Hoc", "FinCrime", None),
|
|
FakeReconConfig("crypto-wallet", "Crypto Wallet Recon (POC)", "draft", "Daily", "Digital", None),
|
|
FakeReconConfig("legacy-loans", "Legacy Loans Recon", "archived", "Monthly", "Lending", None),
|
|
]
|