diff options
| author | Georgios Andreadis <info@gandreadis.com> | 2020-07-07 09:55:10 +0200 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2020-08-24 19:47:25 +0200 |
| commit | b4bdf9fde013bb7ff9579693b64ff575f7b00e44 (patch) | |
| tree | 5e05ceba918849391a639bbeeab37d290a86523c /frontend/src/api | |
| parent | 7331e9baf2cfe7bdfb24effcf0a4801da1e7ea4d (diff) | |
Rename simulations to projects and remove experiment view
Diffstat (limited to 'frontend/src/api')
| -rw-r--r-- | frontend/src/api/routes/experiments.js | 20 | ||||
| -rw-r--r-- | frontend/src/api/routes/projects.js (renamed from frontend/src/api/routes/simulations.js) | 28 | ||||
| -rw-r--r-- | frontend/src/api/routes/topologies.js | 4 |
3 files changed, 19 insertions, 33 deletions
diff --git a/frontend/src/api/routes/experiments.js b/frontend/src/api/routes/experiments.js index ab85613c..acc72f34 100644 --- a/frontend/src/api/routes/experiments.js +++ b/frontend/src/api/routes/experiments.js @@ -1,16 +1,16 @@ import { deleteById, getById } from './util' import { sendRequest } from '../index' -export function addExperiment(simulationId, experiment) { +export function addExperiment(projectId, experiment) { return sendRequest({ - path: '/simulations/{simulationId}/experiments', + path: '/projects/{projectId}/experiments', method: 'POST', parameters: { body: { experiment, }, path: { - simulationId, + projectId, }, query: {}, }, @@ -24,17 +24,3 @@ export function getExperiment(experimentId) { export function deleteExperiment(experimentId) { return deleteById('/experiments/{experimentId}', { experimentId }) } - -export function getAllMachineStates(experimentId) { - return getById('/experiments/{experimentId}/machine-states', { - experimentId, - }) -} - -export function getAllRackStates(experimentId) { - return getById('/experiments/{experimentId}/rack-states', { experimentId }) -} - -export function getAllRoomStates(experimentId) { - return getById('/experiments/{experimentId}/room-states', { experimentId }) -} diff --git a/frontend/src/api/routes/simulations.js b/frontend/src/api/routes/projects.js index e22fbc07..a261adb8 100644 --- a/frontend/src/api/routes/simulations.js +++ b/frontend/src/api/routes/projects.js @@ -1,17 +1,17 @@ import { sendRequest } from '../index' import { deleteById, getById } from './util' -export function getSimulation(simulationId) { - return getById('/simulations/{simulationId}', { simulationId }) +export function getProject(projectId) { + return getById('/projects/{projectId}', { projectId }) } -export function addSimulation(simulation) { +export function addProject(project) { return sendRequest({ - path: '/simulations', + path: '/projects', method: 'POST', parameters: { body: { - simulation, + project, }, path: {}, query: {}, @@ -19,36 +19,36 @@ export function addSimulation(simulation) { }) } -export function updateSimulation(simulation) { +export function updateProject(project) { return sendRequest({ - path: '/simulations/{simulationId}', + path: '/projects/{projectId}', method: 'PUT', parameters: { body: { - simulation, + project, }, path: { - simulationId: simulation._id, + projectId: project._id, }, query: {}, }, }) } -export function deleteSimulation(simulationId) { - return deleteById('/simulations/{simulationId}', { simulationId }) +export function deleteProject(projectId) { + return deleteById('/projects/{projectId}', { projectId }) } -export function addExperiment(simulationId, experiment) { +export function addExperiment(projectId, experiment) { return sendRequest({ - path: '/simulations/{simulationId}/experiments', + path: '/projects/{projectId}/experiments', method: 'POST', parameters: { body: { experiment, }, path: { - simulationId, + projectId, }, query: {}, }, diff --git a/frontend/src/api/routes/topologies.js b/frontend/src/api/routes/topologies.js index 307ea7ab..a8f0d6b1 100644 --- a/frontend/src/api/routes/topologies.js +++ b/frontend/src/api/routes/topologies.js @@ -3,14 +3,14 @@ import { sendRequest } from '../index' export function addTopology(topology) { return sendRequest({ - path: '/simulations/{simulationId}/topologies', + path: '/projects/{projectId}/topologies', method: 'POST', parameters: { body: { topology, }, path: { - simulationId: topology.simulationId, + projectId: topology.projectId, }, query: {}, }, |
