diff --git a/deploy/internal-auth/docker-compose.yml b/deploy/internal-auth/docker-compose.yml index 1c2b4a87..e766118d 100644 --- a/deploy/internal-auth/docker-compose.yml +++ b/deploy/internal-auth/docker-compose.yml @@ -25,17 +25,18 @@ services: - record-manager-server - s-pipes-engine - db-server - - ava-analytics-ui environment: NGINX_ENVSUBST_OUTPUT_DIR: /etc/nginx APP_ORIGIN: "${PUBLIC_ORIGIN:-http://localhost:${INTERNAL_HOST_PORT:-1235}}" APP_ROOT_PATH: "${APP_ROOT_PATH:-}" RECORD_MANAGER_PATH: "${RECORD_MANAGER_PATH:-/record-manager}" + ANALYTICS_PATH: "${ANALYTICS_PATH:-/statistics}" volumes: - ./nginx/nginx.conf:/etc/nginx/templates/nginx.conf.template:ro - ../shared/nginx/error.html:/usr/share/nginx/html/error.html:ro - ./nginx/index.html:/usr/share/nginx/html/index.html:ro - ../shared/nginx/images:/usr/share/nginx/html/images:ro + - ../shared/nginx/statistics.html:/usr/share/nginx/html/statistics.html:ro record-manager: image: ghcr.io/kbss-cvut/record-manager-ui:latest @@ -52,6 +53,7 @@ services: LANGUAGE: "${LANGUAGE:-en}" NAVIGATOR_LANGUAGE: "false" BASENAME: "${APP_ROOT_PATH:-}${RECORD_MANAGER_PATH:-/record-manager}" + ANALYTICS_URL: "${PUBLIC_ORIGIN:-http://localhost:${INTERNAL_HOST_PORT:-1235}}${APP_ROOT_PATH:-}${ANALYTICS_PATH:-/statistics}" EXTENSIONS: "${RECORD_MANAGER_EXTENSIONS:-supplier}" record-manager-server: @@ -98,8 +100,5 @@ services: - ../shared/db-server/import:/root/graphdb-import:ro - db-server:/opt/graphdb/home - ava-analytics-ui: - image: ghcr.io/kbss-cvut/ava-analytics-ui:latest - volumes: db-server: diff --git a/deploy/internal-auth/nginx/nginx.conf b/deploy/internal-auth/nginx/nginx.conf index 01f8125a..b5598afd 100644 --- a/deploy/internal-auth/nginx/nginx.conf +++ b/deploy/internal-auth/nginx/nginx.conf @@ -67,6 +67,11 @@ http { proxy_pass http://s-pipes-engine:8080/; # keep the trailing slash to cut off matched prefix } + location ${ANALYTICS_PATH} { + try_files /statistics.html =404; + root /usr/share/nginx/html; + } + location /health-check { return 200; access_log off; diff --git a/deploy/keycloak-auth/docker-compose.yml b/deploy/keycloak-auth/docker-compose.yml index fa3f92c5..b906c4ca 100644 --- a/deploy/keycloak-auth/docker-compose.yml +++ b/deploy/keycloak-auth/docker-compose.yml @@ -25,15 +25,16 @@ services: - record-manager-server - s-pipes-engine - db-server - - ava-analytics-ui environment: NGINX_ENVSUBST_OUTPUT_DIR: /etc/nginx APP_ORIGIN: "${PUBLIC_ORIGIN:-http://localhost:${INTERNAL_HOST_PORT:-1235}}" APP_ROOT_PATH: "${APP_ROOT_PATH:-}" RECORD_MANAGER_PATH: "${RECORD_MANAGER_PATH:-/record-manager}" + ANALYTICS_PATH: "${ANALYTICS_PATH:-/statistics}" volumes: - ./nginx/nginx.conf:/etc/nginx/templates/nginx.conf.template:ro - ../shared/nginx/error.html:/usr/share/nginx/html/error.html:ro + - ../shared/nginx/statistics.html:/usr/share/nginx/html/statistics.html:ro record-manager: image: ghcr.io/kbss-cvut/kbss-cvut/record-manager-ui:latest @@ -53,6 +54,7 @@ services: AUTHENTICATION: "oidc" AUTH_SERVER_URL: "${PUBLIC_ORIGIN:-http://localhost:${INTERNAL_HOST_PORT:-1235}}${APP_ROOT_PATH:-}/services/auth/realms/record-manager" AUTH_CLIENT_ID: "record-manager" + ANALYTICS_URL: "${PUBLIC_ORIGIN:-http://localhost:${INTERNAL_HOST_PORT:-1235}}${APP_ROOT_PATH:-}${ANALYTICS_PATH:-/statistics}" EXTENSIONS: "${RECORD_MANAGER_EXTENSIONS:-supplier}" record-manager-server: @@ -150,9 +152,6 @@ services: depends_on: - auth-server-db - ava-analytics-ui: - image: ghcr.io/kbss-cvut/ava-analytics-ui:latest - volumes: db-server: auth-server: diff --git a/deploy/keycloak-auth/nginx/nginx.conf b/deploy/keycloak-auth/nginx/nginx.conf index 828b862c..fc145175 100644 --- a/deploy/keycloak-auth/nginx/nginx.conf +++ b/deploy/keycloak-auth/nginx/nginx.conf @@ -88,6 +88,11 @@ http { proxy_busy_buffers_size 256k; } + location ${ANALYTICS_PATH} { + try_files /statistics.html =404; + root /usr/share/nginx/html; + } + location /health-check { return 200; access_log off; diff --git a/deploy/shared/nginx/statistics.html b/deploy/shared/nginx/statistics.html new file mode 100644 index 00000000..45ba975a --- /dev/null +++ b/deploy/shared/nginx/statistics.html @@ -0,0 +1,130 @@ + + +
+ + + +Date | +Number of Records Completed | +Number of Invalid Records | +Number of Rejected Records | +Number of Confirmed Records | +
---|---|---|---|---|
01/01/2024 | +50 | +2 | +5 | +43 | +
01/02/2024 | +60 | +3 | +6 | +51 | +
01/03/2024 | +70 | +4 | +7 | +59 | +