Closed pautiina closed 5 years ago
Yes, it would seem that this commit https://github.com/howardjones/network-weathermap/commit/8a466469a87278b5a6dec77ddd7bfea8977257ac introduced the $info as an array but never defines any elements. As such, there is no key 'direction'. Changing the array()
to array('direction'=>'')
would resolve your issue temporarily, but I presume Howie just forgot to prime the direction when creating the object.
I presume he needs to add direction
as a parameter when creating the HTMLimagemapArea object or to the addArea
function of HTMLimagemap object.
I also think that he simply forgot. Created a issue to see it.
Hmm, it worked in my tests... I will investigate shortly. It should only be looking for 'direction' on things where it has been set (the link drawing code sets it).
Is there anything unusual about your map, @pautiina? (like one-way links etc)
No, I have all the usual parameters. Until the last commit everything worked well.
Approximately everything looks like this:
# Automatically generated by php-weathermap v1.0.0dev
TITLE ISTEC NETWORK
WIDTH 1900
HEIGHT 1800
HTMLSTYLE overlib
KEYFONT 3
KEYTEXTCOLOR 0 0 0
KEYOUTLINECOLOR 0 0 0
KEYBGCOLOR 255 255 255
BGCOLOR 255 255 255
TITLECOLOR 0 0 0
TIMECOLOR 0 0 0
# All settings for scale DEFAULT
SCALE DEFAULT 0 0 32 32 32
SCALE DEFAULT 0 10 255 255 255 0 0 255
SCALE DEFAULT 10 40 0 0 255 0 255 0
SCALE DEFAULT 40 55 0 255 0 255 255 0
SCALE DEFAULT 55 100 240 240 0 255 0 0
SCALE DEFAULT 100 110 255 0 0 139 0 0
# All settings for legend DEFAULT
KEYPOS DEFAULT 0 0 Traffic
KEYSTYLE DEFAULT horizontal 400
# All settings for scale cactiupdown
SCALE cactiupdown 0 0.5 192 192 192
SCALE cactiupdown 0.5 1.5 255 0 0
SCALE cactiupdown 1.5 2.5 0 0 255
SCALE cactiupdown 2.5 3.5 0 255 0
# All settings for scale IFSTATUS
SCALE IFSTATUS 0 1.5 0 255 0 Up
SCALE IFSTATUS 1.5 2.5 255 0 0 Down
SET key_hidezero_DEFAULT 1
# End of global section
# TEMPLATE-only NODEs:
NODE DEFAULT
LABELFONT 2
USESCALE cactiupdown in percent
MAXVALUE 100
# regular NODEs:
NODE IST_2
LABEL IST_2
OVERLIBGRAPH /cacti/graph_image.php?rra_id=0&graph_nolegend=true&graph_height=100&graph_width=300&local_graph_id=257
ICON images/Host.png
TARGET cactihost:4
POSITION 200 350
NODE SWITCH
LABEL SWITCH
ICON images/PAD.png
TARGET cactihost:527
POSITION 850 270
NODE GATE
LABEL GATE
OVERLIBGRAPH /cacti/graph_image.php?rra_id=0&graph_nolegend=true&graph_height=50&graph_width=150&local_graph_id=3728 /cacti/graph_image.php?rra_id=0&graph_nolegend=true&graph_height=50&graph_width=150&local_graph_id=3729 /cacti/graph_image.php?rra_id=0&graph_nolegend=true&graph_height=50&graph_width=150&local_graph_id=3730 /cacti/graph_image.php?rra_id=0&graph_nolegend=true&graph_height=50&graph_width=150&local_graph_id=3731 /cacti/graph_image.php?rra_id=0&graph_nolegend=true&graph_height=50&graph_width=150&local_graph_id=3732 /cacti/graph_image.php?rra_id=0&graph_nolegend=true&graph_height=50&graph_width=150&local_graph_id=3733 /cacti/graph_image.php?rra_id=0&graph_nolegend=true&graph_height=50&graph_width=150&local_graph_id=3734 /cacti/graph_image.php?rra_id=0&graph_nolegend=true&graph_height=50&graph_width=150&local_graph_id=3735 /cacti/graph_image.php?rra_id=0&graph_nolegend=true&graph_height=50&graph_width=150&local_graph_id=3736 /cacti/graph_image.php?rra_id=0&graph_nolegend=true&graph_height=50&graph_width=150&local_graph_id=3737 /cacti/graph_image.php?rra_id=0&graph_nolegend=true&graph_height=50&graph_width=150&local_graph_id=3738 /cacti/graph_image.php?rra_id=0&graph_nolegend=true&graph_height=50&graph_width=150&local_graph_id=3739
ICON images/Router.png
TARGET cactihost:751
POSITION 650 200
# TEMPLATE-only LINKs:
LINK DEFAULT
ARROWSTYLE compact
BWFONT 1
BWLABELPOS 65 35
BANDWIDTH 1000M
LINK GATE-CORE-SWITCH
WIDTH 4
INFOURL /cacti/graph.php?rra_id=all&local_graph_id=3743
OVERLIBGRAPH /cacti/graph_image.php?rra_id=0&graph_nolegend=true&graph_height=100&graph_width=300&local_graph_id=3743
TARGET /var/www/cacti/rra/751/3741.rrd
NODES GATE CORE-SWITCH
BANDWIDTH 10000M
It was simpler than that - I only committed half of the change! Should be working now. There are also now tests to check for the original issue (INNOTES being ignored).
I did wonder, as I've done that so many times!
The problem is not solved, as before, this error jumps out.
It doesn't for me... I'll make a fresh install and retest.
On Mon, 17 Sep 2018, 08:51 Alex, notifications@github.com wrote:
The problem is not solved, as before, this error jumps out.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/howardjones/network-weathermap/issues/154#issuecomment-421918422, or mute the thread https://github.com/notifications/unsubscribe-auth/AA3sJRpzI9ssBCSwCFvX20jlhvBo0b9Mks5ub1RwgaJpZM4Wow3O .
While I did this way:
if (isset($area->info['direction']) and $area->info['direction'] == $dir) {
And do your NOTES/OVERLIBGRAPH all actually work if you do that? The fact that the info entry is missing makes me think that they won't. Anything which has overlib stuff attached should have the direction.
OVERLIBGRAPH - does not work
@netniV can you test this bug on you system?
I haven’t setup weather maps yet on my test systems, guess I should do. I’ll try over the weekend.
Thanks
Fixed on some latest commit but NOTES/OVERLIBGRAPH not working
How about now? I've just spent a couple of hours going through the imagemap code...
on last commit I have forbiden
I commented all the lines in the file: output / .htaccess and now it works.
OVERLIBGRAPH also working:
OK - so the new map display thing shouldn't be fetching files directly from the output/ directory. That needs to be fixed.
Opened #163 to track that.
This issue fixed
https://github.com/howardjones/network-weathermap/blob/d081cc176e291c73dcfecd8f8c064d0d30fbacb2/lib/Weathermap/Core/Map.php#L1270