##// END OF EJS Templates
Harden whitespace in log messages to show newlines, tabs, and spaces....
idpaterson -
Show More
@@ -1,103 +1,105 b''
1 1 table.log-list {
2 tr.odd, tr.even {
2 tbody > tr > td {
3 vertical-align: top;
3 4 }
4 5
5 6 .http_status {
6 7 width: 52px;
7 8 }
8 9
9 10 .when {
10 11 width: 150px;
11 12 }
12 13
13 14 .tick {
14 15 width: 20px !important;
15 16 }
16 17
17 18 .c1 {
18 19 width: 130px;
19 20
20 21 .app_name {
21 22 font-weight: bold;
22 23 }
23 24 .server {
24 25 color: #777777;
25 26 }
26 27 }
27 28
28 29 .c2 {
29 30 .namespace {
30 31 color: @color_orange;
31 32 font-weight: bold;
32 33 }
33 34 word-break: break-all;
34 35 word-wrap: break-word;
35 36 }
36 37
37 38 .odd .c3, .even .c3 {
38 39 width: 90px;
39 40 font-size: 85%
40 41 }
41 42
42 43 .tag {
43 44 display: inline-block;
44 45 margin: 0 5px 0 0px;
45 46 padding: 2px 5px 1px;
46 47 font-size: 75%;
47 48 .border-radius(2px);
48 49 .inset-box-shadow(0, 0, 1px, rgba(0, 0, 0, 0.15));
49 50 border: 0px solid @color_light_grey;
50 51 background-color: lighten(@color_light_grey, 10%);
51 52 letter-spacing: 0.5px;
52 53 color: darken(@color_light_grey, 33%);
53 54 .name {
54 55 text-transform: uppercase;
55 56
56 57 }
57 58 }
58 59 .tag:hover {
59 60 .transition-duration;
60 61 -moz-transform: scale(1.20);
61 62 -webkit-transform: scale(1.20);
62 63 -o-transform: scale(1.20);
63 64 -ms-transform: scale(1.20);
64 65 transform: scale(1.20);
65 66 }
66 67
67 68 .unknown {
68 69 color: @color_grey !important;
69 70 }
70 71
71 72 .debug {
72 73 background-color: @color_green !important;
73 74 color: #ffffff !important;
74 75 }
75 76
76 77 .info {
77 78 background-color: lighten(@color_med_blue, 65%) !important;
78 79 color: @color_med_blue !important;
79 80 border-color: lighten(@color_med_blue, 33%);
80 81 }
81 82
82 83 .warning {
83 84 background-color: lighten(@color_orange, 55%) !important;
84 85 color: @color_orange !important;
85 86 border-color: lighten(@color_orange, 33%);
86 87 }
87 88
88 89 .error {
89 90 background-color: lighten(@color_red, 60%) !important;
90 91 color: @color_red !important;
91 92 border-color: lighten(@color_red, 50%);
92 93 }
93 94 .critical {
94 95 background-color: #000000 !important;
95 96 color: #ffffff !important;
96 97 background-color: #000000;
97 98 }
98 99 .log {
99 100 font-size: 85%;
100 101 margin-top: 5px;
102 white-space: pre-wrap;
101 103 }
102 104
103 105 }
@@ -1,98 +1,96 b''
1 1 <ng-include src="'templates/loader.html'" ng-if="logs.isLoading.logs"></ng-include>
2 2
3 3 <div ng-if="logs.isLoading.logs === false">
4 4
5 5 <p class="search-params">
6 6 <strong>Search params:</strong>
7 7 <span ng-repeat="tag in logs.searchParams.tags" class="tag">
8 8 <strong>{{tag.type}}</strong>
9 9 {{ tag.type == 'resource' ? logs.applications[tag.value].resource_name : tag.value }}
10 10
11 11 <a ng-click="logs.removeSearchTag(tag)"><span class="fa fa-times"></span></a>
12 12 </span>
13 13 </p>
14 14
15 15 <p>
16 16
17 17 <script type="text/ng-template" id="SearchTypeAheadUrl.html">
18 18
19 19 </script>
20 20
21 21 <form class="form">
22 22 <div class="typeahead-tags">
23 23 <input type="text" id="typeAhead" ng-model="logs.filterTypeAhead" placeholder="Start typing to filter logs for events, filter by servers, namespaces, levels."
24 24 ng-keydown="logs.typeAheadTag($event)"
25 25 uib-typeahead="tag as tag.text for tag in logs.filterTypeAheadOptions | filter:$viewValue:logs.aheadFilter"
26 26 typeahead-min-length="1" class="form-control"
27 27 typeahead-template-url="templates/directives/search_type_ahead.html">
28 28 </div>
29 29 </form>
30 30
31 31 <div class="well animate-show position-absolute increse-zindex" ng-if="logs.showDatePicker" ng-model="logs.pickerDate" ng-change="logs.pickerDateChanged()">
32 32 <uib-datepicker></uib-datepicker>
33 33 </div>
34 34
35 35 </p>
36 36
37 37 <div class="panel">
38 38
39 39 <div class="panel-body">
40 40 <c3chart data-domid="log_events_chart" data-data="logs.logEventsChartData" data-config="logs.logEventsChartConfig">
41 41 </c3chart>
42 42 </div>
43 43 </div>
44 44
45 45
46 46 <div class="text-center">
47 47 <uib-pagination total-items="logs.itemCount" items-per-page="logs.itemsPerPage" ng-model="logs.searchParams.page" max-size="10"
48 48 ng-change="logs.paginationChange()"
49 49 class="pagination pagination-sm" boundary-links="true" direction-links="false"></uib-pagination>
50 50 </div>
51 51
52 52 <div class="panel panel-default">
53 53
54 54 <table class="table table-striped log-list">
55 55 <caption>Logs</caption>
56 56 <thead>
57 57 <tr>
58 58 <th class="c1 resource">Application</th>
59 59 <th class="c2 message">Message</th>
60 60 <th class="c3 when">When</th>
61 61 </tr>
62 62 </thead>
63 63 <tbody>
64 64 <tr ng-repeat="log in logs.logsPage track by log.log_id" class="{{$odd ? 'odd' : 'even'}}">
65 65 <td class="c1">
66 66 <a class="tag application" ng-click="logs.addSearchTag({type:'resource', value:log.resource_id})">
67 67 <span class="name">{{log.resource_name}}</span></a>
68 68 </td>
69 69 <td class="c2">
70 70 <a class="tag {{log.log_level|lowercase}}" ng-click="logs.addSearchTag({type:'level', value:log.log_level})">
71 71 <span class="name">level:</span> {{log.log_level}}</a>
72 72 <a class="tag" ng-click="logs.addSearchTag({type:'namespace', value:log.namespace})">
73 73 <span class="name">namespace:</span> {{log.namespace}}</a>
74 74 <a ng-repeat="(tag, value) in log.tags" class="tag" ng-click="logs.addSearchTag({type:tag, value:value})">
75 75 <span class="name">{{tag}}:</span> {{value}}</a>
76 <div class="log">
77 {{log.message}}
78 </div>
76 <div class="log">{{log.message}}</div>
79 77 </td>
80 78 <td class="c3 when">
81 79 <a ng-click="logs.filterId(log)" data-uib-tooltip="{{log.timestamp}}">
82 80 <iso-to-relative-time time="{{log.timestamp}}"/>
83 81 </a>
84 82 </td>
85 83 </tr>
86 84
87 85 </tbody>
88 86 </table>
89 87
90 88 </div>
91 89
92 90 <div class="text-center">
93 91 <uib-pagination total-items="logs.itemCount" items-per-page="logs.itemsPerPage" ng-model="logs.searchParams.page" max-size="10"
94 92 ng-change="logs.paginationChange()"
95 93 class="pagination pagination-sm" boundary-links="true" direction-links="false"></uib-pagination>
96 94 </div>
97 95
98 96 </div>
General Comments 0
You need to be logged in to leave comments. Login now