Skip to content

Commit

Permalink
Merge pull request #715 from OHDSI/release-1.17.0
Browse files Browse the repository at this point in the history
Release 1.17.0
  • Loading branch information
acumarav authored Jan 15, 2021
2 parents a7b8cd4 + cf2ee53 commit 74740fe
Show file tree
Hide file tree
Showing 45 changed files with 846 additions and 585 deletions.
7 changes: 1 addition & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<artifactId>portal</artifactId>
<groupId>com.odysseusinc.arachne</groupId>
<version>1.16.2</version>
<version>1.17.0</version>
<packaging>jar</packaging>

<parent>
Expand Down Expand Up @@ -287,11 +287,6 @@
<groupId>org.thymeleaf</groupId>
<artifactId>thymeleaf-spring4</artifactId>
</dependency>
<dependency>
<groupId>com.cronutils</groupId>
<artifactId>cron-utils</artifactId>
<version>5.0.5</version>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ public JsonResult reindexSolr(@PathVariable("domain") final String domain)
case ArachneConsts.Domains.STUDIES:
studyService.indexAllBySolr();
break;
case ArachneConsts.Domains.ANALYISES:
case ArachneConsts.Domains.ANALYSES:
analysisService.indexAllBySolr();
break;
case ArachneConsts.Domains.PAPERS:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import com.odysseusinc.arachne.commons.api.v1.dto.OptionDTO;
import com.odysseusinc.arachne.commons.api.v1.dto.util.JsonResult;
import com.odysseusinc.arachne.commons.service.messaging.ProducerConsumerTemplate;
import com.odysseusinc.arachne.commons.utils.CommonFilenameUtils;
import com.odysseusinc.arachne.portal.api.v1.dto.AnalysisCreateDTO;
import com.odysseusinc.arachne.portal.api.v1.dto.AnalysisDTO;
import com.odysseusinc.arachne.portal.api.v1.dto.AnalysisFileDTO;
Expand Down Expand Up @@ -611,9 +612,17 @@ public void getAllAnalysisFiles(
@PathVariable("analysisId") Long analysisId,
HttpServletResponse response) throws PermissionDeniedException, NotExistException, IOException {

String archiveName = "analysis_" + analysisId + "_"
+ Long.toString(System.currentTimeMillis())
+ ".zip";
final Analysis analysis = analysisService.getById(analysisId);

final String archiveName;
if (analysis.getStudy() != null) {
archiveName = String.format("%s_%s_code.zip",
CommonFilenameUtils.sanitizeFilename(analysis.getStudy().getTitle()),
CommonFilenameUtils.sanitizeFilename(analysis.getTitle()));
} else {
archiveName = CommonFilenameUtils.sanitizeFilename(analysis.getTitle()) + "_code.zip";
}

String contentType = "application/zip, application/octet-stream";
response.setContentType(contentType);
response.setHeader("Content-type", contentType);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import static org.springframework.web.bind.annotation.RequestMethod.PUT;

import com.odysseusinc.arachne.commons.api.v1.dto.util.JsonResult;
import com.odysseusinc.arachne.commons.utils.CommonFilenameUtils;
import com.odysseusinc.arachne.commons.utils.UserIdUtils;
import com.odysseusinc.arachne.portal.api.v1.dto.AddStudyParticipantDTO;
import com.odysseusinc.arachne.portal.api.v1.dto.BooleanDTO;
Expand All @@ -53,7 +54,6 @@
import com.odysseusinc.arachne.portal.api.v1.dto.UploadFileDTO;
import com.odysseusinc.arachne.portal.api.v1.dto.WorkspaceDTO;
import com.odysseusinc.arachne.portal.api.v1.dto.converters.FileDtoContentHandler;
import com.odysseusinc.arachne.portal.config.tenancy.TenantContext;
import com.odysseusinc.arachne.portal.exception.AlreadyExistException;
import com.odysseusinc.arachne.portal.exception.FieldException;
import com.odysseusinc.arachne.portal.exception.NotExistException;
Expand All @@ -70,7 +70,6 @@
import com.odysseusinc.arachne.portal.model.StudyDataSourceLink;
import com.odysseusinc.arachne.portal.model.StudyFile;
import com.odysseusinc.arachne.portal.model.StudyKind;
import com.odysseusinc.arachne.portal.model.StudyType;
import com.odysseusinc.arachne.portal.model.SubmissionInsight;
import com.odysseusinc.arachne.portal.model.SuggestSearchRegion;
import com.odysseusinc.arachne.portal.model.User;
Expand Down Expand Up @@ -355,7 +354,8 @@ public JsonResult<Boolean> addParticipant(
createdBy,
studyId,
participant.getId(),
addParticipantDTO.getRole()
addParticipantDTO.getRole(),
addParticipantDTO.getMessage()
);

wsTemplate.convertAndSendToUser(
Expand Down Expand Up @@ -482,9 +482,10 @@ public void downloadAllFiles(
@PathVariable("studyId") Long studyId,
HttpServletResponse response) throws PermissionDeniedException, NotExistException, IOException {

String archiveName = "study_" + studyId + "_"
+ Long.toString(System.currentTimeMillis())
+ ".zip";
final Study study = studyService.getById(studyId);

String archiveName = "documents_" + CommonFilenameUtils.sanitizeFilename(study.getTitle()) + ".zip";

String contentType = "application/zip, application/octet-stream";
response.setContentType(contentType);
response.setHeader("Content-type", contentType);
Expand Down
Loading

0 comments on commit 74740fe

Please sign in to comment.