From cbae48c23ea937972dbaddba9a025c04390b4918 Mon Sep 17 00:00:00 2001 From: "Artem.Arefev" Date: Tue, 11 Jun 2019 01:18:49 +0400 Subject: [PATCH] #93 users activities analytycs --- .../controller/ActivityController.java | 17 ++++++ .../{user => activity}/model/Activity.java | 3 +- .../model/ActivityElement.java | 6 +- .../repository/ActivityRepository.java | 4 +- .../activity/service/ActivityService.java | 56 +++++++++++++++++++ .../ulstu/core/model/AuthFailureHandler.java | 2 +- src/main/java/ru/ulstu/grant/model/Grant.java | 15 ++++- .../ru/ulstu/grant/service/GrantService.java | 12 +++- src/main/java/ru/ulstu/paper/model/Paper.java | 12 ++++ .../ru/ulstu/paper/service/PaperService.java | 13 +++-- .../java/ru/ulstu/project/model/Project.java | 12 ++++ .../ulstu/project/service/ProjectService.java | 19 ++++--- .../ulstu/user/controller/UserController.java | 10 +++- .../ru/ulstu/user/service/UserService.java | 41 +------------- src/main/resources/application.properties | 6 +- .../resources/templates/users/activities.html | 3 +- 16 files changed, 159 insertions(+), 72 deletions(-) create mode 100644 src/main/java/ru/ulstu/activity/controller/ActivityController.java rename src/main/java/ru/ulstu/{user => activity}/model/Activity.java (96%) rename src/main/java/ru/ulstu/{user => activity}/model/ActivityElement.java (87%) rename src/main/java/ru/ulstu/{user => activity}/repository/ActivityRepository.java (90%) create mode 100644 src/main/java/ru/ulstu/activity/service/ActivityService.java diff --git a/src/main/java/ru/ulstu/activity/controller/ActivityController.java b/src/main/java/ru/ulstu/activity/controller/ActivityController.java new file mode 100644 index 0000000..3aaf43e --- /dev/null +++ b/src/main/java/ru/ulstu/activity/controller/ActivityController.java @@ -0,0 +1,17 @@ +package ru.ulstu.activity.controller; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import ru.ulstu.activity.service.ActivityService; + +@Controller() +@RequestMapping(value = "/activities") +public class ActivityController { + private ActivityService activityService; + + public ActivityController(ActivityService activityService) { + this.activityService = activityService; + } + + +} diff --git a/src/main/java/ru/ulstu/user/model/Activity.java b/src/main/java/ru/ulstu/activity/model/Activity.java similarity index 96% rename from src/main/java/ru/ulstu/user/model/Activity.java rename to src/main/java/ru/ulstu/activity/model/Activity.java index 74849dc..3c5e3e0 100644 --- a/src/main/java/ru/ulstu/user/model/Activity.java +++ b/src/main/java/ru/ulstu/activity/model/Activity.java @@ -1,7 +1,8 @@ -package ru.ulstu.user.model; +package ru.ulstu.activity.model; import org.springframework.format.annotation.DateTimeFormat; import ru.ulstu.core.model.BaseEntity; +import ru.ulstu.user.model.User; import javax.persistence.Column; import javax.persistence.Entity; diff --git a/src/main/java/ru/ulstu/user/model/ActivityElement.java b/src/main/java/ru/ulstu/activity/model/ActivityElement.java similarity index 87% rename from src/main/java/ru/ulstu/user/model/ActivityElement.java rename to src/main/java/ru/ulstu/activity/model/ActivityElement.java index f1e42b6..4e4c716 100644 --- a/src/main/java/ru/ulstu/user/model/ActivityElement.java +++ b/src/main/java/ru/ulstu/activity/model/ActivityElement.java @@ -1,8 +1,8 @@ -package ru.ulstu.user.model; +package ru.ulstu.activity.model; public class ActivityElement { - private int startedCount; - private int completedCount; + private int startedCount = 0; + private int completedCount = 0; public ActivityElement() {} diff --git a/src/main/java/ru/ulstu/user/repository/ActivityRepository.java b/src/main/java/ru/ulstu/activity/repository/ActivityRepository.java similarity index 90% rename from src/main/java/ru/ulstu/user/repository/ActivityRepository.java rename to src/main/java/ru/ulstu/activity/repository/ActivityRepository.java index cc0ec4e..993b339 100644 --- a/src/main/java/ru/ulstu/user/repository/ActivityRepository.java +++ b/src/main/java/ru/ulstu/activity/repository/ActivityRepository.java @@ -1,9 +1,9 @@ -package ru.ulstu.user.repository; +package ru.ulstu.activity.repository; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; -import ru.ulstu.user.model.Activity; +import ru.ulstu.activity.model.Activity; import java.util.Date; import java.util.List; diff --git a/src/main/java/ru/ulstu/activity/service/ActivityService.java b/src/main/java/ru/ulstu/activity/service/ActivityService.java new file mode 100644 index 0000000..980d272 --- /dev/null +++ b/src/main/java/ru/ulstu/activity/service/ActivityService.java @@ -0,0 +1,56 @@ +package ru.ulstu.activity.service; + +import org.springframework.stereotype.Service; +import ru.ulstu.activity.model.Activity; +import ru.ulstu.activity.model.ActivityElement; +import ru.ulstu.activity.repository.ActivityRepository; +import ru.ulstu.user.model.User; + +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@Service +public class ActivityService { + private ActivityRepository activityRepository; + + public ActivityService(ActivityRepository activityRepository) { + this.activityRepository = activityRepository; + } + + public void createActivity(List users, Activity.ActivityState state) { + List activities = new ArrayList<>(); + for (User user : users) { + activities.add(new Activity(user, state)); + } + activityRepository.save(activities); + } + + public Map getUsersActivity(Integer userId, Date dateFrom, Date dateTo) { + List activities = activityRepository.getByUserAndDateInterval(userId, dateFrom, dateTo); + Map dateActivities = new HashMap<>(); + SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); + for (Activity activity : activities) { + String dt = formatter.format(activity.getDate()); + ActivityElement element; + if (!dateActivities.containsKey(dt)) { + element = new ActivityElement(); + } else { + element = dateActivities.get(dt); + } + switch (activity.getActivityState()) { + case TOOK_IN_WORK: + element.incrementStartedCount(); + break; + case COMPLETED: + element.incrementCompletedCount(); + break; + } + dateActivities.put(dt, element); + } + return dateActivities; + } +} diff --git a/src/main/java/ru/ulstu/core/model/AuthFailureHandler.java b/src/main/java/ru/ulstu/core/model/AuthFailureHandler.java index 8b6bd9d..e878622 100644 --- a/src/main/java/ru/ulstu/core/model/AuthFailureHandler.java +++ b/src/main/java/ru/ulstu/core/model/AuthFailureHandler.java @@ -14,7 +14,7 @@ public class AuthFailureHandler implements AuthenticationFailureHandler { @Override public void onAuthenticationFailure(HttpServletRequest request, HttpServletResponse response, AuthenticationException ex) throws IOException { - if (ex.getClass() == UserBlockedException.class) { + if (ex.getCause() instanceof UserBlockedException) { response.sendRedirect("/users/block"); } } diff --git a/src/main/java/ru/ulstu/grant/model/Grant.java b/src/main/java/ru/ulstu/grant/model/Grant.java index 3a50a75..a275b19 100644 --- a/src/main/java/ru/ulstu/grant/model/Grant.java +++ b/src/main/java/ru/ulstu/grant/model/Grant.java @@ -11,11 +11,11 @@ import ru.ulstu.file.model.FileData; import ru.ulstu.paper.model.Paper; import ru.ulstu.project.model.Project; import ru.ulstu.timeline.model.Event; +import ru.ulstu.activity.model.Activity; import ru.ulstu.user.model.User; import javax.persistence.CascadeType; import javax.persistence.DiscriminatorValue; -import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.EnumType; import javax.persistence.Enumerated; @@ -27,8 +27,6 @@ import javax.persistence.ManyToOne; import javax.persistence.OneToMany; import javax.persistence.OrderBy; import javax.persistence.Table; -import javax.persistence.Temporal; -import javax.persistence.TemporalType; import javax.validation.constraints.NotNull; import java.util.ArrayList; import java.util.Collections; @@ -176,6 +174,17 @@ public class Grant extends BaseEntity implements UserActivity, EventSource { return getAuthors(); } + public Activity.ActivityState getCommonActivityState() { + switch (this.status) { + case IN_WORK: + return Activity.ActivityState.TOOK_IN_WORK; + case COMPLETED: + return Activity.ActivityState.COMPLETED; + default: + return null; + } + } + public User getLeader() { return leader; } diff --git a/src/main/java/ru/ulstu/grant/service/GrantService.java b/src/main/java/ru/ulstu/grant/service/GrantService.java index 99387c7..dbb2a44 100644 --- a/src/main/java/ru/ulstu/grant/service/GrantService.java +++ b/src/main/java/ru/ulstu/grant/service/GrantService.java @@ -6,6 +6,7 @@ import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.Errors; +import ru.ulstu.activity.service.ActivityService; import ru.ulstu.deadline.model.Deadline; import ru.ulstu.deadline.service.DeadlineService; import ru.ulstu.file.model.FileDataDto; @@ -26,6 +27,7 @@ import ru.ulstu.user.service.UserService; import java.io.IOException; import java.text.ParseException; +import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.Date; @@ -53,6 +55,7 @@ public class GrantService extends BaseService { private final GrantNotificationService grantNotificationService; private final KiasService kiasService; private final PingService pingService; + private final ActivityService activityService; public GrantService(GrantRepository grantRepository, FileService fileService, @@ -63,7 +66,8 @@ public class GrantService extends BaseService { EventService eventService, GrantNotificationService grantNotificationService, KiasService kiasService, - PingService pingService) { + PingService pingService, + ActivityService activityService) { this.grantRepository = grantRepository; this.kiasService = kiasService; this.baseRepository = grantRepository; @@ -75,6 +79,7 @@ public class GrantService extends BaseService { this.eventService = eventService; this.grantNotificationService = grantNotificationService; this.pingService = pingService; + this.activityService = activityService; } public GrantDto getExistGrantById(Integer id) { @@ -95,6 +100,7 @@ public class GrantService extends BaseService { Grant newGrant = copyFromDto(new Grant(), grantDto); newGrant = grantRepository.save(newGrant); eventService.createFromObject(newGrant, Collections.emptyList(), false, "гранта"); + activityService.createActivity(new ArrayList<>(newGrant.getAuthors()), newGrant.getCommonActivityState()); grantNotificationService.sendCreateNotification(newGrant); return newGrant; } @@ -137,6 +143,7 @@ public class GrantService extends BaseService { Grant grant = findById(grantDto.getId()); Set oldAuthors = new HashSet<>(grant.getAuthors()); User oldLeader = grant.getLeader(); + Grant.GrantStatus oldStatus = grant.getStatus(); for (FileDataDto file : grantDto.getFiles().stream() .filter(f -> f.isDeleted() && f.getId() != null) .collect(toList())) { @@ -158,6 +165,9 @@ public class GrantService extends BaseService { if (grant.getLeader() != oldLeader) { grantNotificationService.sendLeaderChangeNotification(grant, oldLeader); } + if(grant.getStatus() != oldStatus) { + activityService.createActivity(new ArrayList<>(grant.getAuthors()), grant.getCommonActivityState()); + } eventService.updateGrantDeadlines(grant); return grant.getId(); } diff --git a/src/main/java/ru/ulstu/paper/model/Paper.java b/src/main/java/ru/ulstu/paper/model/Paper.java index 32a1e5e..ccf3289 100644 --- a/src/main/java/ru/ulstu/paper/model/Paper.java +++ b/src/main/java/ru/ulstu/paper/model/Paper.java @@ -11,6 +11,7 @@ import ru.ulstu.deadline.model.Deadline; import ru.ulstu.file.model.FileData; import ru.ulstu.grant.model.Grant; import ru.ulstu.timeline.model.Event; +import ru.ulstu.activity.model.Activity; import ru.ulstu.user.model.User; import javax.persistence.CascadeType; @@ -323,4 +324,15 @@ public class Paper extends BaseEntity implements UserActivity, EventSource { public int hashCode() { return Objects.hash(super.hashCode(), title, status, type, createDate, updateDate, deadlines, comment, url, locked, events, files, authors, latexText, conferences, grants); } + + public Activity.ActivityState getCommonActivityState() { + switch (this.status) { + case ON_PREPARATION: + return Activity.ActivityState.TOOK_IN_WORK; + case COMPLETED: + return Activity.ActivityState.COMPLETED; + default: + return null; + } + } } diff --git a/src/main/java/ru/ulstu/paper/service/PaperService.java b/src/main/java/ru/ulstu/paper/service/PaperService.java index 0275000..18fb76f 100644 --- a/src/main/java/ru/ulstu/paper/service/PaperService.java +++ b/src/main/java/ru/ulstu/paper/service/PaperService.java @@ -3,6 +3,7 @@ package ru.ulstu.paper.service; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import ru.ulstu.activity.service.ActivityService; import ru.ulstu.deadline.model.Deadline; import ru.ulstu.deadline.service.DeadlineService; import ru.ulstu.file.model.FileDataDto; @@ -57,6 +58,7 @@ public class PaperService { private final EventService eventService; private final ReferenceRepository referenceRepository; private final PingService pingService; + private final ActivityService activityService; public PaperService(PaperRepository paperRepository, ReferenceRepository referenceRepository, @@ -65,7 +67,8 @@ public class PaperService { UserService userService, DeadlineService deadlineService, EventService eventService, - PingService pingService) { + PingService pingService, + ActivityService activityService) { this.paperRepository = paperRepository; this.referenceRepository = referenceRepository; this.fileService = fileService; @@ -74,6 +77,7 @@ public class PaperService { this.deadlineService = deadlineService; this.eventService = eventService; this.pingService = pingService; + this.activityService = activityService; } public List findAll() { @@ -202,10 +206,7 @@ public class PaperService { if (paper.getStatus() != oldStatus) { paperNotificationService.statusChangeNotification(paper, oldStatus); - - if (paper.getStatus() == Paper.PaperStatus.ON_PREPARATION) { - userService.createActivityTookToWork(new ArrayList<>(paper.getAuthors())); - } + activityService.createActivity(new ArrayList<>(paper.getAuthors()), paper.getCommonActivityState()); } return paper.getId(); @@ -246,7 +247,9 @@ public class PaperService { paper = paperRepository.save(paper); paperNotificationService.sendCreateNotification(paper); + eventService.createFromPaper(paper); + activityService.createActivity(new ArrayList<>(paper.getAuthors()), paper.getCommonActivityState()); return paper; } diff --git a/src/main/java/ru/ulstu/project/model/Project.java b/src/main/java/ru/ulstu/project/model/Project.java index 6c60052..224c91e 100644 --- a/src/main/java/ru/ulstu/project/model/Project.java +++ b/src/main/java/ru/ulstu/project/model/Project.java @@ -10,6 +10,7 @@ import ru.ulstu.deadline.model.Deadline; import ru.ulstu.file.model.FileData; import ru.ulstu.grant.model.Grant; import ru.ulstu.timeline.model.Event; +import ru.ulstu.activity.model.Activity; import ru.ulstu.user.model.User; import javax.persistence.CascadeType; @@ -106,6 +107,17 @@ public class Project extends BaseEntity implements UserActivity, EventSource { event.setProject(this); } + public Activity.ActivityState getCommonActivityState() { + switch (this.status) { + case IN_WORK: + return Activity.ActivityState.TOOK_IN_WORK; + case CLOSED: + return Activity.ActivityState.COMPLETED; + default: + return null; + } + } + public void setTitle(String title) { this.title = title; } diff --git a/src/main/java/ru/ulstu/project/service/ProjectService.java b/src/main/java/ru/ulstu/project/service/ProjectService.java index 2c5d91c..92340c7 100644 --- a/src/main/java/ru/ulstu/project/service/ProjectService.java +++ b/src/main/java/ru/ulstu/project/service/ProjectService.java @@ -3,6 +3,7 @@ package ru.ulstu.project.service; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.thymeleaf.util.StringUtils; +import ru.ulstu.activity.service.ActivityService; import ru.ulstu.deadline.service.DeadlineService; import ru.ulstu.file.model.FileDataDto; import ru.ulstu.file.service.FileService; @@ -17,6 +18,7 @@ import ru.ulstu.user.model.User; import ru.ulstu.user.service.UserService; import java.io.IOException; +import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; @@ -37,14 +39,15 @@ public class ProjectService { private final EventService eventService; private final UserService userService; private final PingService pingService; - + private final ActivityService activityService; public ProjectService(ProjectRepository projectRepository, DeadlineService deadlineService, GrantRepository grantRepository, FileService fileService, EventService eventService, UserService userService, - PingService pingService) { + PingService pingService, + ActivityService activityService) { this.projectRepository = projectRepository; this.deadlineService = deadlineService; this.grantRepository = grantRepository; @@ -52,6 +55,7 @@ public class ProjectService { this.eventService = eventService; this.userService = userService; this.pingService = pingService; + this.activityService = activityService; } public List findAll() { @@ -77,15 +81,17 @@ public class ProjectService { Project newProject = copyFromDto(new Project(), projectDto); newProject = projectRepository.save(newProject); eventService.createFromObject(newProject, Collections.emptyList(), false, "проекта"); - if (projectDto.getStatus() == Project.ProjectStatus.IN_WORK) { - userService.createActivityTookToWork(newProject.getExecutors()); - } + activityService.createActivity(new ArrayList<>(newProject.getExecutors()), newProject.getCommonActivityState()); + return newProject; } @Transactional public Project update(ProjectDto projectDto) throws IOException { Project project = projectRepository.findOne(projectDto.getId()); + if (project.getStatus() != projectDto.getStatus()) { + activityService.createActivity(new ArrayList<>(project.getExecutors()), project.getCommonActivityState()); + } projectRepository.save(copyFromDto(project, projectDto)); eventService.updateProjectDeadlines(project); for (FileDataDto file : projectDto.getFiles().stream() @@ -93,9 +99,6 @@ public class ProjectService { .collect(toList())) { fileService.delete(file.getId()); } - if (projectDto.getStatus() == Project.ProjectStatus.IN_WORK) { - userService.createActivityTookToWork(project.getExecutors()); - } return project; } diff --git a/src/main/java/ru/ulstu/user/controller/UserController.java b/src/main/java/ru/ulstu/user/controller/UserController.java index 0592417..2fdec8e 100644 --- a/src/main/java/ru/ulstu/user/controller/UserController.java +++ b/src/main/java/ru/ulstu/user/controller/UserController.java @@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; +import ru.ulstu.activity.service.ActivityService; import ru.ulstu.configuration.Constants; import ru.ulstu.core.model.response.PageableItems; import ru.ulstu.core.model.response.Response; @@ -20,7 +21,7 @@ import ru.ulstu.odin.controller.OdinController; import ru.ulstu.odin.model.OdinMetadata; import ru.ulstu.odin.model.OdinVoid; import ru.ulstu.odin.service.OdinService; -import ru.ulstu.user.model.ActivityElement; +import ru.ulstu.activity.model.ActivityElement; import ru.ulstu.user.model.User; import ru.ulstu.user.model.UserDto; import ru.ulstu.user.model.UserListDto; @@ -59,16 +60,19 @@ public class UserController extends OdinController { private final UserSessionService userSessionService; private final OdinService odinRolesService; private final OdinService odinSessionsService; + private final ActivityService activityService; public UserController(UserService userService, UserSessionService userSessionService, OdinService odinRolesService, - OdinService odinSessionsService) { + OdinService odinSessionsService, + ActivityService activityService) { super(UserListDto.class, UserDto.class); this.userService = userService; this.userSessionService = userSessionService; this.odinRolesService = odinRolesService; this.odinSessionsService = odinSessionsService; + this.activityService = activityService; } @GetMapping(ROLES_URL) @@ -189,6 +193,6 @@ public class UserController extends OdinController { public Response> getActivitiesList(@RequestParam("userId") Integer userId, @RequestParam("dateFrom") @DateTimeFormat(pattern = "yyyy-MM-dd") Date dateFrom, @RequestParam("dateTo") @DateTimeFormat(pattern = "yyyy-MM-dd") Date dateTo) { - return new Response<>(userService.getUsersActivity(userId, dateFrom, dateTo)); + return new Response<>(activityService.getUsersActivity(userId, dateFrom, dateTo)); } } diff --git a/src/main/java/ru/ulstu/user/service/UserService.java b/src/main/java/ru/ulstu/user/service/UserService.java index 1f28afc..0145182 100644 --- a/src/main/java/ru/ulstu/user/service/UserService.java +++ b/src/main/java/ru/ulstu/user/service/UserService.java @@ -34,8 +34,6 @@ import ru.ulstu.user.error.UserNotFoundException; import ru.ulstu.user.error.UserPasswordsNotValidOrNotMatchException; import ru.ulstu.user.error.UserResetKeyError; import ru.ulstu.user.error.UserSendingMailException; -import ru.ulstu.user.model.Activity; -import ru.ulstu.user.model.ActivityElement; import ru.ulstu.user.model.User; import ru.ulstu.user.model.UserDto; import ru.ulstu.user.model.UserInfoNow; @@ -44,7 +42,7 @@ import ru.ulstu.user.model.UserResetPasswordDto; import ru.ulstu.user.model.UserRole; import ru.ulstu.user.model.UserRoleConstants; import ru.ulstu.user.model.UserRoleDto; -import ru.ulstu.user.repository.ActivityRepository; +import ru.ulstu.activity.repository.ActivityRepository; import ru.ulstu.user.repository.UserRepository; import ru.ulstu.user.repository.UserRoleRepository; import ru.ulstu.user.util.UserUtils; @@ -54,9 +52,7 @@ import ru.ulstu.utils.timetable.model.Lesson; import javax.mail.MessagingException; import java.text.ParseException; -import java.text.SimpleDateFormat; import java.util.ArrayList; -import java.util.Calendar; import java.util.Collections; import java.util.Comparator; import java.util.Date; @@ -439,39 +435,4 @@ public class UserService implements UserDetailsService { userToBlock.setBlocker(getCurrentUser()); userRepository.save(userToBlock); } - - public void createActivityTookToWork(List users) { - List activities = new ArrayList<>(); - for (User user : users) { - activities.add(new Activity(user, Activity.ActivityState.TOOK_IN_WORK)); - } - activityRepository.save(activities); - } - - public void createActivityCompleted(List users) { - List activities = new ArrayList<>(); - for (User user : users) { - activities.add(new Activity(user, Activity.ActivityState.COMPLETED)); - } - activityRepository.save(activities); - } - - public Map getUsersActivity(Integer userId, Date dateFrom, Date dateTo) { - List activities = activityRepository.getByUserAndDateInterval(userId, dateFrom, dateTo); - Map dateActivities = new HashMap<>(); - SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); - for (Activity activity : activities) { - String dt = formatter.format(activity.getDate()); - if (!dateActivities.containsKey(dt)) { - dateActivities.put(dt, new ActivityElement(1, 1)); - - } else { - ActivityElement element = dateActivities.get(dt); - element.incrementCompletedCount(); - element.incrementStartedCount(); - dateActivities.put(dt, element); - } - } - return dateActivities; - } } diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index b95d006..7b30ec0 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -18,7 +18,7 @@ logging.level.com.gargoylesoftware.htmlunit=ERROR # Mail Settings spring.mail.host=smtp.yandex.ru spring.mail.port=465 -spring.mail.username=nio171.ulstu@yandex.ru +spring.mail.username=nio17.ulstu@yandex.ru spring.mail.password=nio17.ulstu.ru spring.mail.properties.mail.smtp.auth=true spring.mail.properties.mail.smtp.ssl.enable=true @@ -26,7 +26,7 @@ spring.mail.properties.mail.smtp.socketFactory.class=javax.net.ssl.SSLSocketFact # JPA Settings spring.datasource.url=jdbc:postgresql://localhost:5432/ng-tracker spring.datasource.username=postgres -spring.datasource.password=password +spring.datasource.password=postgres spring.datasource.driverclassName=org.postgresql.Driver spring.jpa.hibernate.ddl-auto=validate # Liquibase Settings @@ -37,7 +37,7 @@ liquibase.change-log=classpath:db/changelog-master.xml # Application Settings ng-tracker.base-url=http://127.0.0.1:8080 ng-tracker.undead-user-login=admin -ng-tracker.dev-mode=false +ng-tracker.dev-mode=true ng-tracker.debug_email= ng-tracker.use-https=false ng-tracker.check-run=false diff --git a/src/main/resources/templates/users/activities.html b/src/main/resources/templates/users/activities.html index f5c8e1d..33fc831 100644 --- a/src/main/resources/templates/users/activities.html +++ b/src/main/resources/templates/users/activities.html @@ -9,8 +9,7 @@