diff options
Diffstat (limited to 'opendc-web/opendc-web-ui/src/data')
| -rw-r--r-- | opendc-web/opendc-web-ui/src/data/topology.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/opendc-web/opendc-web-ui/src/data/topology.js b/opendc-web/opendc-web-ui/src/data/topology.js index 14bd7562..bd4d1e4d 100644 --- a/opendc-web/opendc-web-ui/src/data/topology.js +++ b/opendc-web/opendc-web-ui/src/data/topology.js @@ -71,6 +71,13 @@ export function useActiveTopology() { } /** + * Return the current active topology. + */ +export function useTopology(topologyId, options = {}) { + return useQuery(['topologies', topologyId], { enabled: !!topologyId, ...options }) +} + +/** * Return the topologies of the specified project. */ export function useProjectTopologies(projectId, options = {}) { |
