logster 2.1.2 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +21 -19
  3. data/.rubocop.yml +1 -1
  4. data/.travis.yml +16 -16
  5. data/CHANGELOG.md +224 -172
  6. data/Gemfile +4 -4
  7. data/Guardfile +8 -8
  8. data/LICENSE.txt +22 -22
  9. data/README.md +99 -99
  10. data/Rakefile +21 -21
  11. data/assets/fonts/FontAwesome.otf +0 -0
  12. data/assets/fonts/fontawesome-webfont.eot +0 -0
  13. data/assets/fonts/fontawesome-webfont.svg +639 -639
  14. data/assets/fonts/fontawesome-webfont.ttf +0 -0
  15. data/assets/fonts/fontawesome-webfont.woff +0 -0
  16. data/assets/fonts/fontawesome-webfont.woff2 +0 -0
  17. data/assets/images/Icon-144_rounded.png +0 -0
  18. data/assets/images/Icon-144_square.png +0 -0
  19. data/assets/images/icon_144x144.png +0 -0
  20. data/assets/images/icon_64x64.png +0 -0
  21. data/assets/javascript/client-app.js +115 -106
  22. data/assets/stylesheets/client-app.css +1 -1
  23. data/build_client_app.sh +0 -0
  24. data/client-app/.editorconfig +20 -20
  25. data/client-app/.ember-cli +9 -9
  26. data/client-app/.eslintignore +19 -19
  27. data/client-app/.eslintrc.js +46 -46
  28. data/client-app/.gitignore +23 -23
  29. data/client-app/.travis.yml +27 -27
  30. data/client-app/.watchmanconfig +3 -3
  31. data/client-app/README.md +57 -57
  32. data/client-app/app/app.js +0 -0
  33. data/client-app/app/components/actions-menu.js +43 -43
  34. data/client-app/app/components/env-tab.js +80 -80
  35. data/client-app/app/components/message-info.js +0 -0
  36. data/client-app/app/components/message-row.js +0 -0
  37. data/client-app/app/components/panel-resizer.js +0 -0
  38. data/client-app/app/components/patterns-list.js +109 -0
  39. data/client-app/app/components/tab-contents.js +27 -27
  40. data/client-app/app/components/tabbed-section.js +0 -0
  41. data/client-app/app/components/time-formatter.js +0 -0
  42. data/client-app/app/components/update-time.js +0 -0
  43. data/client-app/app/controllers/index.js +22 -6
  44. data/client-app/app/controllers/show.js +0 -0
  45. data/client-app/app/helpers/logster-url.js +12 -0
  46. data/client-app/app/helpers/or.js +7 -0
  47. data/client-app/app/index.html +30 -29
  48. data/client-app/app/initializers/app-init.js +67 -67
  49. data/client-app/app/lib/preload.js +20 -20
  50. data/client-app/app/lib/utilities.js +150 -149
  51. data/client-app/app/models/message-collection.js +0 -0
  52. data/client-app/app/models/message.js +100 -100
  53. data/client-app/app/models/pattern-item.js +25 -0
  54. data/client-app/app/resolver.js +0 -0
  55. data/client-app/app/router.js +1 -0
  56. data/client-app/app/routes/index.js +2 -9
  57. data/client-app/app/routes/settings.js +15 -0
  58. data/client-app/app/routes/show.js +0 -0
  59. data/client-app/app/styles/app.css +633 -527
  60. data/client-app/app/templates/application.hbs +2 -2
  61. data/client-app/app/templates/components/actions-menu.hbs +12 -12
  62. data/client-app/app/templates/components/env-tab.hbs +10 -10
  63. data/client-app/app/templates/components/message-info.hbs +41 -41
  64. data/client-app/app/templates/components/message-row.hbs +15 -15
  65. data/client-app/app/templates/components/panel-resizer.hbs +3 -3
  66. data/client-app/app/templates/components/patterns-list.hbs +25 -0
  67. data/client-app/app/templates/components/tabbed-section.hbs +10 -10
  68. data/client-app/app/templates/components/time-formatter.hbs +1 -1
  69. data/client-app/app/templates/index.hbs +65 -58
  70. data/client-app/app/templates/settings.hbs +26 -0
  71. data/client-app/app/templates/show.hbs +7 -7
  72. data/client-app/config/environment.js +51 -51
  73. data/client-app/config/optional-features.json +3 -3
  74. data/client-app/config/targets.js +18 -18
  75. data/client-app/ember-cli-build.js +29 -29
  76. data/client-app/package-lock.json +11357 -11365
  77. data/client-app/package.json +57 -56
  78. data/client-app/public/assets/images/icon_144x144.png +0 -0
  79. data/client-app/public/assets/images/icon_64x64.png +0 -0
  80. data/client-app/testem.js +25 -25
  81. data/client-app/tests/index.html +34 -34
  82. data/client-app/tests/integration/components/env-tab-test.js +134 -123
  83. data/client-app/tests/integration/components/message-info-test.js +111 -111
  84. data/client-app/tests/integration/components/patterns-list-test.js +56 -0
  85. data/client-app/tests/test-helper.js +8 -8
  86. data/client-app/tests/unit/controllers/index-test.js +12 -12
  87. data/client-app/tests/unit/controllers/show-test.js +12 -12
  88. data/client-app/tests/unit/initializers/app-init-test.js +31 -31
  89. data/client-app/tests/unit/routes/index-test.js +11 -11
  90. data/client-app/tests/unit/routes/show-test.js +11 -11
  91. data/lib/examples/sidekiq_logster_reporter.rb +21 -21
  92. data/lib/logster.rb +59 -54
  93. data/lib/logster/base_store.rb +169 -141
  94. data/lib/logster/cache.rb +20 -0
  95. data/lib/logster/configuration.rb +27 -26
  96. data/lib/logster/defer_logger.rb +14 -14
  97. data/lib/logster/ignore_pattern.rb +65 -65
  98. data/lib/logster/logger.rb +113 -113
  99. data/lib/logster/message.rb +212 -212
  100. data/lib/logster/middleware/debug_exceptions.rb +26 -26
  101. data/lib/logster/middleware/reporter.rb +55 -55
  102. data/lib/logster/middleware/viewer.rb +297 -222
  103. data/lib/logster/pattern.rb +95 -0
  104. data/lib/logster/rails/railtie.rb +63 -63
  105. data/lib/logster/redis_store.rb +584 -566
  106. data/lib/logster/scheduler.rb +54 -54
  107. data/lib/logster/suppression_pattern.rb +17 -0
  108. data/lib/logster/version.rb +3 -3
  109. data/lib/logster/web.rb +14 -14
  110. data/logster.gemspec +35 -35
  111. data/test/examples/test_sidekiq_reporter_example.rb +46 -46
  112. data/test/fake_data/Gemfile +4 -4
  113. data/test/fake_data/generate.rb +10 -10
  114. data/test/logster/middleware/test_reporter.rb +19 -19
  115. data/test/logster/middleware/test_viewer.rb +267 -96
  116. data/test/logster/test_base_store.rb +147 -147
  117. data/test/logster/test_cache.rb +38 -0
  118. data/test/logster/test_defer_logger.rb +34 -34
  119. data/test/logster/test_ignore_pattern.rb +41 -41
  120. data/test/logster/test_logger.rb +100 -86
  121. data/test/logster/test_message.rb +119 -119
  122. data/test/logster/test_pattern.rb +152 -0
  123. data/test/logster/test_redis_rate_limiter.rb +230 -230
  124. data/test/logster/test_redis_store.rb +689 -720
  125. data/test/test_helper.rb +38 -38
  126. data/vendor/assets/javascripts/logster.js.erb +39 -39
  127. metadata +24 -7
@@ -1,2 +1,2 @@
1
- {{update-time}}
2
- {{outlet}}
1
+ {{update-time}}
2
+ {{outlet}}
@@ -1,12 +1,12 @@
1
- {{#if actionsInMenu}}
2
- {{#if showMenu}}
3
- <div class="actions-menu">
4
- {{yield}}
5
- </div>
6
- {{/if}}
7
- <button {{action 'expandMenu'}} class="expand btn no-text"><i class='fa fa-ellipsis-h'></i></button>
8
- <button {{action "share"}} class="share btn"><i class='fa fa-share'></i><span>Share</span></button>
9
- {{else}}
10
- {{yield}}
11
- <button {{action "share"}} class="share btn"><i class='fa fa-share'></i><span>Share</span></button>
12
- {{/if}}
1
+ {{#if actionsInMenu}}
2
+ {{#if showMenu}}
3
+ <div class="actions-menu">
4
+ {{yield}}
5
+ </div>
6
+ {{/if}}
7
+ <button {{action 'expandMenu'}} class="expand btn no-text"><i class='fa fa-ellipsis-h'></i></button>
8
+ <button {{action "share"}} class="share btn"><i class='fa fa-share'></i><span>Share</span></button>
9
+ {{else}}
10
+ {{yield}}
11
+ <button {{action "share"}} class="share btn"><i class='fa fa-share'></i><span>Share</span></button>
12
+ {{/if}}
@@ -1,10 +1,10 @@
1
- {{#if isEnvArray}}
2
- <div class="nav-controls">
3
- <button disabled={{disableBackButtons}} {{action "bigJump" "back"}} class="btn nav-btn no-text"><i class="fa fa-fast-backward"></i></button>
4
- <button disabled={{disableBackButtons}} {{action "takeStep" "back"}} class="btn nav-btn no-text"><i class="fa fa-backward"></i></button>
5
- <span class="env-number">{{current}}/{{message.env.length}}</span>
6
- <button disabled={{disableForwardButtons}} {{action "takeStep" "front"}} class="btn nav-btn no-text"><i class="fa fa-forward"></i></button>
7
- <button disabled={{disableForwardButtons}} {{action "bigJump" "front"}} class="btn nav-btn no-text"><i class="fa fa-fast-forward"></i></button>
8
- </div>
9
- {{/if}}
10
- {{{html}}}
1
+ {{#if isEnvArray}}
2
+ <div class="nav-controls">
3
+ <button disabled={{disableBackButtons}} {{action "bigJump" "back"}} class="btn nav-btn no-text"><i class="fa fa-fast-backward"></i></button>
4
+ <button disabled={{disableBackButtons}} {{action "takeStep" "back"}} class="btn nav-btn no-text"><i class="fa fa-backward"></i></button>
5
+ <span class="env-number">{{current}}/{{message.env.length}}</span>
6
+ <button disabled={{disableForwardButtons}} {{action "takeStep" "front"}} class="btn nav-btn no-text"><i class="fa fa-forward"></i></button>
7
+ <button disabled={{disableForwardButtons}} {{action "bigJump" "front"}} class="btn nav-btn no-text"><i class="fa fa-fast-forward"></i></button>
8
+ </div>
9
+ {{/if}}
10
+ {{{html}}}
@@ -1,41 +1,41 @@
1
- <div class="message-info">
2
- {{#tabbed-section}}
3
- {{#tab-contents name="info" hint="show info" currentMessage=currentMessage}}
4
- {{#if showTitle}}
5
- <h3>Message
6
- {{#if currentMessage.showCount}}
7
- ({{currentMessage.count}} copies reported)
8
- {{/if}}
9
- </h3>
10
- {{/if}}
11
- <pre>{{currentMessage.message}}</pre>
12
- {{/tab-contents}}
13
- {{#tab-contents name="backtrace" defaultTab="true" hint="show backtrace" currentMessage=currentMessage}}
14
- {{#if showTitle}}
15
- <h3>Backtrace</h3>
16
- {{/if}}
17
- <pre>{{currentMessage.backtrace}}</pre>
18
- {{/tab-contents}}
19
- {{#if currentMessage.env}}
20
- {{#tab-contents className="env" name="env" hint="show environment" currentMessage=currentMessage}}
21
- {{#if showTitle}}
22
- <h3>Env</h3>
23
- {{/if}}
24
- {{env-tab message=currentMessage}}
25
- {{/tab-contents}}
26
- {{/if}}
27
- {{/tabbed-section}}
28
-
29
- {{#if currentMessage}}
30
- <div class='message-actions'>
31
- {{#actions-menu actionsInMenu=actionsInMenu share=(action "share")}}
32
- {{#each buttons as |btn|}}
33
- <button {{action btn.action}} class="{{btn.klass}} btn {{if btn.danger 'danger' ''}}">
34
- <i class="fa fa-{{btn.icon}}"></i>
35
- <span>{{btn.label}}</span>
36
- </button>
37
- {{/each}}
38
- {{/actions-menu}}
39
- </div>
40
- {{/if}}
41
- </div>
1
+ <div class="message-info">
2
+ {{#tabbed-section}}
3
+ {{#tab-contents name="info" hint="show info" currentMessage=currentMessage}}
4
+ {{#if showTitle}}
5
+ <h3>Message
6
+ {{#if currentMessage.showCount}}
7
+ ({{currentMessage.count}} copies reported)
8
+ {{/if}}
9
+ </h3>
10
+ {{/if}}
11
+ <pre>{{currentMessage.message}}</pre>
12
+ {{/tab-contents}}
13
+ {{#tab-contents name="backtrace" defaultTab="true" hint="show backtrace" currentMessage=currentMessage}}
14
+ {{#if showTitle}}
15
+ <h3>Backtrace</h3>
16
+ {{/if}}
17
+ <pre>{{currentMessage.backtrace}}</pre>
18
+ {{/tab-contents}}
19
+ {{#if currentMessage.env}}
20
+ {{#tab-contents className="env" name="env" hint="show environment" currentMessage=currentMessage}}
21
+ {{#if showTitle}}
22
+ <h3>Env</h3>
23
+ {{/if}}
24
+ {{env-tab message=currentMessage}}
25
+ {{/tab-contents}}
26
+ {{/if}}
27
+ {{/tabbed-section}}
28
+
29
+ {{#if currentMessage}}
30
+ <div class='message-actions'>
31
+ {{#actions-menu actionsInMenu=actionsInMenu share=(action "share")}}
32
+ {{#each buttons as |btn|}}
33
+ <button {{action btn.action}} class="{{btn.klass}} btn {{if btn.danger 'danger' ''}}">
34
+ <i class="fa fa-{{btn.icon}}"></i>
35
+ <span>{{btn.label}}</span>
36
+ </button>
37
+ {{/each}}
38
+ {{/actions-menu}}
39
+ </div>
40
+ {{/if}}
41
+ </div>
@@ -1,15 +1,15 @@
1
- <div class="count">
2
- {{#if model.showCount}}
3
- {{model.count}}
4
- {{/if}}
5
- </div>
6
- <div class="severity">{{{model.glyph}}}</div>
7
- <div class="message-body">
8
- {{model.displayMessage}}
9
- </div>
10
- <div class='protected'>
11
- {{#if model.protected}}
12
- <i title="message is protected, clearing will not remove it" class='fa fa-lock'></i>
13
- {{/if}}
14
- </div>
15
- <div class="time">{{time-formatter timestamp=model.timestamp}}</div>
1
+ <div class="count">
2
+ {{#if model.showCount}}
3
+ {{model.count}}
4
+ {{/if}}
5
+ </div>
6
+ <div class="severity">{{{model.glyph}}}</div>
7
+ <div class="message-body">
8
+ {{model.displayMessage}}
9
+ </div>
10
+ <div class='protected'>
11
+ {{#if model.protected}}
12
+ <i title="message is protected, clearing will not remove it" class='fa fa-lock'></i>
13
+ {{/if}}
14
+ </div>
15
+ <div class="time">{{time-formatter timestamp=model.timestamp}}</div>
@@ -1,3 +1,3 @@
1
- <div class='line-1'></div>
2
- <div class='line-2'></div>
3
- <div class='line-3'></div>
1
+ <div class='line-1'></div>
2
+ <div class='line-2'></div>
3
+ <div class='line-3'></div>
@@ -0,0 +1,25 @@
1
+ {{#if mutable}}
2
+ <button {{action "create"}} class="btn new-pattern"><i class="fa fa-plus"></i> New</button>
3
+ {{/if}}
4
+ {{#each allPatterns as |pattern|}}
5
+ <div class="pattern-wrapper">
6
+ {{input
7
+ type="textfield"
8
+ class="pattern-input"
9
+ placeholder="Enter regular expression…"
10
+ value=pattern.valueBuffer
11
+ disabled=(or immutable pattern.saving)
12
+ }}
13
+ {{#if mutable}}
14
+ {{#if pattern.hasBuffer}}
15
+ <button {{action "save" pattern}} disabled={{pattern.saving}} class="btn ok no-text save"><i class="fa fa-check"></i></button>
16
+ {{/if}}
17
+ <button {{action "trash" pattern}} disabled={{pattern.saving}} class="btn no-text trash"><i class="fa fa-trash"></i></button>
18
+ {{/if}}
19
+ </div>
20
+ {{~#if pattern.error~}}
21
+ <pre class="api-error">
22
+ {{~pattern.error~}}
23
+ </pre>
24
+ {{~/if~}}
25
+ {{/each}}
@@ -1,10 +1,10 @@
1
- {{yield}}
2
- <ul class="tabs">
3
- {{#each tabs as |tab|}}
4
- <li>
5
- <a title="{{unbound tab.hint}}" href="#" class="{{if tab.active 'active'}}" {{action selectTab tab}}>
6
- {{unbound tab.name}}
7
- </a>
8
- </li>
9
- {{/each}}
10
- </ul>
1
+ {{yield}}
2
+ <ul class="tabs">
3
+ {{#each tabs as |tab|}}
4
+ <li>
5
+ <a title="{{unbound tab.hint}}" href="#" class="{{if tab.active 'active'}}" {{action selectTab tab}}>
6
+ {{unbound tab.name}}
7
+ </a>
8
+ </li>
9
+ {{/each}}
10
+ </ul>
@@ -1 +1 @@
1
- {{time}}
1
+ {{time}}
@@ -1,58 +1,65 @@
1
- <div id='top-panel'>
2
- <div id="log-table">
3
- {{#if model.moreBefore}}
4
- <div {{action "showMoreBefore"}} class="show-more">
5
- {{#if model.hideCountInLoadMore}}
6
- Load more
7
- {{else}}
8
- Select to see {{model.totalBefore}} more
9
- {{/if}}
10
- </div>
11
- {{/if}}
12
- {{#each model.messages as |message|}}
13
- {{message-row model=message selectedMessage=(action "selectMessage")}}
14
- {{/each}}
15
- </div>
16
- </div>
17
- <div id="bottom-panel">
18
- {{message-info
19
- currentMessage=currentMessage
20
- removeMessage=(action "removeMessage")
21
- solveMessage=(action "solveMessage")
22
- actionsInMenu=actionsInMenu}}
23
-
24
- <div class="action-panel">
25
- <div class="severity-filters">
26
- <div class="more-wrapping">
27
- <label class="debug">
28
- {{input type="checkbox" checked=showDebug}}
29
- <span>Debug</span>
30
- </label>
31
- <label class="info">
32
- {{input type="checkbox" checked=showInfo}}
33
- <span>Info</span>
34
- </label>
35
- <label class="warn">
36
- {{input type="checkbox" checked=showWarn}}
37
- <i class='fa fa-exclamation-circle warning'></i>
38
- <span>Warning</span>
39
- </label>
40
- <label class="error">
41
- {{input type="checkbox" checked=showErr}}
42
- <i class='fa fa-times-circle error'></i>
43
- <span>Error</span>
44
- </label>
45
- <label class="fatal">
46
- {{input type="checkbox" checked=showFatal}}
47
- <i class='fa fa-times-circle fatal'></i>
48
- <span>Fatal</span>
49
- </label>
50
- </div>
51
- </div>
52
- <div class="search-clear-all">
53
- {{input type="textfield" class="search" placeholder="Search" value=search}}
54
- <button class="clear btn danger" {{action "clear"}}><i class='fa fa-times'></i><span>Clear logs</span></button>
55
- </div>
56
- </div>
57
- </div>
58
- {{panel-resizer}}
1
+ <div id='top-panel'>
2
+ <div id="log-table">
3
+ {{#if model.moreBefore}}
4
+ <div {{action "showMoreBefore"}} class="show-more">
5
+ {{#if model.hideCountInLoadMore}}
6
+ Load more
7
+ {{else}}
8
+ Select to see {{model.totalBefore}} more
9
+ {{/if}}
10
+ </div>
11
+ {{/if}}
12
+ {{#each model.messages as |message|}}
13
+ {{message-row model=message selectedMessage=(action "selectMessage")}}
14
+ {{/each}}
15
+ </div>
16
+ </div>
17
+ <div id="bottom-panel">
18
+ {{message-info
19
+ currentMessage=currentMessage
20
+ removeMessage=(action "removeMessage")
21
+ solveMessage=(action "solveMessage")
22
+ actionsInMenu=actionsInMenu}}
23
+
24
+ <div class="action-panel">
25
+ <div class="severity-filters">
26
+ <div class="more-wrapping">
27
+ <label class="debug">
28
+ {{input type="checkbox" checked=showDebug}}
29
+ <span>Debug</span>
30
+ </label>
31
+ <label class="info">
32
+ {{input type="checkbox" checked=showInfo}}
33
+ <span>Info</span>
34
+ </label>
35
+ <label class="warn">
36
+ {{input type="checkbox" checked=showWarn}}
37
+ <i class='fa fa-exclamation-circle warning'></i>
38
+ <span>Warning</span>
39
+ </label>
40
+ <label class="error">
41
+ {{input type="checkbox" checked=showErr}}
42
+ <i class='fa fa-times-circle error'></i>
43
+ <span>Error</span>
44
+ </label>
45
+ <label class="fatal">
46
+ {{input type="checkbox" checked=showFatal}}
47
+ <i class='fa fa-times-circle fatal'></i>
48
+ <span>Fatal</span>
49
+ </label>
50
+ </div>
51
+ </div>
52
+ <div class="search-clear-all">
53
+ {{input type="textfield" class="search" placeholder="Search" value=search}}
54
+ <div class="footer-btns">
55
+ {{#if showSettings}}
56
+ {{#link-to "settings" class="settings btn no-text"}}
57
+ <i class='fa fa-cog'></i>
58
+ {{/link-to}}
59
+ {{/if}}
60
+ <button class="clear btn danger" {{action "clear"}}><i class='fa fa-trash-o'></i><span>Clear logs</span></button>
61
+ </div>
62
+ </div>
63
+ </div>
64
+ </div>
65
+ {{panel-resizer}}
@@ -0,0 +1,26 @@
1
+ <div class="settings-page">
2
+ {{link-to "Home" "index"}}
3
+ <div class="settings-header">
4
+ <h1 class="header-title">Settings</h1>
5
+ <img class="header-logo" src={{logster-url "images/icon_144x144.png"}}>
6
+ </div>
7
+
8
+ <div class="settings-section suppression-patterns">
9
+ <h2 class="section-title">Suppression Patterns</h2>
10
+ <div>New messages that match these Regular Expression patterns will be suppressed.</div>
11
+
12
+ {{#if showCodedPatterns}}
13
+ <h3 class="subsection-title">Hard-coded patterns:</h3>
14
+ <div class="tip">These patterns can't be removed via the UI because they are commited to the source code of your app.</div>
15
+ {{patterns-list
16
+ patterns=model.coded_patterns
17
+ mutable=false}}
18
+ {{/if}}
19
+
20
+ <h3 class="subsection-title">Custom patterns:</h3>
21
+ {{patterns-list
22
+ patterns=model.custom_patterns
23
+ key="suppression"
24
+ mutable=true}}
25
+ </div>
26
+ </div>
@@ -1,7 +1,7 @@
1
- {{#link-to 'index'}}Recent{{/link-to}}
2
- <div id="bottom-panel" class="full">
3
- {{message-info
4
- currentMessage=model
5
- showTitle="true"
6
- actionsInMenu=false}}
7
- </div>
1
+ {{#link-to 'index'}}Recent{{/link-to}}
2
+ <div id="bottom-panel" class="full">
3
+ {{message-info
4
+ currentMessage=model
5
+ showTitle="true"
6
+ actionsInMenu=false}}
7
+ </div>
@@ -1,51 +1,51 @@
1
- 'use strict';
2
-
3
- module.exports = function(environment) {
4
- let ENV = {
5
- modulePrefix: 'client-app',
6
- environment,
7
- rootURL: '/logs',
8
- locationType: 'history',
9
- EmberENV: {
10
- FEATURES: {
11
- // Here you can enable experimental features on an ember canary build
12
- // e.g. 'with-controller': true
13
- },
14
- EXTEND_PROTOTYPES: {
15
- // Prevent Ember Data from overriding Date.parse.
16
- Date: false
17
- }
18
- },
19
-
20
- APP: {
21
- // Here you can pass flags/options to your application instance
22
- // when it is created
23
- }
24
- };
25
-
26
- if (environment === 'development') {
27
- // ENV.APP.LOG_RESOLVER = true;
28
- // ENV.APP.LOG_ACTIVE_GENERATION = true;
29
- // ENV.APP.LOG_TRANSITIONS = true;
30
- // ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
31
- // ENV.APP.LOG_VIEW_LOOKUPS = true;
32
- }
33
-
34
- if (environment === 'test') {
35
- // Testem prefers this...
36
- ENV.locationType = 'none';
37
-
38
- // keep test console output quieter
39
- ENV.APP.LOG_ACTIVE_GENERATION = false;
40
- ENV.APP.LOG_VIEW_LOOKUPS = false;
41
-
42
- ENV.APP.rootElement = '#ember-testing';
43
- ENV.APP.autoboot = false;
44
- }
45
-
46
- if (environment === 'production') {
47
- // here you can enable a production-specific feature
48
- }
49
-
50
- return ENV;
51
- };
1
+ 'use strict';
2
+
3
+ module.exports = function(environment) {
4
+ let ENV = {
5
+ modulePrefix: 'client-app',
6
+ environment,
7
+ rootURL: '/logs',
8
+ locationType: 'history',
9
+ EmberENV: {
10
+ FEATURES: {
11
+ // Here you can enable experimental features on an ember canary build
12
+ // e.g. 'with-controller': true
13
+ },
14
+ EXTEND_PROTOTYPES: {
15
+ // Prevent Ember Data from overriding Date.parse.
16
+ Date: false
17
+ }
18
+ },
19
+
20
+ APP: {
21
+ // Here you can pass flags/options to your application instance
22
+ // when it is created
23
+ }
24
+ };
25
+
26
+ if (environment === 'development') {
27
+ // ENV.APP.LOG_RESOLVER = true;
28
+ // ENV.APP.LOG_ACTIVE_GENERATION = true;
29
+ // ENV.APP.LOG_TRANSITIONS = true;
30
+ // ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
31
+ // ENV.APP.LOG_VIEW_LOOKUPS = true;
32
+ }
33
+
34
+ if (environment === 'test') {
35
+ // Testem prefers this...
36
+ ENV.locationType = 'none';
37
+
38
+ // keep test console output quieter
39
+ ENV.APP.LOG_ACTIVE_GENERATION = false;
40
+ ENV.APP.LOG_VIEW_LOOKUPS = false;
41
+
42
+ ENV.APP.rootElement = '#ember-testing';
43
+ ENV.APP.autoboot = false;
44
+ }
45
+
46
+ if (environment === 'production') {
47
+ // here you can enable a production-specific feature
48
+ }
49
+
50
+ return ENV;
51
+ };