From f119fc78dda4d1e828dde04f378a63a93e3a0a7e Mon Sep 17 00:00:00 2001 From: Georgios Andreadis Date: Thu, 2 Jul 2020 18:39:28 +0200 Subject: Add current progress on frontend port --- frontend/src/actions/topology/building.js | 14 +++++++------- frontend/src/actions/topology/room.js | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'frontend/src/actions/topology') diff --git a/frontend/src/actions/topology/building.js b/frontend/src/actions/topology/building.js index 2d4d399c..da2dc311 100644 --- a/frontend/src/actions/topology/building.js +++ b/frontend/src/actions/topology/building.js @@ -1,5 +1,5 @@ -export const SET_CURRENT_DATACENTER = 'SET_CURRENT_DATACENTER' -export const RESET_CURRENT_DATACENTER = 'RESET_CURRENT_DATACENTER' +export const SET_CURRENT_TOPOLOGY = 'SET_CURRENT_TOPOLOGY' +export const RESET_CURRENT_TOPOLOGY = 'RESET_CURRENT_TOPOLOGY' export const START_NEW_ROOM_CONSTRUCTION = 'START_NEW_ROOM_CONSTRUCTION' export const START_NEW_ROOM_CONSTRUCTION_SUCCEEDED = 'START_NEW_ROOM_CONSTRUCTION_SUCCEEDED' @@ -12,16 +12,16 @@ export const FINISH_ROOM_EDIT = 'FINISH_ROOM_EDIT' export const ADD_TILE = 'ADD_TILE' export const DELETE_TILE = 'DELETE_TILE' -export function setCurrentDatacenter(datacenterId) { +export function setCurrentTopology(topologyId) { return { - type: SET_CURRENT_DATACENTER, - datacenterId, + type: SET_CURRENT_TOPOLOGY, + topologyId, } } -export function resetCurrentDatacenter() { +export function resetCurrentTopology() { return { - type: RESET_CURRENT_DATACENTER, + type: RESET_CURRENT_TOPOLOGY, } } diff --git a/frontend/src/actions/topology/room.js b/frontend/src/actions/topology/room.js index 3476f0b6..939b475a 100644 --- a/frontend/src/actions/topology/room.js +++ b/frontend/src/actions/topology/room.js @@ -35,7 +35,7 @@ export function addRackToTile(positionX, positionY) { if (tile !== null) { dispatch({ type: ADD_RACK_TO_TILE, - tileId: tile.id, + tileId: tile._id, }) } } -- cgit v1.2.3