blob: 3db362c6a0948260ffdc42e3cb5493f8fa7831d2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:include="layout :: headerFragment">
</head>
<body>
<div id="container">
<div th:if="${message}" th:text="${message}" th:class="${'alert ' + alertClass}"/></div>
<h2>
Hello, <span th:text="${username}"></span>.
</h2>
<h3>Generate new throw-away shell:</h3>
<form th:object="${osChoice}" th:id="request_pseudoform" action="#" th:action="@{'/frontend/shell/add'}" th:method="post" th:os="${osChoice}" th:onsubmit="return confirm('You are about to generate a shell with the OS ' + this.getAttribute('osoption') + ' - please be patient after you confirm, as the generation may take a short while.');">
<select class="form-control" th:object="${osChoice}" name="osChoice" required>
<option value="">Select operating system ...</option>
<option
th:each="osoption : ${availableOs}"
th:value="${osoption}"
th:attr="value=${osoption}"
th:text="${osoption}"></option>
</select>
<select class="form-control" th:object="${expiry}" name="expiry" required>
<option value="">Select duration ...</option>
<option th:value="5" th:attr="value=5" th:text="5"></option>
<option th:value="10" th:attr="value=10" th:text="10"></option>
<option th:value="3600" th:attr="value=3600" th:text="3600"></option>
</select>
<button class="btn btn-primary" th:id="request_submission" th:type="submit">Generate</button>
</form>
<div th:if="${attribute01 != null}" th:text="${attribute01}"></div>
<!-- h3>Available images:</h3>
<table th:if="${docker_images!=null and !docker_images.empty}">
<tr th:each="image: ${docker_images}" th:if="${image.repoTags[0] != '<none>:<none>'}">
<td>
<table>
<tr th:each="tag: ${image.repoTags}">
<td th:text="${tag}"/>
<td>
<form id="deletion_pseudoform" action="#" th:action="@{'/frontend/image/delete/{id}'(id=${tag})}" th:method="delete" th:tag="${tag}" th:onsubmit="return confirm('Do you really want to delete the imag with tag ' + this.getAttribute('tag') + '?');">
<button class="btn btn-danger" id="deletion_submission" type="submit">x</button>
</form>
</td>
</tr>
</table>
</td>
<td th:text="${image.created}" />
</tr>
</table>
<div th:if="${docker_images.empty}"><p>None yet!</p></div-->
<h3>Existing shells:</h3>
<table th:if="${docker_containers!=null and !docker_containers.empty}">
<tr th:each="container: ${custom_containers}">
<td th:text="${container.name}" />
<!-- td th:text="${container.image}" / -->
<!-- td th:text="${container.id}" / -->
<td th:text="${container.status}" />
<td th:text="${container.ExpirationDate}" />
<td>
<form id="deletion_pseudoform" action="#" th:action="@{'/frontend/shell/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') + ' ?');">
<button class="btn btn-danger" id="deletion_submission" type="submit">Delete</button>
</form>
</td>
</tr>
</table>
<div th:if="${docker_containers.empty}"><p>None yet!</p></div>
<p></p>
</div>
</body>
<footer>
<p><a href="/logout">SSO Logout</a></p>
<div id="pagefoot" th:include="layout :: footerFragment">Footer</div>
</footer>
</html>
|