[INFO] Black graphs look better than white! :)

If you figure out how to do something interesting/cool in Cacti and want to share it with the community, please post your experience here.

Moderators: Moderators, Developers

Interface skinning?

YES!
117
80%
No. You're high.
29
20%
 
Total votes: 146

Author
Message
NxTek
Posts: 11
Joined: Fri Nov 14, 2003 4:36 pm

[INFO] Black graphs look better than white! :)

#1 Post by NxTek » Sat Dec 13, 2003 7:31 pm

Call me crazy but I like cool looking graphs :) .. This is a hack that most techies would know how to do, but it requires editing rrd.php. See attached.

Ian - PLEASE allow "skinning" of the Cacti interface. Some of us use the graphs for public view so presentation is important. :P
Attachments
load.gif
load.gif (9.51 KiB) Viewed 65121 times
NxTek Solutions Inc - www.nxtek.com

User avatar
egarnel
Cacti Pro User
Posts: 703
Joined: Thu Nov 21, 2002 8:55 am
Location: Austin, TX

changing graph background

#2 Post by egarnel » Mon Dec 15, 2003 9:59 am

I did a quick scan on my rrd.php, but did not see where to alter the graph background. Could you please provide a code sample?

Thanks

NxTek
Posts: 11
Joined: Fri Nov 14, 2003 4:36 pm

#3 Post by NxTek » Mon Dec 15, 2003 10:41 am

I added -

-c CANVAS#000000 -c FONT#FFFFFF -c BACK#000000

to the command line which runs rrdtool in rrd.php. If you need more help just let me know!
NxTek Solutions Inc - www.nxtek.com

User avatar
egarnel
Cacti Pro User
Posts: 703
Joined: Thu Nov 21, 2002 8:55 am
Location: Austin, TX

a guess

#4 Post by egarnel » Mon Dec 15, 2003 10:59 am

I am assuming it goes under function rrdtool_execute: under option 1

if ($log_command == true) {
log_data("CMD: " . read_config_option("path_rrdtool") . " $command_line" "-c CANVAS#000000 -c FONT#FFFFFF -c BACK#000000 ");
}

NxTek
Posts: 11
Joined: Fri Nov 14, 2003 4:36 pm

#5 Post by NxTek » Mon Dec 15, 2003 11:06 am

If memory serves, that's correct. Just make a backup. ;)

Did it work?
NxTek Solutions Inc - www.nxtek.com

User avatar
egarnel
Cacti Pro User
Posts: 703
Joined: Thu Nov 21, 2002 8:55 am
Location: Austin, TX

nope

#6 Post by egarnel » Mon Dec 15, 2003 11:08 am

Nope, graphs are gone.... rolling back

NxTek
Posts: 11
Joined: Fri Nov 14, 2003 4:36 pm

#7 Post by NxTek » Mon Dec 15, 2003 11:16 am

Here's mine -

Code: Select all

  /* basic graph options */
        $graph_opts .=   
                "--imgformat=" . $image_types{$graph["image_format_id"]} . RRD_NL .
                "--start=$graph_start" . RRD_NL .
                "-c CANVAS#000000 -c FONT#FFFFFF -c BACK#000000 --title=\"" . $graph["title_cache"] . "\"" . RRD_NL .
                "$rigid" .
                "--base=" . $graph["base_value"] . RRD_NL .   
                "--height=$graph_height" . RRD_NL .
                "--width=$graph_width" . RRD_NL .
                "$scale" .
                "$unit_exponent_value" .
                "$graph_legend" .
                "--vertical-label=\"" . $graph["vertical_label"] . "\"" . RRD_NL;
NxTek Solutions Inc - www.nxtek.com

User avatar
egarnel
Cacti Pro User
Posts: 703
Joined: Thu Nov 21, 2002 8:55 am
Location: Austin, TX

Sweet!

#8 Post by egarnel » Mon Dec 15, 2003 11:20 am

That did the trick! Thanks

NxTek
Posts: 11
Joined: Fri Nov 14, 2003 4:36 pm

#9 Post by NxTek » Mon Dec 15, 2003 11:24 am

Enjoy. :D
NxTek Solutions Inc - www.nxtek.com

breakbeatscience

nice

#10 Post by breakbeatscience » Tue Dec 16, 2003 5:58 pm

killer hack!! looks tight! Thanks

NxTek
Posts: 11
Joined: Fri Nov 14, 2003 4:36 pm

#11 Post by NxTek » Tue Dec 16, 2003 6:26 pm

Yes I agree.. ;) Thanks

Is Ian still alive? Any word on the possibility of skinning?
NxTek Solutions Inc - www.nxtek.com

User avatar
egarnel
Cacti Pro User
Posts: 703
Joined: Thu Nov 21, 2002 8:55 am
Location: Austin, TX

1 possible idea

#12 Post by egarnel » Wed Dec 17, 2003 3:42 pm

Check out http://phpsysinfo.sourceforge.net/ It is a skinable system info utility wrtten in php. Perhaps the code could be massaged and an applied to Cacti.. I will try it on a test box next week

NxTek
Posts: 11
Joined: Fri Nov 14, 2003 4:36 pm

#13 Post by NxTek » Thu Dec 18, 2003 1:54 pm

Cool.. I'd be very interested in hearing the results!
NxTek Solutions Inc - www.nxtek.com

raX
Lead Developer
Posts: 2237
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

#14 Post by raX » Tue Feb 03, 2004 7:53 pm

NxTek wrote:Yes I agree.. ;) Thanks

Is Ian still alive? Any word on the possibility of skinning?
I'm still around ;-) Were you thinking about skinning graphs or the entire Cacti user interface? Organizationally it would make sense to put the graph skinning functionality in with the graph templates. However I feel that users would object to this since they would probably want to make this kind of change globally. I suppose I could create a new tab under "Cacti Settings" that allowed users to specify various global graph options such as color, background image, etc.

What do you think?

-Ian

RandomWelshBloke
Posts: 33
Joined: Mon Feb 18, 2002 7:00 pm
Location: London, UK

Graph Skinning

#15 Post by RandomWelshBloke » Sun Feb 08, 2004 9:38 am

Having a global graph option in Cacti Settings that can allow graphs to be skinned is a great idea. By default all graphs would confirn to this, however, it would be cool, if possible, to over-ride this in the graph template section for specific instances.

As well as skinning font / colour, a link to a backgroud image would be great (especialy to give clients that special feeling) :lol:

As an aside, adding functionality like this to make it simple for users to contribute (and show off) can only help the community spirit for this exellent app.

Post Reply