-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
74 lines (70 loc) · 2.96 KB
/
index.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<!DOCTYPE html>
<!-- mqttpoke (c) 2024 Ryan Griggs. All rights reserved.
Released under MIT license.
https://github.com/ryangriggs/mqttpoke
-->
<head>
<title>mqttpoke</title>
<link rel="stylesheet" href="./mqttpoke.css">
<script src="./jquery3.7.1.js"></script>
<script src="./mqtt.js"></script>
<script src="./moment.js"></script>
<script src="./cookie.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.30.1/moment.min.js" integrity="sha512-hUhvpC5f8cgc04OZb55j0KNGh4eh7dLxd/dPSJ5VyzqDWxsayYbojWyl5Tkcgrmb/RVKCRJI1jNlRbVP4WWC4w==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
</head>
<body>
<div class="connection">
URI: <input type="text" id="uri" value="mqtts://">
Topic: <input type="text" id="topic" value="">
Username: <input type="text" id="username" value="">
Password: <input type="password" id="password" value="">
<button id="btnConnect">Connect</button>
<button id="btnItemsClear" onclick="$('.data .item').not('.template').remove();">Clear Messages</button>
<button id="btnSubscribe">Subscribe To...</button>
</div>
<div class="data" id="data">
<table>
<tr>
<th>Topic</th>
<th>Message</th>
<th>Last Update</th>
<th>Type</th>
<th>Actions</th>
</tr>
<tr class="item template">
<td class="topic"></td>
<td class="message">
<div class="bool display">
<input type="checkbox" class="value">
</div>
<div class="text int16s int32s float32 display">
<input type="text" class="value">
</div>
</td>
<td class="updated">-never-</td>
<td class="type">
<select class="value" onchange="formatData(this)">
<option value="text">Raw Text</option>
<option value="bool">Boolean</option>
<option value="int16s">int16s: 16-bit signed integer</option>
<option value="int32s">int32s: 32-bit signed integer</option>
<option value="float32">float32: 32-bit floating point</option>
</select>
</td>
<td class="buttons">
<button class="btnItemPublish">Publish</button>
<button class="btnItemRemove">Remove</button>
</td>
</tr>
</table>
</div>
<div class="log" id="log">
<button id="btnLogClear" onclick="$('.log .entry').not('.template').remove();">Clear</button>
<div class="entry template">
<span class="date">M/D/YYYY h:mm:ss a</span>
<span class="message">Message</span>
</div>
</div>
<script src="mqttpoke.js"></script>
</body>
</html>