UNDEFINED changes

git-svn-id: https://fhem.svn.sourceforge.net/svnroot/fhem/trunk/fhem@519 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2009-12-21 18:03:56 +00:00
parent bf8d44356e
commit ec743ec845
20 changed files with 101 additions and 64 deletions

View File

@@ -148,8 +148,9 @@ FW_Read($)
my @clientsock = sockaddr_in($clientinfo[1]);
my %nhash;
my $cname = "FHEMWEB:". inet_ntoa($clientsock[1]) .":".$clientsock[0];
$nhash{NR} = $devcount++;
$nhash{NAME} = "FHEMWEB:". inet_ntoa($clientsock[1]) .":".$clientsock[0];
$nhash{NAME} = $cname;
$nhash{FD} = $clientinfo[0]->fileno();
$nhash{CD} = $clientinfo[0]; # sysread / close won't work on fileno
$nhash{TYPE} = "FHEMWEB";
@@ -157,6 +158,7 @@ FW_Read($)
$nhash{SNAME} = $name;
$nhash{TEMPORARY} = 1; # Don't want to save it
$nhash{BUF} = "";
$attr{$cname}{room} = "hidden";
$defs{$nhash{NAME}} = \%nhash;
$selectlist{$nhash{NAME}} = \%nhash;
@@ -1391,6 +1393,10 @@ FW_showWeblink($$$)
if($t eq "link") {
pO "<td><a href=\"$v\">$d</a></td>\n";
} elsif($t eq "image") {
pO "<td><img src=\"$v\"><br><a href=\"$__ME?detail=$d\">$d</a></td>\n";
} elsif($t eq "fileplot") {
my @va = split(":", $v, 3);
if(@va != 3 || !$defs{$va[0]} || !$defs{$va[0]}{currentlogfile}) {

View File

@@ -21,10 +21,11 @@ weblink_Define($$)
{
my ($hash, $def) = @_;
my ($type, $name, $wltype, $link) = split("[ \t]+", $def, 4);
my %thash = ( link=>1, fileplot=>1 );
my %thash = ( link=>1, fileplot=>1, image=>1 );
if(!$link || !$thash{$wltype}) {
return "Usage: define <name> weblink [" . join("|",sort keys %thash) . "] <httplink>";
return "Usage: define <name> weblink [" .
join("|",sort keys %thash) . "] <arg>";
}
$hash->{WLTYPE} = $wltype;
$hash->{LINK} = $link;

View File

@@ -28,7 +28,7 @@ set y2label "Temperature in C"
set ylabel "Humidity (%)"
#FileLog 4:T:0:
#FileLog 6:T:0:
#FileLog 6:H:0:
plot \
"< awk '/T:/ {print $1, $4}' <IN>"\