Improve errors reporting

This commit is contained in:
2023-12-12 01:32:18 +01:00
parent 2a52b5c035
commit bc15846b67
8 changed files with 68 additions and 16 deletions

View File

@ -25,7 +25,7 @@ export function CreateNetworkRoute(): React.ReactElement {
navigate(`/net/${res.uid}`);
} catch (e) {
console.error(e);
alert("Failed to create network!");
alert(`Failed to create network!\n${e}`);
}
};
@ -59,7 +59,7 @@ export function EditNetworkRoute(): React.ReactElement {
navigate(NetworkURL(network!));
} catch (e) {
console.error(e);
alert("Failed to update network!");
alert(`Failed to update network!\n${e}`);
}
};

View File

@ -23,7 +23,7 @@ export function CreateVMRoute(): React.ReactElement {
navigate(v.ViewURL);
} catch (e) {
console.error(e);
alert("Failed to create VM!");
alert(`Failed to create VM!\n${e}`);
}
};

View File

@ -0,0 +1,13 @@
import { VirtWebRouteContainer } from "../widgets/VirtWebRouteContainer";
export function HomeRoute(): React.ReactElement {
return (
<VirtWebRouteContainer label="VirtWeb">
<p>VirtWeb is an Open Source web ui for Libvirt.</p>
<p>
You can use the menu on the left to access the different sections of the
application.
</p>
</VirtWebRouteContainer>
);
}