mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 23:06:37 +00:00
feature: use modul alias as title for HTML/Text output if no other title provided
git-svn-id: https://svn.fhem.de/fhem/trunk@6599 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
de02ccb29d
commit
1d7e84246b
@ -30,7 +30,7 @@ package main;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
my $VERSION = "1.8.0";
|
||||
my $VERSION = "1.8.1";
|
||||
|
||||
use constant {
|
||||
PERL_VERSION => "perl_version",
|
||||
@ -1839,9 +1839,10 @@ sub SYSMON_ShowValuesHTML ($;@)
|
||||
# (optional) Liste der anzuzeigenden Werte (ReadingName[:Comment:[Postfix]],...)
|
||||
# Beispiel: define sysv weblink htmlCode {SYSMON_ShowValuesHTML('sysmon', ('date:Datum', 'cpu_temp:CPU Temperatur: °C', 'cpu_freq:CPU Frequenz: MHz'))}
|
||||
#------------------------------------------------------------------------------
|
||||
sub SYSMON_ShowValuesHTMLTitled ($$;@)
|
||||
sub SYSMON_ShowValuesHTMLTitled ($;$@)
|
||||
{
|
||||
my ($name, $title, @data) = @_;
|
||||
$title = $attr{$name}{'alias'} unless $title;
|
||||
return SYSMON_ShowValuesFmt($name, $title, 1, @data);
|
||||
}
|
||||
|
||||
@ -1864,9 +1865,10 @@ sub SYSMON_ShowValuesText ($;@)
|
||||
# (optional) Liste der anzuzeigenden Werte (ReadingName[:Comment:[Postfix]],...)
|
||||
# Beispiel: define sysv weblink htmlCode {SYSMON_ShowValuesText('sysmon', ('date:Datum', 'cpu_temp:CPU Temperatur: °C', 'cpu_freq:CPU Frequenz: MHz'))}
|
||||
#------------------------------------------------------------------------------
|
||||
sub SYSMON_ShowValuesTextTitled ($$;@)
|
||||
sub SYSMON_ShowValuesTextTitled ($;$@)
|
||||
{
|
||||
my ($name, $title, @data) = @_;
|
||||
$title = $attr{$name}{'alias'} unless $title;
|
||||
return SYSMON_ShowValuesFmt($name, $title, 0, @data);
|
||||
}
|
||||
|
||||
@ -2675,16 +2677,16 @@ If one (or more) of the multiplier is set to zero, the corresponding readings is
|
||||
<code>define sysv1 weblink htmlCode {SYSMON_ShowValuesHTML('sysmon')}</code><br>
|
||||
<code>define sysv2 weblink htmlCode {SYSMON_ShowValuesHTML('sysmon', ('date:Datum', 'cpu_temp:CPU Temperatur: °C', 'cpu_freq:CPU Frequenz: MHz'))}</code>
|
||||
</ul><br>
|
||||
<b>Text output method (see Weblink): SYSMON_ShowValuesHTMLTitled(<SYSMON-Instance>,<Title>[,<Liste>])</b><br><br>
|
||||
<b>Text output method (see Weblink): SYSMON_ShowValuesHTMLTitled(<SYSMON-Instance>[,<Title>,<Liste>])</b><br><br>
|
||||
<ul>
|
||||
According to SYSMON_ShowValuesHTML, but with a Title text above.<br>
|
||||
According to SYSMON_ShowValuesHTML, but with a Title text above. If no title provided, device alias will be used (if any)<br>
|
||||
</ul><br>
|
||||
|
||||
<b>Text output method (see Weblink): SYSMON_ShowValuesText(<SYSMON-Instance>[,<Liste>])</b><br><br>
|
||||
<ul>
|
||||
According to SYSMON_ShowValuesHTML, but formatted as plain text.<br>
|
||||
</ul><br>
|
||||
<b>Text output method (see Weblink): SYSMON_ShowValuesTextTitled(<SYSMON-Instance>,<Title>[,<Liste>])</b><br><br>
|
||||
<b>Text output method (see Weblink): SYSMON_ShowValuesTextTitled(<SYSMON-Instance>[,<Title>,<Liste>])</b><br><br>
|
||||
<ul>
|
||||
According to SYSMON_ShowValuesHTMLTitled, but formatted as plain text.<br>
|
||||
</ul><br>
|
||||
@ -3223,9 +3225,9 @@ If one (or more) of the multiplier is set to zero, the corresponding readings is
|
||||
<code>define sysv2 weblink htmlCode {SYSMON_ShowValuesHTML('sysmon', ('date:Datum', 'cpu_temp:CPU Temperatur: °C', 'cpu_freq:CPU Frequenz: MHz'))}</code>
|
||||
</ul><br>
|
||||
|
||||
<b>HTML-Ausgabe-Methode (für ein Weblink): SYSMON_ShowValuesHTMLTitled(<SYSMON-Instance>,<Title>[,<Liste>])</b><br><br>
|
||||
<b>HTML-Ausgabe-Methode (für ein Weblink): SYSMON_ShowValuesHTMLTitled(<SYSMON-Instance>[,<Title>,<Liste>])</b><br><br>
|
||||
<ul>
|
||||
Wie SYSMON_ShowValuesHTML, aber mit einer Überschrift darüber.<br>
|
||||
Wie SYSMON_ShowValuesHTML, aber mit einer Überschrift darüber. Wird keine Überschrift angegeben, wird alias des Moduls genutzt (falls definiert).<br>
|
||||
</ul><br>
|
||||
|
||||
|
||||
@ -3234,7 +3236,7 @@ If one (or more) of the multiplier is set to zero, the corresponding readings is
|
||||
Analog SYSMON_ShowValuesHTML, jedoch formatiert als reines Text.<br>
|
||||
</ul><br>
|
||||
|
||||
<b>HTML-Ausgabe-Methode (für ein Weblink): SYSMON_ShowValuesTextTitled(<SYSMON-Instance>,<Title>[,<Liste>])</b><br><br>
|
||||
<b>HTML-Ausgabe-Methode (für ein Weblink): SYSMON_ShowValuesTextTitled(<SYSMON-Instance>[,<Title>,<Liste>])</b><br><br>
|
||||
<ul>
|
||||
Wie SYSMON_ShowValuesText, aber mit einer Überschrift darüber.<br>
|
||||
</ul><br>
|
||||
|
Loading…
x
Reference in New Issue
Block a user