mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 06:39:11 +00:00
10_MQTT2_DEVICE.pm: some graphviz changes (Forum #91394)
git-svn-id: https://svn.fhem.de/fhem/trunk@18033 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
96de3fc36f
commit
bc55258866
@ -530,6 +530,7 @@ MQTT2_DEVICE_nlData($)
|
||||
}
|
||||
}
|
||||
|
||||
my $div = ($FW_userAgent =~ m/WebKit/ ? "<br>" : " ");
|
||||
my $gv = ReadingsVal($d, ".graphviz", ReadingsVal($d, "graphviz", ""));
|
||||
for my $l (split(/[\r\n]/, $gv)) {
|
||||
|
||||
@ -555,8 +556,8 @@ MQTT2_DEVICE_nlData($)
|
||||
$h{$n}{class}="zwBox";
|
||||
}
|
||||
|
||||
$v =~ s/[{}]//;
|
||||
$v =~ s/\|/<br>/g;
|
||||
$v =~ s/[{}]//g;
|
||||
$v =~ s/\|/$div/g;
|
||||
$h{$n}{txt} = $nv;
|
||||
|
||||
$h{$n}{title} = $v;
|
||||
@ -564,8 +565,9 @@ MQTT2_DEVICE_nlData($)
|
||||
my @a;
|
||||
$h{$n}{neighbors} = \@a;
|
||||
|
||||
} elsif($l =~ m/^\s*"([^"]+)"\s*->\s*"([^"]+)"/) {
|
||||
} elsif($l =~ m/^\s*"([^"]+)"\s*->\s*"([^"]+)"\s\[label="([^"]*)"/) {
|
||||
push @{$h{$1}{neighbors}}, $2;
|
||||
$h{$1}{title} .= "${div}lqi:$3";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -147,6 +147,9 @@ zw_draw(fnRet, width, height)
|
||||
}
|
||||
zw_adjustLines(h, o.name);
|
||||
});
|
||||
$("svg.zw_nr g text").click(function(){
|
||||
location.href = FW_root+"?detail="+$(this).text();
|
||||
});
|
||||
}
|
||||
|
||||
function
|
||||
|
Loading…
Reference in New Issue
Block a user