diff --git a/.gitignore b/.gitignore index b1933c3..e920055 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,8 @@ # Created by https://www.toptal.com/developers/gitignore/api/intellij,java,maven,gradle,eclipse,netbeans,node # Edit at https://www.toptal.com/developers/gitignore?templates=intellij,java,maven,gradle,eclipse,netbeans,node +data/* + ### Eclipse ### .metadata bin/ diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..9cad71a --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,12 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "type": "java", + "name": "FuzzyControllerApplication", + "request": "launch", + "mainClass": "ru.ulstu.fc.FuzzyControllerApplication", + "projectName": "fuzzy-controller" + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..c5f3f6b --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "java.configuration.updateBuildConfiguration": "interactive" +} \ No newline at end of file diff --git a/src/main/java/ru/ulstu/fc/config/SecurityConfiguration.java b/src/main/java/ru/ulstu/fc/config/SecurityConfiguration.java index 6583cd0..18900be 100644 --- a/src/main/java/ru/ulstu/fc/config/SecurityConfiguration.java +++ b/src/main/java/ru/ulstu/fc/config/SecurityConfiguration.java @@ -14,12 +14,12 @@ import ru.ulstu.fc.user.model.UserRoleConstants; @Configuration @EnableWebSecurity -@EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true) public class SecurityConfiguration { private final Logger log = LoggerFactory.getLogger(SecurityConfiguration.class); private final String[] permittedUrls = new String[]{ - "/login", "/index", + "/login", "/index", "/user/register", "/public/**", "/organizers", "/webjars/**", + "/error", "/register", "/h2-console/*", "/h2-console", "/css/**", "/js/**", "/img/**", "/templates/**", "/webjars/**"}; diff --git a/src/main/java/ru/ulstu/fc/config/TemplateConfiguration.java b/src/main/java/ru/ulstu/fc/config/TemplateConfiguration.java index 118618c..8ecec34 100644 --- a/src/main/java/ru/ulstu/fc/config/TemplateConfiguration.java +++ b/src/main/java/ru/ulstu/fc/config/TemplateConfiguration.java @@ -3,6 +3,7 @@ package ru.ulstu.fc.config; import nz.net.ultraq.thymeleaf.layoutdialect.LayoutDialect; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.thymeleaf.extras.springsecurity6.dialect.SpringSecurityDialect; import org.thymeleaf.spring6.SpringTemplateEngine; import org.thymeleaf.templateresolver.ITemplateResolver; @@ -10,10 +11,11 @@ import org.thymeleaf.templateresolver.ITemplateResolver; public class TemplateConfiguration { @Bean - public SpringTemplateEngine templateEngine(ITemplateResolver templateResolver) { + public SpringTemplateEngine templateEngine(ITemplateResolver templateResolver, SpringSecurityDialect sec) { final SpringTemplateEngine templateEngine = new SpringTemplateEngine(); templateEngine.addTemplateResolver(templateResolver); templateEngine.addDialect(new LayoutDialect()); + templateEngine.addDialect(sec); return templateEngine; } } diff --git a/src/main/java/ru/ulstu/fc/project/controller/ProjectController.java b/src/main/java/ru/ulstu/fc/project/controller/ProjectController.java index 85c28a8..a835938 100644 --- a/src/main/java/ru/ulstu/fc/project/controller/ProjectController.java +++ b/src/main/java/ru/ulstu/fc/project/controller/ProjectController.java @@ -10,18 +10,22 @@ 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.ProjectRulesService; import ru.ulstu.fc.project.service.ProjectService; import ru.ulstu.fc.user.model.UserRoleConstants; @Controller @Hidden @RequestMapping("project") -@Secured({UserRoleConstants.ADMIN}) +@Secured({ UserRoleConstants.ADMIN }) public class ProjectController { private final ProjectService projectService; + private final ProjectRulesService projectRulesService; - public ProjectController(ProjectService projectService) { + public ProjectController(ProjectService projectService, + ProjectRulesService projectRulesService) { this.projectService = projectService; + this.projectRulesService = projectRulesService; } @GetMapping("list") @@ -36,6 +40,8 @@ public class ProjectController { new ProjectForm((id != null && id != 0) ? projectService.getById(id) : new Project())); + + model.addAttribute("rules", projectRulesService.getByProjectId(id)); return "project/edit"; } diff --git a/src/main/java/ru/ulstu/fc/project/repository/RuleRepository.java b/src/main/java/ru/ulstu/fc/project/repository/RuleRepository.java new file mode 100644 index 0000000..6369ff5 --- /dev/null +++ b/src/main/java/ru/ulstu/fc/project/repository/RuleRepository.java @@ -0,0 +1,12 @@ +package ru.ulstu.fc.project.repository; + +import java.util.List; + +import org.springframework.data.jpa.repository.JpaRepository; + +import ru.ulstu.fc.rule.model.Rule; + +public interface RuleRepository extends JpaRepository { + + List findByProjectId(Integer projectId); +} diff --git a/src/main/java/ru/ulstu/fc/project/service/ProjectRulesService.java b/src/main/java/ru/ulstu/fc/project/service/ProjectRulesService.java new file mode 100644 index 0000000..5d00690 --- /dev/null +++ b/src/main/java/ru/ulstu/fc/project/service/ProjectRulesService.java @@ -0,0 +1,21 @@ +package ru.ulstu.fc.project.service; + +import java.util.List; + +import org.springframework.stereotype.Service; + +import ru.ulstu.fc.project.repository.RuleRepository; +import ru.ulstu.fc.rule.model.Rule; + +@Service +public class ProjectRulesService { + private final RuleRepository ruleRepository; + + public ProjectRulesService(RuleRepository ruleRepository) { + this.ruleRepository = ruleRepository; + } + + public List getByProjectId(Integer projectId) { + return ruleRepository.findByProjectId(projectId); + } +} diff --git a/src/main/java/ru/ulstu/fc/rule/controller/InferenceMvcController.java b/src/main/java/ru/ulstu/fc/rule/controller/InferenceMvcController.java index 0e9abef..ebd0f13 100644 --- a/src/main/java/ru/ulstu/fc/rule/controller/InferenceMvcController.java +++ b/src/main/java/ru/ulstu/fc/rule/controller/InferenceMvcController.java @@ -9,6 +9,8 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import ru.ulstu.fc.rule.model.Antecedent; import ru.ulstu.fc.rule.model.InferenceForm; +import ru.ulstu.fc.rule.model.Variable; +import ru.ulstu.fc.rule.model.VariableValue; import ru.ulstu.fc.rule.service.FuzzyInferenceService; import java.util.Arrays; @@ -26,35 +28,38 @@ public class InferenceMvcController { @GetMapping("/") public String initInference(Model model) { - model.addAttribute("ageAntecedents", getAgeAntecedents()); - model.addAttribute("incomeAntecedents", getIncomeAntecedents()); + model.addAttribute("ageValues", getAgeValues()); + model.addAttribute("incomeValues", getIncomeValues()); model.addAttribute("inferenceForm", new InferenceForm()); return "index"; } @RequestMapping(value = "get-inference", method = RequestMethod.POST) public String getInference(@ModelAttribute InferenceForm inferenceForm, Model model) { - model.addAttribute("ageAntecedents", getAgeAntecedents()); - model.addAttribute("incomeAntecedents", getIncomeAntecedents()); + model.addAttribute("ageValues", getAgeValues()); + model.addAttribute("incomeValues", getIncomeValues()); model.addAttribute("inferenceForm", inferenceForm); model.addAttribute("response", fuzzyInferenceService.getFuzzyInference( - Map.of("возраст", Double.valueOf(inferenceForm.getAgeAntecedent()), - "доход", Double.valueOf(inferenceForm.getIncomeAntecedent()) - ))); + Map.of("возраст", Double.valueOf(inferenceForm.getAgeValue()), + "доход", Double.valueOf(inferenceForm.getIncomeValue())))); return "index"; } - private List getAgeAntecedents() { - return Arrays.asList( - new Antecedent("молодой", "30"), - new Antecedent("средний", "45"), - new Antecedent("старый", "60")); + private List getAgeValues() { + Variable var = new Variable("Age"); + var.getValues().addAll(Arrays.asList( + new VariableValue("молодой", 30.0), + new VariableValue("средний", 45.0), + new VariableValue("старый", 60.0))); + return var.getValues(); } - private List getIncomeAntecedents() { - return Arrays.asList( - new Antecedent("небольшой", "20000"), - new Antecedent("средний", "90000"), - new Antecedent("высокий", "200000")); + private List getIncomeValues() { + Variable var = new Variable("Income"); + var.getValues().addAll(Arrays.asList( + new VariableValue("небольшой", 20000.0), + new VariableValue("средний", 90000.0), + new VariableValue("высокий", 200000.0))); + return var.getValues(); } } diff --git a/src/main/java/ru/ulstu/fc/rule/controller/RuleController.java b/src/main/java/ru/ulstu/fc/rule/controller/RuleController.java new file mode 100644 index 0000000..6107baa --- /dev/null +++ b/src/main/java/ru/ulstu/fc/rule/controller/RuleController.java @@ -0,0 +1,48 @@ +package ru.ulstu.fc.rule.controller; + +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.GetMapping; +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.rule.model.Rule; +import ru.ulstu.fc.rule.model.RuleForm; +import ru.ulstu.fc.rule.service.RuleService; + +@Controller +@RequestMapping("rule") +public class RuleController { + private final RuleService ruleService; + + public RuleController(RuleService ruleService) { + this.ruleService = ruleService; + } + + @GetMapping("/edit/{projectId}/{ruleId}") + public String edit(@PathVariable(value = "projectId") Integer projectId, + @PathVariable(value = "ruleId") Integer id, Model model) { + model.addAttribute("projectId", projectId); + model.addAttribute("rule", + new RuleForm((id != null && id != 0) + ? ruleService.getById(id) + : new Rule())); + + return "rule/edit"; + } + + @PostMapping(value = "save", params = "save") + public String save(RuleForm ruleForm, Model model) { + model.addAttribute("rule", ruleService.save(ruleForm)); + return "redirect:/project/edit/" + ruleForm.getProjectId(); + } + + @PostMapping(value = "save", params = "delete") + public String delete(RuleForm ruleForm) { + if (ruleForm != null && ruleForm.getId() != null) { + ruleService.delete(ruleForm); + } + return "redirect:/project/edit/" + ruleForm.getProjectId(); + } +} diff --git a/src/main/java/ru/ulstu/fc/rule/model/Antecedent.java b/src/main/java/ru/ulstu/fc/rule/model/Antecedent.java index 54915e1..7df29b5 100644 --- a/src/main/java/ru/ulstu/fc/rule/model/Antecedent.java +++ b/src/main/java/ru/ulstu/fc/rule/model/Antecedent.java @@ -1,19 +1,25 @@ package ru.ulstu.fc.rule.model; -public class Antecedent { +import jakarta.persistence.Entity; +import jakarta.persistence.ManyToOne; +import ru.ulstu.fc.core.model.BaseEntity; + +@Entity +public class Antecedent extends BaseEntity { + @ManyToOne + private Variable variable; private String value; - private String description; - public Antecedent(String description, String value) { - this.description = description; - this.value = value; + public Variable getVariable() { + return variable; + } + public void setVariable(Variable variable) { + this.variable = variable; } - public String getValue() { return value; } - - public String getDescription() { - return description; + public void setValue(String value) { + this.value = value; } } diff --git a/src/main/java/ru/ulstu/fc/rule/model/Consequent.java b/src/main/java/ru/ulstu/fc/rule/model/Consequent.java new file mode 100644 index 0000000..ae4148c --- /dev/null +++ b/src/main/java/ru/ulstu/fc/rule/model/Consequent.java @@ -0,0 +1,29 @@ +package ru.ulstu.fc.rule.model; + +import jakarta.persistence.Entity; +import jakarta.persistence.ManyToOne; +import ru.ulstu.fc.core.model.BaseEntity; + +@Entity +public class Consequent extends BaseEntity { + @ManyToOne + private Variable variable; + private String value; + + public Variable getVariable() { + return variable; + } + + public void setVariable(Variable variable) { + this.variable = variable; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + +} diff --git a/src/main/java/ru/ulstu/fc/rule/model/InferenceForm.java b/src/main/java/ru/ulstu/fc/rule/model/InferenceForm.java index d336986..7a8ac7e 100644 --- a/src/main/java/ru/ulstu/fc/rule/model/InferenceForm.java +++ b/src/main/java/ru/ulstu/fc/rule/model/InferenceForm.java @@ -1,22 +1,22 @@ package ru.ulstu.fc.rule.model; public class InferenceForm { - private String ageAntecedent; - private String incomeAntecedent; + private String ageValue; + private String incomeValue; - public String getAgeAntecedent() { - return ageAntecedent; + public String getAgeValue() { + return ageValue; } - public void setAgeAntecedent(String ageAntecedent) { - this.ageAntecedent = ageAntecedent; + public void setAgeValue(String ageAntecedent) { + this.ageValue = ageAntecedent; } - public String getIncomeAntecedent() { - return incomeAntecedent; + public String getIncomeValue() { + return incomeValue; } - public void setIncomeAntecedent(String incomeAntecedent) { - this.incomeAntecedent = incomeAntecedent; + public void setIncomeValue(String incomeAntecedent) { + this.incomeValue = incomeAntecedent; } } diff --git a/src/main/java/ru/ulstu/fc/rule/model/Rule.java b/src/main/java/ru/ulstu/fc/rule/model/Rule.java new file mode 100644 index 0000000..cb071cb --- /dev/null +++ b/src/main/java/ru/ulstu/fc/rule/model/Rule.java @@ -0,0 +1,47 @@ +package ru.ulstu.fc.rule.model; + +import java.util.List; + +import jakarta.persistence.Entity; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.OneToMany; +import ru.ulstu.fc.core.model.BaseEntity; +import ru.ulstu.fc.project.model.Project; + +@Entity +public class Rule extends BaseEntity { + @ManyToOne + private Project project; + @OneToMany + private List antecedents; //TODO: AND / OR? + @ManyToOne + private Consequent consequent; + + public Rule() { + } + + public Project getProject() { + return project; + } + + public void setProject(Project project) { + this.project = project; + } + + public List getAntecedents() { + return antecedents; + } + + public void setAntecedents(List antecedents) { + this.antecedents = antecedents; + } + + public Consequent getConsequent() { + return consequent; + } + + public void setConsequent(Consequent consequent) { + this.consequent = consequent; + } + +} diff --git a/src/main/java/ru/ulstu/fc/rule/model/RuleForm.java b/src/main/java/ru/ulstu/fc/rule/model/RuleForm.java new file mode 100644 index 0000000..e9d8629 --- /dev/null +++ b/src/main/java/ru/ulstu/fc/rule/model/RuleForm.java @@ -0,0 +1,32 @@ +package ru.ulstu.fc.rule.model; + +public class RuleForm { + private Integer id; + private Integer projectId; + + public RuleForm() { + } + + public RuleForm(Rule rule) { + this.projectId = (rule == null || rule.getProject() == null) + ? null + : rule.getProject().getId(); + } + + public Integer getProjectId() { + return projectId; + } + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public void setProjectId(Integer projectId) { + this.projectId = projectId; + } + +} diff --git a/src/main/java/ru/ulstu/fc/rule/model/Variable.java b/src/main/java/ru/ulstu/fc/rule/model/Variable.java index ebbc115..57c07a6 100644 --- a/src/main/java/ru/ulstu/fc/rule/model/Variable.java +++ b/src/main/java/ru/ulstu/fc/rule/model/Variable.java @@ -1,10 +1,17 @@ package ru.ulstu.fc.rule.model; +import java.util.ArrayList; import java.util.List; -public class Variable { +import jakarta.persistence.Entity; +import jakarta.persistence.OneToMany; +import ru.ulstu.fc.core.model.BaseEntity; + +@Entity +public class Variable extends BaseEntity { private String name; - private List values; + @OneToMany + private List values = new ArrayList<>(); public Variable() { } @@ -14,6 +21,10 @@ public class Variable { this.values = values; } + public Variable(String name) { + this.name = name; + } + public String getName() { return name; } diff --git a/src/main/java/ru/ulstu/fc/rule/model/VariableValue.java b/src/main/java/ru/ulstu/fc/rule/model/VariableValue.java index 9bc9550..e3d4fe4 100644 --- a/src/main/java/ru/ulstu/fc/rule/model/VariableValue.java +++ b/src/main/java/ru/ulstu/fc/rule/model/VariableValue.java @@ -1,6 +1,10 @@ package ru.ulstu.fc.rule.model; -public class VariableValue { +import jakarta.persistence.Entity; +import ru.ulstu.fc.core.model.BaseEntity; + +@Entity +public class VariableValue extends BaseEntity { private String fuzzyTerm; private Double value; diff --git a/src/main/java/ru/ulstu/fc/rule/service/RuleService.java b/src/main/java/ru/ulstu/fc/rule/service/RuleService.java new file mode 100644 index 0000000..929892a --- /dev/null +++ b/src/main/java/ru/ulstu/fc/rule/service/RuleService.java @@ -0,0 +1,43 @@ +package ru.ulstu.fc.rule.service; + +import org.springframework.stereotype.Service; + +import ru.ulstu.fc.project.repository.RuleRepository; +import ru.ulstu.fc.project.service.ProjectService; +import ru.ulstu.fc.rule.model.Rule; +import ru.ulstu.fc.rule.model.RuleForm; + +@Service +public class RuleService { + private final RuleRepository ruleRepository; + private final ProjectService projectService; + + public RuleService(RuleRepository ruleRepository, ProjectService projectService) { + this.ruleRepository = ruleRepository; + this.projectService = projectService; + } + + public Rule getById(Integer id) { + return ruleRepository + .findById(id) + .orElseThrow(() -> new RuntimeException("Rule not found by id")); + } + + public Object save(RuleForm ruleForm) { + if (ruleForm.getId() == null) { + Rule rule = new Rule(); + rule.setProject(projectService.getById(ruleForm.getProjectId())); + // rule.set... + return ruleRepository.save(rule); + } + Rule dbRule = getById(ruleForm.getId()); + dbRule.setProject(projectService.getById(ruleForm.getProjectId())); + // dbRule.set ... + return ruleRepository.save(dbRule); + } + + public void delete(RuleForm ruleForm) { + getById(ruleForm.getId()); + ruleRepository.deleteById(ruleForm.getId()); + } +} diff --git a/src/main/java/ru/ulstu/fc/user/controller/UserController.java b/src/main/java/ru/ulstu/fc/user/controller/UserController.java new file mode 100644 index 0000000..97fe0d6 --- /dev/null +++ b/src/main/java/ru/ulstu/fc/user/controller/UserController.java @@ -0,0 +1,42 @@ +package ru.ulstu.fc.user.controller; + +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.validation.Errors; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.ModelAttribute; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.context.request.WebRequest; +import org.springframework.web.servlet.ModelAndView; + +import jakarta.servlet.http.HttpServletRequest; +import jakarta.validation.Valid; +import ru.ulstu.fc.user.model.User; +import ru.ulstu.fc.user.model.UserDto; +import ru.ulstu.fc.user.service.UserService; + +@Controller +public class UserController { + private final UserService userService; + + public UserController(UserService userService) { + this.userService = userService; + } + + @GetMapping("/user/register") + public String showRegistrationForm(WebRequest request, Model model) { + UserDto userDto = new UserDto(); + model.addAttribute("user", userDto); + return "register"; + } + + @PostMapping("/user/register") + public String registerUserAccount( + @ModelAttribute("user") @Valid UserDto userDto, + HttpServletRequest request, + Errors errors) { + + userService.createUser(new User(userDto)); + return "redirect:/login"; + } +} diff --git a/src/main/java/ru/ulstu/fc/user/model/User.java b/src/main/java/ru/ulstu/fc/user/model/User.java index 11b3162..1c81271 100644 --- a/src/main/java/ru/ulstu/fc/user/model/User.java +++ b/src/main/java/ru/ulstu/fc/user/model/User.java @@ -6,6 +6,7 @@ import jakarta.persistence.JoinColumn; import jakarta.persistence.JoinTable; import jakarta.persistence.ManyToMany; import jakarta.persistence.Table; +import jakarta.validation.Valid; import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.Pattern; import jakarta.validation.constraints.Size; @@ -46,6 +47,11 @@ public class User extends BaseEntity { this.roles = roles; } + public User(UserDto userDto) { + this.login = userDto.getLogin(); + this.password = userDto.getPassword(); + } + public String getLogin() { return login; } diff --git a/src/main/java/ru/ulstu/fc/user/model/UserDto.java b/src/main/java/ru/ulstu/fc/user/model/UserDto.java new file mode 100644 index 0000000..0a7e064 --- /dev/null +++ b/src/main/java/ru/ulstu/fc/user/model/UserDto.java @@ -0,0 +1,40 @@ +package ru.ulstu.fc.user.model; + +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; + +public class UserDto { + @NotNull + @NotEmpty + private String login; + + @NotNull + @NotEmpty + private String password; + private String matchingPassword; + + public String getLogin() { + return login; + } + + public void setLogin(String login) { + this.login = login; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getMatchingPassword() { + return matchingPassword; + } + + public void setMatchingPassword(String matchingPassword) { + this.matchingPassword = matchingPassword; + } + +} 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/default.html b/src/main/resources/templates/default.html index e6a830d..783a0fc 100644 --- a/src/main/resources/templates/default.html +++ b/src/main/resources/templates/default.html @@ -1,57 +1,71 @@ - + + - + Нечеткий контроллер - + - - - + + + - - -
- -
- -
-
+ \ No newline at end of file diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html index fbeb483..9ac57fb 100644 --- a/src/main/resources/templates/index.html +++ b/src/main/resources/templates/index.html @@ -25,11 +25,11 @@
@@ -40,11 +40,11 @@
diff --git a/src/main/resources/templates/listRules.html b/src/main/resources/templates/listRules.html deleted file mode 100644 index 2b93617..0000000 --- a/src/main/resources/templates/listRules.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - Список правил - - -
- - - - - - - - - - - - - - - - - - - - -
Правила
Еслиито - - - - - - - -
- Добавить правило -
- diff --git a/src/main/resources/templates/login.html b/src/main/resources/templates/login.html index d84a8aa..a903e3b 100644 --- a/src/main/resources/templates/login.html +++ b/src/main/resources/templates/login.html @@ -24,7 +24,8 @@ - + + Регистрация diff --git a/src/main/resources/templates/loginError.html b/src/main/resources/templates/loginError.html index 1d08df3..7decca6 100644 --- a/src/main/resources/templates/loginError.html +++ b/src/main/resources/templates/loginError.html @@ -6,12 +6,11 @@ - +
diff --git a/src/main/resources/templates/project/list.html b/src/main/resources/templates/project/list.html index 69e049c..e5f6165 100644 --- a/src/main/resources/templates/project/list.html +++ b/src/main/resources/templates/project/list.html @@ -3,7 +3,7 @@ xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" xmlns:th="http://www.w3.org/1999/xhtml" layout:decorate="~{default}"> - Список правил + Список проектов
diff --git a/src/main/resources/templates/project/listRules.html b/src/main/resources/templates/project/listRules.html new file mode 100644 index 0000000..52331ad --- /dev/null +++ b/src/main/resources/templates/project/listRules.html @@ -0,0 +1,30 @@ + + + + + Список правил + + +
+

Список правил

+
+
+ 1. Если +
+
+ Переменная +
+
+ есть +
+
+ значение +
+
+ И / ИЛИ +
+
+
+ + \ No newline at end of file diff --git a/src/main/resources/templates/register.html b/src/main/resources/templates/register.html new file mode 100644 index 0000000..be9a380 --- /dev/null +++ b/src/main/resources/templates/register.html @@ -0,0 +1,29 @@ + + +
+

Регистрация

+
+
+ + +

Validation error

+
+
+ + +

Validation error

+
+
+ + +
+ + Вернуться на страницу входа +
+
+ + + \ No newline at end of file diff --git a/src/main/resources/templates/rule/edit.html b/src/main/resources/templates/rule/edit.html new file mode 100644 index 0000000..81b03d1 --- /dev/null +++ b/src/main/resources/templates/rule/edit.html @@ -0,0 +1,29 @@ + + + + Редактирование правила + + +
+

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

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