Less logging noise.

Wed, 15 Jan 2020 10:46:08 +0100

author
Michiel Broek <mbroek@mbse.eu>
date
Wed, 15 Jan 2020 10:46:08 +0100
changeset 593
e0230bf4ac3f
parent 592
56f9be07906a
child 594
5e3611bf0dc2

Less logging noise.

www/cmd_ispindel.php file | annotate | diff | comparison | revisions
www/js/mon_ispindel.js file | annotate | diff | comparison | revisions
--- a/www/cmd_ispindel.php	Sun Jan 12 12:24:22 2020 +0100
+++ b/www/cmd_ispindel.php	Wed Jan 15 10:46:08 2020 +0100
@@ -17,13 +17,13 @@
 	$sql .= "' WHERE uuid='" . $_POST['uuid'] . "';";
 } else if (isset($_POST['mode'])) {
 	$sql  = "UPDATE `mon_ispindels` SET mode='" .$_POST['mode'] . "' WHERE uuid='" . $_POST['uuid'] . "';";
+} else {
+	syslog(LOG_NOTICE, "cmd_ispindel: unknown POST");
 }
 
 $result = mysqli_query($connect, $sql);
 if (! $result) {
 	syslog(LOG_NOTICE, "cmd_ispindel: result: ".mysqli_error($connect));
-} else {
-	syslog(LOG_NOTICE, "cmd_ispindel: updated record ".$_POST['uuid']);
 }
 echo $result;
 ?>
--- a/www/js/mon_ispindel.js	Sun Jan 12 12:24:22 2020 +0100
+++ b/www/js/mon_ispindel.js	Wed Jan 15 10:46:08 2020 +0100
@@ -238,11 +238,10 @@
   }
  });
  $('#info_mode').on('change', function(event) {
-  var args = event.args;
-  if (args) {
-   record.mode = args.item.value;
+  if (event.args) {
+   record.mode = event.args.item.value;
+   newMode = true;
   }
-  newMode = true;
  });
 
  // The chart button.

mercurial