1 | <%@ page |
---|
2 | pageEncoding="UTF-8" |
---|
3 | session="false" |
---|
4 | import="net.sf.basedb.core.Application" |
---|
5 | import="net.sf.basedb.core.User" |
---|
6 | import="net.sf.basedb.core.Role" |
---|
7 | import="net.sf.basedb.core.SystemItems" |
---|
8 | import="net.sf.basedb.core.DbControl" |
---|
9 | import="net.sf.basedb.core.SessionControl" |
---|
10 | import="net.sf.basedb.core.PermissionDeniedException" |
---|
11 | import="net.sf.basedb.clients.web.Base" |
---|
12 | import="net.sf.basedb.clients.web.util.HTML" |
---|
13 | import="net.sf.basedb.clients.web.extensions.ExtensionsControl" |
---|
14 | import="net.sf.basedb.util.Values" |
---|
15 | %> |
---|
16 | <%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
---|
17 | <%@ taglib prefix="p" uri="/WEB-INF/path.tld" %> |
---|
18 | <% |
---|
19 | final SessionControl sc = Base.getExistingSessionControl(request, true); |
---|
20 | final String ID = sc.getId(); |
---|
21 | final float scale = Base.getScale(sc); |
---|
22 | final String home = ExtensionsControl.getHomeUrl("net.sf.basedb.relax.admin"); |
---|
23 | DbControl dc = null; |
---|
24 | try |
---|
25 | { |
---|
26 | dc = sc.newDbControl(); |
---|
27 | final User user = User.getById(dc, sc.getLoggedInUserId()); |
---|
28 | boolean isAdmin = user.getId() == SystemItems.getId(User.ROOT) |
---|
29 | || sc.getActiveRoles().contains(SystemItems.getId(Role.ADMINISTRATOR)); |
---|
30 | |
---|
31 | if (!isAdmin) |
---|
32 | { |
---|
33 | throw new PermissionDeniedException("This page requires Administrator privileges."); |
---|
34 | } |
---|
35 | %> |
---|
36 | <base:page type="default" > |
---|
37 | <base:head |
---|
38 | scripts="~../relax.js,~map-external-data.js" |
---|
39 | styles="path.css,~../css/relax.css" |
---|
40 | > |
---|
41 | <style> |
---|
42 | |
---|
43 | </style> |
---|
44 | </base:head> |
---|
45 | <base:body> |
---|
46 | |
---|
47 | <p:path><p:pathelement |
---|
48 | title="Relax" href="<%="../index-admin.jsp?ID="+ID%>" |
---|
49 | /><p:pathelement title="Map external data to releases" |
---|
50 | /></p:path> |
---|
51 | |
---|
52 | <div class="content"> |
---|
53 | <form name="reggie" id="wizard" class="wizard"> |
---|
54 | |
---|
55 | <div class="step" id="step-1"> |
---|
56 | <div class="step-no">1</div> |
---|
57 | <div class="step-title">Select a source data file</div> |
---|
58 | <div class="step-content"> |
---|
59 | |
---|
60 | <table class="step-form"> |
---|
61 | <tr class="align-top"> |
---|
62 | <td class="prompt">File</td> |
---|
63 | <td class="input"> |
---|
64 | <input type="file" name="file" id="file" class="required" style="width: 95%;" accept=".csv,.tsv"> |
---|
65 | </td> |
---|
66 | <td class="status" id="file.status"></td> |
---|
67 | <td class="help"><span id="file.message" class="message"></span> |
---|
68 | <ul> |
---|
69 | <li>Select the file that was produced by the Reggie wizard. |
---|
70 | <li>The first line should contain column headers starting with Patient, Case and Specimen. |
---|
71 | <li>For each line the wizard will check if a specimen is found in the current release. |
---|
72 | </ul> |
---|
73 | </td> |
---|
74 | </tr> |
---|
75 | </table> |
---|
76 | </div> |
---|
77 | </div> |
---|
78 | |
---|
79 | <div id="wizard-status"></div> |
---|
80 | <div id="wizard-progress"></div> |
---|
81 | |
---|
82 | <table class="navigation" id="navigation"> |
---|
83 | <tr> |
---|
84 | <td><base:button id="gocancel" title="Cancel" /></td> |
---|
85 | <td><base:button id="goexport" title="Export" image="<%=home+"/images/gonext.png"%>" /></td> |
---|
86 | <td><base:button id="gorestart" title="Restart" image="<%=home+"/images/goback.png"%>" /></td> |
---|
87 | <td><base:button id="godownload" title="Download" image="<%=home+"/images/download.png"%>" /></td> |
---|
88 | <td id="gonext-message" class="message"></td> |
---|
89 | </tr> |
---|
90 | </table> |
---|
91 | |
---|
92 | </form> |
---|
93 | </div> |
---|
94 | |
---|
95 | </base:body> |
---|
96 | </base:page> |
---|
97 | <% |
---|
98 | } |
---|
99 | finally |
---|
100 | { |
---|
101 | if (dc != null) dc.close(); |
---|
102 | } |
---|
103 | %> |
---|