/* * 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 href; auto script_name; script_name = getenv("SCRIPT_NAME"); if (script_name == "") script_name = "http://localhost/cgi-bin/aegis.cgi"; 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 pn; pn = project_name(); auto stack, depth, n; depth=0; stack[depth] = project[pn].state.name; while ("" != ( n = project[stack[depth]].state.parent_name )) { stack[++depth] = n; } while ( depth >= 0) { print(""); } /* get change type filter */ auto c_type, c_not, a; c_type = "undefined"; c_not = false; for (a in arg) { if (a ~~ "state:") c_type = substr(a, 6, 9999); } if (substr(c_type, 0, 1) == "-") { c_not = true; c_type = substr(c_type, 1, 9999); } auto c_desc, sample_cmdln; c_desc = capitalize(subst("_", " ", c_type)); sample_cmdln = "aegis -l chan_" ## c_type; if (c_type == "undefined") { c_not = true; c_desc = ""; sample_cmdln = "ael c -p " ## quote_html(pn); } if (c_type == "being_developed") { sample_cmdln = "aede -l -p " ## quote_html(pn); } else if (c_type == "awaiting_review") { sample_cmdln = "aerb -l -p " ## quote_html(pn); } else if (c_type == "being_reviewed") { sample_cmdln = "aerfail -l -p " ## quote_html(pn); } else if (c_type == "awaiting_integration") { sample_cmdln = "aeib -l -p " ## quote_html(pn); } else if (c_type == "being_integrated") { sample_cmdln = "aeifail -l -p " ## quote_html(pn); } else if (c_type == "completed") { if (c_not) sample_cmdln = "ael oc " ## quote_html(pn); else sample_cmdln = "ael phi " ## quote_html(pn); } print(""); print("Project " ## quote_html(pn) ## " Changes"); if (c_desc != "") print((c_not ? "not " : "") ## c_desc); print("

"); 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 Changes"); if (c_desc != "") { print("
"); print((c_not ? "not " : "") ## c_desc); } print("

"); print("
"); print(""); print(""); print(""); print(""); auto ps; ps = project[pn].state.branch; auto cn, rownum; rownum = 0; for (cn in sort(keys(ps.change))) { auto cs; cs = ps.change[cn]; if (c_not) { if (cs.state == c_type) continue; } else { if (cs.state != c_type) continue; } if (rownum % 6 < 3) print(""); else print(""); rownum++; print(""); print(""); print(""); } print("
ChangeStateDescriptionDownload
"); auto junk; href = "file@chan_menu+project@" ## quote_url(pn) ## "+change@" ## cn; try { if (count(keys(cs.branch))) href = "file@proj_menu+project@" ## quote_url(pn) ## "." ## cn; } catch (junk) ; href = script_name ## "?" ## href; print("" ## cn ## ""); print(""); print(cs.state); if ( (cs.state == being_developed || cs.state == being_integrated) && !count(keys(cs.branch)) ) { auto who, hi, h, email, long_name; for (hi = count(cs.history) - 1; hi >= 0; --hi) { h = cs.history[hi]; if ( h.what == develop_begin || h.what == develop_end || h.what == integrate_begin || h.what == integrate_pass ) { who = h.who; email = h.who; try { email = user[h.who].email_address; } catch (email) { email = ""; } if (email == "") email = h.who; href = "mailto:" ## email; long_name = h.who; try { long_name = passwd[who].pw_comment; } catch (long_name) { long_name = h.who; } print("
" ## quote_html(long_name) ## ""); break; } } } print("
"); auto part; for (part in wrap_html(quote_html(cs.brief_description), 80)) print(part); print(""); if (cs.state != awaiting_development) { href = script_name ## "/" ## quote_url(pn) ## ".C" ## cn ## ".patch?file@aepatch+project@" ## quote_url(pn) ## "+change@" ## cn; print("patch,"); href = script_name ## "/" ## quote_url(pn) ## ".C" ## cn ## ".tar.gz?file@aetar+project@" ## quote_url(pn) ## "+change@" ## cn; print("tar.gz,"); href = script_name ## "/" ## quote_url(pn) ## ".C" ## cn ## ".ae?file@aedist+project@" ## quote_url(pn) ## "+change@" ## cn; print("aedist"); } print("
"); print("Listed " ## rownum ## " changes."); print("
"); print("
"); print("
"); print("
"); print("A similar report may be obtained from the command line, with"); print("
"); print(sample_cmdln); print("
"); print("
"); print("
"); print("

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

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