Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


[INFO] Black graphs look better than white! :)
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    Cacti Forum Index -> Informational/HOWTO's

Interface skinning?
YES!
80%
 80%  [ 73 ]
No. You're high.
19%
 19%  [ 18 ]
Total Votes : 91

Author Message
NxTek



Joined: 14 Nov 2003
Posts: 11

PostPosted: Sat Dec 13, 2003 7:31 pm    Post subject: [INFO] Black graphs look better than white! :) Reply with quote

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.



load.gif
 Description:
 Filesize:  9.51 KB
 Viewed:  12334 Time(s)

load.gif


Back to top
egarnel
Cacti Pro User


Joined: 21 Nov 2002
Posts: 630
Location: Austin, TX

PostPosted: Mon Dec 15, 2003 9:59 am    Post subject: changing graph background Reply with quote

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
Back to top
NxTek



Joined: 14 Nov 2003
Posts: 11

PostPosted: Mon Dec 15, 2003 10:41 am    Post subject: Reply with quote

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!
Back to top
egarnel
Cacti Pro User


Joined: 21 Nov 2002
Posts: 630
Location: Austin, TX

PostPosted: Mon Dec 15, 2003 10:59 am    Post subject: a guess Reply with quote

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 ");
}
Back to top
NxTek



Joined: 14 Nov 2003
Posts: 11

PostPosted: Mon Dec 15, 2003 11:06 am    Post subject: Reply with quote

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

Did it work?
Back to top
egarnel
Cacti Pro User


Joined: 21 Nov 2002
Posts: 630
Location: Austin, TX

PostPosted: Mon Dec 15, 2003 11:08 am    Post subject: nope Reply with quote

Nope, graphs are gone.... rolling back
Back to top
NxTek



Joined: 14 Nov 2003
Posts: 11

PostPosted: Mon Dec 15, 2003 11:16 am    Post subject: Reply with quote

Here's mine -
Quote:
Code:

  /* 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;
Back to top
egarnel
Cacti Pro User


Joined: 21 Nov 2002
Posts: 630
Location: Austin, TX

PostPosted: Mon Dec 15, 2003 11:20 am    Post subject: Sweet! Reply with quote

That did the trick! Thanks
Back to top
NxTek



Joined: 14 Nov 2003
Posts: 11

PostPosted: Mon Dec 15, 2003 11:24 am    Post subject: Reply with quote

Enjoy.
Back to top
breakbeatscience
Guest





PostPosted: Tue Dec 16, 2003 5:58 pm    Post subject: nice Reply with quote

killer hack!! looks tight! Thanks
Back to top
NxTek



Joined: 14 Nov 2003
Posts: 11

PostPosted: Tue Dec 16, 2003 6:26 pm    Post subject: Reply with quote

Yes I agree.. Thanks

Is Ian still alive? Any word on the possibility of skinning?
Back to top
egarnel
Cacti Pro User


Joined: 21 Nov 2002
Posts: 630
Location: Austin, TX

PostPosted: Wed Dec 17, 2003 3:42 pm    Post subject: 1 possible idea Reply with quote

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
Back to top
NxTek



Joined: 14 Nov 2003
Posts: 11

PostPosted: Thu Dec 18, 2003 1:54 pm    Post subject: Reply with quote

Cool.. I'd be very interested in hearing the results!
Back to top
raX
Lead Developer


Joined: 13 Oct 2001
Posts: 2234
Location: Carlisle, PA

PostPosted: Tue Feb 03, 2004 7:53 pm    Post subject: Reply with quote

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
Back to top
RandomWelshBloke



Joined: 18 Feb 2002
Posts: 33
Location: London, UK

PostPosted: Sun Feb 08, 2004 9:38 am    Post subject: Graph Skinning Reply with quote

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)

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.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Informational/HOWTO's All times are GMT - 5 Hours
Goto page 1, 2, 3  Next
Page 1 of 3

 



Powered by phpBB © 2001, 2005 phpBB Group