~ubuntu-branches/ubuntu/trusty/ben/trusty-proposed

« back to all changes in this revision

Viewing changes to frontends/ben_monitor.ml

  • Committer: Package Import Robot
  • Author(s): Iain Lane
  • Date: 2012-07-04 17:48:11 UTC
  • Revision ID: package-import@ubuntu.com-20120704174811-4tx07unrkx9kk7hc
Tags: 0.6.1ubuntu1
* Apply Ubuntu customisations
  - Link to Launchpad instead of Debian resources
  - Show Ubuntu logo
  - Allow configs to request the Packages/Sources files are not redownloaded
    (so that we can download once and for all at the start)
* Recommend edos-debcheck 

Show diffs side-by-side

added added

removed removed

Lines of Context:
536
536
let escape = Netencoding.Url.encode
537
537
 
538
538
let pts src =
539
 
  a_link (sprintf "http://packages.qa.debian.org/%s" (escape src)) src
540
 
 
541
 
let buildd show src =
542
 
  if show
543
 
  then a_link
544
 
    (sprintf "https://buildd.debian.org/status/package.php?p=%s" src)
545
 
    "buildd"
546
 
  else small [ pcdata "arch:all" ]
547
 
 
548
 
let rc_bugs src =
549
 
  a_link
550
 
    (sprintf
551
 
       "http://bugs.debian.org/cgi-bin/pkgreport.cgi?sev-inc=serious;sev-inc=grave;sev-inc=critical;src=%s"
552
 
       src)
553
 
    "RC bugs"
554
 
 
555
 
let changelog src dir =
 
539
  a_link (sprintf "http://launchpad.net/ubuntu/+source/%s" (escape src)) src
 
540
 
 
541
let buildd src vers =
 
542
  a_link (sprintf "http://launchpad.net/ubuntu/+source/%s/%s" (escape src)
 
543
    (escape vers)) "build logs"
 
544
 
 
545
let changelog src dir pkg =
556
546
  small [ a_link
557
 
    (sprintf "http://packages.debian.org/changelogs/%s/current/changelog" dir)
 
547
    (sprintf "http://changelogs.ubuntu.com/changelogs/%s/%s_%s/changelog" dir pkg src)
558
548
    src ]
559
549
 
560
550
let generated_on_text () =
561
 
  [ pcdata "Page generated by ";
562
 
    a_link ben_webpage "Ben";
563
 
    pcdata (Printf.sprintf " on %s" (Benl_core.get_rfc2822_date ()))
 
551
  div ~a:[a_id "footer"] [
 
552
    small [pcdata (sprintf "Page generated on %s by ben. For code bzr branch "
 
553
      (Benl_core.get_rfc2822_date ()));
 
554
      (a_link
 
555
        "https://code.launchpad.net/~ubuntu-transition-trackers/ubuntu-transition-tracker/ben"
 
556
        "lp:ubuntu-transition-tracker")
 
557
    ]
564
558
  ]
565
559
 
566
560
module SS = Set.Make(String)
629
623
          let l = String.lowercase s in
630
624
          if s.[0] = '#' then
631
625
            let ss = String.sub s 1 (String.length s -1) in
632
 
            let link = sprintf "http://bugs.debian.org/%s" ss in
 
626
            let link = sprintf "http://bugs.launchpad.net/bugs/%s" ss in
633
627
            a_link link s
634
628
          else if s.[0] = '<' then
635
629
            let ss = String.sub s 1 (String.length s - 2) in
636
 
            let link = sprintf "http://lists.debian.org/%s" ss in
 
630
            let link = sprintf "http://mid.gmane.org/%s" ss in
637
631
            a_link link s
638
632
          else if starts_with l "pts" then
639
633
            let text = cut_head s "pts:" in
708
702
          ();
709
703
      ])
710
704
      (body [
711
 
        h1 ~a:[a_id "title"] [a_link "http://release.debian.org/"  "Debian Release Management"];
712
 
        h2 ~a:[a_id "subtitle"] [a_link "http://release.debian.org/transitions/" "Transitions"; pcdata (sprintf " → %s" mytitle)];
 
705
        h1 ~a:[a_id "title"] [pcdata "Ubuntu Release Management"];
 
706
        h2 ~a:[a_id "subtitle"] [a_link
 
707
        "http://people.canonical.com/~ubuntu-archive/transitions/" "Transitions"; pcdata (sprintf " → %s" mytitle)];
713
708
        div ~a:[a_id "body"] [
714
709
          b [ pcdata "Parameters:" ];
715
710
          ul~a:[ a_class ["parameters"] ]
743
738
          );
744
739
          hbody;
745
740
        ];
746
 
        div ~a:[a_id "footer"] [ small (generated_on_text ()) ]
 
741
        (generated_on_text ())
747
742
      ]) in
748
743
  let abrege = function
749
744
    | "hurd-i386" -> "hurd"
795
790
          td
796
791
            ~a:[ a_class [ "src"] ]
797
792
            [ pcdata "[";
798
 
              buildd arch_any (escape src);
 
793
              buildd (escape src) version;
799
794
              pcdata "] (";
800
 
              changelog (sprintf "%s" version) directory;
 
795
              changelog (sprintf "%s" version) directory (escape src);
801
796
              pcdata ")" ]
802
797
          ::
803
798
          (List.map begin fun (_, state) ->
807
802
          )
808
803
        :: acc
809
804
      end ([], rows) (List.rev xs)) in
810
 
      let buildd_link =
811
 
        if names = []
812
 
        then small [ pcdata "arch:all" ]
813
 
        else buildd true (sprintf "%s&compact=compact" (String.concat "," (List.map escape names))) in
814
 
      let rc_bugs_link = rc_bugs (String.concat ";src=" (List.map escape names)) in
815
805
      archs_columns i
816
 
        (th ~a:[ a_colspan 2; a_class [ "level" ] ]
817
 
           [ pcdata (sprintf "Dependency level %d" (i+1));
818
 
             pcdata " (";
819
 
             buildd_link; pcdata " "; rc_bugs_link;
820
 
             pcdata ")"
 
806
        (th ~a:[ a_class [ "level" ] ]
 
807
           [ pcdata (sprintf "Dependency level %d" (i+1))
821
808
           ]
822
809
        )
823
810
      :: rows, (i - 1)