The code for listing all of the defined queries is mixed together with the code for editing a single query. Notably, this results in large amounts of unnecessary data being loaded for the list view, which causes substantial rendering slowdowns. To address this issue, we now only load the necessary data for the list view, and load the full data when it's actually needed (any endpoint that returns a single query). The primary changes that achieve this are: - Create a new `QueryDetailsSerializer` serialiser, which includes all of the query info, and change the existing `QuerySerializer` serialiser to only include the necessary attributes of each query for generating a list of them all. - Split the monolith `/plugins/explorer` route into `/plugins/explorer` for showing just the list of queries, and `/plugins/explorer/queries/:query_id`, for showing/editing/running a specific query.
40 lines
1.4 KiB
YAML
40 lines
1.4 KiB
YAML
en:
|
|
site_settings:
|
|
data_explorer_enabled: "Enable the Data Explorer at /admin/plugins/explorer"
|
|
discourse_automation:
|
|
scriptables:
|
|
recurring_data_explorer_result_pm:
|
|
title: Schedule a PM with Data Explorer results
|
|
description: Get scheduled reports sent to your messages
|
|
no_csv_allowed: "When using `attach_csv` field, `csv` must be added to the list of authorized extensions in the site settings."
|
|
recurring_data_explorer_result_topic:
|
|
title: Schedule a post in a topic with Data Explorer results
|
|
description: Get scheduled reports posted to a specific topic
|
|
data_explorer:
|
|
report_generator:
|
|
private_message:
|
|
title: "Scheduled report for %{query_name}"
|
|
body: |
|
|
Hi %{recipient_name}, your Data Explorer report is ready.
|
|
|
|
Query name:
|
|
%{query_name}
|
|
|
|
Here are the results:
|
|
%{table}
|
|
|
|
<a href='%{base_url}/admin/plugins/explorer/queries/%{query_id}'>View query in Data Explorer</a>
|
|
|
|
Report created at %{created_at} (%{timezone})
|
|
post:
|
|
body: |
|
|
### Scheduled report for %{query_name}
|
|
|
|
Here are the results:
|
|
%{table}
|
|
|
|
<a href='%{base_url}/admin/plugins/explorer/queries/%{query_id}'>View query in Data Explorer</a>
|
|
|
|
Report created at %{created_at} (%{timezone})
|
|
upload_appendix: "Appendix: [%{filename}|attachment](%{short_url})"
|