You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by br...@apache.org on 2003/12/28 17:40:56 UTC

cvs commit: xml-forrest/scratchpad/forrestbot2/webapp/WEB-INF README.txt settings.jsp settings.properties users.properties

brondsem    2003/12/28 08:40:56

  Modified:    scratchpad/forrestbot2/webapp controlpanel.jsp welcome.html
               scratchpad/forrestbot2/webapp/WEB-INF README.txt
                        settings.jsp settings.properties users.properties
  Added:       scratchpad/forrestbot2/webapp welcome.local.html
  Log:
  view 'built' sites not locally 'deployed' sites; local welcome page; table of statuses on front
  
  Revision  Changes    Path
  1.2       +84 -67    xml-forrest/scratchpad/forrestbot2/webapp/controlpanel.jsp
  
  Index: controlpanel.jsp
  ===================================================================
  RCS file: /home/cvs/xml-forrest/scratchpad/forrestbot2/webapp/controlpanel.jsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- controlpanel.jsp	20 Nov 2003 20:25:13 -0000	1.1
  +++ controlpanel.jsp	28 Dec 2003 16:40:56 -0000	1.2
  @@ -3,75 +3,92 @@
   <%@include file="WEB-INF/logic.jsp"%>
   
   <html>
  -  <head>
  -    <title>Forrestbot Web Interface</title>
  -  </head>
  +<head>
  +	<title>Forrestbot Web Interface</title>
  +</head>
   
  -  <body>
  -    <% if (request.getParameter("intro") != null) { %>
  -      <jsp:include page="welcome.html" flush="true"/>
  -      <hr>
  -    <% } %>
  +<body>
  +	<% if (request.getParameter("intro") != null) { %>
  +	<jsp:include page="welcome.html" flush="true"/>
  +	<hr>
  +	<jsp:include page="welcome.local.html" flush="true"/>
  +	<hr>
  +	<% } %>
   
  -    <% if (command != null) { %>
  -    Processing <b><%= command %></b> - <a target="_top" href="<%=request.getContextPath()+"/refresh/"+module%>">View progress</a>
  -    <% } %>
  +	<% if (command != null) { %>
  +	Processing <b><%= command %></b> - <a target="_top" href="<%=request.getContextPath()+"/refresh/"+module%>">View progress</a>
  +	<% } %>
   
  -    <table>
  -      <tr><td width="40%">
  -    <p>
  -    <ul style="list-style-image: url(images/dir.gif)">
  -      <li><a target="_top" href="<%= sites_url %>">View sites</a>:
  -      <ul style="list-style-image: url(images/file.gif)">
  -        <%
  -        for (int i=0; i<sites.size(); i++) {
  -          String sitename = (String)sites.get(i);
  -          boolean exists = new File(sites_dir + "/"+sitename).exists();
  -          out.println("<li>");
  -          if (exists) out.println("<a target='_top' href='"+sites_url+"/"+sitename+"'>");
  -            out.println(sitename);
  -          if (exists) out.println("</a>");
  -        if (exists) out.println("&nbsp;&nbsp;<a href='" + logs_url + "/"+sitename+".log'><small>[log]</small></a>");
  -        if (exists) out.println("&nbsp;&nbsp;"+getTimestamp(new File(logs_dir + "/"+sitename+".log"), request.getLocale()));
  -        }
  -        %>
  -      </ul>
  -      <li><a target="_top" href="<%= logs_url %>">Logs</a>
  -    </ul>
  -    </p>
  -  </td>
  -  <td width="10%">
  -  </td>
  -  <td>
  -  <div style="color: red"><% if (errMsg != null) { out.println(errMsg); } %></div>
  -  <form method="POST">
  -    Username: <input type="text" name="username" value="<%= (username!=null?username:"")%>"> <br>
  -    Password: <input type="password" name="passwd" value="<%=(password!=null?password:"")%>"> <br>
  -    <% if (privs != null) { %>
  -      Select a module:
  -      <select name="module">
  -        <%
  -        for (int i=0; i<sites.size(); i++) {
  +	<table>
  +	<tr><td width="40%">
  +	<!--<p>
  +	<a target="_top" href="<%= sites_url %>">View all sites</a>-->
  +		<table><tr>
  +			<th>Site</th>
  +			<th>Status</th>
  +			<th>Log</th>
  +			<th>Date</th>
  +		</tr>
  +		<%
  +		for (int i=0; i<sites.size(); i++) {
   			String sitename = (String)sites.get(i);
  -          if (privs.contains(sitename)) {
  -            out.println("<option value='"+sitename+"'>"+sitename);
  -          }
  -        }
  -        %>
  -      </select>
  -      <br>
  -      Select an action:
  -      <% if (privs.contains("build")) { %>
  -        <input type="submit" name="action" value="build">
  -      <% } %>
  -      <% if (privs.contains("deploy")) { %>
  -        <input type="submit" name="action" value="deploy"/>
  -      <% } %>
  -      <% } else { %>
  -        <input type="submit" value="login">
  -      <% } %>
  -  </form>
  -  </td></tr>
  -  </table>
  -  </body>
  +			//boolean exists = new File(sites_dir + "/"+sitename).exists();
  +			out.println("<tr>");
  +			out.println("<td>");
  +			out.println("<a target='_top' href='"+sites_url+"/"+sitename+"'>" + sitename + "</a>");
  +			out.println("</td>");
  +			out.println("<td>");
  +			out.println("</td>");
  +			out.println("<td>");
  +			out.println("<a href='" + logs_url + "/"+sitename+".log'>log</a>");
  +			out.println("</td>");
  +			out.println("<td>");
  +			//out.println("&nbsp;&nbsp;"+getTimestamp(new File(logs_dir + "/"+sitename+".log"), request.getLocale()));
  +			DateFormat formatter = new SimpleDateFormat("HH:mm:ss, dd MMM yyyy", request.getLocale());
  +			Date date = new Date((new File(logs_dir + "/"+sitename+".log")).lastModified());
  +			out.println(formatter.format(date));
  +			out.println("</td>");
  +			out.println("</tr>");
  +		}
  +		%>
  +		</table>
  +<!--	</ul>
  +	<li><a target="_top" href="<%= logs_url %>">Logs</a>
  +	</ul>
  +	</p>-->
  +</td>
  +<td width="10%">
  +</td>
  +<td>
  +<div style="color: red"><% if (errMsg != null) { out.println(errMsg); } %></div>
  +<form method="POST">
  +	Username: <input type="text" name="username" value="<%= (username!=null?username:"")%>"> <br>
  +	Password: <input type="password" name="passwd" value="<%=(password!=null?password:"")%>"> <br>
  +	<% if (privs != null) { %>
  +		Select a module:
  +		<select name="module">
  +			<%
  +			for (int i=0; i<sites.size(); i++) {
  +				String sitename = (String)sites.get(i);
  +			if (privs.contains(sitename)) {
  +				out.println("<option value='"+sitename+"'>"+sitename);
  +			}
  +			}
  +			%>
  +		</select>
  +		<br>
  +		Select an action:
  +		<% if (privs.contains("build")) { %>
  +			<input type="submit" name="action" value="build"/>
  +		<% } %>
  +		<% if (privs.contains("deploy")) { %>
  +			<input type="submit" name="action" value="deploy"/>
  +		<% } %>
  +	<% } else if (privs == null) { %>
  +		<input type="submit" value="login">
  +	<% } %>
  +</form>
  +</td></tr>
  +</table>
  +</body>
   </html>
  
  
  
  1.2       +3 -17     xml-forrest/scratchpad/forrestbot2/webapp/welcome.html
  
  Index: welcome.html
  ===================================================================
  RCS file: /home/cvs/xml-forrest/scratchpad/forrestbot2/webapp/welcome.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- welcome.html	20 Nov 2003 20:25:13 -0000	1.1
  +++ welcome.html	28 Dec 2003 16:40:56 -0000	1.2
  @@ -4,27 +4,13 @@
   with the latest <a href="http://xml.apache.org/forrest/">Forrest</a>. It aims
   to provide a service similar to <a
     href="http://jakarta.apache.org/gump/">Gump</a>, but for websites.  Host
  -projects' XML is automatically checked out and the HTML rebuilt every 4 hours.
  +projects' XML is automatically checked out and the HTML rebuilt periodically.
   </p>
   <p>
   In addition, if you have just made a site update and are itching to see the
  -result, site builds can be triggered manually.
  -</p>
  -<p>
  -Certain users can also trigger an automatic build of the generated HTML/PDFs
  -to Apache's site CVS module (xml-site, avalon-site, etc).
  -</p>
  -<p>
  -To request a username/password that allows you to build and/or deploy your
  -project's site, please mail <a href="mailto:jefft.at.apache.org">Jeff
  -  Turner</a>.
  +result, site builds can be triggered manually.  Certain users can also
  +trigger a publish of the generated files.
   </p>
   <p>
   To set up the Forrestbot Web Inteface for your own collection of projects, checkout the source and read WEB-INF/README.txt
  -
  -<p>
  -If you have any questions, please mail <a
  -  href="mailto:jefft.at.apache.org">Jeff Turner</a>, or <a
  -  href="mailto:forrest-dev.at.xml.apache.org">forrest-dev</a>
   </p>
  -
  
  
  
  1.1                  xml-forrest/scratchpad/forrestbot2/webapp/welcome.local.html
  
  Index: welcome.local.html
  ===================================================================
  <p>
  To request a username/password that allows you to build and/or deploy your
  project's site, please mail <a href="mailto:site.administrator">Insert
  Site Administrator Here</a>.
  </p>
  
  
  
  
  1.2       +13 -1     xml-forrest/scratchpad/forrestbot2/webapp/WEB-INF/README.txt
  
  Index: README.txt
  ===================================================================
  RCS file: /home/cvs/xml-forrest/scratchpad/forrestbot2/webapp/WEB-INF/README.txt,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- README.txt	20 Nov 2003 20:25:13 -0000	1.1
  +++ README.txt	28 Dec 2003 16:40:56 -0000	1.2
  @@ -30,3 +30,15 @@
   (/site/*, /refresh/*, /logs/refresh) are used, and mod_jk does not forwards
   requests for these paths on to Tomcat.  These need to be added by hand to
   httpd.conf.  Alternatively, use a more intelligent connector like mod_webapp.
  +
  +FAQ
  +---------------
  +How do I fix: Exception: /home/dpb2/forrest/xml-forrest/scratchpad/forrestbot2/commands (Permission denied)
  +
  +cd /path/to/forrestbot
  +chmod 777 .
  +su - tomcat
  +cd /path/to/forrestbot
  +touch commands
  +exit
  +chmod 755 .
  \ No newline at end of file
  
  
  
  1.2       +2 -2      xml-forrest/scratchpad/forrestbot2/webapp/WEB-INF/settings.jsp
  
  Index: settings.jsp
  ===================================================================
  RCS file: /home/cvs/xml-forrest/scratchpad/forrestbot2/webapp/WEB-INF/settings.jsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- settings.jsp	20 Nov 2003 20:25:13 -0000	1.1
  +++ settings.jsp	28 Dec 2003 16:40:56 -0000	1.2
  @@ -9,9 +9,9 @@
   
   //getServletConfig().getServletContext().getRealPath(xxx);
   String commands_file = settings.getProperty("commands-file");
  -String sites_dir = settings.getProperty("sites-dir");
  +String sites_dir = settings.getProperty("build-dir");
   String logs_dir = settings.getProperty("logs-dir");
  -String sites_url = settings.getProperty("sites-url");
  +String sites_url = settings.getProperty("build-url");
   String logs_url = settings.getProperty("logs-url");
   
   %>
  
  
  
  1.2       +10 -10    xml-forrest/scratchpad/forrestbot2/webapp/WEB-INF/settings.properties
  
  Index: settings.properties
  ===================================================================
  RCS file: /home/cvs/xml-forrest/scratchpad/forrestbot2/webapp/WEB-INF/settings.properties,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- settings.properties	20 Nov 2003 20:25:13 -0000	1.1
  +++ settings.properties	28 Dec 2003 16:40:56 -0000	1.2
  @@ -5,21 +5,21 @@
   #
   # this file is created by the webapp and used by the 'overseer' script
   #commands-file=/path/to/somewhere/commands
  -# directory that contains the configuration files for each site
  +# directory that contains the forrestbot definition files for each site
   #config-dir=/path/to/somewhere/conf
   #
   # filesystem paths
  -#sites-dir=/path/to/somewhere/sites
  +#build-dir=/path/to/somewhere/build
   #logs-dir=/path/to/somewhere/logs
   #
   # URLs (for HTML links)
  -#sites-url=/forrestbot/sites
  -#logs-url=/forrestbot/logs
  +#build-url=build
  +#logs-url=logs
   
  -commands-file=d:/sandbox/javadev/forrestbot2/commands
  -config-dir=d:/sandbox/javadev/forrestbot2
  +commands-file=/home/dpb2/forrest/xml-forrest/scratchpad/forrestbot2/commands
  +config-dir=/home/dpb2/forrest/xml-forrest/scratchpad/forrestbot2
   
  -sites-dir=d:/sandbox/javadev/forrest/build/site/projects
  -logs-dir=d:/sandbox/javadev/forrest/build/site/projects-logs
  -sites-url=/projects
  -logs-url=/projects-logs
  +build-dir=/home/dpb2/forrest/xml-forrest/scratchpad/forrestbot2/build
  +logs-dir=/home/dpb2/forrest/xml-forrest/scratchpad/forrestbot2/logs
  +build-url=/build
  +logs-url=/logs
  
  
  
  1.2       +1 -4      xml-forrest/scratchpad/forrestbot2/webapp/WEB-INF/users.properties
  
  Index: users.properties
  ===================================================================
  RCS file: /home/cvs/xml-forrest/scratchpad/forrestbot2/webapp/WEB-INF/users.properties,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- users.properties	20 Nov 2003 20:25:13 -0000	1.1
  +++ users.properties	28 Dec 2003 16:40:56 -0000	1.2
  @@ -13,8 +13,5 @@
   #   <modules> is a comma-separated list of sites
   #     - '^' will allow the user to do his actions on all sites
   
  -forrest-dev=refresh,xml-forrest,xml-forrest-krysalis,xml-forrest-template,xml-site,incubator-site,xml-xindice,xml-fop.xml,avalon-site,avalon-phoenix,krysalis-centipede,ws-site
  +forrest-dev=build,deploy,xml-forrest,xml-forrest-krysalis,xml-forrest-template,xml-site,incubator-site,xml-xindice,xml-fop.xml,avalon-site,avalon-phoenix,krysalis-centipede,ws-site
   forrest-dev.password=forrest-dev
  -
  -javadev=build,deploy,*
  -javadev.password=javadev
  \ No newline at end of file