summaryrefslogtreecommitdiffstats
path: root/src/main/resources/templates/portal.html
blob: eb3c765f1ba2bc24dc13af95ddf59f5462c19275 (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
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:include="layout :: headerFragment">
</head>
<body>
	<div id="container">
		<h1>
			Hello, <span th:text="${username}"></span>.
		</h1>
		<div th:if="${attribute01 != null}" th:text="${attribute01}"></div>
		<h2>Available Docker Images:</h2>
		<table>
		<tr th:each="image: ${docker_images}" th:if="${image.repoTags[0] != '<none>:<none>'}">
			<td th:text="${image.repoTags[0]}" />
			<td th:text="${image.created}" />
		</tr>
		</table>
		
		<h2>Generate new throw-away shell:</h2>
			<select th:field="*{availableOs}" class="form-control" id="osChoice" name="osChoice">
			    <option value="">Select operating system ...</option>
			    <option 
			        th:each="osoption : ${availableOs}" 
			        th:value="${osoption}" 
			        th:text="${osoption}"></option>		
			</select>
			<form th:object="${osChoice}" id="request_pseudoform" action="#" th:action="@{'/frontend/container/add}" th:method="post" th:os="${osChoice}" th:onsubmit="return confirm('You are about to generate a shell with the OS ' + this.getAttribute('os') + ' - please be patient after you confirm, as the generation may take a short while.');">
			<button class="btn btn-primary" id="request_submission" type="submit">Generate</button>
			</form>
		
		
		
		
		<h2>Existing Containers:</h2>     	
		<table>
		<tr th:each="container: ${docker_containers}">
		    <td th:text="${container.names[0]}" />
			<td th:text="${container.image}" />
			<td th:text="${container.id}" />
			<td th:text="${container.status}" />
		<!-- 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>		



		<!--div id="pagefoot" th:include="layout :: footerFragment">Footer</div-->
		<p></p>
		<a href="/logout">Logout</a>
	</div>
	<!-- container -->
</body>
</html>