From 8e141d3c59345c8fc905f47798872374a50189f3 Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Thu, 20 Jan 2022 19:44:28 +0000 Subject: [PATCH] notify/FileLog: add a visual notifyRegepCheck (Forum #125381) git-svn-id: https://svn.fhem.de/fhem/trunk@25523 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/91_notify.pm | 2 ++ fhem/FHEM/92_FileLog.pm | 2 ++ fhem/www/pgm2/fhemweb.js | 24 ++++++++++++++++++++++++ 3 files changed, 28 insertions(+) diff --git a/fhem/FHEM/91_notify.pm b/fhem/FHEM/91_notify.pm index 40924d6bc..8cf424575 100644 --- a/fhem/FHEM/91_notify.pm +++ b/fhem/FHEM/91_notify.pm @@ -275,6 +275,8 @@ notify_fhemwebFn($$$$) $ret .= ""; } } + $ret .= ''; my @et = devspec2array("TYPE=eventTypes"); if(!@et) { diff --git a/fhem/FHEM/92_FileLog.pm b/fhem/FHEM/92_FileLog.pm index bf20b8d53..22385644e 100644 --- a/fhem/FHEM/92_FileLog.pm +++ b/fhem/FHEM/92_FileLog.pm @@ -566,6 +566,8 @@ FileLog_fhemwebFn($$$$) # DETAIL only from here on my $hash = $defs{$d}; + $ret .= ''; $ret .= "
Regexp parts"; $ret .= "
"; my @ra = split(/\|/, $hash->{REGEXP}); diff --git a/fhem/www/pgm2/fhemweb.js b/fhem/www/pgm2/fhemweb.js index db09a1b90..fc5c047bf 100644 --- a/fhem/www/pgm2/fhemweb.js +++ b/fhem/www/pgm2/fhemweb.js @@ -2130,6 +2130,30 @@ FW_getSVG(emb) return undefined; } +function +FW_checkNotifydev(reName) +{ + var internals={}; + $("table.internals tr td div.dname").each(function(){ + internals[$(this).html()] = this; + }); + if(!internals[reName] || internals.NOTIFYDEV) + return; + $(internals[reName]) + .html(reName+" (!)") + .css("cursor","pointer") + .click(function(){ + var val = $(internals[reName]).closest("tr").find("div[informid]").text(); + FW_okDialog("Could not optimize the regexp:How I tried (notifyRegexpCheck):"); + FW_cmd(FW_root+'?cmd={notifyRegexpCheck("'+val+'")}&XHR=1', + function(res){ + $("#FW_okDialog pre").html(res); + }); + + }); +} + /* =pod