mirror of
https://github.com/discourse/discourse-data-explorer.git
synced 2025-03-07 01:49:06 +00:00
This feature enables admins to create reports automatically based on a recurring schedule. It introduces a new automation script that includes the new email_group_user field added to discourse-automation, along with a query_id and query_params to pass in parameters to the existing data explorer query. The output of the report will be sent via pm (as a markdown table) to the recipients entered within the automation script. The automation (supports individual users, email addresses and groups).
14 lines
362 B
Ruby
14 lines
362 B
Ruby
# frozen_string_literal: true
|
|
|
|
Fabricator(:query, from: DiscourseDataExplorer::Query) do
|
|
name { sequence(:name) { |i| "cat#{i}" } }
|
|
description { sequence(:desc) { |i| "description #{i}" } }
|
|
sql { sequence(:sql) { |i| "SELECT * FROM users limit #{i}" } }
|
|
user
|
|
end
|
|
|
|
Fabricator(:query_group, from: DiscourseDataExplorer::QueryGroup) do
|
|
query
|
|
group
|
|
end
|