Updates
This commit is contained in:
@ -33,13 +33,21 @@ class cable {
|
||||
<img className="browse-cable-image" src={this.image} alt="Cable" />
|
||||
<div className="browse-cable-label">
|
||||
<div className="browse-cable-name">{this.name}</div>
|
||||
<div className="browse-cable-description">
|
||||
<span style={{ color: "#007cbe" }}></span>
|
||||
{this.description}
|
||||
</div>
|
||||
<div className="browse-cable-brand">
|
||||
<span style={{ color: "#007cbe" }}>Brand: </span>
|
||||
<span style={{ color: "black", backgroundColor: "transparent" }}>
|
||||
Brand:{" "}
|
||||
</span>
|
||||
{this.brand}
|
||||
</div>
|
||||
<div className="browse-cable-description">
|
||||
<span style={{ color: "#007cbe" }}>About: </span>
|
||||
{this.description}
|
||||
<div className="browse-cable-position">
|
||||
<span style={{ color: "black", backgroundColor: "transparent" }}>
|
||||
Position:{" "}
|
||||
</span>
|
||||
{this.position}
|
||||
</div>
|
||||
</div>
|
||||
<span className="browse-cable-arrow">{">"}</span>
|
||||
|
@ -1,17 +1,64 @@
|
||||
import React, { Component } from "react";
|
||||
import BeldenLogo from "../assets/images/belden-white.png";
|
||||
import DefaultPartImg from "../assets/images/part.png";
|
||||
import { NavLink } from "react-router-dom";
|
||||
import "../assets/stylesheets/cabledetail.scss";
|
||||
|
||||
class cable {
|
||||
constructor(
|
||||
part_number,
|
||||
position,
|
||||
name,
|
||||
brand,
|
||||
description,
|
||||
short_description,
|
||||
image
|
||||
) {
|
||||
this.part_number = part_number;
|
||||
this.position = position;
|
||||
this.name = name;
|
||||
this.brand = brand;
|
||||
this.description = description;
|
||||
this.short_description = short_description;
|
||||
if (image === undefined) {
|
||||
this.image = DefaultPartImg;
|
||||
} else {
|
||||
this.image = image;
|
||||
}
|
||||
}
|
||||
|
||||
returnDiv() {
|
||||
return (
|
||||
<NavLink className="browse-cable" to={"/cable/" + this.part_number}>
|
||||
<img className="browse-cable-image" src={this.image} alt="Cable" />
|
||||
<div className="browse-cable-label">
|
||||
<div className="browse-cable-name">{this.name}</div>
|
||||
<div className="browse-cable-brand">
|
||||
<span style={{ color: "#007cbe" }}>Brand: </span>
|
||||
{this.brand}
|
||||
</div>
|
||||
<div className="browse-cable-description">
|
||||
<span style={{ color: "#007cbe" }}>About: </span>
|
||||
{this.description}
|
||||
</div>
|
||||
</div>
|
||||
<span className="browse-cable-arrow">{">"}</span>
|
||||
</NavLink>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default class CableDetailComponent extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
}
|
||||
|
||||
// componentDidMount() {
|
||||
// this.props.socket.send('{"type":"cable_map","call":"request","data":{}}');
|
||||
// this.props.socket.addEventListener("message", this.handleMessage);
|
||||
// }
|
||||
componentDidMount() {
|
||||
// this.props.socket.send('{"type":"cable_map","call":"request","data":{}}');
|
||||
// this.props.socket.addEventListener("message", this.handleMessage);
|
||||
const id = this.props.cableId;
|
||||
console.log("ID: ", id);
|
||||
}
|
||||
|
||||
// handleMessage = (event) => {
|
||||
// try {
|
||||
@ -33,7 +80,6 @@ export default class CableDetailComponent extends Component {
|
||||
<img src={BeldenLogo} alt="Belden" />
|
||||
</div>
|
||||
<div className="cable-fieldContainer">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
@ -8,6 +8,13 @@ export default class SummaryComponent extends Component {
|
||||
<div className="summary">
|
||||
<img className="summary-image" src={BeldenLogo} alt="Belden" />
|
||||
<div className="summary-fieldContainer"></div>
|
||||
{/* <iframe src="http://192.168.1.12:3000/d-solo/cdiqwmlr8c9ogf/sensors?orgId=1&refresh=1s&theme=light&panelId=7" width="450" height="200" frameborder="0"></iframe> */}
|
||||
<iframe
|
||||
src="http://192.168.1.12:3000/d-solo/cdiqwmlr8c9ogf/sensors?orgId=1&refresh=1s&theme=light&panelId=9"
|
||||
width="450"
|
||||
height="200"
|
||||
frameborder="0"
|
||||
></iframe>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user