From 9157761a46f30c4815f25c98034656ea264c213c Mon Sep 17 00:00:00 2001 From: Georg Jung Date: Fri, 10 Jan 2020 16:10:23 +0200 Subject: [PATCH] Fix wake 404 --- WoL/Pages/Wake.razor | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/WoL/Pages/Wake.razor b/WoL/Pages/Wake.razor index 3651292..65d08a4 100644 --- a/WoL/Pages/Wake.razor +++ b/WoL/Pages/Wake.razor @@ -128,6 +128,15 @@ } } + private string Danger + { + set + { + AlertClass = "alert-danger"; + Alert = value; + } + } + protected override async Task OnParametersSetAsync() { await StartBackgroundWork(); @@ -136,6 +145,11 @@ private async Task StartBackgroundWork() { host = await HostService.Find(Id); + if (host == null) + { + Danger = "This host does not exist."; + return; + } model = new HostViewModel(host); AlertSpinner = true; Info = "Sending wake-up packet...";