summaryrefslogtreecommitdiffstats
path: root/src/main/resources/templates/portal.html
diff options
context:
space:
mode:
authorGeorg Pfuetzenreuter2022-05-08 05:06:04 +0200
committerGeorg Pfuetzenreuter2022-05-08 05:06:04 +0200
commit8b218230027fd5a8c7ed92fdc7d501fd94302149 (patch)
tree2d606c6e066552d7a906253957f7971d4d5c0201 /src/main/resources/templates/portal.html
parentcbec25cd6b5fe37f3010ab163b1bca61a743c457 (diff)
downloadpubsh-web-8b218230027fd5a8c7ed92fdc7d501fd94302149.tar.gz
pubsh-web-8b218230027fd5a8c7ed92fdc7d501fd94302149.tar.bz2
pubsh-web-8b218230027fd5a8c7ed92fdc7d501fd94302149.zip
Cleanups, fix admin role
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
Diffstat (limited to 'src/main/resources/templates/portal.html')
-rw-r--r--src/main/resources/templates/portal.html50
1 files changed, 28 insertions, 22 deletions
diff --git a/src/main/resources/templates/portal.html b/src/main/resources/templates/portal.html
index a5473ee..cc3d8ec 100644
--- a/src/main/resources/templates/portal.html
+++ b/src/main/resources/templates/portal.html
@@ -5,12 +5,25 @@
<body>
<div id="container">
<div th:if="${message}" th:text="${message}" th:class="${'alert ' + alertClass}"/></div>
- <h1>
+ <h2>
Hello, <span th:text="${username}"></span>.
- </h1>
+ </h2>
+ <h3>Generate new throw-away shell:</h3>
+ <form th:object="${osChoice}" th: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('osoption') + ' - please be patient after you confirm, as the generation may take a short while.');">
+ <select class="form-control" th:object="${osChoice}" name="osChoice">
+ <option value="">Select operating system ...</option>
+ <option
+ th:each="osoption : ${availableOs}"
+ th:value="${osoption}"
+ th:attr="value=${osoption}"
+ th:text="${osoption}"></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>
- <h2>Available images:</h2>
- <table>
+
+ <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>
@@ -27,22 +40,10 @@
<td th:text="${image.created}" />
</tr>
</table>
-
- <h2>Generate new throw-away shell:</h2>
- <form th:object="${osChoice}" th: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('osoption') + ' - please be patient after you confirm, as the generation may take a short while.');">
- <select class="form-control" th:object="${osChoice}" name="osChoice">
- <option value="">Select operating system ...</option>
- <option
- th:each="osoption : ${availableOs}"
- th:value="${osoption}"
- th:attr="value=${osoption}"
- th:text="${osoption}"></option>
- </select>
- <button class="btn btn-primary" th:id="request_submission" th:type="submit">Generate</button>
- </form>
-
- <h2>Existing containers:</h2>
- <table>
+ <div th:if="${docker_images.empty}"><p>None yet!</p></div>
+
+ <h3>Existing containers:</h3>
+ <table th:if="${docker_containers!=null and !docker_containers.empty}">
<tr th:each="container: ${docker_containers}">
<td th:text="${container.names[0]}" />
<td th:text="${container.image}" />
@@ -54,9 +55,14 @@
</form>
</td>
</tr>
- </table>
+ </table>
+ <div th:if="${docker_containers.empty}"><p>None yet!</p></div>
<p></p>
- <a href="/logout">Logout</a>
+
</div>
</body>
+<footer>
+
+<p><a href="/logout">SSO Logout</a></p>
+</footer>
</html>