Skip to content

Commit

Permalink
Fix lazyloading, and text-wrapping
Browse files Browse the repository at this point in the history
  • Loading branch information
Benoît Allard committed Oct 28, 2014
1 parent 4298503 commit 9f988f3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
Expand Up @@ -20,7 +20,7 @@ class Logviewer extends Directive
if num_lines > self.num_lines
for i in [self.num_lines..num_lines - 1]
self.lines.push
content: ".\n"
content: "."
class: "log_o"
self.num_lines = num_lines
if self.auto_scroll
Expand Down
4 changes: 2 additions & 2 deletions www/base/src/app/builders/log/logviewer/logviewer.less
Expand Up @@ -4,8 +4,8 @@
pre.log {
// It is much more difficult to do autoscroll if line wrap is enabled.
// For now we just disable it. There is space for some smarter algorithm
samp {
white-space: nowrap;
.no-wrap {
white-space: pre;
}
overflow: auto;
}
Expand Down
5 changes: 2 additions & 3 deletions www/base/src/app/builders/log/logviewer/logviewer.tpl.jade
Expand Up @@ -6,9 +6,8 @@
i.fa.fa-search
pre.row.log(ng-show="log.type!='h'")
span(ng-if="log.type=='t'", ng-bind="content")
span(ng-repeat="line in lines | filter:searchText", class="{{line.class}}", ng-if="log.type=='s'")
| {{line.content}}
br
span.no-wrap(ng-repeat="line in lines | filter:searchText", class="{{line.class}}", ng-if="log.type=='s'")
| {{line.content + '\n'}}
div.panel(ng-if="log.type=='h'", ng-class="log.name=='err.html' && 'panel-danger' || 'panel-default'")
div.panel-heading
h4.panel-title {{log.name}}
Expand Down

0 comments on commit 9f988f3

Please sign in to comment.