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