diff --git a/docs/images/user/basic/login.png b/docs/images/user/basic/login.png new file mode 100644 index 00000000..9a23e72d Binary files /dev/null and b/docs/images/user/basic/login.png differ diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/i18n/impl/I18nSupportImpl.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/i18n/impl/I18nSupportImpl.java index 2d3075f1..92412f5c 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/i18n/impl/I18nSupportImpl.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/i18n/impl/I18nSupportImpl.java @@ -42,6 +42,12 @@ public class I18nSupportImpl implements I18nSupport { private static final Logger log = LoggerFactory.getLogger(I18nSupportImpl.class); + private static final String SUPPORTED_LANGUAGES_KEY = "sebserver.gui.supported.languages"; + private static final String MULTILINGUAL_KEY = "sebserver.gui.multilingual"; + private static final String TIME_DISPLAYFORMAT_KEY = "sebserver.gui.time.displayformat"; + private static final String DATETIME_DISPLAYFORMAT_KEY = "sebserver.gui.datetime.displayformat"; + private static final String DATE_DISPLAYFORMAT_KEY = "sebserver.gui.date.displayformat"; + private static final String DATE_DISPLAYFORMAT_TIMEZONE_KEY = "sebserver.gui.date.displayformat.timezone"; private static final String ATTR_CURRENT_SESSION_LOCALE = "CURRENT_SESSION_LOCALE"; private final DateTimeFormatter timeZoneFormatter; @@ -63,33 +69,33 @@ public class I18nSupportImpl implements I18nSupport { this.timeZoneFormatter = DateTimeFormat .forPattern(environment.getProperty( - "sebserver.gui.date.displayformat.timezone", + DATE_DISPLAYFORMAT_TIMEZONE_KEY, Constants.TIME_ZONE_OFFSET_TAIL_FORMAT)); this.displayDateFormatter = DateTimeFormat .forPattern(environment.getProperty( - "sebserver.gui.date.displayformat", + DATE_DISPLAYFORMAT_KEY, Constants.DEFAULT_DISPLAY_DATE_FORMAT)) .withZoneUTC(); this.displayDateTimeFormatter = DateTimeFormat .forPattern(environment.getProperty( - "sebserver.gui.datetime.displayformat", + DATETIME_DISPLAYFORMAT_KEY, Constants.DEFAULT_DIPLAY_DATE_TIME_FORMAT)) .withZoneUTC(); this.displayTimeFormatter = DateTimeFormat .forPattern(environment.getProperty( - "sebserver.gui.time.displayformat", + TIME_DISPLAYFORMAT_KEY, Constants.DEFAULT_TIME_FORMAT)) .withZoneUTC(); final boolean multilingual = BooleanUtils.toBoolean(environment.getProperty( - "sebserver.gui.multilingual", - "false")); + MULTILINGUAL_KEY, + Constants.FALSE_STRING)); if (multilingual) { final String languagesString = environment.getProperty( - "sebserver.gui.languages", + SUPPORTED_LANGUAGES_KEY, Locale.ENGLISH.getLanguage()); this.supportedLanguages = Utils.immutableCollectionOf( diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/WebserviceInfo.java b/src/main/java/ch/ethz/seb/sebserver/webservice/WebserviceInfo.java index d1d5eec0..d707b867 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/WebserviceInfo.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/WebserviceInfo.java @@ -35,9 +35,9 @@ public class WebserviceInfo { private static final String VERSION_KEY = "sebserver.version"; private static final String WEB_SERVICE_TEST_PROPERTY = "sebserver.test.property"; - private static final String WEB_SERVICE_SERVER_NAME_KEY = "sebserver.webservice.http.server.name"; + private static final String WEB_SERVICE_SERVER_NAME_KEY = "sebserver.webservice.http.external.servername"; private static final String WEB_SERVICE_HTTP_SCHEME_KEY = "sebserver.webservice.http.scheme"; - private static final String WEB_SERVICE_HTTP_PORT = "sebserver.webservice.http.port"; + private static final String WEB_SERVICE_HTTP_PORT = "sebserver.webservice.http.external.port"; private static final String WEB_SERVICE_HOST_ADDRESS_KEY = "server.address"; private static final String WEB_SERVICE_SERVER_PORT_KEY = "server.port"; private static final String WEB_SERVICE_EXAM_API_DISCOVERY_ENDPOINT_KEY = diff --git a/src/main/resources/config/application-dev-gui.properties b/src/main/resources/config/application-dev-gui.properties index 75fc56dc..57722038 100644 --- a/src/main/resources/config/application-dev-gui.properties +++ b/src/main/resources/config/application-dev-gui.properties @@ -2,9 +2,6 @@ server.address=localhost server.port=8080 server.servlet.context-path=/ -server.servlet.session.cookie.http-only=true -server.servlet.session.tracking-modes=cookie - sebserver.gui.entrypoint=/gui sebserver.gui.webservice.protocol=http sebserver.gui.webservice.address=localhost @@ -20,7 +17,7 @@ sebserver.gui.list.page.size=15 sebserver.gui.date.displayformat=yyyy-MM-dd HH:mm sebserver.gui.date.displayformat.timezone=|ZZ sebserver.gui.multilingual=false -sebserver.gui.languages=en,de +sebserver.gui.supported.languages=en,de sebserver.gui.seb.client.config.download.filename=SEBClientSettings.seb sebserver.gui.seb.exam.config.download.filename=SEBExamSettings.seb \ No newline at end of file diff --git a/src/main/resources/config/application-dev-ws.properties b/src/main/resources/config/application-dev-ws.properties index 7f932e60..7b97be70 100644 --- a/src/main/resources/config/application-dev-ws.properties +++ b/src/main/resources/config/application-dev-ws.properties @@ -23,8 +23,8 @@ sebserver.http.client.read-timeout=10000 sebserver.init.adminaccount.gen-on-init=false sebserver.webservice.distributed=false sebserver.webservice.http.scheme=http -sebserver.webservice.http.server.name=${server.address} -#sebserver.webservice.http.port=${server.port} +sebserver.webservice.http.external.servername=${server.address} +#sebserver.webservice.http.external.port=${server.port} sebserver.webservice.http.redirect.gui=/gui sebserver.webservice.api.admin.endpoint=/admin-api/v1 sebserver.webservice.api.admin.accessTokenValiditySeconds=3600 diff --git a/src/main/resources/config/application.properties b/src/main/resources/config/application.properties index 4bd019bb..295cff04 100644 --- a/src/main/resources/config/application.properties +++ b/src/main/resources/config/application.properties @@ -6,8 +6,10 @@ spring.mandatory-file-encoding=UTF-8 spring.http.encoding.charset=UTF-8 spring.http.encoding.enabled=true +server.servlet.session.cookie.http-only=true +server.servlet.session.tracking-modes=cookie + sebserver.version=0.5.1 beta -sebserver.supported.languages=en sebserver.init.organisation.name=ETHZ sebserver.init.adminaccount.gen-on-init=true sebserver.init.adminaccount.username=super-admin