summaryrefslogtreecommitdiff
path: root/opendc-web/opendc-web-ui/src/redux/actions/topologies.js
blob: fc697cc2d7c7196cd672f830e5b3eadc004a2182 (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
27
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(topology, entities) {
    return {
        type: STORE_TOPOLOGY,
        topology,
        entities,
    }
}