summaryrefslogtreecommitdiff
path: root/frontend/src/components/app/sidebars/topology/machine
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/components/app/sidebars/topology/machine')
-rw-r--r--frontend/src/components/app/sidebars/topology/machine/UnitAddComponent.js4
-rw-r--r--frontend/src/components/app/sidebars/topology/machine/UnitComponent.js8
-rw-r--r--frontend/src/components/app/sidebars/topology/machine/UnitListComponent.js4
3 files changed, 5 insertions, 11 deletions
diff --git a/frontend/src/components/app/sidebars/topology/machine/UnitAddComponent.js b/frontend/src/components/app/sidebars/topology/machine/UnitAddComponent.js
index 57e219fd..e8722506 100644
--- a/frontend/src/components/app/sidebars/topology/machine/UnitAddComponent.js
+++ b/frontend/src/components/app/sidebars/topology/machine/UnitAddComponent.js
@@ -16,7 +16,7 @@ class UnitAddComponent extends React.Component {
ref={unitSelect => (this.unitSelect = unitSelect)}
>
{this.props.units.map(unit => (
- <option value={unit.id} key={unit.id}>
+ <option value={unit._id} key={unit._id}>
{unit.manufacturer +
' ' +
unit.family +
@@ -31,7 +31,7 @@ class UnitAddComponent extends React.Component {
type="submit"
className="btn btn-outline-primary"
onClick={() =>
- this.props.onAdd(parseInt(this.unitSelect.value, 10))
+ this.props.onAdd(this.unitSelect.value)
}
>
<span className="fa fa-plus mr-2"/>
diff --git a/frontend/src/components/app/sidebars/topology/machine/UnitComponent.js b/frontend/src/components/app/sidebars/topology/machine/UnitComponent.js
index 93ac1cdd..647c8e5c 100644
--- a/frontend/src/components/app/sidebars/topology/machine/UnitComponent.js
+++ b/frontend/src/components/app/sidebars/topology/machine/UnitComponent.js
@@ -40,13 +40,7 @@ class UnitComponent extends React.Component {
return (
<li className="d-flex list-group-item justify-content-between align-items-center">
<span style={{ maxWidth: '60%' }}>
- {this.props.unit.manufacturer +
- ' ' +
- this.props.unit.family +
- ' ' +
- this.props.unit.model +
- ' ' +
- this.props.unit.generation}
+ {this.props.unit.name}
</span>
<span>
<span
diff --git a/frontend/src/components/app/sidebars/topology/machine/UnitListComponent.js b/frontend/src/components/app/sidebars/topology/machine/UnitListComponent.js
index 31d4db51..da65da23 100644
--- a/frontend/src/components/app/sidebars/topology/machine/UnitListComponent.js
+++ b/frontend/src/components/app/sidebars/topology/machine/UnitListComponent.js
@@ -18,8 +18,8 @@ const UnitListComponent = ({ unitType, unitIds, inSimulation }) => (
<strong>No units of this type in this machine</strong>
) : (
<span>
- <strong>No units...</strong> Add some with the menu above!
- </span>
+ <strong>No units...</strong> Add some with the menu above!
+ </span>
)}
</div>
)}