From 3a57e20fa24379f1deb70494851e9c7402c3c697 Mon Sep 17 00:00:00 2001 From: Benjamin Runnels Date: Tue, 12 Apr 2016 16:57:43 -0500 Subject: [PATCH] Need to hide syslog on the services page if it's not enabled in Makefile modules --- html/services.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/html/services.js b/html/services.js index 17075ff..3d994de 100644 --- a/html/services.js +++ b/html/services.js @@ -51,7 +51,12 @@ function displayServices(data) { $("#sntp-spinner").setAttribute("hidden", ""); $("#mdns-spinner").setAttribute("hidden", ""); - $("#Syslog-form").removeAttribute("hidden"); + if (data.syslog_host) { + $("#Syslog-form").removeAttribute("hidden"); + } else { + $("#Syslog-form").parentNode.setAttribute("hidden", ""); + } + $("#SNTP-form").removeAttribute("hidden"); $("#mDNS-form").removeAttribute("hidden");