logster 2.9.1 → 2.9.6

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
  SHA256:
3
- metadata.gz: 9032c8507086eb877d7625f3590c261b14a230a5dc7715ef137a5cbcc25a4110
4
- data.tar.gz: 728a25b56e427715672bd5071125cf5cc168e5f8e6a521445bb2179f07d29254
3
+ metadata.gz: 2f7af959f601d0015cd062cf6303134c05101c70dee6050665dd7c812b04e5fb
4
+ data.tar.gz: 3a0439891b28bb2ddca56b286d0cb5ea8dcbcc37144040fe9d83a850a32b78dd
5
5
  SHA512:
6
- metadata.gz: 87746d8b220b4980426c3b4979f4444210eefcc9ca1079e87baac4742c85fd87b78f472217487aa703fcf7f350236a9ba3cba6b4e2e49effeaf3ba764e9e23d3
7
- data.tar.gz: f7b165df51ae59826a003ec2839a61cd1516cc7e9fee908f8b73b6872ccb9add5aa491a770189ce40d5b3d9e4534fdab5056a83304448d848a30578f7fcc9084
6
+ metadata.gz: 0dee60ef65432e8f5deb7b39585a6574384189a3ead8177211b62821edb12dd7fd9eef1fd9cc3c1ca3e568115921b75c9aca9afe1e83f76c197d11a38626b8d0
7
+ data.tar.gz: f5631b96c324874ca987e5c783d474e20e4225df7b9f9988bb8922418dba9e37bb3c03c7ec224a777fdb4370963fc2dd7039a13e4c9a0aafc19fd3adebddcbf2
@@ -0,0 +1,63 @@
1
+ name: Logster Tests
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ pull_request:
8
+
9
+ jobs:
10
+ ruby:
11
+ runs-on: ubuntu-latest
12
+ name: Ruby ${{ matrix.ruby }}
13
+ strategy:
14
+ matrix:
15
+ ruby: ["2.7", "2.6", "2.5"]
16
+ redis: ["4.x"]
17
+ steps:
18
+ - uses: actions/checkout@v2
19
+ - uses: actions/setup-ruby@v1
20
+ with:
21
+ ruby-version: ${{ matrix.ruby }}
22
+ - uses: shogo82148/actions-setup-redis@v1
23
+ with:
24
+ redis-version: ${{ matrix.redis }}
25
+ - name: Bundler cache
26
+ uses: actions/cache@v2
27
+ with:
28
+ path: vendor/bundle
29
+ key: ${{ runner.os }}-${{ matrix.ruby }}-gems-${{ hashFiles('**/Gemfile.lock') }}
30
+ restore-keys: |
31
+ ${{ runner.os }}-${{ matrix.ruby }}-gems-
32
+ - name: Setup gems
33
+ run: |
34
+ gem install bundler
35
+ bundle config path vendor/bundle
36
+ bundle install --jobs 4
37
+ - name: Rubocop
38
+ run: bundle exec rubocop
39
+ - name: Tests
40
+ run: bundle exec rake test
41
+ js:
42
+ runs-on: ubuntu-latest
43
+ name: JavaScript Lint
44
+ defaults:
45
+ run:
46
+ working-directory: client-app
47
+ steps:
48
+ - uses: actions/checkout@v2
49
+ - name: Get yarn cache directory
50
+ id: yarn-cache-dir
51
+ run: echo "::set-output name=dir::$(yarn cache dir)"
52
+ - name: Yarn cache
53
+ uses: actions/cache@v2
54
+ id: yarn-cache
55
+ with:
56
+ path: ${{ steps.yarn-cache-dir.outputs.dir }}
57
+ key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
58
+ restore-keys: |
59
+ ${{ runner.os }}-yarn-
60
+ - name: Yarn install
61
+ run: yarn install
62
+ - name: ESLint
63
+ run: yarn eslint .
data/.rubocop.yml CHANGED
@@ -1,2 +1,8 @@
1
1
  inherit_gem:
2
2
  rubocop-discourse: default.yml
3
+ inherit_mode:
4
+ merge:
5
+ - Exclude
6
+ AllCops:
7
+ Exclude:
8
+ - 'client-app/**/*'
data/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # CHANGELOG
2
2
 
3
+ - 2021-02-19: 2.9.6
4
+
5
+ - UX: Make `Warn` level visible by default
6
+
7
+ - 2021-01-21: 2.9.5
8
+
9
+ - FIX: Stop encoding errors when converting Message objects to JSON (#128)
10
+ - DEV: Bump dependencies
11
+
12
+ - 2020-09-01: 2.9.4
13
+
14
+ - FEATURE: Merge messages differing only by numbers (#118)
15
+ - DEV: Bump dependencies
16
+ - UX: Turn severities below `Error` off by default and remember changes using localStorage (#125)
17
+
18
+ - 2020-08-20: 2.9.3
19
+
20
+ - FIX: fix code that causes warning from recent redis gem
21
+
22
+ - 2020-08-11: 2.9.2
23
+
24
+ - FIX: `report_js_error` incorrectly denying logs when Redis#exists returns integer
25
+
3
26
  - 2020-07-20: 2.9.1
4
27
 
5
28
  - FIX: Missing application backtrace in chained loggers.
@@ -1,5 +1,5 @@
1
1
  "use strict"
2
- define("client-app/app",["exports","client-app/resolver","ember-load-initializers","client-app/config/environment"],(function(e,t,n,r){function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1
2
+ define("client-app/app",["exports","client-app/resolver","ember-load-initializers","client-app/config/environment"],(function(e,t,n,r){function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1
3
3
  if(Reflect.construct.sham)return!1
4
4
  if("function"==typeof Proxy)return!0
5
5
  try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}()
@@ -9,38 +9,38 @@ n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments)
9
9
  return l(this,n)}}function l(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?u(e):t}function u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
10
10
  return e}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
11
11
  var p=function(e){(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function")
12
- e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)})(a,Ember.Application)
13
- var n=i(a)
12
+ e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t)})(a,Ember.Application)
13
+ var n=s(a)
14
14
  function a(){var e
15
15
  o(this,a)
16
- for(var s=arguments.length,i=new Array(s),l=0;l<s;l++)i[l]=arguments[l]
17
- return d(u(e=n.call.apply(n,[this].concat(i))),"modulePrefix",r.default.modulePrefix),d(u(e),"podModulePrefix",r.default.podModulePrefix),d(u(e),"Resolver",t.default),e}return a}()
16
+ for(var i=arguments.length,s=new Array(i),l=0;l<i;l++)s[l]=arguments[l]
17
+ return d(u(e=n.call.apply(n,[this].concat(s))),"modulePrefix",r.default.modulePrefix),d(u(e),"podModulePrefix",r.default.podModulePrefix),d(u(e),"Resolver",t.default),e}return a}()
18
18
  e.default=p,(0,n.default)(p,r.default.modulePrefix)})),define("client-app/component-managers/glimmer",["exports","@glimmer/component/-private/ember-component-manager"],(function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})})),define("client-app/components/actions-menu",["exports","client-app/lib/decorators"],(function(e,t){var n
19
19
  Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
20
- var r,a,o,s,i,l,u=Ember.Component.extend((r=n={showMenu:!1,tagName:"span",outsideClickHandler:function(e){this.element&&!this.element.contains(e.target)&&this.element!==e.target&&(this.set("showMenu",!1),this.updateMenu())},updateMenu:function(){this.showMenu?this.addOutsideClickHandler():this.removeOutsideClickHandler()},addOutsideClickHandler:function(){document.addEventListener("click",this.outsideClickHandler)},removeOutsideClickHandler:function(){document.removeEventListener("click",this.outsideClickHandler)},willDestroyElement:function(){this._super.apply(this,arguments),this.removeOutsideClickHandler()},actions:{expandMenu:function(){this.toggleProperty("showMenu"),this.updateMenu()},share:function(){this.share()}}},a="outsideClickHandler",o=[t.bound],s=Object.getOwnPropertyDescriptor(n,"outsideClickHandler"),i=n,l={},Object.keys(s).forEach((function(e){l[e]=s[e]})),l.enumerable=!!l.enumerable,l.configurable=!!l.configurable,("value"in l||l.initializer)&&(l.writable=!0),l=o.slice().reverse().reduce((function(e,t){return t(r,a,e)||e}),l),i&&void 0!==l.initializer&&(l.value=l.initializer?l.initializer.call(i):void 0,l.initializer=void 0),void 0===l.initializer&&(Object.defineProperty(r,a,l),l=null),n))
20
+ var r,a,o,i,s,l,u=Ember.Component.extend((r=n={showMenu:!1,tagName:"span",outsideClickHandler:function(e){this.element&&!this.element.contains(e.target)&&this.element!==e.target&&(this.set("showMenu",!1),this.updateMenu())},updateMenu:function(){this.showMenu?this.addOutsideClickHandler():this.removeOutsideClickHandler()},addOutsideClickHandler:function(){document.addEventListener("click",this.outsideClickHandler)},removeOutsideClickHandler:function(){document.removeEventListener("click",this.outsideClickHandler)},willDestroyElement:function(){this._super.apply(this,arguments),this.removeOutsideClickHandler()},actions:{expandMenu:function(){this.toggleProperty("showMenu"),this.updateMenu()},share:function(){this.share()}}},a="outsideClickHandler",o=[t.bound],i=Object.getOwnPropertyDescriptor(n,"outsideClickHandler"),s=n,l={},Object.keys(i).forEach((function(e){l[e]=i[e]})),l.enumerable=!!l.enumerable,l.configurable=!!l.configurable,("value"in l||l.initializer)&&(l.writable=!0),l=o.slice().reverse().reduce((function(e,t){return t(r,a,e)||e}),l),s&&void 0!==l.initializer&&(l.value=l.initializer?l.initializer.call(s):void 0,l.initializer=void 0),void 0===l.initializer&&(Object.defineProperty(r,a,l),l=null),n))
21
21
  e.default=u})),define("client-app/components/back-trace",["exports","client-app/lib/preload"],(function(e,t){function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return
22
22
  var n=[],r=!0,a=!1,o=void 0
23
- try{for(var s,i=e[Symbol.iterator]();!(r=(s=i.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(l){a=!0,o=l}finally{try{r||null==i.return||i.return()}finally{if(a)throw o}}return n}(e,t)||function(e,t){if(!e)return
23
+ try{for(var i,s=e[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(l){a=!0,o=l}finally{try{r||null==s.return||s.return()}finally{if(a)throw o}}return n}(e,t)||function(e,t){if(!e)return
24
24
  if("string"==typeof e)return r(e,t)
25
25
  var n=Object.prototype.toString.call(e).slice(8,-1)
26
26
  "Object"===n&&e.constructor&&(n=e.constructor.name)
27
27
  if("Map"===n||"Set"===n)return Array.from(e)
28
28
  if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){(null==t||t>e.length)&&(t=e.length)
29
29
  for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n]
30
- return r}function a(e,t){return!(!e||!t||t.length>e.length)&&e.substring(0,t.length)===t}function o(){return t.default.get("backtrace_links_enabled")}function s(e){return e&&"/"!==e[e.length-1]?e+"/":e}function i(e){var t=e.repo,n=e.path,r=e.filename,a=e.lineNumber,o=e.commitSha,i=void 0===o?null:o,l=s(t)
31
- return/\/tree\//.test(l)||(l+="blob/",l+=i?"".concat(i,"/"):"master/"),l+=n+r,/^[0-9]+$/.test(a)&&(l+="#L".concat(a)),l}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
30
+ return r}function a(e,t){return!(!e||!t||t.length>e.length)&&e.substring(0,t.length)===t}function o(){return t.default.get("backtrace_links_enabled")}function i(e){return e&&"/"!==e[e.length-1]?e+"/":e}function s(e){var t=e.repo,n=e.path,r=e.filename,a=e.lineNumber,o=e.commitSha,s=void 0===o?null:o,l=i(t)
31
+ return/\/tree\//.test(l)||(l+="blob/",l+=s?"".concat(s,"/"):"master/"),l+=n+r,/^[0-9]+$/.test(a)&&(l+="#L".concat(a)),l}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
32
32
  var l=Ember.Component.extend({GithubURLForGem:function(e){var r=null
33
33
  if(!o())return r
34
- var s=n(e.match(/([^/]+)\/(.+\/)(.+):(\d+):.*/)||[],5),l=s[1],u=s[2],c=s[3],d=s[4],p=t.default.get("gems_data").filter((function(e){return a(l,"".concat(e.name,"-"))})).sortBy("name.length").reverse()[0]
35
- return p&&(r=i({repo:p.url,path:u,filename:c,lineNumber:d})),r},GithubURLForApp:function(e){var r=null
34
+ var i=n(e.match(/([^/]+)\/(.+\/)(.+):(\d+):.*/)||[],5),l=i[1],u=i[2],c=i[3],d=i[4],p=t.default.get("gems_data").filter((function(e){return a(l,"".concat(e.name,"-"))})).sortBy("name.length").reverse()[0]
35
+ return p&&(r=s({repo:p.url,path:u,filename:c,lineNumber:d})),r},GithubURLForApp:function(e){var r=null
36
36
  if(!o())return r
37
37
  var l=t.default.get("directories").filter((function(t){return a(e,t.path)})).sortBy("path.length").reverse()[0]
38
- if(l){var u,c,d,p=s(l.path),f=e.substring(p.length),m="",h=-1!==f.indexOf("/"),v=h?/(.+\/)(.+):(\d+)(:.*)/:/(.+):(\d+)(:.*)/
38
+ if(l){var u,c,d,p=i(l.path),f=e.substring(p.length),m="",h=-1!==f.indexOf("/"),v=h?/(.+\/)(.+):(\d+)(:.*)/:/(.+):(\d+)(:.*)/
39
39
  if(h){var b=n(f.match(v)||[],5)
40
40
  m=b[1],u=b[2],c=b[3],d=b[4]}else{var g=n(f.match(v)||[],4)
41
41
  u=g[1],c=g[2],d=g[3]}if(u&&c&&d){var y=l.main_app?this.commitSha:null
42
- r=i({repo:l.url,path:m,filename:u,lineNumber:c,commitSha:y})}}return r},findGithubURL:function(e,n){var r=t.default.get("directories")||[],o=a(e,t.default.get("gems_dir")),s=r.some((function(t){return a(e,t.path)}))
43
- return o||!s?this.GithubURLForGem(n):this.GithubURLForApp(e)},commitSha:Ember.computed("env",(function(){var e=null
42
+ r=s({repo:l.url,path:m,filename:u,lineNumber:c,commitSha:y})}}return r},findGithubURL:function(e,n){var r=t.default.get("directories")||[],o=a(e,t.default.get("gems_dir")),i=r.some((function(t){return a(e,t.path)}))
43
+ return o||!i?this.GithubURLForGem(n):this.GithubURLForApp(e)},commitSha:Ember.computed("env",(function(){var e=null
44
44
  return Array.isArray(this.env)?e=this.env.map((function(e){return e.application_version})).filter((function(e){return e}))[0]:this.env&&(e=this.env.application_version),e||t.default.get("application_version")})),lines:Ember.computed("backtrace","commitSha",(function(){var e=this
45
45
  return this.backtrace&&0!==this.backtrace.length?this.backtrace.split("\n").map((function(n){var r=function(e){if(a(e,t.default.get("gems_dir"))){var n=t.default.get("gems_dir")
46
46
  return e.substring(n.length)}return e}(n)
@@ -70,16 +70,16 @@ this.navigate(t)}}})
70
70
  e.default=t})),define("client-app/components/panel-resizer",["exports","client-app/lib/decorators"],(function(e,t){var n
71
71
  function r(e,t,n,r,a){var o={}
72
72
  return Object.keys(r).forEach((function(e){o[e]=r[e]})),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce((function(n,r){return r(e,t,n)||n}),o),a&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(a):void 0,o.initializer=void 0),void 0===o.initializer&&(Object.defineProperty(e,t,o),o=null),o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
73
- var a=["touchmove","mousemove"],o=["touchend","mouseup"],s=["touchstart","mousedown"],i=Ember.Component.extend((r(n={resizing:!1,classNames:["divider"],divideView:function(e){var t=window.innerHeight,n=t-e
73
+ var a=["touchmove","mousemove"],o=["touchend","mouseup"],i=["touchstart","mousedown"],s=Ember.Component.extend((r(n={resizing:!1,classNames:["divider"],divideView:function(e){var t=window.innerHeight,n=t-e
74
74
  e<100||e+170>t||(this.divider.style.bottom="".concat(n-5,"px"),this.events.trigger("panelResized",n))},performDrag:function(e){Ember.run.throttle(this,this.throttledPerformDrag,e,25)},throttledPerformDrag:function(e){this.resizing&&this.divideView(e.clientY||e.touches&&e.touches[0]&&e.touches[0].clientY)},endDrag:function(){var e=this,t=document.getElementById("overlay")
75
75
  t&&t.parentElement.removeChild(t),this.set("resizing",!1),localStorage&&(localStorage.logster_divider_bottom=parseInt(this.divider.style.bottom,10)),a.forEach((function(t){return document.removeEventListener(t,e.performDrag)})),o.forEach((function(t){return document.removeEventListener(t,e.endDrag)}))},dividerClickHandler:function(e){var t=this
76
76
  e.preventDefault()
77
77
  var n=document.createElement("DIV")
78
78
  n.id="overlay",document.body.appendChild(n),this.set("resizing",!0),a.forEach((function(e){return document.addEventListener(e,t.performDrag)})),o.forEach((function(e){return document.addEventListener(e,t.endDrag)}))},didInsertElement:function(){var e=this
79
- this.set("divider",document.querySelector(".divider")),s.forEach((function(t){e.divider.addEventListener(t,e.dividerClickHandler)})),Ember.run.scheduleOnce("afterRender",this,"initialDivideView")},initialDivideView:function(){var e=localStorage&&localStorage.logster_divider_bottom||300,t=window.innerHeight-parseInt(e,10)
79
+ this.set("divider",document.querySelector(".divider")),i.forEach((function(t){e.divider.addEventListener(t,e.dividerClickHandler)})),Ember.run.scheduleOnce("afterRender",this,"initialDivideView")},initialDivideView:function(){var e=localStorage&&localStorage.logster_divider_bottom||300,t=window.innerHeight-parseInt(e,10)
80
80
  this.divideView(t)},willDestroyElement:function(){var e=this
81
- s.forEach((function(t){return e.divider.removeEventListener(t,e.dividerClickHandler)}))}},"performDrag",[t.bound],Object.getOwnPropertyDescriptor(n,"performDrag"),n),r(n,"endDrag",[t.bound],Object.getOwnPropertyDescriptor(n,"endDrag"),n),r(n,"dividerClickHandler",[t.bound],Object.getOwnPropertyDescriptor(n,"dividerClickHandler"),n),n))
82
- e.default=i})),define("client-app/components/patterns-list",["exports","client-app/models/pattern-item","client-app/lib/utilities"],(function(e,t,n){function r(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return
81
+ i.forEach((function(t){return e.divider.removeEventListener(t,e.dividerClickHandler)}))}},"performDrag",[t.bound],Object.getOwnPropertyDescriptor(n,"performDrag"),n),r(n,"endDrag",[t.bound],Object.getOwnPropertyDescriptor(n,"endDrag"),n),r(n,"dividerClickHandler",[t.bound],Object.getOwnPropertyDescriptor(n,"dividerClickHandler"),n),n))
82
+ e.default=s})),define("client-app/components/patterns-list",["exports","client-app/models/pattern-item","client-app/lib/utilities"],(function(e,t,n){function r(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return
83
83
  if("string"==typeof e)return a(e,t)
84
84
  var n=Object.prototype.toString.call(e).slice(8,-1)
85
85
  "Object"===n&&e.constructor&&(n=e.constructor.name)
@@ -107,20 +107,19 @@ var n=Ember.Component.extend({didInsertElement:function(){Ember.run.later(this,t
107
107
  if(n){var r=(0,t.formatTime)(n)
108
108
  r!==e.innerText&&(e.innerText=r)}})),Ember.run.later(this,this.updateTimes,6e4)}})
109
109
  e.default=n})),define("client-app/controllers/index",["exports","client-app/lib/utilities","client-app/lib/preload"],(function(e,t,n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
110
- var r=Ember.Controller.extend({showDebug:!0,showInfo:!0,showWarn:!0,showErr:!0,showFatal:!0,search:"",queryParams:["search"],showSettings:Ember.computed((function(){return n.default.get("patterns_enabled")})),resizePanels:function(e){var t=document.getElementById("bottom-panel"),n=document.getElementById("top-panel")
110
+ var r=Ember.Controller.extend({showDebug:(0,t.getLocalStorage)("showDebug",!1),showInfo:(0,t.getLocalStorage)("showInfo",!1),showWarn:(0,t.getLocalStorage)("showWarn",!0),showErr:(0,t.getLocalStorage)("showErr",!0),showFatal:(0,t.getLocalStorage)("showFatal",!0),search:"",queryParams:["search"],showSettings:Ember.computed((function(){return n.default.get("patterns_enabled")})),resizePanels:function(e){var t=document.getElementById("bottom-panel"),n=document.getElementById("top-panel")
111
111
  t.style.height="".concat(e-13,"px"),n.style.bottom="".concat(e+12,"px")},actionsInMenu:Ember.computed((function(){return this.site.isMobile})),actions:{expandMessage:function(e){e.expand()},selectRowAction:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}
112
112
  this.model.selectRow(e,t)},tabChangedAction:function(e){this.model.tabChanged(e)},showMoreBefore:function(){this.model.showMoreBefore()},loadMore:function(){return this.model.loadMore()},clear:function(){var e=this
113
113
  confirm("Clear the logs?\n\nCancel = No, OK = Clear")&&(0,t.ajax)("/clear",{type:"POST"}).then((function(){e.model.reload()}))},removeMessage:function(e){var t=this.model.currentRow.group?this.model.currentRow:null,n=this.model.rows,r=t?n.indexOf(t):n.indexOf(e)
114
114
  e.destroy(),e.set("selected",!1),this.model.set("total",this.model.total-1)
115
115
  var a=!1,o=0
116
- t?(o=t.messages.indexOf(e),t.messages.removeObject(e),o=Math.min(o,t.messages.length-1),0===t.messages.length&&(n.removeObject(t),a=!0)):(n.removeObject(e),a=!0),a?r>0?this.model.selectRow(n[r-1]):this.model.total>0?this.model.selectRow(n[0]):this.model.reload():t&&this.model.selectRow(n[r],{messageIndex:o})},solveMessage:function(e){this.model.solve(e)},groupedMessageChangedAction:function(e){this.model.groupedMessageChanged(e)},envChangedAction:function(e){this.model.envChanged(e)},updateFilter:function(e){var t=this
117
- this.toggleProperty(e)
118
- var n=[];["Debug","Info","Warn","Err","Fatal"].forEach((function(e,r){t.get("show".concat(e))&&n.push(r)})),n.push(5),this.model.set("filter",n),this.model.reload().then((function(){return t.model.updateSelectedRow()}))},updateSearch:function(e){e!==this.search&&(e&&1===e.length||Ember.run.debounce(this,this.doSearch,e,250))}},doSearch:function(e){var t=this
116
+ t?(o=t.messages.indexOf(e),t.messages.removeObject(e),o=Math.min(o,t.messages.length-1),0===t.messages.length&&(n.removeObject(t),a=!0)):(n.removeObject(e),a=!0),a?r>0?this.model.selectRow(n[r-1]):this.model.total>0?this.model.selectRow(n[0]):this.model.reload():t&&this.model.selectRow(n[r],{messageIndex:o})},solveMessage:function(e){this.model.solve(e)},groupedMessageChangedAction:function(e){this.model.groupedMessageChanged(e)},envChangedAction:function(e){this.model.envChanged(e)},updateFilter:function(e){var n=this
117
+ this.toggleProperty(e),this.model.set(e,this[e]),(0,t.setLocalStorage)(e,this[e]),this.model.reload().then((function(){return n.model.updateSelectedRow()}))},updateSearch:function(e){e!==this.search&&(e&&1===e.length||Ember.run.debounce(this,this.doSearch,e,250))}},doSearch:function(e){var t=this
119
118
  this.model.set("search",e),this.model.reload().then((function(){return t.model.updateSelectedRow()}))}})
120
119
  e.default=r})),define("client-app/controllers/show",["exports"],(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
121
120
  var t=Ember.Controller.extend({envPosition:0,actions:{protect:function(){this.get("model").protect()},unprotect:function(){this.get("model").unprotect()},envChanged:function(e){this.set("envPosition",e)}}})
122
- e.default=t})),define("client-app/helpers/app-version",["exports","client-app/config/environment","ember-cli-app-version/utils/regexp"],(function(e,t,n){function r(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=t.default.APP.version,o=r.versionOnly||r.hideSha,s=r.shaOnly||r.hideVersion,i=null
123
- return o&&(r.showExtended&&(i=a.match(n.versionExtendedRegExp)),i||(i=a.match(n.versionRegExp))),s&&(i=a.match(n.shaRegExp)),i?i[0]:a}Object.defineProperty(e,"__esModule",{value:!0}),e.appVersion=r,e.default=void 0
121
+ e.default=t})),define("client-app/helpers/app-version",["exports","client-app/config/environment","ember-cli-app-version/utils/regexp"],(function(e,t,n){function r(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=t.default.APP.version,o=r.versionOnly||r.hideSha,i=r.shaOnly||r.hideVersion,s=null
122
+ return o&&(r.showExtended&&(s=a.match(n.versionExtendedRegExp)),s||(s=a.match(n.versionRegExp))),i&&(s=a.match(n.shaRegExp)),s?s[0]:a}Object.defineProperty(e,"__esModule",{value:!0}),e.appVersion=r,e.default=void 0
124
123
  var a=Ember.Helper.helper(r)
125
124
  e.default=a})),define("client-app/helpers/logster-url",["exports","client-app/lib/preload"],(function(e,t){function n(e){var n=e[0]
126
125
  return"/"!==n[0]&&(n="/".concat(n)),(0,t.getRootPath)()+n}Object.defineProperty(e,"__esModule",{value:!0}),e.logsterUrl=n,e.default=void 0
@@ -129,10 +128,10 @@ e.default=r})),define("client-app/helpers/or",["exports"],(function(e){function
129
128
  var n=Ember.Helper.helper(t)
130
129
  e.default=n})),define("client-app/initializers/app-init",["exports","client-app/lib/utilities","client-app/lib/preload"],(function(e,t,n){Object.defineProperty(e,"__esModule",{value:!0}),e.initialize=a,e.default=void 0
131
130
  var r=["component","route"]
132
- function a(e){var a,o,s=e.resolveRegistration("config:environment");(0,n.setRootPath)(s.rootURL.replace(/\/$/,"")),"development"===s.environment&&(e.deferReadiness(),(0,t.ajax)("/development-preload.json").then((function(e){document.getElementById("preloaded-data").setAttribute("data-preloaded",JSON.stringify(e))})).catch((function(e){return console.error("Fetching preload data failed.",e)})).finally((function(){return e.advanceReadiness()}))),moment.updateLocale("en",{relativeTime:{future:"in %s",past:"%s ago",s:"secs",m:"a min",mm:"%d mins",h:"an hr",hh:"%d hrs",d:"a day",dd:"%d days",M:"a mth",MM:"%d mths",y:"a yr",yy:"%d yrs"}}),["","webkit","ms","moz","ms"].forEach((function(e){var t=e+(""===e?"hidden":"Hidden")
131
+ function a(e){var a,o,i=e.resolveRegistration("config:environment");(0,n.setRootPath)(i.rootURL.replace(/\/$/,"")),"development"===i.environment&&(e.deferReadiness(),(0,t.ajax)("/development-preload.json").then((function(e){document.getElementById("preloaded-data").setAttribute("data-preloaded",JSON.stringify(e))})).catch((function(e){return console.error("Fetching preload data failed.",e)})).finally((function(){return e.advanceReadiness()}))),moment.updateLocale("en",{relativeTime:{future:"in %s",past:"%s ago",s:"secs",m:"a min",mm:"%d mins",h:"an hr",hh:"%d hrs",d:"a day",dd:"%d days",M:"a mth",MM:"%d mths",y:"a yr",yy:"%d yrs"}}),["","webkit","ms","moz","ms"].forEach((function(e){var t=e+(""===e?"hidden":"Hidden")
133
132
  void 0===document[t]||a||(a=t,o=e+"visibilitychange")})),(0,t.updateHiddenProperty)(a),document.addEventListener(o,(function(){(0,t.resetTitleCount)()}),!1),e.register("events:main",Ember.Object.extend(Ember.Evented).create(),{instantiate:!1}),r.forEach((function(t){return e.inject(t,"events","events:main")}))
134
- var i=/mobile/i.test(navigator.userAgent)&&!/iPad/.test(navigator.userAgent)
135
- i&&document.body.classList.add("mobile"),e.register("site:main",{isMobile:i},{instantiate:!1}),e.inject("controller","site","site:main")}var o={initialize:a}
133
+ var s=/mobile/i.test(navigator.userAgent)&&!/iPad/.test(navigator.userAgent)
134
+ s&&document.body.classList.add("mobile"),e.register("site:main",{isMobile:s},{instantiate:!1}),e.inject("controller","site","site:main")}var o={initialize:a}
136
135
  e.default=o})),define("client-app/initializers/app-version",["exports","ember-cli-app-version/initializer-factory","client-app/config/environment"],(function(e,t,n){var r,a
137
136
  Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n.default.APP&&(r=n.default.APP.name,a=n.default.APP.version)
138
137
  var o={name:"App Version",initialize:(0,t.default)(r,a)}
@@ -152,35 +151,44 @@ return{get:function(){return this[a]?this[a]:(this.set(a,r.bind(this)),this[a])}
152
151
  Em.set(n,e,t)},e.uninitialize=function(){r=!1},e.default=void 0
153
152
  var t,n={},r=!1
154
153
  function a(){var e=document.getElementById("preloaded-data").dataset;(n=JSON.parse(e.preloaded)).rootPath=t,r=!0}var o={get:function(e){return r||a(),Em.get(n,e)}}
155
- e.default=o})),define("client-app/lib/utilities",["exports","client-app/lib/preload"],(function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(e,"__esModule",{value:!0}),e.escapeHtml=i,e.ajax=l,e.preloadOrAjax=function(e,n){var r=t.default.get(e.replace(".json",""))
154
+ e.default=o})),define("client-app/lib/utilities",["exports","client-app/lib/preload"],(function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(e,"__esModule",{value:!0}),e.escapeHtml=s,e.ajax=l,e.preloadOrAjax=function(e,n){var r=t.default.get(e.replace(".json",""))
156
155
  return r?Ember.RSVP.resolve(r):l(e,n)},e.updateHiddenProperty=function(e){r=e},e.isHidden=u,e.increaseTitleCount=function(e){if(!u())return
157
156
  a=a||document.title,o=o||0,o+=e,document.title="".concat(a," (").concat(o,")")},e.resetTitleCount=function(){o=0,document.title=a||document.title},e.formatTime=c,e.buildArrayString=d,e.buildHashString=function e(r,a){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[]
158
157
  if(!r)return""
159
- var s=[],l=[],u=t.default.get("env_expandable_keys")||[]
158
+ var i=[],l=[],u=t.default.get("env_expandable_keys")||[]
160
159
  Object.keys(r).forEach((function(e){var t=r[e]
161
- if(null===t)s.push("null")
160
+ if(null===t)i.push("null")
162
161
  else if("[object Array]"===Object.prototype.toString.call(t)){var p=""
163
- p=-1!==u.indexOf(e)&&!a&&-1===o.indexOf(e)&&t.length>3?"".concat(i(t[0]),', <a class="expand-list" data-key=').concat(e,">").concat(t.length-1," more</a>"):"".concat(i(t[0]),", ").concat(d(t.slice(1,t.length))),s.push("<tr><td>".concat(i(e),"</td><td>").concat(p,"</td></tr>"))}else if("object"===n(t))l.push(e)
162
+ p=-1!==u.indexOf(e)&&!a&&-1===o.indexOf(e)&&t.length>3?"".concat(s(t[0]),', <a class="expand-list" data-key=').concat(e,">").concat(t.length-1," more</a>"):"".concat(s(t[0]),", ").concat(d(t.slice(1,t.length))),i.push("<tr><td>".concat(s(e),"</td><td>").concat(p,"</td></tr>"))}else if("object"===n(t))l.push(e)
164
163
  else if("time"===e&&"number"==typeof t){var f=moment(t).format(),m=c(t)
165
- s.push('<tr title="'.concat(f,'"><td>').concat(e,"</td><td>").concat(m,"</td></tr>"))}else s.push("<tr><td>".concat(i(e),"</td><td>").concat(i(t),"</td></tr>"))})),l.length>0&&l.forEach((function(t){var n=r[t]
166
- s.push("<tr><td></td><td><table>"),s.push("<td>".concat(i(t),"</td><td>").concat(e(n,!0),"</td>")),s.push("</table></td></tr>")}))
164
+ i.push('<tr title="'.concat(f,'"><td>').concat(e,"</td><td>").concat(m,"</td></tr>"))}else i.push("<tr><td>".concat(s(e),"</td><td>").concat(s(t),"</td></tr>"))})),l.length>0&&l.forEach((function(t){var n=r[t]
165
+ i.push("<tr><td></td><td><table>"),i.push("<td>".concat(s(t),"</td><td>").concat(e(n,!0),"</td>")),i.push("</table></td></tr>")}))
167
166
  var p=a?"":"env-table"
168
- return"<table class='".concat(p,"'>").concat(s.join("\n"),"</table>")},e.clone=function(e){var t={}
169
- return Object.keys(e).forEach((function(n){t[n]=e[n]})),t}
170
- var r,a,o,s={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"}
171
- function i(e){return String(e).replace(/[&<>"'/]/g,(function(e){return s[e]}))}function l(e,n){return new Ember.RSVP.Promise((function(r,a){n=n||{}
167
+ return"<table class='".concat(p,"'>").concat(i.join("\n"),"</table>")},e.clone=function(e){var t={}
168
+ return Object.keys(e).forEach((function(n){t[n]=e[n]})),t},e.setLocalStorage=function(e,t){try{window.localStorage&&(e="logster-"+e,window.localStorage.setItem(e,t))}catch(n){}},e.getLocalStorage=function(e,t){try{if(window.localStorage){e="logster-"+e
169
+ var n=window.localStorage.getItem(e)
170
+ return null===n?t:"true"===n||"false"!==n&&n}return t}catch(r){return t}}
171
+ var r,a,o,i={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"}
172
+ function s(e){return String(e).replace(/[&<>"'/]/g,(function(e){return i[e]}))}function l(e,n){return new Ember.RSVP.Promise((function(r,a){n=n||{}
172
173
  var o=new XMLHttpRequest
173
- if(e=(0,t.getRootPath)()+e,n.data)for(var s in n.data){var i=-1===e.indexOf("?")?"?":"&"
174
- e+=i,e+="".concat(s,"=").concat(encodeURIComponent(n.data[s]))}if(o.open(n.method||n.type||"GET",e),o.setRequestHeader("X-SILENCE-LOGGER",!0),n.headers)for(var l in n.headers)o.setRequestHeader(l,n.headers[l])
174
+ if(e=(0,t.getRootPath)()+e,n.data)for(var i in n.data){var s=-1===e.indexOf("?")?"?":"&"
175
+ e+=s,e+="".concat(i,"=").concat(encodeURIComponent(n.data[i]))}if(o.open(n.method||n.type||"GET",e),o.setRequestHeader("X-SILENCE-LOGGER",!0),n.headers)for(var l in n.headers)o.setRequestHeader(l,n.headers[l])
175
176
  o.onreadystatechange=function(){if(4===o.readyState){var e=o.status
176
177
  if(e>=200&&e<300||304===e){var t=o.getResponseHeader("Content-Type"),n=o.responseText;/\bjson\b/.test(t)&&(n=JSON.parse(n)),r(n)}else a(o)}},o.send()}))}function u(){return void 0!==r?document[r]:!document.hasFocus}function c(e){var t=moment(e),n=moment()
177
178
  return t.diff(n.startOf("day"))>0?t.format("h:mm a"):t.diff(n.startOf("week"))>0?t.format("dd h:mm a"):t.diff(n.startOf("year"))>0?t.format("D MMM h:mm a"):t.format("D MMM YY")}function d(e){var t=[]
178
- return e.forEach((function(e){null===e?t.push("null"):"[object Array]"===Object.prototype.toString.call(e)?t.push(d(e)):t.push(i(e.toString()))})),"["+t.join(", ")+"]"}})),define("client-app/models/group",["exports","client-app/models/message","client-app/lib/utilities"],(function(e,t,n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
179
+ return e.forEach((function(e){null===e?t.push("null"):"[object Array]"===Object.prototype.toString.call(e)?t.push(d(e)):t.push(s(e.toString()))})),"["+t.join(", ")+"]"}})),define("client-app/models/group",["exports","client-app/models/message","client-app/lib/utilities"],(function(e,t,n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
179
180
  var r=Ember.Object.extend({selected:!1,showCount:!0,key:Ember.computed.reads("regex"),displayMessage:Ember.computed.reads("messages.firstObject.message"),init:function(){this._super.apply(this,arguments)
180
181
  var e=this.messages.map((function(e){return t.default.create(e)}))
181
182
  this.set("messages",e)},glyph:Ember.computed((function(){return"clone"})),prefix:Ember.computed((function(){return"far"})),solveAll:function(){return(0,n.ajax)("/solve-group",{type:"POST",data:{regex:this.regex}})}})
182
- e.default=r})),define("client-app/models/message-collection",["exports","client-app/lib/utilities","client-app/models/message","client-app/models/group"],(function(e,t,n,r){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
183
- var a=[0,1,2,3,4,5],o=Ember.Object.extend({total:0,rows:null,currentRow:null,currentTab:null,currentEnvPosition:0,currentGroupedMessagesPosition:0,init:function(){this._super.apply(this,arguments),this.setProperties({filter:a,search:"",rows:Ember.A()})},currentMessage:Ember.computed("currentRow","currentGroupedMessagesPosition",(function(){var e=this.currentRow,t=this.currentGroupedMessagesPosition
183
+ e.default=r})),define("client-app/models/message-collection",["exports","client-app/lib/utilities","client-app/models/message","client-app/models/group"],(function(e,t,n,r){function a(e,t){(null==t||t>e.length)&&(t=e.length)
184
+ for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n]
185
+ return r}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.SEVERITIES=void 0
186
+ var o=["Debug","Info","Warn","Err","Fatal"]
187
+ e.SEVERITIES=o
188
+ var i,s=Ember.Object.extend({total:0,rows:null,currentRow:null,currentTab:null,currentEnvPosition:0,currentGroupedMessagesPosition:0,filter:Ember.computed.apply(void 0,(i=o.map((function(e){return"show".concat(e)})),function(e){if(Array.isArray(e))return a(e)}(i)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(i)||function(e,t){if(e){if("string"==typeof e)return a(e,t)
189
+ var n=Object.prototype.toString.call(e).slice(8,-1)
190
+ return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}(i)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([function(){var e=this,t=[]
191
+ return o.forEach((function(n,r){e["show".concat(n)]&&t.push(r)})),t.push(5),t}])),init:function(){this._super.apply(this,arguments),this.setProperties({search:"",rows:Ember.A()})},currentMessage:Ember.computed("currentRow","currentGroupedMessagesPosition",(function(){var e=this.currentRow,t=this.currentGroupedMessagesPosition
184
192
  return e&&e.group?e.messages[t]:e})),solve:function(e){var t=this
185
193
  e.solve().then((function(){t.reload()}))},selectRow:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.currentRow
186
194
  n&&n.set("selected",!1),e.set("selected",!0)
@@ -208,7 +216,7 @@ return this.search&&this.search.length>0||e&&e.length<6})),moreBefore:Ember.comp
208
216
  this.load({before:r,knownGroups:a}).then((function(t){return e.updateCanLoadMore(t)}))},regexSearch:Ember.computed("search",(function(){var e=this.search
209
217
  if(e&&e.length>2&&"/"===e[0]){var t=e.match(/\/(.*)\/(.*)/)
210
218
  if(t&&3===t.length)try{return new RegExp(t[1],t[2])}catch(n){}}return null})),toObjects:function(e){return e.map((function(e){return e.group?r.default.create(e):n.default.create(e)}))}})
211
- e.default=o})),define("client-app/models/message",["exports","client-app/lib/utilities","client-app/lib/preload"],(function(e,t,n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
219
+ e.default=s})),define("client-app/models/message",["exports","client-app/lib/utilities","client-app/lib/preload"],(function(e,t,n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
212
220
  var r=Em.Object.extend({MAX_LEN:200,fetchEnv:function(){var e=this
213
221
  return(0,t.ajax)("/fetch-env/".concat(this.key,".json")).then((function(t){return e.set("env",t)}))},expand:function(){this.set("expanded",!0)},solve:function(){return(0,t.ajax)("/solve/".concat(this.key),{type:"PUT"})},destroy:function(){return(0,t.ajax)("/message/".concat(this.key),{type:"DELETE"})},protect:function(){return this.set("protected",!0),(0,t.ajax)("/protect/".concat(this.key),{type:"PUT"})},unprotect:function(){return this.set("protected",!1),(0,t.ajax)("/unprotect/".concat(this.key),{type:"DELETE"})},showCount:Ember.computed("count",(function(){return this.count>1})),hasMore:Ember.computed("message","expanded",(function(){return!this.expanded&&this.message.length>this.MAX_LEN})),shareUrl:Ember.computed("key",(function(){return"".concat((0,n.getRootPath)(),"/show/").concat(this.key)})),displayMessage:Ember.computed("message","expanded",(function(){var e=this.message
214
222
  return!this.expanded&&this.message.length>this.MAX_LEN&&(e=this.message.substr(0,this.MAX_LEN)),e})),updateFromObject:function(e){this.set("count",e.get("count"))},canSolve:Ember.computed("env.{application_version,length}",(function(){return(Array.isArray(this.env)?this.env.map((function(e){return e.application_version})).compact().join(""):this.env&&this.env.application_version)&&this.backtrace&&this.backtrace.length>0})),rowClass:Ember.computed("severity",(function(){switch(this.get("severity")){case 0:return"debug"
@@ -236,25 +244,25 @@ try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){})
236
244
  return function(){var n,r=l(e)
237
245
  if(t){var a=l(this).constructor
238
246
  n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments)
239
- return s(this,n)}}function s(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?i(e):t}function i(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
247
+ return i(this,n)}}function i(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?s(e):t}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
240
248
  return e}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
241
249
  var c=function(e){(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function")
242
- e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)})(s,Ember.Router)
243
- var n=o(s)
244
- function s(){var e
245
- r(this,s)
250
+ e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)})(i,Ember.Router)
251
+ var n=o(i)
252
+ function i(){var e
253
+ r(this,i)
246
254
  for(var a=arguments.length,o=new Array(a),l=0;l<a;l++)o[l]=arguments[l]
247
- return u(i(e=n.call.apply(n,[this].concat(o))),"location",t.default.locationType),u(i(e),"rootURL",t.default.rootURL),e}return s}()
255
+ return u(s(e=n.call.apply(n,[this].concat(o))),"location",t.default.locationType),u(s(e),"rootURL",t.default.rootURL),e}return i}()
248
256
  e.default=c,c.map((function(){this.route("index",{path:"/"}),this.route("show",{path:"/show/:id"}),this.route("settings")}))})),define("client-app/routes/index",["exports","client-app/models/message-collection","client-app/lib/utilities"],(function(e,t,n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
249
- var r=Ember.Route.extend({model:function(){return t.default.create()},setupController:function(e,t){this._super(e,t),t.reload()
250
- var r=0,a=1
251
- this.refreshInterval=setInterval((function(){if(!t.loading){r+=1
252
- var e=(0,n.isHidden)(),o=!e
253
- e&&r%a==0&&(o=!0,a<20&&a++),o&&(t.loadMore(),e||(a=1))}}),3e3),this.events.on("panelResized",(function(t){e.resizePanels(t)}))},deactivate:function(){clearInterval(this.refreshInterval)}})
257
+ var r=Ember.Route.extend({model:function(){return t.default.create()},setupController:function(e,r){this._super(e,r),t.SEVERITIES.forEach((function(t){return r.set("show".concat(t),e["show".concat(t)])})),r.reload()
258
+ var a=0,o=1
259
+ this.refreshInterval=setInterval((function(){if(!r.loading){a+=1
260
+ var e=(0,n.isHidden)(),t=!e
261
+ e&&a%o==0&&(t=!0,o<20&&o++),t&&(r.loadMore(),e||(o=1))}}),3e3),this.events.on("panelResized",(function(t){e.resizePanels(t)}))},deactivate:function(){clearInterval(this.refreshInterval)}})
254
262
  e.default=r})),define("client-app/routes/settings",["exports","client-app/lib/utilities","client-app/models/pattern-item"],(function(e,t,n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
255
263
  var r=Ember.Route.extend({model:function(){return(0,t.ajax)("/settings.json")},setupController:function(e,t){this._super.apply(this,arguments)
256
- var r=t.suppression,a=r.filter((function(e){return e.hard})).map((function(e){return n.default.create(e)})),o=r.reject((function(e){return e.hard})).map((function(e){return n.default.create(e)})),s=t.grouping.map((function(e){return n.default.create(e)})),i=a.length>0
257
- e.setProperties({showCodedSuppression:i,codedSuppression:a,customSuppression:o,grouping:s})}})
264
+ var r=t.suppression,a=r.filter((function(e){return e.hard})).map((function(e){return n.default.create(e)})),o=r.reject((function(e){return e.hard})).map((function(e){return n.default.create(e)})),i=t.grouping.map((function(e){return n.default.create(e)})),s=a.length>0
265
+ e.setProperties({showCodedSuppression:s,codedSuppression:a,customSuppression:o,grouping:i})}})
258
266
  e.default=r})),define("client-app/routes/show",["exports","client-app/models/message","client-app/lib/utilities"],(function(e,t,n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
259
267
  var r=Ember.Route.extend({model:function(e){return(0,n.preloadOrAjax)("/show/"+e.id+".json")},setupController:function(e,n){this._super.apply(this,arguments),e.set("model",t.default.create(n))}})
260
268
  e.default=r})),define("client-app/templates/application",["exports"],(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
@@ -286,4 +294,4 @@ var t=Ember.HTMLBars.template({id:"QRu+EVou",block:'{"symbols":[],"statements":[
286
294
  e.default=t})),define("client-app/templates/show",["exports"],(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
287
295
  var t=Ember.HTMLBars.template({id:"Xt+M1cRV",block:'{"symbols":[],"statements":[[4,"link-to",null,[["route"],["index"]],{"statements":[[0,"Recent"]],"parameters":[]},null],[0,"\\n"],[7,"div",true],[10,"id","bottom-panel"],[10,"class","full"],[8],[0,"\\n "],[1,[28,"message-info",null,[["currentMessage","showTitle","envChangedAction","currentEnvPosition","actionsInMenu"],[[24,["model"]],"true",[28,"action",[[23,0,[]],"envChanged"],null],[24,["envPosition"]],false]]],false],[0,"\\n"],[9],[0,"\\n"]],"hasEval":false}',meta:{moduleName:"client-app/templates/show.hbs"}})
288
296
  e.default=t})),define("client-app/config/environment",[],(function(){try{var e="client-app/config/environment",t=document.querySelector('meta[name="'+e+'"]').getAttribute("content"),n={default:JSON.parse(decodeURIComponent(t))}
289
- return Object.defineProperty(n,"__esModule",{value:!0}),n}catch(r){throw new Error('Could not read config from meta tag with name "'+e+'".')}})),runningTests||require("client-app/app").default.create({name:"client-app",version:"0.0.0+63634ced"})
297
+ return Object.defineProperty(n,"__esModule",{value:!0}),n}catch(r){throw new Error('Could not read config from meta tag with name "'+e+'".')}})),runningTests||require("client-app/app").default.create({name:"client-app",version:"v2.9.5+847cfaf3"})
@@ -1,15 +1,19 @@
1
1
  import Controller from "@ember/controller";
2
- import { ajax } from "client-app/lib/utilities";
2
+ import {
3
+ ajax,
4
+ getLocalStorage,
5
+ setLocalStorage
6
+ } from "client-app/lib/utilities";
3
7
  import { computed } from "@ember/object";
4
8
  import Preload from "client-app/lib/preload";
5
9
  import { debounce } from "@ember/runloop";
6
10
 
7
11
  export default Controller.extend({
8
- showDebug: true,
9
- showInfo: true,
10
- showWarn: true,
11
- showErr: true,
12
- showFatal: true,
12
+ showDebug: getLocalStorage("showDebug", false),
13
+ showInfo: getLocalStorage("showInfo", false),
14
+ showWarn: getLocalStorage("showWarn", true),
15
+ showErr: getLocalStorage("showErr", true),
16
+ showFatal: getLocalStorage("showFatal", true),
13
17
  search: "",
14
18
  queryParams: ["search"],
15
19
 
@@ -108,14 +112,8 @@ export default Controller.extend({
108
112
 
109
113
  updateFilter(name) {
110
114
  this.toggleProperty(name);
111
- const filter = [];
112
- ["Debug", "Info", "Warn", "Err", "Fatal"].forEach((severity, index) => {
113
- if (this.get(`show${severity}`)) {
114
- filter.push(index);
115
- }
116
- });
117
- filter.push(5); // always show unknown, rare
118
- this.model.set("filter", filter);
115
+ this.model.set(name, this[name]);
116
+ setLocalStorage(name, this[name]);
119
117
  this.model.reload().then(() => this.model.updateSelectedRow());
120
118
  },
121
119
 
@@ -193,3 +193,37 @@ export function clone(object) {
193
193
  });
194
194
  return copy;
195
195
  }
196
+
197
+ export function setLocalStorage(key, value) {
198
+ try {
199
+ if (window.localStorage) {
200
+ key = "logster-" + key;
201
+ window.localStorage.setItem(key, value);
202
+ }
203
+ } catch { /* do nothing */ }
204
+ }
205
+
206
+ export function getLocalStorage(key, fallback) {
207
+ try {
208
+ if (window.localStorage) {
209
+ key = "logster-" + key;
210
+ const value = window.localStorage.getItem(key);
211
+ if (value === null) {
212
+ // key doesn't exist
213
+ return fallback;
214
+ }
215
+ if (value === "true") {
216
+ return true;
217
+ }
218
+ if (value === "false") {
219
+ return false;
220
+ }
221
+ // Add more cases here for numbers, null, undefined etc. as/when needed
222
+ return value;
223
+ } else {
224
+ return fallback;
225
+ }
226
+ } catch {
227
+ return fallback;
228
+ }
229
+ }
@@ -6,7 +6,8 @@ import { default as EmberObject, computed } from "@ember/object";
6
6
  import { A } from "@ember/array";
7
7
 
8
8
  const BATCH_SIZE = 50;
9
- const DEFAULT_FILTER = [0, 1, 2, 3, 4, 5];
9
+
10
+ export const SEVERITIES = ["Debug", "Info", "Warn", "Err", "Fatal"];
10
11
 
11
12
  export default EmberObject.extend({
12
13
  total: 0,
@@ -16,10 +17,20 @@ export default EmberObject.extend({
16
17
  currentEnvPosition: 0,
17
18
  currentGroupedMessagesPosition: 0,
18
19
 
20
+ filter: computed(...SEVERITIES.map(s => `show${s}`), function() {
21
+ const filter = [];
22
+ SEVERITIES.forEach((severity, index) => {
23
+ if (this[`show${severity}`]) {
24
+ filter.push(index);
25
+ }
26
+ });
27
+ filter.push(5); // always show unknown, rare
28
+ return filter;
29
+ }),
30
+
19
31
  init() {
20
32
  this._super(...arguments);
21
33
  this.setProperties({
22
- filter: DEFAULT_FILTER,
23
34
  search: "",
24
35
  rows: A()
25
36
  });