summaryrefslogtreecommitdiff
path: root/frontend
diff options
context:
space:
mode:
authorjc0b <j@jc0b.computer>2020-07-24 12:19:59 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2020-08-24 19:48:23 +0200
commitac32bdb6c33f546133dd4e1fd1dd400195354679 (patch)
tree3f95ce7fdcc19ae8ce915d0d969d9da59b9f840d /frontend
parenta4ce2e57a52c226b62ac663dc629f3667e4fb2b4 (diff)
parent2892f05baeb79f77586eb36d3506a57b1d20b8aa (diff)
Merge branch 'master' of github.com:atlarge-research/opendc-dev
Diffstat (limited to 'frontend')
-rw-r--r--frontend/src/components/app/map/MapConstants.js2
-rw-r--r--frontend/src/components/app/sidebars/topology/machine/MachineSidebarComponent.js2
-rw-r--r--frontend/src/components/app/sidebars/topology/machine/UnitAddComponent.js2
-rw-r--r--frontend/src/components/app/sidebars/topology/machine/UnitTabsComponent.js2
-rw-r--r--frontend/src/components/modals/custom-components/NewTopologyModalComponent.js2
-rw-r--r--frontend/src/containers/app/sidebars/project/TopologyListContainer.js4
-rw-r--r--frontend/src/index.sass3
7 files changed, 10 insertions, 7 deletions
diff --git a/frontend/src/components/app/map/MapConstants.js b/frontend/src/components/app/map/MapConstants.js
index 0a970701..d6ea1f84 100644
--- a/frontend/src/components/app/map/MapConstants.js
+++ b/frontend/src/components/app/map/MapConstants.js
@@ -23,6 +23,6 @@ export const MAP_SCALE_PER_EVENT = 1.1
export const MAP_MIN_SCALE = 0.5
export const MAP_MAX_SCALE = 1.5
-export const MAX_NUM_UNITS_PER_MACHINE = 4
+export const MAX_NUM_UNITS_PER_MACHINE = 6
export const DEFAULT_RACK_SLOT_CAPACITY = 42
export const DEFAULT_RACK_POWER_CAPACITY = 10000
diff --git a/frontend/src/components/app/sidebars/topology/machine/MachineSidebarComponent.js b/frontend/src/components/app/sidebars/topology/machine/MachineSidebarComponent.js
index 02e7b8d4..7c78cf9e 100644
--- a/frontend/src/components/app/sidebars/topology/machine/MachineSidebarComponent.js
+++ b/frontend/src/components/app/sidebars/topology/machine/MachineSidebarComponent.js
@@ -6,7 +6,7 @@ import UnitTabsContainer from '../../../../../containers/app/sidebars/topology/m
const MachineSidebarComponent = ({ machineId }) => {
return (
- <div>
+ <div className="h-100 overflow-auto">
<MachineNameContainer />
<BackToRackContainer />
<DeleteMachineContainer />
diff --git a/frontend/src/components/app/sidebars/topology/machine/UnitAddComponent.js b/frontend/src/components/app/sidebars/topology/machine/UnitAddComponent.js
index d5ecbce3..4e9dbc7e 100644
--- a/frontend/src/components/app/sidebars/topology/machine/UnitAddComponent.js
+++ b/frontend/src/components/app/sidebars/topology/machine/UnitAddComponent.js
@@ -11,7 +11,7 @@ class UnitAddComponent extends React.Component {
return (
<div className="form-inline">
<div className="form-group w-100">
- <select className="form-control w-75 mr-1" ref={(unitSelect) => (this.unitSelect = unitSelect)}>
+ <select className="form-control w-70 mr-1" ref={(unitSelect) => (this.unitSelect = unitSelect)}>
{this.props.units.map((unit) => (
<option value={unit._id} key={unit._id}>
{unit.name}
diff --git a/frontend/src/components/app/sidebars/topology/machine/UnitTabsComponent.js b/frontend/src/components/app/sidebars/topology/machine/UnitTabsComponent.js
index 15c89ed5..c03b826f 100644
--- a/frontend/src/components/app/sidebars/topology/machine/UnitTabsComponent.js
+++ b/frontend/src/components/app/sidebars/topology/machine/UnitTabsComponent.js
@@ -22,7 +22,7 @@ const UnitTabsComponent = () => (
</li>
<li className="nav-item">
<a className="nav-link" data-toggle="tab" href="#storage-units" role="tab">
- Storage
+ Stor.
</a>
</li>
</ul>
diff --git a/frontend/src/components/modals/custom-components/NewTopologyModalComponent.js b/frontend/src/components/modals/custom-components/NewTopologyModalComponent.js
index a244b730..d8262baa 100644
--- a/frontend/src/components/modals/custom-components/NewTopologyModalComponent.js
+++ b/frontend/src/components/modals/custom-components/NewTopologyModalComponent.js
@@ -64,7 +64,7 @@ class NewTopologyModalComponent extends React.Component {
/>
</div>
<div className="form-group">
- <label className="form-control-label">Topology to duplicate (not supported yet)</label>
+ <label className="form-control-label">Topology to duplicate</label>
<select
className="form-control"
ref={(originTopology) => (this.originTopology = originTopology)}
diff --git a/frontend/src/containers/app/sidebars/project/TopologyListContainer.js b/frontend/src/containers/app/sidebars/project/TopologyListContainer.js
index f65982ef..e1de18f9 100644
--- a/frontend/src/containers/app/sidebars/project/TopologyListContainer.js
+++ b/frontend/src/containers/app/sidebars/project/TopologyListContainer.js
@@ -4,7 +4,7 @@ import { setCurrentTopology } from '../../../../actions/topology/building'
import { openNewTopologyModal } from '../../../../actions/modals/topology'
import { withRouter } from 'react-router-dom'
import { getState } from '../../../../util/state-utils'
-import { deleteScenario } from '../../../../actions/scenarios'
+import { deleteTopology } from '../../../../actions/topologies'
const mapStateToProps = (state) => {
let topologies = state.objects.project[state.currentProjectId]
@@ -33,7 +33,7 @@ const mapDispatchToProps = (dispatch, ownProps) => {
onDeleteTopology: async (id) => {
if (id) {
const state = await getState(dispatch)
- dispatch(deleteScenario(id))
+ dispatch(deleteTopology(id))
dispatch(setCurrentTopology(state.objects.project[state.currentProjectId].topologyIds[0]))
ownProps.history.push(`/projects/${state.currentProjectId}`)
}
diff --git a/frontend/src/index.sass b/frontend/src/index.sass
index ec756bc5..77acc23a 100644
--- a/frontend/src/index.sass
+++ b/frontend/src/index.sass
@@ -42,3 +42,6 @@ a, a:hover
.app-page-container
padding-left: $side-bar-width
padding-top: 15px
+
+.w-70
+ width: 70% !important