Skip to content

Commit

Permalink
Merge pull request #1302 from benallard/patch-2
Browse files Browse the repository at this point in the history
samp inside a pre is overkill, beside, it's killing the formatting.
  • Loading branch information
Mikhail Sobolev committed Oct 29, 2014
2 parents 68a5ec9 + 9f988f3 commit 4ccffe6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 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
7 changes: 3 additions & 4 deletions www/base/src/app/builders/log/logviewer/logviewer.tpl.jade
Expand Up @@ -5,10 +5,9 @@
span.input-group-addon
i.fa.fa-search
pre.row.log(ng-show="log.type!='h'")
samp(ng-if="log.type=='t'", ng-bind="content")
samp(ng-repeat="line in lines | filter:searchText", class="{{line.class}}", ng-if="log.type=='s'")
| {{line.content}}
br
span(ng-if="log.type=='t'", ng-bind="content")
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 4ccffe6

Please sign in to comment.