[jetrix-cvs] SF.net SVN: jetrix:[775] monitor/trunk/src/main/webapp
Brought to you by:
smanux
From: <sm...@us...> - 2008-11-16 21:25:03
|
Revision: 775 http://jetrix.svn.sourceforge.net/jetrix/?rev=775&view=rev Author: smanux Date: 2008-11-16 21:24:58 +0000 (Sun, 16 Nov 2008) Log Message: ----------- Added the tspec applet Modified Paths: -------------- monitor/trunk/src/main/webapp/server.jsp Added Paths: ----------- monitor/trunk/src/main/webapp/jetrix-0.3-SNAPSHOT.jar monitor/trunk/src/main/webapp/spec.jsp monitor/trunk/src/main/webapp/webspec-0.1-SNAPSHOT.jar Added: monitor/trunk/src/main/webapp/jetrix-0.3-SNAPSHOT.jar =================================================================== (Binary files differ) Property changes on: monitor/trunk/src/main/webapp/jetrix-0.3-SNAPSHOT.jar ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: monitor/trunk/src/main/webapp/server.jsp =================================================================== --- monitor/trunk/src/main/webapp/server.jsp 2008-11-11 23:12:19 UTC (rev 774) +++ monitor/trunk/src/main/webapp/server.jsp 2008-11-16 21:24:58 UTC (rev 775) @@ -6,6 +6,7 @@ <%@ page import="net.jetrix.monitor.ServerInfo" %> <%@ page import="net.jetrix.monitor.dao.ServerInfoDao" %> <%@ page import="net.jetrix.monitor.StyleUtils" %> +<%@ page import="java.net.URLEncoder" %> <% WebApplicationContext context = ContextLoader.getCurrentWebApplicationContext(); ServerInfoDao dao = (ServerInfoDao) context.getBean("serverInfoDao"); @@ -21,6 +22,7 @@ countryFlag = countryName; } + boolean viewable = server.isSpectate() && server.getSpectatorPassword() != null; %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> @@ -155,6 +157,9 @@ <th>Description</th> <th>Players</th> <th>Status</th> +<% if (viewable) { %> + <th>Action</th> +<% } %> </tr> </thead> <tbody> @@ -164,6 +169,13 @@ <td><%= StyleUtils.toHTML(channel.getDescription()) %></td> <td><%= channel.getPlayernum() %> / <%= channel.getPlayermax() %></td> <td style="color: green; font-weight: bold"><%= channel.isPlaying() ? "INGAME" : "" %></td> +<% if (viewable) { %> + <td align="center"> +<% if (channel.getPlayernum() > 0) { %> + <a href="spec.jsp?id=<%= server.getId() %>&channel=<%= URLEncoder.encode(channel.getName()) %>">View</a> +<% } %> + </td> +<% } %> </tr> <% } %> </tbody> Added: monitor/trunk/src/main/webapp/spec.jsp =================================================================== --- monitor/trunk/src/main/webapp/spec.jsp (rev 0) +++ monitor/trunk/src/main/webapp/spec.jsp 2008-11-16 21:24:58 UTC (rev 775) @@ -0,0 +1,39 @@ +<%@ page import="org.springframework.web.context.ContextLoader" %> +<%@ page import="org.springframework.web.context.WebApplicationContext" %> +<%@ page import="net.jetrix.monitor.PlayerStats" %> +<%@ page import="net.jetrix.monitor.dao.PlayerStatsDao" %> +<%@ page import="net.jetrix.monitor.StyleUtils" %> +<%@ page import="net.jetrix.monitor.dao.ServerInfoDao" %> +<%@ page import="net.jetrix.monitor.ServerInfo" %> +<% + WebApplicationContext context = ContextLoader.getCurrentWebApplicationContext(); + ServerInfoDao dao = (ServerInfoDao) context.getBean("serverInfoDao"); + + ServerInfo server = dao.getServer(Long.parseLong(request.getParameter("id"))); + + String channel = request.getParameter("channel"); +%> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> + <title>TetriNET Player - <%= channel %> on <%= server.getHostname() %></title> + <link rel="stylesheet" type="text/css" href="stylesheets/style.css"> + <link rel="Shorcut Icon" href="favicon.ico"> +</head> +<body> + +<h1>TetriNET Player - <%= channel %> on <%= server.getHostname() %></h1> + +<div align="center"> +<applet code="net.jetrix.spectator.SpectatorApplet" archive="webspec-0.1-SNAPSHOT.jar,jetrix-0.3-SNAPSHOT.jar" width="640" height="480"> + <param name="hostname" value="<%= server.getHostname() %>"> + <param name="password" value="<%= server.getSpectatorPassword() %>"> + <param name="menu" value="false"> + <param name="channel" value="#<%= channel %>"> +</applet> +</div> + +<a href="server.jsp?id=<%= server.getId() %>">Back to the server info</a> + +</body> +</html> Added: monitor/trunk/src/main/webapp/webspec-0.1-SNAPSHOT.jar =================================================================== (Binary files differ) Property changes on: monitor/trunk/src/main/webapp/webspec-0.1-SNAPSHOT.jar ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |