-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* mqtt check url connection * some updates * show success msg after connection with mqtt url * update getting mqtt url value * update mqtt naming * update check mqtt conn. to accept mqtt/mqtts * rename dashboard page * update `package-lock.json` --------- Co-authored-by: freds-dev <[email protected]>
- Loading branch information
Showing
6 changed files
with
404 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// import * as mqtt from "mqtt/dist/mqtt.min"; for web browser | ||
import * as mqtt from "mqtt"; // ES6 modules (https://github.com/mqttjs/MQTT.js#es6-modules-import) | ||
|
||
export async function checkMqttValidaty(mqttURL: string) { | ||
/* check mqtt url connection, | ||
it returns false if an issue occured while connecting to mqtt url | ||
*/ | ||
try { | ||
return await mqtt.connectAsync(mqttURL).then((e) => { | ||
return true; | ||
}); | ||
} catch (error) { | ||
return false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.