mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
SVG: ploteditor attribute from justme1968
git-svn-id: https://svn.fhem.de/fhem/trunk@5038 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
88f7aa1a8f
commit
31b466a382
@ -135,6 +135,7 @@ FHEMWEB_Initialize($)
|
|||||||
longpoll:0,1
|
longpoll:0,1
|
||||||
longpollSVG:1,0
|
longpollSVG:1,0
|
||||||
menuEntries
|
menuEntries
|
||||||
|
ploteditor:always,onClick,never
|
||||||
plotfork:1,0
|
plotfork:1,0
|
||||||
plotmode:gnuplot,gnuplot-scroll,SVG
|
plotmode:gnuplot,gnuplot-scroll,SVG
|
||||||
plotsize
|
plotsize
|
||||||
@ -2540,6 +2541,13 @@ FW_ActivateInform()
|
|||||||
is not used if the SVG has the attribute startDate defined.<br>
|
is not used if the SVG has the attribute startDate defined.<br>
|
||||||
</li><br>
|
</li><br>
|
||||||
|
|
||||||
|
<a name="ploteditor"></a>
|
||||||
|
<li>ploteditor<br>
|
||||||
|
Configures if the <a href="#plotEditor">Plot editor</a> should be shown
|
||||||
|
in the SVG detail view.
|
||||||
|
Can be set to always, onClick or never. Default is always.
|
||||||
|
</li><br>
|
||||||
|
|
||||||
<a name="plotfork"></a>
|
<a name="plotfork"></a>
|
||||||
<li>plotfork<br>
|
<li>plotfork<br>
|
||||||
If set, generate the logs in a parallel process. Note: do not use it
|
If set, generate the logs in a parallel process. Note: do not use it
|
||||||
@ -2696,7 +2704,7 @@ FW_ActivateInform()
|
|||||||
need some help from the #FileLog definition in the .gplot file: the
|
need some help from the #FileLog definition in the .gplot file: the
|
||||||
filter used there (second parameter) must either contain only the
|
filter used there (second parameter) must either contain only the
|
||||||
deviceName or have the form deviceName.event or deviceName.*. This is
|
deviceName or have the form deviceName.event or deviceName.*. This is
|
||||||
always the case when using the <a href="#weblinkEditor">Plot
|
always the case when using the <a href="#plotEditor">Plot
|
||||||
editor</a>. The SVG will be reloaded for <b>any</b> event triggered by
|
editor</a>. The SVG will be reloaded for <b>any</b> event triggered by
|
||||||
this deviceName.
|
this deviceName.
|
||||||
Default is off.
|
Default is off.
|
||||||
@ -3021,6 +3029,13 @@ FW_ActivateInform()
|
|||||||
Attribut startDate benutzt wird.<br>
|
Attribut startDate benutzt wird.<br>
|
||||||
</li><br>
|
</li><br>
|
||||||
|
|
||||||
|
<a name="ploteditor"></a>
|
||||||
|
<li>ploteditor<br>
|
||||||
|
Gibt an ob der <a href="#plotEditor">Plot Editor</a> in der SVG detail
|
||||||
|
ansicht angezeigt werden soll. Kann auf always, onClick oder never
|
||||||
|
gesetzt werden. Der Default ist always.
|
||||||
|
</li><br>
|
||||||
|
|
||||||
<a name="plotfork"></a>
|
<a name="plotfork"></a>
|
||||||
<li>plotfork<br>
|
<li>plotfork<br>
|
||||||
Normalerweise wird die Ploterstellung im Hauptprozess ausgeführt,
|
Normalerweise wird die Ploterstellung im Hauptprozess ausgeführt,
|
||||||
@ -3180,7 +3195,7 @@ FW_ActivateInform()
|
|||||||
Lädt SVG Instanzen erneut, falls ein Ereignis dessen Inhalt
|
Lädt SVG Instanzen erneut, falls ein Ereignis dessen Inhalt
|
||||||
ändert. Funktioniert nur, falls der dazugehörige #FileLog
|
ändert. Funktioniert nur, falls der dazugehörige #FileLog
|
||||||
Definition in der .gplot Datei folgenden Form hat: deviceName.Event
|
Definition in der .gplot Datei folgenden Form hat: deviceName.Event
|
||||||
bzw. deviceName.*. Wenn man den <a href="#weblinkEditor">Plot
|
bzw. deviceName.*. Wenn man den <a href="#plotEditor">Plot
|
||||||
Editor</a> benutzt, ist das übrigens immer der Fall. Die SVG Datei
|
Editor</a> benutzt, ist das übrigens immer der Fall. Die SVG Datei
|
||||||
wird bei <b>jedem</b> auslösenden Event dieses Gerätes neu
|
wird bei <b>jedem</b> auslösenden Event dieses Gerätes neu
|
||||||
geladen. Standard ist aus.
|
geladen. Standard ist aus.
|
||||||
|
@ -242,6 +242,10 @@ SVG_PEdit($$$$)
|
|||||||
{
|
{
|
||||||
my ($FW_wname,$d,$room,$pageHash) = @_;
|
my ($FW_wname,$d,$room,$pageHash) = @_;
|
||||||
|
|
||||||
|
my $pe = AttrVal($FW_wname, "ploteditor", "always");
|
||||||
|
|
||||||
|
return "" if( $pe eq 'never' );
|
||||||
|
|
||||||
my $ld = $defs{$d}{LOGDEVICE};
|
my $ld = $defs{$d}{LOGDEVICE};
|
||||||
my $ldt = $defs{$ld}{TYPE};
|
my $ldt = $defs{$ld}{TYPE};
|
||||||
|
|
||||||
@ -251,9 +255,22 @@ SVG_PEdit($$$$)
|
|||||||
my %conf = SVG_digestConf($cfg, $plot);
|
my %conf = SVG_digestConf($cfg, $plot);
|
||||||
|
|
||||||
my $ret = "<br>";
|
my $ret = "<br>";
|
||||||
$ret .= "<form method=\"$FW_formmethod\" autocomplete=\"off\" ".
|
|
||||||
|
my $pestyle = "";
|
||||||
|
if( $pe eq 'onClick' ) {
|
||||||
|
my $pgm = "Javascript:" .
|
||||||
|
"s=document.getElementById('pedit').style;".
|
||||||
|
"s.display = s.display=='none' ? 'block' : 'none';".
|
||||||
|
"s=document.getElementById('pdisp').style;".
|
||||||
|
"s.display = s.display=='none' ? 'block' : 'none';";
|
||||||
|
$ret .= "<a id=\"pdisp\" style=\"cursor:pointer\" onClick=\"$pgm\">Show Plot Editor</a>";
|
||||||
|
$pestyle = 'style="display:none"';
|
||||||
|
}
|
||||||
|
|
||||||
|
$ret .= "<form $pestyle id=\"pedit\" method=\"$FW_formmethod\" autocomplete=\"off\" ".
|
||||||
"action=\"$FW_ME/SVG_WriteGplot\">";
|
"action=\"$FW_ME/SVG_WriteGplot\">";
|
||||||
$ret .= FW_hidden("detail", $d);
|
$ret .= "Plot Editor";
|
||||||
|
$ret .= FW_hidden("gplotName", $gp);
|
||||||
$ret .= FW_hidden("gplotName", $gp);
|
$ret .= FW_hidden("gplotName", $gp);
|
||||||
$ret .= FW_hidden("logdevicetype", $ldt);
|
$ret .= FW_hidden("logdevicetype", $ldt);
|
||||||
$ret .= "<table class=\"block wide plotEditor\">";
|
$ret .= "<table class=\"block wide plotEditor\">";
|
||||||
@ -1768,9 +1785,10 @@ plotAsPng(@)
|
|||||||
|
|
||||||
<a name="plotEditor"></a>
|
<a name="plotEditor"></a>
|
||||||
<b>Plot-Editor</b>
|
<b>Plot-Editor</b>
|
||||||
<ul>
|
<br>
|
||||||
This editor is visible on the detail screen of the SVG instance.
|
This editor is visible on the detail screen of the SVG instance.
|
||||||
Most features are obvious here, up to some exceptions:
|
Most features are obvious here, up to some exceptions:
|
||||||
|
<ul>
|
||||||
<li>if you want to omit the title for a Diagram label, enter notitle in the
|
<li>if you want to omit the title for a Diagram label, enter notitle in the
|
||||||
input field.</li>
|
input field.</li>
|
||||||
<li>if you want to specify a fixed value (not taken from a column) if a
|
<li>if you want to specify a fixed value (not taken from a column) if a
|
||||||
@ -1786,6 +1804,8 @@ plotAsPng(@)
|
|||||||
Write .gplot file again<br>
|
Write .gplot file again<br>
|
||||||
</ul></li>
|
</ul></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
The visibility of the ploteditor can be configured with the FHEMWEB attribute
|
||||||
|
<a href="#ploteditor">ploteditor</a>.
|
||||||
<br>
|
<br>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -1915,7 +1935,8 @@ plotAsPng(@)
|
|||||||
Kurve(FileLog)
|
Kurve(FileLog)
|
||||||
<ul>
|
<ul>
|
||||||
<li>Fhem config:<br>
|
<li>Fhem config:<br>
|
||||||
<code>attr wl_1 label "Max $data{max1}, Current $data{currval1}"</code></li>
|
<code>attr wl_1 label "Max $data{max1}, Current
|
||||||
|
$data{currval1}"</code></li>
|
||||||
<li>Eintrag in der .gplot-Datei:<br>
|
<li>Eintrag in der .gplot-Datei:<br>
|
||||||
<code>set title <L1></code><br></li>
|
<code>set title <L1></code><br></li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -1950,7 +1971,8 @@ plotAsPng(@)
|
|||||||
</li>
|
</li>
|
||||||
<li>#DbLog <SPEC1><br>
|
<li>#DbLog <SPEC1><br>
|
||||||
mit:<br>
|
mit:<br>
|
||||||
<code>attr <SVGdevice> plotfunction "Garage_Raumtemp:temperature::"</code><br>
|
<code>attr <SVGdevice> plotfunction
|
||||||
|
"Garage_Raumtemp:temperature::"</code><br>
|
||||||
anstelle von:<br>
|
anstelle von:<br>
|
||||||
<code>#DbLog Garage_Raumtemp:temperature::</code>
|
<code>#DbLog Garage_Raumtemp:temperature::</code>
|
||||||
</li>
|
</li>
|
||||||
@ -1961,10 +1983,11 @@ plotAsPng(@)
|
|||||||
|
|
||||||
<a name="plotEditor"></a>
|
<a name="plotEditor"></a>
|
||||||
<b>Plot-Editor</b>
|
<b>Plot-Editor</b>
|
||||||
<ul>
|
<br>
|
||||||
Dieser Editor ist in der Detailansicht der SVG-Instanz zu sehen. Die
|
Dieser Editor ist in der Detailansicht der SVG-Instanz zu sehen. Die
|
||||||
meisten Features sind hier einleuchtend und bekannt, es gibt aber auch
|
meisten Features sind hier einleuchtend und bekannt, es gibt aber auch
|
||||||
einige Ausnahmen:
|
einige Ausnahmen:
|
||||||
|
<ul>
|
||||||
<li>wenn für ein Diagramm die Überschrift unterdrückt werden
|
<li>wenn für ein Diagramm die Überschrift unterdrückt werden
|
||||||
soll, muss im Eingabefeld <code>notitle</code> eingetragen werden.
|
soll, muss im Eingabefeld <code>notitle</code> eingetragen werden.
|
||||||
</li>
|
</li>
|
||||||
@ -1985,6 +2008,8 @@ plotAsPng(@)
|
|||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
Die sichtbarkeit des Plot-Editors kann mit dem FHEMWEB Attribut <a
|
||||||
|
href="#ploteditor">ploteditor</a> konfiguriert werden.
|
||||||
<br>
|
<br>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user