Added Scanner identification and MQTT handling
This commit is contained in:
@@ -7,15 +7,15 @@
|
||||
<textarea id="chat-log" cols="100" rows="20"></textarea><br>
|
||||
<input id="chat-message-input" type="text" size="100"><br>
|
||||
<input id="chat-message-submit" type="button" value="Send">
|
||||
{{ scanner_id|json_script:"room-name" }}
|
||||
{{ scanner_id|json_script:"scanner_id" }}
|
||||
<script>
|
||||
const roomName = JSON.parse(document.getElementById('room-name').textContent);
|
||||
const scannerId = JSON.parse(document.getElementById('scanner_id').textContent);
|
||||
|
||||
const chatSocket = new WebSocket(
|
||||
'ws://'
|
||||
+ window.location.host
|
||||
+ '/ws/scannerdata/'
|
||||
+ roomName
|
||||
+ '/ws/scanner/'
|
||||
+ scannerId
|
||||
+ '/'
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user