Skip to content

Commit

Permalink
[change] Simplified var name: openwisp2_usage_metric_collection
Browse files Browse the repository at this point in the history
  • Loading branch information
nemesifier committed Apr 4, 2024
1 parent f7b23ef commit 64accc0
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1077,7 +1077,7 @@ Below are listed all the variables you can customize (you may also want to take
# Disable usage metric collection. It is enabled by default.
# Read more about it at
# https://openwisp.io/docs/user/usage-metric-collection.html
openwisp2_usage_metric_collection_consent: false
openwisp2_usage_metric_collection: false
# enable sentry example
openwisp2_sentry:
dsn: "https://7d2e3cd61acc32eca1fb2a390f7b55e1:bf82aab5ddn4422688e34a486c7426e3@getsentry.com:443/12345"
Expand Down
2 changes: 1 addition & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -212,4 +212,4 @@ openwisp2_django_cors:
allowed_origins_list: []
replace_https_referer: false
openwisp2_extra_supervisor_restart: []
openwisp2_usage_metric_collection_consent: null
openwisp2_usage_metric_collection: null
2 changes: 1 addition & 1 deletion molecule/resources/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
openwisp2_controller_subnet_division: true
openwisp2_uwsgi_extra_conf: |
single-interpreter=True
openwisp2_usage_metric_collection_consent: false
openwisp2_usage_metric_collection: false

pre_tasks:
- name: Update apt cache
Expand Down
8 changes: 4 additions & 4 deletions tasks/consent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@
mentioned at https://openwisp.io/docs/user/usage-metric-collection.html
If you prefer not to participate, you can opt-out by setting
"openwisp2_usage_metric_collection_consent: false" in your playbook.
"openwisp2_usage_metric_collection: false" in your playbook.
However, before making that decision, we encourage you to explore how this
information contributes to the enhancement of OpenWISP at the following link:
https://openwisp.io/docs/user/usage-metric-collection.html
Should you wish to support us through data collection but prefer to disable
this disclaimer, you can do so by setting
"openwisp2_usage_metric_collection_consent: true" in your playbook.
when: "openwisp2_usage_metric_collection_consent == None"
"openwisp2_usage_metric_collection: true" in your playbook.
when: "openwisp2_usage_metric_collection == None"

- name: Ensure user has enough time to read
pause:
seconds: 13
when: "openwisp2_usage_metric_collection_consent == None"
when: "openwisp2_usage_metric_collection == None"
4 changes: 2 additions & 2 deletions templates/openwisp2/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
# openwisp2 admin theme
# (must be loaded here)
'openwisp_utils.admin_theme',
{% if openwisp2_usage_metric_collection_consent is not false %}
{% if openwisp2_usage_metric_collection is not false %}
'openwisp_utils.measurements',
{% endif %}
'admin_auto_filters',
Expand Down Expand Up @@ -319,7 +319,7 @@
},
{% endif %}
{% endif %}
{% if openwisp2_usage_metric_collection_consent is not false %}
{% if openwisp2_usage_metric_collection is not false %}
'send_usage_metrics': {
'task': 'openwisp_utils.measurements.tasks.send_usage_metrics',
'schedule': timedelta(days=1),
Expand Down

0 comments on commit 64accc0

Please sign in to comment.