mirror of
https://github.com/immich-app/immich.git
synced 2025-12-23 17:25:11 +03:00
feat: run all jobs button
This commit is contained in:
2
mobile/openapi/README.md
generated
2
mobile/openapi/README.md
generated
@@ -164,7 +164,7 @@ Class | Method | HTTP request | Description
|
||||
*MaintenanceAdminApi* | [**deleteIntegrityReport**](doc//MaintenanceAdminApi.md#deleteintegrityreport) | **DELETE** /admin/integrity/report/{id} | Delete integrity report item
|
||||
*MaintenanceAdminApi* | [**getIntegrityReport**](doc//MaintenanceAdminApi.md#getintegrityreport) | **POST** /admin/integrity/report | Get integrity report by type
|
||||
*MaintenanceAdminApi* | [**getIntegrityReportCsv**](doc//MaintenanceAdminApi.md#getintegrityreportcsv) | **GET** /admin/integrity/report/{type}/csv | Export integrity report by type as CSV
|
||||
*MaintenanceAdminApi* | [**getIntegrityReportFile**](doc//MaintenanceAdminApi.md#getintegrityreportfile) | **GET** /admin/integrity/report/{id}/file | Download flagged file file
|
||||
*MaintenanceAdminApi* | [**getIntegrityReportFile**](doc//MaintenanceAdminApi.md#getintegrityreportfile) | **GET** /admin/integrity/report/{id}/file | Download flagged file
|
||||
*MaintenanceAdminApi* | [**getIntegrityReportSummary**](doc//MaintenanceAdminApi.md#getintegrityreportsummary) | **GET** /admin/integrity/summary | Get integrity report summary
|
||||
*MaintenanceAdminApi* | [**maintenanceLogin**](doc//MaintenanceAdminApi.md#maintenancelogin) | **POST** /admin/maintenance/login | Log into maintenance mode
|
||||
*MaintenanceAdminApi* | [**setMaintenanceMode**](doc//MaintenanceAdminApi.md#setmaintenancemode) | **POST** /admin/maintenance | Set maintenance mode
|
||||
|
||||
@@ -178,7 +178,7 @@ class MaintenanceAdminApi {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Download flagged file file
|
||||
/// Download flagged file
|
||||
///
|
||||
/// Download the orphan/broken file if one exists
|
||||
///
|
||||
@@ -213,7 +213,7 @@ class MaintenanceAdminApi {
|
||||
);
|
||||
}
|
||||
|
||||
/// Download flagged file file
|
||||
/// Download flagged file
|
||||
///
|
||||
/// Download the orphan/broken file if one exists
|
||||
///
|
||||
|
||||
@@ -468,7 +468,7 @@
|
||||
"api_key": []
|
||||
}
|
||||
],
|
||||
"summary": "Download flagged file file",
|
||||
"summary": "Download flagged file",
|
||||
"tags": [
|
||||
"Maintenance (admin)"
|
||||
],
|
||||
|
||||
@@ -1914,7 +1914,7 @@ export function deleteIntegrityReport({ id }: {
|
||||
}));
|
||||
}
|
||||
/**
|
||||
* Download flagged file file
|
||||
* Download flagged file
|
||||
*/
|
||||
export function getIntegrityReportFile({ id }: {
|
||||
id: string;
|
||||
|
||||
@@ -79,6 +79,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
async function runAllJobs(refreshOnly?: boolean) {
|
||||
for (const reportType of Object.values(IntegrityReportType)) {
|
||||
await runJob(reportType, refreshOnly);
|
||||
}
|
||||
}
|
||||
|
||||
let running = true;
|
||||
|
||||
onMount(async () => {
|
||||
@@ -112,7 +118,23 @@
|
||||
>
|
||||
<section id="setting-content" class="flex place-content-center sm:mx-4">
|
||||
<section class="w-full pb-28 sm:w-5/6 md:w-[850px]">
|
||||
<p class="text-sm dark:text-immich-dark-fg uppercase">{$t('admin.maintenance_integrity_report')}</p>
|
||||
<HStack>
|
||||
<p class="text-sm dark:text-immich-dark-fg uppercase">{$t('admin.maintenance_integrity_report')}</p>
|
||||
<Button
|
||||
size="tiny"
|
||||
variant="ghost"
|
||||
onclick={() => runAllJobs()}
|
||||
class="self-end mt-1"
|
||||
disabled={jobs?.integrityCheck.queueStatus.isActive}>{$t('admin.maintenance_integrity_check_all')}</Button
|
||||
>
|
||||
<Button
|
||||
size="tiny"
|
||||
variant="ghost"
|
||||
onclick={() => runAllJobs(true)}
|
||||
class="self-end mt-1"
|
||||
disabled={jobs?.integrityCheck.queueStatus.isActive}>{$t('refresh')}</Button
|
||||
></HStack
|
||||
>
|
||||
|
||||
<div class="mt-5 flex justify-between max-lg:flex-wrap gap-4">
|
||||
{#each TYPES as reportType (reportType)}
|
||||
@@ -127,7 +149,7 @@
|
||||
size="tiny"
|
||||
variant="ghost"
|
||||
class="self-end mt-1"
|
||||
disabled={jobs?.backgroundTask.queueStatus.isActive}
|
||||
disabled={jobs?.integrityCheck.queueStatus.isActive}
|
||||
>{$t('admin.maintenance_integrity_check_all')}</Button
|
||||
>
|
||||
<Button
|
||||
@@ -135,7 +157,7 @@
|
||||
size="tiny"
|
||||
variant="ghost"
|
||||
class="self-end mt-1"
|
||||
disabled={jobs?.backgroundTask.queueStatus.isActive}>{$t('refresh')}</Button
|
||||
disabled={jobs?.integrityCheck.queueStatus.isActive}>{$t('refresh')}</Button
|
||||
>
|
||||
<Button
|
||||
href={`${AppRoute.ADMIN_MAINTENANCE_INTEGRITY_REPORT + reportType}`}
|
||||
|
||||
Reference in New Issue
Block a user