Skip to content

Commit

Permalink
Tidied column suppression code
Browse files Browse the repository at this point in the history
  • Loading branch information
philborman committed Aug 29, 2017
1 parent 271fc36 commit 9ec8e56
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions data/interfaces/bookstrap/logs.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ <h1>${title}</h1>
%if lazylibrarian.CONFIG['TOGGLES'] == True:
Toggle: <a class="toggle-vis" data-column="0">Timestamp</a>
- <a class="toggle-vis" data-column="1">Level</a>
%if lazylibrarian.LOGLEVEL >= 2:
%if int(lazylibrarian.LOGLEVEL) >= 2:
- <a class="toggle-vis" data-column="2">Thread</a>
- <a class="toggle-vis" data-column="3">File</a>
- <a class="toggle-vis" data-column="4">Method</a>
Expand Down Expand Up @@ -68,11 +68,11 @@ <h1>${title}</h1>
var oTable = $('#log_table').DataTable({
"bAutoWidth": false,
"aoColumnDefs": [
%if lazylibrarian.LOGLEVEL < 3:
{ "sWidth": "3%", "aTargets": [ 0,1 ] },
%if lazylibrarian.LOGLEVEL >= 2:
{ "sWidth": "3%", "aTargets": [ 0,1,2,3,4,5 ] },
{ "sWidth": "60%", "aTargets": [ 6 ] }
%else:
{ "sWidth": "3%", "aTargets": [ 0,1,2,3,4,5 ] },
{ "sWidth": "3%", "aTargets": [ 0,1 ] },
{ "sWidth": "60%", "aTargets": [ 6 ] }
%endif
],
Expand All @@ -99,7 +99,7 @@ <h1>${title}</h1>
} else {
$('td', nRow).closest('tr').addClass("text-info");
}
%if lazylibrarian.LOGLEVEL < 3:
%if lazylibrarian.LOGLEVEL < 2:
$('td', nRow).eq(2).addClass("hidden");
$('td', nRow).eq(3).addClass("hidden");
$('td', nRow).eq(4).addClass("hidden");
Expand Down
8 changes: 4 additions & 4 deletions data/interfaces/default/logs.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ <h1>&nbsp;&nbsp;${title}</h1>
{
"bAutoWidth": false,
"aoColumnDefs": [
%if lazylibrarian.LOGLEVEL < 3:
{ "sWidth": "3%", "aTargets": [ 0,1 ] },
%if lazylibrarian.LOGLEVEL >= 2:
{ "sWidth": "3%", "aTargets": [ 0,1,2,3,4,5 ] },
{ "sWidth": "60%", "aTargets": [ 6 ] }
%else:
{ "sWidth": "3%", "aTargets": [ 0,1,2,3,4,5 ] },
{ "sWidth": "3%", "aTargets": [ 0,1 ] },
{ "sWidth": "60%", "aTargets": [ 6 ] }
%endif
],
Expand Down Expand Up @@ -94,7 +94,7 @@ <h1>&nbsp;&nbsp;${title}</h1>
{
$('td', nRow).eq(0).addClass('hidden');
}
%if lazylibrarian.LOGLEVEL < 3:
%if lazylibrarian.LOGLEVEL < 2:
$('td', nRow).eq(2).addClass("hidden");
$('td', nRow).eq(3).addClass("hidden");
$('td', nRow).eq(4).addClass("hidden");
Expand Down

0 comments on commit 9ec8e56

Please sign in to comment.