#12 -- Show mark if entity is present

merge-requests/8/head
Anton Romanov 3 years ago
parent c072e1ec80
commit 1b468746da

@ -1,3 +1,8 @@
/*
* Copyright (C) 2021 Anton Romanov - All Rights Reserved
* You may use, distribute and modify this code, please write to: romanov73@gmail.com.
*/
package ru.ulstu.extractor.model;
import org.hibernate.annotations.Fetch;
@ -84,4 +89,8 @@ public class Commit extends BaseEntity {
public void setBranch(Branch branch) {
this.branch = branch;
}
public boolean containsEntity() {
return fileChanges.stream().anyMatch(FileChange::isContainsEntity);
}
}

@ -86,6 +86,7 @@
<th scope="col">Автор</th>
<th scope="col" style="width: 30%">Дата</th>
<th scope="col">Сообщение</th>
<th scope="col" align="center">Содержит сущность</th>
</tr>
</thead>
<tbody>
@ -93,6 +94,12 @@
<td th:text="${commit.author.name}"></td>
<td th:text="${commit.date}"></td>
<td th:text="${commit.message}"></td>
<td align="center">
<div class="form-group form-check">
<input type="checkbox" class="form-check-input" th:checked="${commit.containsEntity()}"
disabled>
</div>
</td>
</tr>
</tbody>
</table>

Loading…
Cancel
Save