From c9e287a2c9d1f9ca234a10a5c416cff87757681d Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 3 Sep 2020 21:53:45 +0200 Subject: [PATCH] Last fixes for Tapestry version - rewrite for Spring Boot in progress... --- .gitignore | 1 + pom.xml | 14 +++---- .../java/ch/ksfx/web/components/Layout.java | 14 +++++++ src/main/java/ch/ksfx/web/pages/Login.java | 12 ------ .../ch/ksfx/web/components/Layout.tml | 23 +++++++++++ src/main/resources/conf.xml | 1 + src/main/resources/version.config | 2 +- src/main/webapp/Login.tml | 21 +++------- src/main/webapp/styles/signin_tb.css | 40 ------------------- 9 files changed, 52 insertions(+), 76 deletions(-) delete mode 100644 src/main/webapp/styles/signin_tb.css diff --git a/.gitignore b/.gitignore index 268c249..db89536 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ # Add any directories, files, or patterns you don't want to be tracked by version control .svn +.idea target/* build/* ksfx.iml diff --git a/pom.xml b/pom.xml index cc10ac1..ec28f2e 100644 --- a/pom.xml +++ b/pom.xml @@ -261,11 +261,11 @@ language-detector 0.5 - - net.sourceforge.htmlunit - htmlunit - 2.23 - + + net.sourceforge.htmlunit + htmlunit + 2.23 + io.ebean ebean @@ -384,7 +384,7 @@ 2.20.1 - jdbc:mysql://localhost:3306/ksfx_test?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8 + jdbc:mysql://localhost:3306/ksfx_test?autoReconnect=true&nserverTimezone=UTC&useUnicode=true&characterEncoding=UTF-8&useTimezone=false ksfx_test true root @@ -395,7 +395,7 @@ - 5.1.9 + 8.0.16 2.1 5.4.3 3.0.2.RELEASE diff --git a/src/main/java/ch/ksfx/web/components/Layout.java b/src/main/java/ch/ksfx/web/components/Layout.java index 4b5844f..1d6f14f 100644 --- a/src/main/java/ch/ksfx/web/components/Layout.java +++ b/src/main/java/ch/ksfx/web/components/Layout.java @@ -23,12 +23,21 @@ import org.apache.tapestry5.annotations.Import; import org.apache.tapestry5.annotations.InjectComponent; import org.apache.tapestry5.ioc.annotations.Inject; +import org.apache.tapestry5.ioc.annotations.Value; +import org.apache.tapestry5.services.Request; import org.apache.tapestry5.services.javascript.JavaScriptSupport; @Import(module = { "bootstrap/modal" }, stylesheet = {"context:styles/main_tb.css"}, library = "context:scripts/layout.js") public class Layout { + @Inject + @Value("${spring-security.check.url}") + private String checkUrl; + + @Inject + private Request request; + @Inject private Version version; @@ -56,6 +65,11 @@ public Feedback getFeedback() return feedback; } + public String getLoginCheckUrl() + { + return request.getContextPath() + checkUrl; + } + private void setupRender() { js.require("bootstrap/dropdown"); diff --git a/src/main/java/ch/ksfx/web/pages/Login.java b/src/main/java/ch/ksfx/web/pages/Login.java index 02c42c8..829d20e 100644 --- a/src/main/java/ch/ksfx/web/pages/Login.java +++ b/src/main/java/ch/ksfx/web/pages/Login.java @@ -25,15 +25,8 @@ import org.apache.tapestry5.services.Request; -@Import(stylesheet = {"context:styles/signin_tb.css"}) public class Login { - @Inject - @Value("${spring-security.check.url}") - private String checkUrl; - @Inject - private Request request; - @Inject private GenericDataStoreDAO genericDataStoreDAO; @@ -51,11 +44,6 @@ public boolean isFailed() return failed; } - public String getLoginCheckUrl() - { - return request.getContextPath() + checkUrl; - } - void onActivate(String extra) { if (extra.equals("failed")) { diff --git a/src/main/resources/ch/ksfx/web/components/Layout.tml b/src/main/resources/ch/ksfx/web/components/Layout.tml index 500e8cf..11c09e1 100644 --- a/src/main/resources/ch/ksfx/web/components/Layout.tml +++ b/src/main/resources/ch/ksfx/web/components/Layout.tml @@ -18,12 +18,35 @@ diff --git a/src/main/resources/conf.xml b/src/main/resources/conf.xml index 3de9299..30f2c1c 100644 --- a/src/main/resources/conf.xml +++ b/src/main/resources/conf.xml @@ -3,6 +3,7 @@ com.mysql.jdbc.Driver jdbc:mysql://localhost:3306/ksfx?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8 + diff --git a/src/main/resources/version.config b/src/main/resources/version.config index b68a43b..5f745b9 100644 --- a/src/main/resources/version.config +++ b/src/main/resources/version.config @@ -1,2 +1,2 @@ application.name=${pom.name} -application.version=1.1.1142 +application.version=1.1.1230 diff --git a/src/main/webapp/Login.tml b/src/main/webapp/Login.tml index 129f6d8..09cfda8 100644 --- a/src/main/webapp/Login.tml +++ b/src/main/webapp/Login.tml @@ -1,20 +1,9 @@ - - -

KSFX Data Analysis

- - + + +

${message:error_message}

+
-
\ No newline at end of file + \ No newline at end of file diff --git a/src/main/webapp/styles/signin_tb.css b/src/main/webapp/styles/signin_tb.css deleted file mode 100644 index 78e16fd..0000000 --- a/src/main/webapp/styles/signin_tb.css +++ /dev/null @@ -1,40 +0,0 @@ -body { - padding-top: 40px; - padding-bottom: 40px; - background-color: #eee; -} - -.form-signin { - max-width: 330px; - padding: 15px; - margin: 0 auto; -} -.form-signin .form-signin-heading, -.form-signin .checkbox { - margin-bottom: 10px; -} -.form-signin .checkbox { - font-weight: normal; -} -.form-signin .form-control { - position: relative; - height: auto; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - padding: 10px; - font-size: 16px; -} -.form-signin .form-control:focus { - z-index: 2; -} -.form-signin input[type="email"] { - margin-bottom: -1px; - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; -} -.form-signin input[type="password"] { - margin-bottom: 10px; - border-top-left-radius: 0; - border-top-right-radius: 0; -} \ No newline at end of file