From fd481400568dc689c0541b7c8d966fcfc8a8c02a Mon Sep 17 00:00:00 2001 From: Fabrice Gangler Date: Mon, 3 Sep 2018 01:47:15 +0200 Subject: [PATCH 01/20] set version to 0.9.3-SNAPSHOT --- CHANGELOG.md | 33 +++++++++++++++++++ dist./debian_package/pom.xml | 4 +-- dist./pom.xml | 4 +-- docker/RELEASE/README.md | 8 ++--- docker/RELEASE/alpine_tomcat-7/Dockerfile | 10 +++--- docker/RELEASE/alpine_tomcat-8.5/Dockerfile | 10 +++--- .../RELEASE/ubuntu-14.04_tomcat-7/Dockerfile | 10 +++--- .../RELEASE/ubuntu-16.04_tomcat-7/Dockerfile | 10 +++--- .../ubuntu-18.04_tomcat-8.5/Dockerfile | 10 +++--- .../distrib/alpine_tomcat-7/Dockerfile | 2 +- .../distrib/alpine_tomcat-8.5/Dockerfile | 2 +- .../distrib/alpine_tomcat-9/Dockerfile | 2 +- .../distrib/debian-9_tomcat-8.5/Dockerfile | 2 +- .../distrib/debian_tomcat-9_jre9/Dockerfile | 2 +- .../distrib/ubuntu-14.04_tomcat-7/Dockerfile | 2 +- .../distrib/ubuntu-16.04_tomcat-7/Dockerfile | 2 +- .../ubuntu-16.04_tomcat-8.0/Dockerfile | 2 +- .../ubuntu-18.04_tomcat-8.5/Dockerfile | 2 +- .../01.no.config.file/Dockerfile | 2 +- .../10.default.algo/Dockerfile | 2 +- .../test_config-file/20.debug.env/Dockerfile | 2 +- .../test_config-file/30.piwik/Dockerfile | 2 +- .../40.searchEngineIndex/Dockerfile | 2 +- .../pre-requisites_Alpine_tomcat-7/Dockerfile | 2 +- .../Dockerfile | 2 +- .../pre-requisites_Alpine_tomcat-9/Dockerfile | 2 +- .../Dockerfile | 2 +- .../Dockerfile | 2 +- .../Dockerfile | 2 +- .../Dockerfile | 2 +- .../Dockerfile | 2 +- .../Dockerfile | 2 +- .../en/10_Install_doc/webapp_Installation.md | 2 +- documentation/pom.xml | 4 +-- engine/api/pom.xml | 4 +-- engine/hsv/pom.xml | 4 +-- engine/impl/pom.xml | 4 +-- engine/pom.xml | 4 +-- engine/utils/pom.xml | 4 +-- pom.xml | 2 +- webapp/pom.xml | 4 +-- .../WEB-INF/template/template_variables.jspf | 2 +- 42 files changed, 106 insertions(+), 73 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f8b436e..9884c4bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,38 @@ # CHANGELOG +Contrast-Finder 0.9.3, 2018-xx-xx +--------------------------------- + +Upgrade-o-meter: just replace the .war file and restart Tomcat + +### New Feature +none + +### Security +none + +### Outdated dependencies +none + +### Bug +none + +### Improvement +none + +### Refactoring +none + +### Configuration +none + +### Documentation +none + +### Task +none + + Contrast-Finder 0.9.2, 2018-09-03 --------------------------------- diff --git a/dist./debian_package/pom.xml b/dist./debian_package/pom.xml index 917cdb0e..487e355e 100644 --- a/dist./debian_package/pom.xml +++ b/dist./debian_package/pom.xml @@ -4,10 +4,10 @@ org.asqatasun dist - 0.9.2 + 0.9.3-SNAPSHOT contrast-finder-dist_debian-packages - 0.9.2 + 0.9.3-SNAPSHOT jar contrast-finder-dist_debian-packages diff --git a/dist./pom.xml b/dist./pom.xml index 650a31ee..7768ed64 100644 --- a/dist./pom.xml +++ b/dist./pom.xml @@ -4,10 +4,10 @@ org.asqatasun contrast-finder - 0.9.2 + 0.9.3-SNAPSHOT dist - 0.9.2 + 0.9.3-SNAPSHOT pom contrast-finder-dist diff --git a/docker/RELEASE/README.md b/docker/RELEASE/README.md index 24770eb0..0d849ded 100644 --- a/docker/RELEASE/README.md +++ b/docker/RELEASE/README.md @@ -14,10 +14,10 @@ Supported tags and respective `Dockerfile` links : * [pre-requisites_Alpine_tomcat-8.5](https://github.com/Asqatasun/Contrast-Finder/blob/master/docker/pre-requisites/pre-requisites_Alpine_tomcat-8.5/Dockerfile) ### Releases -* [latest, v0.9.2, ubuntu-18.04](https://github.com/Asqatasun/Contrast-Finder/blob/master/docker/RELEASE/ubuntu-18.04_tomcat-8.5/Dockerfile) -* [alpine, v0.9.2_alpine, alpine_tomcat-8.5](https://github.com/Asqatasun/Contrast-Finder/blob/master/docker/RELEASE/alpine_tomcat-8.5/Dockerfile) -* [v0.9.1](https://github.com/Asqatasun/Contrast-Finder/blob/v0.9.1/docker/RELEASE/Dockerfile), [v0.9.0](https://github.com/Asqatasun/Contrast-Finder/blob/v0.9.0/docker/RELEASE/Dockerfile), [v0.8.6](https://github.com/Asqatasun/Contrast-Finder/blob/v0.8.6/docker/RELEASE/Dockerfile), [v0.8.5](https://github.com/Asqatasun/Contrast-Finder/blob/v0.8.5/docker/RELEASE/Dockerfile), [v0.8.4](https://github.com/Asqatasun/Contrast-Finder/blob/v0.8.4/docker/RELEASE/Dockerfile), [v0.8.3](https://github.com/Asqatasun/Contrast-Finder/blob/v0.8.3/docker/RELEASE/Dockerfile), [v0.8.2](https://github.com/Asqatasun/Contrast-Finder/blob/v0.8.2/docker/RELEASE/Dockerfile), [v0.8.1](https://github.com/Asqatasun/Contrast-Finder/blob/v0.8.1/docker/RELEASE/Dockerfile), [v0.8.0](https://github.com/Asqatasun/Contrast-Finder/blob/v0.8.0/docker/RELEASE/Dockerfile) -* [v0.7.0](https://github.com/Asqatasun/Contrast-Finder/blob/v0.7.0/docker/RELEASE/Dockerfile), [v0.6.0](https://github.com/Asqatasun/Contrast-Finder/blob/v0.6.0/docker/RELEASE/Dockerfile), [v0.5.2](https://github.com/Asqatasun/Contrast-Finder/blob/v0.5.2/docker/RELEASE/Dockerfile) +* [latest, v0.9.3-SNAPSHOT, ubuntu-18.04](https://github.com/Asqatasun/Contrast-Finder/blob/master/docker/RELEASE/ubuntu-18.04_tomcat-8.5/Dockerfile) +* [alpine, v0.9.3-SNAPSHOT_alpine, alpine_tomcat-8.5](https://github.com/Asqatasun/Contrast-Finder/blob/master/docker/RELEASE/alpine_tomcat-8.5/Dockerfile) +* [v0.9.2](https://github.com/Asqatasun/Contrast-Finder/blob/v0.9.2/docker/RELEASE/Dockerfile), [v0.9.1](https://github.com/Asqatasun/Contrast-Finder/blob/v0.9.1/docker/RELEASE/Dockerfile), [v0.9.0](https://github.com/Asqatasun/Contrast-Finder/blob/v0.9.0/docker/RELEASE/Dockerfile), +* [v0.8.6](https://github.com/Asqatasun/Contrast-Finder/blob/v0.8.6/docker/RELEASE/Dockerfile), [v0.7.0](https://github.com/Asqatasun/Contrast-Finder/blob/v0.7.0/docker/RELEASE/Dockerfile), [v0.6.0](https://github.com/Asqatasun/Contrast-Finder/blob/v0.6.0/docker/RELEASE/Dockerfile), [v0.5.2](https://github.com/Asqatasun/Contrast-Finder/blob/v0.5.2/docker/RELEASE/Dockerfile) ## How to use this image `docker pull asqatasun/contrast-finder` diff --git a/docker/RELEASE/alpine_tomcat-7/Dockerfile b/docker/RELEASE/alpine_tomcat-7/Dockerfile index 4d151728..15bfbe9d 100644 --- a/docker/RELEASE/alpine_tomcat-7/Dockerfile +++ b/docker/RELEASE/alpine_tomcat-7/Dockerfile @@ -1,7 +1,7 @@ FROM asqatasun/contrast-finder:pre-requisites_Alpine_tomcat-7 LABEL org.label-schema.schema-version = "1.0.0-rc.1" \ org.label-schema.name = "Contrast-Finder - WebApp (tomcat7 < jdk7 < alpine 3.7)" \ - org.label-schema.version = "0.9.2" \ + org.label-schema.version = "0.9.3-SNAPSHOT" \ org.label-schema.url = "https://contrast-finder.org" \ org.label-schema.vcs-url = "https://github.com/Asqatasun/Contrast-Finder" \ org.label-schema.docker.cmd = "docker run -p 8087:8080 -d asqatasun/contrast-finder:alpine" \ @@ -13,9 +13,9 @@ LABEL org.label-schema.schema-version = "1.0.0-rc.1" # # --- Building this docker image # docker build -t asqatasun/contrast-finder . -# docker build -t asqatasun/contrast-finder --build-arg CONTRAST_FINDER_RELEASE=0.9.2 . -# docker build -t asqatasun/contrast-finder --build-arg SRC_URL_PREFIX=https://github.com/Asqatasun/Contrast-Finder/releases/download/v0.9.2/ . -# docker build -t asqatasun/contrast-finder --build-arg SRC_URL=https://github.com/Asqatasun/Contrast-Finder/releases/download/v0.9.2/contrast-finder-webapp_0.9.2.tar.gz . +# docker build -t asqatasun/contrast-finder --build-arg CONTRAST_FINDER_RELEASE=0.9.3-SNAPSHOT . +# docker build -t asqatasun/contrast-finder --build-arg SRC_URL_PREFIX=https://github.com/Asqatasun/Contrast-Finder/releases/download/v0.9.3-SNAPSHOT/ . +# docker build -t asqatasun/contrast-finder --build-arg SRC_URL=https://github.com/Asqatasun/Contrast-Finder/releases/download/v0.9.3-SNAPSHOT/contrast-finder-webapp_0.9.3-SNAPSHOT.tar.gz . # # --- Launch a container # docker run -p 127.0.0.1:8087:8080 --name contrast.finder -d asqatasun/contrast-finder @@ -39,7 +39,7 @@ LABEL org.label-schema.schema-version = "1.0.0-rc.1" ################################################################### # build variables -ARG CONTRAST_FINDER_RELEASE="0.9.2" +ARG CONTRAST_FINDER_RELEASE="0.9.3-SNAPSHOT" ARG SRC_URL_PREFIX="https://github.com/Asqatasun/Contrast-Finder/releases/download/v${CONTRAST_FINDER_RELEASE}" ARG SRC_URL="${SRC_URL_PREFIX}/contrast-finder-webapp_${CONTRAST_FINDER_RELEASE}.tar.gz" diff --git a/docker/RELEASE/alpine_tomcat-8.5/Dockerfile b/docker/RELEASE/alpine_tomcat-8.5/Dockerfile index d45be300..8cab0fb3 100644 --- a/docker/RELEASE/alpine_tomcat-8.5/Dockerfile +++ b/docker/RELEASE/alpine_tomcat-8.5/Dockerfile @@ -1,7 +1,7 @@ FROM asqatasun/contrast-finder:pre-requisites_Alpine_tomcat-8.5 LABEL org.label-schema.schema-version = "1.0.0-rc.1" \ org.label-schema.name = "Contrast-Finder - WebApp (tomcat 8.5 < jdk 8 < alpine 3.7)" \ - org.label-schema.version = "0.9.2" \ + org.label-schema.version = "0.9.3-SNAPSHOT" \ org.label-schema.url = "https://contrast-finder.org" \ org.label-schema.vcs-url = "https://github.com/Asqatasun/Contrast-Finder" \ org.label-schema.docker.cmd = "docker run -p 8087:8080 -d asqatasun/contrast-finder:alpine" \ @@ -13,9 +13,9 @@ LABEL org.label-schema.schema-version = "1.0.0-rc.1" # # --- Building this docker image # docker build -t asqatasun/contrast-finder . -# docker build -t asqatasun/contrast-finder --build-arg CONTRAST_FINDER_RELEASE=0.9.2 . -# docker build -t asqatasun/contrast-finder --build-arg SRC_URL_PREFIX=https://github.com/Asqatasun/Contrast-Finder/releases/download/v0.9.2/ . -# docker build -t asqatasun/contrast-finder --build-arg SRC_URL=https://github.com/Asqatasun/Contrast-Finder/releases/download/v0.9.2/contrast-finder-webapp_0.9.2.tar.gz . +# docker build -t asqatasun/contrast-finder --build-arg CONTRAST_FINDER_RELEASE=0.9.3-SNAPSHOT . +# docker build -t asqatasun/contrast-finder --build-arg SRC_URL_PREFIX=https://github.com/Asqatasun/Contrast-Finder/releases/download/v0.9.3-SNAPSHOT/ . +# docker build -t asqatasun/contrast-finder --build-arg SRC_URL=https://github.com/Asqatasun/Contrast-Finder/releases/download/v0.9.3-SNAPSHOT/contrast-finder-webapp_0.9.3-SNAPSHOT.tar.gz . # # --- Launch a container # docker run -p 127.0.0.1:8087:8080 --name contrast.finder -d asqatasun/contrast-finder @@ -39,7 +39,7 @@ LABEL org.label-schema.schema-version = "1.0.0-rc.1" ################################################################### # build variables -ARG CONTRAST_FINDER_RELEASE="0.9.2" +ARG CONTRAST_FINDER_RELEASE="0.9.3-SNAPSHOT" ARG SRC_URL_PREFIX="https://github.com/Asqatasun/Contrast-Finder/releases/download/v${CONTRAST_FINDER_RELEASE}" ARG SRC_URL="${SRC_URL_PREFIX}/contrast-finder-webapp_${CONTRAST_FINDER_RELEASE}.tar.gz" diff --git a/docker/RELEASE/ubuntu-14.04_tomcat-7/Dockerfile b/docker/RELEASE/ubuntu-14.04_tomcat-7/Dockerfile index 55740140..08215e8b 100644 --- a/docker/RELEASE/ubuntu-14.04_tomcat-7/Dockerfile +++ b/docker/RELEASE/ubuntu-14.04_tomcat-7/Dockerfile @@ -1,7 +1,7 @@ FROM asqatasun/contrast-finder:pre-requisites_Ubuntu-14.04_tomcat-7 LABEL org.label-schema.schema-version = "1.0.0-rc.1" \ org.label-schema.name = "Contrast-Finder - WebApp (Ubuntu 14.04 - Tomcat 7)" \ - org.label-schema.version = "0.9.2" \ + org.label-schema.version = "0.9.3-SNAPSHOT" \ org.label-schema.url = "https://contrast-finder.org" \ org.label-schema.vcs-url = "https://github.com/Asqatasun/Contrast-Finder" \ org.label-schema.docker.cmd = "docker run -p 8087:8080 -d asqatasun/contrast-finder" \ @@ -13,9 +13,9 @@ LABEL org.label-schema.schema-version = "1.0.0-rc.1" # # --- Building this docker image # docker build -t asqatasun/contrast-finder . -# docker build -t asqatasun/contrast-finder --build-arg CONTRAST_FINDER_RELEASE=0.9.2 . -# docker build -t asqatasun/contrast-finder --build-arg SRC_URL_PREFIX=https://github.com/Asqatasun/Contrast-Finder/releases/download/v0.9.2/ . -# docker build -t asqatasun/contrast-finder --build-arg SRC_URL=https://github.com/Asqatasun/Contrast-Finder/releases/download/v0.9.2/contrast-finder-webapp_0.9.2.tar.gz . +# docker build -t asqatasun/contrast-finder --build-arg CONTRAST_FINDER_RELEASE=0.9.3-SNAPSHOT . +# docker build -t asqatasun/contrast-finder --build-arg SRC_URL_PREFIX=https://github.com/Asqatasun/Contrast-Finder/releases/download/v0.9.3-SNAPSHOT/ . +# docker build -t asqatasun/contrast-finder --build-arg SRC_URL=https://github.com/Asqatasun/Contrast-Finder/releases/download/v0.9.3-SNAPSHOT/contrast-finder-webapp_0.9.3-SNAPSHOT.tar.gz . # # --- Launch a container # docker run -p 127.0.0.1:8087:8080 --name contrast.finder -d asqatasun/contrast-finder @@ -37,7 +37,7 @@ LABEL org.label-schema.schema-version = "1.0.0-rc.1" ################################################################### # build variables -ARG CONTRAST_FINDER_RELEASE="0.9.2" +ARG CONTRAST_FINDER_RELEASE="0.9.3-SNAPSHOT" ARG SRC_URL_PREFIX="https://github.com/Asqatasun/Contrast-Finder/releases/download/v${CONTRAST_FINDER_RELEASE}" ARG SRC_URL="${SRC_URL_PREFIX}/contrast-finder-webapp_${CONTRAST_FINDER_RELEASE}.tar.gz" diff --git a/docker/RELEASE/ubuntu-16.04_tomcat-7/Dockerfile b/docker/RELEASE/ubuntu-16.04_tomcat-7/Dockerfile index b42e8446..baed8393 100644 --- a/docker/RELEASE/ubuntu-16.04_tomcat-7/Dockerfile +++ b/docker/RELEASE/ubuntu-16.04_tomcat-7/Dockerfile @@ -1,7 +1,7 @@ FROM asqatasun/contrast-finder:pre-requisites_Ubuntu-16.04_tomcat-7 LABEL org.label-schema.schema-version = "1.0.0-rc.1" \ org.label-schema.name = "Contrast-Finder - WebApp (Ubuntu 16.04 - Tomcat 7)" \ - org.label-schema.version = "0.9.2" \ + org.label-schema.version = "0.9.3-SNAPSHOT" \ org.label-schema.url = "https://contrast-finder.org" \ org.label-schema.vcs-url = "https://github.com/Asqatasun/Contrast-Finder" \ org.label-schema.docker.cmd = "docker run -p 8087:8080 -d asqatasun/contrast-finder" \ @@ -13,9 +13,9 @@ LABEL org.label-schema.schema-version = "1.0.0-rc.1" # # --- Building this docker image # docker build -t asqatasun/contrast-finder . -# docker build -t asqatasun/contrast-finder --build-arg CONTRAST_FINDER_RELEASE=0.9.2 . -# docker build -t asqatasun/contrast-finder --build-arg SRC_URL_PREFIX=https://github.com/Asqatasun/Contrast-Finder/releases/download/v0.9.2/ . -# docker build -t asqatasun/contrast-finder --build-arg SRC_URL=https://github.com/Asqatasun/Contrast-Finder/releases/download/v0.9.2/contrast-finder-webapp_0.9.2.tar.gz . +# docker build -t asqatasun/contrast-finder --build-arg CONTRAST_FINDER_RELEASE=0.9.3-SNAPSHOT . +# docker build -t asqatasun/contrast-finder --build-arg SRC_URL_PREFIX=https://github.com/Asqatasun/Contrast-Finder/releases/download/v0.9.3-SNAPSHOT/ . +# docker build -t asqatasun/contrast-finder --build-arg SRC_URL=https://github.com/Asqatasun/Contrast-Finder/releases/download/v0.9.3-SNAPSHOT/contrast-finder-webapp_0.9.3-SNAPSHOT.tar.gz . # # --- Launch a container # docker run -p 127.0.0.1:8087:8080 --name contrast.finder -d asqatasun/contrast-finder @@ -37,7 +37,7 @@ LABEL org.label-schema.schema-version = "1.0.0-rc.1" ################################################################### # build variables -ARG CONTRAST_FINDER_RELEASE="0.9.2" +ARG CONTRAST_FINDER_RELEASE="0.9.3-SNAPSHOT" ARG SRC_URL_PREFIX="https://github.com/Asqatasun/Contrast-Finder/releases/download/v${CONTRAST_FINDER_RELEASE}" ARG SRC_URL="${SRC_URL_PREFIX}/contrast-finder-webapp_${CONTRAST_FINDER_RELEASE}.tar.gz" diff --git a/docker/RELEASE/ubuntu-18.04_tomcat-8.5/Dockerfile b/docker/RELEASE/ubuntu-18.04_tomcat-8.5/Dockerfile index 7663d82e..28f72a6b 100644 --- a/docker/RELEASE/ubuntu-18.04_tomcat-8.5/Dockerfile +++ b/docker/RELEASE/ubuntu-18.04_tomcat-8.5/Dockerfile @@ -1,7 +1,7 @@ FROM asqatasun/contrast-finder:pre-requisites_Ubuntu-18.04_tomcat-8.5 LABEL org.label-schema.schema-version = "1.0.0-rc.1" \ org.label-schema.name = "Contrast-Finder - WebApp (Ubuntu 18.04 - Tomcat 8.5, Java 10)" \ - org.label-schema.version = "0.9.2" \ + org.label-schema.version = "0.9.3-SNAPSHOT" \ org.label-schema.url = "https://contrast-finder.org" \ org.label-schema.vcs-url = "https://github.com/Asqatasun/Contrast-Finder" \ org.label-schema.docker.cmd = "docker run -p 8087:8080 -d asqatasun/contrast-finder" \ @@ -13,9 +13,9 @@ LABEL org.label-schema.schema-version = "1.0.0-rc.1" # # --- Building this docker image # docker build -t asqatasun/contrast-finder . -# docker build -t asqatasun/contrast-finder --build-arg CONTRAST_FINDER_RELEASE=0.9.2 . -# docker build -t asqatasun/contrast-finder --build-arg SRC_URL_PREFIX=https://github.com/Asqatasun/Contrast-Finder/releases/download/v0.9.2/ . -# docker build -t asqatasun/contrast-finder --build-arg SRC_URL=https://github.com/Asqatasun/Contrast-Finder/releases/download/v0.9.2/contrast-finder-webapp_0.9.2.tar.gz . +# docker build -t asqatasun/contrast-finder --build-arg CONTRAST_FINDER_RELEASE=0.9.3-SNAPSHOT . +# docker build -t asqatasun/contrast-finder --build-arg SRC_URL_PREFIX=https://github.com/Asqatasun/Contrast-Finder/releases/download/v0.9.3-SNAPSHOT/ . +# docker build -t asqatasun/contrast-finder --build-arg SRC_URL=https://github.com/Asqatasun/Contrast-Finder/releases/download/v0.9.3-SNAPSHOT/contrast-finder-webapp_0.9.3-SNAPSHOT.tar.gz . # # --- Launch a container # docker run -p 127.0.0.1:8087:8080 --name contrast.finder -d asqatasun/contrast-finder @@ -37,7 +37,7 @@ LABEL org.label-schema.schema-version = "1.0.0-rc.1" ################################################################### # build variables -ARG CONTRAST_FINDER_RELEASE="0.9.2" +ARG CONTRAST_FINDER_RELEASE="0.9.3-SNAPSHOT" ARG SRC_URL_PREFIX="https://github.com/Asqatasun/Contrast-Finder/releases/download/v${CONTRAST_FINDER_RELEASE}" ARG SRC_URL="${SRC_URL_PREFIX}/contrast-finder-webapp_${CONTRAST_FINDER_RELEASE}.tar.gz" diff --git a/docker/SNAPSHOT-local/distrib/alpine_tomcat-7/Dockerfile b/docker/SNAPSHOT-local/distrib/alpine_tomcat-7/Dockerfile index 58f7d531..c8b22add 100644 --- a/docker/SNAPSHOT-local/distrib/alpine_tomcat-7/Dockerfile +++ b/docker/SNAPSHOT-local/distrib/alpine_tomcat-7/Dockerfile @@ -21,7 +21,7 @@ FROM asqatasun/contrast-finder:pre-requisites_Alpine_tomcat-7 ################################################################### # environment variables -ENV CONTRAST_FINDER_RELEASE="0.9.2" +ENV CONTRAST_FINDER_RELEASE="0.9.3-SNAPSHOT" # Add contrast-finder .war ADD contrast-finder-webapp_${CONTRAST_FINDER_RELEASE}.tar.gz /root diff --git a/docker/SNAPSHOT-local/distrib/alpine_tomcat-8.5/Dockerfile b/docker/SNAPSHOT-local/distrib/alpine_tomcat-8.5/Dockerfile index 5e2423ba..b68237ed 100644 --- a/docker/SNAPSHOT-local/distrib/alpine_tomcat-8.5/Dockerfile +++ b/docker/SNAPSHOT-local/distrib/alpine_tomcat-8.5/Dockerfile @@ -22,7 +22,7 @@ FROM asqatasun/contrast-finder:pre-requisites_Alpine_tomcat-8.5 # environment variables -ENV CONTRAST_FINDER_RELEASE="0.9.2" +ENV CONTRAST_FINDER_RELEASE="0.9.3-SNAPSHOT" # Add contrast-finder .war ADD contrast-finder-webapp_${CONTRAST_FINDER_RELEASE}.tar.gz /root diff --git a/docker/SNAPSHOT-local/distrib/alpine_tomcat-9/Dockerfile b/docker/SNAPSHOT-local/distrib/alpine_tomcat-9/Dockerfile index e6656958..f7c3ef3e 100644 --- a/docker/SNAPSHOT-local/distrib/alpine_tomcat-9/Dockerfile +++ b/docker/SNAPSHOT-local/distrib/alpine_tomcat-9/Dockerfile @@ -22,7 +22,7 @@ FROM asqatasun/contrast-finder:pre-requisites_Alpine_tomcat-9 # environment variables -ENV CONTRAST_FINDER_RELEASE="0.9.2" +ENV CONTRAST_FINDER_RELEASE="0.9.3-SNAPSHOT" # Add contrast-finder .war ADD contrast-finder-webapp_${CONTRAST_FINDER_RELEASE}.tar.gz /root diff --git a/docker/SNAPSHOT-local/distrib/debian-9_tomcat-8.5/Dockerfile b/docker/SNAPSHOT-local/distrib/debian-9_tomcat-8.5/Dockerfile index b657595c..8c7ca9c7 100644 --- a/docker/SNAPSHOT-local/distrib/debian-9_tomcat-8.5/Dockerfile +++ b/docker/SNAPSHOT-local/distrib/debian-9_tomcat-8.5/Dockerfile @@ -19,7 +19,7 @@ FROM asqatasun/contrast-finder:pre-requisites_Debian-9_tomcat-8.5 ################################################################### # environment variables -ENV CONTRAST_FINDER_RELEASE="0.9.2" +ENV CONTRAST_FINDER_RELEASE="0.9.3-SNAPSHOT" # Add contrast-finder .war ADD contrast-finder-webapp_${CONTRAST_FINDER_RELEASE}.tar.gz /root diff --git a/docker/SNAPSHOT-local/distrib/debian_tomcat-9_jre9/Dockerfile b/docker/SNAPSHOT-local/distrib/debian_tomcat-9_jre9/Dockerfile index 0b473c0d..0b5e284d 100644 --- a/docker/SNAPSHOT-local/distrib/debian_tomcat-9_jre9/Dockerfile +++ b/docker/SNAPSHOT-local/distrib/debian_tomcat-9_jre9/Dockerfile @@ -22,7 +22,7 @@ FROM asqatasun/contrast-finder:pre-requisites_Debian_tomcat-9_jre9 ################################################################### # environment variables -ENV CONTRAST_FINDER_RELEASE="0.9.2" +ENV CONTRAST_FINDER_RELEASE="0.9.3-SNAPSHOT" ENV CONF_ENV="debug" # Add contrast-finder .war diff --git a/docker/SNAPSHOT-local/distrib/ubuntu-14.04_tomcat-7/Dockerfile b/docker/SNAPSHOT-local/distrib/ubuntu-14.04_tomcat-7/Dockerfile index caf281c3..a329315d 100644 --- a/docker/SNAPSHOT-local/distrib/ubuntu-14.04_tomcat-7/Dockerfile +++ b/docker/SNAPSHOT-local/distrib/ubuntu-14.04_tomcat-7/Dockerfile @@ -19,7 +19,7 @@ FROM asqatasun/contrast-finder:pre-requisites_Ubuntu-14.04_tomcat-7 ################################################################### # environment variables -ENV CONTRAST_FINDER_RELEASE="0.9.2" +ENV CONTRAST_FINDER_RELEASE="0.9.3-SNAPSHOT" # Add contrast-finder .war ADD contrast-finder-webapp_${CONTRAST_FINDER_RELEASE}.tar.gz /root diff --git a/docker/SNAPSHOT-local/distrib/ubuntu-16.04_tomcat-7/Dockerfile b/docker/SNAPSHOT-local/distrib/ubuntu-16.04_tomcat-7/Dockerfile index aed205b9..19dcb480 100644 --- a/docker/SNAPSHOT-local/distrib/ubuntu-16.04_tomcat-7/Dockerfile +++ b/docker/SNAPSHOT-local/distrib/ubuntu-16.04_tomcat-7/Dockerfile @@ -19,7 +19,7 @@ FROM asqatasun/contrast-finder:pre-requisites_Ubuntu-16.04_tomcat-7 ################################################################### # environment variables -ENV CONTRAST_FINDER_RELEASE="0.9.2" +ENV CONTRAST_FINDER_RELEASE="0.9.3-SNAPSHOT" # Add contrast-finder .war ADD contrast-finder-webapp_${CONTRAST_FINDER_RELEASE}.tar.gz /root diff --git a/docker/SNAPSHOT-local/distrib/ubuntu-16.04_tomcat-8.0/Dockerfile b/docker/SNAPSHOT-local/distrib/ubuntu-16.04_tomcat-8.0/Dockerfile index 4a92b0c7..f6d61307 100644 --- a/docker/SNAPSHOT-local/distrib/ubuntu-16.04_tomcat-8.0/Dockerfile +++ b/docker/SNAPSHOT-local/distrib/ubuntu-16.04_tomcat-8.0/Dockerfile @@ -19,7 +19,7 @@ FROM asqatasun/contrast-finder:pre-requisites_Ubuntu-16.04_tomcat-8.0 ################################################################### # environment variables -ENV CONTRAST_FINDER_RELEASE="0.9.2" +ENV CONTRAST_FINDER_RELEASE="0.9.3-SNAPSHOT" # Add contrast-finder .war ADD contrast-finder-webapp_${CONTRAST_FINDER_RELEASE}.tar.gz /root diff --git a/docker/SNAPSHOT-local/distrib/ubuntu-18.04_tomcat-8.5/Dockerfile b/docker/SNAPSHOT-local/distrib/ubuntu-18.04_tomcat-8.5/Dockerfile index 3bbfa68f..7bc04a05 100644 --- a/docker/SNAPSHOT-local/distrib/ubuntu-18.04_tomcat-8.5/Dockerfile +++ b/docker/SNAPSHOT-local/distrib/ubuntu-18.04_tomcat-8.5/Dockerfile @@ -20,7 +20,7 @@ FROM asqatasun/contrast-finder:pre-requisites_Ubuntu-18.04_tomcat-8.5 ################################################################### # environment variables -ENV CONTRAST_FINDER_RELEASE="0.9.2" +ENV CONTRAST_FINDER_RELEASE="0.9.3-SNAPSHOT" # Add contrast-finder .war ADD contrast-finder-webapp_${CONTRAST_FINDER_RELEASE}.tar.gz /root diff --git a/docker/SNAPSHOT-local/test_config-file/01.no.config.file/Dockerfile b/docker/SNAPSHOT-local/test_config-file/01.no.config.file/Dockerfile index bc565b2d..c0f9b30f 100644 --- a/docker/SNAPSHOT-local/test_config-file/01.no.config.file/Dockerfile +++ b/docker/SNAPSHOT-local/test_config-file/01.no.config.file/Dockerfile @@ -19,7 +19,7 @@ FROM asqatasun/contrast-finder:pre-requisites_Ubuntu-18.04_tomcat-8.5 ################################################################### # environment variables -ENV CONTRAST_FINDER_RELEASE="0.9.2" +ENV CONTRAST_FINDER_RELEASE="0.9.3-SNAPSHOT" # Add contrast-finder .war ADD contrast-finder-webapp_${CONTRAST_FINDER_RELEASE}.tar.gz /root diff --git a/docker/SNAPSHOT-local/test_config-file/10.default.algo/Dockerfile b/docker/SNAPSHOT-local/test_config-file/10.default.algo/Dockerfile index 3d906d8f..54485131 100644 --- a/docker/SNAPSHOT-local/test_config-file/10.default.algo/Dockerfile +++ b/docker/SNAPSHOT-local/test_config-file/10.default.algo/Dockerfile @@ -19,7 +19,7 @@ FROM asqatasun/contrast-finder:pre-requisites_Ubuntu-18.04_tomcat-8.5 ################################################################### # environment variables -ENV CONTRAST_FINDER_RELEASE="0.9.2" +ENV CONTRAST_FINDER_RELEASE="0.9.3-SNAPSHOT" ENV CONF_DEFAULT_ALGO="Rgb" # ENV CONF_DEFAULT_ALGO="Rgb" # ENV CONF_DEFAULT_ALGO="HSV" diff --git a/docker/SNAPSHOT-local/test_config-file/20.debug.env/Dockerfile b/docker/SNAPSHOT-local/test_config-file/20.debug.env/Dockerfile index c7c097d0..a5b55f6f 100644 --- a/docker/SNAPSHOT-local/test_config-file/20.debug.env/Dockerfile +++ b/docker/SNAPSHOT-local/test_config-file/20.debug.env/Dockerfile @@ -19,7 +19,7 @@ FROM asqatasun/contrast-finder:pre-requisites_Ubuntu-18.04_tomcat-8.5 ################################################################### # environment variables -ENV CONTRAST_FINDER_RELEASE="0.9.2" +ENV CONTRAST_FINDER_RELEASE="0.9.3-SNAPSHOT" ENV CONF_ENV="debug" # Add contrast-finder .war diff --git a/docker/SNAPSHOT-local/test_config-file/30.piwik/Dockerfile b/docker/SNAPSHOT-local/test_config-file/30.piwik/Dockerfile index c4d5a066..41ec7e0b 100644 --- a/docker/SNAPSHOT-local/test_config-file/30.piwik/Dockerfile +++ b/docker/SNAPSHOT-local/test_config-file/30.piwik/Dockerfile @@ -19,7 +19,7 @@ FROM asqatasun/contrast-finder:pre-requisites_Ubuntu-18.04_tomcat-8.5 ################################################################### # environment variables -ENV CONTRAST_FINDER_RELEASE="0.9.2" +ENV CONTRAST_FINDER_RELEASE="0.9.3-SNAPSHOT" ENV PIWIK_KEY="9" ENV PIWIK_URL="http://localhost/piwik/" diff --git a/docker/SNAPSHOT-local/test_config-file/40.searchEngineIndex/Dockerfile b/docker/SNAPSHOT-local/test_config-file/40.searchEngineIndex/Dockerfile index 7c0406b8..310bfeed 100644 --- a/docker/SNAPSHOT-local/test_config-file/40.searchEngineIndex/Dockerfile +++ b/docker/SNAPSHOT-local/test_config-file/40.searchEngineIndex/Dockerfile @@ -19,7 +19,7 @@ FROM asqatasun/contrast-finder:pre-requisites_Ubuntu-18.04_tomcat-8.5 ################################################################### # environment variables -ENV CONTRAST_FINDER_RELEASE="0.9.2" +ENV CONTRAST_FINDER_RELEASE="0.9.3-SNAPSHOT" ENV SEARCH_ENGINGE="yes" # Add contrast-finder .war diff --git a/docker/pre-requisites/pre-requisites_Alpine_tomcat-7/Dockerfile b/docker/pre-requisites/pre-requisites_Alpine_tomcat-7/Dockerfile index 030ec642..cd80e48d 100644 --- a/docker/pre-requisites/pre-requisites_Alpine_tomcat-7/Dockerfile +++ b/docker/pre-requisites/pre-requisites_Alpine_tomcat-7/Dockerfile @@ -3,7 +3,7 @@ LABEL org.label-schema.schema-version = "1.0.0-rc.1" org.label-schema.name = "Contrast-Finder - WebApp pre-requisites (tomcat7 < jdk7 < alpine 3.7)" \ org.label-schema.url = "https://contrast-finder.org" \ org.label-schema.vcs-url = "https://github.com/Asqatasun/Contrast-Finder" \ - org.label-schema.version = "0.9.2" + org.label-schema.version = "0.9.3-SNAPSHOT" # ----> documentation http://label-schema.org/ # #### usage ###################################################### diff --git a/docker/pre-requisites/pre-requisites_Alpine_tomcat-8.5/Dockerfile b/docker/pre-requisites/pre-requisites_Alpine_tomcat-8.5/Dockerfile index cd9923e9..3c5cd6d2 100644 --- a/docker/pre-requisites/pre-requisites_Alpine_tomcat-8.5/Dockerfile +++ b/docker/pre-requisites/pre-requisites_Alpine_tomcat-8.5/Dockerfile @@ -3,7 +3,7 @@ LABEL org.label-schema.schema-version = "1.0.0-rc.1" org.label-schema.name = "Contrast-Finder - WebApp pre-requisites (tomcat 8.5 < jdk 8 < alpine 3.7)" \ org.label-schema.url = "https://contrast-finder.org" \ org.label-schema.vcs-url = "https://github.com/Asqatasun/Contrast-Finder" \ - org.label-schema.version = "0.9.2" + org.label-schema.version = "0.9.3-SNAPSHOT" # ----> documentation http://label-schema.org/ # #### usage ###################################################### diff --git a/docker/pre-requisites/pre-requisites_Alpine_tomcat-9/Dockerfile b/docker/pre-requisites/pre-requisites_Alpine_tomcat-9/Dockerfile index abef6e9b..65f5bd67 100644 --- a/docker/pre-requisites/pre-requisites_Alpine_tomcat-9/Dockerfile +++ b/docker/pre-requisites/pre-requisites_Alpine_tomcat-9/Dockerfile @@ -4,7 +4,7 @@ LABEL org.label-schema.schema-version = "1.0.0-rc.1" org.label-schema.name = "Contrast-Finder - WebApp pre-requisites (tomcat 9 < jdk 8 < alpine 3.7)" \ org.label-schema.url = "https://contrast-finder.org" \ org.label-schema.vcs-url = "https://github.com/Asqatasun/Contrast-Finder" \ - org.label-schema.version = "0.9.2" + org.label-schema.version = "0.9.3-SNAPSHOT" # ----> documentation http://label-schema.org/ # #### usage ###################################################### diff --git a/docker/pre-requisites/pre-requisites_Debian-9_tomcat-8.5/Dockerfile b/docker/pre-requisites/pre-requisites_Debian-9_tomcat-8.5/Dockerfile index 119bee43..3c74b7e9 100644 --- a/docker/pre-requisites/pre-requisites_Debian-9_tomcat-8.5/Dockerfile +++ b/docker/pre-requisites/pre-requisites_Debian-9_tomcat-8.5/Dockerfile @@ -3,7 +3,7 @@ LABEL org.label-schema.schema-version = "1.0.0-rc.1" org.label-schema.name = "Contrast-Finder - WebApp pre-requisites (Debian 9 - Tomcat 8.5)" \ org.label-schema.url = "https://contrast-finder.org" \ org.label-schema.vcs-url = "https://github.com/Asqatasun/Contrast-Finder" \ - org.label-schema.version = "0.9.2" + org.label-schema.version = "0.9.3-SNAPSHOT" # ----> documentation http://label-schema.org/ # #### usage ###################################################### diff --git a/docker/pre-requisites/pre-requisites_Debian_tomcat-9_jre9/Dockerfile b/docker/pre-requisites/pre-requisites_Debian_tomcat-9_jre9/Dockerfile index 8467f3f0..649ec46d 100644 --- a/docker/pre-requisites/pre-requisites_Debian_tomcat-9_jre9/Dockerfile +++ b/docker/pre-requisites/pre-requisites_Debian_tomcat-9_jre9/Dockerfile @@ -3,7 +3,7 @@ LABEL org.label-schema.schema-version = "1.0.0-rc.1" org.label-schema.name = "Contrast-Finder - WebApp pre-requisites (tomcat 9 < jdk 9 < debian SID)" \ org.label-schema.url = "https://contrast-finder.org" \ org.label-schema.vcs-url = "https://github.com/Asqatasun/Contrast-Finder" \ - org.label-schema.version = "0.9.2" + org.label-schema.version = "0.9.3-SNAPSHOT" # ----> documentation http://label-schema.org/ # #### usage ###################################################### diff --git a/docker/pre-requisites/pre-requisites_Ubuntu-14.04_tomcat-7/Dockerfile b/docker/pre-requisites/pre-requisites_Ubuntu-14.04_tomcat-7/Dockerfile index e6605ca5..a17be794 100644 --- a/docker/pre-requisites/pre-requisites_Ubuntu-14.04_tomcat-7/Dockerfile +++ b/docker/pre-requisites/pre-requisites_Ubuntu-14.04_tomcat-7/Dockerfile @@ -3,7 +3,7 @@ LABEL org.label-schema.schema-version = "1.0.0-rc.1" org.label-schema.name = "Contrast-Finder - WebApp pre-requisites (Ubuntu 14.04 - Tomcat 7)" \ org.label-schema.url = "https://contrast-finder.org" \ org.label-schema.vcs-url = "https://github.com/Asqatasun/Contrast-Finder" \ - org.label-schema.version = "0.9.2" + org.label-schema.version = "0.9.3-SNAPSHOT" # ----> documentation http://label-schema.org/ # #### usage ###################################################### diff --git a/docker/pre-requisites/pre-requisites_Ubuntu-16.04_tomcat-7/Dockerfile b/docker/pre-requisites/pre-requisites_Ubuntu-16.04_tomcat-7/Dockerfile index 13cb151f..9a4dc4a5 100644 --- a/docker/pre-requisites/pre-requisites_Ubuntu-16.04_tomcat-7/Dockerfile +++ b/docker/pre-requisites/pre-requisites_Ubuntu-16.04_tomcat-7/Dockerfile @@ -3,7 +3,7 @@ LABEL org.label-schema.schema-version = "1.0.0-rc.1" org.label-schema.name = "Contrast-Finder - WebApp pre-requisites (Ubuntu 16.04 - Tomcat 7)" \ org.label-schema.url = "https://contrast-finder.org" \ org.label-schema.vcs-url = "https://github.com/Asqatasun/Contrast-Finder" \ - org.label-schema.version = "0.9.2" + org.label-schema.version = "0.9.3-SNAPSHOT" # ----> documentation http://label-schema.org/ # #### usage ###################################################### diff --git a/docker/pre-requisites/pre-requisites_Ubuntu-16.04_tomcat-8.0/Dockerfile b/docker/pre-requisites/pre-requisites_Ubuntu-16.04_tomcat-8.0/Dockerfile index bc54b1ad..cee991b0 100644 --- a/docker/pre-requisites/pre-requisites_Ubuntu-16.04_tomcat-8.0/Dockerfile +++ b/docker/pre-requisites/pre-requisites_Ubuntu-16.04_tomcat-8.0/Dockerfile @@ -3,7 +3,7 @@ LABEL org.label-schema.schema-version = "1.0.0-rc.1" org.label-schema.name = "Contrast-Finder - WebApp pre-requisites (Ubuntu 16.04 - Tomcat 8.0)" \ org.label-schema.url = "https://contrast-finder.org" \ org.label-schema.vcs-url = "https://github.com/Asqatasun/Contrast-Finder" \ - org.label-schema.version = "0.9.2" + org.label-schema.version = "0.9.3-SNAPSHOT" # ----> documentation http://label-schema.org/ # #### usage ###################################################### diff --git a/docker/pre-requisites/pre-requisites_Ubuntu-18.04_tomcat-8.5/Dockerfile b/docker/pre-requisites/pre-requisites_Ubuntu-18.04_tomcat-8.5/Dockerfile index 9fc745d1..792bf938 100644 --- a/docker/pre-requisites/pre-requisites_Ubuntu-18.04_tomcat-8.5/Dockerfile +++ b/docker/pre-requisites/pre-requisites_Ubuntu-18.04_tomcat-8.5/Dockerfile @@ -3,7 +3,7 @@ LABEL org.label-schema.schema-version = "1.0.0-rc.1" org.label-schema.name = "Contrast-Finder - WebApp pre-requisites (Ubuntu 18.04 - Tomcat 8.5, Java 10)" \ org.label-schema.url = "https://contrast-finder.org" \ org.label-schema.vcs-url = "https://github.com/Asqatasun/Contrast-Finder" \ - org.label-schema.version = "0.9.2" + org.label-schema.version = "0.9.3-SNAPSHOT" # ----> documentation http://label-schema.org/ # #### usage ###################################################### diff --git a/documentation/en/10_Install_doc/webapp_Installation.md b/documentation/en/10_Install_doc/webapp_Installation.md index 9226e603..c78beffb 100644 --- a/documentation/en/10_Install_doc/webapp_Installation.md +++ b/documentation/en/10_Install_doc/webapp_Installation.md @@ -14,7 +14,7 @@ You just need to replace `tomcat7` with `tomcat8` in the following command lines ```bash cd /tmp -wget https://github.com/Asqatasun/Contrast-Finder/releases/download/v0.9.2/contrast-finder-webapp_0.9.2.tar.gz +wget https://github.com/Asqatasun/Contrast-Finder/releases/download/v0.9.3-SNAPSHOT/contrast-finder-webapp_0.9.3-SNAPSHOT.tar.gz tar -xzvf contrast-finder-webapp_*.tar.gz cd contrast-finder-webapp_*/ mv -v install/contrast-finder-webapp_*.war contrast-finder.war diff --git a/documentation/pom.xml b/documentation/pom.xml index e12ff123..45bc45ea 100644 --- a/documentation/pom.xml +++ b/documentation/pom.xml @@ -4,11 +4,11 @@ org.asqatasun contrast-finder - 0.9.2 + 0.9.3-SNAPSHOT documentation pom - 0.9.2 + 0.9.3-SNAPSHOT contrast-finder-documentation diff --git a/engine/api/pom.xml b/engine/api/pom.xml index c9cb9a83..338823c5 100644 --- a/engine/api/pom.xml +++ b/engine/api/pom.xml @@ -4,10 +4,10 @@ org.asqatasun engine - 0.9.2 + 0.9.3-SNAPSHOT contrast-finder-api - 0.9.2 + 0.9.3-SNAPSHOT jar api diff --git a/engine/hsv/pom.xml b/engine/hsv/pom.xml index cc9d4066..6d7cfa1b 100644 --- a/engine/hsv/pom.xml +++ b/engine/hsv/pom.xml @@ -4,10 +4,10 @@ org.asqatasun engine - 0.9.2 + 0.9.3-SNAPSHOT contrast-finder-hsv - 0.9.2 + 0.9.3-SNAPSHOT jar hsv diff --git a/engine/impl/pom.xml b/engine/impl/pom.xml index c89264a2..027c8126 100644 --- a/engine/impl/pom.xml +++ b/engine/impl/pom.xml @@ -4,10 +4,10 @@ org.asqatasun engine - 0.9.2 + 0.9.3-SNAPSHOT contrast-finder-impl - 0.9.2 + 0.9.3-SNAPSHOT jar impl diff --git a/engine/pom.xml b/engine/pom.xml index 24411eba..e450e802 100644 --- a/engine/pom.xml +++ b/engine/pom.xml @@ -4,10 +4,10 @@ org.asqatasun contrast-finder - 0.9.2 + 0.9.3-SNAPSHOT engine - 0.9.2 + 0.9.3-SNAPSHOT pom contrast-finder-engine diff --git a/engine/utils/pom.xml b/engine/utils/pom.xml index 56ec8b1e..e453f493 100644 --- a/engine/utils/pom.xml +++ b/engine/utils/pom.xml @@ -4,10 +4,10 @@ org.asqatasun engine - 0.9.2 + 0.9.3-SNAPSHOT contrast-finder-utils - 0.9.2 + 0.9.3-SNAPSHOT jar utils diff --git a/pom.xml b/pom.xml index 969b324e..330d8ee5 100644 --- a/pom.xml +++ b/pom.xml @@ -20,7 +20,7 @@ org.asqatasun contrast-finder pom - 0.9.2 + 0.9.3-SNAPSHOT Contrast-Finder diff --git a/webapp/pom.xml b/webapp/pom.xml index 71be45c9..64145bd8 100644 --- a/webapp/pom.xml +++ b/webapp/pom.xml @@ -4,10 +4,10 @@ org.asqatasun contrast-finder - 0.9.2 + 0.9.3-SNAPSHOT webapp - 0.9.2 + 0.9.3-SNAPSHOT war contrast-finder-webapp diff --git a/webapp/src/main/webapp/WEB-INF/template/template_variables.jspf b/webapp/src/main/webapp/WEB-INF/template/template_variables.jspf index 65c75043..f95d21c6 100644 --- a/webapp/src/main/webapp/WEB-INF/template/template_variables.jspf +++ b/webapp/src/main/webapp/WEB-INF/template/template_variables.jspf @@ -2,7 +2,7 @@ <%@ page pageEncoding="UTF-8" %> <%-- APP version --%> - + <%-- APP Name --%> From a68b0765e2d5ac8da3b2f46edc3bce979815ae8b Mon Sep 17 00:00:00 2001 From: Fabrice Gangler Date: Thu, 27 Sep 2018 00:46:29 +0200 Subject: [PATCH 02/20] fixed #180, fixed #181, fixed #182 #180 - Upgraded commons-lang3 (3.8.1 instead of 3.8) #181 - Upgraded SpringFramework (4.3.19 instead of 4.3.18) #182 - Upgraded spring-security (4.2.8 instead of 4.2.7) --- CHANGELOG.md | 4 +++- documentation/en/30_Contributor_doc/QA-tools.md | 8 ++++++++ pom.xml | 2 +- webapp/pom.xml | 4 ++-- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9884c4bb..dd0116df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,9 @@ none none ### Outdated dependencies -none +- [#180 - Upgraded commons-lang3 (3.8.1 instead of 3.8)](https://github.com/Asqatasun/Contrast-Finder/issues/180) +- [#181 - Upgraded SpringFramework (4.3.19 instead of 4.3.18)](https://github.com/Asqatasun/Contrast-Finder/issues/181) +- [#182 - Upgraded spring-security (4.2.8 instead of 4.2.7)](https://github.com/Asqatasun/Contrast-Finder/issues/182) ### Bug none diff --git a/documentation/en/30_Contributor_doc/QA-tools.md b/documentation/en/30_Contributor_doc/QA-tools.md index c6d25076..693b0ebb 100644 --- a/documentation/en/30_Contributor_doc/QA-tools.md +++ b/documentation/en/30_Contributor_doc/QA-tools.md @@ -73,6 +73,14 @@ ## Audit history +### 0.9.2 +* Web perf + * https://www.webpagetest.org/result/180902_G8_c788cf1c418ac6fb9f9d9b17835ab180/ + * https://yellowlab.tools/result/f4fxn1k0lb +* Global tools (webperf, accessibility, security, ...) + * https://www.dareboost.com/fr/report/d_5b8c7860e9679072a72634e5 + * https://webhint.io/scanner/ffa74833-a47a-47d3-865c-1fda27c6067c + ### 0.9.0 / 0.9.1 * Web perf * https://www.webpagetest.org/result/180513_JQ_6968f5fe020e3ae88c8078c4fc620995/ diff --git a/pom.xml b/pom.xml index 330d8ee5..166422fb 100644 --- a/pom.xml +++ b/pom.xml @@ -76,7 +76,7 @@ 1.4 4.2 1.2 - 3.8 + 3.8.1 4.12 1.2.3 2.1.0 diff --git a/webapp/pom.xml b/webapp/pom.xml index 64145bd8..1bfd9367 100644 --- a/webapp/pom.xml +++ b/webapp/pom.xml @@ -28,8 +28,8 @@ UTF-8 - 4.3.18.RELEASE - 4.2.7.RELEASE + 4.3.19.RELEASE + 4.2.8.RELEASE 1.5.2 4.0.4 1.2.5 From f391eae3279c2e7ce2d364af63f4fa4812c2d6a8 Mon Sep 17 00:00:00 2001 From: Fabrice Gangler Date: Thu, 27 Sep 2018 01:46:51 +0200 Subject: [PATCH 03/20] Updated humans.txt file + fixed some external links in the documentation (Sonarwhal become Webhint) --- CHANGELOG.md | 2 +- .../en/30_Contributor_doc/QA-tools.md | 50 ++++++++++--------- webapp/src/main/webapp/humans.txt | 4 +- 3 files changed, 29 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd0116df..807c3870 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,7 +29,7 @@ none none ### Documentation -none +- Fixed some external links ('Sonarwhal' become 'Webhint') ### Task none diff --git a/documentation/en/30_Contributor_doc/QA-tools.md b/documentation/en/30_Contributor_doc/QA-tools.md index 693b0ebb..29c800a7 100644 --- a/documentation/en/30_Contributor_doc/QA-tools.md +++ b/documentation/en/30_Contributor_doc/QA-tools.md @@ -10,20 +10,20 @@ * [Mozilla Observatory](https://observatory.mozilla.org/analyze.html?host=app.contrast-finder.org) `*` (HTTP header, SSL, cookies, ...) * [Security Headers](https://securityheaders.io/?q=https://app.contrast-finder.org) `*` (HTTP header) * Content-Security-Policy (CSP) - * [cspvalidator.org](https://cspvalidator.org/#url=https://app.contrast-finder.org) `*` - * [csp-evaluator.withgoogle.com](https://csp-evaluator.withgoogle.com/?csp=https://app.contrast-finder.org) `*` + * [cspvalidator.org](https://cspvalidator.org/#url=https://app.contrast-finder.org) `*` + * [csp-evaluator.withgoogle.com](https://csp-evaluator.withgoogle.com/?csp=https://app.contrast-finder.org) `*` * SSL - * [ssllabs.com](https://www.ssllabs.com/ssltest/analyze?d=app.contrast-finder.org) `*` - * [tls.imirhil.fr](https://tls.imirhil.fr/https/app.contrast-finder.org) `*` + * [ssllabs.com](https://www.ssllabs.com/ssltest/analyze?d=app.contrast-finder.org) `*` + * [tls.imirhil.fr](https://tls.imirhil.fr/https/app.contrast-finder.org) `*` * W3C tools * [HTML validator](https://validator.w3.org/nu/?doc=https://app.contrast-finder.org&showsource=yes&showoutline=yes&showimagereport=yes) `*` * [CSS validator](https://jigsaw.w3.org/css-validator/validator?uri=https://app.contrast-finder.org&profile=css3) `*` * [Link checker](https://validator.w3.org/checklink?uri=https://app.contrast-finder.org&hide_type=all&depth=&check=Check) `*` * [i18n checker](https://validator.w3.org/i18n-checker/check?uri=https://app.contrast-finder.org) `*` - * [i18n checker for **/?lang=en**](https://validator.w3.org/i18n-checker/check?uri=https://app.contrast-finder.org/?lang=en) `*` - * [i18n checker for **/?lang=fr**](https://validator.w3.org/i18n-checker/check?uri=https://app.contrast-finder.org/?lang=fr) `*` - * [i18n checker for **/?lang=pt**](https://validator.w3.org/i18n-checker/check?uri=https://app.contrast-finder.org/?lang=pt) `*` - * [i18n checker for **/?lang=ko**](https://validator.w3.org/i18n-checker/check?uri=https://app.contrast-finder.org/?lang=ko) `*` + * [i18n checker for **/?lang=en**](https://validator.w3.org/i18n-checker/check?uri=https://app.contrast-finder.org/?lang=en) `*` + * [i18n checker for **/?lang=fr**](https://validator.w3.org/i18n-checker/check?uri=https://app.contrast-finder.org/?lang=fr) `*` + * [i18n checker for **/?lang=pt**](https://validator.w3.org/i18n-checker/check?uri=https://app.contrast-finder.org/?lang=pt) `*` + * [i18n checker for **/?lang=ko**](https://validator.w3.org/i18n-checker/check?uri=https://app.contrast-finder.org/?lang=ko) `*` * Web accessibility * [Asqatasun](https://app.asqatasun.org) * Web perf @@ -35,20 +35,22 @@ * [Http2.pro](https://http2.pro/check?url=https://app.contrast-finder.org) `*` (check server HTTP/2, ALPN, and Server-push support) * Global tools (webperf, accessibility, security, ...) * [Dareboost](https://www.dareboost.com) (free trial) - * [Sonarwhal](https://sonarwhal.com/scanner/) + * [Webhint](https://webhint.io/scanner/) + +--------- * Social networks - * [Twitter card validator](https://cards-dev.twitter.com/validator) + * [Twitter card validator](https://cards-dev.twitter.com/validator) * structured data (JSON-LD, rdf, schema.org, microformats.org, ...) - * [Google structured data testing tool](https://search.google.com/structured-data/testing-tool#url=https://app.contrast-finder.org/) `*` - * [Yandex structured data testing tool](https://webmaster.yandex.com/tools/microtest/) - * [Structured Data Linter](http://linter.structured-data.org/?url=https://app.contrast-finder.org) `*` - * [Microdata Parser](http://tools.seomoves.org/microdata/) + * [Google structured data testing tool](https://search.google.com/structured-data/testing-tool#url=https://app.contrast-finder.org/) `*` + * [Yandex structured data testing tool](https://webmaster.yandex.com/tools/microtest/) + * [Structured Data Linter](http://linter.structured-data.org/?url=https://app.contrast-finder.org) `*` + * [Microdata Parser](https://www.webmoves.net/tools/microdata) * Google image - * [images used on the website](https://www.google.fr/search?tbm=isch&q=site:app.contrast-finder.org) `*` (site:app.contrast-finder.org) - * [images used on the website but hosted on other domains](https://www.google.fr/search?tbm=isch&q=site:app.contrast-finder.org+-src:app.contrast-finder.org) `*` (site:app.contrast-finder.org -src:app.contrast-finder.org) - * [images hosted on the domain name](https://www.google.fr/search?tbm=isch&q=src:app.contrast-finder.org) `*` (src:app.contrast-finder.org) - * [images hosted on the domain name and used by other domain names (hotlinks)](https://www.google.fr/search?tbm=isch&q=src:app.contrast-finder.org+-site:app.contrast-finder.org) `*` (src:app.contrast-finder.org -site:app.contrast-finder.org) + * [images used on the website](https://www.google.fr/search?tbm=isch&q=site:app.contrast-finder.org) `*` (site:app.contrast-finder.org) + * [images used on the website but hosted on other domains](https://www.google.fr/search?tbm=isch&q=site:app.contrast-finder.org+-src:app.contrast-finder.org) `*` (site:app.contrast-finder.org -src:app.contrast-finder.org) + * [images hosted on the domain name](https://www.google.fr/search?tbm=isch&q=src:app.contrast-finder.org) `*` (src:app.contrast-finder.org) + * [images hosted on the domain name and used by other domain names (hotlinks)](https://www.google.fr/search?tbm=isch&q=src:app.contrast-finder.org+-site:app.contrast-finder.org) `*` (src:app.contrast-finder.org -site:app.contrast-finder.org) ## Open-source softwares @@ -69,7 +71,7 @@ * [Yellowlab](https://github.com/gmetais/YellowLabTools/) (API, npm CLI, Grunt task, ...) * [Sitespeed.io](https://www.sitespeed.io/) (npm or docker is needed) * Global tools - * [Sonarwhal](https://github.com/sonarwhal/sonarwhal) (Node.js v8) + * [Webhint](https://github.com/webhintio/hint) (Node.js v8) ## Audit history @@ -87,7 +89,7 @@ * https://yellowlab.tools/result/f1066yvsyi * Global tools (webperf, accessibility, security, ...) * https://www.dareboost.com/fr/report/5af8b7c9e96790618ff385c5 - * https://sonarwhal.com/scanner/8f0ca246-a8ac-420e-8737-6405d3ba8d59 + * https://webhint.io/scanner/8f0ca246-a8ac-420e-8737-6405d3ba8d59 ### 0.8.6 * Web perf @@ -95,7 +97,7 @@ * https://yellowlab.tools/result/f06nkun2pi * Global tools (webperf, accessibility, security, ...) * https://www.dareboost.com/fr/report/5ad52ff9e967904471360c33 - * https://sonarwhal.com/scanner/ac55dafe-b7b2-46bb-8ee0-5195a61b363b + * https://webhint.io/scanner/ac55dafe-b7b2-46bb-8ee0-5195a61b363b ### 0.8.5 * Web perf @@ -103,7 +105,7 @@ * http://yellowlab.tools/result/eymxjrh0sp * Global tools (webperf, accessibility, security, ...) * https://www.dareboost.com/fr/report/5a8ebf220cf2ce962ef41354 - * https://sonarwhal.com/scanner/65e8f28c-9c6b-4b36-a4ca-38b57f54d82f + * https://webhint.io/scanner/65e8f28c-9c6b-4b36-a4ca-38b57f54d82f ### 0.8.4 * Web perf @@ -111,7 +113,7 @@ * http://yellowlab.tools/result/eyj3i5jzto * Global tools (webperf, accessibility, security, ...) * https://www.dareboost.com/en/report/5a8df7710cf2a402e2e22fcd - * https://sonarwhal.com/scanner/6f10d0e0-e941-4470-a900-c94980409a50 + * https://webhint.io/scanner/6f10d0e0-e941-4470-a900-c94980409a50 ### 0.8.3 * Web perf @@ -119,4 +121,4 @@ * http://yellowlab.tools/result/exn8ef7di1 * Global tools (webperf, accessibility, security, ...) * https://www.dareboost.com/en/report/5a67f2c60cf2b528a73f6dde - * https://sonarwhal.com/scanner/6699688c-0363-4d0b-a636-add8a2f9d909 + * https://webhint.io/scanner/6699688c-0363-4d0b-a636-add8a2f9d909 diff --git a/webapp/src/main/webapp/humans.txt b/webapp/src/main/webapp/humans.txt index e085ed7a..b4c7dfa8 100644 --- a/webapp/src/main/webapp/humans.txt +++ b/webapp/src/main/webapp/humans.txt @@ -74,10 +74,10 @@ Feature requests + Accessibility feedbacks: # SITE Languages : English / Español / Français / Português / 한국어 - Standards : HTML5, WCAG + Standards : HTML5, WCAG, RGAA Softwares : Spring Framework, Maven, Tomcat, Apache Tools : Asqatasun, Docker, Hardenize, Mozilla Observatory, - OWASP Dependency-Check, Webpagetest, W3C tools + OWASP Dependency-Check, Webpagetest, Dareboost, W3C tools ####################################################### From c1ff199702ee94a60d1f8f7f39928427641ffe6b Mon Sep 17 00:00:00 2001 From: Fabrice Gangler Date: Fri, 28 Sep 2018 20:32:18 +0200 Subject: [PATCH 04/20] updated Other-contrast-tools.md (add "Link Contrast Checker" by webaim.org) --- documentation/en/Other-contrast-tools.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/documentation/en/Other-contrast-tools.md b/documentation/en/Other-contrast-tools.md index 87a46c1c..1460049f 100644 --- a/documentation/en/Other-contrast-tools.md +++ b/documentation/en/Other-contrast-tools.md @@ -1,7 +1,7 @@ # Other contrast tools ## Contrast tools we love: - +* [Link Contrast Checker (webaim.org)](https://webaim.org/resources/linkcontrastchecker/) + API * [Contrast-A](http://www.dasplankton.de/ContrastA/) (legacy / flash needed) * [WCAG Contrast Checker (firefox addon) v1.2](https://addons.mozilla.org/fr/firefox/addon/wcag-contrast-checker/versions/?page=1#version-1.2) Especially v1.2 because you can select a given text (functionnality has disappeared in further versions) * [Color Contrast Tool (snook.ca)](http://snook.ca/technical/colour_contrast/colour.html) @@ -10,7 +10,7 @@ ## Other contrast tools (which are actually good, but it appears we don't them) -* http://webaim.org/resources/contrastchecker/ +* [Color Contrast Checker (webaim.org)](http://webaim.org/resources/contrastchecker/) * https://contrastchecker.com/ * http://leaverou.github.io/contrast-ratio/ * src: https://github.com/LeaVerou/contrast-ratio From 207a77008917f97213d25c528db6f76f68eff7e6 Mon Sep 17 00:00:00 2001 From: Fabrice Gangler Date: Sat, 29 Sep 2018 16:09:46 +0200 Subject: [PATCH 05/20] fix ColorFinderHsv.java debug --- .../java/org/asqatasun/contrastfinder/hsv/ColorFinderHsv.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/hsv/src/main/java/org/asqatasun/contrastfinder/hsv/ColorFinderHsv.java b/engine/hsv/src/main/java/org/asqatasun/contrastfinder/hsv/ColorFinderHsv.java index f17e42f4..58ef95d5 100644 --- a/engine/hsv/src/main/java/org/asqatasun/contrastfinder/hsv/ColorFinderHsv.java +++ b/engine/hsv/src/main/java/org/asqatasun/contrastfinder/hsv/ColorFinderHsv.java @@ -52,7 +52,7 @@ public class ColorFinderHsv extends AbstractColorFinder { */ public ColorFinderHsv() { super(new ColorResultFactoryImpl(), new ColorCombinaisonFactoryImpl()); - LOGGER.info("instanciation of ColorFinderHsv class"); + LOGGER.debug("instanciation of ColorFinderHsv class"); } /** @@ -62,7 +62,7 @@ public ColorFinderHsv() { */ @Override protected void findColors() { - LOGGER.info("Appel de findColors, couleurs : " + getColorToKeep() + getColorResult().getSubmittedCombinaisonColor().getColor() + getColorResult().getNumberOfSuggestedColors()); + LOGGER.debug("call findColors, colors : " + getColorToKeep() + getColorResult().getSubmittedCombinaisonColor().getColor() + getColorResult().getNumberOfSuggestedColors()); testedColorsFromHueRound = new HashSet(); Color colorToModify = getColorResult().getSubmittedCombinaisonColor().getColor(); From d510dba4d18c58d3307a18927508a6cfba2a7404 Mon Sep 17 00:00:00 2001 From: Fabrice Gangler Date: Sat, 29 Sep 2018 16:10:59 +0200 Subject: [PATCH 06/20] updated .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 0f166504..cede4389 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,7 @@ # maven target +buildNumber.properties *.log # maven (mvn versions:set) From 1d5b339df85274c06ef182fbfb37557562f6b08c Mon Sep 17 00:00:00 2001 From: Fabrice Gangler Date: Sat, 29 Sep 2018 18:08:00 +0200 Subject: [PATCH 07/20] Fixed #186, fixed #185, fixed #184 and fixed #183 #183 - Added config. informations in the logs when starting the webapp #184 - Webapp: modify the title tag when the form is on error to inform the user #185 - Added new configuration option for logging colors result #186 - Webapp: added new page to provide build ID (commit hash) --- CHANGELOG.md | 6 +- .../50.loggingColorsResult_compact/Dockerfile | 52 ++++++ .../51.loggingColorsResult_full/Dockerfile | 52 ++++++ .../webapp/controller/AbstractController.java | 157 ++++++++++++++++++ .../webapp/controller/IndexController.java | 119 +++++-------- .../resources/conf/contrast-finder.conf.dist | 13 +- .../i18n/contrast-finder_utf8.properties | 8 + .../src/main/webapp/WEB-INF/pages/about.jsp | 78 +++++++++ webapp/src/main/webapp/WEB-INF/pages/form.jsp | 39 +---- .../main/webapp/WEB-INF/template/footer.jspf | 35 ++++ .../main/webapp/WEB-INF/template/header.jspf | 5 +- .../WEB-INF/template/template_variables.jspf | 27 ++- webapp/src/main/webapp/WEB-INF/web.xml | 4 + 13 files changed, 467 insertions(+), 128 deletions(-) create mode 100644 docker/SNAPSHOT-local/test_config-file/50.loggingColorsResult_compact/Dockerfile create mode 100644 docker/SNAPSHOT-local/test_config-file/51.loggingColorsResult_full/Dockerfile create mode 100644 webapp/src/main/java/org/asqatasun/contrastfinder/webapp/controller/AbstractController.java create mode 100644 webapp/src/main/webapp/WEB-INF/pages/about.jsp diff --git a/CHANGELOG.md b/CHANGELOG.md index 807c3870..db85db86 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,10 +17,12 @@ none - [#182 - Upgraded spring-security (4.2.8 instead of 4.2.7)](https://github.com/Asqatasun/Contrast-Finder/issues/182) ### Bug -none +- [#184 - Webapp: modify the title tag when the form is on error to inform the user](https://github.com/Asqatasun/Contrast-Finder/issues/184) ### Improvement -none +- [#183 - Added config. informations in the logs when starting the webapp](https://github.com/Asqatasun/Contrast-Finder/issues/183) +- [#185 - Added new configuration option for logging colors results](https://github.com/Asqatasun/Contrast-Finder/issues/185) +- [#186 - Webapp: added new page to provide build ID (commit hash)](https://github.com/Asqatasun/Contrast-Finder/issues/186) ### Refactoring none diff --git a/docker/SNAPSHOT-local/test_config-file/50.loggingColorsResult_compact/Dockerfile b/docker/SNAPSHOT-local/test_config-file/50.loggingColorsResult_compact/Dockerfile new file mode 100644 index 00000000..ae07f6e0 --- /dev/null +++ b/docker/SNAPSHOT-local/test_config-file/50.loggingColorsResult_compact/Dockerfile @@ -0,0 +1,52 @@ +FROM asqatasun/contrast-finder:pre-requisites_Ubuntu-18.04_tomcat-8.5 + +# #### usage ###################################################### +# +# --- Building this docker image +# docker build -t asqatasun/contrast-finder:SNAPSHOT_local . +# +# --- Launch a container +# docker run -p 127.0.0.1:8087:8080 --name contrast.finder -d asqatasun/contrast-finder:SNAPSHOT_local +# +# --- Playing with this docker image +# docker exec -ti contrast.finder /bin/cat /softwares-version.txt +# docker exec -ti contrast.finder /bin/bash +# docker logs -f contrast.finder +# +# #### FROM ###################################################### +# asqatasun/contrast-finder:pre-requisites_Ubuntu-18.04_tomcat-8.5 https://github.com/Asqatasun/Contrast-Finder/blob/master/docker/pre-requisites/pre-requisites_Ubuntu-18.04_tomcat-8.5/Dockerfile +# |-- ubuntu:18.04 https://github.com/tianon/docker-brew-ubuntu-core/blob/dist-amd64/bionic/Dockerfile +################################################################### + +# environment variables +ENV CONTRAST_FINDER_RELEASE="0.9.3-SNAPSHOT" +ENV LOGGING="compact" + # loggingColorsResult = compact | full | no (default) + +# Add contrast-finder .war +ADD contrast-finder-webapp_${CONTRAST_FINDER_RELEASE}.tar.gz /root + +# Install contrast-finder +RUN cd /root/contrast-*/install/ && \ + mv -v contrast-*.war contrast-finder.war && \ + mv -v contrast-*.war /var/lib/tomcat8/webapps && \ + rm -rf /root/contrast-* && \ +echo "loggingColorsResult=${LOGGING}" >> ${CONF_FILE} && \ + echo ${CONTRAST_FINDER_RELEASE} >> ${INFO_FILE} && \ + echo "\n--- ${CONF_FILE} ---" >> ${INFO_FILE} && \ + cat ${CONF_FILE} >> ${INFO_FILE} && \ + echo "\n--- Logs -----------" >> ${INFO_FILE} && \ + echo "${TOMCAT_LOG}" >> ${INFO_FILE} && \ + echo "${LOG_FILE}" >> ${INFO_FILE} && \ + echo "--------------------" >> ${INFO_FILE} && \ + cat ${INFO_FILE} > ${LOG_FILE} && echo "-- Install: Ok" + +# Health Check of the Docker Container +# ----> see asqatasun/contrast-finder:pre-requisites_Ubuntu-18.04_tomcat-8.5 + +CMD service tomcat8 start ; \ + tail -f -n 50 ${TOMCAT_LOG} \ + ${LOG_FILE} + + + diff --git a/docker/SNAPSHOT-local/test_config-file/51.loggingColorsResult_full/Dockerfile b/docker/SNAPSHOT-local/test_config-file/51.loggingColorsResult_full/Dockerfile new file mode 100644 index 00000000..51030074 --- /dev/null +++ b/docker/SNAPSHOT-local/test_config-file/51.loggingColorsResult_full/Dockerfile @@ -0,0 +1,52 @@ +FROM asqatasun/contrast-finder:pre-requisites_Ubuntu-18.04_tomcat-8.5 + +# #### usage ###################################################### +# +# --- Building this docker image +# docker build -t asqatasun/contrast-finder:SNAPSHOT_local . +# +# --- Launch a container +# docker run -p 127.0.0.1:8087:8080 --name contrast.finder -d asqatasun/contrast-finder:SNAPSHOT_local +# +# --- Playing with this docker image +# docker exec -ti contrast.finder /bin/cat /softwares-version.txt +# docker exec -ti contrast.finder /bin/bash +# docker logs -f contrast.finder +# +# #### FROM ###################################################### +# asqatasun/contrast-finder:pre-requisites_Ubuntu-18.04_tomcat-8.5 https://github.com/Asqatasun/Contrast-Finder/blob/master/docker/pre-requisites/pre-requisites_Ubuntu-18.04_tomcat-8.5/Dockerfile +# |-- ubuntu:18.04 https://github.com/tianon/docker-brew-ubuntu-core/blob/dist-amd64/bionic/Dockerfile +################################################################### + +# environment variables +ENV CONTRAST_FINDER_RELEASE="0.9.3-SNAPSHOT" +ENV LOGGING="full" + # loggingColorsResult = compact | full | no (default) + +# Add contrast-finder .war +ADD contrast-finder-webapp_${CONTRAST_FINDER_RELEASE}.tar.gz /root + +# Install contrast-finder +RUN cd /root/contrast-*/install/ && \ + mv -v contrast-*.war contrast-finder.war && \ + mv -v contrast-*.war /var/lib/tomcat8/webapps && \ + rm -rf /root/contrast-* && \ +echo "loggingColorsResult=${LOGGING}" >> ${CONF_FILE} && \ + echo ${CONTRAST_FINDER_RELEASE} >> ${INFO_FILE} && \ + echo "\n--- ${CONF_FILE} ---" >> ${INFO_FILE} && \ + cat ${CONF_FILE} >> ${INFO_FILE} && \ + echo "\n--- Logs -----------" >> ${INFO_FILE} && \ + echo "${TOMCAT_LOG}" >> ${INFO_FILE} && \ + echo "${LOG_FILE}" >> ${INFO_FILE} && \ + echo "--------------------" >> ${INFO_FILE} && \ + cat ${INFO_FILE} > ${LOG_FILE} && echo "-- Install: Ok" + +# Health Check of the Docker Container +# ----> see asqatasun/contrast-finder:pre-requisites_Ubuntu-18.04_tomcat-8.5 + +CMD service tomcat8 start ; \ + tail -f -n 50 ${TOMCAT_LOG} \ + ${LOG_FILE} + + + diff --git a/webapp/src/main/java/org/asqatasun/contrastfinder/webapp/controller/AbstractController.java b/webapp/src/main/java/org/asqatasun/contrastfinder/webapp/controller/AbstractController.java new file mode 100644 index 00000000..f05ccbf9 --- /dev/null +++ b/webapp/src/main/java/org/asqatasun/contrastfinder/webapp/controller/AbstractController.java @@ -0,0 +1,157 @@ +/* + * Contrast Finder + * Copyright (C) 2008-2018 Asqatasun.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + * Contact us by mail: asqatasun AT asqatasun DOT org + */ +package org.asqatasun.contrastfinder.webapp.controller; + +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + + +/** + * abstract controller + */ +@Controller +public abstract class AbstractController { + + /** + * logger for current class + * usage : LOGGER.info("log message"); + * LOGGER.warn("warning message"); + * LOGGER.debug("debug message"); + * LOGGER.error("error message"); + */ + protected final Logger LOGGER = LoggerFactory.getLogger(this.getClass()); + + + /** + * main view name + */ + protected String mainPageView; + + /** + * piwik analytics key + * default is '' + * can be override in the following file: + * /etc/contrast-finder/contrast-finder.conf + */ + @Value("${piwik_analytics_key:}") + protected String piwikAnalyticsKey; + + /** + * piwik analytics server URL + * default is '' + * can be override in the following file: + * /etc/contrast-finder/contrast-finder.conf + */ + @Value("${piwik_analytics_server:}") + protected String piwikAnalyticServer; + + /** + * default algorithm ("HSV") + * used only in this.initAccueil() + * HSV = a range of valid colors + * Rgb = valid colors and very close to initial color + * + * can be override in the following file: + * /etc/contrast-finder/contrast-finder.conf + * + * a bad value is fixed by the default algo ("HSV") in ColorModel class + */ + @Value("${default_algorithm:HSV}") + // @Value("${default_algorithm:HSV}") + // @Value("${default_algorithm:Rgb}") + protected String defaultAlgorithm; + + + /** + * Give crawlers instructions + * searchEngineInclude = "yes" + * searchEngineInclude = "no" (default) + * = disallow search engines from showing HTML pages in their results + * + * can be override in the following file: + * /etc/contrast-finder/contrast-finder.conf + */ + @Value("${searchEngineInclude:no}") + protected String searchEngineInclude; + + /** + * environment + * env = debug + * env = prod (default) + * + * can be override in the following file: + * /etc/contrast-finder/contrast-finder.conf + */ + @Value("${env:prod}") + protected String env; + + /** + * logging colors result + * compact = log message on 1 line + * full = log message on several lines + * no = no logging (default) + * + * can be override in the following file: + * /etc/contrast-finder/contrast-finder.conf + */ + @Value("${loggingColorsResult:no}") + // @Value("${loggingColorsResult:compact}") + // @Value("${loggingColorsResult:full}") + // @Value("${loggingColorsResult:no}") + protected String loggingColorsResult; + + + + public AbstractController() {} + + + /** + * - set main view name (this.mainPageView) + * - log the config values + * + * notice: called at the launch of servlet + */ + public void setMainPageView(String formView) { + this.mainPageView = formView; + LOGGER.info("config env : " + env ); + LOGGER.info("config piwikKey : " + piwikAnalyticsKey ); + LOGGER.info("config piwikServer : " + piwikAnalyticServer ); + LOGGER.info("config defaultAlgorithm : " + defaultAlgorithm ); + LOGGER.info("config searchEngineInclude : " + searchEngineInclude ); + LOGGER.info("config loggingColorsResult : " + loggingColorsResult ); + } + + /** + * Preparing the common data and populating the model before returning the view + * @param model model of the page + */ + protected void addCommonViewData(final Model model, String pageName) { + model.addAttribute("env", env); + model.addAttribute("piwikKey", piwikAnalyticsKey); + model.addAttribute("piwikServer", piwikAnalyticServer); + model.addAttribute("searchEngineInclude", searchEngineInclude); + model.addAttribute("defaultAlgorithm", defaultAlgorithm); + model.addAttribute("pageName", pageName); + } + +} diff --git a/webapp/src/main/java/org/asqatasun/contrastfinder/webapp/controller/IndexController.java b/webapp/src/main/java/org/asqatasun/contrastfinder/webapp/controller/IndexController.java index 09616b90..71225aeb 100644 --- a/webapp/src/main/java/org/asqatasun/contrastfinder/webapp/controller/IndexController.java +++ b/webapp/src/main/java/org/asqatasun/contrastfinder/webapp/controller/IndexController.java @@ -48,74 +48,14 @@ * @author alingua */ @Controller -public class IndexController { +public class IndexController extends AbstractController { /** * model name */ private String commandName; - /** - * View containing the form - */ - private String mainPageView; - - /** - * piwik analytics key - * default is '' - * can be override in the following file: - * /etc/contrast-finder/contrast-finder.conf - */ - @Value("${piwik_analytics_key:}") - private String piwikAnalyticsKey; - - /** - * piwik analytics server URL - * default is '' - * can be override in the following file: - * /etc/contrast-finder/contrast-finder.conf - */ - @Value("${piwik_analytics_server:}") - private String piwikAnalyticServer; - /** - * default algorithm ("HSV") - * used only in this.initAccueil() - * HSV = a range of valid colors - * Rgb = valid colors and very close to initial color - * - * can be override in the following file: - * /etc/contrast-finder/contrast-finder.conf - * - * a bad value is fixed by the default algo ("HSV") in ColorModel class - */ - @Value("${default_algorithm:HSV}") - // @Value("${default_algorithm:HSV}") - // @Value("${default_algorithm:Rgb}") - private String defaultAlgorithm; - - - /** - * Give crawlers instructions - * searchEngineInclude = "yes" - * searchEngineInclude = "no" (default) - * = disallow search engines from showing HTML pages in their results - * - * can be override in the following file: - * /etc/contrast-finder/contrast-finder.conf - */ - @Value("${searchEngineInclude:no}") - private String searchEngineInclude; - /** - * environment - * env = debug - * env = prod (default) - * - * can be override in the following file: - * /etc/contrast-finder/contrast-finder.conf - */ - @Value("${env:prod}") - private String env; @Autowired @@ -129,6 +69,18 @@ protected void initBinder(WebDataBinder binder) { binder.setValidator(new ColorModelValidator()); } + /** + * Page about.html + * @param model model of the page + * @return view name like "page/form" + */ + @RequestMapping(value = "about.html") + public String getPageAbout(final Model model) { + addCommonViewData(model, "page-about"); + return "pages/about"; + } + + /** * Form initialisation * @@ -156,13 +108,9 @@ else if ("HSV".equals(defaultAlgorithm) || "Rgb".equals(defaultAlgorithm)) { model.addAttribute("formCurrentIsValidContrast",false); model.addAttribute("backgroundHEX", ColorConverter.rgb2Hex(backgroundColor)); model.addAttribute("foregroundHEX", ColorConverter.rgb2Hex(foregroundColor)); - model.addAttribute("defaultAlgorithm", defaultAlgorithm); model.addAttribute("algo", colorModel.getAlgo()); - model.addAttribute("env", env); - model.addAttribute("piwikKey", piwikAnalyticsKey); - model.addAttribute("piwikServer", piwikAnalyticServer); - model.addAttribute("searchEngineInclude", searchEngineInclude); model.addAttribute(commandName, colorModel); + addCommonViewData(model, "page-home"); return mainPageView; } @@ -182,14 +130,10 @@ public String getPageResultFromGet( final Model model, @CookieValue(value = "algo", defaultValue = "") String algoCookie, HttpServletRequest request, HttpServletResponse response) { - model.addAttribute("env", env); - model.addAttribute("piwikKey", piwikAnalyticsKey); /* Analytics Keys*/ - model.addAttribute("piwikServer", piwikAnalyticServer); - model.addAttribute("searchEngineInclude", searchEngineInclude); - model.addAttribute("defaultAlgorithm", defaultAlgorithm); model.addAttribute("algo", colorModel.getAlgo()); if (result.hasErrors()) { model.addAttribute("errorResult", "result.hasErrors"); + addCommonViewData(model, "page-result-error"); return mainPageView; } else { @@ -242,6 +186,31 @@ public String getPageResultFromGet( final Model model, colorResult.getSubmittedCombinaisonColor().getDistance()); // model.addAttribute("algo", colorModel.getAlgo()); model.addAttribute("otherAlgo", getOppositeAlgo(colorModel.getAlgo())); + + // Logging color results + if("full".equals(loggingColorsResult) | "debug".equals(env)){ + LOGGER.info("---------------------"); + LOGGER.info("get TXT : " + colorModel.getForeground() ); + LOGGER.info("get BG : " + colorModel.getBackground() ); + LOGGER.info("get ratio : " + colorModel.getRatio() ); + LOGGER.info("get algo : " + colorModel.getAlgo() ); + LOGGER.info("get BG tested : " + colorModel.getIsBackgroundTested() ); + LOGGER.info("tested : " + colorResult.getNumberOfTestedColors() ); + LOGGER.info("result : " + colorResult.getNumberOfSuggestedColors() ); + LOGGER.info("ratio : " + ContrastChecker.getConstrastRatio2DigitRound(foregroundColor, backgroundColor) ); + } + else if("compact".equals(loggingColorsResult)){ + LOGGER.info("START|" + colorModel.getForeground() + + "|" + colorModel.getBackground() + + "|" + colorModel.getRatio() + + "|" + colorModel.getAlgo() + + "|" + colorModel.getIsBackgroundTested() + + "|" + colorResult.getNumberOfTestedColors() + + "|" + colorResult.getNumberOfSuggestedColors() + + "|" + ContrastChecker.getConstrastRatio2DigitRound(foregroundColor, backgroundColor) + + "|END"); + } + addCommonViewData(model, "page-result"); return mainPageView; } @@ -294,10 +263,4 @@ public void setCommandName(String commandName) { this.commandName = commandName; } - /** - * Setter du nom de la formView - */ - public void setMainPageView(String formView) { - this.mainPageView = formView; - } -} \ No newline at end of file +} diff --git a/webapp/src/main/resources/conf/contrast-finder.conf.dist b/webapp/src/main/resources/conf/contrast-finder.conf.dist index 5a9b3046..ee3f046d 100644 --- a/webapp/src/main/resources/conf/contrast-finder.conf.dist +++ b/webapp/src/main/resources/conf/contrast-finder.conf.dist @@ -7,12 +7,21 @@ # default_algorithm=HSV # default_algorithm=Rgb -# environment +# logging colors results +# compact = log message on 1 line +# full = log message on several lines +# no = no logging (default) +############################################### +# loggingColorsResult=compact +# loggingColorsResult=full +# loggingColorsResult=no + +# environment : prod (default) or debug ############################################### # env=debug +# env=prod # Web analytics Piwik ############################################### # piwik_analytics_server= # piwik_analytics_key= - diff --git a/webapp/src/main/resources/i18n/contrast-finder_utf8.properties b/webapp/src/main/resources/i18n/contrast-finder_utf8.properties index 6d11b637..99c52baf 100644 --- a/webapp/src/main/resources/i18n/contrast-finder_utf8.properties +++ b/webapp/src/main/resources/i18n/contrast-finder_utf8.properties @@ -74,6 +74,14 @@ footer.poweredBy=Powered by footer.availableUnder=available under footer.link-twitter=Follow Contrast-Finder on Twitter footer.link-git=Contributing to Contrast-Finder on GitHub +##### WIP - Do not translate ############################### +page.result-error.titleTag=Error +page.about.titleTag=About Contrast-Finder +page.about.metaDescription= +page.about.title=About Contrast-Finder +page.about.fileList.title=Static files +page.about.build.title=Build info +### END WIP - Do not translate ############################ info.about.title=What is Contrast Finder? info.about=

\ Contrast-Finder is a tool which computes the contrast between \ diff --git a/webapp/src/main/webapp/WEB-INF/pages/about.jsp b/webapp/src/main/webapp/WEB-INF/pages/about.jsp new file mode 100644 index 00000000..d8536aa2 --- /dev/null +++ b/webapp/src/main/webapp/WEB-INF/pages/about.jsp @@ -0,0 +1,78 @@ +<%@ taglib uri="http://htmlcompressor.googlecode.com/taglib/compressor" prefix="compress" %> + + <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> + <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> + <%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> + <%@taglib prefix="form" uri="http://www.springframework.org/tags/form" %> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + <%@page pageEncoding="UTF-8"%> + + <%@include file='/WEB-INF/template/template_variables.jspf' %> + + <%@include file='/WEB-INF/template/head.jspf' %> + +

+ + <%-- ===== HEADER ========================================================================================= --%> + <%@include file='/WEB-INF/template/header.jspf' %> + + + <%-- ===== CONTENT ========================================================================================= --%> +
+

+ +

+ + <% //Get version of application + java.util.Properties prop = new java.util.Properties(); + prop.load(getServletContext().getResourceAsStream("/META-INF/MANIFEST.MF")); + String appliVersion = prop.getProperty("Build-Release"); + String appliBuildID = prop.getProperty("Build-Id"); + String appliBuildDate = prop.getProperty("Build-Date"); + String appliBuildMaven = prop.getProperty("Maven-Version"); + String appliBuildJava = prop.getProperty("Java-Version"); + String appliBuildOs = prop.getProperty("Os-Name"); + String appliBuildArch = prop.getProperty("Os-Arch"); + String gitCommit = prop.getProperty("git-commit"); + String gitBranch = prop.getProperty("git-branch"); + String gitURL = prop.getProperty("git-url"); + %> + <%-- version: <%=appliVersion%>
+ git commit: <%=gitCommit%>
+ git branch: <%=gitBranch%>
+ git URL: <%=gitURL%>
+ Build ID: <%=appliBuildID%>
+ Build date: <%=appliBuildDate%>
+ Build : <%=appliBuildMaven%>
+ Build : <%=appliBuildJava%>
+ Build : <%=appliBuildOs%>
+ Build : <%=appliBuildArch%>
--%> + +

+
    +
  • version: <%=appliVersion%>
  • +
  • git branch: <%=gitBranch%>
  • +
  • git commit: <%=gitCommit%>
  • +
  • Build: +
      +
    • date: <%=appliBuildDate%>
    • +
    • ID: <%=appliBuildID%>
    • +
    • Platform: <%=appliBuildOs%> <%=appliBuildArch%>, + Java <%=appliBuildJava%>, + Maven <%=appliBuildMaven%>
    • +
    +
  • +
+
+
+ + + <%-- ===== FOOTER ========================================================================================= --%> + <%@include file='/WEB-INF/template/footer.jspf' %> + + + diff --git a/webapp/src/main/webapp/WEB-INF/pages/form.jsp b/webapp/src/main/webapp/WEB-INF/pages/form.jsp index ff478533..61ee3074 100644 --- a/webapp/src/main/webapp/WEB-INF/pages/form.jsp +++ b/webapp/src/main/webapp/WEB-INF/pages/form.jsp @@ -469,7 +469,8 @@ <%-- ===== USER HELP ========================================================================================= --%>
<%-- only on HomePage --%> - + <%-- --%> +

@@ -503,42 +504,6 @@ <%-- ===== FOOTER ========================================================================================= --%> <%@include file='/WEB-INF/template/footer.jspf' %> - - - - - - - - - - - - - diff --git a/webapp/src/main/webapp/WEB-INF/template/footer.jspf b/webapp/src/main/webapp/WEB-INF/template/footer.jspf index 18d48546..d3ba20c9 100644 --- a/webapp/src/main/webapp/WEB-INF/template/footer.jspf +++ b/webapp/src/main/webapp/WEB-INF/template/footer.jspf @@ -85,3 +85,38 @@ --%> + + + + + + + + + + + + diff --git a/webapp/src/main/webapp/WEB-INF/template/header.jspf b/webapp/src/main/webapp/WEB-INF/template/header.jspf index d627c464..20a8d28f 100644 --- a/webapp/src/main/webapp/WEB-INF/template/header.jspf +++ b/webapp/src/main/webapp/WEB-INF/template/header.jspf @@ -106,7 +106,8 @@ - \ No newline at end of file + diff --git a/webapp/src/main/webapp/WEB-INF/template/template_variables.jspf b/webapp/src/main/webapp/WEB-INF/template/template_variables.jspf index f95d21c6..27f0a7be 100644 --- a/webapp/src/main/webapp/WEB-INF/template/template_variables.jspf +++ b/webapp/src/main/webapp/WEB-INF/template/template_variables.jspf @@ -34,11 +34,20 @@ <%-- TITLE tag --%> - + - + + + + <%-- --%> + + + ${appName_v2} - + + + ${appName_v2}, ${colorModel.ratio}, @@ -67,16 +76,21 @@ - - is background tested + - is background tested - - - + + / - + + + + ${appName_v2} + + <%-- FR Contrast Finder : couleur du texte #468847, couleur du fond #DFF0D8, Ratio minimum 4.5 FR Contrast Finder, ratio min 4.5, couleurs : texte #468847, fond #DFF0D8 @@ -116,7 +130,6 @@ --%> - diff --git a/webapp/src/main/webapp/WEB-INF/web.xml b/webapp/src/main/webapp/WEB-INF/web.xml index 99bd9b86..ad83acaf 100644 --- a/webapp/src/main/webapp/WEB-INF/web.xml +++ b/webapp/src/main/webapp/WEB-INF/web.xml @@ -85,6 +85,10 @@ contrast-finder /result.html + + contrast-finder + /about.html + form.html From 6b1ffa6829a25b2f9e797d05ae3408788e4b596c Mon Sep 17 00:00:00 2001 From: Fabrice Gangler Date: Sun, 30 Sep 2018 04:28:58 +0200 Subject: [PATCH 08/20] updated bookmarks file --- .../bookmarks-for-potential-features.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/documentation/en/30_Contributor_doc/bookmarks-for-potential-features.md b/documentation/en/30_Contributor_doc/bookmarks-for-potential-features.md index a6066389..6e8f746f 100644 --- a/documentation/en/30_Contributor_doc/bookmarks-for-potential-features.md +++ b/documentation/en/30_Contributor_doc/bookmarks-for-potential-features.md @@ -81,6 +81,22 @@ - https://kryogenix.org/code/browser/sorttable/ - https://github.com/tofsjonas/sortable/ +# Java - i18n / URL +- https://stackoverflow.com/questions/45357121/spring-mvc-requestmapping-with-i18n-path-parts +- https://coderanch.com/t/625363/frameworks/URL-Locale-Spring-MVC +- http://www.oracle.com/us/technologies/java/locale-140624.html +- https://stackoverflow.com/questions/34628714/url-path-for-multi-language +- https://www.boraji.com/spring-mvc-5-internationalization-example +- https://www.mkyong.com/spring-mvc/spring-mvc-internationalization-example/ +- https://memorynotfound.com/spring-mvc-internationalization-i18n-example/ +- https://gokan-ekinci.developpez.com/tutoriels/java/spring-mvc-exception/ + +# Java - Build number +- https://raymondhlee.wordpress.com/2014/10/25/using-maven-build-number-plugin-to-load-code-revision-details/ +- https://blog.jayway.com/2012/04/07/continuous-deployment-versioning-and-git/ +- https://stackoverflow.com/questions/6947827/maven-build-number-plugin-how-to-save-the-build-number-in-a-file +- https://www.javacodegeeks.com/2012/10/maven-build-number-plugin-sample-usage.html +- https://github.com/ktoso/maven-git-commit-id-plugin # tag `` - https://caniuse.com/#search=meter From 41b4ef013b6a5406dbbc438a95fe811663b7a9cf Mon Sep 17 00:00:00 2001 From: Fabrice Gangler Date: Mon, 1 Oct 2018 02:35:52 +0200 Subject: [PATCH 09/20] Fixed #187 - Added new configuration options: available languages and default language --- CHANGELOG.md | 1 + .../webapp/controller/AbstractController.java | 138 +++++++++++++++--- .../webapp/controller/IndexController.java | 33 ++++- .../resources/conf/contrast-finder.conf.dist | 12 +- .../WEB-INF/conf/mvc/cf-beans-controller.xml | 11 +- .../src/main/webapp/WEB-INF/pages/about.jsp | 12 ++ 6 files changed, 184 insertions(+), 23 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index db85db86..97bd0293 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ none ### Improvement - [#183 - Added config. informations in the logs when starting the webapp](https://github.com/Asqatasun/Contrast-Finder/issues/183) - [#185 - Added new configuration option for logging colors results](https://github.com/Asqatasun/Contrast-Finder/issues/185) +- [#187 - Added new configuration options: available languages and default language](https://github.com/Asqatasun/Contrast-Finder/issues/187) - [#186 - Webapp: added new page to provide build ID (commit hash)](https://github.com/Asqatasun/Contrast-Finder/issues/186) ### Refactoring diff --git a/webapp/src/main/java/org/asqatasun/contrastfinder/webapp/controller/AbstractController.java b/webapp/src/main/java/org/asqatasun/contrastfinder/webapp/controller/AbstractController.java index f05ccbf9..dd813579 100644 --- a/webapp/src/main/java/org/asqatasun/contrastfinder/webapp/controller/AbstractController.java +++ b/webapp/src/main/java/org/asqatasun/contrastfinder/webapp/controller/AbstractController.java @@ -24,7 +24,11 @@ import org.springframework.ui.Model; import org.slf4j.Logger; import org.slf4j.LoggerFactory; - +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; /** * abstract controller @@ -43,9 +47,22 @@ public abstract class AbstractController { /** - * main view name + * adding config to logs at the launch of servlet */ - protected String mainPageView; + private boolean addConfigToLogs; + + /** + * available languages + * see: this.languages + */ + private Map availableLanguages; + + + /** + * ordered languages list + * see: this.languages + */ + private List orderedLanguagesList; /** * piwik analytics key @@ -82,6 +99,29 @@ public abstract class AbstractController { protected String defaultAlgorithm; + /** + * list of languages available in the webapp + * - comma-separated language codes (ISO 639-1: two-letter codes) + * - order will be the same in the webapp menu + * + * currently : "en,fr,es,pt,ko" + * can be override in the following file: + * /etc/contrast-finder/contrast-finder.conf + */ + @Value("${languages:en,fr,es,pt,ko}") + private String languages; + + /** + * default Language (ISO 639-1: two-letter codes) + * + * currently : "en" + * can be override in the following file: + * /etc/contrast-finder/contrast-finder.conf + */ + @Value("${defaultLanguage:en}") + private String defaultLanguage; + + /** * Give crawlers instructions * searchEngineInclude = "yes" @@ -121,37 +161,97 @@ public abstract class AbstractController { protected String loggingColorsResult; + /* + * notice: called only at the launch of servlet + */ + public AbstractController() { + LOGGER.debug("calling AbstractController()"); + } - public AbstractController() {} - + /** + * Preparing the common data and populating the model before returning the view + * @param model model of the page + * @param pageName name of the page (ex: page-home) using by jsp, css and js + */ + protected void addCommonViewData(final Model model, String pageName) { + model.addAttribute("env", env); + model.addAttribute("piwikKey", piwikAnalyticsKey); + model.addAttribute("piwikServer", piwikAnalyticServer); + model.addAttribute("searchEngineInclude", searchEngineInclude); + model.addAttribute("defaultAlgorithm", defaultAlgorithm); + model.addAttribute("availableLanguages", availableLanguages); + model.addAttribute("orderedLanguagesList", orderedLanguagesList); + model.addAttribute("defaultLanguage", defaultLanguage); + model.addAttribute("pageName", pageName); + } /** - * - set main view name (this.mainPageView) - * - log the config values + * adds the following configuration options to the log : + * - env + * - piwikKey + * - piwikServer + * - defaultAlgorithm + * - searchEngineInclude + * - loggingColorsResult + * - defaultLanguage + * - languages * - * notice: called at the launch of servlet + * see: /etc/contrast-finder/contrast-finder.conf */ - public void setMainPageView(String formView) { - this.mainPageView = formView; + protected void addConfigToLogs(){ + LOGGER.debug("calling addConfigToLogs()"); LOGGER.info("config env : " + env ); LOGGER.info("config piwikKey : " + piwikAnalyticsKey ); LOGGER.info("config piwikServer : " + piwikAnalyticServer ); LOGGER.info("config defaultAlgorithm : " + defaultAlgorithm ); LOGGER.info("config searchEngineInclude : " + searchEngineInclude ); LOGGER.info("config loggingColorsResult : " + loggingColorsResult ); + LOGGER.info("config defaultLanguage : " + defaultLanguage ); + LOGGER.info("config languages : " + languages ); } /** - * Preparing the common data and populating the model before returning the view - * @param model model of the page + * set this.addConfigToLogs + * and calling addConfigToLogs() for adding config to the logs + * + * notice: called only at the launch of servlet after the contructor + * see: webapp/src/main/webapp/WEB-INF/conf/mvc/cf-beans-controller.xml */ - protected void addCommonViewData(final Model model, String pageName) { - model.addAttribute("env", env); - model.addAttribute("piwikKey", piwikAnalyticsKey); - model.addAttribute("piwikServer", piwikAnalyticServer); - model.addAttribute("searchEngineInclude", searchEngineInclude); - model.addAttribute("defaultAlgorithm", defaultAlgorithm); - model.addAttribute("pageName", pageName); + public void setAddConfigToLogs(String addConfigToLogs) { + // LOGGER.debug("calling setAddConfigToLogs()"); + if( "true".equals(addConfigToLogs)){ + this.addConfigToLogs = true; + addConfigToLogs(); + } + else { + this.addConfigToLogs = false; + } + } + + + /** + * set this.availableLanguages + * + * notice: called only at the launch of servlet after the contructor + * see: webapp/src/main/webapp/WEB-INF/conf/mvc/cf-beans-controller.xml + */ + public void setLoadAvailableLanguages(String loadAvailableLanguages) { + // LOGGER.debug("calling setLoadAvailableLanguages()"); + List languagesList; + Map languagesMap = new HashMap<>(); + languagesList = Arrays.asList(languages.split(",")); + for(String lang : languagesList) { + Locale locale = new Locale(lang); + languagesMap.put(locale.getLanguage(), locale.getDisplayLanguage(locale)); + // LOGGER.debug("locale : " + locale); + // LOGGER.debug("locale.getLanguage() : " + locale.getLanguage()); + // LOGGER.debug("locale.getDisplayLanguage() : " + locale.getDisplayLanguage()); + // LOGGER.debug("locale.getDisplayLanguage(locale): " + locale.getDisplayLanguage(locale)); + } + this.availableLanguages = languagesMap; + this.orderedLanguagesList = languagesList; + LOGGER.debug(availableLanguages.toString()); + LOGGER.debug(orderedLanguagesList.toString()); } } diff --git a/webapp/src/main/java/org/asqatasun/contrastfinder/webapp/controller/IndexController.java b/webapp/src/main/java/org/asqatasun/contrastfinder/webapp/controller/IndexController.java index 71225aeb..912a7ad8 100644 --- a/webapp/src/main/java/org/asqatasun/contrastfinder/webapp/controller/IndexController.java +++ b/webapp/src/main/java/org/asqatasun/contrastfinder/webapp/controller/IndexController.java @@ -50,6 +50,13 @@ @Controller public class IndexController extends AbstractController { + + /** + * main view name + */ + private String mainPageView; + + /** * model name */ @@ -61,6 +68,14 @@ public class IndexController extends AbstractController { @Autowired private ColorFinderFactory colorFinderFactory; + + /* + * notice: called only at the launch of servlet + */ + public IndexController() { + LOGGER.debug("calling IndexController()"); + } + /** * Validator initialisation */ @@ -256,11 +271,27 @@ private ColorFinder getColorFinderAndExecute( return colorFinder; } + /** - * Setter sur le nom du modèle + * set modele name (this.commandName) + * + * notice: called only at the launch of servlet + * see: webapp/src/main/webapp/WEB-INF/conf/mvc/cf-beans-controller.xml */ public void setCommandName(String commandName) { + // LOGGER.debug("calling setCommandName()"); this.commandName = commandName; } + /** + * set main view name (this.mainPageView) + * + * notice: called only at the launch of servlet after the contructor + * see: webapp/src/main/webapp/WEB-INF/conf/mvc/cf-beans-controller.xml + */ + public void setMainPageView(String formView) { + // LOGGER.debug("calling setMainPageView()"); + this.mainPageView = formView; + } + } diff --git a/webapp/src/main/resources/conf/contrast-finder.conf.dist b/webapp/src/main/resources/conf/contrast-finder.conf.dist index ee3f046d..a8d42bed 100644 --- a/webapp/src/main/resources/conf/contrast-finder.conf.dist +++ b/webapp/src/main/resources/conf/contrast-finder.conf.dist @@ -21,7 +21,17 @@ # env=debug # env=prod -# Web analytics Piwik +# web analytics Piwik ############################################### # piwik_analytics_server= # piwik_analytics_key= + +# default language +############################################### +# defaultLanguage=en + +# languages available in the webapp +# - comma-separated language codes (ISO 639-1: two-letter codes) +# - order will be the same in the webapp menu +############################################### +# languages=en,fr,es,pt,ko diff --git a/webapp/src/main/webapp/WEB-INF/conf/mvc/cf-beans-controller.xml b/webapp/src/main/webapp/WEB-INF/conf/mvc/cf-beans-controller.xml index ae9bfa58..be1d6a1c 100644 --- a/webapp/src/main/webapp/WEB-INF/conf/mvc/cf-beans-controller.xml +++ b/webapp/src/main/webapp/WEB-INF/conf/mvc/cf-beans-controller.xml @@ -7,7 +7,14 @@ - + + + + + + + - \ No newline at end of file + diff --git a/webapp/src/main/webapp/WEB-INF/pages/about.jsp b/webapp/src/main/webapp/WEB-INF/pages/about.jsp index d8536aa2..0d553064 100644 --- a/webapp/src/main/webapp/WEB-INF/pages/about.jsp +++ b/webapp/src/main/webapp/WEB-INF/pages/about.jsp @@ -67,6 +67,18 @@ + +
+ + ${langCode} - + ${availableLanguages[langCode]} +
+
+
+ + ${entry.key} - ${entry.value}
+
+
From ae7ce3ddac1ec489ce84d2ac0db00327b8eff0db Mon Sep 17 00:00:00 2001 From: Fabrice Gangler Date: Wed, 3 Oct 2018 03:56:35 +0200 Subject: [PATCH 10/20] fixed #188 - Webapp: refactor languages switcher --- CHANGELOG.md | 1 + .../test_config-file/60.languages/Dockerfile | 51 +++++++ .../webapp/controller/AbstractController.java | 32 +++- .../resources/conf/contrast-finder.conf.dist | 2 +- .../i18n/contrast-finder_utf8.properties | 3 +- .../src/main/webapp/WEB-INF/pages/about.jsp | 68 ++++++--- .../main/webapp/WEB-INF/template/header.jspf | 142 ++++++------------ 7 files changed, 175 insertions(+), 124 deletions(-) create mode 100644 docker/SNAPSHOT-local/test_config-file/60.languages/Dockerfile diff --git a/CHANGELOG.md b/CHANGELOG.md index 97bd0293..328debdd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ none - [#183 - Added config. informations in the logs when starting the webapp](https://github.com/Asqatasun/Contrast-Finder/issues/183) - [#185 - Added new configuration option for logging colors results](https://github.com/Asqatasun/Contrast-Finder/issues/185) - [#187 - Added new configuration options: available languages and default language](https://github.com/Asqatasun/Contrast-Finder/issues/187) +- [#188 - Webapp: languages switcher now depends on the configuration options](https://github.com/Asqatasun/Contrast-Finder/issues/188) - [#186 - Webapp: added new page to provide build ID (commit hash)](https://github.com/Asqatasun/Contrast-Finder/issues/186) ### Refactoring diff --git a/docker/SNAPSHOT-local/test_config-file/60.languages/Dockerfile b/docker/SNAPSHOT-local/test_config-file/60.languages/Dockerfile new file mode 100644 index 00000000..eb382030 --- /dev/null +++ b/docker/SNAPSHOT-local/test_config-file/60.languages/Dockerfile @@ -0,0 +1,51 @@ +FROM asqatasun/contrast-finder:pre-requisites_Ubuntu-18.04_tomcat-8.5 + +# #### usage ###################################################### +# +# --- Building this docker image +# docker build -t asqatasun/contrast-finder:SNAPSHOT_local . +# +# --- Launch a container +# docker run -p 127.0.0.1:8087:8080 --name contrast.finder -d asqatasun/contrast-finder:SNAPSHOT_local +# +# --- Playing with this docker image +# docker exec -ti contrast.finder /bin/cat /softwares-version.txt +# docker exec -ti contrast.finder /bin/bash +# docker logs -f contrast.finder +# +# #### FROM ###################################################### +# asqatasun/contrast-finder:pre-requisites_Ubuntu-18.04_tomcat-8.5 https://github.com/Asqatasun/Contrast-Finder/blob/master/docker/pre-requisites/pre-requisites_Ubuntu-18.04_tomcat-8.5/Dockerfile +# |-- ubuntu:18.04 https://github.com/tianon/docker-brew-ubuntu-core/blob/dist-amd64/bionic/Dockerfile +################################################################### + +# environment variables +ENV CONTRAST_FINDER_RELEASE="0.9.3-SNAPSHOT" +ENV LANGUAGES="en,fr,es" + +# Add contrast-finder .war +ADD contrast-finder-webapp_${CONTRAST_FINDER_RELEASE}.tar.gz /root + +# Install contrast-finder +RUN cd /root/contrast-*/install/ && \ + mv -v contrast-*.war contrast-finder.war && \ + mv -v contrast-*.war /var/lib/tomcat8/webapps && \ + rm -rf /root/contrast-* && \ +echo "languages=${LANGUAGES}" >> ${CONF_FILE} && \ + echo ${CONTRAST_FINDER_RELEASE} >> ${INFO_FILE} && \ + echo "\n--- ${CONF_FILE} ---" >> ${INFO_FILE} && \ + cat ${CONF_FILE} >> ${INFO_FILE} && \ + echo "\n--- Logs -----------" >> ${INFO_FILE} && \ + echo "${TOMCAT_LOG}" >> ${INFO_FILE} && \ + echo "${LOG_FILE}" >> ${INFO_FILE} && \ + echo "--------------------" >> ${INFO_FILE} && \ + cat ${INFO_FILE} > ${LOG_FILE} && echo "-- Install: Ok" + +# Health Check of the Docker Container +# ----> see asqatasun/contrast-finder:pre-requisites_Ubuntu-18.04_tomcat-8.5 + +CMD service tomcat8 start ; \ + tail -f -n 50 ${TOMCAT_LOG} \ + ${LOG_FILE} + + + diff --git a/webapp/src/main/java/org/asqatasun/contrastfinder/webapp/controller/AbstractController.java b/webapp/src/main/java/org/asqatasun/contrastfinder/webapp/controller/AbstractController.java index dd813579..eddd94c7 100644 --- a/webapp/src/main/java/org/asqatasun/contrastfinder/webapp/controller/AbstractController.java +++ b/webapp/src/main/java/org/asqatasun/contrastfinder/webapp/controller/AbstractController.java @@ -51,18 +51,22 @@ public abstract class AbstractController { */ private boolean addConfigToLogs; + /** + * ordered languages list + * see: this.languages + */ + private List orderedLanguagesList; + /** * available languages * see: this.languages */ private Map availableLanguages; - /** - * ordered languages list - * see: this.languages + * texts of switch in language target */ - private List orderedLanguagesList; + private Map textsOfSwitchLanguage; /** * piwik analytics key @@ -104,11 +108,11 @@ public abstract class AbstractController { * - comma-separated language codes (ISO 639-1: two-letter codes) * - order will be the same in the webapp menu * - * currently : "en,fr,es,pt,ko" + * currently : "en,es,fr,pt,ko" * can be override in the following file: * /etc/contrast-finder/contrast-finder.conf */ - @Value("${languages:en,fr,es,pt,ko}") + @Value("${languages:en,es,fr,pt,ko}") private String languages; /** @@ -181,6 +185,7 @@ protected void addCommonViewData(final Model model, String pageName) { model.addAttribute("defaultAlgorithm", defaultAlgorithm); model.addAttribute("availableLanguages", availableLanguages); model.addAttribute("orderedLanguagesList", orderedLanguagesList); + model.addAttribute("textsOfSwitchLanguage", textsOfSwitchLanguage); model.addAttribute("defaultLanguage", defaultLanguage); model.addAttribute("pageName", pageName); } @@ -248,8 +253,19 @@ public void setLoadAvailableLanguages(String loadAvailableLanguages) { // LOGGER.debug("locale.getDisplayLanguage() : " + locale.getDisplayLanguage()); // LOGGER.debug("locale.getDisplayLanguage(locale): " + locale.getDisplayLanguage(locale)); } - this.availableLanguages = languagesMap; - this.orderedLanguagesList = languagesList; + + // @@@TODO using .properties file + Map switchLang = new HashMap<>(); + switchLang.put("en", "Switch to english"); + switchLang.put("es", "Cambiar a español"); + switchLang.put("fr", "Passer en français"); + switchLang.put("pt", "em Português"); + switchLang.put("ko", "한국어로 전환"); + + this.textsOfSwitchLanguage = switchLang; + this.availableLanguages = languagesMap; + this.orderedLanguagesList = languagesList; + // LOGGER.debug(textsOfSwitchLanguage.toString()); LOGGER.debug(availableLanguages.toString()); LOGGER.debug(orderedLanguagesList.toString()); } diff --git a/webapp/src/main/resources/conf/contrast-finder.conf.dist b/webapp/src/main/resources/conf/contrast-finder.conf.dist index a8d42bed..7ec02910 100644 --- a/webapp/src/main/resources/conf/contrast-finder.conf.dist +++ b/webapp/src/main/resources/conf/contrast-finder.conf.dist @@ -34,4 +34,4 @@ # - comma-separated language codes (ISO 639-1: two-letter codes) # - order will be the same in the webapp menu ############################################### -# languages=en,fr,es,pt,ko +# languages=en,es,fr,pt,ko diff --git a/webapp/src/main/resources/i18n/contrast-finder_utf8.properties b/webapp/src/main/resources/i18n/contrast-finder_utf8.properties index 99c52baf..f1bd4136 100644 --- a/webapp/src/main/resources/i18n/contrast-finder_utf8.properties +++ b/webapp/src/main/resources/i18n/contrast-finder_utf8.properties @@ -79,8 +79,9 @@ page.result-error.titleTag=Error page.about.titleTag=About Contrast-Finder page.about.metaDescription= page.about.title=About Contrast-Finder -page.about.fileList.title=Static files +page.about.fileList.title=Additional text files page.about.build.title=Build info +page.about.availableLanguages=Available languages ### END WIP - Do not translate ############################ info.about.title=What is Contrast Finder? info.about=

\ diff --git a/webapp/src/main/webapp/WEB-INF/pages/about.jsp b/webapp/src/main/webapp/WEB-INF/pages/about.jsp index 0d553064..31a14b78 100644 --- a/webapp/src/main/webapp/WEB-INF/pages/about.jsp +++ b/webapp/src/main/webapp/WEB-INF/pages/about.jsp @@ -21,12 +21,48 @@

-

+<%-- TEST language code is not available --%> + + + + + + + + + + + <%--
NOT avalaible language
--%> + <%-- --%> + <%-- <% + response.setStatus(301); + response.setHeader( "Location", "./?lang=en" ); + response.setHeader( "Connection", "close" ); + %> --%> +
+
+ + + +

+ <%-- + ${langCode} - ${availableLanguages[langCode]}
+

--%> + <%-- + ${entry.key} - ${entry.value}
+

--%> + + + <% //Get version of application java.util.Properties prop = new java.util.Properties(); prop.load(getServletContext().getResourceAsStream("/META-INF/MANIFEST.MF")); @@ -54,7 +90,7 @@

    -
  • version: <%=appliVersion%>
  • +
  • version: <%=appliVersion%>
  • git branch: <%=gitBranch%>
  • git commit: <%=gitCommit%>
  • Build: @@ -62,22 +98,20 @@
  • date: <%=appliBuildDate%>
  • ID: <%=appliBuildID%>
  • Platform: <%=appliBuildOs%> <%=appliBuildArch%>, - Java <%=appliBuildJava%>, - Maven <%=appliBuildMaven%>
  • + Java <%=appliBuildJava%>, + Maven <%=appliBuildMaven%> +
-
- - ${langCode} - - ${availableLanguages[langCode]} -
-
-
- - ${entry.key} - ${entry.value}
-
+

+
diff --git a/webapp/src/main/webapp/WEB-INF/template/header.jspf b/webapp/src/main/webapp/WEB-INF/template/header.jspf index 20a8d28f..02b80e7b 100644 --- a/webapp/src/main/webapp/WEB-INF/template/header.jspf +++ b/webapp/src/main/webapp/WEB-INF/template/header.jspf @@ -3,104 +3,52 @@ <%@page pageEncoding="UTF-8"%>