Skip to content

Commit

Permalink
Update export message and buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
milesmcc committed Dec 1, 2023
1 parent 7d990c3 commit bd91447
Showing 1 changed file with 44 additions and 31 deletions.
75 changes: 44 additions & 31 deletions platform/lib/platform_web/live/projects_live/export_live.ex
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,38 @@ defmodule PlatformWeb.ProjectsLive.ExportComponent do
<section class="flex flex-col md:flex-row my-8">
<div class="mb-4 md:w-[20rem] md:min-w-[20rem] md:mr-20">
<p class="sec-head text-xl">Export</p>
<p class="sec-subhead">Export Project Metadata or Media</p>
<p class="sec-subhead">Export Project Data</p>
</div>
<div class="grow">
<div class="rounded-md bg-blue-50 p-4 border-blue-600 border mb-8">
<div class="flex">
<div class="flex-shrink-0">
<Heroicons.information_circle mini class="h-5 w-5 text-blue-500" />
</div>
<div class="ml-3 flex-1 md:flex flex-col text-sm text-blue-700 md:justify-between prose prose-sm">
<div class="ml-3 flex-1 md:flex flex-col text-sm text-blue-700 md:justify-between prose prose-sm max-w-full">
<p class="text-sm text-blue-700">
A full export may take a long time to complete.
Your data on Atlos is fully portable. You can export your project's data to a spreadsheet (CSV), or you can export all of your project's data and media to a zip file.
</p>
<details class="-mt-2">
<summary class="text-sm text-blue-700 cursor-pointer">
Learn more about the structure of the ZIP file
<summary class="text-sm text-blue-700 cursor-pointer font-medium">
Learn more about the structure of Atlos exports
</summary>
<div class="mt-2 text-sm text-blue-700">
<p>
<ul>
<li>
The operation will create a zip file containing a folder for each media within the project.
Spreadsheet (CSV) exports will contain a row for each incident in your project, as well as a link to each piece of attached source material. Files uploaded directly to Atlos are not included in CSV exports.
</li>
<li>
Each media folder will contain a metadata.json file with the media metadata,
an updates.json file with the media updates, and a folder for each version of the media.
Full exports will create a zip file containing a folder for each incident in the project.
</li>
<li>
In the version folder, there will be a metadata.json file with the version metadata,
and a file for each artifact of the version.
Each incident folder will contain a metadata.json file with the incident metadata,
an updates.json file with its updates, and a folder for each piece of source material attached to the incident.
</li>
<li>
In the source material folder, there will be a metadata.json file with the version metadata,
and a file for each artifact (file) associated with the version.
</li>
</ul>
</p>
Expand All @@ -45,34 +48,44 @@ defmodule PlatformWeb.ProjectsLive.ExportComponent do
</div>
</div>
</div>
<.card class="grow border">
<div class="mb-2">
<p class="sec-head">Export Incidents</p>
<p class="sec-subhead mb-2">Export metadata about all incidents in this project.</p>
<%= button type: "button", to: Routes.export_path(@socket, :create_csv_export, %{"project_id" => @project.id}),
class: "base-button",
<.card no_pad={true} class="grow border">
<div class="divide-y grid grid-cols-1">
<div class="md:flex gap-4 justify-between py-4 px-5 sm:py-5">
<div>
<p class="sec-head">Export Incidents</p>
<p class="sec-subhead">Export metadata about all incidents in this project.</p>
</div>
<div>
<%= button type: "button", to: Routes.export_path(@socket, :create_csv_export, %{"project_id" => @project.id}),
class: "button ~urge @high",
role: "menuitem",
method: :post
do %>
<Heroicons.document_arrow_down mini class="-ml-0.5 mr-2 h-5 w-5 text-neutral-400" />
Incidents (CSV)
<% end %>
</div>
<Heroicons.table_cells mini class="-ml-0.5 mr-2 h-5 w-5 opacity-75" />
Spreadsheet (CSV)
<% end %>
</div>
</div>
<div class="mt-8 mb-2">
<p class="sec-head">Full Export</p>
<p class="sec-subhead mb-2">
Export all metadata and media in this project.
Note that this is an expensive operation and may take a long time to complete.
</p>
<%= button type: "button", to: Routes.export_path(@socket, :create_project_full_export, %{"project_id" => @project.id}),
class: "base-button",
<div class="md:flex gap-4 justify-between py-4 px-5 sm:py-5">
<div>
<p class="sec-head">Full Export</p>
<p class="sec-subhead mb-2">
Export all metadata and media in this project.
Note that this is an expensive operation and may take a long time to complete.
</p>
</div>
<div>
<%= button type: "button", to: Routes.export_path(@socket, :create_project_full_export, %{"project_id" => @project.id}),
class: "button ~urge @high",
role: "menuitem",
method: :post
do %>
<Heroicons.folder_arrow_down mini class="-ml-0.5 mr-2 h-5 w-5 text-neutral-400" />
All Data & Media (ZIP)
<% end %>
<Heroicons.folder_arrow_down mini class="-ml-0.5 mr-2 h-5 w-5 opacity-75" />
All Data & Media (ZIP)
<% end %>
</div>
</div>
</div>
</.card>
</div>
Expand Down

0 comments on commit bd91447

Please sign in to comment.