mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-21 01:46:08 +00:00
92_FileLog: att logtype text:linesInTheFile (Forum #133932)
git-svn-id: https://svn.fhem.de/fhem/trunk@27743 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
4fd153f8a6
commit
6904be6d4c
@ -591,6 +591,15 @@ FileLog_fhemwebFn($$$$)
|
||||
}
|
||||
my ($lt, $name) = split(":", $ln);
|
||||
$name = $lt if(!$name);
|
||||
if($ln eq "text:linesInTheFile") {
|
||||
my $path = qx(dirname $defs{$d}{currentlogfile});
|
||||
chomp $path;
|
||||
my $filename = "$path/$f";
|
||||
my ($err, @content) =
|
||||
FileRead( {(FileName => $filename, ForceType => "FILE" )} );
|
||||
$name = "$lt (".scalar(@content).")";
|
||||
@content = ();
|
||||
}
|
||||
$ret .= FW_pH("$FW_ME/FileLog_logWrapper&dev=$d&type=$lt&file=$f",
|
||||
"<div class=\"dval\">$name</div>", 1, "dval", 1);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user