From 54395e0be06cb94a65d25041f657836241e23b60 Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 29 Dec 2010 03:12:19 +0000 Subject: [PATCH 1/1] torrus skinning improvements, RT#10574 --- torrus/FREESIDE_INSTALL | 45 ++++++++++++++++++++++++++++++++---- torrus/sup/webplain/torrus.css | 46 ++++++++++++++++++++++--------------- torrus/templates/default-rrd.html | 12 +++++++--- torrus/templates/html-incblocks.txt | 33 ++++---------------------- 4 files changed, 83 insertions(+), 53 deletions(-) diff --git a/torrus/FREESIDE_INSTALL b/torrus/FREESIDE_INSTALL index fa4984851..7432c0048 100644 --- a/torrus/FREESIDE_INSTALL +++ b/torrus/FREESIDE_INSTALL @@ -2,10 +2,47 @@ i should move to the wiki once this is further along aptitude install rrdtool librrds-perl libxml-libxml-perl libberkeleydb-perl libtemplate-perl libproc-daemon-perl libnet-snmp-perl libapache-session-perl libjson-perl +# in Makefile, set TORRUS_ENABLED = 1 make configure-torrus -make install-torrus +make deploy -#(and for the apache config) -# in Makefile, set TORRUS_ENABLED = 1 -make install-apache +#a little more one-offy from here so far + +http://torrus.org/install.pod.html#configuring_torrus : +which isn't enough to start from scratch +http://torrus.org/userguide.pod.html is better +torrus genddx and torrus devdisover + +cd /usr/local/etc/torrus/discovery +vi routers.txt #space-delimted router ip addresses +torrus genddx \ + --hostfile=routers.txt \ + --domain=example.com \ + --community=community_string \ + --out=routers.ddx \ + --discout=routers.xml +torrus devdiscover --in=routers.ddx + +mkdir /srv/torrus/collector_rrd +chown freeside:freeside /srv/torrus/collector_rrd + +torrus compile --tree=main --verbose + +torrus bs --global --verbose + +#XXX database config (before collector start) + +#launch data collector +#XXX add to init +torrus collector --tree=main + +skip http://torrus.org/install.pod.html#apache_http_server_configuration +and http://torrus.org/install.pod.html#access_control_lists + +but do go from http://torrus.org/install.pod.html#cron_job on + + +#--- +this seems to be required on restarts during dev (upgrades?) +rm /var/torrus/cache/* /var/torrus/db/render_cache.db diff --git a/torrus/sup/webplain/torrus.css b/torrus/sup/webplain/torrus.css index a20e008d5..3bb973c4b 100644 --- a/torrus/sup/webplain/torrus.css +++ b/torrus/sup/webplain/torrus.css @@ -4,13 +4,14 @@ Modified by Ian Holsman Optimised by Stanislav Sinyagin - $Id: torrus.css,v 1.1 2010-12-27 00:04:04 ivan Exp $ + $Id: torrus.css,v 1.2 2010-12-29 03:12:19 ivan Exp $ */ BODY { - background-color : white; - color : #333; - font-family : verdana, arial, helvetica, sans-serif; +/* background-color : white; */ +/* color : #333; */ +/* font-family : verdana, arial, helvetica, sans-serif; font-size : 11px; +*/ margin : 0; padding-bottom : 0; padding-left : 0; @@ -54,30 +55,35 @@ P { clear : both; /* needed for Opera 6.12 */ color : #333; float : none; - font-size : 11px; + /* font-size : 11px; */ line-height : 20px; } A { background-color : inherit; - color : #09c; - font-weight : 600; - text-decoration : none; + /* color : #09c; */ + /* font-weight : 600; */ + /* text-decoration : none; */ } A:link, A:visited { background-color : inherit; - color : #09c; + /* color : #09c; */ + color: #000000; } A:hover { - background-color : #eee; - color : inherit; +/* background-color : #eee; */ +/* color : inherit; */ + color: #7e0079; + text-decoration: underline; } DIV.CurrentPath A:hover { - background-color : #ccc; - color : inherit; +/* background-color : #ccc; */ +/* color : inherit; */ + color: #7e0079; + text-decoration: underline; } @@ -153,10 +159,14 @@ DIV.CurrentTime { DIV.PathMenu { background-color : #eee; - border-bottom : 1px dashed #999; +/* border-bottom : 1px dashed #999; border-left : 1px dashed #999; border-right : 1px dashed #999; - border-top : 1px dashed #999; + border-top : 1px dashed #999; */ + border-bottom : none; + border-left : none; + border-right : none; + border-top : 1px solid $7e0079; color : inherit; float : left; line-height : 17px; @@ -245,7 +255,7 @@ SPAN.MonitorName { DIV.Listing { clear : both; float : none; - font-size : 11px; +/* font-size : 11px; */ margin-bottom : 10px; width : 90%; } @@ -480,7 +490,7 @@ SPAN.LoginInput INPUT.Remember { *.SearchDialog { - font-size : 9px; +/* font-size : 9px; */ padding-bottom : 0; padding-left : 2em; padding-right : 2em; @@ -492,7 +502,7 @@ SPAN.LoginInput INPUT.Remember { } *.SearchDialog INPUT { - font-size : 9px; +/* font-size : 9px; */ } diff --git a/torrus/templates/default-rrd.html b/torrus/templates/default-rrd.html index cfbdbce8d..496410a33 100644 --- a/torrus/templates/default-rrd.html +++ b/torrus/templates/default-rrd.html @@ -1,9 +1,15 @@ [% PROCESS 'html-incblocks.txt' %] [% INCLUDE setdate %] -[% INCLUDE htmlstart title='Graphs for ' _ path(token) printpath=1 %] - [% parentComment = nodeParam(parent(token),'comment') %] -[% IF parentComment %]

Graphs for [% xmlnorm(parentComment) %]

[% END %] +[% IF parentComment; + INCLUDE htmlstart title='Graphs for ' _ xmlnorm(parentComment); + ELSE; + INCLUDE htmlstart title='Graphs for ' _ path(token) printpath=1; + END; +%] + + + %]

Graphs for [% xmlnorm(parentComment) %]

[% END %] [% INCLUDE variables %] diff --git a/torrus/templates/html-incblocks.txt b/torrus/templates/html-incblocks.txt index 6108d1a60..c5de4ab72 100644 --- a/torrus/templates/html-incblocks.txt +++ b/torrus/templates/html-incblocks.txt @@ -1,5 +1,5 @@ [%# - $Id: html-incblocks.txt,v 1.3 2010-12-27 18:11:56 ivan Exp $ + $Id: html-incblocks.txt,v 1.4 2010-12-29 03:12:19 ivan Exp $ All BLOCK statements are defined here %] @@ -24,29 +24,6 @@ window.open('[%url(token) _ '&view=helptext-html'%]','helpwindow', //--> -
- -[% IF siteInfo %] - -[% siteInfo %] - -[% END %] - -[% IF treeName and treeInfo %] - -[% treeInfo %] - -[% END %] - -[% IF userAuth and uid; - commonname = userAttr('cn'); - IF commonname == ''; commonname = uid; END; %] -
-[% commonname %] -Logout -
-[% END %] -
[% timestamp %]
[% IF printpath %]
@@ -158,10 +135,10 @@ window.open('[%url(token) _ '&view=helptext-html'%]','helpwindow', title="Permanent link to this page"%] [% INCLUDE shortcut url=url('SS') text="Tokensets" title="List of non-empty tokensets"%] -[% INCLUDE shortcut url=url(token,view,'MEDIA','printer','OVS',ovs) - text="Printable view" - title="Prepare this page for printing" - newwindow=1%] +[%# INCLUDE shortcut url=url(token,view,'MEDIA','printer','OVS',ovs) + # text="Printable view" + # title="Prepare this page for printing" + # newwindow=1%] [% IF mayDisplayReports(); INCLUDE shortcut url=reportsUrl text="Reports" -- 2.11.0