Skip to content

Commit

Permalink
Updated default mapping file resolution.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nils Hoffmann committed Feb 20, 2019
1 parent 4eed1b3 commit 1d4ff2c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 187 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>de.isas.mztab</groupId>
<artifactId>mztab-validator-webapp</artifactId>
<version>1.0.12</version>
<version>1.0.14</version>
<packaging>jar</packaging>
<description>A web-based validator for mzTab format version 1.0 onwards.</description>
<name>MzTab validator webapplication.</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.io.ClassPathResource;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
Expand Down Expand Up @@ -118,7 +119,7 @@ public ModelAndView handleHome() throws IOException {
public ModelAndView handleFileUpload(
@ModelAttribute ValidationForm validationForm,
RedirectAttributes redirectAttributes, HttpServletRequest request,
HttpSession session) {
HttpSession session) throws IOException {
if (session == null) {
UriComponents uri = ServletUriComponentsBuilder
.fromServletMapping(request).
Expand All @@ -134,8 +135,7 @@ public ModelAndView handleFileUpload(
UserSessionFile validationFile;
if (validationForm.getMappingFile() == null || validationForm.getMappingFile().isEmpty()) {
validationFile = storageService.
store(ValidationController.class.getResource(
"/static/examples/mzTab-M-mapping.xml"), usf.
store(new ClassPathResource("/mappings/mzTab-M-mapping.xml").getURL(), usf.
getSessionId(), SLOT.MAPPINGFILE);
} else {
validationFile = storageService.store(validationForm.
Expand Down
179 changes: 0 additions & 179 deletions src/main/resources/static/examples/mzTab-M-mapping.xml

This file was deleted.

4 changes: 2 additions & 2 deletions src/main/resources/templates/fragments/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="container-fluid">
<div class="row">
<div class="col-md-4">
<small>Based on <a href="https://github.com/PRIDE-Utilities/jmzTab">jmzTab</a> <span th:if="${page!=null and page.jmztabVersion != null}" th:text="${page.jmztabVersion}"></span> and <a href="https://github.com/nilshoffmann/jmzTab-m">jmzTab-m</a> <span th:if="${page!=null and page.jmztabmVersion != null}" th:text="${page.jmztabmVersion}"></span></small>
<small>Based on <a href="https://github.com/PRIDE-Utilities/jmzTab">jmzTab</a> <span th:if="${page!=null and page.jmztabVersion != null}" th:text="${page.jmztabVersion}"></span> and <a href="https://github.com/lifs-tools/jmzTab-m">jmzTab-m</a> <span th:if="${page!=null and page.jmztabmVersion != null}" th:text="${page.jmztabmVersion}"></span></small>
</div>
<!--
private String title;
Expand All @@ -20,7 +20,7 @@
private String scmBranch;
-->
<div class="col-md-8 text-right">
<small class="text-muted" th:if="${page!=null and page.scmCommitId != null and page.buildDate != null and page.scmBranch != null}">Built on <span th:text="${page.buildDate}"></span> from commit <a th:href="${'https://github.com/nilshoffmann/jmzTab-m-webapp/commit/'+page.scmCommitId}" target="_blank" href="https://github.com/nilshoffmann/jmzTab-m-webapp/commit/"><span th:text="${page.scmCommitId}"></span></a> on branch <span th:text="${page.scmBranch}"></span></small>
<small class="text-muted" th:if="${page!=null and page.scmCommitId != null and page.buildDate != null and page.scmBranch != null}">Built on <span th:text="${page.buildDate}"></span> from commit <a th:href="${'https://github.com/lifs-tools/jmzTab-m-webapp/commit/'+page.scmCommitId}" target="_blank" href="https://github.com/lifs-tools/jmzTab-m-webapp/commit/"><span th:text="${page.scmCommitId}"></span></a> on branch <span th:text="${page.scmBranch}"></span></small>
</div>
</div>
<div class="row">
Expand Down
Loading

0 comments on commit 1d4ff2c

Please sign in to comment.