diff --git a/src/main/java/ru/ulstu/fc/rule/controller/RuleController.java b/src/main/java/ru/ulstu/fc/rule/controller/RuleController.java index 847826d..5788d53 100644 --- a/src/main/java/ru/ulstu/fc/rule/controller/RuleController.java +++ b/src/main/java/ru/ulstu/fc/rule/controller/RuleController.java @@ -7,9 +7,6 @@ import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; -import ru.ulstu.fc.project.model.Project; -import ru.ulstu.fc.project.model.ProjectForm; -import ru.ulstu.fc.project.service.ProjectService; import ru.ulstu.fc.rule.model.Rule; import ru.ulstu.fc.rule.model.RuleForm; @@ -17,7 +14,7 @@ import ru.ulstu.fc.rule.model.RuleForm; @RequestMapping("rule") public class RuleController { private final RuleService ruleService; - + public RuleController(RuleService ruleService) { this.ruleService = ruleService; } @@ -35,7 +32,7 @@ public class RuleController { @PostMapping(value = "save", params = "save") public String save(RuleForm ruleForm, Model model) { model.addAttribute("rule", ruleService.save(ruleForm)); - return "redirect:/project/edit/"+ruleForm.getProjectId(); + return "redirect:/project/edit/" + ruleForm.getProjectId(); } @PostMapping(value = "save", params = "delete") @@ -43,6 +40,6 @@ public class RuleController { if (ruleForm != null && ruleForm.getId() != null) { ruleService.delete(ruleForm); } - return "redirect:/project/edit/"+ruleForm.getProjectId(); + return "redirect:/project/edit/" + ruleForm.getProjectId(); } } diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 261c422..4f4bd5b 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -7,6 +7,8 @@ logging.level.ru.ulstu=DEBUG logging.level.sun.rmi.transport=off logging.level.javax.management.remote.rmi=off logging.level.java.rmi.server=off +logging.level.org.apache.tomcat=INFO +logging.level.org.apache.tomcat.util.net=WARN extractor.custom-projects-dir= server.error.include-stacktrace=always server.error.include-exception=true diff --git a/src/main/resources/templates/rule/edit.html b/src/main/resources/templates/rule/edit.html new file mode 100644 index 0000000..c9551a2 --- /dev/null +++ b/src/main/resources/templates/rule/edit.html @@ -0,0 +1,28 @@ + + + + Редактирование правила + + +
+

Редактирование правила:

+
+ +
+ + +
+ + + + Отмена +
+
+