Show remotes in table with editable URLs on remote page

List all configured remotes in a table with name, editable URL
field with Save button, and per-remote Push/Pull buttons.
Add GitService.listRemotes() and updateRemoteUrl() methods.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-02-27 09:28:43 +01:00
parent 005e0c7d23
commit 4458eb204b
5 changed files with 105 additions and 5 deletions

View File

@@ -4,10 +4,24 @@
<title th:text="'Remote - ' + ${name}">Remote</title>
</head>
<body>
<h2>Remote</h2>
<h2>Remotes</h2>
<table border="0" cellpadding="4" cellspacing="0">
<table border="1" cellpadding="4" cellspacing="0">
<tr>
<th>Name</th>
<th>URL</th>
<th></th>
<th></th>
</tr>
<tr th:each="entry : ${remotes}">
<td th:text="${entry.key}"></td>
<td>
<form method="post" th:action="@{/repo/{name}/update-remote(name=${name})}">
<input type="hidden" name="remote" th:value="${entry.key}">
<input type="text" name="url" th:value="${entry.value}" size="40">
<input type="submit" value="Save">
</form>
</td>
<td>
<form method="post" th:action="@{/repo/{name}/push(name=${name})}">
<input type="submit" value="Push">
@@ -21,5 +35,7 @@
</tr>
</table>
<p th:if="${remotes.isEmpty()}">No remotes configured.</p>
</body>
</html>