조민지

ui: 스타일 수정

......@@ -5,6 +5,10 @@
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
build
build/
.idea
# User-specific stuff
.idea
.idea/**/workspace.xml
......
......@@ -1377,7 +1377,7 @@ body > .navbar-collapse[data-color="purple"]:after {
.navbar .btn-simple {
font-size: 16px; }
.navbar.fixed {
width: calc(100% - $sidebar-width);
width: calc(100% - #{$sidebar-width});
right: 0;
left: auto;
border-radius: 0; }
......
This diff could not be displayed because it is too large.
......@@ -65,7 +65,7 @@
}
&.fixed{
width: calc(100% - $sidebar-width);
width: calc(100% - #{$sidebar-width});
right: 0;
left: auto;
border-radius: 0;
......
......@@ -22,7 +22,7 @@ export class Card extends Component {
return (
<div className={"card" + (this.props.plain ? " card-plain" : "")}>
<div className={"header" + (this.props.hCenter ? " text-center" : "")}>
<h4 className="title">{this.props.title}</h4>
<h4 className="title" style={{fontWeight: 400}}>{this.props.title}</h4>
<p className="category">{this.props.category}</p>
</div>
<div
......
......@@ -26,25 +26,18 @@ class Footer extends Component {
<nav className="pull-left">
<ul>
<li>
<a href="#pablo">Home</a>
<a href="http://mate.ryulth.com/admin/kickboard">Home</a>
</li>
<li>
<a href="#pablo">Company</a>
</li>
<li>
<a href="#pablo">Portfolio</a>
</li>
<li>
<a href="#pablo">Blog</a>
<a href="http://mate.ryulth.com/admin/kickboard">Company</a>
</li>
</ul>
</nav>
<p className="copyright pull-right">
&copy; {new Date().getFullYear()}{" "}
<a href="http://www.creative-tim.com?ref=lbr-footer">
Creative Tim
<a href="#">
Wico
</a>
, made with love for a better web
</p>
</Grid>
</footer>
......
......@@ -6,22 +6,6 @@ let map;
let markers = [];
let infoWindow;
const getGroupUrlStringByGroup = group => {
if (group === "renting") {
// 사용중
return "_inuse";
} else if (group === "ready") {
// 대기중
return "";
} else if (group === "target") {
// 수거대상
return "_pickup";
} else if (group === "collect") {
// 수거
return "_deactive";
}
};
const getBatteryUrlStringByBattery = battery => {
if (battery >= 0 && battery < 25) {
return "0-25";
......@@ -47,7 +31,7 @@ class GoogleMap extends React.Component {
// .then(d => {
// if(!d.success || !d.data.length) return;
//
// console.log(d.data)
// // console.log(d.data)
// this.setState({
// kickboards: d.data
// })
......@@ -79,7 +63,7 @@ class GoogleMap extends React.Component {
infoWindow = new window.google.maps.InfoWindow({});
map = new google.maps.Map(document.getElementById("map"), {
zoom: 11,
zoom: 8,
center: {lat: -34.397, lng: 150.644},
disableDefaultUI: true,
zoomControl: true
......@@ -109,20 +93,21 @@ class GoogleMap extends React.Component {
}
drawMarkers() {
if (map == null) return;
const selectedMarker = new window.google.maps.Marker({});
if (map === null) return;
// const selectedMarker = new window.google.maps.Marker({});
markers = this.state.kickboards.map(item => {
const marker = new window.google.maps.Marker({
position: new window.google.maps.LatLng({
lat: item.coordinates.lat,
lng: item.coordinates.lon
lat: item.coordinates.y,
lng: item.coordinates.x
})
});
const markerContent = `
<div>
<div style="color:black"> 시리얼번호: ${item.serialNumber} </div>
<div style="color:black"> 시리얼번호: ${item.serial_number} </div>
</div>
`;
......@@ -134,14 +119,18 @@ class GoogleMap extends React.Component {
infoWindow.close();
infoWindow.setContent(markerContent);
infoWindow.open(map, marker);
this.props.setKbId(item.serialNumber);
this.props.setKbId(item.serial_number);
});
window.google.maps.event.addListener(marker, "mouseover", () => {
infoWindow.close();
infoWindow.setContent(markerContent);
infoWindow.open(map, marker);
this.highlightMarker(marker);
});
window.google.maps.event.addListener(marker, "mouseout", () => {
infoWindow.close();
this.renderMarker(marker);
});
......@@ -151,31 +140,59 @@ class GoogleMap extends React.Component {
}
renderMarker(marker) {
const { group, battery } = marker.item;
const groupString = getGroupUrlStringByGroup(group);
const { battery } = marker.item;
const batteryString = getBatteryUrlStringByBattery(battery);
const iconUrl = require(`../../assets/marker/ic_map_pin_battery${batteryString}${groupString}.png`);
const iconUrl = require(`../../assets/marker/ic_map_pin_battery${batteryString}.png`);
marker.setIcon(iconUrl);
}
highlightMarker(marker) {
const { group, battery } = marker.item;
const groupString = getGroupUrlStringByGroup(group);
const { battery } = marker.item;
const batteryString = getBatteryUrlStringByBattery(battery);
const iconUrl = require(`../../assets/marker/ic_map_pin_battery${batteryString}${groupString}_selected.png`);
const iconUrl = require(`../../assets/marker/ic_map_pin_battery${batteryString}_selected.png`);
marker.setIcon(iconUrl);
}
moveToMarker(kbId) {
if (map == null || markers.length === 0) {
return;
}
const searchedMarker = markers.find(
marker => marker.item.serial_number === kbId
);
if(!searchedMarker) return;
const markerContent = `
<div>
<div style="color:black"> 시리얼번호: ${kbId} </div>
</div>
`;
infoWindow.close();
infoWindow.setContent(markerContent);
infoWindow.open(map, searchedMarker);
map.setCenter(
new window.google.maps.LatLng({
lat: searchedMarker.item.coordinates.y,
lng: searchedMarker.item.coordinates.x
})
);
map.setZoom(14);
}
componentDidUpdate(prevProps, prevState, snapshot) {
this.moveToMarker(this.props.kbId);
}
render() {
this.drawMarkers();
return (
<div id="map" style={{height:this.props.containerWidth, backgroundColor:'pink'}}>
<div id="map" style={{height:this.props.containerWidth}}>
</div>
)
}
......
......@@ -3,6 +3,7 @@ import { Card } from "components/Card/Card.jsx";
import Dimensions from 'react-dimensions'
import moment from 'moment';
import GoogleMap from './GoogleMap';
import KickboardStatusCard from "./KickboardStatusCard";
const GoogleMapCard = (props) => {
const getStats = `마지막 업데이트 ${moment().format("YYYY/MM/DD hh:mm")}`;
......@@ -11,11 +12,10 @@ const GoogleMapCard = (props) => {
<Card
id="chartActivity"
title="서비스 현황"
category="All products including Taxes"
stats={getStats}
statsIcon="fa fa-history"
content={
<GoogleMap setKbId={props.setKbId}/>
<GoogleMap kbId={props.kbId} setKbId={props.setKbId}/>
}
/>
);
......
import React from "react";
import {Table} from "react-bootstrap";
import { Card } from "components/Card/Card.jsx";
import { tdArray } from "variables/Variables.jsx";
import styled from "styled-components";
const A = styled.a`
color: #333;
text-decoration: underline;
font-weight: 500;
`;
const UserDataKey = {
user_id: '유저ID',
......@@ -25,7 +31,7 @@ const KickboardHistoryTable = (props) => {
return (
<Card
title={`${kbId}번 킥보드 사용자 히스토리`}
title={`${kbId}번 킥보드 사용자 대여 히스토리`}
ctTableFullWidth
ctTableResponsive
content={
......@@ -40,10 +46,11 @@ const KickboardHistoryTable = (props) => {
<tbody>
{historyData.map((data, idx) => {
const {user_id, rent_datetime, return_datetime, rental_time, rental_distance, rental_fee} = data;
const userHistoryUrl = `http://mate.ryulth.com/admin/user/?userId=${user_id}`;
return (
<tr key={idx}>
<td>{user_id}</td>
<td><A href={userHistoryUrl}>{user_id}</A></td>
<td>{timestampToString(rent_datetime)}</td>
<td>{timestampToString(return_datetime)}</td>
<td>{rental_time}</td>
......
......@@ -35,11 +35,12 @@ const SearchButton = (props) => {
const inputEl = useRef(null);
const searchKickboard = (e) => {
const searchText = e.target.value;
const searchText = inputEl.current.value;
fetch(`http://1.201.143.67:5901/kickboard/${searchText}`)
.then(r => r.json())
.then(d => {
if(d.success && d.data.length) setKbId();
if(d.success && d.data.length) setKbId(searchText);
else window.alert('해당 번호의 킥보드가 존재하지 않습니다!')
})
.catch(err => console.log(err));
......
const res = `
{"success":true,"data":[{"serialNumber":"000000","battery":0,"dailyDrivenDistance":0,"dailyDrivenTime":0,"coordinates":{"lon":126.885654,"lat":37.480045},"modelName":"MA01","isGoodReception":false,"isGoodPosture":false,"connected":false,"createdAt":"2020-02-13T09:59:22.303Z","group":"target","state":"알 수 없는 오류"},{"serialNumber":"000001","battery":0,"dailyDrivenDistance":0,"dailyDrivenTime":0,"coordinates":{"lon":127.078668,"lat":37.244634},"modelName":"MA01","isGoodReception":false,"isGoodPosture":false,"connected":false,"createdAt":"2020-02-13T09:59:24.316Z","group":"target","state":"알 수 없는 오류"},{"serialNumber":"000002","battery":0,"dailyDrivenDistance":0,"dailyDrivenTime":52257,"coordinates":{"lon":126.886552,"lat":37.479997},"modelName":"MA01","isGoodReception":false,"isGoodPosture":true,"connected":true,"createdAt":"2020-04-16T08:40:51.817Z","group":"ready","state":"대기 중"},{"serialNumber":"000003","battery":78,"dailyDrivenDistance":0,"dailyDrivenTime":0,"coordinates":{"lon":127.05006,"lat":37.545254},"modelName":"MA01","isGoodReception":false,"isGoodPosture":false,"connected":false,"createdAt":"2020-02-04T01:57:45.032Z","group":"collect","state":"수거됨"},{"serialNumber":"000004","battery":0,"dailyDrivenDistance":0,"dailyDrivenTime":0,"coordinates":{"lon":127.078668,"lat":37.244634},"modelName":"MA01","isGoodReception":false,"isGoodPosture":false,"connected":false,"createdAt":"2020-02-13T09:59:26.569Z","group":"target","state":"알 수 없는 오류"},{"serialNumber":"000005","battery":0,"dailyDrivenDistance":0,"dailyDrivenTime":0,"coordinates":{"lon":127.050652,"lat":37.545297},"modelName":"MA01","isGoodReception":false,"isGoodPosture":false,"connected":false,"createdAt":"2020-02-13T15:02:15.601Z","group":"collect","state":"수거됨"},{"serialNumber":"000006","battery":94,"dailyDrivenDistance":0,"dailyDrivenTime":439119,"coordinates":{"lon":126.885743,"lat":37.479925},"modelName":"MA01","isGoodReception":false,"isGoodPosture":false,"connected":true,"createdAt":"2020-02-13T15:02:15.601Z","group":"ready","state":"서비스 종료"},{"serialNumber":"000007","battery":0,"dailyDrivenDistance":0,"dailyDrivenTime":0,"coordinates":{"lon":126.87614,"lat":37.482151},"modelName":"MA01","isGoodReception":false,"isGoodPosture":false,"connected":false,"createdAt":"2020-02-13T15:02:15.601Z","group":"target","state":"알 수 없는 오류"},{"serialNumber":"000008","battery":40,"dailyDrivenDistance":0,"dailyDrivenTime":29,"coordinates":{"lon":127.050652,"lat":37.545297},"modelName":"MA01","isGoodReception":false,"isGoodPosture":false,"connected":true,"createdAt":"2020-02-13T15:02:15.601Z","group":"collect","state":"수거됨"}]}`
// const res = `
// {"success":true,"data":[{"serialNumber":"000000","battery":0,"dailyDrivenDistance":0,"dailyDrivenTime":0,"coordinates":{"lon":126.885654,"lat":37.480045},"modelName":"MA01","isGoodReception":false,"isGoodPosture":false,"connected":false,"createdAt":"2020-02-13T09:59:22.303Z","group":"target","state":"알 수 없는 오류"},{"serialNumber":"000001","battery":0,"dailyDrivenDistance":0,"dailyDrivenTime":0,"coordinates":{"lon":127.078668,"lat":37.244634},"modelName":"MA01","isGoodReception":false,"isGoodPosture":false,"connected":false,"createdAt":"2020-02-13T09:59:24.316Z","group":"target","state":"알 수 없는 오류"},{"serialNumber":"000002","battery":0,"dailyDrivenDistance":0,"dailyDrivenTime":52257,"coordinates":{"lon":126.886552,"lat":37.479997},"modelName":"MA01","isGoodReception":false,"isGoodPosture":true,"connected":true,"createdAt":"2020-04-16T08:40:51.817Z","group":"ready","state":"대기 중"},{"serialNumber":"000003","battery":78,"dailyDrivenDistance":0,"dailyDrivenTime":0,"coordinates":{"lon":127.05006,"lat":37.545254},"modelName":"MA01","isGoodReception":false,"isGoodPosture":false,"connected":false,"createdAt":"2020-02-04T01:57:45.032Z","group":"collect","state":"수거됨"},{"serialNumber":"000004","battery":0,"dailyDrivenDistance":0,"dailyDrivenTime":0,"coordinates":{"lon":127.078668,"lat":37.244634},"modelName":"MA01","isGoodReception":false,"isGoodPosture":false,"connected":false,"createdAt":"2020-02-13T09:59:26.569Z","group":"target","state":"알 수 없는 오류"},{"serialNumber":"000005","battery":0,"dailyDrivenDistance":0,"dailyDrivenTime":0,"coordinates":{"lon":127.050652,"lat":37.545297},"modelName":"MA01","isGoodReception":false,"isGoodPosture":false,"connected":false,"createdAt":"2020-02-13T15:02:15.601Z","group":"collect","state":"수거됨"},{"serialNumber":"000006","battery":94,"dailyDrivenDistance":0,"dailyDrivenTime":439119,"coordinates":{"lon":126.885743,"lat":37.479925},"modelName":"MA01","isGoodReception":false,"isGoodPosture":false,"connected":true,"createdAt":"2020-02-13T15:02:15.601Z","group":"ready","state":"서비스 종료"},{"serialNumber":"000007","battery":0,"dailyDrivenDistance":0,"dailyDrivenTime":0,"coordinates":{"lon":126.87614,"lat":37.482151},"modelName":"MA01","isGoodReception":false,"isGoodPosture":false,"connected":false,"createdAt":"2020-02-13T15:02:15.601Z","group":"target","state":"알 수 없는 오류"},{"serialNumber":"000008","battery":40,"dailyDrivenDistance":0,"dailyDrivenTime":29,"coordinates":{"lon":127.050652,"lat":37.545297},"modelName":"MA01","isGoodReception":false,"isGoodPosture":false,"connected":true,"createdAt":"2020-02-13T15:02:15.601Z","group":"collect","state":"수거됨"}]}`
const res = `
{"success":true,"data":[{"serial_number":"000237","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{lowBattery,collect}"},{"serial_number":"000200","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{lowBattery}"},{"serial_number":"000264","coordinates":{"x":127.050413,"y":37.546026},"battery":35,"states":"{collect}"},{"serial_number":"000302","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{collect}"},{"serial_number":"000273","coordinates":{"x":127.050413,"y":37.546026},"battery":33,"states":"{}"},{"serial_number":"000274","coordinates":{"x":127.031578,"y":37.520911},"battery":36,"states":"{}"},{"serial_number":"000116","coordinates":{"x":128.68613,"y":35.242142},"battery":96,"states":"{collect}"},{"serial_number":"000078","coordinates":{"x":128.603483,"y":35.308886},"battery":0,"states":"{lowBattery,collect,shutdown}"},{"serial_number":"000136","coordinates":{"x":128.68559,"y":35.242462},"battery":100,"states":"{collect}"},{"serial_number":"000112","coordinates":{"x":128.68542,"y":35.242336},"battery":86,"states":"{collect}"},{"serial_number":"000282","coordinates":{"x":127.050413,"y":37.546026},"battery":40,"states":"{collect}"},{"serial_number":"000281","coordinates":{"x":127.050413,"y":37.546026},"battery":37,"states":"{collect}"},{"serial_number":"000063","coordinates":{"x":128.59869,"y":35.288071},"battery":42,"states":"{collect,shutdown}"},{"serial_number":"000060","coordinates":{"x":128.59871,"y":35.288094},"battery":24,"states":"{lowBattery,shutdown,collect}"},{"serial_number":"000117","coordinates":{"x":128.68541,"y":35.242359},"battery":100,"states":"{collect}"},{"serial_number":"000025","coordinates":{"x":128.48674,"y":35.852573},"battery":83,"states":"{shutdown}"},{"serial_number":"000126","coordinates":{"x":128.68542,"y":35.242367},"battery":100,"states":"{collect}"},{"serial_number":"000283","coordinates":{"x":127.050413,"y":37.546026},"battery":31,"states":"{collect}"},{"serial_number":"000256","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{lowBattery,collect}"},{"serial_number":"000268","coordinates":{"x":127.050413,"y":37.546026},"battery":24,"states":"{lowBattery,collect}"},{"serial_number":"000087","coordinates":{"x":128.55783,"y":35.180756},"battery":100,"states":"{shutdown}"},{"serial_number":"000082","coordinates":{"x":128.56021,"y":35.17952},"battery":100,"states":"{shutdown}"},{"serial_number":"000138","coordinates":{"x":128.68541,"y":35.242371},"battery":100,"states":"{collect}"},{"serial_number":"000014","coordinates":{"x":128.48584,"y":35.854103},"battery":57,"states":"{shutdown}"},{"serial_number":"000172","coordinates":{"x":126.63202,"y":37.39566},"battery":48,"states":"{collect}"},{"serial_number":"000253","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{lowBattery,collect}"},{"serial_number":"000228","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{lowBattery,collect}"},{"serial_number":"000225","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{lowBattery,collect}"},{"serial_number":"000041","coordinates":{"x":128.49156,"y":35.851913},"battery":98,"states":"{shutdown}"},{"serial_number":"000170","coordinates":{"x":126.62963,"y":37.373707},"battery":44,"states":"{}"},{"serial_number":"000275","coordinates":{"x":127.050413,"y":37.546026},"battery":37,"states":"{collect}"},{"serial_number":"000278","coordinates":{"x":127.050413,"y":37.546026},"battery":28,"states":"{lowBattery,collect}"},{"serial_number":"000271","coordinates":{"x":127.050413,"y":37.546026},"battery":36,"states":"{collect}"},{"serial_number":"000240","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{lowBattery,collect}"},{"serial_number":"000045","coordinates":{"x":128.48882,"y":35.857899},"battery":62,"states":"{shutdown}"},{"serial_number":"000098","coordinates":{"x":128.55273,"y":35.184776},"battery":97,"states":"{shutdown}"},{"serial_number":"000142","coordinates":{"x":128.68547,"y":35.242344},"battery":97,"states":"{collect}"},{"serial_number":"000113","coordinates":{"x":128.68536,"y":35.242474},"battery":100,"states":"{collect}"},{"serial_number":"000149","coordinates":{"x":128.68532,"y":35.242386},"battery":100,"states":"{collect}"},{"serial_number":"000051","coordinates":{"x":128.48878,"y":35.857849},"battery":56,"states":"{shutdown}"},{"serial_number":"000254","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{lowBattery,collect}"},{"serial_number":"000011","coordinates":{"x":128.48766,"y":35.852894},"battery":57,"states":"{shutdown}"},{"serial_number":"000257","coordinates":{"x":127.050413,"y":37.546026},"battery":28,"states":"{lowBattery,collect}"},{"serial_number":"000119","coordinates":{"x":128.68541,"y":35.242359},"battery":100,"states":"{collect}"},{"serial_number":"000024","coordinates":{"x":128.48715,"y":35.859211},"battery":60,"states":"{shutdown}"},{"serial_number":"000140","coordinates":{"x":128.68538,"y":35.242401},"battery":99,"states":"{collect}"},{"serial_number":"000015","coordinates":{"x":128.47974,"y":35.853157},"battery":78,"states":"{shutdown}"},{"serial_number":"000124","coordinates":{"x":128.68524,"y":35.242451},"battery":100,"states":"{collect}"},{"serial_number":"000222","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{collect}"},{"serial_number":"000223","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{collect}"},{"serial_number":"000249","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{lowBattery,collect}"},{"serial_number":"000245","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{lowBattery,collect}"},{"serial_number":"000272","coordinates":{"x":127.050413,"y":37.546026},"battery":34,"states":"{collect}"},{"serial_number":"000244","coordinates":{"x":127.050413,"y":37.546026},"battery":23,"states":"{lowBattery,collect}"},{"serial_number":"000226","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{lowBattery,collect}"},{"serial_number":"000229","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{lowBattery,collect}"},{"serial_number":"000303","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{collect}"},{"serial_number":"000304","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{collect}"},{"serial_number":"000205","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{lowBattery,collect}"},{"serial_number":"000072","coordinates":{"x":128.55763,"y":35.180714},"battery":100,"states":"{shutdown}"},{"serial_number":"000216","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{collect}"},{"serial_number":"000217","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{lowBattery}"},{"serial_number":"000219","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{collect}"},{"serial_number":"000221","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{collect}"},{"serial_number":"000247","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{lowBattery,collect}"},{"serial_number":"000210","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{}"},{"serial_number":"000095","coordinates":{"x":128.56006,"y":35.179478},"battery":100,"states":"{shutdown}"},{"serial_number":"000115","coordinates":{"x":128.68541,"y":35.242325},"battery":100,"states":"{collect}"},{"serial_number":"000053","coordinates":{"x":128.48926,"y":35.857613},"battery":49,"states":"{shutdown}"},{"serial_number":"000234","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{lowBattery,collect}"},{"serial_number":"000276","coordinates":{"x":127.050413,"y":37.546026},"battery":30,"states":"{lowBattery,collect}"},{"serial_number":"000258","coordinates":{"x":127.050413,"y":37.546026},"battery":24,"states":"{lowBattery,collect}"},{"serial_number":"000088","coordinates":{"x":128.56004,"y":35.179726},"battery":88,"states":"{shutdown}"},{"serial_number":"000070","coordinates":{"x":128.59871,"y":35.288055},"battery":42,"states":"{breakdown,shutdown,collect}"},{"serial_number":"000068","coordinates":{"x":128.55762,"y":35.180756},"battery":97,"states":"{shutdown}"},{"serial_number":"000122","coordinates":{"x":128.68509,"y":35.242611},"battery":100,"states":"{collect}"},{"serial_number":"000144","coordinates":{"x":128.68527,"y":35.242409},"battery":87,"states":"{collect}"},{"serial_number":"000110","coordinates":{"x":128.68538,"y":35.242413},"battery":100,"states":"{collect}"},{"serial_number":"000130","coordinates":{"x":128.68532,"y":35.242344},"battery":81,"states":"{collect}"},{"serial_number":"000054","coordinates":{"x":128.48581,"y":35.854118},"battery":57,"states":"{shutdown}"},{"serial_number":"000056","coordinates":{"x":128.48982,"y":35.853874},"battery":43,"states":"{shutdown}"},{"serial_number":"000285","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{collect}"},{"serial_number":"000286","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{collect}"},{"serial_number":"000287","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{collect}"},{"serial_number":"000288","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{collect}"},{"serial_number":"000289","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{collect}"},{"serial_number":"000290","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{collect}"},{"serial_number":"000291","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{collect}"},{"serial_number":"000292","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{collect}"},{"serial_number":"000293","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{collect}"},{"serial_number":"000294","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{collect}"},{"serial_number":"000295","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{collect}"},{"serial_number":"000296","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{collect}"},{"serial_number":"000297","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{collect}"},{"serial_number":"000298","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{collect}"},{"serial_number":"000299","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{collect}"},{"serial_number":"000300","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{collect}"},{"serial_number":"000301","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{collect}"},{"serial_number":"000252","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{lowBattery,collect}"},{"serial_number":"000262","coordinates":{"x":127.050413,"y":37.546026},"battery":25,"states":"{lowBattery,collect}"},{"serial_number":"000263","coordinates":{"x":127.050413,"y":37.546026},"battery":35,"states":"{collect}"},{"serial_number":"000061","coordinates":{"x":128.59871,"y":35.288052},"battery":92,"states":"{shutdown,collect}"},{"serial_number":"000057","coordinates":{"x":128.48828,"y":35.85577},"battery":60,"states":"{shutdown}"},{"serial_number":"000038","coordinates":{"x":128.48709,"y":35.854645},"battery":59,"states":"{shutdown}"},{"serial_number":"000108","coordinates":{"x":128.55811,"y":35.180981},"battery":100,"states":"{shutdown}"},{"serial_number":"000123","coordinates":{"x":128.68526,"y":35.242416},"battery":100,"states":"{collect}"},{"serial_number":"000184","coordinates":{"x":126.63737,"y":37.390133},"battery":29,"states":"{lowBattery}"},{"serial_number":"000173","coordinates":{"x":126.63992,"y":37.386776},"battery":79,"states":"{}"},{"serial_number":"000236","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{lowBattery,collect}"},{"serial_number":"000261","coordinates":{"x":127.050413,"y":37.546026},"battery":40,"states":"{collect}"},{"serial_number":"000265","coordinates":{"x":127.050413,"y":37.546026},"battery":28,"states":"{lowBattery,collect}"},{"serial_number":"000197","coordinates":{"x":126.63149,"y":37.395306},"battery":53,"states":"{breakdown}"},{"serial_number":"000092","coordinates":{"x":128.55814,"y":35.180927},"battery":100,"states":"{shutdown}"},{"serial_number":"000034","coordinates":{"x":128.48596,"y":35.855175},"battery":53,"states":"{shutdown}"},{"serial_number":"000135","coordinates":{"x":128.68533,"y":35.242355},"battery":100,"states":"{collect}"},{"serial_number":"000129","coordinates":{"x":128.68542,"y":35.242332},"battery":100,"states":"{collect}"},{"serial_number":"000161","coordinates":{"x":126.63254,"y":37.372768},"battery":45,"states":"{}"},{"serial_number":"000250","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{lowBattery,collect}"},{"serial_number":"000048","coordinates":{"x":128.49016,"y":35.85273},"battery":49,"states":"{shutdown}"},{"serial_number":"000104","coordinates":{"x":128.59866,"y":35.288086},"battery":0,"states":"{lowBattery,breakdown,shutdown,collect}"},{"serial_number":"000114","coordinates":{"x":128.68541,"y":35.242355},"battery":100,"states":"{collect}"},{"serial_number":"000280","coordinates":{"x":127.050413,"y":37.546026},"battery":36,"states":"{collect}"},{"serial_number":"000270","coordinates":{"x":127.050413,"y":37.546026},"battery":33,"states":"{collect}"},{"serial_number":"000284","coordinates":{"x":127.050413,"y":37.546026},"battery":36,"states":"{collect}"},{"serial_number":"000127","coordinates":{"x":128.68532,"y":35.24239},"battery":100,"states":"{collect}"},{"serial_number":"000132","coordinates":{"x":128.68536,"y":35.242424},"battery":99,"states":"{collect}"},{"serial_number":"000131","coordinates":{"x":128.68552,"y":35.242348},"battery":100,"states":"{collect}"},{"serial_number":"000266","coordinates":{"x":127.050413,"y":37.546026},"battery":30,"states":"{lowBattery,collect}"},{"serial_number":"000251","coordinates":{"x":127.050413,"y":37.546026},"battery":27,"states":"{lowBattery,collect}"},{"serial_number":"000233","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{lowBattery,collect}"},{"serial_number":"000255","coordinates":{"x":127.050413,"y":37.546026},"battery":30,"states":"{lowBattery,collect}"},{"serial_number":"000073","coordinates":{"x":128.59859,"y":35.288082},"battery":55,"states":"{breakdown,shutdown,collect}"},{"serial_number":"000023","coordinates":{"x":128.48975,"y":35.857269},"battery":58,"states":"{shutdown}"},{"serial_number":"000046","coordinates":{"x":128.48669,"y":35.852547},"battery":88,"states":"{shutdown}"},{"serial_number":"000279","coordinates":{"x":127.050413,"y":37.546026},"battery":38,"states":"{collect}"},{"serial_number":"000267","coordinates":{"x":127.050413,"y":37.546026},"battery":39,"states":"{collect}"},{"serial_number":"000242","coordinates":{"x":127.050413,"y":37.546026},"battery":21,"states":"{lowBattery,collect}"},{"serial_number":"000021","coordinates":{"x":128.4879,"y":35.859158},"battery":85,"states":"{shutdown}"},{"serial_number":"000269","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{lowBattery,collect}"},{"serial_number":"000277","coordinates":{"x":127.050413,"y":37.546026},"battery":41,"states":"{collect}"},{"serial_number":"000022","coordinates":{"x":128.48969,"y":35.857151},"battery":58,"states":"{shutdown}"},{"serial_number":"000148","coordinates":{"x":128.68539,"y":35.242352},"battery":100,"states":"{collect}"},{"serial_number":"000069","coordinates":{"x":128.56099,"y":35.180141},"battery":100,"states":"{shutdown}"},{"serial_number":"000050","coordinates":{"x":128.49167,"y":35.855564},"battery":89,"states":"{shutdown}"},{"serial_number":"000101","coordinates":{"x":128.5527,"y":35.184032},"battery":74,"states":"{shutdown}"},{"serial_number":"000246","coordinates":{"x":127.050413,"y":37.546026},"battery":22,"states":"{lowBattery,collect}"},{"serial_number":"000259","coordinates":{"x":127.050413,"y":37.546026},"battery":34,"states":"{collect}"},{"serial_number":"000118","coordinates":{"x":128.68539,"y":35.242424},"battery":100,"states":"{collect}"},{"serial_number":"000091","coordinates":{"x":128.55833,"y":35.180943},"battery":100,"states":"{shutdown}"},{"serial_number":"000064","coordinates":{"x":128.5601,"y":35.179558},"battery":100,"states":"{shutdown}"},{"serial_number":"000180","coordinates":{"x":126.63976,"y":37.386524},"battery":87,"states":"{}"},{"serial_number":"000227","coordinates":{"x":127.050413,"y":37.546026},"battery":21,"states":"{lowBattery,collect}"},{"serial_number":"000097","coordinates":{"x":128.59863,"y":35.288086},"battery":40,"states":"{collect,shutdown}"},{"serial_number":"000183","coordinates":{"x":126.63882,"y":37.395435},"battery":57,"states":"{}"},{"serial_number":"000158","coordinates":{"x":126.66502,"y":37.379177},"battery":48,"states":"{}"},{"serial_number":"000150","coordinates":{"x":126.64136,"y":37.38821},"battery":86,"states":"{}"},{"serial_number":"000187","coordinates":{"x":126.65464,"y":37.388729},"battery":59,"states":"{}"},{"serial_number":"000155","coordinates":{"x":126.63209,"y":37.395725},"battery":100,"states":"{collect}"},{"serial_number":"000111","coordinates":{"x":128.68535,"y":35.242352},"battery":92,"states":"{collect}"},{"serial_number":"000154","coordinates":{"x":126.65164,"y":37.371201},"battery":90,"states":"{}"},{"serial_number":"000166","coordinates":{"x":126.64482,"y":37.391342},"battery":60,"states":"{}"},{"serial_number":"000080","coordinates":{"x":128.5648,"y":35.180134},"battery":90,"states":"{shutdown}"},{"serial_number":"000049","coordinates":{"x":128.47971,"y":35.85323},"battery":76,"states":"{shutdown}"},{"serial_number":"000019","coordinates":{"x":128.49153,"y":35.853905},"battery":38,"states":"{shutdown}"},{"serial_number":"000029","coordinates":{"x":128.49103,"y":35.855743},"battery":79,"states":"{shutdown}"},{"serial_number":"000030","coordinates":{"x":128.48566,"y":35.856144},"battery":85,"states":"{shutdown}"},{"serial_number":"000012","coordinates":{"x":128.48015,"y":35.856594},"battery":77,"states":"{shutdown}"},{"serial_number":"000035","coordinates":{"x":128.49098,"y":35.855797},"battery":79,"states":"{shutdown}"},{"serial_number":"000043","coordinates":{"x":128.48659,"y":35.852516},"battery":81,"states":"{shutdown}"},{"serial_number":"000013","coordinates":{"x":128.49103,"y":35.855804},"battery":46,"states":"{shutdown}"},{"serial_number":"000075","coordinates":{"x":128.55568,"y":35.18372},"battery":98,"states":"{shutdown}"},{"serial_number":"000047","coordinates":{"x":128.48625,"y":35.852581},"battery":83,"states":"{shutdown}"},{"serial_number":"000042","coordinates":{"x":128.48767,"y":35.85899},"battery":78,"states":"{shutdown}"},{"serial_number":"000121","coordinates":{"x":128.68535,"y":35.242294},"battery":100,"states":"{collect}"},{"serial_number":"000085","coordinates":{"x":128.55824,"y":35.180988},"battery":80,"states":"{shutdown}"},{"serial_number":"000052","coordinates":{"x":128.49019,"y":35.852802},"battery":47,"states":"{shutdown}"},{"serial_number":"000076","coordinates":{"x":128.55884,"y":35.174332},"battery":76,"states":"{shutdown}"},{"serial_number":"000093","coordinates":{"x":128.55571,"y":35.183659},"battery":100,"states":"{shutdown}"},{"serial_number":"000010","coordinates":{"x":128.48969,"y":35.857227},"battery":39,"states":"{shutdown}"},{"serial_number":"000157","coordinates":{"x":126.63492,"y":37.382137},"battery":49,"states":"{}"},{"serial_number":"000020","coordinates":{"x":128.49097,"y":35.85186},"battery":86,"states":"{shutdown}"},{"serial_number":"000044","coordinates":{"x":128.49181,"y":35.858891},"battery":45,"states":"{shutdown}"},{"serial_number":"000032","coordinates":{"x":128.4825,"y":35.853092},"battery":0,"states":"{lowBattery,shutdown}"},{"serial_number":"000016","coordinates":{"x":128.49164,"y":35.85556},"battery":45,"states":"{shutdown}"},{"serial_number":"000100","coordinates":{"x":128.55846,"y":35.178837},"battery":84,"states":"{shutdown}"},{"serial_number":"000079","coordinates":{"x":128.59883,"y":35.288006},"battery":31,"states":"{breakdown,shutdown,collect}"},{"serial_number":"000089","coordinates":{"x":128.55269,"y":35.184845},"battery":100,"states":"{shutdown}"},{"serial_number":"000128","coordinates":{"x":128.68529,"y":35.242359},"battery":100,"states":"{collect}"},{"serial_number":"000058","coordinates":{"x":128.49158,"y":35.85191},"battery":83,"states":"{shutdown}"},{"serial_number":"000102","coordinates":{"x":128.56105,"y":35.180134},"battery":96,"states":"{shutdown}"},{"serial_number":"000062","coordinates":{"x":128.55522,"y":35.184566},"battery":91,"states":"{shutdown}"},{"serial_number":"000191","coordinates":{"x":126.63166,"y":37.395519},"battery":85,"states":"{}"},{"serial_number":"000006","coordinates":{"x":126.885743,"y":37.479925},"battery":94,"states":"{shutdown}"},{"serial_number":"000152","coordinates":{"x":126.65967,"y":37.372875},"battery":58,"states":"{}"},{"serial_number":"000199","coordinates":{"x":126.639,"y":37.385899},"battery":50,"states":"{}"},{"serial_number":"000181","coordinates":{"x":126.65187,"y":37.379066},"battery":0,"states":"{lowBattery}"},{"serial_number":"000196","coordinates":{"x":126.64489,"y":37.391376},"battery":71,"states":"{}"},{"serial_number":"000120","coordinates":{"x":128.68536,"y":35.242386},"battery":100,"states":"{collect}"},{"serial_number":"000134","coordinates":{"x":128.68536,"y":35.242466},"battery":100,"states":"{collect}"},{"serial_number":"000139","coordinates":{"x":128.6853,"y":35.242397},"battery":100,"states":"{collect}"},{"serial_number":"000027","coordinates":{"x":128.49158,"y":35.851887},"battery":70,"states":"{shutdown}"},{"serial_number":"000067","coordinates":{"x":128.55275,"y":35.184063},"battery":82,"states":"{shutdown}"},{"serial_number":"000143","coordinates":{"x":128.68523,"y":35.242352},"battery":100,"states":"{collect}"},{"serial_number":"000141","coordinates":{"x":128.68546,"y":35.242397},"battery":100,"states":"{collect}"},{"serial_number":"000033","coordinates":{"x":128.49176,"y":35.855431},"battery":56,"states":"{shutdown}"},{"serial_number":"000162","coordinates":{"x":126.63754,"y":37.390091},"battery":48,"states":"{}"},{"serial_number":"000083","coordinates":{"x":128.56017,"y":35.179363},"battery":100,"states":"{shutdown}"},{"serial_number":"000074","coordinates":{"x":128.55936,"y":35.173824},"battery":97,"states":"{shutdown}"},{"serial_number":"000084","coordinates":{"x":128.55275,"y":35.184845},"battery":93,"states":"{shutdown}"},{"serial_number":"000018","coordinates":{"x":128.47954,"y":35.85611},"battery":45,"states":"{shutdown}"},{"serial_number":"000026","coordinates":{"x":128.48665,"y":35.852501},"battery":57,"states":"{shutdown}"},{"serial_number":"000231","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{lowBattery,collect}"},{"serial_number":"000243","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{lowBattery,collect}"},{"serial_number":"000232","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{lowBattery,collect}"},{"serial_number":"000238","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{lowBattery,collect}"},{"serial_number":"000239","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{lowBattery,collect}"},{"serial_number":"000248","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{lowBattery,collect}"},{"serial_number":"000179","coordinates":{"x":126.65153,"y":37.378719},"battery":54,"states":"{}"},{"serial_number":"000194","coordinates":{"x":126.66325,"y":37.376774},"battery":41,"states":"{}"},{"serial_number":"000107","coordinates":{"x":128.55832,"y":35.18108},"battery":100,"states":"{shutdown}"},{"serial_number":"000103","coordinates":{"x":128.5611,"y":35.18042},"battery":87,"states":"{shutdown}"},{"serial_number":"000028","coordinates":{"x":128.49158,"y":35.851906},"battery":70,"states":"{shutdown}"},{"serial_number":"000145","coordinates":{"x":128.68536,"y":35.242409},"battery":100,"states":"{collect}"},{"serial_number":"000147","coordinates":{"x":128.68532,"y":35.24231},"battery":100,"states":"{collect}"},{"serial_number":"000133","coordinates":{"x":128.68559,"y":35.24242},"battery":99,"states":"{collect}"},{"serial_number":"000037","coordinates":{"x":128.48787,"y":35.859158},"battery":73,"states":"{shutdown}"},{"serial_number":"000105","coordinates":{"x":128.55836,"y":35.181004},"battery":91,"states":"{shutdown}"},{"serial_number":"000039","coordinates":{"x":128.491,"y":35.851856},"battery":82,"states":"{shutdown}"},{"serial_number":"000109","coordinates":{"x":128.59863,"y":35.288193},"battery":0,"states":"{lowBattery,breakdown,collect,shutdown}"},{"serial_number":"000106","coordinates":{"x":128.55859,"y":35.180622},"battery":95,"states":"{shutdown}"},{"serial_number":"000099","coordinates":{"x":128.55995,"y":35.178864},"battery":83,"states":"{shutdown,collect}"},{"serial_number":"000193","coordinates":{"x":126.67162,"y":37.38451},"battery":91,"states":"{}"},{"serial_number":"000241","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{lowBattery,collect}"},{"serial_number":"000186","coordinates":{"x":126.63434,"y":37.376736},"battery":64,"states":"{}"},{"serial_number":"000235","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{lowBattery,collect}"},{"serial_number":"000096","coordinates":{"x":128.5527,"y":35.184036},"battery":73,"states":"{shutdown}"},{"serial_number":"000159","coordinates":{"x":126.64333,"y":37.387665},"battery":51,"states":"{}"},{"serial_number":"000031","coordinates":{"x":128.4847,"y":35.857811},"battery":47,"states":"{shutdown}"},{"serial_number":"000182","coordinates":{"x":126.63379,"y":37.372128},"battery":21,"states":"{lowBattery}"},{"serial_number":"000156","coordinates":{"x":126.63519,"y":37.391769},"battery":97,"states":"{}"},{"serial_number":"000094","coordinates":{"x":128.55481,"y":35.18314},"battery":96,"states":"{shutdown}"},{"serial_number":"000036","coordinates":{"x":128.48003,"y":35.856781},"battery":51,"states":"{shutdown}"},{"serial_number":"000081","coordinates":{"x":128.601742,"y":35.300969},"battery":67,"states":"{collect,shutdown}"},{"serial_number":"000008","coordinates":{"x":126.872168,"y":37.477157},"battery":40,"states":"{collect,shutdown}"},{"serial_number":"000003","coordinates":{"x":127.078668,"y":37.244634},"battery":0,"states":"{lowBattery,shutdown,breakdown}"},{"serial_number":"000004","coordinates":{"x":127.078668,"y":37.244634},"battery":0,"states":"{lowBattery,shutdown}"},{"serial_number":"000230","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{lowBattery,collect}"},{"serial_number":"000065","coordinates":{"x":128.59842,"y":35.287716},"battery":100,"states":"{collect,shutdown}"},{"serial_number":"000160","coordinates":{"x":126.65345,"y":37.378155},"battery":63,"states":"{}"},{"serial_number":"000164","coordinates":{"x":126.63607,"y":37.391586},"battery":29,"states":"{lowBattery}"},{"serial_number":"000192","coordinates":{"x":126.64223,"y":37.388081},"battery":53,"states":"{}"},{"serial_number":"000188","coordinates":{"x":126.63686,"y":37.395939},"battery":75,"states":"{collect}"},{"serial_number":"000198","coordinates":{"x":126.62984,"y":37.3741},"battery":66,"states":"{}"},{"serial_number":"000005","coordinates":{"x":128.83887,"y":35.903736},"battery":0,"states":"{lowBattery,collect,shutdown}"},{"serial_number":"000185","coordinates":{"x":126.63357,"y":37.393284},"battery":71,"states":"{}"},{"serial_number":"000211","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{lowBattery}"},{"serial_number":"000177","coordinates":{"x":126.6521,"y":37.373055},"battery":0,"states":"{lowBattery,breakdown}"},{"serial_number":"000195","coordinates":{"x":126.67195,"y":37.384193},"battery":55,"states":"{}"},{"serial_number":"000174","coordinates":{"x":126.64968,"y":37.390728},"battery":70,"states":"{}"},{"serial_number":"000165","coordinates":{"x":126.64504,"y":37.39101},"battery":72,"states":"{}"},{"serial_number":"000178","coordinates":{"x":126.65102,"y":37.396862},"battery":72,"states":"{}"},{"serial_number":"000071","coordinates":{"x":128.55888,"y":35.18066},"battery":100,"states":"{shutdown}"},{"serial_number":"000169","coordinates":{"x":126.66001,"y":37.383919},"battery":25,"states":"{lowBattery}"},{"serial_number":"000189","coordinates":{"x":126.63506,"y":37.391766},"battery":48,"states":"{}"},{"serial_number":"000167","coordinates":{"x":126.6511,"y":37.372475},"battery":50,"states":"{}"},{"serial_number":"000168","coordinates":{"x":126.64373,"y":37.387196},"battery":56,"states":"{}"},{"serial_number":"000163","coordinates":{"x":126.65977,"y":37.390862},"battery":63,"states":"{}"},{"serial_number":"000090","coordinates":{"x":128.56012,"y":35.179558},"battery":86,"states":"{shutdown}"},{"serial_number":"000176","coordinates":{"x":126.64191,"y":37.388588},"battery":67,"states":"{}"},{"serial_number":"000151","coordinates":{"x":126.63647,"y":37.397041},"battery":31,"states":"{}"},{"serial_number":"000175","coordinates":{"x":126.65736,"y":37.370216},"battery":34,"states":"{}"},{"serial_number":"000040","coordinates":{"x":128.49156,"y":35.855484},"battery":53,"states":"{shutdown}"},{"serial_number":"000017","coordinates":{"x":128.49182,"y":35.859493},"battery":50,"states":"{shutdown}"},{"serial_number":"000066","coordinates":{"x":128.55269,"y":35.184811},"battery":95,"states":"{shutdown}"},{"serial_number":"000055","coordinates":{"x":128.48351,"y":35.850906},"battery":75,"states":"{shutdown}"},{"serial_number":"000171","coordinates":{"x":126.65102,"y":37.371387},"battery":89,"states":"{}"},{"serial_number":"000190","coordinates":{"x":126.66607,"y":37.383934},"battery":80,"states":"{}"},{"serial_number":"000059","coordinates":{"x":128.862477,"y":35.874904},"battery":0,"states":"{lowBattery,shutdown}"},{"serial_number":"000224","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{lowBattery}"},{"serial_number":"000207","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{lowBattery}"},{"serial_number":"000208","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{lowBattery}"},{"serial_number":"000086","coordinates":{"x":128.59836,"y":35.287998},"battery":0,"states":"{lowBattery,breakdown,collect,shutdown}"},{"serial_number":"000220","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{lowBattery}"},{"serial_number":"000201","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{lowBattery}"},{"serial_number":"000214","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{lowBattery}"},{"serial_number":"000215","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{lowBattery}"},{"serial_number":"000209","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{lowBattery}"},{"serial_number":"000203","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{lowBattery}"},{"serial_number":"000213","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{lowBattery}"},{"serial_number":"000202","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{lowBattery}"},{"serial_number":"000218","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{lowBattery}"},{"serial_number":"000206","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{lowBattery}"},{"serial_number":"000212","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{lowBattery}"},{"serial_number":"000204","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{lowBattery}"},{"serial_number":"000007","coordinates":{"x":126.87614,"y":37.482151},"battery":0,"states":"{lowBattery,shutdown}"},{"serial_number":"000153","coordinates":{"x":126.63745,"y":37.389938},"battery":86,"states":"{}"},{"serial_number":"000260","coordinates":{"x":127.050413,"y":37.546026},"battery":0,"states":"{lowBattery,collect}"},{"serial_number":"000125","coordinates":{"x":128.68489,"y":35.243015},"battery":0,"states":"{lowBattery,collect}"},{"serial_number":"000137","coordinates":{"x":128.6853,"y":35.242352},"battery":0,"states":"{lowBattery,collect}"},{"serial_number":"000146","coordinates":{"x":128.69785,"y":35.237259},"battery":0,"states":"{lowBattery,collect}"},{"serial_number":"000077","coordinates":{"x":128.59868,"y":35.288116},"battery":100,"states":"{collect,shutdown}"},{"serial_number":"000002","coordinates":{"x":126.883435,"y":37.480514},"battery":42,"states":"{}"},{"serial_number":"000000","coordinates":{"x":126.885654,"y":37.480045},"battery":0,"states":"{lowBattery,shutdown}"},{"serial_number":"000001","coordinates":{"x":127.078668,"y":37.244634},"battery":0,"states":"{lowBattery,shutdown}"}]}
`;
export default res;
\ No newline at end of file
......
......@@ -49,7 +49,7 @@ class Header extends Component {
<Navbar fluid>
<Navbar.Header>
<Navbar.Brand>
<a href="#pablo">{this.props.brandText}</a>
<a href="#pablo" style={{color: '#333333'}}>{this.props.brandText}</a>
</Navbar.Brand>
<Navbar.Toggle onClick={this.mobileSidebarToggle} />
</Navbar.Header>
......
......@@ -20,55 +20,9 @@ import { NavItem, Nav, NavDropdown, MenuItem } from "react-bootstrap";
class AdminNavbarLinks extends Component {
render() {
const notification = (
<div>
<i className="fa fa-globe" />
<b className="caret" />
<span className="notification">5</span>
<p className="hidden-lg hidden-md">Notification</p>
</div>
);
return (
<div>
<Nav>
<NavItem eventKey={1} href="#">
<i className="fa fa-dashboard" />
<p className="hidden-lg hidden-md">Dashboard</p>
</NavItem>
<NavDropdown
eventKey={2}
title={notification}
noCaret
id="basic-nav-dropdown"
>
<MenuItem eventKey={2.1}>Notification 1</MenuItem>
<MenuItem eventKey={2.2}>Notification 2</MenuItem>
<MenuItem eventKey={2.3}>Notification 3</MenuItem>
<MenuItem eventKey={2.4}>Notification 4</MenuItem>
<MenuItem eventKey={2.5}>Another notifications</MenuItem>
</NavDropdown>
<NavItem eventKey={3} href="#">
<i className="fa fa-search" />
<p className="hidden-lg hidden-md">Search</p>
</NavItem>
</Nav>
<Nav pullRight>
<NavItem eventKey={1} href="#">
Account
</NavItem>
<NavDropdown
eventKey={2}
title="Dropdown"
id="basic-nav-dropdown-right"
>
<MenuItem eventKey={2.1}>Action</MenuItem>
<MenuItem eventKey={2.2}>Another action</MenuItem>
<MenuItem eventKey={2.3}>Something</MenuItem>
<MenuItem eventKey={2.4}>Another action</MenuItem>
<MenuItem eventKey={2.5}>Something</MenuItem>
<MenuItem divider />
<MenuItem eventKey={2.5}>Separated link</MenuItem>
</NavDropdown>
<NavItem eventKey={3} href="#">
Log out
</NavItem>
......
......@@ -35,7 +35,7 @@ class Sidebar extends Component {
>
<div className="logo" style={{display: 'flex',justifyContent: 'center', alignItems: 'center'}}>
<a
href="https://www.creative-tim.com?ref=lbd-sidebar"
href="http://mate.ryulth.com/admin/kickboard"
>
<img src={mate_logo} alt="logo_image" style={{width: '135px'}}/>
</a>
......
......@@ -40,34 +40,34 @@ const UserDataCard = (props) => {
<div>
<Row>
<Col md={6} sm={6} xs={12}>
<UserData>이름 : {name}</UserData>
<UserData><strong>이름 : </strong>{name}</UserData>
</Col>
<Col md={6} sm={6} xs={12}>
<UserData>사용자 ID : {user_id}</UserData>
<UserData><strong>사용자 ID : </strong>{user_id}</UserData>
</Col>
</Row>
<Row>
<Col md={6} sm={6} xs={12}>
<UserData>전화번호 : {phone_number}</UserData>
<UserData><strong>전화번호 : </strong>{phone_number}</UserData>
</Col>
<Col md={6} sm={6} xs={12}>
<UserData>이메일 : {email}</UserData>
<UserData><strong>이메일 : </strong>{email}</UserData>
</Col>
</Row>
<Row>
<Col md={6} sm={6} xs={12}>
<UserData>가입 날짜 : {timestampToString(created_datetime)}</UserData>
<UserData><strong>가입 날짜 : </strong>{timestampToString(created_datetime)}</UserData>
</Col>
<Col md={6} sm={6} xs={12}>
<UserData>최근 로그인 날짜 : {timestampToString(recent_login_datetime)}</UserData>
<UserData><strong>최근 로그인 날짜 : </strong>{timestampToString(recent_login_datetime)}</UserData>
</Col>
</Row>
<Row>
<Col md={6} sm={6} xs={12}>
<UserData>면허증 등록 여부 : {license_registered ? '등록됨' : '미등록'}</UserData>
<UserData><strong>면허증 등록 여부 : </strong>{license_registered ? '등록됨' : '미등록'}</UserData>
</Col>
<Col md={6} sm={6} xs={12}>
<UserData>카드 등록 여부 : {license_registered ? '등록됨' : '미등록'}</UserData>
<UserData><strong>카드 등록 여부 : </strong>{license_registered ? '등록됨' : '미등록'}</UserData>
</Col>
</Row>
</div>
......
......@@ -23,7 +23,7 @@ const dashboardRoutes = [
// layout: "/admin"
// },
{
path: "/table",
path: "/user",
name: "사용자 정보",
icon: "pe-7s-users",
component: UserHistory,
......
......@@ -8,6 +8,7 @@ import SearchButton from '../components/Kickboard/SearchButton';
const Kickboard = () => {
const [kbId, setKbId] = useState('-1');
const [kbData, setKbData] = useState({});
const [historyData, setHistoryData] = useState([]);
......@@ -26,11 +27,16 @@ const Kickboard = () => {
.catch(err => console.log(err));
},[kbId]);
if(Number(kbId)<0) {
if(kbId<0) {
return (
<div className="content">
<Grid fluid>
<Row>
<Col md={4} mdOffset={8} sm={3} smOffset={9} style={{marginBottom:15}}>
<SearchButton setKbId={setKbId}/>
</Col>
</Row>
<Row>
<Col md={8} mdOffset={2}>
<GoogleMapCard setKbId={setKbId}/>
</Col>
......@@ -51,7 +57,7 @@ const Kickboard = () => {
</Row>
<Row>
<Col md={6}>
<GoogleMapCard setKbId={setKbId}/>
<GoogleMapCard kbId={kbId} setKbId={setKbId}/>
</Col>
<Col md={6}>
<KickboardStatusCard kbId={kbId} kbData={kbData}/>
......
......@@ -5,20 +5,44 @@ import UserHistoryCard from '../components/UserHistory/UserHistoryCard';
import SearchButton from "../components/UserHistory/SearchButton";
import Fallback from '../components/UserHistory/Fallback';
const convertQueryStringToObject = s => {
const hashParams = {};
let e;
const a = /\+/g, // Regex for replacing addition symbol with a space
r = /([^&;=]+)=?([^&;]*)/g,
d = function(s) {
return decodeURIComponent(s.replace(a, ' '));
},
q = s.replace(/\?/g, '');
while ((e = r.exec(q))) hashParams[d(e[1])] = d(e[2]);
return hashParams;
};
const UserHistory = () => {
const [userId, setUserId] = useState('0');
const [userData, setUserData] = useState({});
const [rentData, setRentData] = useState([]);
useEffect(() => {
// TODO: componentDidMount > 쿼리 검사하기
// component did mount
console.log('component did mount')
const queryString = window.location.href.split('?')[1];
const queryObject = queryString ? convertQueryStringToObject(queryString) : {};
if(queryObject && queryObject.userId) {
setTimeout(() => setUserId(queryObject.userId), 300)
}
},[]);
useEffect(() => {
if(Number(userId)<0) return;
console.log(userId);
fetch(`http://1.201.143.67:5901/user/${userId}`)
.then(r => r.json())
.then(d => {
console.log(d);
if(!d.success) setUserId('0'); // 유효하지 않은 userId인 경우
if(d.data && d.data.length) setUserData(d.data[0]);
......