source: extensions/net.sf.basedb.genepattern/trunk/resources/test_visualizer.jsp @ 1132

Last change on this file since 1132 was 1132, checked in by Nicklas Nordborg, 12 years ago

References #234: Proof-of-concept: run a selected GenePattern? visualization module from BASE

This is a first attempt to run a visualization module. The main procedure is work and the really hard parts (starting the visualization applet with correct parameters and support files) have been done. But don't expect this to work outside of my development machine yet.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Id
File size: 4.2 KB
Line 
1<%-- $Id: test_visualizer.jsp 1132 2009-06-18 12:26:04Z 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 Jari, Nicklas
25--%>
26<%@ page
27  pageEncoding="UTF-8"
28  session="false"
29  import="net.sf.basedb.core.SessionControl"
30  import="net.sf.basedb.core.Presets"
31  import="net.sf.basedb.core.Presets.Preset"
32  import="net.sf.basedb.clients.web.Base"
33  import="net.sf.basedb.clients.web.util.HTML"
34%>
35<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %>
36<%
37final SessionControl sc = Base.getExistingSessionControl(request, true);
38final String ID = sc.getId();
39
40String presetsXml = sc.getUserDefaultSetting("net.sf.basedb.genepattern.options");
41Presets presets = new Presets();
42if (presetsXml != null) presets.loadFrom(presetsXml);
43
44%>
45<base:page type="popup" title="">
46<base:head>
47  <script language="JavaScript">
48  function browseOnClick(callback)
49  {
50    var frm = document.forms['visualizer'];
51    var url = getRoot() + 'filemanager/index.jsp?ID=<%=ID%>&cmd=SelectOne&title=Select+file&callback=' + callback;
52    Main.openPopup(url, 'SelectFile', 1000, 700);
53  }
54  function setGctFileCallback(fileId, path)
55  {
56    var frm = document.forms['visualizer'];
57    frm['dataset.filename'].value = path;
58  }
59  function setCmsFileCallback(fileId, path)
60  {
61    var frm = document.forms['visualizer'];
62    frm['comparative.marker.selection.filename'].value = path;
63  }
64  function doVisualize()
65  {
66    var frm = document.forms['visualizer'];
67    frm.submit();
68  }
69
70  </script>
71</base:head>
72<base:body>
73 
74  <form action="Visualizer.servlet" method="post" name="visualizer">
75  <input type="hidden" name="ID" value="<%=ID%>">
76 
77  <h3>Run visualizer</h3>
78    <table class="form" cellspacing=0>
79    <tr>
80      <td class="prompt">GenePattern servers</td>
81      <td>
82      <select name="server" style="width: 25em;">
83      <%
84      String selected = "selected";
85      for (Presets.Preset server : presets)
86      {
87        %>
88        <option <%=selected%>><%=HTML.encodeTags(server.getName())%>
89        <%
90        selected = "";
91      }
92      %>
93      </select>
94      </td>
95    </tr>
96
97    <tr>
98      <td class="prompt">Module name</td>
99      <td>
100        <input class="text required" type="text" name="module" size="40"
101          value="ComparativeMarkerSelectionViewer">
102      </td>
103    </tr>
104
105
106    <tr>
107        <td class="prompt">CMS output file</td>
108        <td>
109          <table border="0" cellspacing="0" cellpadding="0">
110          <tr>
111          <td><input type="text" class="text required" 
112            name="comparative.marker.selection.filename" size="60" 
113            value="/gp-ComparativeMarkerSelection/2009-06-16/normalized.imputed.comp.marker.odf">&nbsp;</td>
114          <td><base:button 
115              title="Browse&hellip;"
116              onclick="browseOnClick('setCmsFileCallback')"
117              />
118          </td>
119          </tr>
120          </table>
121        </td>
122    </tr>
123    <tr>
124        <td class="prompt">GCT data file</td>
125        <td>
126          <table border="0" cellspacing="0" cellpadding="0">
127          <tr>
128          <td><input type="text" class="text required" 
129            name="dataset.filename" size="60" 
130            value="/gp-ImputeMissingValuesKNN/2009-06-15/normalized.imputed.gct">&nbsp;</td>
131          <td><base:button 
132              title="Browse&hellip;"
133              onclick="browseOnClick('setGctFileCallback')"
134              />
135          </td>
136          </tr>
137          </table>
138        </td>
139    </tr>
140    </table>
141    </form>
142    <table align="center">
143    <tr>
144      <td width="50%"><base:button onclick="doVisualize();" title="Next" /></td>
145      <td width="50%"><base:button onclick="window.close();" title="Cancel" /></td>
146    </tr>
147    </table>
148
149</base:body>
150</base:page>
151<%
152
153%>
Note: See TracBrowser for help on using the repository browser.