From a9da76621c1be7a11bf292e868a8f7c22f2ea203 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Sun, 26 Mar 2023 21:20:42 +0100 Subject: bug(web): Inform user when deleted topology is still used This change fixes #135 which showed that trying to delete a topology used by a scenario would result in nothing happening in the UI and a 500 error being returned by the server. We check whether a scenario still references the topology and show an error to the user if that happens. Fixes #135 --- opendc-web/opendc-web-ui/src/data/topology.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'opendc-web/opendc-web-ui/src/data') diff --git a/opendc-web/opendc-web-ui/src/data/topology.js b/opendc-web/opendc-web-ui/src/data/topology.js index ac6cabe5..d5e624d5 100644 --- a/opendc-web/opendc-web-ui/src/data/topology.js +++ b/opendc-web/opendc-web-ui/src/data/topology.js @@ -83,6 +83,6 @@ export function useNewTopology() { /** * Create a mutation for deleting a topology. */ -export function useDeleteTopology() { - return useMutation('deleteTopology') +export function useDeleteTopology(options = {}) { + return useMutation('deleteTopology', options) } -- cgit v1.2.3