fix: add undo disk selection capability #2

Closed
bot wants to merge 26 commits from fio_workflow into main
Showing only changes of commit a425291f5b - Show all commits
+4 -4
View File
@@ -111,13 +111,13 @@ async def generate_plot_endpoint(
# Determine metrics
available = sorted(df["metric"].unique())
if request.metric:
if request.metric not in available:
if metric:
if metric not in available:
raise HTTPException(
status_code=400,
detail=f"Metric {request.metric} not found"
detail=f"Metric {metric} not found"
)
metrics = [request.metric]
metrics = [metric]
else:
totals = df.groupby("metric")["count"].sum().sort_values(ascending=False)
metrics = [totals.index[0]]