Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
tvhlog: disable trace fields when trace is not included in the tvh build
  • Loading branch information
perexg committed Sep 28, 2015
1 parent 147841b commit 02af180
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
18 changes: 18 additions & 0 deletions src/tvhlog.c
Expand Up @@ -582,48 +582,66 @@ 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,
.id = "path",
.name = N_("Debug log path"),
.get = tvhlog_class_path_get,
.set = tvhlog_class_path_set,
.group = 1,
},
{
.type = PT_BOOL,
.id = "syslog",
.name = N_("Debug to syslog"),
.get = tvhlog_class_syslog_get,
.set = tvhlog_class_syslog_set,
.group = 1,
},
{
.type = PT_STR,
.id = "debugsubs",
.name = N_("Debug subsystems"),
.get = tvhlog_class_debugsubs_get,
.set = tvhlog_class_debugsubs_set,
.group = 1,
},
{
.type = PT_BOOL,
.id = "trace",
.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,
.id = "tracesubs",
.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,
.id = "libav",
.name = N_("Debug libav log"),
.get = tvhlog_class_libav_get,
.set = tvhlog_class_libav_set,
.group = 1,
},
{}
}
Expand Down
2 changes: 1 addition & 1 deletion src/webui/static/app/tvhlog.js
Expand Up @@ -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, {
Expand Down

0 comments on commit 02af180

Please sign in to comment.