diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2023-03-26 21:20:42 +0100 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2023-03-26 21:22:18 +0100 |
| commit | a9da76621c1be7a11bf292e868a8f7c22f2ea203 (patch) | |
| tree | 51aa097044559a45d18b9dbe44002a0dd2af2bf1 /opendc-web/opendc-web-ui/src/data/topology.js | |
| parent | 6bc9b999ff0d9a0ad2c1c5bea1554abc30a06c5b (diff) | |
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
Diffstat (limited to 'opendc-web/opendc-web-ui/src/data/topology.js')
| -rw-r--r-- | opendc-web/opendc-web-ui/src/data/topology.js | 4 |
1 files changed, 2 insertions, 2 deletions
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) } |
