From 97a6cf039a6e88599a835c39d6da3d57e4cacc2d Mon Sep 17 00:00:00 2001 From: "blitza@terrrestris.de" Date: Thu, 5 Jan 2023 13:05:33 +0100 Subject: [PATCH 1/5] Overall startpage redesign --- .../src/main/resources/templates/index.html | 248 ++++++++++++------ 1 file changed, 165 insertions(+), 83 deletions(-) diff --git a/shogun-boot/src/main/resources/templates/index.html b/shogun-boot/src/main/resources/templates/index.html index 31ec79805..f724bd307 100644 --- a/shogun-boot/src/main/resources/templates/index.html +++ b/shogun-boot/src/main/resources/templates/index.html @@ -30,9 +30,13 @@ + + + + @@ -42,106 +46,184 @@ + + +
-
- -

Welcome to SHOGun

- -
-
-
- -
-

Swagger / OpenAPI

-

- Execute CRUD requests against the SHOGun REST API using the Swagger interface. -

- - Open - -
-
-
- -
-

GraphiQL

-

- Build and execute GraqhQL mutations and queries against the SHOGun GraphQL API. -

- - Open - -
-
-
- -
-

WebSocket

-

- This site contains a simple example for establishing a web socket connection. -

- - Open - + + + + +
+

Welcome to SHOGun

+ + + + +

Applications

+
- @@ -159,8 +159,7 @@

Applications

} const applications = await getApplications(keycloak.token); - const appInfos = []; - applications.forEach(app => { + const appInfos = applications.map(app => { appInfos.push({ id: app.id, name: app.name, From 13fcf9bb76320fec63489497bc28657cce538b92 Mon Sep 17 00:00:00 2001 From: "blitza@terrrestris.de" Date: Mon, 9 Jan 2023 11:55:53 +0100 Subject: [PATCH 5/5] move event registration --- shogun-boot/src/main/resources/templates/index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/shogun-boot/src/main/resources/templates/index.html b/shogun-boot/src/main/resources/templates/index.html index 4b5c46d22..ee6ea9abd 100644 --- a/shogun-boot/src/main/resources/templates/index.html +++ b/shogun-boot/src/main/resources/templates/index.html @@ -150,12 +150,12 @@

Applications

document.querySelector('#login-btn').addEventListener('click', () => { keycloak.login(); }); + document.querySelector('#logout-btn').addEventListener('click', () => { + keycloak.logout(); + }); if (keycloak.authenticated) { document.querySelector('#logout-btn').hidden = false; document.querySelector('#login-btn').hidden = true; - document.querySelector('#logout-btn').addEventListener('click', () => { - keycloak.logout(); - }); } const applications = await getApplications(keycloak.token);