Add confirm dialog to admin when stopping services (#1520)
This commit is contained in:
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
|
||||
|
||||
Reference in New Issue
Block a user