[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: Developers, Moderators

Interface skinning?

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

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

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

Post by NxTek »

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 69612 times
NxTek Solutions Inc - www.nxtek.com
User avatar
egarnel
Cacti Pro User
Posts: 708
Joined: Thu Nov 21, 2002 8:55 am
Location: Austin, TX

changing graph background

Post by egarnel »

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

Post by NxTek »

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: 708
Joined: Thu Nov 21, 2002 8:55 am
Location: Austin, TX

a guess

Post by egarnel »

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

Post by NxTek »

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: 708
Joined: Thu Nov 21, 2002 8:55 am
Location: Austin, TX

nope

Post by egarnel »

Nope, graphs are gone.... rolling back
NxTek
Posts: 11
Joined: Fri Nov 14, 2003 4:36 pm

Post by NxTek »

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: 708
Joined: Thu Nov 21, 2002 8:55 am
Location: Austin, TX

Sweet!

Post by egarnel »

That did the trick! Thanks
NxTek
Posts: 11
Joined: Fri Nov 14, 2003 4:36 pm

Post by NxTek »

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

nice

Post by breakbeatscience »

killer hack!! looks tight! Thanks
NxTek
Posts: 11
Joined: Fri Nov 14, 2003 4:36 pm

Post by NxTek »

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: 708
Joined: Thu Nov 21, 2002 8:55 am
Location: Austin, TX

1 possible idea

Post by egarnel »

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

Post by NxTek »

Cool.. I'd be very interested in hearing the results!
NxTek Solutions Inc - www.nxtek.com
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

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

Post by RandomWelshBloke »

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

Who is online

Users browsing this forum: No registered users and 0 guests