struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From musa...@apache.org
Subject svn commit: r653504 - in /struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources: osgi/admin/shell.ftl osgi/admin/viewBundle.ftl osgi/admin/viewBundle.vm osgi/admin/viewBundles.ftl osgi/admin/viewBundles.vm struts.xml
Date Mon, 05 May 2008 15:36:15 GMT
Author: musachy
Date: Mon May  5 08:36:15 2008
New Revision: 653504

URL: http://svn.apache.org/viewvc?rev=653504&view=rev
Log:
Switch templates to FreeMarker from velocity

Added:
    struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/osgi/admin/viewBundle.ftl
    struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/osgi/admin/viewBundles.ftl
Removed:
    struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/osgi/admin/viewBundle.vm
    struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/osgi/admin/viewBundles.vm
Modified:
    struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/osgi/admin/shell.ftl
    struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/struts.xml

Modified: struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/osgi/admin/shell.ftl
URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/osgi/admin/shell.ftl?rev=653504&r1=653503&r2=653504&view=diff
==============================================================================
--- struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/osgi/admin/shell.ftl
(original)
+++ struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/osgi/admin/shell.ftl
Mon May  5 08:36:15 2008
@@ -28,10 +28,14 @@
 <title>OSGi Console</title>
 </head>
 <body>
+<div class="right">
+    <@s.url var="bundlesUrl" nampespace="/osgi/admin" action="bundles" includeParams="none"
/>
+    <a href="${bundlesUrl}">Installed Bundles</a>
+</div>
 <div id="shell" >
    <form onsubmit="return false" id="wc-form">
         <div class="wc-results" id="wc-result">
-             Welcome to the OSGi console! Type help to see the list of available commands.
+             Welcome to the OSGi console! Type 'help' to see the list of available commands.
              <br />
              :-&gt;
         </div>

Added: struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/osgi/admin/viewBundle.ftl
URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/osgi/admin/viewBundle.ftl?rev=653504&view=auto
==============================================================================
--- struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/osgi/admin/viewBundle.ftl
(added)
+++ struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/osgi/admin/viewBundle.ftl
Mon May  5 08:36:15 2008
@@ -0,0 +1,106 @@
+<html>
+    <head>
+        <@s.url var="mainCss" value="/static/main.css" includeParams="none" />
+        <link rel="stylesheet" type="text/css" href="${mainCss}" />
+    </head>
+<body>
+
+<div class="right">
+    <@s.url var="bundlesUrl" nampespace="/osgi/admin" action="bundles" includeParams="none"
/>
+    <a href="${bundlesUrl}">Installed Bundles</a>
+</div>
+
+<@s.actionerror />
+
+<table class="bundleDetails" style="clear:both">
+    <tr class="detailRow">
+        <td class="rowTitle">Id</td>
+        <td class="rowValue">${bundle.bundleId}</td>
+    </tr>
+    <tr class="detailRow">
+        <td class="rowTitle">Name</td>
+        <td class="rowValue">${bundle.symbolicName}</td>
+    </tr>
+    <tr class="detailRow">
+        <td class="rowTitle">Location</td>
+        <td class="rowValue">${bundle.location}</td>
+    </tr>
+    <tr class="detailRow">
+        <td class="rowTitle">State</td>
+        <td class="rowValue">${action.getBundleState(bundle)}</td>
+    </tr>
+    <tr class="detailRow">
+        <td class="rowTitle">Registered Services</td>
+        <td class="rowValue">
+            <#list bundle.registeredServices as service>
+                <table class="properties">
+                    <#list $service.propertyKeys as key >
+                        <tr>
+                            <td class="name">${key}</td>
+                            <td>${action.displayProperty(service.getProperty(key))}</td>
+                        </tr>
+                    </#list>
+                </table>
+                <br/>
+            </#list>
+        </td>
+    </tr>
+    <tr class="detailRow">
+        <td class="rowTitle">Services in Use</td>
+        <td class="rowValue">
+            <#list bundle.servicesInUse as service>
+                <table class="properties">
+                    <#list $service.propertyKeys as key >
+                        <tr>
+                            <td class="name">${key}</td>
+                            <td>${action.displayProperty(service.getProperty(key))}</td>
+                        </tr>
+                    </#list>
+                </table>
+                <br/>
+           </#list>
+        </td>
+    </tr>
+    <tr class="detailRow">
+        <td class="rowTitle">Packages</td>
+        <td class="rowValue">
+            <#list packages as pkg>
+                <table class="properties">
+                    <tr>
+                        <td class="name">Name</td>
+                        <td>${pkg.name}</td>
+                    </tr>
+                    <tr>
+                        <td class="name">Actions</td>
+                        <td>
+                            <ul>
+                                <#list pkg.actionConfigs.keySet() as name >
+                                    <li>${name}</li>
+                                </#list>
+                            </ul>
+                        </td>
+                    </tr>
+                </table>
+                <br/>
+            </#list>
+        </td>
+    </tr>
+    <tr class="detailRow">
+        <td class="rowTitle">Actions</td>
+        <td class="rowValue">
+            <#if action.isAllowedAction(bundle, "start")>
+            <a href="bundle_${bundle.symbolicName}!start.action">Start</a>
+            </#if>
+
+            <#if action.isAllowedAction(bundle, "stop")>
+            <a href="bundle_${bundle.symbolicName}!stop.action">Stop</a>
+            </#if>
+
+            <#if action.isAllowedAction(bundle, "update")>
+            <a href="bundle_${bundle.symbolicName}!update.action">Update</a>
+            </#if>
+        </td>
+    </tr>
+</table>
+</body>
+</html>
\ No newline at end of file

Added: struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/osgi/admin/viewBundles.ftl
URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/osgi/admin/viewBundles.ftl?rev=653504&view=auto
==============================================================================
--- struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/osgi/admin/viewBundles.ftl
(added)
+++ struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/osgi/admin/viewBundles.ftl
Mon May  5 08:36:15 2008
@@ -0,0 +1,46 @@
+<html>
+<head>
+    <title>OSGi Bundles</title>
+    <@s.url var="mainCss" value="/static/main.css" includeParams="none" />
+    <link rel="stylesheet" type="text/css" href="${mainCss}" />
+</head>
+<body>
+
+<div class="right">
+    <@s.url var="osgiShellUrl" namespace="/osgi/admin" action="shell" includeParams="none"
/>
+    <a href="${osgiShellUrl}">OSGi Shell</a>
+</div>
+<table class="properties" style="clear:both">
+    <thead>
+        <tr>
+            <th>Name</th>
+            <th>State</th>
+            <th>Actions</th>
+        </tr>
+    </thead>
+    <tbody>
+        <#list bundles as bundle>
+        <tr>
+            <td>
+                <a href="bundle_${bundle.symbolicName}!view.action">${bundle.symbolicName}</a>
+            </td>
+            <td>${action.getBundleState(bundle)}</td>
+            <td>
+                <#if action.isAllowedAction(bundle, "start")>
+                <a href="bundle_${bundle.symbolicName}!start.action">Start</a>
+                </#if>
+
+                <#if action.isAllowedAction(bundle, "stop")>
+                <a href="bundle_${bundle.symbolicName}!stop.action">Stop</a>
+                </#if>
+
+                <#if action.isAllowedAction(bundle, "update")>
+                <a href="bundle_${bundle.symbolicName}!update.action">Update</a>
+                </#if>
+            </td>
+        </tr>
+        </#list>
+    </tbody>
+</table>
+</body>
+</html>

Modified: struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/struts.xml
URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/struts.xml?rev=653504&r1=653503&r2=653504&view=diff
==============================================================================
--- struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/struts.xml (original)
+++ struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/struts.xml Mon
May  5 08:36:15 2008
@@ -7,11 +7,11 @@
     <package name="bundle-admin" namespace="/osgi/admin" extends="struts-default">
         <action name="bundle_*!*" class="org.apache.struts2.osgi.admin.actions.BundlesAction"
method="{2}">
             <param name="id">{1}</param>
-            <result type="velocity">viewBundle.vm</result>
+            <result type="freemarker">viewBundle.ftl</result>
         </action>
 
         <action name="bundles" class="org.apache.struts2.osgi.admin.actions.BundlesAction"
method="index">
-            <result type="velocity">viewBundles.vm</result>
+            <result type="freemarker">viewBundles.ftl</result>
         </action>
 
 



Mime
View raw message