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 = (
"Clockrate: " + this.props.unit.clockRateMhz + " MHz
" +
"Num. Cores: " + this.props.unit.numberOfCores + "
" +
"Energy Cons.: " + this.props.unit.energyConsumptionW + " W"
);
} else if (this.props.unitType === "memory" || this.props.unitType === "storage") {
unitInfo = (
"Speed: " + this.props.unit.speedMbPerS + " Mb/s
" +
"Size: " + this.props.unit.sizeMb + " MB
" +
"Energy Cons.: " + this.props.unit.energyConsumptionW + " W"
);
}
return (