Customize Tree

Addons for Cacti and discussion about those addons

Moderators: Developers, Moderators

Post Reply
User avatar
o_dupuis
Posts: 18
Joined: Fri Mar 18, 2005 12:55 pm
Location: Paris/France

Customize Tree

Post by o_dupuis »

Hi,
For large trees, not having colors make it difficult to read so I modified a bit one of the treeview js : $cacti_root/include
/treeview/ftiens4.js line 164 :

it was
docW = docW + this.desc + "</a>"

I modified it into
docW = docW + "<SPAN class='level"+this.level+"'>"+this.desc + "</span></a>"


Then I added the following styles in the main.css ($cacti_root/include)

.level1 {
font-weight: bold;
color: #000;
}

.level2 {
font-weight: bold;
}


.level3 {
color: #FF0000;
}

.level4 {
color: #009933;
}

.level5 {
color: #aaaa00;
}

The result is on the following image




Olivier
Attachments
tree.GIF
tree.GIF (4.09 KiB) Viewed 5565 times
boomboxnation
Posts: 25
Joined: Sun May 08, 2005 11:25 am

Thanks

Post by boomboxnation »

This really does make the tree view much much more clear. It should be submitted to the distribution...
Cliff Fogle
Sr. Network Engineer
Videoegg, Inc.
first_initial_last_name@videoegg.com
spignataro
Posts: 41
Joined: Mon Nov 07, 2005 11:21 pm

Post by spignataro »

thanks so much for this fix....i was looking to some how fix this....awsome
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest