]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
tvhlog: disable trace fields when trace is not included in the tvh build
authorJaroslav Kysela <perex@perex.cz>
Mon, 28 Sep 2015 08:33:56 +0000 (10:33 +0200)
committerJaroslav Kysela <perex@perex.cz>
Mon, 28 Sep 2015 08:33:56 +0000 (10:33 +0200)
src/tvhlog.c
src/webui/static/app/tvhlog.js

index d666198639c7c0c30e8db839bfcf56a9d805b62e..f2bbfc629c0c1be5002bb0d2eeb83f77db622a14 100644 (file)
@@ -582,6 +582,12 @@ const idclass_t tvhlog_conf_class = {
   .ic_event      = "tvhlog_conf",
   .ic_perm_def   = ACCESS_ADMIN,
   .ic_save       = tvhlog_class_save,
+  .ic_groups     = (const property_group_t[]) {
+    {
+      .name   = N_("Settings"),
+      .number = 1,
+    },
+  },
   .ic_properties = (const property_t[]){
     {
       .type   = PT_STR,
@@ -589,6 +595,7 @@ const idclass_t tvhlog_conf_class = {
       .name   = N_("Debug log path"),
       .get    = tvhlog_class_path_get,
       .set    = tvhlog_class_path_set,
+      .group  = 1,
     },
     {
       .type   = PT_BOOL,
@@ -596,6 +603,7 @@ const idclass_t tvhlog_conf_class = {
       .name   = N_("Debug to syslog"),
       .get    = tvhlog_class_syslog_get,
       .set    = tvhlog_class_syslog_set,
+      .group  = 1,
     },
     {
       .type   = PT_STR,
@@ -603,6 +611,7 @@ const idclass_t tvhlog_conf_class = {
       .name   = N_("Debug subsystems"),
       .get    = tvhlog_class_debugsubs_get,
       .set    = tvhlog_class_debugsubs_set,
+      .group  = 1,
     },
     {
       .type   = PT_BOOL,
@@ -610,6 +619,10 @@ const idclass_t tvhlog_conf_class = {
       .name   = N_("Debug trace (low-level)"),
       .get    = tvhlog_class_trace_get,
       .set    = tvhlog_class_trace_set,
+#if !ENABLE_TRACE
+      .opts   = PO_RDONLY | PO_HIDDEN,
+#endif
+      .group  = 1,
     },
     {
       .type   = PT_STR,
@@ -617,6 +630,10 @@ const idclass_t tvhlog_conf_class = {
       .name   = N_("Trace subsystems"),
       .get    = tvhlog_class_tracesubs_get,
       .set    = tvhlog_class_tracesubs_set,
+#if !ENABLE_TRACE
+      .opts   = PO_RDONLY | PO_HIDDEN,
+#endif
+      .group  = 1,
     },
     {
       .type   = PT_BOOL,
@@ -624,6 +641,7 @@ const idclass_t tvhlog_conf_class = {
       .name   = N_("Debug libav log"),
       .get    = tvhlog_class_libav_get,
       .set    = tvhlog_class_libav_set,
+      .group  = 1,
     },
     {}
   }
index 70469f1480953943775dafb4a6ad8ce6bd43c842..7b2f10a2505e6113590424e99698f88d6bc72572 100644 (file)
@@ -4,7 +4,7 @@ tvheadend.tvhlog = function(panel, index) {
        var f = form.getForm();
        var trace = f.findField('trace');
        var tracesubs = f.findField('tracesubs');
-       tracesubs.setDisabled(!trace.getValue());
+       tracesubs.setDisabled(!trace.getValue() || tracesubs.disabled);
     }
 
     tvheadend.idnode_simple(panel, {