All checks were successful
Build and Deploy DevOpsDash / build-image (push) Successful in 8s
- Add projects router (Redis projects + workcontexts merged)
- Register projects router in main.py
- Extend knowledge router: howtos, agents, skills via MCP proxy
- Extend mcp_client: list/get howtos, agents, skills
- Rewrite dashboard.html: 4 tabs (Taskz/Worklog/Projects/Knowledge)
- Taskz: sidebar board list + Kanban columns with task modal
- Worklog: context/days picker + standup button
- Projects: context filter sidebar + work context display
- Knowledge: 6 sub-tabs (docs/howtos/agents/skills/adrs/memories)
with markdown rendering via marked.js
57 lines
1.5 KiB
Python
57 lines
1.5 KiB
Python
"""DevOpsDash — FastAPI entry point."""
|
|
|
|
from __future__ import annotations
|
|
|
|
import os
|
|
from pathlib import Path
|
|
|
|
from fastapi import FastAPI, Request
|
|
from fastapi.responses import HTMLResponse
|
|
from fastapi.staticfiles import StaticFiles
|
|
from fastapi.templating import Jinja2Templates
|
|
|
|
from app.routers import tasks, worklog, knowledge, projects
|
|
|
|
app = FastAPI(title="DevOpsDash", version="1.0.0", docs_url="/api/docs")
|
|
|
|
app.include_router(tasks.router)
|
|
app.include_router(worklog.router)
|
|
app.include_router(knowledge.router)
|
|
app.include_router(projects.router)
|
|
|
|
TEMPLATES_DIR = Path(__file__).parent / "templates"
|
|
templates = Jinja2Templates(directory=str(TEMPLATES_DIR))
|
|
|
|
|
|
@app.get("/health")
|
|
def health():
|
|
from app.redis_client import get_redis
|
|
try:
|
|
r = get_redis()
|
|
r.ping()
|
|
redis_ok = True
|
|
except Exception:
|
|
redis_ok = False
|
|
data_dir = os.environ.get("DATA_DIR", "/data")
|
|
return {
|
|
"status": "ok",
|
|
"redis": "ok" if redis_ok else "unavailable",
|
|
"data_dir": data_dir,
|
|
"data_dir_exists": Path(data_dir).exists(),
|
|
}
|
|
|
|
|
|
@app.get("/", response_class=HTMLResponse)
|
|
async def dashboard(request: Request):
|
|
mcp_url = os.environ.get("DEVOPS_MCP_URL", "http://devops-mcp:8000")
|
|
return templates.TemplateResponse("dashboard.html", {
|
|
"request": request,
|
|
"mcp_url": mcp_url,
|
|
})
|
|
|
|
|
|
if __name__ == "__main__":
|
|
import uvicorn
|
|
port = int(os.environ.get("PORT", 8001))
|
|
uvicorn.run("app.main:app", host="0.0.0.0", port=port, reload=True)
|