diff --git a/webui/src/components/SnapshotBrowser.tsx b/webui/src/components/SnapshotBrowser.tsx index a8914951..2ca6982e 100644 --- a/webui/src/components/SnapshotBrowser.tsx +++ b/webui/src/components/SnapshotBrowser.tsx @@ -13,12 +13,7 @@ import { FolderOutlined, } from "@ant-design/icons"; import { useShowModal } from "./ModalManager"; -import { - formatBytes, - formatDate, - formatTime, - normalizeSnapshotId, -} from "../lib/formatting"; +import { formatBytes, normalizeSnapshotId } from "../lib/formatting"; import { URIAutocomplete } from "./URIAutocomplete"; import { validateForm } from "../lib/formutil"; import { backrestService } from "../api"; @@ -254,13 +249,15 @@ const RestoreModal = ({ const handleOk = async () => { try { const values = await validateForm(form); - await backrestService.restore({ - repoId, - planId, - snapshotId, - path, - target: values.target, - }); + await backrestService.restore( + new RestoreSnapshotRequest({ + repoId, + planId, + snapshotId, + path, + target: values.target, + }) + ); } catch (e: any) { alert("Failed to restore snapshot: " + e.message); } finally { @@ -307,6 +304,7 @@ const RestoreModal = ({ form.setFields([ { name: "target", + value: targetPath, errors: [], }, ]); diff --git a/webui/tsconfig.json b/webui/tsconfig.json index cb4b79ce..8c3f5763 100644 --- a/webui/tsconfig.json +++ b/webui/tsconfig.json @@ -7,5 +7,8 @@ "forceConsistentCasingInFileNames": true, "strict": true, "skipLibCheck": true - } -} + }, + "include": [ + "src/**/*" + ], +} \ No newline at end of file