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 2008/02/17 02:19:59 UTC
svn commit: r628402 - in /lenya/trunk/src/modules-core/monitoring: ./
config/ config/cocoon-xconf/ resources/ resources/grammars/ tools/
usecases/ xslt/
Author: andreas
Date: Sat Feb 16 17:19:58 2008
New Revision: 628402
URL: http://svn.apache.org/viewvc?rev=628402&view=rev
Log:
Added session log diagram generation to monitoring module.
Added:
lenya/trunk/src/modules-core/monitoring/config/cocoon-xconf/
lenya/trunk/src/modules-core/monitoring/config/cocoon-xconf/monitoringModule.xconf
lenya/trunk/src/modules-core/monitoring/config/cocoon-xconf/usecase-sessionLogs.xconf
lenya/trunk/src/modules-core/monitoring/config/menu.xml
lenya/trunk/src/modules-core/monitoring/resources/
lenya/trunk/src/modules-core/monitoring/resources/grammars/
lenya/trunk/src/modules-core/monitoring/resources/grammars/sessionLog.xlex
lenya/trunk/src/modules-core/monitoring/sitemap.xmap
lenya/trunk/src/modules-core/monitoring/tools/
lenya/trunk/src/modules-core/monitoring/tools/compress_log.rb (with props)
lenya/trunk/src/modules-core/monitoring/usecases/
lenya/trunk/src/modules-core/monitoring/usecases/sessionLogs.jx
lenya/trunk/src/modules-core/monitoring/xslt/
lenya/trunk/src/modules-core/monitoring/xslt/lexemes2log.xsl
lenya/trunk/src/modules-core/monitoring/xslt/log2svg.xsl
lenya/trunk/src/modules-core/monitoring/xslt/sessions2xhtml.xsl
lenya/trunk/src/modules-core/monitoring/xslt/svg2pdf.xsl
Added: lenya/trunk/src/modules-core/monitoring/config/cocoon-xconf/monitoringModule.xconf
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules-core/monitoring/config/cocoon-xconf/monitoringModule.xconf?rev=628402&view=auto
==============================================================================
--- lenya/trunk/src/modules-core/monitoring/config/cocoon-xconf/monitoringModule.xconf (added)
+++ lenya/trunk/src/modules-core/monitoring/config/cocoon-xconf/monitoringModule.xconf Sat Feb 16 17:19:58 2008
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+-->
+
+<!-- $Id: doctypes.xconf 164635 2005-04-25 20:01:43Z tschlabach $ -->
+
+<xconf xpath="/cocoon/input-modules" unless="/cocoon/input-modules/component-instance[@name = 'monitoring']">
+
+ <component-instance logger="core.modules.input.monitoring" name="monitoring"
+ class="org.apache.lenya.modules.monitoring.MonitoringModule"/>
+
+</xconf>
Added: lenya/trunk/src/modules-core/monitoring/config/cocoon-xconf/usecase-sessionLogs.xconf
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules-core/monitoring/config/cocoon-xconf/usecase-sessionLogs.xconf?rev=628402&view=auto
==============================================================================
--- lenya/trunk/src/modules-core/monitoring/config/cocoon-xconf/usecase-sessionLogs.xconf (added)
+++ lenya/trunk/src/modules-core/monitoring/config/cocoon-xconf/usecase-sessionLogs.xconf Sat Feb 16 17:19:58 2008
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+-->
+<xconf xpath="/cocoon/usecases" unless="/cocoon/usecases/component-instance[@name = 'monitoring.sessionLogs']">
+ <component-instance name="monitoring.sessionLogs" logger="lenya.monitoring" class="org.apache.lenya.cms.usecase.DummyUsecase">
+ <view uri="modules/monitoring/usecases/sessionLogs.jx" menu="true" createContinuation="false"/>
+ </component-instance>
+</xconf>
Added: lenya/trunk/src/modules-core/monitoring/config/menu.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules-core/monitoring/config/menu.xml?rev=628402&view=auto
==============================================================================
--- lenya/trunk/src/modules-core/monitoring/config/menu.xml (added)
+++ lenya/trunk/src/modules-core/monitoring/config/menu.xml Sat Feb 16 17:19:58 2008
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+-->
+
+<menu xmlns:uc="http://apache.org/cocoon/lenya/usecase/1.0"
+ xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
+ xmlns="http://apache.org/cocoon/lenya/menubar/1.0">
+ <menus>
+ <menu i18n:attr="name" name="Development">
+ <block areas="admin site authoring">
+ <item uc:usecase="monitoring.sessionLogs"><i18n:text>Session Logs</i18n:text></item>
+ </block>
+ </menu>
+ </menus>
+</menu>
+
Added: lenya/trunk/src/modules-core/monitoring/resources/grammars/sessionLog.xlex
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules-core/monitoring/resources/grammars/sessionLog.xlex?rev=628402&view=auto
==============================================================================
--- lenya/trunk/src/modules-core/monitoring/resources/grammars/sessionLog.xlex (added)
+++ lenya/trunk/src/modules-core/monitoring/resources/grammars/sessionLog.xlex Sat Feb 16 17:19:58 2008
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+-->
+<lexicon xmlns="http://chaperon.sourceforge.net/schema/lexicon/1.0">
+ <lexeme symbol="logEntry">
+ <concat>
+ <!-- year -->
+ <cclass minOccurs="4" maxOccurs="4">
+ <cinterval min="0" max="9"/>
+ </cclass>
+ <cstring content="-"/>
+ <!-- month -->
+ <cclass minOccurs="2" maxOccurs="2">
+ <cinterval min="0" max="9"/>
+ </cclass>
+ <cstring content="-"/>
+ <!-- day -->
+ <cclass minOccurs="2" maxOccurs="2">
+ <cinterval min="0" max="9"/>
+ </cclass>
+ <cstring content=" "/>
+ <!-- hour -->
+ <group>
+ <cclass minOccurs="2" maxOccurs="2">
+ <cinterval min="0" max="9"/>
+ </cclass>
+ </group>
+ <cstring content=":"/>
+ <!-- minute -->
+ <group>
+ <cclass minOccurs="2" maxOccurs="2">
+ <cinterval min="0" max="9"/>
+ </cclass>
+ </group>
+ <cstring content=":"/>
+ <!-- second -->
+ <group>
+ <cclass minOccurs="2" maxOccurs="2">
+ <cinterval min="0" max="9"/>
+ </cclass>
+ </group>
+ <cstring content=","/>
+ <!-- millisecond -->
+ <cclass minOccurs="3" maxOccurs="3">
+ <cinterval min="0" max="9"/>
+ </cclass>
+ <cstring content=" Sessions: "/>
+ <group>
+ <!-- session count -->
+ <cclass minOccurs="1" maxOccurs="10">
+ <cinterval min="0" max="9"/>
+ </cclass>
+ </group>
+ </concat>
+ </lexeme>
+</lexicon>
\ No newline at end of file
Added: lenya/trunk/src/modules-core/monitoring/sitemap.xmap
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules-core/monitoring/sitemap.xmap?rev=628402&view=auto
==============================================================================
--- lenya/trunk/src/modules-core/monitoring/sitemap.xmap (added)
+++ lenya/trunk/src/modules-core/monitoring/sitemap.xmap Sat Feb 16 17:19:58 2008
@@ -0,0 +1,72 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+-->
+
+<!-- $Id: admin.xmap 160670 2005-04-09 09:12:12Z andreas $ -->
+
+<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+
+ <map:components>
+
+ <map:serializers>
+ <map:serializer name="svg2png"
+ src="org.apache.cocoon.serialization.SVGSerializer"
+ mime-type="image/png"
+ logger="sitemap.serializer.svg2png"
+ />
+ </map:serializers>
+
+ </map:components>
+
+ <map:pipelines>
+ <map:pipeline type="noncaching">
+
+ <map:match pattern="sessionLogs.xml">
+ <map:generate type="directory" src="context://WEB-INF/logs">
+ <map:parameter name="include" value="sessions(.*)\.log"/>
+ <map:parameter name="sort" value="lastmodified"/>
+ <map:parameter name="reverse" value="true"/>
+ </map:generate>
+ <map:transform src="fallback://lenya/modules/monitoring/xslt/sessions2xhtml.xsl"/>
+ <map:serialize type="xml"/>
+ </map:match>
+
+ <map:match pattern="sessionLogs/*.svg">
+ <map:generate type="text" src="context://WEB-INF/logs/{1}"/>
+ <map:transform type="pattern" src="fallback://lenya/modules/monitoring/resources/grammars/sessionLog.xlex"/>
+ <map:transform src="fallback://lenya/modules/monitoring/xslt/lexemes2log.xsl"/>
+ <map:transform src="fallback://lenya/modules/monitoring/xslt/log2svg.xsl">
+ <map:parameter name="title" value="{1}"/>
+ </map:transform>
+ <map:serialize type="xml"/>
+ </map:match>
+
+ <map:match pattern="sessionLogs/*.png">
+ <map:generate src="cocoon:/sessionLogs/{1}.svg"/>
+ <map:serialize type="svg2png"/>
+ </map:match>
+
+ <map:match pattern="sessionLogs/*.pdf">
+ <map:generate src="cocoon:/sessionLogs/{1}.svg"/>
+ <map:transform src="fallback://lenya/modules/monitoring/xslt/svg2pdf.xsl"/>
+ <map:serialize type="fo2pdf"/>
+ </map:match>
+
+ </map:pipeline>
+ </map:pipelines>
+
+</map:sitemap>
\ No newline at end of file
Added: lenya/trunk/src/modules-core/monitoring/tools/compress_log.rb
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules-core/monitoring/tools/compress_log.rb?rev=628402&view=auto
==============================================================================
--- lenya/trunk/src/modules-core/monitoring/tools/compress_log.rb (added)
+++ lenya/trunk/src/modules-core/monitoring/tools/compress_log.rb Sat Feb 16 17:19:58 2008
@@ -0,0 +1,31 @@
+def compress_log(logfile_name)
+ puts "Hello"
+ File.open(logfile_name, "r") do |logfile|
+ max = 0
+ prev_minute = 0
+ prev_hour = ""
+ logfile.each_line { |line|
+ re = Regexp.new(/([0-9]{4}-[0-9]{2}-[0-9]{2}) ([0-9]{2}):([0-9]{2}):([0-9]{2}),[0-9]{3} Sessions: ([0-9]{1,10})/)
+ data = re.match(line)
+ if data
+ if prev_hour == ""
+ prev_hour = data[2]
+ end
+ hour = data[2]
+ minute = data[3]
+ if hour != prev_hour || minute != prev_minute
+ puts data[1] + " " + prev_hour + ":" + prev_minute.to_s + ":00,000" + " Sessions: " + max.to_s
+ prev_minute = minute
+ prev_hour = hour
+ max = 0
+ end
+ sessions = data[5].to_i
+ if sessions > max
+ max = sessions
+ end
+ end
+ }
+ end
+end
+
+compress_log(ARGV[0])
Propchange: lenya/trunk/src/modules-core/monitoring/tools/compress_log.rb
------------------------------------------------------------------------------
svn:executable = *
Added: lenya/trunk/src/modules-core/monitoring/usecases/sessionLogs.jx
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules-core/monitoring/usecases/sessionLogs.jx?rev=628402&view=auto
==============================================================================
--- lenya/trunk/src/modules-core/monitoring/usecases/sessionLogs.jx (added)
+++ lenya/trunk/src/modules-core/monitoring/usecases/sessionLogs.jx Sat Feb 16 17:19:58 2008
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+-->
+<!-- $Id: serverStatus.jx 509574 2007-02-20 14:24:44Z andreas $ -->
+
+<page:page
+ xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
+ xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
+ xmlns:cinclude="http://apache.org/cocoon/include/1.0"
+ >
+
+ <page:body>
+ <h1><i18n:text>Session Logs</i18n:text></h1>
+ <cinclude:include src="cocoon://modules/monitoring/sessionLogs.xml"/>
+ </page:body>
+
+</page:page>
\ No newline at end of file
Added: lenya/trunk/src/modules-core/monitoring/xslt/lexemes2log.xsl
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules-core/monitoring/xslt/lexemes2log.xsl?rev=628402&view=auto
==============================================================================
--- lenya/trunk/src/modules-core/monitoring/xslt/lexemes2log.xsl (added)
+++ lenya/trunk/src/modules-core/monitoring/xslt/lexemes2log.xsl Sat Feb 16 17:19:58 2008
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+-->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+ xmlns:text="http://chaperon.sourceforge.net/schema/text/1.0"
+ xmlns:lex="http://chaperon.sourceforge.net/schema/lexemes/2.0"
+ xmlns:mon="http://apache.org/lenya/monitoring/1.0">
+
+ <xsl:template match="/text:text">
+ <mon:log>
+ <xsl:attribute name="max">
+ <xsl:for-each select="lex:lexeme">
+ <xsl:sort select="lex:group[5]" data-type="number" order="ascending"/>
+ <xsl:if test="position() = last()">
+ <xsl:value-of select="lex:group[5]"/>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:attribute>
+ <xsl:apply-templates select="lex:lexeme"/>
+ </mon:log>
+ </xsl:template>
+
+
+ <xsl:template match="lex:lexeme[@symbol='logEntry']">
+ <mon:entry hour="{lex:group[2]}" min="{lex:group[3]}" sec="{lex:group[4]}" sessions="{lex:group[5]}"/>
+ </xsl:template>
+
+
+</xsl:stylesheet>
\ No newline at end of file
Added: lenya/trunk/src/modules-core/monitoring/xslt/log2svg.xsl
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules-core/monitoring/xslt/log2svg.xsl?rev=628402&view=auto
==============================================================================
--- lenya/trunk/src/modules-core/monitoring/xslt/log2svg.xsl (added)
+++ lenya/trunk/src/modules-core/monitoring/xslt/log2svg.xsl Sat Feb 16 17:19:58 2008
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+-->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+ xmlns:mon="http://apache.org/lenya/monitoring/1.0"
+ xmlns:svg="http://www.w3.org/2000/svg">
+
+ <xsl:param name="title"/>
+ <xsl:param name="width" select="number(600)"/>
+ <xsl:param name="height" select="number(400)"/>
+ <xsl:param name="yGrid" select="20"/>
+ <xsl:param name="marginLeft" select="50"/>
+ <xsl:param name="margin" select="20"/>
+
+ <xsl:variable name="hourWidth" select="$width div 24"/>
+
+ <xsl:variable name="maxValue" select="/mon:log/@max"/>
+ <xsl:variable name="max" select="ceiling($maxValue div $yGrid) * $yGrid"/>
+
+ <xsl:template match="/mon:log">
+ <svg:svg width="{$marginLeft + $width + 2 * $margin}" height="{$height + 2 * $margin}">
+ <svg:text x="{$margin + $marginLeft + $width div 2}" y="{$margin - 5}" style="font-weight: bold;" text-anchor="middle"><xsl:value-of select="$title"/></svg:text>
+ <xsl:call-template name="yLine"/>
+ <xsl:call-template name="hourLine"/>
+ <xsl:apply-templates select="mon:entry"/>
+ </svg:svg>
+ </xsl:template>
+
+
+ <xsl:template name="yLine">
+ <xsl:param name="value" select="$max"/>
+ <xsl:variable name="y" select="$margin + $height - ($value div $max) * $height"/>
+ <svg:line x1="{$margin + $marginLeft}" y1="{$y}" x2="{$margin + $marginLeft + $width}" y2="{$y}" stroke-width=".25" stroke="black"/>
+ <svg:text align="right" x="{$margin + $marginLeft - 5}" y="{$y + 5}" text-anchor="end"><xsl:value-of select="$value"/></svg:text>
+ <xsl:if test="$value > 0">
+ <xsl:call-template name="yLine">
+ <xsl:with-param name="value" select="(ceiling($value div $yGrid) - 1) * $yGrid"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:template>
+
+
+ <xsl:template name="hourLine">
+ <xsl:param name="hour" select="0"/>
+ <xsl:variable name="x" select="$margin + $marginLeft + $hour * $hourWidth"/>
+ <svg:line x1="{$x}" y1="{$margin}" x2="{$x}" y2="{$margin + $height}" stroke-width=".25" stroke="black"/>
+ <svg:text x="{$x - 5}" y="{2 * $margin + $height}"><xsl:value-of select="format-number($hour, '00')"/></svg:text>
+ <xsl:if test="$hour < 24">
+ <xsl:call-template name="hourLine">
+ <xsl:with-param name="hour" select="$hour + 1"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:template>
+
+
+ <xsl:template match="mon:entry[preceding-sibling::mon:entry]">
+ <xsl:variable name="p" select="preceding-sibling::mon:entry[1]"/>
+ <xsl:variable name="px" select="$margin + $marginLeft + $p/@hour * $hourWidth + $p/@min * ($hourWidth div 60) + $p/@sec * ($hourWidth div 3600)"/>
+ <xsl:variable name="py" select="$margin + $height - ($p/@sessions div $max) * $height"/>
+ <xsl:variable name="x" select="$margin + $marginLeft + @hour * $hourWidth + @min * ($hourWidth div 60) + @sec * ($hourWidth div 3600)"/>
+ <xsl:variable name="y" select="$margin + $height - (@sessions div $max) * $height"/>
+ <svg:line x1="{$px}" y1="{$py}" x2="{$x}" y2="{$y}" stroke="blue" stroke-width=".25" stroke-linecap="round"/>
+ </xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file
Added: lenya/trunk/src/modules-core/monitoring/xslt/sessions2xhtml.xsl
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules-core/monitoring/xslt/sessions2xhtml.xsl?rev=628402&view=auto
==============================================================================
--- lenya/trunk/src/modules-core/monitoring/xslt/sessions2xhtml.xsl (added)
+++ lenya/trunk/src/modules-core/monitoring/xslt/sessions2xhtml.xsl Sat Feb 16 17:19:58 2008
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+-->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+ xmlns:dir="http://apache.org/cocoon/directory/2.0"
+ xmlns="http://www.w3.org/1999/xhtml">
+
+
+ <xsl:template match="dir:directory">
+ <table class="lenya-table-list" style="margin-top: 2em;">
+ <xsl:apply-templates select="*"/>
+ </table>
+ </xsl:template>
+
+
+ <xsl:template match="dir:file">
+ <tr>
+ <td><xsl:value-of select="@name"/></td>
+ <td><a href="/modules/monitoring/sessionLogs/{@name}.png">PNG</a></td>
+ <td><a href="/modules/monitoring/sessionLogs/{@name}.svg">SVG</a></td>
+ <td><a href="/modules/monitoring/sessionLogs/{@name}.pdf">PDF</a></td>
+ </tr>
+ </xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file
Added: lenya/trunk/src/modules-core/monitoring/xslt/svg2pdf.xsl
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules-core/monitoring/xslt/svg2pdf.xsl?rev=628402&view=auto
==============================================================================
--- lenya/trunk/src/modules-core/monitoring/xslt/svg2pdf.xsl (added)
+++ lenya/trunk/src/modules-core/monitoring/xslt/svg2pdf.xsl Sat Feb 16 17:19:58 2008
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns:fo="http://www.w3.org/1999/XSL/Format">
+
+ <xsl:template match="svg:svg">
+ <fo:root>
+
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="A4-landscape" page-width="297mm" page-height="210mm">
+ <fo:region-body margin="2cm"/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+
+ <fo:page-sequence master-reference="A4-landscape">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>
+ <fo:instream-foreign-object>
+ <xsl:copy-of select="."/>
+ </fo:instream-foreign-object>
+ </fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+
+ </fo:root>
+
+ </xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org