diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2021-07-22 19:05:58 +0200 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2022-02-17 16:58:40 +0100 |
| commit | 41e02cdab85ba5db92be7f7bea07ae1f20bcbdd9 (patch) | |
| tree | 2f32b9b76b7bf05172c0e0d90ba60e06b7f34ae4 /opendc-web/opendc-web-ui/src/redux/reducers | |
| parent | a5b32960460b2e7b52032471bf23d29832734fba (diff) | |
fix(web/ui): Fix creation of topologies
This change fixes an issue with the creation of topologies in the
frontend. Previously, the frontend relied on Redux to update the state.
However, since we removed the reliance on Redux, we also need to create
a new topology using the functions from React Query to actually send a
request to the API server.
Diffstat (limited to 'opendc-web/opendc-web-ui/src/redux/reducers')
5 files changed, 5 insertions, 5 deletions
diff --git a/opendc-web/opendc-web-ui/src/redux/reducers/topology/machine.js b/opendc-web/opendc-web-ui/src/redux/reducers/topology/machine.js index 41773014..47af53cf 100644 --- a/opendc-web/opendc-web-ui/src/redux/reducers/topology/machine.js +++ b/opendc-web/opendc-web-ui/src/redux/reducers/topology/machine.js @@ -1,5 +1,5 @@ import produce from 'immer' -import { STORE_TOPOLOGY } from '../../actions/topologies' +import { STORE_TOPOLOGY } from '../../actions/topology' import { DELETE_MACHINE, ADD_UNIT, DELETE_UNIT } from '../../actions/topology/machine' import { ADD_MACHINE, DELETE_RACK } from '../../actions/topology/rack' diff --git a/opendc-web/opendc-web-ui/src/redux/reducers/topology/rack.js b/opendc-web/opendc-web-ui/src/redux/reducers/topology/rack.js index 9cc37124..155837cb 100644 --- a/opendc-web/opendc-web-ui/src/redux/reducers/topology/rack.js +++ b/opendc-web/opendc-web-ui/src/redux/reducers/topology/rack.js @@ -21,7 +21,7 @@ */ import produce from 'immer' -import { STORE_TOPOLOGY } from '../../actions/topologies' +import { STORE_TOPOLOGY } from '../../actions/topology' import { DELETE_MACHINE } from '../../actions/topology/machine' import { DELETE_RACK, EDIT_RACK_NAME, ADD_MACHINE } from '../../actions/topology/rack' import { ADD_RACK_TO_TILE } from '../../actions/topology/room' diff --git a/opendc-web/opendc-web-ui/src/redux/reducers/topology/room.js b/opendc-web/opendc-web-ui/src/redux/reducers/topology/room.js index b61c9d82..d6cc51c1 100644 --- a/opendc-web/opendc-web-ui/src/redux/reducers/topology/room.js +++ b/opendc-web/opendc-web-ui/src/redux/reducers/topology/room.js @@ -21,7 +21,7 @@ */ import produce from 'immer' -import { STORE_TOPOLOGY } from '../../actions/topologies' +import { STORE_TOPOLOGY } from '../../actions/topology' import { ADD_TILE, DELETE_TILE } from '../../actions/topology/building' import { DELETE_ROOM, EDIT_ROOM_NAME, ADD_ROOM } from '../../actions/topology/room' diff --git a/opendc-web/opendc-web-ui/src/redux/reducers/topology/tile.js b/opendc-web/opendc-web-ui/src/redux/reducers/topology/tile.js index e0c5dd33..6dbccb66 100644 --- a/opendc-web/opendc-web-ui/src/redux/reducers/topology/tile.js +++ b/opendc-web/opendc-web-ui/src/redux/reducers/topology/tile.js @@ -21,7 +21,7 @@ */ import produce from 'immer' -import { STORE_TOPOLOGY } from '../../actions/topologies' +import { STORE_TOPOLOGY } from '../../actions/topology' import { ADD_TILE, DELETE_TILE } from '../../actions/topology/building' import { DELETE_RACK } from '../../actions/topology/rack' import { ADD_RACK_TO_TILE } from '../../actions/topology/room' diff --git a/opendc-web/opendc-web-ui/src/redux/reducers/topology/topology.js b/opendc-web/opendc-web-ui/src/redux/reducers/topology/topology.js index da0e6988..cd9b5efd 100644 --- a/opendc-web/opendc-web-ui/src/redux/reducers/topology/topology.js +++ b/opendc-web/opendc-web-ui/src/redux/reducers/topology/topology.js @@ -21,7 +21,7 @@ */ import produce from 'immer' -import { STORE_TOPOLOGY } from '../../actions/topologies' +import { STORE_TOPOLOGY } from "../../actions/topology"; import { ADD_ROOM, DELETE_ROOM } from '../../actions/topology/room' function topology(state = undefined, action) { |
