Skip to content
This repository was archived by the owner on Aug 9, 2021. It is now read-only.

Commit 8a8b732

Browse files
committed
refactor(mqtt): refactor daemon and mqtt test button"
1 parent db8106a commit 8a8b732

File tree

7 files changed

+393
-380
lines changed

7 files changed

+393
-380
lines changed

ajax/mqtt_test.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,8 @@
3030
*/
3131

3232
// Needs to be removed if this entry point needs to autoload a class from the plugin.
33-
//$AJAX_INCLUDE = 1;
3433
include '../../../inc/includes.php';
3534

36-
//define("PLUGIN_FLYVEMDM_ROOT", $CFG_GLPI['root_doc'] . "/plugins/flyvemdm");
37-
3835
header("Content-Type: text/html; charset=UTF-8");
3936
Html::header_nocache();
4037
Session::checkLoginUser();
@@ -77,10 +74,9 @@
7774
echo '{"status" : "ko"}';
7875
exit();
7976
}
80-
$clientid = "flyvemdm-test";
8177
$mqttClient = PluginFlyvemdmMqttclient::getInstance();
8278
$statusMessage = 'Test message not sent';
8379
if ($mqttClient->sendTestMessage($address, $port, $isTls, $sslCiphers)) {
8480
$statusMessage = 'Test message sent';
8581
}
86-
echo json_encode(['status' => __($statusMessage, 'flyvemdm')], JSON_UNESCAPED_SLASHES);
82+
echo json_encode(['status' => __($statusMessage, 'flyvemdm')], JSON_UNESCAPED_SLASHES);

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
"sskaje/mqtt": "dev-master",
2727
"tufanbarisyildirim/php-apk-parser": "dev-master",
2828
"docopt/docopt": "^1.0",
29-
"twig/twig": "^1.0"
29+
"twig/twig": "^1.0",
30+
"monolog/monolog": "^1.23"
3031
},
3132
"require-dev": {
3233
"ext-bz2": "*",

config.js

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)