Repository navigation
CSV exports (UI) - #3875
CSV exports (UI)#3875
Conversation
23d7c15 to
0bd8d81
Compare
| <PlausibleWeb.Components.Generic.button_link disabled href=""> | ||
| Export to CSV | ||
| </PlausibleWeb.Components.Generic.button_link> | ||
| <.form :let={_} for={%{}} action={"/#{@site.domain}/settings/export"}> |
There was a problem hiding this comment.
Just realized that it can probably be a button_link with custom phoenix_html's method attribute set.
There was a problem hiding this comment.
It's possible to submit "implicit" form with PlausibleWeb.Components.Generic.button too. Example:
analytics/lib/plausible_web/live/imports_exports_settings.ex
Lines 94 to 101 in 4d7d88c
| %{site: site, current_user: user} = conn.assigns | ||
|
|
||
| Oban.insert!( | ||
| Plausible.Workers.ExportCSV.new(%{ |
There was a problem hiding this comment.
Right now it exports CSVs without date range in the name like imported_browsers.csv
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.
There was a problem hiding this comment.
For some reason I'm having problems with running this job. It stays in available state for longer than 60 seconds (is this required for job unique-ness?) For the manual test I ran it with
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]
]|
|
||
| minio: ## Start a transient container with a recent version of minio (s3) | ||
| docker run -d --rm -p 6000:6000 -p 6001:6001 --name plausible_minio minio/minio server /data --address ":6000" --console-address ":6001" | ||
| docker run -d --rm -p 10000:10000 -p 10001:10001 --name plausible_minio minio/minio server /data --address ":10000" --console-address ":10001" |
There was a problem hiding this comment.
More info on switching from 6000 to 10000 #3845 (comment)
9101b35 to
82a7ebd
Compare
| ) | ||
|
|
||
| conn | ||
| |> put_flash(:info, "SCHEDULED. WAIT FOR MAIL") |
There was a problem hiding this comment.
Eventually, we could add progress indicator and expose download link on the page too. That's something for later though.
Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com>
Changes
This PR makes the "Export to CSV" button in
/:website/settings/imports-exportsschedule aPlausible.Workers.ExportCSVjob.Tests
Changelog
Documentation
Dark mode