From 1a3ffb7bab0787aa0f9a66f15959e8b0979498b8 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Sat, 25 Apr 2020 21:42:15 +0400 Subject: [PATCH] fix params and hrefs --- deploy/gdccloud/deploy.sh | 2 +- src/main/java/ru/ulstu/core/navigation/Page.java | 12 ++++++++++++ .../ru/ulstu/index/controller/IndexView.java | 9 +++++---- src/main/java/ru/ulstu/index/model/Section.java | 16 +++++++--------- .../META-INF/resources/grant/dashboard.xhtml | 2 +- .../resources/META-INF/resources/index.xhtml | 2 +- src/main/resources/application.properties | 2 +- 7 files changed, 28 insertions(+), 17 deletions(-) diff --git a/deploy/gdccloud/deploy.sh b/deploy/gdccloud/deploy.sh index 17dfee5..1ca26bd 100644 --- a/deploy/gdccloud/deploy.sh +++ b/deploy/gdccloud/deploy.sh @@ -18,6 +18,6 @@ fi ssh $USERSERVER "cd /tmp && rm -rf $ARTIFACT_NAME*.jar && echo `date` 'killed' >> log_$ARTIFACT_NAME" scp build/libs/$ARTIFACT_NAME-0.1.0-SNAPSHOT.jar $USERSERVER:/tmp/$ARTIFACT_NAME-0.1.0-SNAPSHOT.jar -ssh $USERSERVER -f "cd /tmp/ && /opt/jdk-11/bin/java -jar $ARTIFACT_NAME-0.1.0-SNAPSHOT.jar -Xms 512m -Xmx 1024m --server.port=8080 --server.http.port=8443 --ng-tracker.debug_email='' --ng-tracker.base-url=http://193.110.3.124:8080 --ng-tracker.dev-mode=false --ng-tracker.driver-path=/home/user >> /home/user/logfile_$ARTIFACT_NAME" & +ssh $USERSERVER -f "cd /tmp/ && /opt/jdk-11/bin/java -jar $ARTIFACT_NAME-0.1.0-SNAPSHOT.jar -Xms 512m -Xmx 1024m --server.port=8080 --server.http.port=8443 --ng-tracker.base-url=http://193.110.3.124:8080 --ng-tracker.dev-mode=false --ng-tracker.driver-path=/home/user >> /home/user/logfile_$ARTIFACT_NAME" & sleep 10 echo "is deployed" diff --git a/src/main/java/ru/ulstu/core/navigation/Page.java b/src/main/java/ru/ulstu/core/navigation/Page.java index 78da453..0448ca4 100644 --- a/src/main/java/ru/ulstu/core/navigation/Page.java +++ b/src/main/java/ru/ulstu/core/navigation/Page.java @@ -13,6 +13,10 @@ public class Page { public static final String GRANT_DASHBOARD = "/grant/dashboard.xhtml"; public static final String USER_LIST = "/admin/users.xhtml"; public static final String LOGOUT = "/logout"; + public static final String CONFERENCE_DASHBOARD = "/conference/dashboard.xhtml"; + ; + public static final String PROJECT_DASHBOARD = "/conference/dashboard.xhtml"; + ; public String getIndex() { return INDEX; @@ -49,4 +53,12 @@ public class Page { public String getGrant() { return GRANT; } + + public String getConferenceDashboard() { + return CONFERENCE_DASHBOARD; + } + + public String getProjectDashboard() { + return PROJECT_DASHBOARD; + } } diff --git a/src/main/java/ru/ulstu/index/controller/IndexView.java b/src/main/java/ru/ulstu/index/controller/IndexView.java index 504081d..9756992 100644 --- a/src/main/java/ru/ulstu/index/controller/IndexView.java +++ b/src/main/java/ru/ulstu/index/controller/IndexView.java @@ -1,5 +1,6 @@ package ru.ulstu.index.controller; +import ru.ulstu.core.navigation.Page; import ru.ulstu.index.model.Section; import javax.annotation.PostConstruct; @@ -15,10 +16,10 @@ public class IndexView { @PostConstruct public void init() { - sections.add(new Section("Статьи", "papers.jpg")); - sections.add(new Section("Конференции", "conf.jpg")); - sections.add(new Section("Гранты", "grants.jpg")); - sections.add(new Section("Проекты", "projects.jpg")); + sections.add(new Section("Статьи", Page.PAPER_DASHBOARD, "papers.jpg")); + sections.add(new Section("Конференции", Page.CONFERENCE_DASHBOARD, "conf.jpg")); + sections.add(new Section("Гранты", Page.GRANT_DASHBOARD, "grants.jpg")); + sections.add(new Section("Проекты", Page.PROJECT_DASHBOARD, "projects.jpg")); } public List
getSections() { diff --git a/src/main/java/ru/ulstu/index/model/Section.java b/src/main/java/ru/ulstu/index/model/Section.java index d11a4c9..c1571bc 100644 --- a/src/main/java/ru/ulstu/index/model/Section.java +++ b/src/main/java/ru/ulstu/index/model/Section.java @@ -1,27 +1,25 @@ package ru.ulstu.index.model; public class Section { - private String title; - private String image; + private final String title; + private final String image; + private final String href; - public Section(String title, String image) { + public Section(String title, String href, String image) { this.title = title; this.image = image; + this.href = href; } public String getTitle() { return title; } - public void setTitle(String title) { - this.title = title; - } - public String getImage() { return image; } - public void setImage(String image) { - this.image = image; + public String getHref() { + return href; } } diff --git a/src/main/resources/META-INF/resources/grant/dashboard.xhtml b/src/main/resources/META-INF/resources/grant/dashboard.xhtml index dc6d6ed..cc16f2f 100644 --- a/src/main/resources/META-INF/resources/grant/dashboard.xhtml +++ b/src/main/resources/META-INF/resources/grant/dashboard.xhtml @@ -46,7 +46,7 @@ diff --git a/src/main/resources/META-INF/resources/index.xhtml b/src/main/resources/META-INF/resources/index.xhtml index 307066f..1cc7d7e 100644 --- a/src/main/resources/META-INF/resources/index.xhtml +++ b/src/main/resources/META-INF/resources/index.xhtml @@ -9,7 +9,7 @@ style="text-align:center"> - + diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 60afbc3..f1697ba 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -42,7 +42,7 @@ spring.liquibase.enabled=true ng-tracker.base-url=http://127.0.0.1:8080 ng-tracker.undead-user-login=admin ng-tracker.dev-mode=false -ng-tracker.debug_email=romanov73@gmail.com +ng-tracker.debug_email= ng-tracker.use-https=false ng-tracker.check-run=false ng-tracker.driver-path=