summaryrefslogtreecommitdiff
path: root/src/components/app/sidebars/topology/machine/UnitComponent.js
diff options
context:
space:
mode:
authorGeorgios Andreadis <info@gandreadis.com>2020-06-29 15:47:09 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2020-08-24 16:08:41 +0200
commit90fae26aa4bd0e0eb3272ff6e6524060e9004fbb (patch)
treebf6943882f5fa5f3114c01fc571503c79ee1056d /src/components/app/sidebars/topology/machine/UnitComponent.js
parent7032a007d4431f5a0c4c5e2d3f3bd20462d49950 (diff)
Prepare frontend repository for monorepo
This change prepares the frontend Git repository for the monorepo residing at https://github.com/atlarge-research.com/opendc. To accomodate for this, we move all files into a frontend subdirectory.
Diffstat (limited to 'src/components/app/sidebars/topology/machine/UnitComponent.js')
-rw-r--r--src/components/app/sidebars/topology/machine/UnitComponent.js78
1 files changed, 0 insertions, 78 deletions
diff --git a/src/components/app/sidebars/topology/machine/UnitComponent.js b/src/components/app/sidebars/topology/machine/UnitComponent.js
deleted file mode 100644
index 7c27043d..00000000
--- a/src/components/app/sidebars/topology/machine/UnitComponent.js
+++ /dev/null
@@ -1,78 +0,0 @@
-import React from "react";
-import jQuery from "../../../../../util/jquery";
-
-class UnitComponent extends React.Component {
- componentDidMount() {
- jQuery(".unit-info-popover").popover({
- trigger: "focus"
- });
- }
-
- render() {
- let unitInfo;
- if (this.props.unitType === "cpu" || this.props.unitType === "gpu") {
- unitInfo =
- "<strong>Clockrate:</strong> <code>" +
- this.props.unit.clockRateMhz +
- " MHz</code><br/>" +
- "<strong>Num. Cores:</strong> <code>" +
- this.props.unit.numberOfCores +
- "</code><br/>" +
- "<strong>Energy Cons.:</strong> <code>" +
- this.props.unit.energyConsumptionW +
- " W</code>";
- } else if (
- this.props.unitType === "memory" ||
- this.props.unitType === "storage"
- ) {
- unitInfo =
- "<strong>Speed:</strong> <code>" +
- this.props.unit.speedMbPerS +
- " Mb/s</code><br/>" +
- "<strong>Size:</strong> <code>" +
- this.props.unit.sizeMb +
- " MB</code><br/>" +
- "<strong>Energy Cons.:</strong> <code> " +
- this.props.unit.energyConsumptionW +
- " W</code>";
- }
-
- 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}
- </span>
- <span>
- <span
- tabIndex="0"
- className="unit-info-popover btn btn-outline-info mr-1 fa fa-info-circle"
- role="button"
- data-toggle="popover"
- data-trigger="focus"
- title="Unit information"
- data-content={unitInfo}
- data-html="true"
- />
- {this.props.inSimulation ? (
- undefined
- ) : (
- <span
- className="btn btn-outline-danger"
- onClick={this.props.onDelete}
- >
- <span className="fa fa-trash" />
- </span>
- )}
- </span>
- </li>
- );
- }
-}
-
-export default UnitComponent;