/* * aegis - project change supervisor * Copyright (C) 1997, 1998, 2000, 2001 Peter Miller; * All rights reserved. * * 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 2 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, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. * * MANIFEST: report the staff currently assigned to a project */ 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("Project Staff"); print("

"); print("Project ``" ## quote_html(pn) ## "'',
"); print("List of Staff"); 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(""); for (name in sort(keys(staff))) { s = staff[name]; print(""); } print("
UserDeveloperReviewerIntegratorAdministrator
"); auto href, 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("A similar report may be obtained from the command line, with"); print("
aer proj_staff -p " ## pn ## "
"); print("
"); print("This page was generated " ## now() ## "."); print("");