summaryrefslogtreecommitdiff
path: root/opendc-web/opendc-web-ui/src/redux/actions/topologies.js
blob: 4888c4da172bb84942e57efef1437015b3bd5d69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
export const OPEN_TOPOLOGY = 'OPEN_TOPOLOGY'
export const ADD_TOPOLOGY = 'ADD_TOPOLOGY'
export const STORE_TOPOLOGY = 'STORE_TOPOLOGY'

export function openTopology(id) {
    return {
        type: OPEN_TOPOLOGY,
        id,
    }
}

export function addTopology(projectId, name, duplicateId) {
    return {
        type: ADD_TOPOLOGY,
        projectId,
        name,
        duplicateId,
    }
}

export function storeTopology(entities) {
    return {
        type: STORE_TOPOLOGY,
        entities,
    }
}