/* * aegis - project change supervisor * Copyright (C) 1997, 1998, 2000-2003, 2005-2008 Peter Miller * * 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. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see * . */ auto script_name; script_name = getenv("SCRIPT_NAME"); if (script_name == "") script_name = "http://localhost/cgi-bin/aegis.cgi"; auto pn; pn = project_name(); columns({width = 1000; }); print("Content-Type: text/html"); print(""); print(""); print(""); print(""); print(""); print(""); print(""); /* * Netscape 4.x has numerous CSS bugs, two of which need mentioning. * 1. If a style sheet is not present Netscape says 404 Not found, when * it should silently ignore it. 2. Style sheets who's media is not * "screen" will be ignored. Fortunately we can use (2) to get around (1). */ print(""); auto stack, depth, bn; depth=0; stack[depth] = project[pn].state.name; while ("" != ( bn = project[stack[depth]].state.parent_name )) { stack[++depth] = bn; } while ( depth >= 0) { print(""); } print(""); print("Project " ## quote_html(pn) ## ", Staff"); print("

"); auto href; print("Project"); auto long_project_name; auto prj_name_parts; prj_name_parts = split(pn, '.'); href = script_name ## "?file@proj_menu+project@" ## quote_url(prj_name_parts[0]); long_project_name = "" ## quote_html(prj_name_parts[0]) ## ""; auto j; for (j = 1; j < count(prj_name_parts); j++) { href ##= '.' ## prj_name_parts[j]; long_project_name ##= "." ## quote_html(prj_name_parts[j]) ## ""; }; long_project_name = "“" ## long_project_name ## "”,
"; /* HTTP limits lines to 510 characters */ for (j in wrap(long_project_name, 510)) print(j); print("List of Staff"); print("

"); print("
"); auto p, ps, name, staff; p = project[pn]; ps = p.state.branch; for (name in ps.developer) staff[name].developer = true; for (name in ps.reviewer) staff[name].reviewer = true; for (name in ps.integrator) staff[name].integrator = true; for (name in ps.administrator) staff[name].administrator = true; auto cn, cs, h; for (cn in keys(ps.change)) { cs = ps.change[cn]; for (h in cs.history) { if (h.what == new_change) staff[h.who].administrator_count++; else if (h.what == develop_begin) { staff[h.who].developer_count++; if (h.forced != "") staff[h.forced].administrator_count++; } else if (h.what == review_pass || h.what == review_fail) staff[h.who].reviewer_count++; else if (h.what == integrate_begin) staff[h.who].integrator_count++; } } auto n, s, developer_max, reviewer_max, integrator_max, administrator_max; developer_max = 1; reviewer_max = 1; integrator_max = 1; administrator_max = 1; for (name in keys(staff)) { s = staff[name]; if (s.developer_count > developer_max) developer_max = s.developer_count; if (s.reviewer_count > reviewer_max) reviewer_max = s.reviewer_count; if (s.integrator_count > integrator_max) integrator_max = s.integrator_count; if (s.administrator_count > administrator_max) administrator_max = s.administrator_count; } developer_max = 50.0 / developer_max; reviewer_max = 50.0 / reviewer_max; integrator_max = 50.0 / integrator_max; administrator_max = 50.0 / administrator_max; print(""); print(""); print(""); print(""); print(""); print(""); auto rownum; rownum = 0; for (name in sort(keys(staff))) { if (rownum++ % 6 < 3) print(""); else print(""); s = staff[name]; print(""); } print(""); print("
UserDeveloperReviewerIntegratorAdministrator
"); auto email, long_name; email = name; try { email = user[name].email_address; } catch (email) { email = ""; } if (email == "") email = name; href = "mailto:" ## email; print(""); try { long_name = passwd[name].pw_comment; } catch (long_name) { long_name = name; } print(quote_html(long_name) ## ""); print(""); print(s.developer ? "Yes" : "No"); print(""); print(s.developer_count + 0); print(""); if (s.developer_count) { n = round(developer_max * s.developer_count); if (n < 3) n = 3; href = script_name ## "?file@rect+" ## n ## "+12"; print(""); } print(""); print(s.reviewer ? "Yes" : "No"); print(""); print(s.reviewer_count + 0); print(""); if (s.reviewer_count) { n = round(reviewer_max * s.reviewer_count); if (n < 3) n = 3; href = script_name ## "?file@rect+" ## n ## "+12"; print(""); } print(""); print(s.integrator ? "Yes" : "No"); print(""); print(s.integrator_count + 0); print(""); if (s.integrator_count) { n = round(integrator_max * s.integrator_count); if (n < 3) n = 3; href = script_name ## "?file@rect+" ## n ## "+12"; print(""); } print(""); print(s.administrator ? "Yes" : "No"); print(""); print(s.administrator_count + 0); print(""); if (s.administrator_count) { n = round(administrator_max * s.administrator_count); if (n < 3) n = 3; href = script_name ## "?file@rect+" ## n ## "+12"; print(""); } print("
"); print("Listed " ## count(keys(staff)) ## " staff."); print("
"); print("
"); print("
"); print("
"); print("A similar report may be obtained from the command line, with"); print("
aer proj_staff -p " ## pn ## "
"); print("
"); print("
"); print("

["); print("Project List |"); href = script_name ## "?file@proj_menu+project@" ## quote_url(pn); print("Project Menu"); print("]

"); print("
"); print("This page was generated " ## now() ## "."); print("");