Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Portail de données
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TEMPO
Portail de données
Merge requests
!4
spécifier les messages d'échec de synchronisation
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
spécifier les messages d'échec de synchronisation
10602-message-delai-synchro
into
main
Overview
0
Commits
1
Pipelines
1
Changes
4
Merged
Olivier Maury
requested to merge
10602-message-delai-synchro
into
main
1 week ago
Overview
0
Commits
1
Pipelines
1
Changes
4
Expand
fixes #10602
0
0
Merge request reports
Compare
main
main (base)
and
latest version
latest version
e16c2d50
1 commit,
1 week ago
4 files
+
26
−
6
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
4
Search (e.g. *.vue) (Ctrl+P)
src/main/java/fr/soeretempo/gwt/server/resources/mail/MailService.java
+
16
−
4
Options
@@ -313,10 +313,22 @@ public class MailService {
sendEmailToAdminTeam
(
mailBody
,
adminI18n
.
i18n
(
"emailFailedSynchronizationSubject"
,
dataSourceName
));
}
/**
* Send an email to admin when a synchronization failed due to timeout.
*
* @param dataSource the data source for which synchronization failed
*/
public
void
notifyUnreacheableDataSource
(
final
DataSource
dataSource
)
{
LOGGER
.
traceEntry
();
final
String
dataSourceName
=
dataSource
.
getName
();
final
String
mailBody
=
adminI18n
.
i18n
(
"emailUnreacheableDataSourceBody"
,
dataSourceName
);
sendEmailToAdminTeam
(
mailBody
,
adminI18n
.
i18n
(
"emailFailedSynchronizationSubject"
,
dataSourceName
));
}
/**
* Email an account on non-verified email addresses to remind to validate them.
*
@param account
*
account which has no verified email
*
*
@param account
account which has no verified email
*/
public
void
remindToValidateEmailAddress
(
final
Account
account
)
{
LOGGER
.
traceEntry
();
@@ -702,9 +714,9 @@ public class MailService {
locale
=
Locale
.
FRENCH
;
final
String
supportEmail
=
props
.
getProperty
(
MAIL_SMTP_TO
);
final
LocalDateTime
date
=
LocalDateTime
.
now
();
final
DateTimeFormatter
dtf
=
DateTimeFormatter
.
ofPattern
(
"dd MMMM, HH:mm:ss"
);
final
DateTimeFormatter
dtf
=
DateTimeFormatter
.
ofPattern
(
"dd MMMM, HH:mm:ss"
,
locale
);
final
Mail
mail
=
new
Mail
(
subject
);
mail
.
setMessage
(
dtf
.
format
(
date
)
+
"\n\n"
+
adminI18n
.
i18n
(
"hello"
)
+
" "
+
supportEmail
+
"
,
\n\n"
+
mailBody
);
mail
.
setMessage
(
dtf
.
format
(
date
)
+
"\n\n"
+
adminI18n
.
i18n
(
"hello"
,
supportEmail
)
+
"\n\n"
+
mailBody
);
mail
.
setTo
(
supportEmail
);
// Sending
try
{
Loading