Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
minerva
core
Commits
6ddea5bd
Commit
6ddea5bd
authored
Aug 27, 2019
by
Piotr Gawron
Browse files
info about affected project is in the email
parent
4627316a
Changes
3
Hide whitespace changes
Inline
Side-by-side
CHANGELOG
View file @
6ddea5bd
...
...
@@ -6,6 +6,8 @@ minerva (14.0.0~beta.0) unstable; urgency=low
(#813)
* Small improvement: setting "Modify project| checkbox automatically select
"View project" checkbox when editing privileges (#920)
* Small improvement: notification email uses minerva name and id of affected
project (#926)
* Bug fix: work on FF Private Window mode could cause logout or raise an
error on when opening new tab with minerva (#892)
* Bug fix: fetching list of miRnas resulted sometimes in "Internal Server
...
...
service/src/main/java/lcsb/mapviewer/services/impl/LayoutService.java
View file @
6ddea5bd
...
...
@@ -327,8 +327,10 @@ public class LayoutService implements ILayoutService {
layoutDao
.
update
(
layout
);
try
{
getEmailSender
().
sendEmail
(
"MapViewer status"
,
"There was a problem with generating layout "
+
params
.
getName
()
+
". Contact administrator to solve this issue."
,
params
.
getUser
());
getEmailSender
().
sendEmail
(
"Minerva status"
,
"Project: "
+
params
.
getProject
().
getProjectId
()
+
". There was a problem with generating layout "
+
params
.
getName
()
+
". Contact administrator to solve this issue."
,
params
.
getUser
());
}
catch
(
MessagingException
e1
)
{
logger
.
error
(
"Problem with sending email"
,
e1
);
}
...
...
@@ -523,7 +525,7 @@ public class LayoutService implements ILayoutService {
*/
protected
void
sendSuccesfullRemoveEmail
(
String
projectId
,
String
layoutName
,
String
email
)
throws
MessagingException
{
getEmailSender
().
sendEmail
(
"M
apViewer
notification"
,
"Layout "
+
layoutName
+
getEmailSender
().
sendEmail
(
"M
inerva
notification"
,
"Layout "
+
layoutName
+
" in map "
+
projectId
+
" was successfully removed.<br/>"
,
email
);
}
...
...
@@ -539,14 +541,15 @@ public class LayoutService implements ILayoutService {
*/
protected
void
sendSuccessfullGenerationEmail
(
final
CreateLayoutParams
params
,
final
Collection
<
ColorSchema
>
schemas
)
throws
MessagingException
{
StringBuilder
content
=
new
StringBuilder
(
"Layout "
+
params
.
getName
()
+
" generated successfully.\n"
);
StringBuilder
content
=
new
StringBuilder
(
"Project: "
+
params
.
getProject
().
getProjectId
()
+
".\n"
);
content
.
append
(
"Layout "
+
params
.
getName
()
+
" generated successfully.\n"
);
content
.
append
(
"Result of coloring:<br/>"
);
String
table
=
prepareTableResult
(
schemas
,
new
ColorSchemaReader
());
content
.
append
(
table
);
String
email
=
params
.
getProject
().
getNotifyEmail
();
if
(
params
.
getUser
()
!=
null
)
{
// send email to a user who owns the layout
getEmailSender
().
sendEmail
(
"M
apViewer
notification"
,
content
.
toString
(),
params
.
getUser
());
getEmailSender
().
sendEmail
(
"M
inerva
notification"
,
content
.
toString
(),
params
.
getUser
());
// send email to the model owner
if
(
email
!=
null
&&
!
email
.
equals
(
params
.
getUser
().
getEmail
()))
{
...
...
@@ -561,11 +564,11 @@ public class LayoutService implements ILayoutService {
.
append
(
params
.
getProject
().
getProjectId
())
.
append
(
" map."
);
getEmailSender
().
sendEmail
(
"M
apViewer
notification"
,
content
.
toString
(),
email
);
getEmailSender
().
sendEmail
(
"M
inerva
notification"
,
content
.
toString
(),
email
);
}
}
else
if
(
email
!=
null
)
{
// if nobody owns the layout then send it to the model owner
getEmailSender
().
sendEmail
(
"M
apViewer
notification"
,
content
.
toString
(),
email
);
getEmailSender
().
sendEmail
(
"M
inerva
notification"
,
content
.
toString
(),
email
);
}
}
...
...
service/src/main/java/lcsb/mapviewer/services/impl/ProjectService.java
View file @
6ddea5bd
...
...
@@ -993,13 +993,13 @@ public class ProjectService implements IProjectService {
* @param projectId
* identifier of the project
* @param email
* otification email
*
n
otification email
* @throws MessagingException
* thrown when there is a problem with sending email
*/
protected
void
sendSuccesfullRemoveEmail
(
String
projectId
,
String
email
)
throws
MessagingException
{
EmailSender
emailSender
=
new
EmailSender
(
configurationService
);
emailSender
.
sendEmail
(
"M
apViewer
notification"
,
"Map "
+
projectId
+
" was successfully removed.<br/>"
,
email
);
emailSender
.
sendEmail
(
"M
inerva
notification"
,
"Map "
+
projectId
+
" was successfully removed.<br/>"
,
email
);
}
/**
...
...
@@ -1018,7 +1018,7 @@ public class ProjectService implements IProjectService {
content
.
append
(
"There was a problem with generating "
).
append
(
projectName
).
append
(
" map.<br/>"
);
content
.
append
(
e
.
getClass
().
getName
()).
append
(
": "
).
append
(
e
.
getMessage
());
try
{
emailSender
.
sendEmail
(
"M
apViewer
notification"
,
content
.
toString
(),
email
);
emailSender
.
sendEmail
(
"M
inerva
notification"
,
content
.
toString
(),
email
);
}
catch
(
MessagingException
e1
)
{
logger
.
error
(
e1
);
}
...
...
@@ -1034,7 +1034,8 @@ public class ProjectService implements IProjectService {
*/
protected
void
sendSuccesfullEmail
(
Model
originalModel
)
throws
MessagingException
{
EmailSender
emailSender
=
new
EmailSender
(
configurationService
);
emailSender
.
sendEmail
(
"MapViewer notification"
,
"Your map was generated successfully.<br/>"
,
emailSender
.
sendEmail
(
"Minerva notification"
,
"Your map "
+
originalModel
.
getProject
().
getProjectId
()
+
" was generated successfully.<br/>"
,
originalModel
.
getProject
().
getNotifyEmail
());
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment