projectService.saveProject(project);
return "redirect:/projects/" + projectName;
}
@RequestMapping(value = "/projects/{projectName}/setting/timeRange", method = RequestMethod.POST)
public @ResponseBody String timeRange(@PathVariable String projectName, HttpEntity<TimeRange> entity) {
TimeRange timeRange=entity.getBody();
Assert.notNull(timeRange,"time rage should not be null");
Project project = projectService.findProject(projectName);
project.setTimeRange(timeRange);