mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-21 15:54:22 +01:00
(feat) updated FabAnalytics reports to include new features
This commit is contained in:
parent
7b30086a34
commit
575c7c7d62
@ -1,5 +1,6 @@
|
|||||||
# Changelog Fab-manager
|
# Changelog Fab-manager
|
||||||
|
|
||||||
|
- Updated FabAnalytics reports to include new features
|
||||||
- Fix a bug: setting somes decimal amounts (e.g. 4,85) result in another amount (e.g. 4,84)
|
- Fix a bug: setting somes decimal amounts (e.g. 4,85) result in another amount (e.g. 4,84)
|
||||||
- Fix a bug: unable to export statistics
|
- Fix a bug: unable to export statistics
|
||||||
- Fix a bug: soft destroyed machines and spaces are still reported in the OpenAPI
|
- Fix a bug: soft destroyed machines and spaces are still reported in the OpenAPI
|
||||||
|
@ -9,11 +9,20 @@
|
|||||||
<tr><td translate>{{ 'app.admin.settings.privacy.analytics.version' }}</td><td>{{ data.version }}</td></tr>
|
<tr><td translate>{{ 'app.admin.settings.privacy.analytics.version' }}</td><td>{{ data.version }}</td></tr>
|
||||||
<tr><td translate>{{ 'app.admin.settings.privacy.analytics.members' }}</td><td>{{ data.members }}</td></tr>
|
<tr><td translate>{{ 'app.admin.settings.privacy.analytics.members' }}</td><td>{{ data.members }}</td></tr>
|
||||||
<tr><td translate>{{ 'app.admin.settings.privacy.analytics.admins' }}</td><td>{{ data.admins }}</td></tr>
|
<tr><td translate>{{ 'app.admin.settings.privacy.analytics.admins' }}</td><td>{{ data.admins }}</td></tr>
|
||||||
|
<tr><td translate>{{ 'app.admin.settings.privacy.analytics.managers' }}</td><td>{{ data.managers }}</td></tr>
|
||||||
<tr><td translate>{{ 'app.admin.settings.privacy.analytics.availabilities' }}</td><td>{{ data.availabilities }}</td></tr>
|
<tr><td translate>{{ 'app.admin.settings.privacy.analytics.availabilities' }}</td><td>{{ data.availabilities }}</td></tr>
|
||||||
<tr><td translate>{{ 'app.admin.settings.privacy.analytics.reservations' }}</td><td>{{ data.reservations }}</td></tr>
|
<tr><td translate>{{ 'app.admin.settings.privacy.analytics.reservations' }}</td><td>{{ data.reservations }}</td></tr>
|
||||||
|
<tr><td translate>{{ 'app.admin.settings.privacy.analytics.orders' }}</td><td>{{ data.orders }}</td></tr>
|
||||||
<tr><td translate>{{ 'app.admin.settings.privacy.analytics.plans' }}</td><td>{{ data.plans }}</td></tr>
|
<tr><td translate>{{ 'app.admin.settings.privacy.analytics.plans' }}</td><td>{{ data.plans }}</td></tr>
|
||||||
<tr><td translate>{{ 'app.admin.settings.privacy.analytics.spaces' }}</td><td>{{ data.spaces }}</td></tr>
|
<tr><td translate>{{ 'app.admin.settings.privacy.analytics.spaces' }}</td><td>{{ data.spaces }}</td></tr>
|
||||||
<tr><td translate>{{ 'app.admin.settings.privacy.analytics.online_payment' }}</td><td>{{ data.online_payment }}</td></tr>
|
<tr><td translate>{{ 'app.admin.settings.privacy.analytics.online_payment' }}</td><td>{{ data.online_payment }}</td></tr>
|
||||||
|
<tr><td translate>{{ 'app.admin.settings.privacy.analytics.gateway' }}</td><td>{{ data.gateway }}</td></tr>
|
||||||
|
<tr><td translate>{{ 'app.admin.settings.privacy.analytics.wallet' }}</td><td>{{ data.wallet }}</td></tr>
|
||||||
|
<tr><td translate>{{ 'app.admin.settings.privacy.analytics.statistics' }}</td><td>{{ data.statistics }}</td></tr>
|
||||||
|
<tr><td translate>{{ 'app.admin.settings.privacy.analytics.trainings' }}</td><td>{{ data.trainings }}</td></tr>
|
||||||
|
<tr><td translate>{{ 'app.admin.settings.privacy.analytics.public_agenda' }}</td><td>{{ data.public_agenda }}</td></tr>
|
||||||
|
<tr><td translate>{{ 'app.admin.settings.privacy.analytics.machines' }}</td><td>{{ data.machines }}</td></tr>
|
||||||
|
<tr><td translate>{{ 'app.admin.settings.privacy.analytics.store' }}</td><td>{{ data.store }}</td></tr>
|
||||||
<tr><td translate>{{ 'app.admin.settings.privacy.analytics.invoices' }}</td><td>{{ data.invoices }}</td></tr>
|
<tr><td translate>{{ 'app.admin.settings.privacy.analytics.invoices' }}</td><td>{{ data.invoices }}</td></tr>
|
||||||
<tr><td translate>{{ 'app.admin.settings.privacy.analytics.openlab' }}</td><td>{{ data.openlab }}</td></tr>
|
<tr><td translate>{{ 'app.admin.settings.privacy.analytics.openlab' }}</td><td>{{ data.openlab }}</td></tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -12,7 +12,7 @@ class HealthService
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.redis?
|
def self.redis?
|
||||||
!!Sidekiq.redis(&:info) # rubocop:disable Style/DoubleNegation
|
!!Sidekiq.redis(&:info)
|
||||||
rescue Redis::CannotConnectError
|
rescue Redis::CannotConnectError
|
||||||
false
|
false
|
||||||
end
|
end
|
||||||
@ -22,10 +22,8 @@ class HealthService
|
|||||||
|
|
||||||
client = Elasticsearch::Client.new host: "http://#{Rails.application.secrets.elaticsearch_host}:9200"
|
client = Elasticsearch::Client.new host: "http://#{Rails.application.secrets.elaticsearch_host}:9200"
|
||||||
response = client.perform_request 'GET', '_cluster/health'
|
response = client.perform_request 'GET', '_cluster/health'
|
||||||
!!response.body # rubocop:disable Style/DoubleNegation
|
!!response.body
|
||||||
rescue Elasticsearch::Transport::Transport::Error
|
rescue Elasticsearch::Transport::Transport::Error, Faraday::ConnectionFailed
|
||||||
false
|
|
||||||
rescue Faraday::ConnectionFailed
|
|
||||||
false
|
false
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -39,11 +37,20 @@ class HealthService
|
|||||||
version: Version.current,
|
version: Version.current,
|
||||||
members: User.members.count,
|
members: User.members.count,
|
||||||
admins: User.admins.count,
|
admins: User.admins.count,
|
||||||
|
managers: User.managers.count,
|
||||||
availabilities: last_week_availabilities,
|
availabilities: last_week_availabilities,
|
||||||
reservations: last_week_new_reservations,
|
reservations: last_week_new_reservations,
|
||||||
|
orders: last_week_orders,
|
||||||
plans: Setting.get('plans_module'),
|
plans: Setting.get('plans_module'),
|
||||||
spaces: Setting.get('spaces_module'),
|
spaces: Setting.get('spaces_module'),
|
||||||
online_payment: Setting.get('online_payment_module'),
|
online_payment: Setting.get('online_payment_module'),
|
||||||
|
gateway: Setting.get('payment_gateway'),
|
||||||
|
wallet: Setting.get('wallet_module'),
|
||||||
|
statistics: Setting.get('statistics_module'),
|
||||||
|
trainings: Setting.get('trainings_module'),
|
||||||
|
public_agenda: Setting.get('public_agenda_module'),
|
||||||
|
machines: Setting.get('machines_module'),
|
||||||
|
store: Setting.get('store_module'),
|
||||||
invoices: Setting.get('invoicing_module'),
|
invoices: Setting.get('invoicing_module'),
|
||||||
openlab: Setting.get('openlab_app_secret').present?
|
openlab: Setting.get('openlab_app_secret').present?
|
||||||
}
|
}
|
||||||
@ -74,5 +81,8 @@ class HealthService
|
|||||||
def self.last_week_new_reservations
|
def self.last_week_new_reservations
|
||||||
Reservation.where('created_at >= ? AND created_at < ?', DateTime.current - 7.days, DateTime.current).count
|
Reservation.where('created_at >= ? AND created_at < ?', DateTime.current - 7.days, DateTime.current).count
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
|
def self.last_week_orders
|
||||||
|
Order.where('created_at >= ? AND created_at < ?', DateTime.current - 7.days, DateTime.current).where.not(state: 'cart').count
|
||||||
|
end
|
||||||
|
end
|
||||||
|
@ -1653,11 +1653,20 @@ en:
|
|||||||
version: "Application version"
|
version: "Application version"
|
||||||
members: "Number of members"
|
members: "Number of members"
|
||||||
admins: "Number of administrators"
|
admins: "Number of administrators"
|
||||||
|
managers: "Number of managers"
|
||||||
availabilities: "Number of availabilities of the last 7 days"
|
availabilities: "Number of availabilities of the last 7 days"
|
||||||
reservations: "Number of reservations during the last 7 days"
|
reservations: "Number of reservations during the last 7 days"
|
||||||
|
orders: "Number of store orders during the last 7 days"
|
||||||
plans: "Is the subscription module active?"
|
plans: "Is the subscription module active?"
|
||||||
spaces: "Is the space management module active?"
|
spaces: "Is the space management module active?"
|
||||||
online_payment: "Is the online payment module active?"
|
online_payment: "Is the online payment module active?"
|
||||||
|
gateway: "The payment gateway used to collect online payments"
|
||||||
|
wallet: "Is the wallet module active?"
|
||||||
|
statistics: "Is the statistics module active?"
|
||||||
|
trainings: "Is the trainings module active?"
|
||||||
|
public_agenda: "Is the public_agenda module active?"
|
||||||
|
machines: "Is the machines module active?"
|
||||||
|
store: "Is the store module active?"
|
||||||
invoices: "Is the invoicing module active?"
|
invoices: "Is the invoicing module active?"
|
||||||
openlab: "Is the project sharing module (OpenLab) active?"
|
openlab: "Is the project sharing module (OpenLab) active?"
|
||||||
tracking_id_info_html: "To enable the statistical tracking of the visits using Google Analytics V4, set your tracking ID here. It is in the form G-XXXXXX. Visit <a href='https://analytics.google.com/analytics/web/' target='_blank'>the Google Analytics website</a> to get one.<br/><strong>Warning:</strong> if you enable this feature, a cookie will be created. Remember to write it down in your privacy policy, above."
|
tracking_id_info_html: "To enable the statistical tracking of the visits using Google Analytics V4, set your tracking ID here. It is in the form G-XXXXXX. Visit <a href='https://analytics.google.com/analytics/web/' target='_blank'>the Google Analytics website</a> to get one.<br/><strong>Warning:</strong> if you enable this feature, a cookie will be created. Remember to write it down in your privacy policy, above."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user