1 package org.openkilda.controller;
3 import java.util.ArrayList;
6 import javax.servlet.http.HttpServletRequest;
14 import org.springframework.beans.factory.annotation.Autowired;
15 import org.springframework.http.HttpStatus;
16 import org.springframework.http.MediaType;
17 import org.springframework.web.bind.annotation.RequestMapping;
18 import org.springframework.web.bind.annotation.RequestMethod;
19 import org.springframework.web.bind.annotation.RequestParam;
20 import org.springframework.web.bind.annotation.ResponseStatus;
21 import org.springframework.web.bind.annotation.RestController;
22 import org.springframework.web.servlet.ModelAndView;
25 @RequestMapping(
path =
"/useractivity", produces = MediaType.APPLICATION_JSON_VALUE)
40 public ModelAndView
useractivity(
final HttpServletRequest request) {
44 @ResponseStatus(HttpStatus.OK)
45 @RequestMapping(
path =
"/log", method = RequestMethod.GET)
46 public List<
LogInfo> getLogs(final @RequestParam(
name = "userId", required = false) List<Long> userIds,
47 final @RequestParam(
name = "activity", required = false) List<String> activities,
48 final @RequestParam(
name = "startTime", required = false) String startTime,
49 final @RequestParam(
name = "endTime", required = false) String endTime) {
50 return userActivityLogService.getActivityLog(userIds, activities, startTime, endTime);
53 @ResponseStatus(HttpStatus.OK)
54 @RequestMapping(
path =
"/types", method = RequestMethod.GET)
56 List<ActivityTypeInfo> activityTypeInfos =
new ArrayList<>();
59 activityType.getActivityTypeEntity().getActivityName()));
61 return activityTypeInfos;
static final String MENU_USER_ACTIVITY
ModelAndView useractivity(final HttpServletRequest request)
static final String ACTIVITY_LOGS