diff options
author | Georg Pfuetzenreuter | 2022-05-06 14:17:49 +0200 |
---|---|---|
committer | Georg Pfuetzenreuter | 2022-05-06 14:17:49 +0200 |
commit | c39416707f7253f1e41032fad5a7bc4dd3c17d38 (patch) | |
tree | 317ec8dda5100e6830d00f3a025ab13e20f7b582 /src/main/resources | |
parent | beb92675071c69b86b5338297822c834ffd548f6 (diff) | |
download | pubsh-web-c39416707f7253f1e41032fad5a7bc4dd3c17d38.tar.gz pubsh-web-c39416707f7253f1e41032fad5a7bc4dd3c17d38.tar.bz2 pubsh-web-c39416707f7253f1e41032fad5a7bc4dd3c17d38.zip |
Implement container deletion
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
Diffstat (limited to 'src/main/resources')
-rw-r--r-- | src/main/resources/application.properties | 1 | ||||
-rw-r--r-- | src/main/resources/templates/portal.html | 23 |
2 files changed, 22 insertions, 2 deletions
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 6ba5acb..3b5a05b 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,3 +1,4 @@ +spring.mvc.hiddenmethod.filter.enabled=true keycloak.auth-server-url=http://192.168.5.9:8080/ keycloak.realm=local-devel keycloak.resource=portal-app diff --git a/src/main/resources/templates/portal.html b/src/main/resources/templates/portal.html index 8cd2ad6..9947bde 100644 --- a/src/main/resources/templates/portal.html +++ b/src/main/resources/templates/portal.html @@ -20,9 +20,28 @@ <tr th:each="container: ${docker_containers}"> <td th:text="${container.names[0]}" /> <td th:text="${container.image}" /> - <td th:text="${container.imageId}" /> + <td th:text="${container.id}" /> <td th:text="${container.status}" /> - <td><input type="hidden" th:value="${container.id}" name="containerID"/><button type="submit" class="removebutton" name="action" value="remove">Remove</button></td> + <!-- td><form id="deletion_pseudoform" action="#" th:action="@{'/frontend/container/delete/{id}'(id=${container.id})}" th:method="delete" > + <input type="hidden" name="_method" value="delete" /> + <button id="deletion_submission" type="submit">Delete</button> +</form></td--> +<td> +<form id="deletion_pseudoform" action="#" th:action="@{'/frontend/container/delete/{id}'(id=${container.id})}" th:method="delete" th:containerid="${container.id}" th:containerShaSum="${container.imageId}" th:onsubmit="return confirm('Do you really want to delete the container with ID ' + this.getAttribute('containerid') + ' which is attached to the image with checksum ' + this.getAttribute('containerShaSum') + ' ?');"> +<!--a + href="" + class="btn btn-danger " + th:data-confirm-delete="|Are you sure you want to delete the container with ID ${container.id}?|" + onclick="if (!confirm(this.getAttribute('data-confirm-delete'))) return false" +> + Delete +</a--> +<button class="btn btn-danger" id="deletion_submission" type="submit">Delete</button> +</form> +</td> + <!-- th:data-confirm-delete="|Are you sure you want to delete this employee ${tempEmployee.firstName}?|" + onclick="if (!confirm(this.getAttribute('data-confirm-delete'))) return false" --> + </tr> </table> |