]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
webui: don't show trace options when compiled without traces in Debugging panel
authorJaroslav Kysela <perex@perex.cz>
Wed, 27 May 2015 19:40:58 +0000 (21:40 +0200)
committerJaroslav Kysela <perex@perex.cz>
Wed, 27 May 2015 19:40:58 +0000 (21:40 +0200)
src/webui/static/app/tvhlog.js

index ba3f0b5675933836f0f743b8833f621a43f5e998..6e680be6fb4e1b84b583030cc9b3f1324bc1a5c4 100644 (file)
@@ -61,14 +61,22 @@ tvheadend.tvhlog = function(panel, index) {
         }
     });
 
+    items = new Array();
+    items.push(tvhlogLogPath);
+    items.push(tvhlogToSyslog);
+    if (tvheadend.accessUpdate.trace)
+      items.push(tvhlogTraceOn);
+    items.push(tvhlogDebugSubsys);
+    if (tvheadend.accessUpdate.trace)
+      items.push(tvhlogTraceSubsys);
+
     var DebuggingPanel = new Ext.form.FieldSet({
         title: 'Debugging Options',
         width: 700,
         autoHeight: true,
         collapsible: true,
         animCollapse : true,
-        items: [tvhlogLogPath, tvhlogToSyslog,
-            tvhlogTraceOn, tvhlogDebugSubsys, tvhlogTraceSubsys]
+        items: items
     });
 
     var confpanel = new Ext.form.FormPanel({