Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nmaas Platform
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
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nmaas
nmaas Platform
Commits
611f5ba1
Commit
611f5ba1
authored
1 month ago
by
kbeyro
Browse files
Options
Downloads
Patches
Plain Diff
get user from database if email exist
parent
b1e6adbe
No related branches found
No related tags found
2 merge requests
!273
Release 1.8.0 update
,
!202
get user from database if email exist
Pipeline
#94164
passed
1 month ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/net/geant/nmaas/externalservices/kubernetes/RemoteClusterManager.java
+9
-1
9 additions, 1 deletion
...aas/externalservices/kubernetes/RemoteClusterManager.java
with
9 additions
and
1 deletion
src/main/java/net/geant/nmaas/externalservices/kubernetes/RemoteClusterManager.java
+
9
−
1
View file @
611f5ba1
...
@@ -20,6 +20,7 @@ import net.geant.nmaas.notifications.templates.MailType;
...
@@ -20,6 +20,7 @@ import net.geant.nmaas.notifications.templates.MailType;
import
net.geant.nmaas.portal.api.domain.UserView
;
import
net.geant.nmaas.portal.api.domain.UserView
;
import
net.geant.nmaas.portal.persistent.entity.Domain
;
import
net.geant.nmaas.portal.persistent.entity.Domain
;
import
net.geant.nmaas.portal.service.DomainService
;
import
net.geant.nmaas.portal.service.DomainService
;
import
net.geant.nmaas.portal.service.UserService
;
import
org.modelmapper.ModelMapper
;
import
org.modelmapper.ModelMapper
;
import
org.springframework.context.ApplicationEventPublisher
;
import
org.springframework.context.ApplicationEventPublisher
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -57,6 +58,7 @@ public class RemoteClusterManager {
...
@@ -57,6 +58,7 @@ public class RemoteClusterManager {
private
final
KubernetesClusterDeploymentManager
kClusterDeploymentManager
;
private
final
KubernetesClusterDeploymentManager
kClusterDeploymentManager
;
private
final
DomainService
domainService
;
private
final
DomainService
domainService
;
private
final
ApplicationEventPublisher
eventPublisher
;
private
final
ApplicationEventPublisher
eventPublisher
;
private
final
UserService
userService
;
public
RemoteClusterView
getClusterView
(
Long
id
)
{
public
RemoteClusterView
getClusterView
(
Long
id
)
{
...
@@ -292,7 +294,13 @@ public class RemoteClusterManager {
...
@@ -292,7 +294,13 @@ public class RemoteClusterManager {
}
}
private
void
sendMail
(
KCluster
kCluster
,
MailType
mailType
)
{
private
void
sendMail
(
KCluster
kCluster
,
MailType
mailType
)
{
UserView
recipient
=
UserView
.
builder
().
email
(
kCluster
.
getContactEmail
()).
username
(
kCluster
.
getContactEmail
()).
selectedLanguage
(
"EN"
).
build
();
UserView
recipient
;
if
(
userService
.
existsByEmail
(
kCluster
.
getContactEmail
()))
{
recipient
=
modelMapper
.
map
(
userService
.
findByEmail
(
kCluster
.
getContactEmail
()),
UserView
.
class
);
}
else
{
recipient
=
UserView
.
builder
().
email
(
kCluster
.
getContactEmail
()).
username
(
kCluster
.
getContactEmail
()).
selectedLanguage
(
"EN"
).
build
();
}
Map
<
String
,
Object
>
attr
=
new
HashMap
<>();
Map
<
String
,
Object
>
attr
=
new
HashMap
<>();
attr
.
put
(
"clusterId"
,
kCluster
.
getId
());
attr
.
put
(
"clusterId"
,
kCluster
.
getId
());
attr
.
put
(
"clusterCodename"
,
kCluster
.
getCodename
());
attr
.
put
(
"clusterCodename"
,
kCluster
.
getCodename
());
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment