Repository navigation
CSV exports (UI) #3875
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CSV exports (UI) #3875
Changes from all commits
41ae494
b85a7bc
9b2bac0
328fa1c
9cf567d
9873f75
84017a8
82a7ebd
17c163c
5b8d8a2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -708,6 +708,23 @@ defmodule PlausibleWeb.SiteController do | |
| |> redirect(external: Routes.site_path(conn, :settings_integrations, site.domain)) | ||
| end | ||
|
|
||
| def export(conn, _params) do | ||
| %{site: site, current_user: user} = conn.assigns | ||
|
|
||
| Oban.insert!( | ||
| Plausible.Workers.ExportCSV.new(%{ | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right now it exports CSVs without date range in the name like I'll update it in #3845, or rather, I'll split that PR into two as well, one for business logic and tests and one for UI to make reviewing easier.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For some reason I'm having problems with running this job. It stays in iex> Plausible.Repo.all(Oban.Job) |> List.last |> Plausible.Workers.ExportCSV.performAh, seems like cloud queues are not started in dev env. Oban.config.queues
[
rotate_salts: [limit: 1],
schedule_email_reports: [limit: 1],
send_email_reports: [limit: 1],
spike_notifications: [limit: 1],
check_stats_emails: [limit: 1],
site_setup_emails: [limit: 1],
clean_invitations: [limit: 1],
analytics_imports: [limit: 1],
domain_change_transition: [limit: 1],
check_accept_traffic_until: [limit: 1]
]
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Quick-fixed in 17c163c |
||
| "site_id" => site.id, | ||
| "email_to" => user.email, | ||
| "s3_bucket" => Plausible.S3.exports_bucket(), | ||
| "s3_path" => "Plausible-#{site.id}.zip" | ||
| }) | ||
| ) | ||
|
|
||
| conn | ||
| |> put_flash(:success, "SCHEDULED. WAIT FOR MAIL") | ||
| |> redirect(to: Routes.site_path(conn, :settings_imports_exports, site.domain)) | ||
| end | ||
|
|
||
| def change_domain(conn, _params) do | ||
| changeset = Plausible.Site.update_changeset(conn.assigns.site) | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More info on switching from 6000 to 10000 #3845 (comment)