Skip to content

Commit c4a3cbd

Browse files
committed
added comments in scripts
1 parent 2db73e8 commit c4a3cbd

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

src/scripts/App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ App.prototype.on_connected = function () {
120120
}
121121

122122
/**
123-
* Do this just after mqtt client got `connected`
123+
* Do this just after mqtt client got `disconnected`
124124
*/
125125
App.prototype.on_disconnected = function () {
126126
this.ui.set_broker_badge_disconnected();

src/scripts/Config.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,7 @@ Config.prototype.is_string = function (object_) {
4444
}
4545

4646
/**
47-
* Checks if it is a `File` or an `URL` (string)
48-
*
49-
* `URL` (can be on server-side or on client-local-side)
47+
* Depending on the typo of `this.file_or_url` it will trigger the loading of the file content
5048
*/
5149
Config.prototype.get_config = function () {
5250
if (this.is_file(this.file_or_url)) {
@@ -68,7 +66,7 @@ Config.prototype.is_string = function (object_) {
6866
}
6967

7068
/**
71-
* 1. Fetches `json text content` from `this.file_or_url` and attaches callback for `fail`, `done`
69+
* 1. Fetches `json text content` from `this.file_or_url` (as URL string) and attaches callback for `fail`, `done`
7270
* 2. Fills `this.data` object
7371
*/
7472
Config.prototype.get_json_from_url = function () {
@@ -111,7 +109,7 @@ Config.prototype.get_json_from_url = function () {
111109
}
112110

113111
/**
114-
* 1. It assumes `this.file_or_url` is of type `File`
112+
* 1. It assumes `this.file_or_url` is of type `File` (already selected by the user via input-form)
115113
* 2. Reads client-side file
116114
* 3. Fills `this.data` object
117115
*/

src/scripts/MqttClientHandler.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ class MqttClientHandler {
2828
}
2929

3030
/**
31-
* Creates mqtt-client, connects to broker and attaches callbaks for mqtt-client-events (connected, disconnected, onmessage)
31+
* Creates mqtt-client, connects to broker and attaches callbaks for mqtt-client-events
32+
* (on_connected, on_disconnected, on_message, on_error, on_reconnecting)
3233
*
3334
* NOTE: mqtt port for websockets: commonly 9001
3435
*

src/scripts/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/**
2-
* Load bootstrap js
2+
* Load bootstrapjs
33
*/
44
import 'bootstrap'
55

66
/**
7-
* Load predefined css colors and styles
7+
* Load bootstrapjs predefined css colors and styles
88
*/
99
import 'bootstrap/dist/css/bootstrap.min.css'
1010

0 commit comments

Comments
 (0)