mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
98_weekprofile: fix: html output for command get associations
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@21085 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
3ee26fcc05
commit
043d4ee35d
1
CHANGED
1
CHANGED
@ -1,5 +1,6 @@
|
|||||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||||
# Do not insert empty lines here, update check depends on it.
|
# Do not insert empty lines here, update check depends on it.
|
||||||
|
- bugfix: 98_weekprofile: html output for command get associations
|
||||||
- bugfix: msgSchema: change Typo LGTV_WebOS
|
- bugfix: msgSchema: change Typo LGTV_WebOS
|
||||||
- bugfix: 88_HMCCU: Fixed next/return bug
|
- bugfix: 88_HMCCU: Fixed next/return bug
|
||||||
- feature: 93_DbRep: new option "deleteOther" for minValue/maxValue available
|
- feature: 93_DbRep: new option "deleteOther" for minValue/maxValue available
|
||||||
|
@ -820,9 +820,17 @@ sub weekprofile_Get($$@)
|
|||||||
if($cmd eq "associations") {
|
if($cmd eq "associations") {
|
||||||
my $retType = 1;
|
my $retType = 1;
|
||||||
$retType = $params[0] if(@params >= 1);
|
$retType = $params[0] if(@params >= 1);
|
||||||
|
# html only if FHEMWEB and canAsyncOutput
|
||||||
|
if (defined($hash->{CL})) {
|
||||||
|
$retType = ($hash->{CL}{TYPE} eq "FHEMWEB" && $hash->{CL}{canAsyncOutput}) ? $retType : 1;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$retType = 1;
|
||||||
|
}
|
||||||
|
# dumpData($hash,"(Get): asso",$hash->{CL}) if defined($hash->{CL});
|
||||||
my @not_asso = ();
|
my @not_asso = ();
|
||||||
my @json_arr = ();
|
my @json_arr = ();
|
||||||
my $retHTML = "<table><thead><tr>";
|
my $retHTML = "<html><table><thead><tr>";
|
||||||
$retHTML .= "<th width='150'><b>Device</b></th><th width='150'><b>Profile</b></th></tr>";
|
$retHTML .= "<th width='150'><b>Device</b></th><th width='150'><b>Profile</b></th></tr>";
|
||||||
$retHTML .= "<th> </th><th></th></tr>";
|
$retHTML .= "<th> </th><th></th></tr>";
|
||||||
$retHTML .= "</thead><tbody>";
|
$retHTML .= "</thead><tbody>";
|
||||||
@ -848,7 +856,7 @@ sub weekprofile_Get($$@)
|
|||||||
foreach my $devname (@not_asso) {
|
foreach my $devname (@not_asso) {
|
||||||
$retHTML .= "<tr><td style='text-align:left'>$devname</td><td style='text-align:center'></td></tr>";
|
$retHTML .= "<tr><td style='text-align:left'>$devname</td><td style='text-align:center'></td></tr>";
|
||||||
}
|
}
|
||||||
$retHTML.= "</tbody></table>";
|
$retHTML.= "</tbody></table></html>";
|
||||||
my $ret = $retHTML;
|
my $ret = $retHTML;
|
||||||
if ($retType == 1) {
|
if ($retType == 1) {
|
||||||
my $json_text = undef;
|
my $json_text = undef;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user