Weathermap LABEL question

Support questions about the Network Weather Map plugin

Moderators: Moderators, Developers

Post Reply
Author
Message
StarLog
Cacti User
Posts: 150
Joined: Sat Jun 02, 2007 3:57 pm

Weathermap LABEL question

#1 Post by StarLog » Mon May 23, 2016 12:37 pm

I want to have a NODE with more LABEL, instead of one line, I want it vertical.

Like below


Cisco 3945
BCYF98653
GM87654

How can I do this?
Cacti v0.8.8a
Weathermap 9.7a
--------------------

User avatar
Howie
Cacti Guru User
Posts: 5333
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Weathermap LABEL question

#2 Post by Howie » Mon May 23, 2016 3:47 pm

Right now, you use three nodes. The way I'd do it:

Create one node using a box icon and a label, then two more for the other lines of the label. Then use LABELOUTLINECOLOR none and LABELBGCOLOR none. That way the box icon will make it appear as a single node label, and you can adjust the size and position of everything. You can use relative positioning too, so that the two extra lines follow the 'main' node around when it is moved.

Code: Select all

NODE main
   POSITION 100 100
   ICON 60 60 box
   LABELOUTLINECOLOR none
   LABELFBGCOLOR none
   AICONFILLCOLOR 255 255 255
   AICONOUTLINECOLOR 0 0 0
   LABEL Line2

NODE sub1
   POSITION main 0 -16
   LABEL Line1
   LABELOUTLINECOLOR none
   LABELBGCOLOR none

NODE sub2
   POSITION main 0 16
   LABEL Line3
   LABELOUTLINECOLOR none
   LABELBGCOLOR none

The reason that there isn't an option to support multiline labels is that freetype's support for font metrics (the measurements of the characters) is not very good for vertical measurements, and absolutely terrible for text at an angle other than 0 degrees (which weathermap uses in a few places). I did try it some time ago, and ran into problems - there were bugs open for years in the freetype and gd bug database regarding this problem.
Attachments
weathermap.png
weathermap.png (1.56 KiB) Viewed 1187 times
Weathermap 0.98 is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)

Post Reply