Skip to content

Commit

Permalink
Removed gcs from mac-address and updated file names
Browse files Browse the repository at this point in the history
Nothing big. Added some files on the vehicle container to address #49. Hoping to merge with dev-2018 really soon
  • Loading branch information
Luis729 committed Feb 14, 2019
1 parent 66269f6 commit d0addf9
Show file tree
Hide file tree
Showing 8 changed files with 68 additions and 42 deletions.
4 changes: 2 additions & 2 deletions resources/mac-address.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"gcs": ["0013A20040917A31"],
"uav": "",
"isr": "",
"ipd": "",
"ugv": "",
"vtol": ""
}
8 changes: 4 additions & 4 deletions src/renderer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import React, { Component } from 'react';
import ReactDOM from 'react-dom';

import { fixtures, geolocation } from '../../resources/index.js';
import LogContainer from './log/Log.js';
import MapContainer from './map/Map.js';
import MissionContainer from './mission/Mission.js';
import VehicleContainer from './vehicle/Vehicle.js';
import LogContainer from './log/LogContainer.js';
import MapContainer from './map/MapContainer.js';
import MissionContainer from './mission/MissionContainer.js';
import VehicleContainer from './vehicle/VehicleContainer.js';

import 'leaflet/dist/leaflet.css';
import 'react-virtualized/styles.css';
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
19 changes: 19 additions & 0 deletions src/renderer/vehicle/VehicleContainer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import React, { Component } from 'react';

import VehicleTable from './VehicleTable.js';

import './vehicle.css';

export default class VehicleContainer extends Component {
state = {
xbeeConnected: false,
};

render() {
return (
<div className='vehicleContainer container'>
{<VehicleTable />}
</div>
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ import { ipcRenderer } from 'electron';
import React, { Component } from 'react';
import { AutoSizer, Table, Column } from 'react-virtualized';

import './vehicle.css';


export default class VehicleContainer extends Component {
export default class VehicleTable extends Component {
state = {
vehicles: {},
};
Expand Down Expand Up @@ -46,38 +43,41 @@ export default class VehicleContainer extends Component {

render() {
return (
<div className='vehicleContainer container'>
<AutoSizer>
{({ height, width }) =>
<Table
width={width}
height={height}
headerHeight={40}
rowHeight={40}
rowCount={Object.keys(this.state.vehicles).length}
rowGetter={this.rowGetter}
onRowClick={this.onRowClick}
>
<Column
label='ID'
dataKey='id'
width={width * this.width.id}
/>
<Column
label='Name'
dataKey='name'
width={width * this.width.name}
/>
<Column
label='Status'
dataKey='status'
width={width * this.width.status}
cellRenderer={this.statusRenderer}
/>
</Table>
}
</AutoSizer>
</div>
<AutoSizer>
{({ height, width }) =>
<Table
style={{
position: 'relative',
top: 0,
right: 0,
}}
width={width}
height={height}
headerHeight={40}
rowHeight={40}
rowCount={Object.keys(this.state.vehicles).length}
rowGetter={this.rowGetter}
onRowClick={this.onRowClick}
>
<Column
label='ID'
dataKey='id'
width={width * this.width.id}
/>
<Column
label='Name'
dataKey='name'
width={width * this.width.name}
/>
<Column
label='Status'
dataKey='status'
width={width * this.width.status}
cellRenderer={this.statusRenderer}
/>
</Table>
}
</AutoSizer>
);
}
}
7 changes: 7 additions & 0 deletions src/renderer/vehicle/XbeeConnectContainer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React, { Component } from 'react';

export default class XbeeConnectContainer extends Component {
render() {
return <div />;
}
}

0 comments on commit d0addf9

Please sign in to comment.