|
4 | 4 | from typing import Dict, List, Optional |
5 | 5 |
|
6 | 6 | from fastapi import APIRouter, Depends, Request |
7 | | -from fastapi.responses import FileResponse, HTMLResponse |
| 7 | +from fastapi.responses import FileResponse |
8 | 8 | from pydantic import BaseModel |
9 | 9 | from sqlalchemy import func |
10 | 10 | from sqlmodel import select |
11 | 11 | from werkzeug.utils import secure_filename |
12 | 12 |
|
13 | | -import murfey |
14 | 13 | import murfey.server.api.websocket as ws |
15 | 14 | from murfey.server import _transport_object |
16 | 15 | from murfey.server.api import templates |
|
32 | 31 | from murfey.server.ispyb import get_all_ongoing_visits |
33 | 32 | from murfey.server.murfey_db import murfey_db |
34 | 33 | from murfey.util import sanitise |
35 | | -from murfey.util.config import ( |
36 | | - MachineConfig, |
37 | | - get_hostname, |
38 | | - get_machine_config, |
39 | | - get_microscope, |
40 | | -) |
| 34 | +from murfey.util.config import MachineConfig, get_machine_config |
41 | 35 | from murfey.util.db import ( |
42 | 36 | ClientEnvironment, |
43 | 37 | DataCollection, |
|
64 | 58 | ) |
65 | 59 |
|
66 | 60 |
|
67 | | -# This will be the homepage for a given microscope. |
68 | | -@router.get("/", response_class=HTMLResponse) |
69 | | -async def root(request: Request): |
70 | | - return templates.TemplateResponse( |
71 | | - request=request, |
72 | | - name="home.html", |
73 | | - context={ |
74 | | - "hostname": get_hostname(), |
75 | | - "microscope": get_microscope(), |
76 | | - "version": murfey.__version__, |
77 | | - }, |
78 | | - ) |
79 | | - |
80 | | - |
81 | 61 | @router.get("/health/") |
82 | 62 | def health_check(db=ispyb_db): |
83 | 63 | conn = db.connection() |
|
0 commit comments