bwlabel height

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

Post Reply
User avatar
timi
Cacti User
Posts: 240
Joined: Wed Nov 09, 2005 8:35 am
Location: Timisoara, Romania
Contact:

bwlabel height

Post by timi »

how can i change the height of the bwlabel box ? i think right now its too big for me... or better to remove that box, if its possible
User avatar
streaker69
Cacti Pro User
Posts: 712
Joined: Mon Mar 27, 2006 10:35 am
Location: Psychic Amish Network Administrator

Post by streaker69 »

I believe that can be set by default from the editor.

You can also change it for each Link in the config file for you map.

BWLABEL 1 is the smallest. I believe that 2 is default.

Add BWLABEL and a # after each Link to change it per Link.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

streaker69 wrote:I believe that can be set by default from the editor.

You can also change it for each Link in the config file for you map.

BWLABEL 1 is the smallest. I believe that 2 is default.

Add BWLABEL and a # after each Link to change it per Link.
It's BWFONT 1 to make the smallest built-in font (2 is the default). You can make them smaller still by using DEFINEFONT and a truetype font.

To get rid of the labels completely: BWLABEL none either in the LINK DEFAULT section, or for individual links.
Weathermap 0.98a 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!)
User avatar
timi
Cacti User
Posts: 240
Joined: Wed Nov 09, 2005 8:35 am
Location: Timisoara, Romania
Contact:

Post by timi »

nope, bwlabel can be percent,bit... i can not change the height of the box :(, maybe that value is hardcoded in the scripts ...
User avatar
streaker69
Cacti Pro User
Posts: 712
Joined: Mon Mar 27, 2006 10:35 am
Location: Psychic Amish Network Administrator

Post by streaker69 »

Howie wrote:
streaker69 wrote:I believe that can be set by default from the editor.

You can also change it for each Link in the config file for you map.

BWLABEL 1 is the smallest. I believe that 2 is default.

Add BWLABEL and a # after each Link to change it per Link.
It's BWFONT 1 to make the smallest built-in font (2 is the default). You can make them smaller still by using DEFINEFONT and a truetype font.

To get rid of the labels completely: BWLABEL none either in the LINK DEFAULT section, or for individual links.
Oops, and I was just working with those yesterday, you'd think I'd have remembered that.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

streaker69 wrote: Oops, and I was just working with those yesterday, you'd think I'd have remembered that.
:-) I had to look it up. I haven't touched them for ages. I just cut & paste the top 30 or so lines for all my maps...
Weathermap 0.98a 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!)
User avatar
timi
Cacti User
Posts: 240
Joined: Wed Nov 09, 2005 8:35 am
Location: Timisoara, Romania
Contact:

Post by timi »

10q, i need the label, but i dont need that box around, or if i can get rid of it.. maybe you can tell me how to make a smaller one :)
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

timi wrote:10q, i need the label, but i dont need that box around, or if i can get rid of it.. maybe you can tell me how to make a smaller one :)
BWBOXCOLOR none
BWOUTLINECOLOR none

(maybe BWFONTCOLOR to make the label readable)

It's worth having at least a little look at the config reference, you know ;-)
Weathermap 0.98a 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!)
User avatar
timi
Cacti User
Posts: 240
Joined: Wed Nov 09, 2005 8:35 am
Location: Timisoara, Romania
Contact:

Post by timi »

yes but, i dont want the box to disappear :) i want it smaller :) keeping the same font, like in the image, i want to make the size of pinky box like
the size of the black box, thats what i want :),
Attachments
label.PNG
label.PNG (711 Bytes) Viewed 6751 times
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

timi wrote:yes but, i dont want the box to disappear :) i want it smaller :) keeping the same font, like in the image, i want to make the size of pinky box like
the size of the black box, thats what i want :),
OK. No, you can't do that without changing the code.

The reason is that there must be some 'slack' around the edge of the box to allow for different fonts. Some fonts report their pixel-size incorrectly.

The code you need to change is around line 1850 in Weathermap.class.php - just add a

Code: Select all

$y1=$y1+2; $y2=$y2-2;
or whatever you prefer.
timi wrote:or better to remove that box, if its possible
You changed the spec! ;-)
Last edited by Howie on Fri Nov 17, 2006 5:40 am, edited 1 time in total.
Weathermap 0.98a 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!)
User avatar
timi
Cacti User
Posts: 240
Joined: Wed Nov 09, 2005 8:35 am
Location: Timisoara, Romania
Contact:

Post by timi »

ok :P i changed the code a bit in weathermap.class.php :)

and why the $kilo is not 1024 and is 1000?
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

timi wrote:ok :P i changed the code a bit in weathermap.class.php :)

and why the $kilo is not 1024 and is 1000?
Because that's what kilo means for telcos on E1/T1, as far as I know.

MRTG is the same (1000 by default).

This is why some people now talk about kibibytes (for 1024*1024 bytes).
Weathermap 0.98a 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

Who is online

Users browsing this forum: No registered users and 1 guest