1 | <%-- $Id: server_test.jsp 1104 2009-05-29 12:53:33Z nicklas $ |
---|
2 | ------------------------------------------------------------------ |
---|
3 | Copyright (C) 2009 Nicklas Nordborg |
---|
4 | |
---|
5 | This file is part of BASE - BioArray Software Environment. |
---|
6 | Available at http://base.thep.lu.se/ |
---|
7 | |
---|
8 | BASE is free software; you can redistribute it and/or |
---|
9 | modify it under the terms of the GNU General Public License |
---|
10 | as published by the Free Software Foundation; either version 2 |
---|
11 | of the License, or (at your option) any later version. |
---|
12 | |
---|
13 | BASE is distributed in the hope that it will be useful, |
---|
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
16 | GNU General Public License for more details. |
---|
17 | |
---|
18 | You should have received a copy of the GNU General Public License |
---|
19 | along with this program; if not, write to the Free Software |
---|
20 | Foundation, Inc., 59 Temple Place - Suite 330, |
---|
21 | Boston, MA 02111-1307, USA. |
---|
22 | ------------------------------------------------------------------ |
---|
23 | |
---|
24 | @author Nicklas |
---|
25 | --%> |
---|
26 | <%@ page |
---|
27 | pageEncoding="UTF-8" |
---|
28 | session="false" |
---|
29 | import="net.sf.basedb.clients.web.Base" |
---|
30 | import="net.sf.basedb.clients.web.util.HTML" |
---|
31 | import="net.sf.basedb.util.Values" |
---|
32 | import="net.sf.basedb.util.error.ThrowableUtil" |
---|
33 | %> |
---|
34 | <%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
---|
35 | <% |
---|
36 | final String gpServer = request.getParameter("server"); |
---|
37 | final String login = request.getParameter("login"); |
---|
38 | final Exception exception = (Exception)request.getAttribute("exception"); |
---|
39 | boolean failed = exception != null; |
---|
40 | String message = "Test of " + gpServer; |
---|
41 | if (failed) |
---|
42 | { |
---|
43 | message += " failed"; |
---|
44 | } |
---|
45 | else |
---|
46 | { |
---|
47 | message += " succeeded"; |
---|
48 | } |
---|
49 | %> |
---|
50 | <base:page type="popup" title="<%=HTML.encodeTags(message)%>"> |
---|
51 | <base:head /> |
---|
52 | <base:body> |
---|
53 | <% |
---|
54 | if (failed) |
---|
55 | { |
---|
56 | %> |
---|
57 | <base:note type="error" title="Failure"> |
---|
58 | <div class="error"> |
---|
59 | <%=message %> |
---|
60 | <div id="stacktrace" class="stacktrace"><%=ThrowableUtil.stackTraceToString(exception)%></div> |
---|
61 | </div> |
---|
62 | </base:note> |
---|
63 | <% |
---|
64 | } |
---|
65 | else |
---|
66 | { |
---|
67 | %> |
---|
68 | <base:note type="info" title="Success"><%=message%></base:note> |
---|
69 | <% |
---|
70 | } |
---|
71 | %> |
---|
72 | <table align="center"> |
---|
73 | <tr><td><base:button title="Close" onclick="window.close()" /></td></tr> |
---|
74 | </table> |
---|
75 | |
---|
76 | </base:body> |
---|
77 | </base:page> |
---|