Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed some spacing issuses #21

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 38 additions & 38 deletions sensorgriddashboard/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 17 additions & 2 deletions sensorgriddashboard/src/components/Battery.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import {
ListGroup,
ListGroupItem,
Progress,
Table
Table,
Card
} from 'reactstrap';
//import * as FontAwesome from 'react-icons/lib/fa'
import { FaBattery4, FaBattery2, FaBattery1, FaSignal, FaCheckCircle, FaExclamationCircle } from 'react-icons/lib/fa';
Expand Down Expand Up @@ -37,9 +38,10 @@ class Battery extends Component {

render() {
console.log('battery', this.props.data)

return (
<div>
<Card>
<Table hover id = "summary">
<thead>
<tr>
Expand Down Expand Up @@ -68,13 +70,26 @@ class Battery extends Component {
<td><FaSignal size="30px" color = "red"/></td>
<td><FaCheckCircle size = "35px"/></td>
</tr>
<tr>
<th scope="row">4</th>
<td>{this.getBattery(this.state.data[3])}</td>
<td><FaSignal size="30px"/></td>
<td><FaCheckCircle size = "35px" color = "red"/></td>
</tr>
<tr>
<th scope="row">5</th>
<td>{this.getBattery(this.state.data[4])}</td>
<td><FaSignal size="30px"/></td>
<td><FaCheckCircle size = "35px"/></td>
</tr>
</tbody>
</Table>


<div>

</div>
</Card>
</div>
)
}
Expand Down
5 changes: 4 additions & 1 deletion sensorgriddashboard/src/components/HomePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class HomePage extends Component {
<Collapse isOpen={this.state.isOpen} navbar>
<Nav className="ml-auto" navbar>
<NavItem>
<NavLink href="/components/">Components</NavLink>
<NavLink href="https://sensorgridapi.knightlab.com/sensordata/">API</NavLink>
</NavItem>
<NavItem>
<NavLink href="https://github.com/NUKnightLab/SensorGridAPI">Github</NavLink>
Expand All @@ -90,10 +90,13 @@ class HomePage extends Component {
<Container>
<Row>
<Col>

<Battery data={this.state.batteryArr}/>

</Col>
<Col>
<TabContainer />

</Col>
</Row>
</Container>
Expand Down
8 changes: 4 additions & 4 deletions sensorgriddashboard/src/components/MyGoogleMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const MapWithAMarkerClusterer = compose(
googleMapURL: "https://maps.googleapis.com/maps/api/js?key=AIzaSyC4R6AN7SmujjPUIGKdyao2Kqitzr1kiRg&v=3.exp&libraries=geometry,drawing,places",
loadingElement: <div style={{ height: `100%` }} />,

containerElement: <div style={{ height: `400px`, width: '450px', position: `fixed`, left: `10px`, top: '360px' }} />,
containerElement: <div style={{ height: `400px`, width: '450px' }} />,
mapElement: <div style={{ height: `100%` }} />,
}),
withHandlers({
Expand All @@ -31,10 +31,10 @@ const MapWithAMarkerClusterer = compose(
defaultZoom={10}
defaultCenter={{ lat: 42.050691, lng: -87.67416 }}
>
<MarkerClusterer onClick={props.onMarkerClustererClick} averageCenter enableRetinaIcons
<MarkerClusterer onClick={props.onMarkerClustererClick} averageCenter enableRetinaIcons
gridSize={60}>
{props.markers.map(marker => (

<Marker key={marker.sensor_id} position={{ lat: marker.latitude, lng: marker.longitude }}/>
))}
</MarkerClusterer>
Expand Down Expand Up @@ -70,4 +70,4 @@ class MyGoogleMap extends React.PureComponent {
}
}

export default MyGoogleMap
export default MyGoogleMap
4 changes: 2 additions & 2 deletions sensorgriddashboard/src/components/TimeSeries.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
width: 700px
}
.time-series-card {
width: 1060px;
width: 600px;
height: 550px;
padding-bottom: 20px;
margin-left: 15px;
Expand All @@ -30,4 +30,4 @@
.card-title {
margin-top: 10px;
margin-left: 10px;
}
}
2 changes: 1 addition & 1 deletion sensorgriddashboard/src/components/TimeSeries.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ render() {
<CardTitle className='card-title'>Sensor Grid Time Series Data</CardTitle>
<CardSubtitle className='card-title'>Data 1 Measurements</CardSubtitle>
<XYFrame
size={[1050, 500]}
size={[600, 300]}
lines={this.props.displayData}
lineDataAccessor={"data"}
lineStyle={d => ({ fill: d.color, fillOpacity: 0.5, stroke: d.color, strokeWidth: '3px' })}
Expand Down