source: extensions/net.sf.basedb.mev/tags/1.8/resources/options.jsp

Last change on this file was 1416, checked in by Nicklas Nordborg, 11 years ago

Fixes #328: Switch to GPL3

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Id
File size: 3.6 KB
Line 
1<%-- $Id: options.jsp 1416 2011-10-20 07:23:31Z nicklas $
2  ------------------------------------------------------------------
3  Copyright (C) 2009 Nicklas Nordborg
4
5  This file is part of the MeV Launcher extension for BASE.
6  Available at http://baseplugins.thep.lu.se/
7  BASE main site: http://base.thep.lu.se/
8  -----------------------------------------------------------
9 
10  This is free software; you can redistribute it and/or
11  modify it under the terms of the GNU General Public License
12  as published by the Free Software Foundation; either version 3
13  of the License, or (at your option) any later version.
14 
15  The software is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  GNU General Public License for more details.
19 
20  You should have received a copy of the GNU General Public License
21  along with BASE. If not, see <http://www.gnu.org/licenses/>.
22  ------------------------------------------------------------------
23
24  @author Jari, Nicklas
25--%>
26<%@ page
27  pageEncoding="UTF-8"
28  session="false"
29  import="net.sf.basedb.core.Application"
30  import="net.sf.basedb.core.BioAssaySet"
31  import="net.sf.basedb.core.Experiment"
32  import="net.sf.basedb.core.Directory"
33  import="net.sf.basedb.core.User"
34  import="net.sf.basedb.core.DbControl"
35  import="net.sf.basedb.core.SessionControl"
36  import="net.sf.basedb.core.Path"
37  import="net.sf.basedb.clients.web.Base"
38  import="net.sf.basedb.clients.web.util.HTML"
39  import="net.sf.basedb.clients.web.extensions.ExtensionsControl"
40  import="net.sf.basedb.util.Values"
41%>
42<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %>
43<%@ taglib prefix="t" uri="/WEB-INF/tab.tld" %>
44
45<%
46final SessionControl sc = Base.getExistingSessionControl(request, true);
47final String ID = sc.getId();
48final float scale = Base.getScale(sc);
49DbControl dc = null;
50try
51{
52  dc = sc.newDbControl();
53  final User user = User.getById(dc, sc.getLoggedInUserId());
54  int maxMemory = Values.getInt(sc.getUserClientSetting("net.sf.basedb.mev.launchmev.jvm.maxmemory"), 512);
55%>
56<base:page type="popup" title="<%="MeV Launcher options for "+HTML.encodeTags(user.getName())%>">
57<base:head scripts="tabcontrol.js" styles="tabcontrol.css">
58  <script language="JavaScript">
59  function validateOptions()
60  {
61    return true;
62  }
63  function saveSettings()
64  {
65    document.forms['mevoptions'].submit();
66  }
67  </script>
68</base:head>
69<base:body>
70
71  <form action="submit.jsp?ID=<%=ID%>" method="post" name="mevoptions" onsubmit="return false;">
72  <input type=hidden name="cmd" value="SaveOptions">
73 
74  <h3 class="docked">MeV Launcher options for <%=HTML.encodeTags(user.getName())%></h3>
75  <t:tabcontrol id="mevoptions" 
76    contentstyle="<%="height: "+(int)(scale*240)+"px;"%>" 
77    position="bottom">
78 
79  <t:tab id="option" title="MeV options" validate="validateOptions()">
80
81    <table class="form" cellspacing=0>
82    <tr>
83      <td colspan="2">
84        <i>Specify the amount of memory the Java Virtual Machine
85        for MeV is allowed to use. The default value is 512MB. We don't
86        recommend a lower value, but you may increase the value if your
87        computer has memory to spare.</i>
88      </td>
89    </tr>
90    <tr>
91      <td class="prompt">JVM max memory</td>
92      <td><input class="text" type="text" name="maxMemory" 
93          value="<%=maxMemory%>" size="8" maxlength="6"
94          onkeypress="return Numbers.integerOnly(event)"> MB</td>
95    </tr>
96    </table>
97
98  </t:tab>
99  </t:tabcontrol>
100  <p>
101  <table align="center">
102  <tr>
103    <td width="50%"><base:button onclick="saveSettings();" title="Save" /></td>
104    <td width="50%"><base:button onclick="window.close();" title="Cancel" /></td>
105  </tr>
106  </table>
107</base:body>
108</base:page>
109<%
110}
111finally
112{
113  if (dc != null) dc.close();
114}
115%>
Note: See TracBrowser for help on using the repository browser.