Skip to content

Commit 8bd82e7

Browse files
mfalkviddhenrikekblad
authored andcommitted
Add log parser (#1338)
* Add log parser
1 parent baf4867 commit 8bd82e7

File tree

4 files changed

+1206
-0
lines changed

4 files changed

+1206
-0
lines changed

Logparser/logparser.css

Lines changed: 60 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Logparser/logparser.html

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<!DOCTYPE html><html><head>
2+
<meta charset="utf-8">
3+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
4+
<title>Log Parser | MySensors - Create your own Connected Home Experience</title>
5+
<link rel="stylesheet" href="logparser.css" />
6+
</head>
7+
<body>
8+
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.1.10/vue.min.js"></script>
9+
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>
10+
<div id="parser">
11+
<h4>Paste log from gateway or node here:</h4>
12+
<textarea class="form-control" @change="parse" rows="10" v-model="source"></textarea>
13+
<button @click="parse" class="btn btn-primary">Parse</button>
14+
<button @click="copy" class="btn btn-primary">Copy this log URL to clipboard</button>
15+
<button @click="source=''" class="btn btn-default">Clear</button>
16+
<h4>Human readable output:</h4>
17+
<div class="table-responsive">
18+
<table class="table table-condensed">
19+
<tr>
20+
<th>Node Id</th>
21+
<th>Child Sensor</th>
22+
<th>Command Type</th>
23+
<th>Ack Req/Resp</th>
24+
<th>Type</th>
25+
<th>Payload</th>
26+
<th>Description</th>
27+
</tr>
28+
<tr v-for="r in parsed">
29+
<td v-for="c in r" v-html="c"></td>
30+
</tr>
31+
</table>
32+
</div>
33+
</div>
34+
35+
<script src="logparser.js"></script>
36+
</body>
37+
</html>
38+

0 commit comments

Comments
 (0)