remove static data from main
This commit is contained in:
70
main.py
70
main.py
@@ -228,73 +228,3 @@ app.add_middleware(
|
|||||||
)
|
)
|
||||||
|
|
||||||
app.mount("/", StaticFiles(directory="./webroot", html=True), name="static")
|
app.mount("/", StaticFiles(directory="./webroot", html=True), name="static")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# API DOCS:
|
|
||||||
"""
|
|
||||||
API Endpoints:
|
|
||||||
|
|
||||||
1. GET /info
|
|
||||||
- Returns current system info and thresholds.
|
|
||||||
- Response: {
|
|
||||||
uptime: datetime,
|
|
||||||
cpu: float,
|
|
||||||
ram: float,
|
|
||||||
disk: float,
|
|
||||||
cpu_threshold: int,
|
|
||||||
ram_threshold: int,
|
|
||||||
disk_threshold: int,
|
|
||||||
cpu_normal: bool,
|
|
||||||
ram_normal: bool,
|
|
||||||
disk_normal: bool
|
|
||||||
}
|
|
||||||
|
|
||||||
2. GET /limits
|
|
||||||
- Returns current threshold limits.
|
|
||||||
- Response: {
|
|
||||||
cpu_threshold: int,
|
|
||||||
ram_threshold: int,
|
|
||||||
disk_threshold: int
|
|
||||||
}
|
|
||||||
|
|
||||||
3. POST /limits
|
|
||||||
- Sets new threshold limits.
|
|
||||||
- Body: {
|
|
||||||
cpu_threshold: int,
|
|
||||||
ram_threshold: int,
|
|
||||||
disk_threshold: int
|
|
||||||
}
|
|
||||||
- Response: {
|
|
||||||
cpu: int,
|
|
||||||
ram: int,
|
|
||||||
disk: int
|
|
||||||
}
|
|
||||||
|
|
||||||
4. GET /overages
|
|
||||||
- Returns a list of overage events.
|
|
||||||
- Response: [
|
|
||||||
{
|
|
||||||
id: int,
|
|
||||||
cpu_overage: int,
|
|
||||||
ram_overage: int,
|
|
||||||
disk_overage: int,
|
|
||||||
timestamp: datetime
|
|
||||||
},
|
|
||||||
...
|
|
||||||
]
|
|
||||||
|
|
||||||
5. GET /overages/{overage_id}
|
|
||||||
- Returns a specific overage event by ID.
|
|
||||||
- Response: {
|
|
||||||
id: int,
|
|
||||||
cpu_overage: int,
|
|
||||||
ram_overage: int,
|
|
||||||
disk_overage: int,
|
|
||||||
timestamp: datetime
|
|
||||||
}
|
|
||||||
|
|
||||||
6. DELETE /overages/{overage_id}
|
|
||||||
- Deletes a specific overage event by ID.
|
|
||||||
- Response: { detail: "Overage event deleted" }
|
|
||||||
"""
|
|
||||||
Reference in New Issue
Block a user