public inbox for ipfire-scm@lists.ipfire.org
 help / color / mirror / Atom feed
From: git@ipfire.org
To: ipfire-scm@lists.ipfire.org
Subject: [git.ipfire.org] IPFire 2.x development tree branch, next, updated. b18dba57de09607a047c75a5a704c48c060b7c3c
Date: Thu, 27 Feb 2014 13:37:59 +0100	[thread overview]
Message-ID: <20140227123800.5B2A220413@argus.ipfire.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 5862 bytes --]

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "IPFire 2.x development tree".

The branch, next has been updated
       via  b18dba57de09607a047c75a5a704c48c060b7c3c (commit)
       via  015e243b0dba4fb493fc92068eea3e97f37d3a0c (commit)
       via  e06986e85347213f20c48df8cdaf9c9eeb0b2359 (commit)
       via  480f354d894e212e9dd6f66936c2ca592e1c549b (commit)
      from  df6b9ebfbc36dd14de9159af1fbeab963c6dd7c9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit b18dba57de09607a047c75a5a704c48c060b7c3c
Merge: 015e243 e06986e
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date:   Thu Feb 27 13:37:53 2014 +0100

    Merge remote-tracking branch 'alfh/feature_graph_constant_color' into next

commit 015e243b0dba4fb493fc92068eea3e97f37d3a0c
Merge: df6b9eb 480f354
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date:   Thu Feb 27 13:36:38 2014 +0100

    Merge remote-tracking branch 'alfh/bugfix_openbox_center' into next

commit e06986e85347213f20c48df8cdaf9c9eeb0b2359
Author: Alf Høgemark <alf(a)i100.no>
Date:   Sat Feb 22 18:05:26 2014 +0100

    qos and process graphs: avoid random colors
    
    For the graphs for qos classes, and for process
    count and memory usage, the colors change on
    each page reload, since the colors are currently
    totally random.
    
    This change uses defined color indexes, 15 different
    ones, that should be enough for qos at least, and is
    enough for processes on my setup. This makes
    the colors consistent between page loads, so it makes
    it easier to monitor changes.
    
    Perhaps one should define 30 different colors meant
    to be used for graphing, then one could avoid random
    colors also for the sensor graphs, and make it less
    likely to get color collision for the process graphs
    as well. Defining 30 such colors is not part of this
    change.

commit 480f354d894e212e9dd6f66936c2ca592e1c549b
Author: Alf Høgemark <alf(a)i100.no>
Date:   Wed Feb 26 18:37:57 2014 +0100

    ipfire theme: Use div align for center
    
    Revert change to make openbox produce validating html,
    when center alignment for box is wanted.
    
    I have not been able to find css solution for
    properly aligning the div horisontally.

-----------------------------------------------------------------------

Summary of changes:
 config/cfgroot/graphs.pl                     | 19 +++++++++++++------
 html/html/themes/ipfire/include/functions.pl |  7 ++++++-
 2 files changed, 19 insertions(+), 7 deletions(-)

Difference in files:
diff --git a/config/cfgroot/graphs.pl b/config/cfgroot/graphs.pl
index 5a45ec9..cc00c66 100644
--- a/config/cfgroot/graphs.pl
+++ b/config/cfgroot/graphs.pl
@@ -422,12 +422,15 @@ sub updateprocessescpugraph {
 
 		push(@command,"COMMENT:".$Lang::tr{'caption'}."\\j");
 
+		my $colorIndex = 0;
 		foreach(@processesgraph){
+			my $colorIndex = 10 + $count % 15;
+			my $color="$color{\"color$colorIndex\"}";
 			chomp($_);my @name=split(/\-/,$_);chop($name[1]);
 			if ($count eq "0"){
-				push(@command,"AREA:".$name[1].random_hex_color(6)."A0:".$name[1]);
+				push(@command,"AREA:".$name[1].$color."A0:".$name[1]);
 			}else{
-				push(@command,"STACK:".$name[1].random_hex_color(6)."A0:".$name[1]);
+				push(@command,"STACK:".$name[1].$color."A0:".$name[1]);
 			}
 			$count++;
 		}
@@ -471,12 +474,15 @@ sub updateprocessesmemorygraph {
 
 		push(@command,"COMMENT:".$Lang::tr{'caption'}."\\j");
 
+		my $colorIndex = 0;
 		foreach(@processesgraph){
 			chomp($_);my @name=split(/\-/,$_);chop($name[1]);
+			my $colorIndex = 10 + $count % 15;
+			my $color="$color{\"color$colorIndex\"}";
 			if ($count eq "0"){
-				push(@command,"AREA:".$name[1].random_hex_color(6)."A0:".$name[1]);
+				push(@command,"AREA:".$name[1].$color."A0:".$name[1]);
 			}else{
-				push(@command,"STACK:".$name[1].random_hex_color(6)."A0:".$name[1]);
+				push(@command,"STACK:".$name[1].$color."A0:".$name[1]);
 			}
 			$count++;
 		}
@@ -983,17 +989,18 @@ sub updateqosgraph {
 		@classes = <FILE>;
 		close FILE;
 
+		my $colorIndex = 0;
 		foreach $classentry (sort @classes){
 			@classline = split( /\;/, $classentry );
 			if ( $classline[0] eq $qossettings{'DEV'} ){
-				$color=random_hex_color(6);
+				my $colorIndex = 10 + $count % 15;
+				$color="$color{\"color$colorIndex\"}";
 				push(@command, "DEF:$classline[1]=$mainsettings{'RRDLOG'}/class_$qossettings{'CLASSPRFX'}-$classline[1]_$qossettings{'DEV'}.rrd:bytes:AVERAGE");
 
 				if ($count eq "1") {
 					push(@command, "AREA:$classline[1]$color:$Lang::tr{'Class'} $classline[1] -".sprintf("%15s",$classline[8]));
 				} else {
 					push(@command, "STACK:$classline[1]$color:$Lang::tr{'Class'} $classline[1] -".sprintf("%15s",$classline[8]));
-
 				}
 
 				push(@command, "GPRINT:$classline[1]:MAX:%8.1lf %sBps"
diff --git a/html/html/themes/ipfire/include/functions.pl b/html/html/themes/ipfire/include/functions.pl
index 86b1b75..f71181e 100644
--- a/html/html/themes/ipfire/include/functions.pl
+++ b/html/html/themes/ipfire/include/functions.pl
@@ -238,7 +238,12 @@ sub openbox {
 	$align = $_[1];
 	$caption = $_[2];
 
-	print "<div class='post' style='text-align:$align;'>\n";
+	if($align eq 'center') {
+		print "<div class='post' align='center'>\n"
+	}
+	else {
+		print "<div class='post'>\n";
+	}
 
 	if ($caption) {
 		print "<h2>$caption</h2>\n";


hooks/post-receive
--
IPFire 2.x development tree

                 reply	other threads:[~2014-02-27 12:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140227123800.5B2A220413@argus.ipfire.org \
    --to=git@ipfire.org \
    --cc=ipfire-scm@lists.ipfire.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox