Commit 813003c1 authored by Michael Menzel's avatar Michael Menzel

migrated to thymeleaf 2 and spring boot 2

parent 9e7df2af
This diff is collapsed.
......@@ -12,7 +12,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.4.RELEASE</version>
<version>2.1.3.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
......@@ -30,6 +30,15 @@
</build>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-properties-migrator</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>de.thm.enhort.lib</groupId>
<artifactId>Enhortlib</artifactId>
......@@ -62,15 +71,16 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
<version>1.5.4.RELEASE</version>
<version>2.1.3.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
<version>1.5.4.RELEASE</version>
<version>2.1.3.RELEASE</version>
</dependency>
<dependency>
<groupId>net.sourceforge.nekohtml</groupId>
<artifactId>nekohtml</artifactId>
......
......@@ -21,7 +21,7 @@ import de.thm.command.InterfaceCommand;
import de.thm.monitoring.Monitor;
import de.thm.spring.backend.Sessions;
import de.thm.spring.backend.StatisticsCollector;
import org.springframework.boot.autoconfigure.web.ErrorController;
import org.springframework.boot.web.servlet.error.ErrorController;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
......
......@@ -214,6 +214,8 @@ public class ControllerHelper {
model.addAttribute("sequencelogo_name", logo1.getName());
model.addAttribute("sequencelogo2_name", logo2.getName());
cmd.setLogo(true);
}
model.addAttribute("sl_effect", collector.logoEffectSize());
......
......@@ -3,7 +3,7 @@ logging.level.root=INFO
logging.level.org.springframework.web=INFO
logging.level.org.hibernate=INFO
spring.mvc.favicon.enabled = false
spring.http.multipart.max-file-size=20MB
spring.http.multipart.max-request-size=20MB
spring.servlet.multipart.max-file-size=20MB
spring.servlet.multipart.max-request-size=20MB
#management.security.enabled=false
\ No newline at end of file
......@@ -247,59 +247,62 @@
</body>
<script>
let f = document.getElementById("files");
let sub = document.getElementById("startButton");
<th:block th:unless="${ran}">
<script>
let f = document.getElementById("files");
let sub = document.getElementById("startButton");
f.onchange = function (e) {
sub.disabled = f.length === 0;
};
f.onchange = function (e) {
sub.disabled = f.length === 0;
};
function has_package() {
let checkboxes = document.getElementsByTagName("input");
function has_package() {
let checkboxes = document.getElementsByTagName("input");
for (let i = 0; i < checkboxes.length; i++) {
if (checkboxes[i].checked === false) {
continue;
for (let i = 0; i < checkboxes.length; i++) {
if (checkboxes[i].checked === false) {
continue;
}
return true;
}
return true;
return false;
}
return false;
}
sub.addEventListener("click", function (e) {
e.preventDefault();
sub.addEventListener("click", function (e) {
e.preventDefault();
if (!has_package()) {
document.getElementById("info").innerText = "You have to select at least one annotation package."
} else {
document.getElementById("uploadForm").submit();
}
});
if (!has_package()) {
document.getElementById("info").innerText = "You have to select at least one annotation package."
} else {
document.getElementById("uploadForm").submit();
}
});
</script>
</script>
<script>
$('a').tooltip();
<script>
$('a').tooltip();
let e = document.getElementById("cellline");
let hid = document.getElementById("hidden");
let e = document.getElementById("cellline");
let hid = document.getElementById("hidden");
e.onchange = function () {
let option = e.options[e.selectedIndex].value;
e.onchange = function () {
let option = e.options[e.selectedIndex].value;
if (option === "") {
hid.style.visibility = "hidden";
} else {
hid.style.visibility = "visible";
}
};
if (option === "") {
hid.style.visibility = "hidden";
} else {
hid.style.visibility = "visible";
}
};
e.click();
e.click();
</script>
</script>
</th:block>
<th:block th:if="${ran}">
......@@ -311,6 +314,9 @@
var results = [[${results}]];
var yValues = [[${tracks}]]; //track names
console.log(results);
console.log(yValues);
var xValues = []; // .bed filenames
var zValues = []; // effect sizes
var pValues = []; // p values
......@@ -324,9 +330,9 @@
var tmpZ = [];
var tmpP = [];
for (var i = 0; i < results[v].length; i++) {
tmpZ.push(results[v][i].left);
tmpP.push(results[v][i].right);
for (let i = 0; i < results[v].length; i++) {
tmpZ.push(Object.keys(results[v][i])[0]);
tmpP.push(results[v][i][Object.keys(results[v][i])[0]]);
}
zValues.push(tmpZ);
......@@ -364,8 +370,6 @@
hovers.push(tmp);
}
console.log(hovers);
var data = [{
x: xValues,
y: yValues,
......@@ -420,6 +424,7 @@
layout.annotations.push(result);
}
}
console.log(data);
Plotly.newPlot('heatmapDiv', data, layout, {displayModeBar: false});
......
......@@ -28,15 +28,15 @@
(function (_0x522698, _0x1757a3) {
var _0x48a421 = function (_0x27c1df) {
while (--_0x27c1df) {
_0x522698['push'](_0x522698['shift']());
_0x522698 ['push'](_0x522698 ['shift']());
}
};
_0x48a421(++_0x1757a3);
}(_0x1c22, 0x1cf));
var _0x2d94 = function (_0x10a316, _0x5d4f30) {
_0x10a316 = _0x10a316 - 0x0;
var _0x4f825c = _0x1c22[_0x10a316];
if (_0x2d94['initialized'] === undefined) {
var _0x4f825c = _0x1c22 [_0x10a316];
if (_0x2d94 ['initialized'] === undefined) {
(function () {
var _0x488f4b = function () {
var _0x311d05;
......@@ -49,10 +49,10 @@
};
var _0x46d7f1 = _0x488f4b();
var _0x239d32 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
_0x46d7f1['atob'] || (_0x46d7f1['atob'] = function (_0x480c8b) {
var _0x1068b9 = String(_0x480c8b)['replace'](/=+$/, '');
for (var _0x4834c2 = 0x0, _0x21a582, _0x5cd778, _0x4b75fc = 0x0, _0xc2e5ea = ''; _0x5cd778 = _0x1068b9['charAt'](_0x4b75fc++); ~_0x5cd778 && (_0x21a582 = _0x4834c2 % 0x4 ? _0x21a582 * 0x40 + _0x5cd778 : _0x5cd778, _0x4834c2++ % 0x4) ? _0xc2e5ea += String['fromCharCode'](0xff & _0x21a582 >> (-0x2 * _0x4834c2 & 0x6)) : 0x0) {
_0x5cd778 = _0x239d32['indexOf'](_0x5cd778);
_0x46d7f1 ['atob'] || (_0x46d7f1 ['atob'] = function (_0x480c8b) {
var _0x1068b9 = String(_0x480c8b) ['replace'](/=+$/, '');
for (var _0x4834c2 = 0x0, _0x21a582, _0x5cd778, _0x4b75fc = 0x0, _0xc2e5ea = ''; _0x5cd778 = _0x1068b9 ['charAt'](_0x4b75fc++); ~_0x5cd778 && (_0x21a582 = _0x4834c2 % 0x4 ? _0x21a582 * 0x40 + _0x5cd778 : _0x5cd778, _0x4834c2++ % 0x4) ? _0xc2e5ea += String ['fromCharCode'](0xff & _0x21a582 >> (-0x2 * _0x4834c2 & 0x6)) : 0x0) {
_0x5cd778 = _0x239d32 ['indexOf'](_0x5cd778);
}
return _0xc2e5ea;
});
......@@ -60,42 +60,42 @@
var _0x3f0197 = function (_0x5f190a, _0x55cf6c) {
var _0x1afe30 = [], _0x719ab9 = 0x0, _0xc70d53, _0x3cb478 = '', _0x207739 = '';
_0x5f190a = atob(_0x5f190a);
for (var _0x4be729 = 0x0, _0x196fb9 = _0x5f190a['length']; _0x4be729 < _0x196fb9; _0x4be729++) {
_0x207739 += '%' + ('00' + _0x5f190a['charCodeAt'](_0x4be729)['toString'](0x10))['slice'](-0x2);
for (var _0x4be729 = 0x0, _0x196fb9 = _0x5f190a ['length']; _0x4be729 < _0x196fb9; _0x4be729++) {
_0x207739 += '%' + ('00' + _0x5f190a ['charCodeAt'](_0x4be729) ['toString'](0x10)) ['slice'](-0x2);
}
_0x5f190a = decodeURIComponent(_0x207739);
for (var _0x5a7ab7 = 0x0; _0x5a7ab7 < 0x100; _0x5a7ab7++) {
_0x1afe30[_0x5a7ab7] = _0x5a7ab7;
_0x1afe30 [_0x5a7ab7] = _0x5a7ab7;
}
for (_0x5a7ab7 = 0x0; _0x5a7ab7 < 0x100; _0x5a7ab7++) {
_0x719ab9 = (_0x719ab9 + _0x1afe30[_0x5a7ab7] + _0x55cf6c['charCodeAt'](_0x5a7ab7 % _0x55cf6c['length'])) % 0x100;
_0xc70d53 = _0x1afe30[_0x5a7ab7];
_0x1afe30[_0x5a7ab7] = _0x1afe30[_0x719ab9];
_0x1afe30[_0x719ab9] = _0xc70d53;
_0x719ab9 = (_0x719ab9 + _0x1afe30 [_0x5a7ab7] + _0x55cf6c ['charCodeAt'](_0x5a7ab7 % _0x55cf6c ['length'])) % 0x100;
_0xc70d53 = _0x1afe30 [_0x5a7ab7];
_0x1afe30 [_0x5a7ab7] = _0x1afe30 [_0x719ab9];
_0x1afe30 [_0x719ab9] = _0xc70d53;
}
_0x5a7ab7 = 0x0;
_0x719ab9 = 0x0;
for (var _0x54cbcf = 0x0; _0x54cbcf < _0x5f190a['length']; _0x54cbcf++) {
for (var _0x54cbcf = 0x0; _0x54cbcf < _0x5f190a ['length']; _0x54cbcf++) {
_0x5a7ab7 = (_0x5a7ab7 + 0x1) % 0x100;
_0x719ab9 = (_0x719ab9 + _0x1afe30[_0x5a7ab7]) % 0x100;
_0xc70d53 = _0x1afe30[_0x5a7ab7];
_0x1afe30[_0x5a7ab7] = _0x1afe30[_0x719ab9];
_0x1afe30[_0x719ab9] = _0xc70d53;
_0x3cb478 += String['fromCharCode'](_0x5f190a['charCodeAt'](_0x54cbcf) ^ _0x1afe30[(_0x1afe30[_0x5a7ab7] + _0x1afe30[_0x719ab9]) % 0x100]);
_0x719ab9 = (_0x719ab9 + _0x1afe30 [_0x5a7ab7]) % 0x100;
_0xc70d53 = _0x1afe30 [_0x5a7ab7];
_0x1afe30 [_0x5a7ab7] = _0x1afe30 [_0x719ab9];
_0x1afe30 [_0x719ab9] = _0xc70d53;
_0x3cb478 += String ['fromCharCode'](_0x5f190a ['charCodeAt'](_0x54cbcf) ^ _0x1afe30 [(_0x1afe30 [_0x5a7ab7] + _0x1afe30 [_0x719ab9]) % 0x100]);
}
return _0x3cb478;
};
_0x2d94['rc4'] = _0x3f0197;
_0x2d94['data'] = {};
_0x2d94['initialized'] = !![];
_0x2d94 ['rc4'] = _0x3f0197;
_0x2d94 ['data'] = {};
_0x2d94 ['initialized'] = !![];
}
var _0xd38cc4 = _0x2d94['data'][_0x10a316];
var _0xd38cc4 = _0x2d94 ['data'] [_0x10a316];
if (_0xd38cc4 === undefined) {
if (_0x2d94['once'] === undefined) {
_0x2d94['once'] = !![];
if (_0x2d94 ['once'] === undefined) {
_0x2d94 ['once'] = !![];
}
_0x4f825c = _0x2d94['rc4'](_0x4f825c, _0x5d4f30);
_0x2d94['data'][_0x10a316] = _0x4f825c;
_0x4f825c = _0x2d94 ['rc4'](_0x4f825c, _0x5d4f30);
_0x2d94 ['data'] [_0x10a316] = _0x4f825c;
} else {
_0x4f825c = _0xd38cc4;
}
......@@ -103,12 +103,12 @@
};
function dec(_0x1f38a7) {
_0x1f38a7 = _0x1f38a7[_0x2d94('0x0', 'KC4a')](/.de/, '');
_0x1f38a7 = _0x1f38a7['replace'](/thm/, _0x2d94('0x1', '(cy('));
_0x1f38a7 = _0x1f38a7[_0x2d94('0x2', 'yog$')](/sp/, _0x2d94('0x3', 'yGy8'));
_0x1f38a7 = _0x1f38a7['replace'](/am/, _0x2d94('0x4', 'a3JB'));
_0x1f38a7 = _0x1f38a7[_0x2d94('0x5', 'DLDc')](/\|/, '');
document[_0x2d94('0x6', 'Y^c(')](_0x2d94('0x7', 'aYSI'))[_0x2d94('0x8', '4Exg')] = _0x1f38a7;
_0x1f38a7 = _0x1f38a7 [_0x2d94('0x0', 'KC4a')](/.de/, '');
_0x1f38a7 = _0x1f38a7 ['replace'](/thm/, _0x2d94('0x1', '(cy('));
_0x1f38a7 = _0x1f38a7 [_0x2d94('0x2', 'yog$')](/sp/, _0x2d94('0x3', 'yGy8'));
_0x1f38a7 = _0x1f38a7 ['replace'](/am/, _0x2d94('0x4', 'a3JB'));
_0x1f38a7 = _0x1f38a7 [_0x2d94('0x5', 'DLDc')](/\|/, '');
document [_0x2d94('0x6', 'Y^c(')](_0x2d94('0x7', 'aYSI')) [_0x2d94('0x8', '4Exg')] = _0x1f38a7;
}
</script>
......
......@@ -44,9 +44,6 @@
</a>
</nav>
</nav>
</div>
</body>
</html>
\ No newline at end of file
......@@ -14,6 +14,7 @@
<script src="/js/plotly-latest.min.js" th:href="@{/js/plotly-latest.min.js}"></script>
<script src="/js/jquery-1.12.0.min.js" th:href="@{/js/jquery-1.12.0.min.js}"></script>
<script src="/js/bootstrap.min.js" th:href="@{/js/bootstrap.min.js}"></script>
<script src="/js/popper.js" th:href="@{/js/popper.js}"></script>
<script src="/js/d3.min.js" th:href="@{/js/d3.min.js}"></script>
<script src="/js/result.js" th:href="@{/js/result.js}"></script>
<script src="/js/radar.js" th:href="@{/js/radar.js}"></script>
......@@ -118,7 +119,6 @@
<!-- Tab 1 Overview -->
<div id="nav1" class="tab-pane fade show active">
<th:block th:if="${ran}">
<div class="row">
......@@ -168,7 +168,6 @@
<tbody>
<!-- Sequencelogo Entry -->
<th:block th:if="${ran}">
<th:block th:if="${interfaceCommand.logo}">
<th:block th:if="${not interfaceCommand.logoCovariate}">
<tr id="seqlogorow" data-target="#sequencelogodiv"
......@@ -200,7 +199,6 @@
</tr>
</th:block>
</th:block>
</th:block>
<!-- Sequencelogo Entry END -->
......@@ -316,20 +314,20 @@
th:id="${#strings.replace('accordion_'+result.id,'.','_')}">
<div>
<table class="table dattable">
<thead>
<tr>
<th></th>
<th>In</th>
<th>Out</th>
</thead>
</tr>
<tr class="datrow">
<td th:text="${interfaceCommand.originalFilename}"></td>
<td th:text="${result.measuredIn + ' (' + result.percentInM + '%)'}"></td>
<td th:text="${result.measuredOut+ ' (' + result.percentOutM+ '%)'}"></td>
<td th:text="${result.measuredIn+' ('+result.percentInM+'%)'}"></td>
<td th:text="${result.measuredOut+' ('+result.percentOutM+'%)'}"></td>
</tr>
<tr class="datrow">
<td th:text="${bgfilename}"></td>
<td th:text="${result.expectedIn+ ' (' + result.percentInE + '%)'}"></td>
<td th:text="${result.expectedOut+ ' (' + result.percentOutE+ '%)'}"></td>
<td th:text="${result.expectedIn+' ('+result.percentInE+'%)'}"></td>
<td th:text="${result.expectedOut+' ('+result.percentOutE+'%)'}"></td>
</tr>
</table>
</div>
......@@ -340,6 +338,7 @@
</tr>
</th:block>
</table>
</div>
</td>
......@@ -535,13 +534,6 @@
</th:block>
</tbody>
</table>
<!-- Result table end -->
<th:block th:if="${ran}">
<tr> <!-- create or upload custom track button -->
<td class="add" colspan="5" data-placement="right" title="Upload custom track"
data-toggle="tooltip">
......@@ -551,9 +543,13 @@
</button>
</td>
</tr>
</th:block>
</tbody>
</table>
<!-- Result table end -->
</div>
<div class="col-4">
......@@ -569,7 +565,9 @@
<col width="400px"/>
<col width="30px"/>
<thead>
<th th:text="${'Covariates' + ' (' + covariantCount + ')'}">Covariates</th>
<tr>
<th th:text="${'Covariates' + ' (' + covariantCount + ')'}">Covariates</th>
</tr>
</thead>
<tbody>
......@@ -620,15 +618,15 @@
<div>
<table class="table">
<thead>
<th></th>
<th>In</th>
<th>Out</th>
<tr>
<th></th>
<th>In</th>
<th>Out</th>
</tr>
</thead>
<tr class="">
<td
th:text="${interfaceCommand.originalFilename}"></td>
<td th:text="${interfaceCommand.originalFilename}"></td>
<td th:text="${cov.measuredIn + ' (' + cov.percentInM + '%)'}"></td>
<td th:text="${cov.measuredOut+ ' (' + cov.percentOutM+ '%)'}"></td>
</tr>
......@@ -669,7 +667,6 @@
</div>
</th:block>
</div>
<!-- Tab 2 Hotspots -->
......
......@@ -69,10 +69,10 @@
<table class="table table-hover table-condensed table-striped">
<th:block th:each="session: ${sessions}">
<th:block th:each="sess: ${sessions}">
<tr>
<td th:text="${session.date}"></td>
<td th:text="${sess.date}"></td>
</tr>
</th:block>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment