Add a system to restrict untrusted IPs

This commit is contained in:
2023-12-12 01:52:46 +01:00
parent 4c839eb2d1
commit c7f7bfe67c
5 changed files with 43 additions and 3 deletions

View File

@ -223,7 +223,7 @@ function IsoFilesList(p: {
p.onReload();
} catch (e) {
console.error(e);
alert("Failed to delete file!");
alert(`Failed to delete file!\n${e}`);
}
loadingMessage.hide();

View File

@ -57,7 +57,7 @@ export function NetworksListRoute(): React.ReactElement {
snackbar("The network was successfully deleted!");
} catch (e) {
console.error(e);
alert("Failed to delete the network!");
alert(`Failed to delete the network!\n${e}`);
}
};

View File

@ -22,6 +22,7 @@ import { VMStatusWidget } from "../widgets/vms/VMStatusWidget";
import { useSnackbar } from "../hooks/providers/SnackbarProvider";
import { useConfirm } from "../hooks/providers/ConfirmDialogProvider";
import { useNavigate } from "react-router-dom";
import { useAlert } from "../hooks/providers/AlertDialogProvider";
export function VMListRoute(): React.ReactElement {
const [list, setList] = React.useState<VMInfo[] | undefined>();
@ -66,6 +67,7 @@ function VMListWidget(p: {
onReload: () => void;
}): React.ReactElement {
const confirm = useConfirm();
const alert = useAlert();
const snackbar = useSnackbar();
const navigate = useNavigate();
@ -93,7 +95,7 @@ function VMListWidget(p: {
p.onReload();
} catch (e) {
console.error(e);
snackbar("Failed to delete VM!");
alert(`Failed to delete VM!\n${e}`);
}
};