mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 09:11:10 +00:00
Moves media library scanning to domain layer
This commit is contained in:
1 parent
8b51abe0b2
commit
c4246d2e69
209 files changed
+3793
-641
No files matched your search
+1
-1
@@ -9,7 +9,7 @@ namespace Lumina.Presentation.Web.Common.Models.Authorization;
|
||||
/// <summary>
|
||||
/// Represents the response model for an account authorization request.
|
||||
/// </summary>
|
||||
/// <param name="UserId">The Id of the user for whom the authorization is retrieved.</param>
|
||||
/// <param name="UserId">The unique identifier of the user for whom the authorization is retrieved.</param>
|
||||
/// <param name="Role">The role associated to the user.</param>
|
||||
/// <param name="Permissions">The collection of permissions associated to the user.</param>
|
||||
[DebuggerDisplay("UserId: {UserId}")]
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Lumina.Presentation.Web.Common.Models.Authorization;
|
||||
/// <summary>
|
||||
/// Represents a model for an authorization permission.
|
||||
/// </summary>
|
||||
/// <param name="Id">The Id of the authorization permission.</param>
|
||||
/// <param name="Id">The unique identifier of the authorization permission.</param>
|
||||
/// <param name="PermissionName">The authorization permission.</param>
|
||||
public record PermissionModel(
|
||||
Guid Id,
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace Lumina.Presentation.Web.Common.Models.Authorization;
|
||||
/// <summary>
|
||||
/// Represents a model for an authorization role.
|
||||
/// </summary>
|
||||
/// <param name="Id">The Id of the authorization role.</param>
|
||||
/// <param name="Id">The unique identifier of the authorization role.</param>
|
||||
/// <param name="RoleName">The authorization role.</param>
|
||||
public record RoleModel(
|
||||
Guid Id,
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Lumina.Presentation.Web.Common.Models.Authorization;
|
||||
/// <summary>
|
||||
/// Represents the request model for updating an existing authorization role.
|
||||
/// </summary>
|
||||
/// <param name="RoleId">The Id of the role.</param>
|
||||
/// <param name="RoleId">The unique identifier of the role.</param>
|
||||
/// <param name="RoleName">The name of the role.</param>
|
||||
/// <param name="Permissions">The collection of Ids of the permissions of the role.</param>
|
||||
public record UpdateRoleRequestModel(
|
||||
|
||||
+2
-2
@@ -8,8 +8,8 @@ namespace Lumina.Presentation.Web.Common.Models.Authorization;
|
||||
/// <summary>
|
||||
/// Represents the request model for updating the authorization role and permissions of a user.
|
||||
/// </summary>
|
||||
/// <param name="RoleId">The Id of the user.</param>
|
||||
/// <param name="RoleId">The Id of the role.</param>
|
||||
/// <param name="RoleId">The unique identifier of the user.</param>
|
||||
/// <param name="RoleId">The unique identifier of the role.</param>
|
||||
/// <param name="Permissions">The collection of Ids of the permissions of the user.</param>
|
||||
public record UpdateUserRoleAndPermissionsRequestModel(
|
||||
Guid UserId,
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Lumina.Presentation.Web.Common.Models.UsersManagement;
|
||||
/// <summary>
|
||||
/// Represents the response model for a user authentication.
|
||||
/// </summary>
|
||||
/// <param name="Id">The Id of the logged in user.</param>
|
||||
/// <param name="Id">The unique identifier of the logged in user.</param>
|
||||
/// <param name="Username">The username of the logged in user.</param>
|
||||
/// <param name="Token">The JWT authentication token, <see langword="null"/> if authentication failed or TOTP is required.</param>
|
||||
/// <param name="UsesTotp">Indicates whether the user has Two-Factor Authentication enabled, or not.</param>
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace Lumina.Presentation.Web.Common.Models.UsersManagement;
|
||||
/// <summary>
|
||||
/// Represents a model for a user.
|
||||
/// </summary>
|
||||
/// <param name="Id">The Id of the user.</param>
|
||||
/// <param name="Id">The unique identifier of the user.</param>
|
||||
/// <param name="Username">The username of the user.</param>
|
||||
public record UserModel(
|
||||
Guid Id,
|
||||
|
||||
@@ -60,7 +60,7 @@ public class AdminController : Controller
|
||||
/// <summary>
|
||||
/// Gets the authorization permissions of a role identified by <paramref name="roleId"/>.
|
||||
/// </summary>
|
||||
/// <param name="roleId">The Id of the role for which to get the list of permissions.</param>
|
||||
/// <param name="roleId">The unique identifier of the role for which to get the list of permissions.</param>
|
||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||
[HttpGet("api-get-permissions-by-role-id/{roleId}")]
|
||||
public async Task<IActionResult> GetPermissionsByRoleId(Guid roleId, CancellationToken cancellationToken)
|
||||
@@ -72,7 +72,7 @@ public class AdminController : Controller
|
||||
/// <summary>
|
||||
/// Gets the authorization permissions of a user identified by <paramref name="userId"/>.
|
||||
/// </summary>
|
||||
/// <param name="userId">The Id of the user for whom to get the list of permissions.</param>
|
||||
/// <param name="userId">The unique identifier of the user for whom to get the list of permissions.</param>
|
||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||
[HttpGet("api-get-permissions-by-user-id/{userId}")]
|
||||
public async Task<IActionResult> GetPermissionsByUserId(Guid userId, CancellationToken cancellationToken)
|
||||
@@ -84,7 +84,7 @@ public class AdminController : Controller
|
||||
/// <summary>
|
||||
/// Gets the authorization role of a user identified by <paramref name="userId"/>.
|
||||
/// </summary>
|
||||
/// <param name="userId">The Id of the user for whom to get the role.</param>
|
||||
/// <param name="userId">The unique identifier of the user for whom to get the role.</param>
|
||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||
[HttpGet("api-get-role-by-user-id/{userId}")]
|
||||
public async Task<IActionResult> GetRoleByUserId(Guid userId, CancellationToken cancellationToken)
|
||||
@@ -131,7 +131,7 @@ public class AdminController : Controller
|
||||
/// <summary>
|
||||
/// Deletes an authorization role.
|
||||
/// </summary>
|
||||
/// <param name="roleId">The Id of the role to be deleted.</param>
|
||||
/// <param name="roleId">The unique identifier of the role to be deleted.</param>
|
||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||
[HttpDelete("api-delete-role/{roleId}")]
|
||||
public async Task<IActionResult> DeleteRole(Guid roleId, CancellationToken cancellationToken)
|
||||
|
||||
+10
-9
@@ -121,7 +121,7 @@ public class LibraryManagementController : Controller
|
||||
[HttpPost("api-scan-libraries")]
|
||||
public async Task<IActionResult> ScanAllLibraries(CancellationToken cancellationToken = default)
|
||||
{
|
||||
ScanLibraryModel[] response = await _apiHttpClient.PostAsync<ScanLibraryModel[], EmptyModel>($"libraries/scan", new EmptyModel(), cancellationToken).ConfigureAwait(false);
|
||||
ScanLibraryModel[] response = await _apiHttpClient.PostAsync<ScanLibraryModel[], EmptyModel>($"libraries/scans", new EmptyModel(), cancellationToken).ConfigureAwait(false);
|
||||
return Json(new { success = true, data = response });
|
||||
}
|
||||
|
||||
@@ -133,30 +133,31 @@ public class LibraryManagementController : Controller
|
||||
[HttpPost("api-scan-library/{id}")]
|
||||
public async Task<IActionResult> ScanLibrary(Guid id, CancellationToken cancellationToken = default)
|
||||
{
|
||||
ScanLibraryModel response = await _apiHttpClient.PostAsync<ScanLibraryModel, EmptyModel>($"libraries/{id}/scan", new EmptyModel(), cancellationToken).ConfigureAwait(false);
|
||||
ScanLibraryModel response = await _apiHttpClient.PostAsync<ScanLibraryModel, EmptyModel>($"libraries/{id}/scans", new EmptyModel(), cancellationToken).ConfigureAwait(false);
|
||||
return Json(new { success = true, data = response });
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Cancells the previously started scan of all media libraries.
|
||||
/// Cancels the previously started scan of all media libraries.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||
[HttpPost("api-cancel-libraries-scan")]
|
||||
public async Task<IActionResult> CancelLibrariesScan(CancellationToken cancellationToken = default)
|
||||
{
|
||||
await _apiHttpClient.PostAsync<EmptyModel, EmptyModel>($"libraries/cancel-scan", new EmptyModel(), cancellationToken).ConfigureAwait(false);
|
||||
await _apiHttpClient.PostAsync<EmptyModel, EmptyModel>($"libraries/scans/cancel", new EmptyModel(), cancellationToken).ConfigureAwait(false);
|
||||
return Json(new { success = true });
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Cancells the previously started scan of a media library.
|
||||
/// Cancels the previously started scan of a media library.
|
||||
/// </summary>
|
||||
/// <param name="id">The id of the media library whose scan is cancelled.</param>
|
||||
/// <param name="libraryId">The id of the media library whose scan is cancelled.</param>
|
||||
/// <param name="scanId">The id of the scan to cancel.</param>
|
||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||
[HttpPost("api-cancel-library-scan/{id}")]
|
||||
public async Task<IActionResult> CancelLibraryScan(Guid id, CancellationToken cancellationToken = default)
|
||||
[HttpPost("{libraryId:guid}/api-cancel-library-scan/{scanId:guid}")]
|
||||
public async Task<IActionResult> CancelLibraryScan(Guid libraryId, Guid scanId, CancellationToken cancellationToken = default)
|
||||
{
|
||||
await _apiHttpClient.PostAsync<EmptyModel, EmptyModel>($"libraries/{id}/cancel-scan", new EmptyModel(), cancellationToken).ConfigureAwait(false);
|
||||
await _apiHttpClient.PostAsync<EmptyModel, EmptyModel>($"libraries/{libraryId}/scans/{scanId}/cancel", new EmptyModel(), cancellationToken).ConfigureAwait(false);
|
||||
return Json(new { success = true });
|
||||
}
|
||||
}
|
||||
+24
@@ -549,4 +549,28 @@
|
||||
<data name="CannotScanLockedLibrary" xml:space="preserve">
|
||||
<value>Eine gesperrte Bibliothek kann nicht gescannt werden!</value>
|
||||
</data>
|
||||
<data name="CanOnlyStartPendingScans" xml:space="preserve">
|
||||
<value>Nur ausstehende Scans können gestartet werden!</value>
|
||||
</data>
|
||||
<data name="CanOnlyCancelRunningScans" xml:space="preserve">
|
||||
<value>Nur laufende Scans können abgebrochen werden!</value>
|
||||
</data>
|
||||
<data name="ScanIdCannotBeEmpty" xml:space="preserve">
|
||||
<value>Scan-ID darf nicht leer sein!</value>
|
||||
</data>
|
||||
<data name="LibraryAlreadyBeingScanned" xml:space="preserve">
|
||||
<value>Die Bibliothek wird bereits gescannt!</value>
|
||||
</data>
|
||||
<data name="TotalScanJobItemsCountMustBePositive" xml:space="preserve">
|
||||
<value>Gesamtanzahl der Scan-Aufträge muss positiv sein!</value>
|
||||
</data>
|
||||
<data name="CompletedScanJobItemsCountMustBePositive" xml:space="preserve">
|
||||
<value>Anzahl der abgeschlossenen Scan-Aufträge muss positiv sein!</value>
|
||||
</data>
|
||||
<data name="CompletedScanJobItemsCountCantExceedTotalScanJobItemsCount" xml:space="preserve">
|
||||
<value>Die Anzahl der abgeschlossenen Scan-Aufträge darf die Gesamtanzahl der Scan-Aufträge nicht überschreiten!</value>
|
||||
</data>
|
||||
<data name="ScanJobCurrentOperationCannotBeEmpty" xml:space="preserve">
|
||||
<value>Aktuelle Scan-Operation darf nicht leer sein!</value>
|
||||
</data>
|
||||
</root>
|
||||
+24
@@ -549,4 +549,28 @@
|
||||
<data name="CannotScanLockedLibrary" xml:space="preserve">
|
||||
<value>Cannot scan a locked library!</value>
|
||||
</data>
|
||||
<data name="CanOnlyStartPendingScans" xml:space="preserve">
|
||||
<value>Can only start pending scans!</value>
|
||||
</data>
|
||||
<data name="CanOnlyCancelRunningScans" xml:space="preserve">
|
||||
<value>Can only cancel running scans!</value>
|
||||
</data>
|
||||
<data name="ScanIdCannotBeEmpty" xml:space="preserve">
|
||||
<value>Scan Id cannot be empty!</value>
|
||||
</data>
|
||||
<data name="LibraryAlreadyBeingScanned" xml:space="preserve">
|
||||
<value>Library is already being scanned!</value>
|
||||
</data>
|
||||
<data name="TotalScanJobItemsCountMustBePositive" xml:space="preserve">
|
||||
<value>Total scan job items count must be positive!</value>
|
||||
</data>
|
||||
<data name="CompletedScanJobItemsCountMustBePositive" xml:space="preserve">
|
||||
<value>Completed scan job items count must be positive!</value>
|
||||
</data>
|
||||
<data name="CompletedScanJobItemsCountCantExceedTotalScanJobItemsCount" xml:space="preserve">
|
||||
<value>Completed scan job items count can't exceed total scan job items count!</value>
|
||||
</data>
|
||||
<data name="ScanJobCurrentOperationCannotBeEmpty" xml:space="preserve">
|
||||
<value>Scan job current operation cannot be empty!</value>
|
||||
</data>
|
||||
</root>
|
||||
+24
@@ -549,4 +549,28 @@
|
||||
<data name="CannotScanLockedLibrary" xml:space="preserve">
|
||||
<value>¡No se puede escanear una biblioteca bloqueada!</value>
|
||||
</data>
|
||||
<data name="CanOnlyStartPendingScans" xml:space="preserve">
|
||||
<value>¡Solo se pueden iniciar escaneos pendientes!</value>
|
||||
</data>
|
||||
<data name="CanOnlyCancelRunningScans" xml:space="preserve">
|
||||
<value>¡Solo se pueden cancelar los escaneos en ejecución!</value>
|
||||
</data>
|
||||
<data name="ScanIdCannotBeEmpty" xml:space="preserve">
|
||||
<value>¡El ID de escaneo no puede estar vacío!</value>
|
||||
</data>
|
||||
<data name="LibraryAlreadyBeingScanned" xml:space="preserve">
|
||||
<value>¡La biblioteca ya está siendo escaneada!</value>
|
||||
</data>
|
||||
<data name="TotalScanJobItemsCountMustBePositive" xml:space="preserve">
|
||||
<value>¡El número total de elementos a escanear debe ser positivo!</value>
|
||||
</data>
|
||||
<data name="CompletedScanJobItemsCountMustBePositive" xml:space="preserve">
|
||||
<value>¡El número de elementos escaneados completados debe ser positivo!</value>
|
||||
</data>
|
||||
<data name="CompletedScanJobItemsCountCantExceedTotalScanJobItemsCount" xml:space="preserve">
|
||||
<value>¡El número de elementos escaneados completados no puede exceder el número total de elementos a escanear!</value>
|
||||
</data>
|
||||
<data name="ScanJobCurrentOperationCannotBeEmpty" xml:space="preserve">
|
||||
<value>¡La operación actual del escaneo no puede estar vacía!</value>
|
||||
</data>
|
||||
</root>
|
||||
+24
@@ -549,4 +549,28 @@
|
||||
<data name="CannotScanLockedLibrary" xml:space="preserve">
|
||||
<value>Impossible de scanner une bibliothèque verrouillée!</value>
|
||||
</data>
|
||||
<data name="CanOnlyStartPendingScans" xml:space="preserve">
|
||||
<value>Seuls les scans en attente peuvent être démarrés !</value>
|
||||
</data>
|
||||
<data name="CanOnlyCancelRunningScans" xml:space="preserve">
|
||||
<value>Seuls les scans en cours peuvent être annulés !</value>
|
||||
</data>
|
||||
<data name="ScanIdCannotBeEmpty" xml:space="preserve">
|
||||
<value>L'ID de scan ne peut pas être vide !</value>
|
||||
</data>
|
||||
<data name="LibraryAlreadyBeingScanned" xml:space="preserve">
|
||||
<value>La bibliothèque est déjà en cours de scan !</value>
|
||||
</data>
|
||||
<data name="TotalScanJobItemsCountMustBePositive" xml:space="preserve">
|
||||
<value>Le nombre total d'éléments à scanner doit être positif !</value>
|
||||
</data>
|
||||
<data name="CompletedScanJobItemsCountMustBePositive" xml:space="preserve">
|
||||
<value>Le nombre d'éléments scannés terminés doit être positif !</value>
|
||||
</data>
|
||||
<data name="CompletedScanJobItemsCountCantExceedTotalScanJobItemsCount" xml:space="preserve">
|
||||
<value>Le nombre d'éléments scannés terminés ne peut pas dépasser le nombre total d'éléments à scanner !</value>
|
||||
</data>
|
||||
<data name="ScanJobCurrentOperationCannotBeEmpty" xml:space="preserve">
|
||||
<value>L'opération actuelle du scan ne peut pas être vide !</value>
|
||||
</data>
|
||||
</root>
|
||||
+24
@@ -549,4 +549,28 @@
|
||||
<data name="CannotScanLockedLibrary" xml:space="preserve">
|
||||
<value>Impossibile scansionare una libreria bloccata!</value>
|
||||
</data>
|
||||
<data name="CanOnlyStartPendingScans" xml:space="preserve">
|
||||
<value>È possibile avviare solo le scansioni in sospeso!</value>
|
||||
</data>
|
||||
<data name="CanOnlyCancelRunningScans" xml:space="preserve">
|
||||
<value>È possibile annullare solo le scansioni in esecuzione!</value>
|
||||
</data>
|
||||
<data name="ScanIdCannotBeEmpty" xml:space="preserve">
|
||||
<value>L'ID della scansione non può essere vuoto!</value>
|
||||
</data>
|
||||
<data name="LibraryAlreadyBeingScanned" xml:space="preserve">
|
||||
<value>La libreria è già in fase di scansione!</value>
|
||||
</data>
|
||||
<data name="TotalScanJobItemsCountMustBePositive" xml:space="preserve">
|
||||
<value>Il numero totale degli elementi da scansionare deve essere positivo!</value>
|
||||
</data>
|
||||
<data name="CompletedScanJobItemsCountMustBePositive" xml:space="preserve">
|
||||
<value>Il numero di elementi scansionati completati deve essere positivo!</value>
|
||||
</data>
|
||||
<data name="CompletedScanJobItemsCountCantExceedTotalScanJobItemsCount" xml:space="preserve">
|
||||
<value>Il numero di elementi scansionati completati non può superare il numero totale di elementi da scansionare!</value>
|
||||
</data>
|
||||
<data name="ScanJobCurrentOperationCannotBeEmpty" xml:space="preserve">
|
||||
<value>L'operazione corrente della scansione non può essere vuota!</value>
|
||||
</data>
|
||||
</root>
|
||||
+24
@@ -549,4 +549,28 @@
|
||||
<data name="CannotScanLockedLibrary" xml:space="preserve">
|
||||
<value>ロックされたライブラリはスキャンできません!</value>
|
||||
</data>
|
||||
<data name="CanOnlyStartPendingScans" xml:space="preserve">
|
||||
<value>保留中のスキャンのみ開始できます!</value>
|
||||
</data>
|
||||
<data name="CanOnlyCancelRunningScans" xml:space="preserve">
|
||||
<value>実行中のスキャンのみキャンセル可能です!</value>
|
||||
</data>
|
||||
<data name="ScanIdCannotBeEmpty" xml:space="preserve">
|
||||
<value>スキャンIDを空にすることはできません!</value>
|
||||
</data>
|
||||
<data name="LibraryAlreadyBeingScanned" xml:space="preserve">
|
||||
<value>ライブラリは既にスキャン中です!</value>
|
||||
</data>
|
||||
<data name="TotalScanJobItemsCountMustBePositive" xml:space="preserve">
|
||||
<value>スキャン項目の合計数は正の値でなければなりません!</value>
|
||||
</data>
|
||||
<data name="CompletedScanJobItemsCountMustBePositive" xml:space="preserve">
|
||||
<value>完了したスキャン項目数は正の値でなければなりません!</value>
|
||||
</data>
|
||||
<data name="CompletedScanJobItemsCountCantExceedTotalScanJobItemsCount" xml:space="preserve">
|
||||
<value>完了したスキャン項目数は合計スキャン項目数を超えることはできません!</value>
|
||||
</data>
|
||||
<data name="ScanJobCurrentOperationCannotBeEmpty" xml:space="preserve">
|
||||
<value>スキャンの現在の操作を空にすることはできません!</value>
|
||||
</data>
|
||||
</root>
|
||||
+24
@@ -549,4 +549,28 @@
|
||||
<data name="CannotScanLockedLibrary" xml:space="preserve">
|
||||
<value>Cannot scan a locked library!</value>
|
||||
</data>
|
||||
<data name="CanOnlyStartPendingScans" xml:space="preserve">
|
||||
<value>Can only start pending scans!</value>
|
||||
</data>
|
||||
<data name="CanOnlyCancelRunningScans" xml:space="preserve">
|
||||
<value>Can only cancel running scans!</value>
|
||||
</data>
|
||||
<data name="ScanIdCannotBeEmpty" xml:space="preserve">
|
||||
<value>Scan Id cannot be empty!</value>
|
||||
</data>
|
||||
<data name="LibraryAlreadyBeingScanned" xml:space="preserve">
|
||||
<value>Library is already being scanned!</value>
|
||||
</data>
|
||||
<data name="TotalScanJobItemsCountMustBePositive" xml:space="preserve">
|
||||
<value>Total scan job items count must be positive!</value>
|
||||
</data>
|
||||
<data name="CompletedScanJobItemsCountMustBePositive" xml:space="preserve">
|
||||
<value>Completed scan job items count must be positive!</value>
|
||||
</data>
|
||||
<data name="CompletedScanJobItemsCountCantExceedTotalScanJobItemsCount" xml:space="preserve">
|
||||
<value>Completed scan job items count can't exceed total scan job items count!</value>
|
||||
</data>
|
||||
<data name="ScanJobCurrentOperationCannotBeEmpty" xml:space="preserve">
|
||||
<value>Scan job current operation cannot be empty!</value>
|
||||
</data>
|
||||
</root>
|
||||
+24
@@ -549,4 +549,28 @@
|
||||
<data name="CannotScanLockedLibrary" xml:space="preserve">
|
||||
<value>Nu se poate scana o bibliotecă blocată!</value>
|
||||
</data>
|
||||
<data name="CanOnlyStartPendingScans" xml:space="preserve">
|
||||
<value>Se pot porni doar scanări în așteptare!</value>
|
||||
</data>
|
||||
<data name="CanOnlyCancelRunningScans" xml:space="preserve">
|
||||
<value>Se pot anula doar scanările în curs!</value>
|
||||
</data>
|
||||
<data name="ScanIdCannotBeEmpty" xml:space="preserve">
|
||||
<value>ID-ul de scanare nu poate fi gol!</value>
|
||||
</data>
|
||||
<data name="LibraryAlreadyBeingScanned" xml:space="preserve">
|
||||
<value>Biblioteca este deja în curs de scanare!</value>
|
||||
</data>
|
||||
<data name="TotalScanJobItemsCountMustBePositive" xml:space="preserve">
|
||||
<value>Numărul total de elemente de scanat trebuie să fie pozitiv!</value>
|
||||
</data>
|
||||
<data name="CompletedScanJobItemsCountMustBePositive" xml:space="preserve">
|
||||
<value>Numărul de elemente scanate complet trebuie să fie pozitiv!</value>
|
||||
</data>
|
||||
<data name="CompletedScanJobItemsCountCantExceedTotalScanJobItemsCount" xml:space="preserve">
|
||||
<value>Numărul de elemente scanate complet nu poate depăși numărul total de elemente de scanat!</value>
|
||||
</data>
|
||||
<data name="ScanJobCurrentOperationCannotBeEmpty" xml:space="preserve">
|
||||
<value>Operația curentă de scanare nu poate fi goală!</value>
|
||||
</data>
|
||||
</root>
|
||||
+24
@@ -549,4 +549,28 @@
|
||||
<data name="CannotScanLockedLibrary" xml:space="preserve">
|
||||
<value>Невозможно сканировать заблокированную библиотеку!</value>
|
||||
</data>
|
||||
<data name="CanOnlyStartPendingScans" xml:space="preserve">
|
||||
<value>Можно запускать только ожидающие сканирования!</value>
|
||||
</data>
|
||||
<data name="CanOnlyCancelRunningScans" xml:space="preserve">
|
||||
<value>Можно отменить только запущенные сканирования!</value>
|
||||
</data>
|
||||
<data name="ScanIdCannotBeEmpty" xml:space="preserve">
|
||||
<value>Идентификатор сканирования не может быть пустым!</value>
|
||||
</data>
|
||||
<data name="LibraryAlreadyBeingScanned" xml:space="preserve">
|
||||
<value>Библиотека уже сканируется!</value>
|
||||
</data>
|
||||
<data name="TotalScanJobItemsCountMustBePositive" xml:space="preserve">
|
||||
<value>Общее количество элементов для сканирования должно быть положительным!</value>
|
||||
</data>
|
||||
<data name="CompletedScanJobItemsCountMustBePositive" xml:space="preserve">
|
||||
<value>Количество завершенных отсканированных элементов должно быть положительным!</value>
|
||||
</data>
|
||||
<data name="CompletedScanJobItemsCountCantExceedTotalScanJobItemsCount" xml:space="preserve">
|
||||
<value>Количество завершенных отсканированных элементов не может превышать общее количество элементов для сканирования!</value>
|
||||
</data>
|
||||
<data name="ScanJobCurrentOperationCannotBeEmpty" xml:space="preserve">
|
||||
<value>Текущая операция сканирования не может быть пустой!</value>
|
||||
</data>
|
||||
</root>
|
||||
+24
@@ -549,4 +549,28 @@
|
||||
<data name="CannotScanLockedLibrary" xml:space="preserve">
|
||||
<value>无法扫描已锁定的库!</value>
|
||||
</data>
|
||||
<data name="CanOnlyStartPendingScans" xml:space="preserve">
|
||||
<value>只能启动待处理的扫描!</value>
|
||||
</data>
|
||||
<data name="CanOnlyCancelRunningScans" xml:space="preserve">
|
||||
<value>只能取消正在运行的扫描!</value>
|
||||
</data>
|
||||
<data name="ScanIdCannotBeEmpty" xml:space="preserve">
|
||||
<value>扫描ID不能为空!</value>
|
||||
</data>
|
||||
<data name="LibraryAlreadyBeingScanned" xml:space="preserve">
|
||||
<value>库已在扫描中!</value>
|
||||
</data>
|
||||
<data name="TotalScanJobItemsCountMustBePositive" xml:space="preserve">
|
||||
<value>扫描任务项目总数必须为正数!</value>
|
||||
</data>
|
||||
<data name="CompletedScanJobItemsCountMustBePositive" xml:space="preserve">
|
||||
<value>已完成扫描项目数量必须为正数!</value>
|
||||
</data>
|
||||
<data name="CompletedScanJobItemsCountCantExceedTotalScanJobItemsCount" xml:space="preserve">
|
||||
<value>已完成扫描项目数量不能超过扫描项目总数!</value>
|
||||
</data>
|
||||
<data name="ScanJobCurrentOperationCannotBeEmpty" xml:space="preserve">
|
||||
<value>扫描任务当前操作不能为空!</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -153,6 +153,9 @@
|
||||
<data name="DeleteLibraryConfirm" xml:space="preserve">
|
||||
<value>Sind Sie sicher, dass Sie die ausgewählte Bibliothek löschen möchten?</value>
|
||||
</data>
|
||||
<data name="DiscoveringFiles" xml:space="preserve">
|
||||
<value>Dateien werden erkannt...</value>
|
||||
</data>
|
||||
<data name="Documentary" xml:space="preserve">
|
||||
<value>Dokumentarfilm</value>
|
||||
</data>
|
||||
|
||||
@@ -153,6 +153,9 @@
|
||||
<data name="DeleteLibraryConfirm" xml:space="preserve">
|
||||
<value>Are you sure you want to delete the specified library?</value>
|
||||
</data>
|
||||
<data name="DiscoveringFiles" xml:space="preserve">
|
||||
<value>Discovering files...</value>
|
||||
</data>
|
||||
<data name="Documentary" xml:space="preserve">
|
||||
<value>Documentary</value>
|
||||
</data>
|
||||
|
||||
@@ -153,6 +153,9 @@
|
||||
<data name="DeleteLibraryConfirm" xml:space="preserve">
|
||||
<value>¿Está seguro de que desea eliminar la biblioteca especificada?</value>
|
||||
</data>
|
||||
<data name="DiscoveringFiles" xml:space="preserve">
|
||||
<value>Descubriendo archivos...</value>
|
||||
</data>
|
||||
<data name="Documentary" xml:space="preserve">
|
||||
<value>Documental</value>
|
||||
</data>
|
||||
|
||||
@@ -153,6 +153,9 @@
|
||||
<data name="DeleteLibraryConfirm" xml:space="preserve">
|
||||
<value>Êtes-vous sûr de vouloir supprimer la bibliothèque spécifiée?</value>
|
||||
</data>
|
||||
<data name="DiscoveringFiles" xml:space="preserve">
|
||||
<value>Découverte des fichiers...</value>
|
||||
</data>
|
||||
<data name="Documentary" xml:space="preserve">
|
||||
<value>Documentaire</value>
|
||||
</data>
|
||||
|
||||
@@ -153,6 +153,9 @@
|
||||
<data name="DeleteLibraryConfirm" xml:space="preserve">
|
||||
<value>È sicuro di voler eliminare la libreria specificata?</value>
|
||||
</data>
|
||||
<data name="DiscoveringFiles" xml:space="preserve">
|
||||
<value>Rilevamento dei file...</value>
|
||||
</data>
|
||||
<data name="Documentary" xml:space="preserve">
|
||||
<value>Documentario</value>
|
||||
</data>
|
||||
|
||||
@@ -153,6 +153,9 @@
|
||||
<data name="DeleteLibraryConfirm" xml:space="preserve">
|
||||
<value>指定されたライブラリを削除してもよろしいですか?</value>
|
||||
</data>
|
||||
<data name="DiscoveringFiles" xml:space="preserve">
|
||||
<value>ファイルを検出中...</value>
|
||||
</data>
|
||||
<data name="Documentary" xml:space="preserve">
|
||||
<value>ドキュメンタリー</value>
|
||||
</data>
|
||||
|
||||
@@ -153,6 +153,9 @@
|
||||
<data name="DeleteLibraryConfirm" xml:space="preserve">
|
||||
<value>Are you sure you want to delete the specified library?</value>
|
||||
</data>
|
||||
<data name="DiscoveringFiles" xml:space="preserve">
|
||||
<value>Discovering files...</value>
|
||||
</data>
|
||||
<data name="Documentary" xml:space="preserve">
|
||||
<value>Documentary</value>
|
||||
</data>
|
||||
|
||||
@@ -153,6 +153,9 @@
|
||||
<data name="DeleteLibraryConfirm" xml:space="preserve">
|
||||
<value>Sunteți sigur că doriți să ștergeți biblioteca specificată?</value>
|
||||
</data>
|
||||
<data name="DiscoveringFiles" xml:space="preserve">
|
||||
<value>Se descoperă fișierele...</value>
|
||||
</data>
|
||||
<data name="Documentary" xml:space="preserve">
|
||||
<value>Documentar</value>
|
||||
</data>
|
||||
|
||||
@@ -153,6 +153,9 @@
|
||||
<data name="DeleteLibraryConfirm" xml:space="preserve">
|
||||
<value>Вы уверены, что хотите удалить указанную библиотеку?</value>
|
||||
</data>
|
||||
<data name="DiscoveringFiles" xml:space="preserve">
|
||||
<value>Обнаружение файлов...</value>
|
||||
</data>
|
||||
<data name="Documentary" xml:space="preserve">
|
||||
<value>Документальный Фильм</value>
|
||||
</data>
|
||||
|
||||
@@ -153,6 +153,9 @@
|
||||
<data name="DeleteLibraryConfirm" xml:space="preserve">
|
||||
<value>您确定要删除指定的库吗?</value>
|
||||
</data>
|
||||
<data name="DiscoveringFiles" xml:space="preserve">
|
||||
<value>正在发现文件...</value>
|
||||
</data>
|
||||
<data name="Documentary" xml:space="preserve">
|
||||
<value>纪录片</value>
|
||||
</data>
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
<td class="text-center">${library.isEnabled === true ? `@_localizer["Yes"]` : `@_localizer["No"]`}</td>
|
||||
<td class="text-center">${library.isLocked === true ? `@_localizer["Yes"]` : `@_localizer["No"]`}</td>
|
||||
<td class="text-end">
|
||||
<img src="/images/ui/stop.svg" alt="@_localizer["CancelScan"]" title="@_localizer["Scan"]" class="hidden remove-form-table-row-icon" />
|
||||
<img src="/images/ui/stop.svg" alt="@_localizer["CancelScan"]" title="@_localizer["CancelScan"]" class="hidden remove-form-table-row-icon" />
|
||||
<img src="/images/ui/trigger.svg" alt="@_localizer["Scan"]" title="@_localizer["Scan"]" class="remove-form-table-row-icon" />
|
||||
<a href="${editUrl}">
|
||||
<img src="/images/ui/edit.svg" alt="@_localizer["Edit"]" title="@_localizer["Edit"]" class="remove-form-table-row-icon" />
|
||||
@@ -155,6 +155,7 @@
|
||||
data.forEach(scan => {
|
||||
const row = tbody.querySelector(`tr[data-library-id="${scan.libraryId}"]`);
|
||||
if (row) {
|
||||
row.setAttribute('data-scan-id', scan.scanId);
|
||||
const scanIcon = row.querySelector('img[src*="trigger.svg"]');
|
||||
const cancelScanIcon = row.querySelector('img[src*="stop.svg"]');
|
||||
|
||||
@@ -175,6 +176,7 @@
|
||||
const success = await callApiPostAsync(url.replace('/@(default(Guid))', `/${libraryId}`));
|
||||
|
||||
if (success) {
|
||||
row.setAttribute('data-scan-id', success.scanId);
|
||||
const scanIcon = e.target;
|
||||
const cancelScanIcon = row.querySelector('img[src*="stop.svg"]');
|
||||
|
||||
@@ -208,9 +210,24 @@
|
||||
if (e.target.matches('img[src*="stop.svg"]')) {
|
||||
const row = e.target.closest('tr');
|
||||
|
||||
const libraryId = row.getAttribute('data-library-id');
|
||||
const url = '@_urlService.GetAbsoluteUrl("CancelLibraryScan", "LibraryManagement", new { id = default(Guid) })';
|
||||
await callApiPostAsync(url.replace('/@(default(Guid))', `/${libraryId}`));
|
||||
const url = '@_urlService.GetAbsoluteUrl("CancelLibraryScan", "LibraryManagement", new { libraryId = default(Guid), scanId = default(Guid) })';
|
||||
|
||||
// make a list of values from DOM that are needed as URL query params (they need to be in the order they appear in the URL!)
|
||||
const params = [
|
||||
row.getAttribute('data-library-id'),
|
||||
row.getAttribute('data-scan-id')
|
||||
];
|
||||
// split URL into segments for precise replacement
|
||||
const segments = url.split('/');
|
||||
let paramIndex = 0;
|
||||
// replace each default GUID sequentially with the values of the query params list, in the order they were added
|
||||
const finalUrl = segments.map(segment =>
|
||||
segment === '00000000-0000-0000-0000-000000000000'
|
||||
? params[paramIndex++]
|
||||
: segment
|
||||
).join('/');
|
||||
|
||||
await callApiPostAsync(finalUrl);
|
||||
const scanIcon = row.querySelector('img[src*="trigger.svg"]');
|
||||
const cancelScanIcon = row.querySelector('img[src*="stop.svg"]');
|
||||
|
||||
|
||||
@@ -699,7 +699,7 @@ function removeHorizontalScrolling(idOrElement) {
|
||||
|
||||
/**
|
||||
* Gets the position and size of an element relative to the viewport.
|
||||
* @param {string} id - The Id of the element to get the offset for.
|
||||
* @param {string} id - The unique identifier of the element to get the offset for.
|
||||
* @returns {Object} An object with the top, left, width, and height of the element.
|
||||
*/
|
||||
function getElementOffset(id) {
|
||||
|
||||
Reference in new issue
Block a user