]> xenbits.xensource.com Git - people/aperard/emesinae.git/commitdiff
CGI: Reduce to prominence of missing control messages in the bug log
authorIan Campbell <ian.campbell@citrix.com>
Wed, 22 Jan 2014 13:12:27 +0000 (13:12 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Wed, 22 Jan 2014 13:12:27 +0000 (13:12 +0000)
CGI/message.pl
Emesinae/CGI/Message.pm
css/style.css

index 14ff97e9c37975417c8350cae97f9e85db3309ea..fb810c366a692a30e7eba920674fd30c719ca164 100755 (executable)
@@ -95,7 +95,7 @@ elsif ( $mode eq "normal" ) {
         -title => $c{TrackerName} . ": " . $title,
         -style => { 'src' => $c{StyleSheet} }
     );
-    format_html( $msg, SuppressControlReply => 0 );
+    format_html( $msg, AlwaysFull => 1 );
     print end_html;
 }
 elsif ( $mode eq "part" ) {
index d848451af5424cf70512c8a9cacaac8d6b9cc29e..52f0437f215d3bc3a88d4a563a9cb7c88ad79a34 100644 (file)
@@ -116,8 +116,8 @@ sub format_html ($;%) {
 
     my $bug = $attrs{Bug} || undef;
 
-    $attrs{SuppressControlReply} = 1
-      unless defined $attrs{SuppressControlReply};
+    $attrs{AllwaysFull} ||= 0;
+      #unless defined $attrs{AllWaysFull};
 
     print comment( "Message "
           . $m->{id} . ": "
@@ -133,13 +133,21 @@ sub format_html ($;%) {
 
     my @archives = archive_list( $m->{msgid} );
 
-    if ( $m->{msgtype} eq "control-reply" && $attrs{SuppressControlReply} ) {
+    if ( $m->{msgtype} eq "control-reply" && !$attrs{AlwaysFull} ) {
         print p (
             { -class => "controlreplylink" },
             "Control reply; (" . msglink( $m, "Full Text" ) . ")"
         ) . "\n";
         return;
     }
+    if ( $m->{msgtype} eq "control" && !$m->{present} && !$attrs{AlwaysFull} ) {
+        print p (
+            { -class => "missingcontrol" },
+            "Missing Control message: ".htmlsanit($m->{msgid})."; ".
+           "(Archives: " . join( ", ", @archives ) . ")"
+        ) . "\n";
+        return;
+    }
 
     print pre(
         { -class => "headers" },
index 8a8296888a434182499ca85b45ecfae67ba7bf7b..6a4c7d58feb2379bf99df5806254080a9fcde88a 100644 (file)
@@ -16,6 +16,12 @@ p.controlreplylink {
     color: #686868;
 }
 
+p.missingcontrol {
+    font-family: sans-serif;
+    font-size: 60%;
+    color: #686868;
+}
+
 p.bugcontrol {
     font-family: sans-serif;
     font-size: 60%;