[Pkg-ocaml-maint-commits] r6266 - in /trunk/tools/ocaml_transition_monitor: ocaml-status.css ocaml_transition_monitor.js ocaml_transition_monitor.mll
glondu-guest at users.alioth.debian.org
glondu-guest at users.alioth.debian.org
Thu Feb 26 16:54:18 UTC 2009
Author: glondu-guest
Date: Thu Feb 26 16:54:18 2009
New Revision: 6266
URL: http://svn.debian.org/wsvn/?sc=1&rev=6266
Log:
Add the possibility to filter by status
Added:
trunk/tools/ocaml_transition_monitor/ocaml_transition_monitor.js
Modified:
trunk/tools/ocaml_transition_monitor/ocaml-status.css
trunk/tools/ocaml_transition_monitor/ocaml_transition_monitor.mll
Modified: trunk/tools/ocaml_transition_monitor/ocaml-status.css
URL: http://svn.debian.org/wsvn/trunk/tools/ocaml_transition_monitor/ocaml-status.css?rev=6266&op=diff
==============================================================================
--- trunk/tools/ocaml_transition_monitor/ocaml-status.css (original)
+++ trunk/tools/ocaml_transition_monitor/ocaml-status.css Thu Feb 26 16:54:18 2009
@@ -14,6 +14,7 @@
}
div.status {
text-align: center;
+ margin-top: 1em;
}
div.status table a {
text-decoration: none;
Added: trunk/tools/ocaml_transition_monitor/ocaml_transition_monitor.js
URL: http://svn.debian.org/wsvn/trunk/tools/ocaml_transition_monitor/ocaml_transition_monitor.js?rev=6266&op=file
==============================================================================
--- trunk/tools/ocaml_transition_monitor/ocaml_transition_monitor.js (added)
+++ trunk/tools/ocaml_transition_monitor/ocaml_transition_monitor.js Thu Feb 26 16:54:18 2009
@@ -1,0 +1,21 @@
+/*
+ Copyright © 2009 Stéphane Glondu <steph at glondu.net>
+ Copyright © 2009 Mehdi Dogguy <dogguy at pps.jussieu.fr>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Dependencies: jquery.
+*/
+
+$(document).ready(function () {
+ function update () {
+ $("#count").html(" ("+$(".src").filter(":visible").length+")");
+ };
+ $("#good").click(function () { $(".src").filter(".good").parent().toggle(); update(); });
+ $("#bad").click(function () { $(".src").filter(".bad").parent().toggle(); update(); });
+ $("#unknown").click(function () { $(".src").filter(".unknown").parent().toggle(); update(); });
+ update();
+});
Modified: trunk/tools/ocaml_transition_monitor/ocaml_transition_monitor.mll
URL: http://svn.debian.org/wsvn/trunk/tools/ocaml_transition_monitor/ocaml_transition_monitor.mll?rev=6266&op=diff
==============================================================================
--- trunk/tools/ocaml_transition_monitor/ocaml_transition_monitor.mll (original)
+++ trunk/tools/ocaml_transition_monitor/ocaml_transition_monitor.mll Thu Feb 26 16:54:18 2009
@@ -220,7 +220,7 @@
let status = List.map (fun pkg -> (pkg, status pkg)) all_sources in
let all_sources = List.map
(fun (pkg, status) -> tr
- (td ~a:[a_class [string_of_status (source_status status)]]
+ (td ~a:[a_class [(string_of_status (source_status status))^" src"]]
[a ~a:[a_href (uri_of_string ("http://packages.qa.debian.org/"^pkg))] [pcdata pkg];
br ();
small [pcdata (sprintf "(%s)" ((M.find pkg sources_map).sversion))];
@@ -235,7 +235,7 @@
status
in
let summary = tablex
- ~thead:(thead (tr (th [pcdata "source"]) (List.map (fun arch -> th [pcdata arch]) architectures)) [])
+ ~thead:(thead (tr (th [pcdata "source"; span ~a:[a_id "count"] []]) (List.map (fun arch -> th [pcdata arch]) architectures)) [])
(match all_sources with x::xs -> tbody x xs | _ -> invalid_arg "there must be at least one package")
[]
in
@@ -260,8 +260,21 @@
pcdata ", from which I shamelessly copied this page's CSS.";
]] in
let html = html
- (head (title (pcdata page_title)) [link ~a:[a_rel [`Stylesheet]; a_href (uri_of_string "ocaml-status.css")] ()])
+ (head (title (pcdata page_title))
+ [link ~a:[a_rel [`Stylesheet]; a_href (uri_of_string "ocaml-status.css")] ();
+ script ~contenttype:"text/javascript" ~a:[a_src (uri_of_string "http://code.jquery.com/jquery-latest.js")] (pcdata "");
+ script ~contenttype:"text/javascript" ~a:[a_src (uri_of_string "ocaml_transition_monitor.js")] (pcdata "");
+ ])
(body [h1 [pcdata page_title];
+ div
+ [
+ pcdata "Filter by status:"; br ();
+ input ~a:[a_input_type `Checkbox; a_checked `Checked; a_id "good"] (); pcdata "good";
+ br ();
+ input ~a:[a_input_type `Checkbox; a_checked `Checked; a_id "bad"] (); pcdata "bad";
+ br ();
+ input ~a:[a_input_type `Checkbox; a_checked `Checked; a_id "unknown"] (); pcdata "unknown";
+ ];
div ~a:[a_class ["status"]] [summary];
div ~a:[a_class ["footer"]] footer])
in
More information about the Pkg-ocaml-maint-commits
mailing list