source: trunk/www/admin/plugindefinitions/select_installation_type.jsp @ 3712

Last change on this file since 3712 was 3706, checked in by Martin Svensson, 14 years ago

References #364 Started updating the GUI to support auto installation of plugins

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Id
File size: 4.2 KB
Line 
1<%-- $Id: select_installation_type.jsp 3706 2007-08-30 13:59:49Z martin $
2  ------------------------------------------------------------------
3  Copyright (C) 2007 Johan Enell, 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
25  @author Martin
26  @version 2.5
27--%>
28
29<%@ page session="false"
30  import="net.sf.basedb.core.Application"
31  import="net.sf.basedb.core.DbControl"
32  import="net.sf.basedb.core.Item"
33  import="net.sf.basedb.core.ItemContext" 
34  import="net.sf.basedb.core.SessionControl"
35 
36  import="net.sf.basedb.clients.web.Base"
37%>
38<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %>
39<%
40final Item itemType = Item.PLUGINDEFINITION;
41final SessionControl sc = Base.getExistingSessionControl(pageContext, true);
42final ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, null);
43final String ID = sc.getId();
44final float scale = Base.getScale(sc);
45final DbControl dc = sc.newDbControl();
46
47String title = "Installation type";
48String pluginPath = request.getParameter("plugin_path");
49
50try
51{
52  %>
53  <base:page type="popup" title="<%=title%>">
54  <base:head>
55    <script language="JavaScript">
56   
57      var lastSelectedType;
58      function typeOnChange()
59      {
60        var frm = document.forms['installations'];
61        var types = frm.installationtypes;
62        var type = types[types.selectedIndex].value;   
63       
64        if (lastSelectedType)
65        {
66          Main.hide('description.'+lastSelectedType)
67        }       
68        Main.show('description.'+type);
69        if (type == 'autoinstall')
70        {
71          Main.show('plugindir');
72        }
73        else
74        {
75          Main.hide('plugindir');
76        }
77        lastSelectedType = type;
78      }
79      function doNext()
80      {
81        var frm = document.forms['installations'];
82        frm.submit();
83      }     
84      function init()
85      {
86        typeOnChange();
87      }
88    </script>
89  </base:head>
90  <base:body onload="init()">
91    <form name="installations" action="index.jsp" method="get" onsubmit="return false;">
92    <input type="hidden" name="ID" value="<%=ID%>">
93    <input type="hidden" name="cmd" value="InstallationType">
94    <input type="hidden" name="plugin_path" value="<%=pluginPath%>">
95 
96    <h3 class="docked"><%=title%> <base:help helpid="plugindefinition.installationtype" /></h3>
97    <div class="boxed">
98      <div class="helpmessage">
99        Select how to install the plugin(s).
100      </div>
101     
102      <table class="form" width="100%">
103      <tr valign="top">
104        <td class="prompt" width="100px">Install</td>
105        <td>
106          <select name="installationtypes" class="required" onchange="typeOnChange()">
107            <option value="autoinstall">Automatically</option>
108            <option value="manuellinstall">Manually</option>
109          </select>
110        </td>
111      </tr>
112      <tr id="plugindir" valign="top" style="display:none;">
113        <td class="prompt">Path</td>
114        <td><i><%=pluginPath%></i></td>
115      </tr>       
116      </table>
117     
118      <div id="descriptions" class="helpmessage">
119        <div id="description.autoinstall" style="display:none;">
120          <b>Automatically install non-core plugins</b><br>
121          The path above will be scanned for plugins in jar-files.<br>
122          Plugins that were found will be available for selection in the next step.
123        </div>
124        <div id="description.manuellinstall" style="display:none;">
125          <b>Manually install plugins</b><br>
126          The plugin´s class name and jar path have to be defined manually.
127        </div>
128      </div>
129    </div>
130    </form>
131    <table align="center">
132    <tr>
133      <td width="50%"><base:button onclick="doNext();" title="Next" /></td>
134      <td width="50%"><base:button onclick="window.close();" title="Cancel" /></td>
135    </tr>
136    </table>
137  </base:body>
138  </base:page>
139  <%
140}
141finally
142{
143  if (dc != null) dc.close();
144}
145 %>
146 
Note: See TracBrowser for help on using the repository browser.