diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2021-07-22 14:57:21 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-22 14:57:21 +0200 |
| commit | b0c5681b28d1c3c87b7d24d8b8d166f5566e7699 (patch) | |
| tree | 4f7269996928ea480499e3cbe912b15ba994e43f /opendc-web/opendc-web-ui/src/components/topologies/TopologyOverview.js | |
| parent | 51c759e74b088d405b63fdb3e374822308d21366 (diff) | |
| parent | 7f083b47c2e2333819823fd7835332a0f486b626 (diff) | |
merge: Address technical debt in topology view v2 (#163)
This pull request aims to address some of the technical debt in the topology
view of the OpenDC frontend (v2).
* Perform Saga mutations through React Query
* Add table view for topology view
* Extract topology construction out of Sagas
* Toggle to Floor Plan on room select
Diffstat (limited to 'opendc-web/opendc-web-ui/src/components/topologies/TopologyOverview.js')
| -rw-r--r-- | opendc-web/opendc-web-ui/src/components/topologies/TopologyOverview.js | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/opendc-web/opendc-web-ui/src/components/topologies/TopologyOverview.js b/opendc-web/opendc-web-ui/src/components/topologies/TopologyOverview.js index f773dcd1..213a4868 100644 --- a/opendc-web/opendc-web-ui/src/components/topologies/TopologyOverview.js +++ b/opendc-web/opendc-web-ui/src/components/topologies/TopologyOverview.js @@ -33,12 +33,13 @@ import { GridItem, Skeleton, } from '@patternfly/react-core' +import React from 'react' import { useTopology } from '../../data/topology' import { parseAndFormatDateTime } from '../../util/date-time' +import RoomTable from './RoomTable' -function TopologyOverview({ topologyId }) { +function TopologyOverview({ topologyId, onSelect }) { const { data: topology } = useTopology(topologyId) - return ( <Grid hasGutter> <GridItem md={2}> @@ -66,12 +67,21 @@ function TopologyOverview({ topologyId }) { </CardBody> </Card> </GridItem> + <GridItem md={5}> + <Card> + <CardTitle>Rooms</CardTitle> + <CardBody> + <RoomTable topologyId={topologyId} onSelect={(room) => onSelect('room', room)} /> + </CardBody> + </Card> + </GridItem> </Grid> ) } TopologyOverview.propTypes = { topologyId: PropTypes.string, + onSelect: PropTypes.func, } export default TopologyOverview |
