2
0
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:
rudolfkoenig 2018-12-23 10:15:22 +00:00
parent 96de3fc36f
commit bc55258866
2 changed files with 8 additions and 3 deletions

View File

@ -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";
}
}

View File

@ -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