mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-23 08:36:24 +00:00
fhem.pl: finetuning of attr grouping (Forum #119289)
git-svn-id: https://svn.fhem.de/fhem/trunk@23903 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
5b854a4b9e
commit
6c2dd3050b
@ -1441,7 +1441,11 @@ FW_detailSelect(@)
|
|||||||
{
|
{
|
||||||
my ($d, $cmd, $list, $param, $typeHash) = @_;
|
my ($d, $cmd, $list, $param, $typeHash) = @_;
|
||||||
return "" if(!$list || $FW_hiddenroom{input});
|
return "" if(!$list || $FW_hiddenroom{input});
|
||||||
my @al = map { s/:.*//; $_ } split(" ", $list);
|
my @al = sort {
|
||||||
|
my $ta = $typeHash->{$a} ? $typeHash->{$a}.$a : $a;
|
||||||
|
my $tb = $typeHash->{$b} ? $typeHash->{$b}.$b : $b;
|
||||||
|
$ta cmp $tb;
|
||||||
|
} map { s/:.*//; $_ } split(" ", $list);
|
||||||
|
|
||||||
my $selEl = (defined($al[0]) ? $al[0] : " ");
|
my $selEl = (defined($al[0]) ? $al[0] : " ");
|
||||||
$selEl = $1 if($list =~ m/([^ ]*):slider,/); # promote a slider if available
|
$selEl = $1 if($list =~ m/([^ ]*):slider,/); # promote a slider if available
|
||||||
|
16
fhem/fhem.pl
16
fhem/fhem.pl
@ -281,8 +281,8 @@ $selectTimestamp = gettimeofday();
|
|||||||
$cvsid = '$Id$';
|
$cvsid = '$Id$';
|
||||||
|
|
||||||
my $AttrList = "alias comment:textField-long eventMap:textField-long ".
|
my $AttrList = "alias comment:textField-long eventMap:textField-long ".
|
||||||
"group room suppressReading userReadings:textField-long ".
|
"group room suppressReading userattr ".
|
||||||
"verbose:0,1,2,3,4,5 userattr";
|
"userReadings:textField-long verbose:0,1,2,3,4,5 ";
|
||||||
|
|
||||||
my $currcfgfile=""; # current config/include file
|
my $currcfgfile=""; # current config/include file
|
||||||
my $currlogfile; # logfile, without wildcards
|
my $currlogfile; # logfile, without wildcards
|
||||||
@ -388,6 +388,12 @@ my @attrList = qw(
|
|||||||
timestamp-on-change-reading
|
timestamp-on-change-reading
|
||||||
);
|
);
|
||||||
$readingFnAttributes = join(" ", @attrList);
|
$readingFnAttributes = join(" ", @attrList);
|
||||||
|
my %framework_attrList = map { $_ => 1 } @attrList;
|
||||||
|
map { $framework_attrList{$_} = 1 } (
|
||||||
|
"ignore",
|
||||||
|
"disable",
|
||||||
|
"disabledForIntervals"
|
||||||
|
);
|
||||||
|
|
||||||
my %ra = (
|
my %ra = (
|
||||||
"suppressReading" => { s=>"\n" },
|
"suppressReading" => { s=>"\n" },
|
||||||
@ -2747,7 +2753,9 @@ getAllAttr($;$$)
|
|||||||
return if(!defined($v));
|
return if(!defined($v));
|
||||||
$list .= " " if($list);
|
$list .= " " if($list);
|
||||||
$list .= $v;
|
$list .= $v;
|
||||||
map { s/:.*//; $typeHash->{$_} = $type } split(" ",$v) if($typeHash);
|
map { s/:.*//;
|
||||||
|
$typeHash->{$_} = $framework_attrList{$_} ? "framework" : $type }
|
||||||
|
split(" ",$v) if($typeHash);
|
||||||
};
|
};
|
||||||
|
|
||||||
&$add($AttrList, "global");
|
&$add($AttrList, "global");
|
||||||
@ -2764,7 +2772,7 @@ getAllAttr($;$$)
|
|||||||
$v =~ s/\n/ /g;
|
$v =~ s/\n/ /g;
|
||||||
&$add($v, $type);
|
&$add($v, $type);
|
||||||
};
|
};
|
||||||
$nl2space->($attr{global}{userattr}, "Global userattr");
|
$nl2space->($attr{global}{userattr}, "global userattr");
|
||||||
$nl2space->($attr{$d}{userattr}, "Device userattr") if($attr{$d});
|
$nl2space->($attr{$d}{userattr}, "Device userattr") if($attr{$d});
|
||||||
return $list;
|
return $list;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user