tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yo...@apache.org
Subject cvs commit: jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager Constants.java HTMLManagerServlet.java
Date Fri, 22 Jul 2005 16:09:10 GMT
yoavs       2005/07/22 09:09:10

  Modified:    webapps/docs changelog.xml
               webapps/manager/WEB-INF/classes/org/apache/catalina/manager
                        Constants.java HTMLManagerServlet.java
  Log:
  Bugzilla 34818: http://issues.apache.org/bugzilla/show_bug.cgi?id=34818
  
  Revision  Changes    Path
  1.336     +4 -0      jakarta-tomcat-catalina/webapps/docs/changelog.xml
  
  Index: changelog.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/changelog.xml,v
  retrieving revision 1.335
  retrieving revision 1.336
  diff -u -r1.335 -r1.336
  --- changelog.xml	22 Jul 2005 15:40:30 -0000	1.335
  +++ changelog.xml	22 Jul 2005 16:09:09 -0000	1.336
  @@ -421,6 +421,10 @@
         <add>
           <bug>34250</bug>: Admin webapp Commit Changes button now asks for confirmation.
(yoavs)
         </add>
  +      <add>
  +        <bug>34818</bug>: Alternating row for apps in HTML manager, as suggested
by Jeff
  +          Domeyer. (yoavs)
  +      </add>
       </changelog>
     </subsection>
    </section>
  
  
  
  1.13      +0 -4      jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/Constants.java
  
  Index: Constants.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/Constants.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- Constants.java	11 Mar 2005 22:39:26 -0000	1.12
  +++ Constants.java	22 Jul 2005 16:09:10 -0000	1.13
  @@ -65,21 +65,18 @@
           "    vertical-align: middle;\n" +
           "    font-family:sans-serif,Tahoma,Arial;\n" +
           "    color: black;\n" +
  -        "    background: white;\n" +
           "  }\n" +
           "  td.row-center {\n" +
           "    text-align: center;\n" +
           "    vertical-align: middle;\n" +
           "    font-family:sans-serif,Tahoma,Arial;\n" +
           "    color: black;\n" +
  -        "    background: white;\n" +
           "  }\n" +
           "  td.row-right {\n" +
           "    text-align: right;\n" +
           "    vertical-align: middle;\n" +
           "    font-family:sans-serif,Tahoma,Arial;\n" +
           "    color: black;\n" +
  -        "    background: white;\n" +
           "  }\n" +
           "  TH {\n" +
           "    text-align: center;\n" +
  @@ -93,7 +90,6 @@
           "    vertical-align: middle;\n" +
           "    font-family:sans-serif,Tahoma,Arial;\n" +
           "    color: black;\n" +
  -        "    background: white;\n" +
           "  }\n" +
           "</style>\n";
   
  
  
  
  1.19      +28 -13    jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/HTMLManagerServlet.java
  
  Index: HTMLManagerServlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/HTMLManagerServlet.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- HTMLManagerServlet.java	5 Jan 2005 01:03:22 -0000	1.18
  +++ HTMLManagerServlet.java	22 Jul 2005 16:09:10 -0000	1.19
  @@ -1,5 +1,5 @@
   /*
  - * Copyright 1999,2004 The Apache Software Foundation.
  + * Copyright 1999,2004-2005 The Apache Software Foundation.
    * 
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
  @@ -332,7 +332,18 @@
           String appsUndeploy = sm.getString("htmlManagerServlet.appsUndeploy");
   
           Iterator iterator = sortedContextPathsMap.entrySet().iterator();
  +        boolean isHighlighted = true;
  +        String highlightColor = null;
  +
           while (iterator.hasNext()) {
  +            // Bugzilla 34818, alternating row colors
  +            isHighlighted = !isHighlighted;
  +            if(isHighlighted) {
  +                highlightColor = "#C3F3C3";
  +            } else {
  +                highlightColor = "#FFFFFF";
  +            }
  +
               Map.Entry entry = (Map.Entry) iterator.next();
               String displayPath = (String) entry.getKey();
               String contextPath = (String) entry.getKey();
  @@ -342,7 +353,7 @@
               }
   
               if (context != null ) {
  -                args = new Object[5];
  +                args = new Object[6];
                   args[0] = displayPath;
                   args[1] = context.getDisplayName();
                   if (args[1] == null) {
  @@ -358,10 +369,13 @@
                   } else {
                       args[4] = new Integer(0);
                   }
  +
  +                args[5] = highlightColor;
  +
                   writer.print
                       (MessageFormat.format(APPS_ROW_DETAILS_SECTION, args));
   
  -                args = new Object[8];
  +                args = new Object[9];
                   args[0] = response.encodeURL
                       (request.getContextPath() +
                        "/html/start?path=" + displayPath);
  @@ -378,6 +392,9 @@
                       (request.getContextPath() +
                        "/html/undeploy?path=" + displayPath);
                   args[7] = appsUndeploy;
  +                
  +                args[8] = highlightColor;
  +
                   if (context.getPath().equals(this.context.getPath())) {
                       writer.print(MessageFormat.format(
                           MANAGER_APP_ROW_BUTTON_SECTION, args));
  @@ -551,15 +568,13 @@
   
       private static final String APPS_ROW_DETAILS_SECTION =
           "<tr>\n" +
  -        " <td class=\"row-left\"><small><a href=\"{0}\">{0}</a>"
+
  -        "</small></td>\n" +
  -        " <td class=\"row-left\"><small>{1}</small></td>\n" +
  -        " <td class=\"row-center\"><small>{2}</small></td>\n" +
  -        " <td class=\"row-center\">" +
  -        "<small><a href=\"{3}\">{4}</a></small></td>\n";
  +        " <td class=\"row-left\" bgcolor=\"{5}\"><small><a href=\"{0}\">{0}</a></small></td>\n"
+
  +        " <td class=\"row-left\" bgcolor=\"{5}\"><small>{1}</small></td>\n"
+
  +        " <td class=\"row-center\" bgcolor=\"{5}\"><small>{2}</small></td>\n"
+
  +        " <td class=\"row-center\" bgcolor=\"{5}\"><small><a href=\"{3}\">{4}</a></small></td>\n";
   
       private static final String MANAGER_APP_ROW_BUTTON_SECTION =
  -        " <td class=\"row-left\">\n" +
  +        " <td class=\"row-left\" bgcolor=\"{8}\">\n" +
           "  <small>\n" +
           "  &nbsp;{1}&nbsp;\n" +
           "  &nbsp;{3}&nbsp;\n" +
  @@ -570,7 +585,7 @@
           "</tr>\n";
   
       private static final String STARTED_APPS_ROW_BUTTON_SECTION =
  -        " <td class=\"row-left\">\n" +
  +        " <td class=\"row-left\" bgcolor=\"{8}\">\n" +
           "  <small>\n" +
           "  &nbsp;{1}&nbsp;\n" +
           "  &nbsp;<a href=\"{2}\" onclick=\"return(confirm('''Are you sure?'''))\">{3}</a>&nbsp;\n"
+
  @@ -581,7 +596,7 @@
           "</tr>\n";
   
       private static final String STOPPED_APPS_ROW_BUTTON_SECTION =
  -        " <td class=\"row-left\">\n" +
  +        " <td class=\"row-left\" bgcolor=\"{8}\">\n" +
           "  <small>\n" +
           "  &nbsp;<a href=\"{0}\" onclick=\"return(confirm('''Are you sure?'''))\">{1}</a>&nbsp;\n"
+
           "  &nbsp;{3}&nbsp;\n" +
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message