Add confirm dialog to admin when stopping services (#1520)

This commit is contained in:
Leendert de Borst
2026-01-28 11:17:49 +00:00
committed by Leendert de Borst
parent 0a42a62655
commit c7f142de7e
@@ -172,6 +172,18 @@
// If service not started and not starting, clicking should start it. Otherwise, stop it.
if (service.CurrentStatus == "Started" || service.DesiredStatus == "Started")
{
// Show confirmation modal before stopping a service.
var confirmed = await ConfirmModalService.ShowConfirmation(
"Stop " + service.DisplayName + "?",
"Are you sure you want to stop the " + service.DisplayName + " service?\n\nThe service will be unavailable until it is started again.",
"Stop service",
"Cancel");
if (!confirmed)
{
return;
}
service.DesiredStatus = "Stopped";
}
else