logster 0.8.4.2.pre → 0.8.4.3.pre

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7ab4cc46fb6fc744870f4012f588acfd9fd463c4
4
- data.tar.gz: 04597c1cf33e5b86537aa134d5dd964b1724c2fb
3
+ metadata.gz: e704a239b3cbe88f36a41e30888836d981451494
4
+ data.tar.gz: ea74d3dfb8a7f2ffe9371194a4ab233c13133e0c
5
5
  SHA512:
6
- metadata.gz: deb16d38c75202e8658cae809d3be1694b940ef83a388473bb5f4cb7827f258f2ea8592397c2f438ce6251cdc2f50c937d75a7013126f83c431f45b608931fe6
7
- data.tar.gz: 7260f410f3028d4b6178002e3e2f85a1213f81ffdf90c2133a6f55af5453b3181ad7207c8936ec51bbd6e14eb686c212f665672fdf54d05f72df9c76dfa5fbc0
6
+ metadata.gz: 45bbecf6dc989a24d796eb5059588dfee399bded667c775b3183d48d5158f782ef6aa796fd83df0faea0631b72a923b1a8e92e1aecce33f15affab8112d78bf5
7
+ data.tar.gz: 715218740ee56fe89bc9b46174722a95d3f49b2545b894a608e2f92e56cb034227a117f6ba9b55826ecbdcb7f3385ca481766828ff6015711b68c2121abaacc3
@@ -166,11 +166,11 @@ App.Message = Ember.Object.extend({
166
166
  case 1:
167
167
  return "";
168
168
  case 2:
169
- return "<i class='fa fa-exclamation-circle'></i>";
169
+ return "<i class='fa fa-exclamation-circle warning'></i>";
170
170
  case 3:
171
- return "<i class='fa fa-times-circle'></i>";
171
+ return "<i class='fa fa-times-circle error'></i>";
172
172
  case 4:
173
- return "<i class='fa fa-times-circle'></i>";
173
+ return "<i class='fa fa-times-circle fatal'></i>";
174
174
  }
175
175
  }.property("severity")
176
176
  });
@@ -435,6 +435,7 @@ App.PanelResizerComponent = Em.Component.extend({
435
435
  return;
436
436
  }
437
437
 
438
+
438
439
  this.topPanel.css("bottom", fromBottom + 5);
439
440
  this.bottomPanel.css("height", fromBottom - 15);
440
441
  this.divider.css("bottom", fromBottom - 5);
@@ -535,24 +536,24 @@ App.UpdateTimeComponent = Em.Component.extend({
535
536
  didInsertElement: function(){
536
537
  var updateTimes = function(){
537
538
  $('.auto-update-time').each(function(){
538
- var newTime = moment(
539
- parseInt(this.getAttribute('data-timestamp'),10)
540
- ).fromNow(),
541
- elem = this;
539
+ var timestamp = parseInt(this.getAttribute('data-timestamp'),10);
540
+ var elem = this;
541
+
542
+ var text = App.formatTime(timestamp);
542
543
 
543
- if(newTime != elem.innerText) {
544
- elem.innerText = newTime;
544
+ if(text !== elem.innerText) {
545
+ elem.innerText = text;
545
546
  }
546
547
 
547
548
  });
548
- Em.run.later(updateTimes, 10000);
549
+ Em.run.later(updateTimes, 60000);
549
550
  };
550
551
 
551
- Em.run.later(updateTimes, 10000);
552
+ Em.run.later(updateTimes, 60000);
552
553
  }
553
554
  });
554
555
 
555
- App.TimeAgoComponent = Ember.Component.extend({
556
+ App.TimeFormatterComponent = Ember.Component.extend({
556
557
  tagName: 'span',
557
558
  classNames: 'auto-update-time',
558
559
  attributeBindings: ['data-timestamp', 'title'],
@@ -569,18 +570,32 @@ App.TimeAgoComponent = Ember.Component.extend({
569
570
  return moment(this.get("timestamp"));
570
571
  }.property(),
571
572
 
572
- fromNow: function(){
573
- return this.get("moment").fromNow();
574
- }.property().volatile()
573
+ render: function(buffer){
574
+ buffer.push(App.formatTime(this.get('timestamp')));
575
+ },
575
576
  });
576
577
 
577
- // Em.HTMLBars._registerHelper('timeAgo', function(prop, options){
578
- // var timestamp = Ember.Handlebars.get(this, prop, options);
579
- // var parsed = moment(timestamp);
580
- // var formatted = "<span data-timestamp='" + timestamp + "' class='auto-update-time' title='" + parsed.format() + "'>" + parsed.fromNow() + "</span>";
581
- //
582
- // return new Handlebars.SafeString(formatted);
583
- // });
578
+ App.formatTime = function(timestamp){
579
+ var formatted;
580
+ var time = moment(timestamp);
581
+ var now = moment();
582
+
583
+ if (time.diff(now.startOf('day')) > 0) {
584
+ formatted = time.format('h:mm a');
585
+ } else {
586
+ if (time.diff(now.startOf('week')) > 0) {
587
+ formatted = time.format('dd h:mm a');
588
+ } else {
589
+ if (time.diff(now.startOf('year')) > 0) {
590
+ formatted = time.format('D MMM h:mm a');
591
+ } else {
592
+ formatted = time.format('D MMM YY');
593
+ }
594
+ }
595
+ }
596
+
597
+ return formatted;
598
+ };
584
599
 
585
600
  App.TabbedSectionComponent = Ember.Component.extend({
586
601
  tabs: Em.A(),
@@ -627,6 +642,9 @@ App.TabContentsComponent = Ember.Component.extend({
627
642
 
628
643
  didInsertElement: function() {
629
644
  this.invokeParent("addTab");
645
+ if (this.get("defaultTab")) {
646
+ this.invokeParent("selectTab");
647
+ }
630
648
  },
631
649
  willDestroyElement: function() {
632
650
  this.invokeParent("removeTab");
@@ -10,7 +10,7 @@
10
10
  {{/if}}
11
11
  <pre>{{currentMessage.message}}</pre>
12
12
  {{/tab-contents}}
13
- {{#tab-contents name="backtrace" hint="show backtrace" currentMessage=currentMessage}}
13
+ {{#tab-contents name="backtrace" defaultTab="true" hint="show backtrace" currentMessage=currentMessage}}
14
14
  {{#if showTitle}}
15
15
  <h3>Backtrace</h3>
16
16
  {{/if}}
@@ -7,11 +7,11 @@
7
7
  <td class="message-body">
8
8
  <div class="message">
9
9
  {{model.displayMessage}}
10
- {{#if model.protected}}
11
- <span class='protected'>
12
- <i class='fa fa-lock'></i>
13
- </span>
14
- {{/if}}
15
10
  </div>
16
11
  </td>
17
- <td class="time">{{time-ago timestamp=model.timestamp}}</td>
12
+ <td class='protected'>
13
+ {{#if model.protected}}
14
+ <i title="message is protected, clearing will not remove it" class='fa fa-lock'></i>
15
+ {{/if}}
16
+ </td>
17
+ <td class="time">{{time-formatter timestamp=model.timestamp}}</td>
@@ -5,13 +5,14 @@
5
5
  <th class="count"></th>
6
6
  <th class="severity"></th>
7
7
  <th class="info">Info</th>
8
+ <th class="protected"></th>
8
9
  <th class="time">Time</th>
9
10
  </tr>
10
11
  </thead>
11
12
  <tbody>
12
13
  {{#if model.moreBefore}}
13
14
  <tr {{action "showMoreBefore"}} class="show-more">
14
- <td colspan=4>{{model.totalBefore}} more</td>
15
+ <td colspan=5>{{model.totalBefore}} more</td>
15
16
  </tr>
16
17
  {{/if}}
17
18
  {{#each model.messages as |message|}}
@@ -35,14 +36,17 @@
35
36
  </label>
36
37
  <label class="warn">
37
38
  {{input type="checkbox" checked=showWarn}}
39
+ <i class='fa fa-exclamation-circle warning'></i>
38
40
  Warning
39
41
  </label>
40
42
  <label class="error">
41
43
  {{input type="checkbox" checked=showErr}}
44
+ <i class='fa fa-times-circle error'></i>
42
45
  Error
43
46
  </label>
44
47
  <label class="fatal">
45
48
  {{input type="checkbox" checked=showFatal}}
49
+ <i class='fa fa-times-circle fatal'></i>
46
50
  Fatal
47
51
  </label>
48
52
  <label class="search">
@@ -1,8 +1,12 @@
1
1
  body {
2
- font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif;
2
+ font-family: 'Roboto', Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif;
3
3
  font-size: 12px;
4
4
  }
5
5
 
6
+ pre {
7
+ font-family: 'Roboto Mono', Consolas, Monaco, Ubuntu Mono, monospace;
8
+ }
9
+
6
10
 
7
11
  tbody tr {
8
12
  width: 98%;
@@ -36,7 +40,6 @@ td.time {
36
40
  vertical-align: top;
37
41
  }
38
42
  .message {
39
- font-family: Consolas, Monaco, Ubuntu Mono, monospace;
40
43
  font-size: 13px;
41
44
  overflow: hidden;
42
45
  white-space: nowrap;
@@ -54,25 +57,31 @@ th.severity{
54
57
 
55
58
  th.time{
56
59
  width: 90px;
60
+ text-align: right;
61
+ padding-right: 20px;
62
+ }
63
+
64
+ td.time{
65
+ text-align: right;
66
+ padding-right: 8px;
57
67
  }
58
68
 
59
- .fatal .severity .fa{
69
+ th.protected {
70
+ width: 10px;
71
+ }
72
+
73
+ i.fatal {
60
74
  color: #900;
61
75
  }
62
76
 
63
- .error .severity .fa {
77
+ i.error {
64
78
  color: #E00;
65
79
  }
66
80
 
67
- .warn .severity .fa {
81
+ i.warning {
68
82
  color: #FEB800;
69
83
  }
70
84
 
71
- .message .protected {
72
- float: right;
73
- margin-top: 7px;
74
- }
75
-
76
85
  .debug {
77
86
  color: #777;
78
87
  }
@@ -138,10 +147,15 @@ tr.show-more {
138
147
 
139
148
  .message-actions {
140
149
  position: fixed;
141
- bottom: 70px;
150
+ bottom: 45px;
142
151
  right: 10px;
143
152
  }
144
153
 
154
+ .message-actions a {
155
+ z-index: 10000;
156
+ padding-right: 7px;
157
+ }
158
+
145
159
  .divider {
146
160
  position: fixed;
147
161
  bottom: 310px;
@@ -246,10 +260,10 @@ tr.show-more {
246
260
 
247
261
  .message-info .content {
248
262
  position: absolute;
249
- top: 5;
250
- bottom: 40;
251
- left: 5;
252
- right: 5;
263
+ top: 5px;
264
+ bottom: 35px;
265
+ left: 5px;
266
+ right: 5px;
253
267
  overflow: auto;
254
268
  display: none;
255
269
  }
@@ -261,7 +275,7 @@ tr.show-more {
261
275
 
262
276
  .tabs {
263
277
  position: absolute;
264
- bottom: 10;
278
+ bottom: 10px;
265
279
  left: 0;
266
280
  right: 0;
267
281
  list-style-type: none;
@@ -173,8 +173,11 @@ JS
173
173
 
174
174
  def body(preload)
175
175
  <<HTML
176
+ <!doctype html>
176
177
  <html>
177
178
  <head>
179
+ <link href='http://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>
180
+ <link href='http://fonts.googleapis.com/css?family=Roboto+Mono' rel='stylesheet' type='text/css'>
178
181
  #{css("app.css")}
179
182
  #{css("font-awesome.min.css")}
180
183
  #{script("external/moment.min.js")}
@@ -183,7 +186,6 @@ JS
183
186
  #{script("external/ember-template-compiler.js")}
184
187
  #{script("external/ember.min.js", "external/ember.js")}
185
188
  #{template("application")}
186
- #{component("time-ago")}
187
189
  #{component("message-row")}
188
190
  #{component("message-info")}
189
191
  #{component("tabbed-section")}
@@ -1,3 +1,3 @@
1
1
  module Logster
2
- VERSION = "0.8.4.2.pre"
2
+ VERSION = "0.8.4.3.pre"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logster
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.4.2.pre
4
+ version: 0.8.4.3.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - UI for viewing logs in Rack
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-12 00:00:00.000000000 Z
11
+ date: 2015-08-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -120,7 +120,6 @@ files:
120
120
  - assets/javascript/components/tab-contents.hbs
121
121
  - assets/javascript/components/tab-link.hbs
122
122
  - assets/javascript/components/tabbed-section.hbs
123
- - assets/javascript/components/time-ago.hbs
124
123
  - assets/javascript/external/ember-template-compiler.js
125
124
  - assets/javascript/external/ember.js
126
125
  - assets/javascript/external/ember.min.js
@@ -1 +0,0 @@
1
- {{unbound fromNow}}