mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 03:06:37 +00:00
98_weekprofile: fix: html output for command get associations
git-svn-id: https://svn.fhem.de/fhem/trunk@21085 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
b3155f0467
commit
abf5cac518
@ -1,5 +1,6 @@
|
||||
# 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.
|
||||
- bugfix: 98_weekprofile: html output for command get associations
|
||||
- bugfix: msgSchema: change Typo LGTV_WebOS
|
||||
- bugfix: 88_HMCCU: Fixed next/return bug
|
||||
- feature: 93_DbRep: new option "deleteOther" for minValue/maxValue available
|
||||
|
@ -820,9 +820,17 @@ sub weekprofile_Get($$@)
|
||||
if($cmd eq "associations") {
|
||||
my $retType = 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 @json_arr = ();
|
||||
my $retHTML = "<table><thead><tr>";
|
||||
my @json_arr = ();
|
||||
my $retHTML = "<html><table><thead><tr>";
|
||||
$retHTML .= "<th width='150'><b>Device</b></th><th width='150'><b>Profile</b></th></tr>";
|
||||
$retHTML .= "<th> </th><th></th></tr>";
|
||||
$retHTML .= "</thead><tbody>";
|
||||
@ -848,7 +856,7 @@ sub weekprofile_Get($$@)
|
||||
foreach my $devname (@not_asso) {
|
||||
$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;
|
||||
if ($retType == 1) {
|
||||
my $json_text = undef;
|
||||
|
Loading…
x
Reference in New Issue
Block a user