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

[lintian] 01/01: reporting: Show tag freq. on tag pages



This is an automated email from the git hooks/post-receive script.

nthykier pushed a commit to branch master
in repository lintian.

commit 50ee45432ac9dc0cb99e03e68d2a787b5a6470ff
Author: Niels Thykier <niels@thykier.net>
Date:   Sun Feb 9 17:47:26 2014 +0100

    reporting: Show tag freq. on tag pages
    
    Signed-off-by: Niels Thykier <niels@thykier.net>
---
 debian/changelog             | 4 ++++
 reporting/html_reports       | 5 +++++
 reporting/templates/tag.tmpl | 4 +++-
 3 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index d6c1405..ca08807 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -29,6 +29,10 @@ lintian (2.5.22) UNRELEASED; urgency=medium
     + [NT] Fix typo of HARNESS_STATE_DIR config variable.
   * reporting/harness:
     + [NT] Avoid writing state-cache during dry-run.
+  * reporting/{html_reports,templates/tag.tmpl}:
+    + [NT] Show the same statistics on the tag page as shown
+      on the tag index pages.  Thanks to Guillem Jover for
+      the suggestion. (Closes: #738349)
   * reporting/html_reports:
     + [NT] Link to the library API docs from the index page.
       (Closes: #639974)
diff --git a/reporting/html_reports b/reporting/html_reports
index dcaaea4..608a145 100755
--- a/reporting/html_reports
+++ b/reporting/html_reports
@@ -568,6 +568,11 @@ for my $tag (sort $profile->tags(1)) {
         tags        => $by_tag{$tag},
         graphs      => $GRAPHS,
         graphs_days => $GRAPHS_RANGE_DAYS,
+        statistics  => {
+            count       => $count,
+            overrides   => $overrides,
+            total       => $count + $overrides,
+        },
     );
     output_template("tags/$tag.html", $templates{$tmpl}, \%maint_data);
 }
diff --git a/reporting/templates/tag.tmpl b/reporting/templates/tag.tmpl
index 44bcccd..180a7cb 100644
--- a/reporting/templates/tag.tmpl
+++ b/reporting/templates/tag.tmpl
@@ -19,7 +19,9 @@
         $OUT .= qq(    src="../graphs/tags/$tag.svg" alt="History of $tag"\n);
         $OUT .= qq(    /></div>\n);
     }
-    '';
+    $OUT .= qq(<p>Emitted (non-overridden): $statistics{count}, );
+    $OUT .= qq(overridden: $statistics{overrides}, );
+    $OUT .= qq(total: $statistics{total}</p>);
 }
 
   <p>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git


Reply to: