forked from flyve-mdm/glpi-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.js
More file actions
22 lines (20 loc) · 701 Bytes
/
config.js
File metadata and controls
22 lines (20 loc) · 701 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/**
*
*/
window.onload = function() {
$('#pluginFlyvemdm-mqtt-test').on('click', function() {
data = $("#pluginFlyvemdm-config input,#pluginFlyvemdm-config select").serialize();
posting = jQuery.post('../ajax/mqtt_test.php', data, 'json');
posting.done(function(data) {
var successIcon = ' OK';
var failIcon = ' KO';
var feedback = $.parseJSON(data);
if (feedback.status == "Test message sent") {
$('#pluginFlyvemdm-test-feedback').empty().append(successIcon);
} else {
$('#pluginFlyvemdm-test-feedback').empty().append(failIcon);
}
});
return false;
});
};