|
a |
|
b/qiita_pet/templates/sitebase.html |
|
|
1 |
{% from qiita_core.qiita_settings import qiita_config, r_client %} |
|
|
2 |
{% from qiita_core.util import get_qiita_version, get_release_info %} |
|
|
3 |
{% from qiita_pet.portal import portal_styling %} |
|
|
4 |
{% set sysmessage = r_client.get('sysmessage') %} |
|
|
5 |
{% set user = current_user %} |
|
|
6 |
{% set qiita_version, qiita_sha = get_qiita_version() %} |
|
|
7 |
{% set biom_metadata_release, archive_release = get_release_info() %} |
|
|
8 |
|
|
|
9 |
{% set level = globals().get('level', '') %} |
|
|
10 |
{% if level not in {'danger', 'success', 'info', 'warning'} %} |
|
|
11 |
{% set level = 'info' %} |
|
|
12 |
{% end %} |
|
|
13 |
{% set message = globals().get('message', '') %} |
|
|
14 |
{% if sysmessage is not None %} |
|
|
15 |
{# since this is a systemwide message, allow regular messages as well #} |
|
|
16 |
{% set message = sysmessage.decode('ascii') + "<br />" + str(message) %} |
|
|
17 |
{% end %} |
|
|
18 |
|
|
|
19 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
|
|
20 |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
|
21 |
<head> |
|
|
22 |
<title>{{portal_styling.title}}</title> |
|
|
23 |
<link rel="stylesheet" href="{% raw qiita_config.portal_dir %}/static/vendor/css/jquery-ui.min.css" type="text/css"> |
|
|
24 |
<link rel="stylesheet" href="{% raw qiita_config.portal_dir %}/static/vendor/css/jquery-ui.structure.min.css" type="text/css"> |
|
|
25 |
<link rel="stylesheet" href="{% raw qiita_config.portal_dir %}/static/vendor/css/jquery-ui.theme.min.css" type="text/css"> |
|
|
26 |
<link rel="stylesheet" href="{% raw qiita_config.portal_dir %}/static/vendor/css/bootstrap.min.css" type="text/css"> |
|
|
27 |
<link rel="stylesheet" href="{% raw qiita_config.portal_dir %}/static/vendor/css/bootstrap-theme.min.css" type="text/css"> |
|
|
28 |
<link rel="stylesheet" href="{% raw qiita_config.portal_dir %}/static/vendor/css/bootstrap-toggle.min.css" type="text/css"> |
|
|
29 |
<link rel="stylesheet" href="{% raw qiita_config.portal_dir %}/static/vendor/css/chosen.css" type="text/css"> |
|
|
30 |
<link rel="stylesheet" href="{% raw qiita_config.portal_dir %}/static/vendor/css/jquery.dataTables.min.css" type="text/css"> |
|
|
31 |
<link rel="stylesheet" href="{% raw qiita_config.portal_dir %}/static/vendor/css/cytoscape.js/font-awesome.min.css" type="text/css"> |
|
|
32 |
<link rel="stylesheet" href="{% raw qiita_config.portal_dir %}/static/vendor/css/cytoscape.js/cytoscape.js-panzoom.css" type="text/css"> |
|
|
33 |
<link rel="stylesheet" href="{% raw qiita_config.portal_dir %}/static/vendor/css/cytoscape.js/tippy.js-4.0.1.css" /> |
|
|
34 |
|
|
|
35 |
<link rel="stylesheet" href="{% raw qiita_config.portal_dir %}/static/css/style.css" type="text/css"> |
|
|
36 |
{% if portal_styling.custom_css %} |
|
|
37 |
<style type="text/css"> |
|
|
38 |
{% raw portal_styling.custom_css %} |
|
|
39 |
</style> |
|
|
40 |
{% end %} |
|
|
41 |
<script src="{% raw qiita_config.portal_dir %}/static/vendor/js/jquery-3.6.0.min.js"></script> |
|
|
42 |
<script src="{% raw qiita_config.portal_dir %}/static/vendor/js/jquery-ui.min.js"></script> |
|
|
43 |
<script src="{% raw qiita_config.portal_dir %}/static/vendor/js/bootstrap.min.js"></script> |
|
|
44 |
<script src="{% raw qiita_config.portal_dir %}/static/vendor/js/bootstrap-toggle.min.js"></script> |
|
|
45 |
<script src="{% raw qiita_config.portal_dir %}/static/vendor/js/chosen.jquery.min.js"></script> |
|
|
46 |
<script src="{% raw qiita_config.portal_dir %}/static/vendor/js/jquery.dataTables.min.js" type="text/javascript"></script> |
|
|
47 |
<script src="{% raw qiita_config.portal_dir %}/static/vendor/js/jquery.dataTables.plugin.natural.js" type="text/javascript"></script> |
|
|
48 |
<script src="{% raw qiita_config.portal_dir %}/static/vendor/js/vue.min.js"></script> |
|
|
49 |
<script src="{% raw qiita_config.portal_dir %}/static/js/qiita.js"></script> |
|
|
50 |
<script type="text/javascript" src="{% raw qiita_config.portal_dir %}/static/vendor/js/cytoscape.js/cytoscape.min.js"></script> |
|
|
51 |
<script type="text/javascript" src="{% raw qiita_config.portal_dir %}/static/vendor/js/cytoscape.js/dagre.min.js"></script> |
|
|
52 |
<script type="text/javascript" src="{% raw qiita_config.portal_dir %}/static/vendor/js/cytoscape.js/cytoscape-dagre.js"></script> |
|
|
53 |
<script type="text/javascript" src="{% raw qiita_config.portal_dir %}/static/vendor/js/cytoscape.js/cytoscape-panzoom.js"></script> |
|
|
54 |
<script type="text/javascript" src="{% raw qiita_config.portal_dir %}/static/vendor/js/cytoscape.js/popper.js"></script> |
|
|
55 |
<script type="text/javascript" src="{% raw qiita_config.portal_dir %}/static/vendor/js/cytoscape.js/cytoscape-popper.min.js"></script> |
|
|
56 |
<script type="text/javascript" src="{% raw qiita_config.portal_dir %}/static/vendor/js/cytoscape.js/tippy.js-4.0.1.min.js"></script> |
|
|
57 |
<script type="text/javascript" src="{% raw qiita_config.portal_dir %}/static/vendor/js/platform.js"></script> |
|
|
58 |
<script type="text/javascript" src="{% raw qiita_config.portal_dir %}/static/js/networkVue.js"></script> |
|
|
59 |
<script type="text/javascript" src="{% raw qiita_config.portal_dir %}/static/js/sampleTemplateVue.js"></script> |
|
|
60 |
|
|
|
61 |
<link rel="shortcut icon" href="{% raw qiita_config.portal_dir %}/static/img/favicon.ico"> |
|
|
62 |
|
|
|
63 |
<script> |
|
|
64 |
var allowed_min_browser_versions = { |
|
|
65 |
'Chrome': {'version': 49, 'download': 'https://www.google.com/chrome/browser/'}, |
|
|
66 |
'Firefox': {'version': 48, 'download': 'https://support.mozilla.org/en-US/kb/update-firefox-latest-version'}, |
|
|
67 |
'Safari': {'version': 12, 'download': 'http://support.apple.com/en-us/HT6104'}, |
|
|
68 |
'Chrome Mobile': {'version': 69, 'download': 'https://www.google.com/chrome/browser/'}, |
|
|
69 |
} |
|
|
70 |
|
|
|
71 |
$(window).on('resize', function () { |
|
|
72 |
$('body').css('padding-top', $('#navigation-bar').height()+10); |
|
|
73 |
}); |
|
|
74 |
|
|
|
75 |
$(window).on('load', function () { |
|
|
76 |
$('body').css('padding-top', $('#navigation-bar').height()+10); |
|
|
77 |
}); |
|
|
78 |
|
|
|
79 |
function updateSelectedSamplesMenu (callback) { |
|
|
80 |
$.getJSON("{% raw qiita_config.portal_dir %}/analysis/dflt/sumary/", function(result) { |
|
|
81 |
$("#dflt-study-count").text(result.studies); |
|
|
82 |
$("#dflt-pd-count").text(result.processed_data); |
|
|
83 |
$("#dflt-samp-count").text(result.samples); |
|
|
84 |
|
|
|
85 |
if (callback !== undefined) { |
|
|
86 |
callback(); |
|
|
87 |
} |
|
|
88 |
}); |
|
|
89 |
} |
|
|
90 |
|
|
|
91 |
|
|
|
92 |
/** |
|
|
93 |
* |
|
|
94 |
* Function to show the loading gif in a given div |
|
|
95 |
* |
|
|
96 |
* @param div_name string with the name of the div to populate with the loading gif |
|
|
97 |
* |
|
|
98 |
* This function replaces the content of the given div with the |
|
|
99 |
* gif to show that the section of page is loading |
|
|
100 |
* |
|
|
101 |
*/ |
|
|
102 |
function show_loading(div_name, show_text = false) { |
|
|
103 |
var text = "<img src='{% raw qiita_config.portal_dir %}/static/img/waiting.gif' style='display:block;margin-left: auto;margin-right: auto'/>"; |
|
|
104 |
if (show_text) { |
|
|
105 |
text += '<br/><center><b>This task might take a long time (up to 5 minutes), please do not close this page.</center></b>'; |
|
|
106 |
} |
|
|
107 |
$("#" + div_name).html(text); |
|
|
108 |
} |
|
|
109 |
|
|
|
110 |
function overlay_check() { |
|
|
111 |
var browser_name = platform.name; |
|
|
112 |
var browser_major_version = parseInt(platform.version.split(".")); |
|
|
113 |
if (!(browser_name in allowed_min_browser_versions) || |
|
|
114 |
browser_major_version < allowed_min_browser_versions[browser_name]['version']) { |
|
|
115 |
var browser_text = ''; |
|
|
116 |
// adding valid browsers |
|
|
117 |
for (k in allowed_min_browser_versions) { |
|
|
118 |
browser_text += '<p id="explanation"><strong>' + k + ': ' + |
|
|
119 |
allowed_min_browser_versions[k]['version'] + '.</strong> <a target="_blank" href="' + |
|
|
120 |
allowed_min_browser_versions[k]['download'] + '">Download page</a></p>'; |
|
|
121 |
} |
|
|
122 |
$('#overlay').append(browser_text); |
|
|
123 |
|
|
|
124 |
$('#overlay').css('visibility', 'visible'); |
|
|
125 |
$('#navigation-bar').css('visibility', 'hidden'); |
|
|
126 |
$('#jumbotron').css('visibility', 'hidden'); |
|
|
127 |
} |
|
|
128 |
} |
|
|
129 |
|
|
|
130 |
$(document).ready(function() { |
|
|
131 |
$.getJSON("{% raw qiita_config.portal_dir %}/analysis/dflt/sumary/", function(result) { |
|
|
132 |
if(parseInt(result.studies) > 0) { |
|
|
133 |
$('#dflt-sel-info').css('color', 'rgb(0, 160, 0)'); |
|
|
134 |
} |
|
|
135 |
}); |
|
|
136 |
// Load default analysis summary data when displayed in menu |
|
|
137 |
$("#dflt-sel-info").mouseover(function() { |
|
|
138 |
updateSelectedSamplesMenu(); |
|
|
139 |
}); |
|
|
140 |
|
|
|
141 |
$("#analysis-drop-down").mouseover(function() { |
|
|
142 |
$.getJSON("{% raw qiita_config.portal_dir %}/analysis/dflt/sumary/", function(result){ |
|
|
143 |
if(parseInt(result.studies) > 0){ |
|
|
144 |
$("#selected_samples_menu").removeClass('disabled'); |
|
|
145 |
$("#selected_samples_link").attr('href', '{% raw qiita_config.portal_dir %}/analysis/selected/'); |
|
|
146 |
} |
|
|
147 |
else{ |
|
|
148 |
$("#selected_samples_menu").addClass('disabled'); |
|
|
149 |
$("#selected_samples_link").attr('href', '#'); |
|
|
150 |
} |
|
|
151 |
}); |
|
|
152 |
}); |
|
|
153 |
|
|
|
154 |
$('#qiita_download_accept').click(function(e){ |
|
|
155 |
e.preventDefault(); |
|
|
156 |
$('.qiita_pet_download_confirm').modal('hide'); |
|
|
157 |
window.location.href = '{% raw qiita_config.portal_dir %}/release/download/public'; |
|
|
158 |
}); |
|
|
159 |
|
|
|
160 |
// Based on http://codepen.io/willvincent/pen/LbeKKW |
|
|
161 |
// and https://datatables.net/examples/api/row_details.html |
|
|
162 |
|
|
|
163 |
Vue.component('data-table-processing-jobs', { |
|
|
164 |
template: '<table id="processing-jobs-datatables"></table>', |
|
|
165 |
props: ['jobs'], |
|
|
166 |
data() { |
|
|
167 |
return { |
|
|
168 |
headers: [ |
|
|
169 |
{ "className": 'more-info-processing-jobs', |
|
|
170 |
"orderable": false, |
|
|
171 |
"data": null, |
|
|
172 |
"defaultContent": ''}, |
|
|
173 |
{ title: 'Heartbeat' }, |
|
|
174 |
{ title: 'Name' }, |
|
|
175 |
{ title: 'Status' }, |
|
|
176 |
{ title: 'Step' } |
|
|
177 |
], |
|
|
178 |
rows: [] , |
|
|
179 |
dtHandle: null |
|
|
180 |
} |
|
|
181 |
}, |
|
|
182 |
watch: { |
|
|
183 |
jobs(val, oldVal) { |
|
|
184 |
let vm = this; |
|
|
185 |
|
|
|
186 |
if (JSON.stringify(val) !== JSON.stringify(oldVal)) { |
|
|
187 |
vm.rows = []; |
|
|
188 |
val.forEach(function (item) { |
|
|
189 |
// Fish out the specific column data for each item in your data set and push it to the appropriate place. |
|
|
190 |
// Basically we're just building a multi-dimensional array here. If the data is _already_ in the right format you could |
|
|
191 |
// skip this loop... |
|
|
192 |
let row = []; |
|
|
193 |
row.push('') |
|
|
194 |
row.push(item.heartbeat); |
|
|
195 |
row.push(item.name); |
|
|
196 |
if (item.status == 'error') { |
|
|
197 |
item.status += ' <a class="btn btn-danger btn-sm hide-job-from-procesing-jobs" id="' + |
|
|
198 |
item.id + '"><span class="glyphicon glyphicon-trash"></span></a>'; |
|
|
199 |
} |
|
|
200 |
row.push(item.status); |
|
|
201 |
row.push(item.step); |
|
|
202 |
row.push(item.id); |
|
|
203 |
|
|
|
204 |
let params = ""; |
|
|
205 |
for (k in item.params) { |
|
|
206 |
if (k.startsWith("qp-hide")) { |
|
|
207 |
continue; |
|
|
208 |
} |
|
|
209 |
params += '<b>' + k + '</b>: ' + item.params[k] + '<br/>'; |
|
|
210 |
} |
|
|
211 |
row.push(params) |
|
|
212 |
row.push(item.processing_job_workflow_id) |
|
|
213 |
vm.rows.push(row); |
|
|
214 |
}); |
|
|
215 |
|
|
|
216 |
// Here's the magic to keeping the DataTable in sync. |
|
|
217 |
// It must be cleared, new rows added, then redrawn! |
|
|
218 |
vm.dtHandle.clear(); |
|
|
219 |
vm.dtHandle.rows.add(vm.rows); |
|
|
220 |
vm.dtHandle.draw(); |
|
|
221 |
} |
|
|
222 |
} |
|
|
223 |
}, |
|
|
224 |
mounted() { |
|
|
225 |
let vm = this; |
|
|
226 |
// Instantiate the datatable and store the reference to the instance in our dtHandle element. |
|
|
227 |
vm.dtHandle = $(this.$el).DataTable({ |
|
|
228 |
// Specify whatever options you want, at a minimum these: |
|
|
229 |
columns: vm.headers, |
|
|
230 |
data: vm.rows, |
|
|
231 |
searching: false, |
|
|
232 |
paging: false, |
|
|
233 |
info: false, |
|
|
234 |
order: [[1, 'desc']] |
|
|
235 |
}); |
|
|
236 |
|
|
|
237 |
$('#processing-jobs-datatables').on('click', 'td.more-info-processing-jobs', function () { |
|
|
238 |
var tr = $(this).closest('tr'); |
|
|
239 |
var row = vm.dtHandle.row( tr ); |
|
|
240 |
|
|
|
241 |
if ( row.child.isShown() ) { |
|
|
242 |
// This row is already open - close it |
|
|
243 |
row.child.hide(); |
|
|
244 |
tr.removeClass('shown'); |
|
|
245 |
} |
|
|
246 |
else { |
|
|
247 |
// Open this row |
|
|
248 |
row.child( format_extra_info_processing_jobs(row.data()) ).show(); |
|
|
249 |
tr.addClass('shown'); |
|
|
250 |
} |
|
|
251 |
}); |
|
|
252 |
|
|
|
253 |
$('#processing-jobs-datatables').on('click', 'a.hide-job-from-procesing-jobs', function () { |
|
|
254 |
var jid = this.id; |
|
|
255 |
if (confirm('Are you sure you want to hide `' + jid + '`?')){ |
|
|
256 |
|
|
|
257 |
$.ajax({ |
|
|
258 |
url: '{% raw qiita_config.portal_dir %}/study/process/job/', |
|
|
259 |
type: 'PATCH', |
|
|
260 |
data: {'op': 'remove', 'path': jid}, |
|
|
261 |
success: function(data) { |
|
|
262 |
processing_jobs_vue.update_processing_job_data(); |
|
|
263 |
}, |
|
|
264 |
error: function(object, status, error_msg) { |
|
|
265 |
bootstrapAlert("Error while hiding `" + jid + "` artifact visibility: " + error_msg, "danger"); |
|
|
266 |
} |
|
|
267 |
}); |
|
|
268 |
} |
|
|
269 |
}); |
|
|
270 |
} |
|
|
271 |
}); |
|
|
272 |
|
|
|
273 |
// this has to be global so we can update when we click on the processing |
|
|
274 |
// jobs button |
|
|
275 |
processing_jobs_vue = new Vue({ |
|
|
276 |
el: '#processing-jobs-table', |
|
|
277 |
data: { |
|
|
278 |
jobs: [], |
|
|
279 |
search: '' |
|
|
280 |
}, |
|
|
281 |
computed: { |
|
|
282 |
filteredJobs() { |
|
|
283 |
let jobs = this.jobs; |
|
|
284 |
return this.$options.filters.filterBy(jobs, this.search); |
|
|
285 |
} |
|
|
286 |
}, |
|
|
287 |
filters: { |
|
|
288 |
filterBy: function (list, value) { |
|
|
289 |
if (value === "") { |
|
|
290 |
return list |
|
|
291 |
} |
|
|
292 |
value = value.toLowerCase() |
|
|
293 |
return list.filter(function(item) { |
|
|
294 |
for (var k in item) { |
|
|
295 |
if (item[k] != null && item[k].toString().toLowerCase().indexOf(value) > -1) { |
|
|
296 |
return true |
|
|
297 |
} |
|
|
298 |
} |
|
|
299 |
return false; |
|
|
300 |
}); |
|
|
301 |
} |
|
|
302 |
}, |
|
|
303 |
methods: { |
|
|
304 |
update_processing_job_data: function () { |
|
|
305 |
let vm = this; |
|
|
306 |
$.ajax({ |
|
|
307 |
url: "{% raw qiita_config.portal_dir %}/user/jobs/", |
|
|
308 |
success(response) { |
|
|
309 |
if (typeof response.jobs === 'undefined' || response.status !== 'success') { |
|
|
310 |
vm.jobs = [] |
|
|
311 |
} else { |
|
|
312 |
vm.jobs = response.jobs; |
|
|
313 |
} |
|
|
314 |
} |
|
|
315 |
}); |
|
|
316 |
} |
|
|
317 |
}, |
|
|
318 |
mounted() { |
|
|
319 |
let vm = this; |
|
|
320 |
setInterval(function (){ |
|
|
321 |
// if modal is shown, https://stackoverflow.com/a/3282893 |
|
|
322 |
if (($('#qiita-processing').data('bs.modal') || {}).isShown){ |
|
|
323 |
vm.update_processing_job_data(); |
|
|
324 |
} |
|
|
325 |
}, 30000); |
|
|
326 |
} |
|
|
327 |
}); |
|
|
328 |
|
|
|
329 |
$('#qiita-processing').on('shown.bs.modal', processing_jobs_vue.update_processing_job_data); |
|
|
330 |
}); |
|
|
331 |
|
|
|
332 |
</script> |
|
|
333 |
{% block head %}{% end %} |
|
|
334 |
</head> |
|
|
335 |
|
|
|
336 |
<body style="padding-top: 70px; height: 100%" onload='overlay_check();'> |
|
|
337 |
|
|
|
338 |
<div id="qiita-main" class="qiita-main"> |
|
|
339 |
<div id="navigation-bar" class="navbar navbar-default navbar-inverse navbar-fixed-top"> |
|
|
340 |
<div class="container-fluid"> |
|
|
341 |
<div class="navbar-header"> |
|
|
342 |
<!-- button that appears if the window is re-sized to a smaller size --> |
|
|
343 |
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> |
|
|
344 |
<span class="sr-only">Toggle navigation</span> |
|
|
345 |
<span class="icon-bar"></span> |
|
|
346 |
<span class="icon-bar"></span> |
|
|
347 |
<span class="icon-bar"></span> |
|
|
348 |
</button> |
|
|
349 |
</div> |
|
|
350 |
|
|
|
351 |
<div class="navbar-collapse collapse"> |
|
|
352 |
<ul class="nav navbar-nav"> |
|
|
353 |
<li> |
|
|
354 |
<!-- qiita logo --> |
|
|
355 |
<a class="navbar-brand" rel="home" href="{% raw qiita_config.portal_dir %}/" title="{{portal_styling.title}}"> |
|
|
356 |
<img style="max-width:100px; margin-top: -7px;" src="{% raw qiita_config.portal_dir %}{{portal_styling.logo}}"> |
|
|
357 |
</a> |
|
|
358 |
</li> |
|
|
359 |
<!-- analysis menu --> |
|
|
360 |
{% if user %} |
|
|
361 |
<li class="dropdown"> |
|
|
362 |
<a href="#" data-toggle="dropdown" class="dropdown-toggle" id="analysis-drop-down">Analysis<b class="caret"></b></a> |
|
|
363 |
<ul class="dropdown-menu"> |
|
|
364 |
<li><a href="{% raw qiita_config.portal_dir %}/study/list/">Create new analysis</a> |
|
|
365 |
<li id="selected_samples_menu"><a id="selected_samples_link" href="{% raw qiita_config.portal_dir %}/analysis/selected/">Create From Selected Samples</a></li> |
|
|
366 |
<li><a href="{% raw qiita_config.portal_dir %}/analysis/list/">See Previous Analyses</a></li> |
|
|
367 |
</ul> |
|
|
368 |
</li> |
|
|
369 |
<li class="dropdown"> |
|
|
370 |
<a href="#" data-toggle="dropdown" class="dropdown-toggle">Study<b class="caret"></b></a> |
|
|
371 |
<ul class="dropdown-menu"> |
|
|
372 |
<li><a href="{% raw qiita_config.portal_dir %}/study/create/">Create Study</a></li> |
|
|
373 |
<li><a href="{% raw qiita_config.portal_dir %}/study/list/">View Studies</a></li> |
|
|
374 |
</ul> |
|
|
375 |
</li> |
|
|
376 |
{% set user_level = user.level %} |
|
|
377 |
{% if user_level in ('admin', 'wet-lab admin') %} |
|
|
378 |
<li class="dropdown"> |
|
|
379 |
<a href="#" data-toggle="dropdown" class="dropdown-toggle">Admin<b class="caret"></b></a> |
|
|
380 |
<ul class="dropdown-menu"> |
|
|
381 |
{% if qiita_config.portal == "QIITA" %} |
|
|
382 |
{% if user_level == 'admin' %} |
|
|
383 |
<li><a href="{% raw qiita_config.portal_dir %}/admin/error/">View Errors</a></li> |
|
|
384 |
<li><a href="{% raw qiita_config.portal_dir %}/admin/approval/">View Studies awaiting approval</a></li> |
|
|
385 |
<li><a href="{% raw qiita_config.portal_dir %}/admin/portals/studies/">Edit study portal connections</a></li> |
|
|
386 |
<li><a href="{% raw qiita_config.portal_dir %}/admin/purge_users/">Purge non-validated users</a></li> |
|
|
387 |
<li><a href="{% raw qiita_config.portal_dir %}/admin/resources/">View Resource Allocation Plots</a></li> |
|
|
388 |
{% end %} |
|
|
389 |
<li><a href="{% raw qiita_config.portal_dir %}/admin/sample_validation/">Sample Validation</a></li> |
|
|
390 |
<li><a href="{% raw qiita_config.portal_dir %}/admin/processing_jobs/">Processing Jobs</a></li> |
|
|
391 |
{% else %} |
|
|
392 |
<li><a href="/">Admin tasks can only be done in the main Qiita portal</a></li> |
|
|
393 |
{% end %} |
|
|
394 |
</ul> |
|
|
395 |
</li> |
|
|
396 |
{% elif user_level == 'dev' %} |
|
|
397 |
<li class="dropdown"> |
|
|
398 |
<a href="#" data-toggle="dropdown" class="dropdown-toggle">Dev<b class="caret"></b></a> |
|
|
399 |
<ul class="dropdown-menu"> |
|
|
400 |
<li><a href="{% raw qiita_config.portal_dir %}/admin/error/">View Errors</a></li> |
|
|
401 |
</ul> |
|
|
402 |
</li> |
|
|
403 |
{% end %} |
|
|
404 |
{% end %} |
|
|
405 |
</ul> |
|
|
406 |
<!-- show user name and logout button if there's a user logged in --> |
|
|
407 |
{% if user %} |
|
|
408 |
<ul class="nav navbar-nav navbar-right"> |
|
|
409 |
<li> |
|
|
410 |
<a href="{% raw qiita_config.portal_dir %}/profile/">Welcome {{user.id}}</a> |
|
|
411 |
</li> |
|
|
412 |
<li> |
|
|
413 |
<a href="{% raw qiita_config.portal_dir %}/auth/logout/">Log Out</a> |
|
|
414 |
</li> |
|
|
415 |
<li class="dropdown"> |
|
|
416 |
{% set user_messages = current_user.messages(5) %} |
|
|
417 |
{% set unread = len(current_user.unread_messages) %} |
|
|
418 |
<a href="{% raw qiita_config.portal_dir %}/user/messages/"><span class="glyphicon glyphicon-envelope"></span> {% if unread > 0 %}<span style="color:red">({{unread}})</span>{% end %}</a> |
|
|
419 |
<ul class="dropdown-menu info-menu" style="padding: 5px"> |
|
|
420 |
<li class="dropdown-header"><b>INBOX</b></li> |
|
|
421 |
<li role="separator" class="divider"></li> |
|
|
422 |
{% if user_messages %} |
|
|
423 |
{% for _, um, ts, read, _ in user_messages %} |
|
|
424 |
<li class="truncated" {% if read %}style="color:gray;"{% end %}>{%raw um %}<br /><span style="font-size:60%;{% if read %}color:gray;{% end %}">{{ts}}</span></li> |
|
|
425 |
{% end %} |
|
|
426 |
{% else %} |
|
|
427 |
<li>You have no messages</li> |
|
|
428 |
{% end %} |
|
|
429 |
</ul> |
|
|
430 |
</li> |
|
|
431 |
<li class="dropdown"> |
|
|
432 |
<a href="{% raw qiita_config.portal_dir %}/analysis/selected/" id="dflt-sel-info"><span class="glyphicon glyphicon-list-alt"></span></a> |
|
|
433 |
<ul class="dropdown-menu" style="padding: 5px" id='selected-samples-dropdown-menu'> |
|
|
434 |
<li class="dropdown-header"><b>SELECTED SAMPLES</b></li> |
|
|
435 |
<li role="separator" class="divider"></li> |
|
|
436 |
<li><span id="dflt-study-count"></span> Studies</li> |
|
|
437 |
<li><span id="dflt-pd-count"></span> Processed Data</li> |
|
|
438 |
<li><span id="dflt-samp-count"></span> Samples</li> |
|
|
439 |
</ul> |
|
|
440 |
</li> |
|
|
441 |
<li class="dropdown"> |
|
|
442 |
<a href="#" data-toggle='modal' data-target='#qiita-processing' id="dflt-sel-info"><span class="glyphicon glyphicon-tasks"></span></a> |
|
|
443 |
<ul class="dropdown-menu" style="padding: 5px"> |
|
|
444 |
<li class="dropdown-header"><b>JOBS</b></li> |
|
|
445 |
</ul> |
|
|
446 |
</li> |
|
|
447 |
</ul> |
|
|
448 |
<!-- otherwise show the login form --> |
|
|
449 |
{% else %} |
|
|
450 |
<form action="{% raw qiita_config.portal_dir %}/auth/create/" class="navbar-form navbar-right"> |
|
|
451 |
<a class="btn btn-primary" href="{% raw qiita_config.portal_dir %}/auth/forgot/"> Reset Password </a> |
|
|
452 |
<input type="submit" value="Sign up" class="btn btn-info"> |
|
|
453 |
</form> |
|
|
454 |
<form class="navbar-form navbar-right" role="form" action="{% raw qiita_config.portal_dir %}/auth/login/" method="post"> |
|
|
455 |
<div class="form-group"> |
|
|
456 |
<input tabindex="1" type="text" id="username" name="username" placeholder="Email" class="form-control"> |
|
|
457 |
</div> |
|
|
458 |
<div class="form-group"> |
|
|
459 |
<input tabindex="2" type="password" id="password" name="password" placeholder="Password" class="form-control"> |
|
|
460 |
</div> |
|
|
461 |
<button tabindex="3" type="submit" class="btn btn-success">Sign in</button> |
|
|
462 |
</form> |
|
|
463 |
{% end %} |
|
|
464 |
<ul class="nav navbar-nav"> |
|
|
465 |
<li> |
|
|
466 |
<a href="/redbiom/">redbiom</a> |
|
|
467 |
</li> |
|
|
468 |
</ul> |
|
|
469 |
<ul class="nav navbar-nav"> |
|
|
470 |
<!-- downloads --> |
|
|
471 |
<li class="dropdown"> |
|
|
472 |
<a href="#" data-toggle="dropdown" class="dropdown-toggle">Help<b class="caret"></b></a> |
|
|
473 |
<ul class="dropdown-menu"> |
|
|
474 |
<li> |
|
|
475 |
<a href="http://cmi-workshop.readthedocs.io/en/latest/">Tutorial</a> |
|
|
476 |
</li> |
|
|
477 |
<li> |
|
|
478 |
<a href="{% raw qiita_config.portal_dir %}/static/doc/html/index.html">Help</a> |
|
|
479 |
</li> |
|
|
480 |
</ul> |
|
|
481 |
</li> |
|
|
482 |
</ul> |
|
|
483 |
<ul class="nav navbar-nav"> |
|
|
484 |
<!-- generic elements --> |
|
|
485 |
<li class="dropdown"> |
|
|
486 |
<a href="#" data-toggle="dropdown" class="dropdown-toggle">Software<b class="caret"></b></a> |
|
|
487 |
<ul class="dropdown-menu"> |
|
|
488 |
<li> |
|
|
489 |
<a href="{% raw qiita_config.portal_dir %}/software/">Available Software</a> |
|
|
490 |
</li> |
|
|
491 |
<li> |
|
|
492 |
<a href="{% raw qiita_config.portal_dir %}/workflows/">Recommended Workflows</a> |
|
|
493 |
</li> |
|
|
494 |
</ul> |
|
|
495 |
</li> |
|
|
496 |
</ul> |
|
|
497 |
<ul class="nav navbar-nav"> |
|
|
498 |
<!-- generic elements --> |
|
|
499 |
<li class="dropdown"> |
|
|
500 |
<a href="#" data-toggle="dropdown" class="dropdown-toggle">More Info<b class="caret"></b></a> |
|
|
501 |
<ul class="dropdown-menu"> |
|
|
502 |
<li> |
|
|
503 |
<a href="{% raw qiita_config.portal_dir %}/stats/">Stats</a> |
|
|
504 |
</li> |
|
|
505 |
<li> |
|
|
506 |
<a href="http://github.com/biocore/qiita">GitHub</a> |
|
|
507 |
</li> |
|
|
508 |
<li> |
|
|
509 |
<a href="https://github.com/biocore/qiita/blob/master/README.rst#current-features">Current and Future Features</a> |
|
|
510 |
</li> |
|
|
511 |
<li role="separator" class="divider"></li> |
|
|
512 |
<li> |
|
|
513 |
<a type="button" data-toggle="modal" data-target=".qiita_pet_download_confirm"> |
|
|
514 |
Download public BIOM and metadata files |
|
|
515 |
<small> |
|
|
516 |
<br/><b>MD5:</b> {{biom_metadata_release[0]}} |
|
|
517 |
<br/><b>Last update:</b> {{biom_metadata_release[2]}} |
|
|
518 |
</small> |
|
|
519 |
</a> |
|
|
520 |
</li> |
|
|
521 |
<li role="separator" class="divider"></li> |
|
|
522 |
<li> |
|
|
523 |
<a type="button" href="{% raw qiita_config.portal_dir %}/release/download/archive"> |
|
|
524 |
BETA: Download Archive files (for example, deblur trees) |
|
|
525 |
<small> |
|
|
526 |
<br/><b>MD5:</b> {{archive_release[0]}} |
|
|
527 |
<br/><b>Last update:</b> {{archive_release[2]}} |
|
|
528 |
</small> |
|
|
529 |
</a> |
|
|
530 |
</li> |
|
|
531 |
<li role="separator" class="divider"></li> |
|
|
532 |
<li> |
|
|
533 |
<a href="https://github.com/qiita-spots/qiita/releases"> |
|
|
534 |
<h6> |
|
|
535 |
<b>Current version:</b></br> |
|
|
536 |
{{qiita_version}} {{qiita_sha[0:7]}} |
|
|
537 |
</h6> |
|
|
538 |
</a> |
|
|
539 |
</li> |
|
|
540 |
|
|
|
541 |
</ul> |
|
|
542 |
</li> |
|
|
543 |
</ul> |
|
|
544 |
</div> <!--/.navbar-collapse --> |
|
|
545 |
</div> |
|
|
546 |
</div> <!--/.main nav-bar --> |
|
|
547 |
|
|
|
548 |
<div class="modal fade qiita_pet_download_confirm" tabindex="-1" role="dialog" aria-labelledby="Confirm download"> |
|
|
549 |
<div class="modal-dialog modal-lg" role="document"> |
|
|
550 |
<div class="modal-content"> |
|
|
551 |
<div class="modal-header"> |
|
|
552 |
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> |
|
|
553 |
<h4 class="modal-title">File really big.</h4> |
|
|
554 |
</div> |
|
|
555 |
<div class="modal-body"> |
|
|
556 |
<p>The file you're trying to download is really big. Would you like to proceed?</p> |
|
|
557 |
</div> |
|
|
558 |
<div class="modal-footer"> |
|
|
559 |
<button type="button" class="btn btn-danger" data-dismiss="modal">No</button> |
|
|
560 |
<button type="button" class="btn btn-success" id="qiita_download_accept">Yes</button> |
|
|
561 |
</div> |
|
|
562 |
</div> |
|
|
563 |
</div> |
|
|
564 |
</div> |
|
|
565 |
|
|
|
566 |
|
|
|
567 |
{% if message != '' %} |
|
|
568 |
{% if level not in {'danger', 'success', 'info', 'warning'} %} |
|
|
569 |
{% set level = 'info' %} |
|
|
570 |
{% end %} |
|
|
571 |
<div class="alert alert-{{ level }} alert-dismissable"> |
|
|
572 |
<a href="#" class="close" data-dismiss="alert">×</a> |
|
|
573 |
<p align="center"> |
|
|
574 |
{% raw message %} |
|
|
575 |
</p> |
|
|
576 |
</div> |
|
|
577 |
{% end %} |
|
|
578 |
|
|
|
579 |
<!-- all templates should override this portion to present their main content --> |
|
|
580 |
<div id="template-content" class="container-fluid" style="width:97%"> |
|
|
581 |
{% block content %}{% end %} |
|
|
582 |
</div> |
|
|
583 |
</div> <!--/.main nav-bar --> |
|
|
584 |
|
|
|
585 |
<div id="footer" style="font-size: 12px; text-align: center; z-index: 1000;"> |
|
|
586 |
Thank you for using Qiita. <a target="_blank" href="{% raw qiita_config.portal_dir %}/static/doc/html/faq.html#how-to-cite-qiita">Citing Qiita?</a>. |
|
|
587 |
<br/> |
|
|
588 |
Questions? <a href="mailto:{% raw qiita_config.help_email %}">{% raw qiita_config.help_email %}</a>; don't forget to add your study or analysis id. |
|
|
589 |
<br/> |
|
|
590 |
Read our <a href="{% raw qiita_config.portal_dir %}/iframe/?iframe=qiita-terms">terms and conditions</a>. |
|
|
591 |
</div> |
|
|
592 |
<div id="overlay" class="navbar-brand" style="visibility: hidden; position: absolute; left: 0px; top: 0px; width: 100%; height: 100%; font-size: 13px; text-align: center; z-index: 1000; background-color: #333333; color: #FFFFFF;"> |
|
|
593 |
<img src="{% raw qiita_config.portal_dir %}{{portal_styling.logo}}" alt="Qiita logo" id="small-logo"/> |
|
|
594 |
<h1>This site only works with the following browsers</h1> |
|
|
595 |
|
|
|
596 |
</div> |
|
|
597 |
</div> |
|
|
598 |
|
|
|
599 |
<!-- the jobs list is shown as a modal view --> |
|
|
600 |
<div id="qiita-processing" class="modal fade" role="dialog"> |
|
|
601 |
<div class="modal-dialog"> |
|
|
602 |
|
|
|
603 |
<div class="modal-content"> |
|
|
604 |
<div class="modal-header"> |
|
|
605 |
<button type="button" class="close" data-dismiss="modal">×</button> |
|
|
606 |
<h4 class="modal-title">Active Jobs</h4> |
|
|
607 |
<h6 class="modal-title">succesful jobs are not shown</h6> |
|
|
608 |
</div> |
|
|
609 |
|
|
|
610 |
<div id='processing-jobs-table' class="modal-body"> |
|
|
611 |
Search: <input v-model="search"> |
|
|
612 |
<hr> |
|
|
613 |
<data-table-processing-jobs :jobs="filteredJobs"></data-table-processing-jobs> |
|
|
614 |
</div> |
|
|
615 |
|
|
|
616 |
<div class="modal-footer"> |
|
|
617 |
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button> |
|
|
618 |
</div> |
|
|
619 |
</div> |
|
|
620 |
|
|
|
621 |
</div> |
|
|
622 |
</div> |
|
|
623 |
|
|
|
624 |
</body> |
|
|
625 |
</html> |