Hero-admin: voortgangsindicator voor foto's die worden verwerkt, mislukt-melding met opnieuw proberen
Spinner per foto zonder varianten, totaal met voortgangsbalk (aria-valuenow/max), uitleg dat de hero al is opgeslagen, bij 3 mislukte pogingen een melding met 'Opnieuw proberen' (POST /hero/images/{id}/retry; foutstatus staat in het geheugen van de renderer). Test dat een refetch van 5 s onopgeslagen wijzigingen niet overschrijft.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -95,6 +95,23 @@ public class HeroImagesController(IHeroImageService service, IOptions<MediaOptio
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Lets the background renderer try an image it gave up on again.</summary>
|
||||
[HttpPost("{id:guid}/retry")]
|
||||
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
||||
[ProducesResponseType(StatusCodes.Status404NotFound)]
|
||||
public async Task<IActionResult> Retry(Guid id, CancellationToken cancellationToken)
|
||||
{
|
||||
try
|
||||
{
|
||||
await service.RetryRenderAsync(id, cancellationToken);
|
||||
return NoContent();
|
||||
}
|
||||
catch (HeroImageNotFoundException)
|
||||
{
|
||||
return NotFound(new { error = "not_found", message = Texts().Get(HeroTexts.Image.NotFound) });
|
||||
}
|
||||
}
|
||||
|
||||
[HttpDelete("{id:guid}")]
|
||||
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
||||
[ProducesResponseType(StatusCodes.Status409Conflict)]
|
||||
|
||||
Reference in New Issue
Block a user