-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from EBISPOT/develop
- Loading branch information
Showing
92 changed files
with
2,379 additions
and
552 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
|
||
docker build --force-rm=true -t gwas-deposition-backend:latest . | ||
docker tag gwas-deposition-backend:latest ebispot/gwas-deposition-backend:latest-sandbox | ||
docker push ebispot/gwas-deposition-backend:latest-sandbox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
|
||
kubectl delete deploy gwas-deposition-backend -n gwas | ||
kubectl apply -f /home/tudor/Desktop/_deployment_plans_/gwas-deposition-backend-deployment.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
src/main/java/uk/ac/ebi/spot/gwas/deposition/components/BodyOfWorkListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package uk.ac.ebi.spot.gwas.deposition.components; | ||
|
||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.scheduling.annotation.Async; | ||
import org.springframework.stereotype.Component; | ||
import uk.ac.ebi.spot.gwas.deposition.domain.BodyOfWork; | ||
import uk.ac.ebi.spot.gwas.deposition.domain.BodyOfWorkWatch; | ||
import uk.ac.ebi.spot.gwas.deposition.domain.Submission; | ||
import uk.ac.ebi.spot.gwas.deposition.repository.BodyOfWorkWatchRepository; | ||
|
||
import java.util.Optional; | ||
|
||
@Component | ||
public class BodyOfWorkListener { | ||
|
||
@Autowired | ||
private BodyOfWorkWatchRepository bodyOfWorkWatchRepository; | ||
|
||
@Async | ||
public void update(BodyOfWork bodyOfWork) { | ||
Optional<BodyOfWorkWatch> bodyOfWorkWatchOptional = bodyOfWorkWatchRepository.findByBowId(bodyOfWork.getBowId()); | ||
if (bodyOfWorkWatchOptional.isPresent()) { | ||
BodyOfWorkWatch bodyOfWorkWatch = bodyOfWorkWatchOptional.get(); | ||
bodyOfWorkWatch.setVisited(false); | ||
bodyOfWorkWatchRepository.save(bodyOfWorkWatch); | ||
} | ||
} | ||
|
||
public void update(Submission submission) { | ||
if (submission.getBodyOfWorks() != null) { | ||
if (!submission.getBodyOfWorks().isEmpty()) { | ||
String bowId = submission.getBodyOfWorks().get(0); | ||
bodyOfWorkWatchRepository.insert(new BodyOfWorkWatch(bowId)); | ||
} | ||
} | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
src/main/java/uk/ac/ebi/spot/gwas/deposition/config/BackendMailConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package uk.ac.ebi.spot.gwas.deposition.config; | ||
|
||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Component | ||
public class BackendMailConfig { | ||
|
||
@Value("${gwas-deposition.email-config.subject}") | ||
private String subject; | ||
|
||
@Value("${gwas-deposition.email-config.emails.success}") | ||
private String successEmail; | ||
|
||
@Value("${gwas-deposition.email-config.emails.fail}") | ||
private String failEmail; | ||
|
||
@Value("${gwas-deposition.email-config.base-url}") | ||
private String submissionsBaseURL; | ||
|
||
public String getSubmissionsBaseURL() { | ||
return submissionsBaseURL; | ||
} | ||
|
||
public String getSubject() { | ||
return subject; | ||
} | ||
|
||
public String getSuccessEmail() { | ||
return successEmail; | ||
} | ||
|
||
public String getFailEmail() { | ||
return failEmail; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 0 additions & 57 deletions
57
src/main/java/uk/ac/ebi/spot/gwas/deposition/config/MailConfig.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.