Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
VIPSLogic
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
VIPS
VIPSLogic
Commits
860e6fc7
Commit
860e6fc7
authored
3 months ago
by
Lene Wasskog
Browse files
Options
Downloads
Patches
Plain Diff
log: Remove chatty info logging
parent
4b209182
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/no/nibio/vips/logic/service/ObservationService.java
+0
-3
0 additions, 3 deletions
.../java/no/nibio/vips/logic/service/ObservationService.java
with
0 additions
and
3 deletions
src/main/java/no/nibio/vips/logic/service/ObservationService.java
+
0
−
3
View file @
860e6fc7
...
@@ -250,7 +250,6 @@ public class ObservationService {
...
@@ -250,7 +250,6 @@ public class ObservationService {
user
!=
null
?
user
.
getOrganizationId
().
getDefaultLocale
()
:
user
!=
null
?
user
.
getOrganizationId
().
getDefaultLocale
()
:
userBean
.
getOrganization
(
organizationId
).
getDefaultLocale
());
userBean
.
getOrganization
(
organizationId
).
getDefaultLocale
());
LOGGER
.
info
(
"Get filtered observations for user {}"
,
user
!=
null
?
user
.
getUserId
()
:
"<no user>"
);
List
<
ObservationListItem
>
observations
=
getFilteredObservationsFromBackend
(
List
<
ObservationListItem
>
observations
=
getFilteredObservationsFromBackend
(
organizationId
,
organizationId
,
observationTimeSeriesId
,
observationTimeSeriesId
,
...
@@ -877,14 +876,12 @@ public class ObservationService {
...
@@ -877,14 +876,12 @@ public class ObservationService {
//retVal.forEach(o->System.out.println(o.getObservationId()));
//retVal.forEach(o->System.out.println(o.getObservationId()));
// If user is not logged in, return only the publicly available observations
// If user is not logged in, return only the publicly available observations
if
(
user
==
null
)
{
if
(
user
==
null
)
{
LOGGER
.
info
(
"Return {} masked public observations for unregistered user"
,
retVal
.
size
());
return
sortObservationsByDateAndId
(
retVal
);
return
sortObservationsByDateAndId
(
retVal
);
}
}
// Else: This is a registered user without special privileges. Show public observations + user's own
// Else: This is a registered user without special privileges. Show public observations + user's own
// Making sure we don't add duplicates
// Making sure we don't add duplicates
Set
<
Integer
>
obsIds
=
retVal
.
stream
().
map
(
o
->
o
.
getObservationId
()).
collect
(
Collectors
.
toSet
());
Set
<
Integer
>
obsIds
=
retVal
.
stream
().
map
(
o
->
o
.
getObservationId
()).
collect
(
Collectors
.
toSet
());
retVal
.
addAll
(
observationBean
.
getObservationsForUser
(
user
).
stream
().
filter
(
o
->
!
obsIds
.
contains
(
o
.
getObservationId
())).
collect
(
Collectors
.
toList
()));
retVal
.
addAll
(
observationBean
.
getObservationsForUser
(
user
).
stream
().
filter
(
o
->
!
obsIds
.
contains
(
o
.
getObservationId
())).
collect
(
Collectors
.
toList
()));
LOGGER
.
info
(
"Return {} masked public observations and user's own observations for registered user {}"
,
retVal
.
size
(),
user
.
getUserId
());
return
sortObservationsByDateAndId
(
retVal
);
return
sortObservationsByDateAndId
(
retVal
);
}
}
...
...
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