Resolve "Работа с ветками" #35

Merged
BarminaA merged 1 commits from 6-work-branches into master 2021-03-23 15:23:54 +04:00
2 changed files with 0 additions and 16 deletions
Showing only changes of commit 0f4926ddd8 - Show all commits

View File

@ -38,23 +38,12 @@ public class GitExtractorController {
return "filtering"; return "filtering";
} }
/*@PostMapping("/sendRepo")
public String sendRepo(@ModelAttribute RepoForm repoForm, Model model) {
model.addAttribute("filterForm", new FilterForm(repoForm.getRepo()));
if (repoForm.getBranch() == null) {
return "newRepo";
} else {
return "filtering";
}
}*/
@PostMapping("/sendFilter") @PostMapping("/sendFilter")
public String sendFilter(@ModelAttribute FilterForm filterForm, Model model) { public String sendFilter(@ModelAttribute FilterForm filterForm, Model model) {
if (filterForm.getFilter() == null || filterForm.getFilter().isEmpty()) { if (filterForm.getFilter() == null || filterForm.getFilter().isEmpty()) {
model.addAttribute("error", "'Строка' не должно быть пустым"); model.addAttribute("error", "'Строка' не должно быть пустым");
return "filtering"; return "filtering";
} }
// model.addAttribute("commits", filteringService.getCommits(filterForm.getFilter(), filterForm.getFilter()));
return "resultRepo"; return "resultRepo";
} }
@ -62,7 +51,6 @@ public class GitExtractorController {
public String getBranch(@ModelAttribute RepoForm repoForm, Model model) { public String getBranch(@ModelAttribute RepoForm repoForm, Model model) {
try { try {
gitRepositoryService.cloneOrUpdateRepo(repoForm.getRepo()); gitRepositoryService.cloneOrUpdateRepo(repoForm.getRepo());
// model.addAttribute("branches", gitRepositoryService.getBranches(repoForm.getRepo()));
List<Branch> list = gitRepositoryService.getBranches(repoForm.getRepo()); List<Branch> list = gitRepositoryService.getBranches(repoForm.getRepo());
model.addAttribute("branches", list); model.addAttribute("branches", list);
return "newRepo"; return "newRepo";

View File

@ -12,10 +12,6 @@
<p><b>Фильтровать данные:</b><Br></p> <p><b>Фильтровать данные:</b><Br></p>
По автору По автору
<select class="selectpicker" data-live-search="true"> <select class="selectpicker" data-live-search="true">
<!-- <option th:each="author : ${authors}"-->
<!-- th:value="${author.name}"-->
<!-- th:utext="${author.name}"/>-->
<!-- </option>-->
</select> </select>
Дата с Дата с
<select class="selectpicker" data-live-search="true"> <select class="selectpicker" data-live-search="true">