Resolve "Работа с ветками" #35
@ -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";
|
||||||
|
@ -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">
|
||||||
|
Loading…
Reference in New Issue
Block a user