/[webwml]/newmaint/index.wml
ViewVC logotype

Contents of /newmaint/index.wml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Mon Feb 5 01:54:48 2001 UTC (12 years, 3 months ago) by csmall
Branch: MAIN
Changes since 1.2: +3 -1 lines
added advocate stuff
1 <?
2 include("config.inc");
3 include("common.inc");
4 ?>
5 #use wml::nmpage title="Debian New Maintainer"
6 <?
7 function print_days($db, $startdate, $stopdate)
8 {
9 $where = " WHERE " . $stopdate . " IS NOT NULL AND age('now'::date, " . $stopdate . ") < '2 months' AND " . $stopdate . " >= " . $startdate;
10
11 #
12 # Mode - the most "popular" number
13 #$sql = "SELECT (date_part('epoch', age(" . $stopdate . "," . $startdate . "))/86400)::int, count(*) AS entries FROM applicant " . $where;
14 #$sql .= " GROUP BY age(" . $stopdate . "::date," . $startdate . "::date)";
15 $sql = "SELECT " . $stopdate . "::date -" . $startdate . "::date AS mode, count(*) AS entries FROM applicant " . $where;
16 $sql .= " GROUP BY mode";
17 $sql .= " ORDER BY entries DESC LIMIT 1";
18 if (! ($query = pg_exec($db, $sql))) {
19 echo "<TD colspan=\"2\">Problem with query: ",
20 pg_ErrorMessage($db), "</TD>\n";
21 return;
22 }
23 if (pg_NumRows($query) > 0) {
24 $row = pg_Fetch_Row($query, 0);
25 print "<TD>" . $row[0] . "</TD>";
26 } else {
27 print "<TD>??</TD>";
28 }
29
30
31 #
32 # First we get the median
33 $sql = "SELECT count(*) FROM applicant " . $where;
34 if (! ($query = pg_exec($db, $sql))) {
35 echo "<TD colspan=\"2\">Problem with query: ",
36 pg_ErrorMessage($db), "</TD>\n";
37 return;
38 }
39 $row = pg_Fetch_Row($query, 0);
40 $medcount= intval($row[0]/2);
41 $sql = "SELECT " . $stopdate . "::date - " . $startdate . "::date as median FROM applicant " . $where;
42 $sql .= " ORDER by median";
43 $sql .= " LIMIT 1 OFFSET " . $medcount;
44 if (! ($query = pg_exec($db, $sql))) {
45 echo "<TD colspan=\"2\">Problem with query: ",
46 pg_ErrorMessage($db), "</TD>\n";
47 return;
48 }
49 if (pg_NumRows($query) > 0) {
50 $row = pg_Fetch_Row($query, 0);
51 print "<TD>" . $row[0] . "</TD>";
52 } else {
53 print "<TD>??</TD>";
54 }
55
56
57 $sql = "SELECT avg(date_part('epoch', age(" . $stopdate . "," . $startdate . "))/86400)::int, max(date_part('epoch', age(" . $stopdate . "," . $startdate . "))/86400)::int from applicant " . $where;
58 if (! ($query = pg_exec($db, $sql))) {
59 echo "<TD colspan=\"2\">Problem with query: ",
60 pg_ErrorMessage($db), "</TD>\n";
61 return;
62 }
63 if (pg_NumRows($query) > 0) {
64 $row = pg_Fetch_Row($query, 0);
65 echo "<TD>", $row[0], "</TD><TD>", $row[1], "</TD>";
66 } else {
67 echo "<TD>??</TD><TD>??</TD>";
68 }
69 }
70
71 function print_stat($db, $desc, $sql,$startdate,$stopdate)
72 {
73 if (! ($query = pg_exec($db, $sql))) {
74 echo "<TR><TD colspan=\"2\">Problem with query: ",
75 pg_ErrorMessage($db), "</TD></TR>\n";
76 return;
77 }
78 if (pg_NumRows($query) > 0) {
79 $row = pg_Fetch_Row($query, 0);
80 echo "<TR><TD>$desc</TD><TD>", $row[0], "</TD>";
81 } else {
82 echo "<TR><TD>$desc</TD><TD>??</TD>";
83 }
84 if ($startdate == '' || $startdate == '') {
85 echo "<TD><SMALL>N/A</SMALL></TD><TD><SMALL>N/A</SMALL></TD><TD><SMALL>N/A</SMALL></TD><TD><SMALL>N/A</SMALL></TD>";
86 } else {
87 print_days($db,$startdate,$stopdate);
88 }
89 "</TR>\n";
90 }
91
92 #
93 # Print stats prints a summary list of statistics about the new
94 # maintainers, as can be assumed from its name it prints them to
95 # the page.
96 function print_stats() {
97 if (! ($db = open_db())) {
98 return;
99 }
100 echo "<TABLE border=\"1\" summary=\"\">\n";
101 echo "<TR valign=\"b\"><TD> </TD><TH>Count</TH><TH>Mode<BR>Days</TH><TH>Median<BR>Days</TH><TH>Average<BR>Days</TH><TH>Maximum<BR>Days</TH></TR>\n";
102
103 #
104 # This is all applicants we know about
105 print_stat($db, "Waiting for Advocate",
106 "SELECT count(*) from applicant where advocate_checked IS NULL", "apply_date", "advocate_checked");
107 print_stat($db, "Awaiting AM assignment",
108 "SELECT count(*) from applicant where manager_date IS NULL", "advocate_checked", "manager_date");
109 print_stat($db, "Waiting for AM to confirm",
110 "SELECT count(*) from applicant WHERE manager_date IS NOT NULL AND am_confirm_date IS NULL", "manager_date", "am_confirm_date");
111 print_stat($db, "Initial AM contact",
112 "SELECT count(*) FROM applicant WHERE am_confirm_date IS NOT NULL AND am_contact IS NULL", "am_confirm_date", "am_contact");
113 print_stat($db, "Processing Applicant",
114 "SELECT count(*) FROM applicant WHERE am_contact IS NOT NULL AND ( decision IS NULL OR application_ok = 'f')", "am_contact", "decision");
115 print_stat($db, "Awaiting DAM Approval",
116 "SELECT count(*) FROM applicant WHERE approved = 't' AND ( application_ok = 't' OR application_ok IS NULL) AND newmaint IS NULL" ,"decision", "newmaint");
117 print_stat($db, "New Maintainers processed",
118 "SELECT count(*) FROM applicant WHERE da_approved = 't' ", 'apply_date', 'newmaint');
119 print_stat($db, "Total Applicants in Database",
120 "SELECT count(*) from applicant" ,'', '');
121 print_stat($db, "On hold at AM stage",
122 "SELECT count(*) FROM applicant WHERE approved = 'f' " , '', '');
123 print_stat($db, "On hold at DAM stage",
124 "SELECT count(*) FROM applicant WHERE approved = 't' AND da_approved = 'f' ", '', '');
125 print_stat($db, "Application Managers",
126 "SELECT count(*) FROM manager WHERE max_applicants > 0", '', '');
127 echo "</TABLE>\n";
128 pg_Close($db);
129 }
130 ?>
131 <H1>Debian New Maintainer Status</H1>
132 <P>This system is used to display or update the status of New Maintainers
133 going through the application system. For more information about the
134 process itself, look at the
135 <A href="http://www.debian.org/devel/join/newmaint">New Maintainers' Corner</A> on our main site.
136 <BR>
137 <H3>Aggregate Statistics</H3>
138 <P>To give you some idea of the size of the application process and where,
139 as a whole, applicants are in the system we have provided some overall
140 statistics. The waiting times are taken from data for the last two months and
141 are incremental for each stage except for the 'New Maintainers Processed'
142 line which is the total time from application to becoming a new maintainer.
143 If you want to know more, visit the <A href="stats.php">What do these statistics mean</A> page.
144 <CENTER>
145 <?
146 print_stats();
147 ?>
148 </CENTER>
149 <H3>Applicant Login</H3>
150 If you think you are in the New Maintainer system, enter in the
151 email address you used to apply for it.<BR>
152 <CENTER>
153 <FORM method="post" action="nmstatus.php">
154 <INPUT name="email" type=text>&nbsp;&nbsp;
155 <INPUT type="submit" value="Login">
156 </FORM>
157 </CENTER>
158 <BR>If you don't know what email address you registered with, you can go to
159 <A href="nmlist.php">the list of applicants</A>.
160 <HR>
161 <H3>Application Manager Login</H3>
162 <CENTER>
163 <FORM method="post" action="amlogin2.php">
164 <TABLE>
165 <TR><TD><B>Login:</B></TD><TD> <INPUT name="username" type=text>@debian.org</TD></TR>
166 <TR><TD><B>Password:</B></TD><TD> <INPUT name="passwd" type="password"></TD></TR>
167 <TR><TD> </TD><TD><INPUT type="submit" value="Login"></TD></TR>
168 </TABLE>
169 </FORM>
170 </CENTER>
171 <BR>
172 <H3>Who are we?</H3>
173 <P>We are a group of Debian maintainers who have volunteered to assist the
174 Debian Account Managers in processing new applicants to be Debian maintainers
175 you can find out who these people are <A href="whoisam.php">here</A>.

  ViewVC Help
Powered by ViewVC 1.1.5