graph_report.php - aiegoo/sensor GitHub Wiki
<!-- jquery from remote url -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!-- plot.ly -->
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
<style>
body, html { padding:0; margin:0; }
/* layout */
#contentBase {
font-size: 13px;
width: 100%;
height: 100%;
}
#loadingScreen {
position: absolute;
z-index: 32767;
left: 0;
top: 0;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.5);
}
#loadingScreen span {
text-align: center;
font-size: 14px;
position: absolute;
left: 50%;
top: 50%;
width: 390px;
margin-left: -200px;
margin-top: -30px;
padding: 10px;
background-color: #fff;
border-radius: 5px;
}
/* table 2: search header */
.searchTable {
border: 1px solid #ccc;
margin: 10px;
overflow: auto;
background-color: #eee;
}
.searchTable th {
background-color: #eaeaea;
padding: 5px;
}
.searchTable td {
padding: 5px;
background-color: #fff;
}
.searchTable input, .searchTable select {
padding: 3px;
}
.searchTable button {
min-width: 50px;
padding: 3px 4px;
}
/* graph */
.graphBody {
/* width:1880px;
height:280px; */
border:1px solid #ccc;
margin:10px;
background-color:#fff;
}
</style>
๋ฐ์ดํฐ๋ฅผ ๋ถ๋ฌ์ค๊ณ ์์ต๋๋ค. ์ ์๋ง ๊ธฐ๋ค๋ ค ์ฃผ์ธ์...
<!-- search form -->
<form name="frmSearchForm" method="GET" action="graph_report.php">
<table class="searchTable">
<tr>
<th>์ผ์๋
ธ๋ ๋ฒํธ (deviceIndex)</th>
<td>
<input type="number" id="deviceIndex" name="deviceIndex" value="<?php echo $deviceIndex?>" />
</td>
<th>์กฐํ๊ธฐ๊ฐ (yyyy-MM-dd ํํ ์
๋ ฅ)</th>
<td>
<input type="text" id="startDate" name="startDate" value="<?php echo $startDate?>" /> ~ <input type="text" id="endDate" name="endDate" value="<?php echo $endDate?>" />
</td>
<th>์ผ์ ์ข
๋ฅ ์ ํ</th>
<td>
<select name="type">
<option value="ANGLE" <?=($type == "ANGLE" ? "selected" : "")?>>์ ๊ธฐ์ธ๊ธฐ</option>
<option value="INCLINOMETER" <?=($type == "INCLINOMETER" ? "selected" : "")?>>๊ตฌ๊ธฐ์ธ๊ธฐ</option>
<option value="DISTANCE" <?=($type == "DISTANCE" ? "selected" : "")?>>์ ์ด๊ฒฉ</option>
<option value="CRACK" <?=($type == "CRACK" ? "selected" : "")?>>๊ตฌ์ด๊ฒฉ</option>
<option value="TEMPHUMI" <?=($type == "TEMPHUMI" ? "selected" : "")?>>์จ์ต๋</option>
<option value="OSCILLATION" <?=($type == "OSCILLATION" ? "selected" : "")?>>์ ์ง๋</option>
</select>
</td>
<th>
<button type="submit">์กฐํ</button>
* ์ฃผ์: ์ฌ๋ฌ ๋ฒ ๋๋ฅด์ง ๋ง์ญ์์ค. (ํญ๋ฐํฉ๋๋ค!)
</th>
</tr>
</table>
</form>
<!-- graph -->
<div id="graph_<?=$deviceIndex?>" class="graphBody"></div>
<script>
$(document).ready(function() {
drawData("Device #<?=$deviceIndex?>", <?=$deviceIndex?>);
});
</script>