2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-19 18:56:03 +00:00

95_Dashboard: fixes a bug causing devices with internal attribute group to not being shown in the dashboard

git-svn-id: https://svn.fhem.de/fhem/trunk@12225 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
talkabout 2016-09-30 23:51:51 +00:00
parent 6b1a9a9b99
commit b65f56aaf7
2 changed files with 8 additions and 4 deletions

View File

@ -1,5 +1,7 @@
# 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: 95_Dashboard: fixes an issue causing devices with interal attribute
group to not appear in the dashboard.
- bugfix: 93_DbRep: include day before and next in calculation if Timestamp - bugfix: 93_DbRep: include day before and next in calculation if Timestamp
is exactly 'YYYY-MM-DD 00:00:00' is exactly 'YYYY-MM-DD 00:00:00'
- feature: 93_DbRep: Internal "LASTCMD" added, - feature: 93_DbRep: Internal "LASTCMD" added,

View File

@ -596,9 +596,9 @@ sub BuildDashboardTab($$)
if (@index > 0) { if (@index > 0) {
for (my $j=0; $j<@index;$j++) { for (my $j=0; $j<@index;$j++) {
my $groupname = @groups[$index[$j]]; my $groupname = @groups[$index[$j]];
$groupname .= ':' . 'group=' . $groupname; $groupname .= '$$$' . 'group=' . $groupname;
if (@stabgroup > 1) { if (@stabgroup > 1) {
$groupname .= ':' . $stabgroup[1]; $groupname .= '$$$' . $stabgroup[1];
} }
push(@tabdevicegroups,$groupname); push(@tabdevicegroups,$groupname);
} }
@ -609,7 +609,7 @@ sub BuildDashboardTab($$)
# add sortings for groups not already having a defined sorting # add sortings for groups not already having a defined sorting
for (my $i=0;$i<@tabdevicegroups;$i++) { for (my $i=0;$i<@tabdevicegroups;$i++) {
my @stabgroup = split(":", trim($tabdevicegroups[$i])); my @stabgroup = split(/\$\$\$/, trim($tabdevicegroups[$i]));
my $matchGroup = "," . quotemeta(trim($stabgroup[0])) . ","; my $matchGroup = "," . quotemeta(trim($stabgroup[0])) . ",";
if ($tabsortings !~ m/$matchGroup/) { if ($tabsortings !~ m/$matchGroup/) {
@ -717,7 +717,7 @@ sub BuildGroupWidgets($$$$$) {
foreach my $singlegroup (@devicegroups) { foreach my $singlegroup (@devicegroups) {
# make sure that splitting with colon is not destroying the devspec that might # make sure that splitting with colon is not destroying the devspec that might
# also contain a colon followed by a filter # also contain a colon followed by a filter
my ($groupname, $groupdevices, $groupicon) = split(/:(?!FILTER=)/, $singlegroup); my ($groupname, $groupdevices, $groupicon) = split(/\$\$\$/, $singlegroup);
my @values = ($groupdevices, $groupicon); my @values = ($groupdevices, $groupicon);
$groups{$groupname} = \@values; $groups{$groupname} = \@values;
@ -989,6 +989,8 @@ GetActiveTab ($)
1; 1;
=pod =pod
=item summary Dashboard for showing multiple devices sorted in tabs
=item summary_DE Dashboard zur Anzeige mehrerer Geräte in verschiedenen Tabs
=begin html =begin html
<a name="Dashboard"></a> <a name="Dashboard"></a>