[vlma-devel] commit: Diplay on the home page the available vacant adapters by server. ( Adrien Maglo )

git version control git at videolan.org
Tue Sep 30 11:11:10 CEST 2008


vlma | branch: master | Adrien Maglo <magsoft at videolan.org> | Tue Sep 30 11:14:42 2008 +0200| [5c60398757cf193b1b02aae4c398aadbcaea7df6] | committer: Adrien Maglo 

Diplay on the home page the available vacant adapters by server.

> http://git.videolan.org/gitweb.cgi/vlma.git/?a=commit;h=5c60398757cf193b1b02aae4c398aadbcaea7df6
---

 vlma-webapp/src/main/resources/messages.properties |    3 ++
 .../src/main/resources/messages_fr.properties      |    3 ++
 .../webapp/WEB-INF/jsp/welcome/welcome_right.jsp   |   33 ++++++++++++++++++++
 3 files changed, 39 insertions(+), 0 deletions(-)

diff --git a/vlma-webapp/src/main/resources/messages.properties b/vlma-webapp/src/main/resources/messages.properties
index 0e76d1d..ce679e0 100644
--- a/vlma-webapp/src/main/resources/messages.properties
+++ b/vlma-webapp/src/main/resources/messages.properties
@@ -41,6 +41,9 @@ welcome.servers = Server state
 welcome.servers.warning = Warning!
 welcome.servers.ok = Everything seems ok.
 welcome.servers.unreachable = <b>{0}</b> is not reachable!
+welcome.vacantadapter.resources = Vacant resources
+welcome.vacantadapter.adpater = Adapter {0}
+welcome.vacantadapter.no = All available adapters are busy.
 
 configuration.title = Configuration
 configuration.page = Configuration
diff --git a/vlma-webapp/src/main/resources/messages_fr.properties b/vlma-webapp/src/main/resources/messages_fr.properties
index c81457d..7448611 100644
--- a/vlma-webapp/src/main/resources/messages_fr.properties
+++ b/vlma-webapp/src/main/resources/messages_fr.properties
@@ -38,6 +38,9 @@ welcome.servers = État des serveurs
 welcome.servers.warning = Attention !
 welcome.servers.ok = Tout semble normal.
 welcome.servers.unreachable = <b>{0}</b> n''est pas accessible !
+welcome.vacantadapter.resources = Ressouces inoccupées
+welcome.vacantadapter.adapter = Carte {0}
+welcome.vacantadapter.no = Toutes les cartes disponibles sont utilisées.
 
 configuration.title = Configuration
 configuration.page = Configuration
diff --git a/vlma-webapp/src/main/webapp/WEB-INF/jsp/welcome/welcome_right.jsp b/vlma-webapp/src/main/webapp/WEB-INF/jsp/welcome/welcome_right.jsp
index ba14404..2a9a091 100644
--- a/vlma-webapp/src/main/webapp/WEB-INF/jsp/welcome/welcome_right.jsp
+++ b/vlma-webapp/src/main/webapp/WEB-INF/jsp/welcome/welcome_right.jsp
@@ -29,6 +29,39 @@
         </c:otherwise>
     </c:choose>
 
+<h2><fmt:message key="welcome.vacantadapter.resources" /></h2>
+
+    <c:set var="vacantAdapterCount" value="0" />
+
+    <c:forEach items="${servers}" var="server">
+        <c:set var="serverNameDisplayed" value="false" />
+        <c:if test="${server.up}" >
+	        <c:forEach items="${server.adapters}" var="adapter">
+	            <c:if test="${!adapter.busy && adapter.name != 'files-adapter' && adapter.name != 'stream-adapter'}">
+	                <c:if test="${!serverNameDisplayed}" >
+	                    <c:url value="serverview.htm" var="serverUrl">
+	                        <c:param name="server" value="${server.id}" />
+	                        <c:set var="serverNameDisplayed" value="true" />
+	                        <c:set var="vacantAdapterCount" value="${vacantAdapterCount + 1}" />
+	                    </c:url>
+	                    <a href="${serverUrl}"><b>${server.name}</b></a><ul>
+	                </c:if>
+	                <li>
+	                    <fmt:message key="welcome.vacantadapter.adapter" >
+                            <fmt:param value="${adapter.name}" />
+                        </fmt:message>
+                    </li>
+	            </c:if>
+	            <c:if test="${!serverNameDisplayed}" >
+	                </ul>
+	            </c:if>
+	        </c:forEach>
+        </c:if>
+    </c:forEach>
+    
+    <c:if test="${vacantAdapterCount == 0}">
+        <fmt:message key="welcome.vacantadapter.no" />
+    </c:if>
 </div>
 
 <h2><fmt:message key="welcome.program" /></h2>



More information about the vlma-devel mailing list