diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6bd4358a7..8be02da7e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -110,7 +110,7 @@ deps: exunit: stage: test services: - - name: postgis/postgis:13-3.1 + - name: postgis/postgis:14-3.2 alias: postgres variables: MIX_ENV: test diff --git a/config/config.exs b/config/config.exs index c7f78891e..f5dc26cb5 100644 --- a/config/config.exs +++ b/config/config.exs @@ -345,6 +345,8 @@ config :mobilizon, :exports, Mobilizon.Service.Export.Participants.CSV ] +config :mobilizon, :analytics, providers: [] + # Import environment specific config. This must remain at the bottom # of this file so it overrides the configuration defined above. import_config "#{config_env()}.exs" diff --git a/docker/tests/Dockerfile b/docker/tests/Dockerfile index 801029422..4c87c709b 100644 --- a/docker/tests/Dockerfile +++ b/docker/tests/Dockerfile @@ -1,15 +1,11 @@ FROM elixir:latest LABEL maintainer="Thomas Citharel " -ENV REFRESHED_AT=2021-12-15 +ENV REFRESHED_AT=2022-04-06 RUN apt-get update -yq && apt-get install -yq build-essential inotify-tools postgresql-client git curl gnupg xvfb libgtk-3-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 cmake exiftool python3-pip python3-setuptools RUN curl -sL https://deb.nodesource.com/setup_16.x | bash && apt-get install nodejs -yq RUN npm install -g yarn wait-on RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* RUN mix local.hex --force && mix local.rebar --force -# Weasyprint 53 requires pango >= 1.44.0, which is not available in Stretch. -# TODO: Remove the version requirement when elixir:latest is based on Bullseye -# https://github.com/erlang/docker-erlang-otp/issues/362 -# https://github.com/Kozea/WeasyPrint/issues/1384 -RUN pip3 install -Iv weasyprint==52 pyexcel_ods3 +RUN pip3 install -Iv weasyprint pyexcel_ods3 RUN curl https://dbip.mirror.framasoft.org/files/dbip-city-lite-latest.mmdb --output GeoLite2-City.mmdb -s && mkdir -p /usr/share/GeoIP && mv GeoLite2-City.mmdb /usr/share/GeoIP/ diff --git a/js/package.json b/js/package.json index 7eabe74f5..f5b41b05a 100644 --- a/js/package.json +++ b/js/package.json @@ -8,7 +8,7 @@ "test:unit": "LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 TZ=UTC vue-cli-service test:unit", "test:e2e": "vue-cli-service test:e2e", "lint": "vue-cli-service lint", - "build:assets": "vue-cli-service build", + "build:assets": "vue-cli-service build --report", "build:pictures": "bash ./scripts/build/pictures.sh" }, "dependencies": { @@ -16,6 +16,8 @@ "@absinthe/socket-apollo-link": "^0.2.1", "@apollo/client": "^3.3.16", "@mdi/font": "^6.1.95", + "@sentry/tracing": "^6.16.1", + "@sentry/vue": "^6.16.1", "@tailwindcss/line-clamp": "^0.3.0", "@tiptap/core": "^2.0.0-beta.41", "@tiptap/extension-blockquote": "^2.0.0-beta.25", @@ -69,7 +71,9 @@ "vue": "^2.6.11", "vue-class-component": "^7.2.3", "vue-i18n": "^8.14.0", + "vue-matomo": "^4.1.0", "vue-meta": "^2.3.1", + "vue-plausible": "^1.3.1", "vue-property-decorator": "^9.0.0", "vue-router": "^3.1.6", "vue-scrollto": "^2.17.1", diff --git a/js/src/App.vue b/js/src/App.vue index c67807e88..309331248 100644 --- a/js/src/App.vue +++ b/js/src/App.vue @@ -203,6 +203,16 @@ export default class App extends Vue { this.interval = undefined; } + @Watch("config") + async initializeStatistics(config: IConfig) { + if (config) { + const { statistics } = (await import("./services/statistics")) as { + statistics: (config: IConfig, environment: Record) => void; + }; + statistics(config, { router: this.$router, version: config.version }); + } + } + @Watch("$route", { immediate: true }) updateAnnouncement(route: Route): void { const pageTitle = this.extractPageTitleFromRoute(route); diff --git a/js/src/components/Account/ActorCard.vue b/js/src/components/Account/ActorCard.vue index 58ff7dfc0..448ca385c 100644 --- a/js/src/components/Account/ActorCard.vue +++ b/js/src/components/Account/ActorCard.vue @@ -1,7 +1,7 @@