Skip to content

Commit 5db89aa

Browse files
committed
Update help message
1 parent 8a9b1d9 commit 5db89aa

2 files changed

Lines changed: 11 additions & 6 deletions

File tree

tutorials/mqtt/mqtt-dashboard/dashboard/main.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const DefaultUrl = location.protocol == 'https:'
66
? 'wss://broker.hivemq.com:8884/mqtt'
77
: 'ws://broker.hivemq.com:8000/mqtt';
88
// const Delay = (ms, val) => new Promise(resolve => setTimeout(resolve, ms, val));
9-
const handleFetchError = r => r.ok || alert(`Error: ${r.statusText}`);
9+
// const handleFetchError = r => r.ok || alert(`Error: ${r.statusText}`);
1010
const LabelClass = 'text-sm truncate font-medium my-auto whitespace-nowrap';
1111
const BadgeClass = 'flex-inline text-sm rounded-md rounded px-2 py-0.5 ring-1 ring-inset';
1212
const InputClass = 'font-normal text-sm rounded w-full flex-1 py-0.5 px-2 text-gray-700 placeholder:text-gray-400 focus:outline-none disabled:cursor-not-allowed disabled:bg-gray-100 disabled:text-gray-500 rounded border';
@@ -21,21 +21,23 @@ const Colors = {
2121
let MqttClient;
2222

2323
const Help = () => html`
24-
<div class="p-2 w-96 text-slate-600 bg-slate-50 overflow-auto text-sm">
25-
<div>This is a simple demonstration of the functional device dashboard
24+
<div class="p-2 w-96 text-slate-600 bg-amber-100 overflow-auto text-sm">
25+
<div class="py-2">This is a simple demonstration of the functional device dashboard
2626
that manages a fleet of devices via an MQTT server. Source code
27-
is <a class="text-blue-600" href="https://github.com/cesanta/mongoose/tree/master/tutorials/mqtt/mqtt-dashboard">available on GitHub<//>.<//>
28-
<div class="py-1">
27+
is <a class="text-blue-600" href="https://github.com/cesanta/mongoose/tree/master/tutorials/mqtt/mqtt-dashboard">available on GitHub<//>.
28+
<//>
29+
<div class="py-2">
2930
For the sake of simplicity, this dashboard does not implement authentication.
3031
No external storage is used either to keep device list: for that, retained
3132
MQTT messages are utilised. When a device goes online, it publishes its
3233
state to the {root_topic}/{device_id}/status topic
3334
- LED status and firmware version.
3435
<//>
35-
<div class="py-1">
36+
<div class="py-2">
3637
The last will message triggers
3738
the "offline" message to the same topic. This is how this web page
3839
is able to track online/offline status of devices.
40+
<img src="mqtt.svg" alt="diagram" />
3941
<//>
4042
<div class="py-1">
4143
See developer console for the list of MQTT messages exchanged with

0 commit comments

Comments
 (0)