bmc_hub/app/routers/bottom_bar.py

55 lines
1.6 KiB
Python
Raw Permalink Normal View History

from fastapi import APIRouter
from app.core.config import settings
router = APIRouter()
@router.get("/state")
async def get_bottom_bar_state():
# MVP Mock Data for the Bottom Bar
return {
"enabled": True,
"sections": {
"mail": {
"unread": 5,
"customer_reply_needed": 2
},
"cases": {
"open": 12,
"list": []
},
"urgent": {
"count": 1,
"list": [{"id": 999, "title": "Server nede hos Kunde A"}]
},
"timer": {
"active_count": 1,
"list": [{"desc": "Fejlfinding WiFi", "elapsed": 1200}]
},
"kuma": {
"down": 3,
"list": ["Switch-Odense", "Printer-Aarhus", "FW-Kbh"]
},
"eset": {
"incidents": 0,
"list": []
},
"messages": {
"count": 2,
"list": [{"from": "Chef", "text": "Husk at ringe til Jensen"}, {"from": "System", "text": "Ny opgave tildelt."}]
},
"tasks": {
"count": 4,
"list": [
{"title": "Opsætning af ny PC", "deadline": "I dag 14:00"},
{"title": "Gennemgå ESET log", "deadline": "I dag 16:00"}
]
},
"boss": {
"stats": {
"unassigned": 3,
"active_employees": 4
}
}
}
}