[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [OSSTEST PATCH 22/26] Executive: Break out span_colour



No functional change.

Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 Osstest/Executive.pm | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/Osstest/Executive.pm b/Osstest/Executive.pm
index 0be27b64..1b1cdc36 100644
--- a/Osstest/Executive.pm
+++ b/Osstest/Executive.pm
@@ -59,7 +59,8 @@ BEGIN {
                       db_pg_dsn opendb opendb_state
                       db_schema_updates_applied db_schema_updates_intree
                       );
-    %EXPORT_TAGS = ( colours => [qw($green $red $yellow $purple $blue)] );
+    %EXPORT_TAGS = ( colours => [qw($green $red $yellow $purple $blue
+                                   span_colour)] );
 
     @EXPORT_OK   = @{ $EXPORT_TAGS{colours} };
 }
@@ -306,6 +307,11 @@ our $grey_pale= '#666666';
 our $grey_mid=  '#888888';
 our $grey_dark= '#cccccc';
 
+sub span_colour ($) {
+    my ($colour) = @_;
+    "<span style=\"background-color: $colour\">"
+}
+
 sub report_run_getinfo ($) {
     # $f is a joined flight/job row, must contain at least
     #    flight job status
@@ -345,7 +351,7 @@ END
                $summary .= " $fs->{status}";
                $colour = $failcolour;
            }
-           push @content, "<span style=\"background-color: $colour\">".
+           push @content, span_colour($colour).
                encode_entities($summary)."</span>";
         }
        if (!@content) {
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.