-
-
Notifications
You must be signed in to change notification settings - Fork 896
/
Copy pathlogparser.html
38 lines (36 loc) · 1.32 KB
/
logparser.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<!DOCTYPE html><html><head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Log Parser | MySensors - Create your own Connected Home Experience</title>
<link rel="stylesheet" href="logparser.css" />
</head>
<body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.6.12/vue.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.12.0/underscore-min.js"></script>
<div id="parser">
<h4>Paste log from gateway or node here:</h4>
<textarea class="form-control" @change="parse" rows="10" v-model="source"></textarea>
<button @click="parse" class="btn btn-primary">Parse</button>
<button @click="copy" class="btn btn-primary">Copy this log URL to clipboard</button>
<button @click="source=''" class="btn btn-default">Clear</button>
<h4>Human readable output:</h4>
<div class="table-responsive">
<table class="table table-condensed">
<tr>
<th>Node Id</th>
<th>Child Sensor</th>
<th>Command Type</th>
<th>Echo Req/Resp</th>
<th>Type</th>
<th>Payload</th>
<th>Description</th>
</tr>
<tr style="font-family: monospace;" v-for="row in parsed">
<td v-for="col in row" v-html="col"></td>
</tr>
</table>
</div>
</div>
<script src="logparser.js"></script>
</body>
</html>