You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2005/04/09 11:12:14 UTC

svn commit: r160670 - in lenya/trunk/src: java/org/apache/lenya/cms/usecase/DummyUsecase.java webapp/WEB-INF/cocoon-xconf.xsl webapp/lenya/admin.xmap webapp/lenya/usecases/admin/tabs.jx webapp/lenya/usecases/usecase.xmap webapp/lenya/xslt/admin/status2html.xslt

Author: andreas
Date: Sat Apr  9 02:12:12 2005
New Revision: 160670

URL: http://svn.apache.org/viewcvs?view=rev&rev=160670
Log:
display cocoon & server status properly

Added:
    lenya/trunk/src/java/org/apache/lenya/cms/usecase/DummyUsecase.java
Modified:
    lenya/trunk/src/webapp/WEB-INF/cocoon-xconf.xsl
    lenya/trunk/src/webapp/lenya/admin.xmap
    lenya/trunk/src/webapp/lenya/usecases/admin/tabs.jx
    lenya/trunk/src/webapp/lenya/usecases/usecase.xmap
    lenya/trunk/src/webapp/lenya/xslt/admin/status2html.xslt

Added: lenya/trunk/src/java/org/apache/lenya/cms/usecase/DummyUsecase.java
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/java/org/apache/lenya/cms/usecase/DummyUsecase.java?view=auto&rev=160670
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/usecase/DummyUsecase.java (added)
+++ lenya/trunk/src/java/org/apache/lenya/cms/usecase/DummyUsecase.java Sat Apr  9 02:12:12 2005
@@ -0,0 +1,26 @@
+/*
+ * Copyright  1999-2004 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.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.lenya.cms.usecase;
+
+/**
+ * Usecase for presentation purposes using a plain JX template.
+ *
+ * @version $Id:$
+ */
+public class DummyUsecase extends AbstractUsecase {
+
+}

Modified: lenya/trunk/src/webapp/WEB-INF/cocoon-xconf.xsl
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/WEB-INF/cocoon-xconf.xsl?view=diff&r1=160669&r2=160670
==============================================================================
--- lenya/trunk/src/webapp/WEB-INF/cocoon-xconf.xsl (original)
+++ lenya/trunk/src/webapp/WEB-INF/cocoon-xconf.xsl Sat Apr  9 02:12:12 2005
@@ -315,11 +315,18 @@
       </view>
     </component-instance>
     <component-instance name="admin.ipRanges" logger="lenya.admin" class="org.apache.lenya.cms.ac.usecases.IPRanges">
-      <view template="admin/ipRanges" menu="true"/>
+      <view template="admin/ipRanges" menu="true">
+        <parameter name="tab" value="ipRanges"/>
+      </view>
     </component-instance>
     <component-instance name="admin.emptyTrash" logger="lenya.admin" class="org.apache.lenya.cms.site.usecases.EmptyTrash">
       <view template="admin/emptyTrash" menu="true">
         <parameter name="tab" value="trash"/>
+      </view>
+    </component-instance>
+    <component-instance name="admin.serverStatus" logger="lenya.admin" class="org.apache.lenya.cms.usecase.DummyUsecase">
+      <view template="admin/serverStatus" menu="true">
+        <parameter name="tab" value="serverStatus"/>
       </view>
     </component-instance>
 

Modified: lenya/trunk/src/webapp/lenya/admin.xmap
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/lenya/admin.xmap?view=diff&r1=160669&r2=160670
==============================================================================
--- lenya/trunk/src/webapp/lenya/admin.xmap (original)
+++ lenya/trunk/src/webapp/lenya/admin.xmap Sat Apr  9 02:12:12 2005
@@ -42,17 +42,18 @@
         </map:when>
       </map:select>
 
-      <map:match type="registered-usecase">
-        <map:mount src="usecases/usecase.xmap" uri-prefix="" check-reload="yes" reload-method="synchron"/>
-      </map:match>
-    
-      <map:match pattern="internal/status.html">
+      <map:match pattern="internal/status.xml">
         <map:generate src="status" type="status"/>
         <map:transform src="fallback://lenya/xslt/admin/status2html.xslt">
           <map:parameter name="contextPath" value="{request:contextPath}"/>
         </map:transform>
-        <map:serialize type="html"/>
+        <map:serialize type="xml"/>
+      </map:match>
+    
+      <map:match type="registered-usecase">
+        <map:mount src="usecases/usecase.xmap" uri-prefix="" check-reload="yes" reload-method="synchron"/>
       </map:match>
+
     </map:pipeline>
     
   </map:pipelines>

Modified: lenya/trunk/src/webapp/lenya/usecases/admin/tabs.jx
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/lenya/usecases/admin/tabs.jx?view=diff&r1=160669&r2=160670
==============================================================================
--- lenya/trunk/src/webapp/lenya/usecases/admin/tabs.jx (original)
+++ lenya/trunk/src/webapp/lenya/usecases/admin/tabs.jx Sat Apr  9 02:12:12 2005
@@ -76,7 +76,14 @@
           <a class="lenya-tablink" href="/${urlPrefix}/admin/lucene.html"><i18n:text>Search</i18n:text></a>
         </td>
         <td>
-          <a class="lenya-tablink" href="/${urlPrefix}/admin/status.html"><i18n:text>Cocoon and Server Status</i18n:text></a>
+          <jx:choose>
+            <jx:when test="${usecase.getView().getParameter('tab').equals('serverStatus')}">
+              <a href="?lenya.usecase=admin.serverStatus" class="lenya-tablink-active"><i18n:text>Cocoon and Server Status</i18n:text></a>
+            </jx:when>
+            <jx:otherwise>
+              <a href="?lenya.usecase=admin.serverStatus" class="lenya-tablink"><i18n:text>Cocoon and Server Status</i18n:text></a>
+            </jx:otherwise>
+          </jx:choose>
         </td>
       </tr>
     </table>

Modified: lenya/trunk/src/webapp/lenya/usecases/usecase.xmap
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/lenya/usecases/usecase.xmap?view=diff&r1=160669&r2=160670
==============================================================================
--- lenya/trunk/src/webapp/lenya/usecases/usecase.xmap (original)
+++ lenya/trunk/src/webapp/lenya/usecases/usecase.xmap Sat Apr  9 02:12:12 2005
@@ -48,6 +48,7 @@
       <map:match pattern="view/*/**" internal-only="true">
         
         <map:generate type="jx" src="fallback://lenya/usecases/{2}.jx"/>
+        <map:transform type="cinclude"/>
         <map:transform type="i18n">
           <map:parameter name="locale" value="{request:locale}"/>
         </map:transform>

Modified: lenya/trunk/src/webapp/lenya/xslt/admin/status2html.xslt
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/lenya/xslt/admin/status2html.xslt?view=diff&r1=160669&r2=160670
==============================================================================
--- lenya/trunk/src/webapp/lenya/xslt/admin/status2html.xslt (original)
+++ lenya/trunk/src/webapp/lenya/xslt/admin/status2html.xslt Sat Apr  9 02:12:12 2005
@@ -15,29 +15,24 @@
   limitations under the License.
 -->
 
-<!-- $Id: status2html.xslt,v 1.3 2004/03/13 12:42:10 gregor Exp $ -->
+<!-- $Id$ -->
 
 <xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns="http://www.w3.org/1999/xhtml"
  xmlns:status="http://apache.org/cocoon/status/2.0">
  
-  <xsl:param name="contextPath" select="string('/cocoon')"/>
+  <xsl:param name="contextPath"/>
 
   <xsl:template match="status:statusinfo">
-    <html>
-      <head>
-        <title>Lenya Status [<xsl:value-of select="@status:host"/>]</title>
-      </head>
-
-      <body>
-        <h1><xsl:value-of select="@status:host"/> - <xsl:value-of select="@status:date"/></h1>
-        <xsl:apply-templates/>    
-      </body>
-    </html>
+    <div>
+      <h2><xsl:value-of select="@status:host"/> - <xsl:value-of select="@status:date"/></h2>
+      <xsl:apply-templates/>
+    </div>
   </xsl:template>
 
   <xsl:template match="status:group">
-    <h2><xsl:value-of select="@status:name"/></h2>
+    <h3><xsl:value-of select="@status:name"/></h3>
     <ul><xsl:apply-templates select="status:value"/></ul>
     <xsl:apply-templates select="status:group"/>
   </xsl:template>



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org