Files
music_library/lib/music_library_web/live/maintenance_live/index.html.heex
T
2025-11-07 17:14:45 +00:00

93 lines
3.0 KiB
Plaintext

<Layouts.app flash={@flash} current_section={@current_section} socket={@socket}>
<div>
<h1 class="mt-2 text-base lg:text-2xl text-zinc-900 dark:text-zinc-200 font-semibold">
{gettext("Maintenance")}
</h1>
<h3 class="mt-4 text-base font-semibold text-zinc-900 dark:text-white">
{gettext("Records")}
</h3>
<p class="mt-2 max-w-4xl text-sm text-zinc-500 dark:text-zinc-400">
{gettext(
"Run operations on the entire record database. Monitor execution via the Oban dashboard."
)}
</p>
<ul class="mt-4">
<li class="space-y-4">
<.button
type="button"
phx-click="refresh_records_musicbrainz_data"
data-confirm={
gettext(
"Are you sure you want to refresh MusicBrainz data for all records? This operation can take a long time to complete."
)
}
>
{gettext("Refresh MusicBrainz data")}
</.button>
<.button
type="button"
phx-click="generate_record_embeddings"
data-confirm={
gettext(
"Are you sure you want to regenerate embeddings for all records? This operation can take a long time to complete."
)
}
>
{gettext("Regenerate record embeddings")}
</.button>
</li>
</ul>
<h3 class="mt-4 text-base font-semibold text-zinc-900 dark:text-white">
{gettext("Artists")}
</h3>
<p class="mt-2 max-w-4xl text-sm text-zinc-500 dark:text-zinc-400">
{gettext(
"Run operations on the entire artist database. Monitor execution via the Oban dashboard."
)}
</p>
<ul class="mt-4">
<li class="space-y-4">
<.button
type="button"
phx-click="refresh_artists_musicbrainz_data"
data-confirm={
gettext(
"Are you sure you want to refresh MusicBrainz data for all artists? This operation can take a long time to complete."
)
}
>
{gettext("Refresh MusicBrainz data")}
</.button>
<.button
type="button"
phx-click="refresh_artists_discogs_data"
data-confirm={
gettext(
"Are you sure you want to refresh Discogs data for all artists? This operation can take a long time to complete."
)
}
>
{gettext("Refresh Discogs data")}
</.button>
</li>
</ul>
<h3 class="mt-4 text-base font-semibold text-zinc-900 dark:text-white">
{gettext("Database")}
</h3>
<p class="mt-2 max-w-4xl text-sm text-zinc-500 dark:text-zinc-400">
{gettext("Run lower-level operations on the database")}
</p>
<ul class="mt-4">
<li class="space-y-4">
<.button
type="button"
phx-click="db_vacuum"
phx-disable-with={gettext("Running vacuum...")}
>
{gettext("Vacuum")}
</.button>
</li>
</ul>
</div>
</Layouts.app>