diff --git a/webui/src/components/OperationTree.tsx b/webui/src/components/OperationTree.tsx index ecfaf5f3..bce76b91 100644 --- a/webui/src/components/OperationTree.tsx +++ b/webui/src/components/OperationTree.tsx @@ -44,6 +44,7 @@ export const OperationTree = ({ }: React.PropsWithoutRef<{ req: GetOperationsRequest }>) => { const alertApi = useAlertApi(); const showModal = useShowModal(); + const [loading, setLoading] = useState(true); const [backups, setBackups] = useState([]); const [selectedBackupId, setSelectedBackupId] = useState(null); @@ -80,6 +81,8 @@ export const OperationTree = ({ }) .catch((e) => { alertApi!.error("Failed to fetch operations: " + e.messag); + }).finally(() => { + setLoading(false); }); return () => { unsubscribeFromOperations(lis); @@ -93,7 +96,7 @@ export const OperationTree = ({ if (backups.length === 0) { return ( ); diff --git a/webui/src/views/App.tsx b/webui/src/views/App.tsx index fe371398..5aa555e0 100644 --- a/webui/src/views/App.tsx +++ b/webui/src/views/App.tsx @@ -192,7 +192,7 @@ const getSidenavItems = (config: Config | null): MenuProps["items"] => { onClick: async () => { const { PlanView } = await import("./PlanView"); - setContent(, [ + setContent(, [ { title: "Plans" }, { title: plan.id || "" }, ]); @@ -234,7 +234,7 @@ const getSidenavItems = (config: Config | null): MenuProps["items"] => { onClick: async () => { const { RepoView } = await import("./RepoView"); - setContent(, [ + setContent(, [ { title: "Repos" }, { title: repo.id || "" }, ]);