logster 2.21.0 → 3.0.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 (140) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +20 -0
  3. data/README.md +29 -14
  4. data/assets/javascript/main-B82IoCiW.js +1 -0
  5. data/assets/javascript/modules-4-12-BHA4lR2U.js +1 -0
  6. data/assets/javascript/vendor.js +11 -5260
  7. data/assets/logster-config.json +18 -0
  8. data/assets/manifest.json +23 -0
  9. data/assets/stylesheets/main-CgAFFyi8.css +1 -0
  10. data/lib/logster/configuration.rb +1 -0
  11. data/lib/logster/middleware/reporter.rb +34 -3
  12. data/lib/logster/middleware/viewer.rb +204 -32
  13. data/lib/logster/rails/railtie.rb +4 -20
  14. data/lib/logster/redis_store.rb +0 -2
  15. data/lib/logster/version.rb +1 -1
  16. data/lib/logster.rb +1 -1
  17. metadata +17 -186
  18. data/.github/workflows/ci.yml +0 -140
  19. data/.gitignore +0 -3
  20. data/.rubocop.yml +0 -12
  21. data/.streerc +0 -2
  22. data/Gemfile +0 -10
  23. data/Guardfile +0 -10
  24. data/Rakefile +0 -24
  25. data/assets/javascript/.gitkeep +0 -0
  26. data/assets/javascript/chunk.524.b7d0b89d25457a72409c.js +0 -22
  27. data/assets/javascript/chunk.582.5a04ae4713e692cd335a.js +0 -22
  28. data/assets/javascript/chunk.747.a730c497582bb6742a6e.js +0 -579
  29. data/assets/javascript/chunk.761.64949d89942c829e5c1b.js +0 -1213
  30. data/assets/javascript/client-app.js +0 -1389
  31. data/assets/stylesheets/.gitkeep +0 -0
  32. data/assets/stylesheets/client-app.css +0 -1
  33. data/assets/stylesheets/vendor.css +0 -1
  34. data/build_client_app.sh +0 -10
  35. data/client-app/.editorconfig +0 -19
  36. data/client-app/.ember-cli +0 -9
  37. data/client-app/.eslintignore +0 -20
  38. data/client-app/.eslintrc +0 -10
  39. data/client-app/.gitignore +0 -23
  40. data/client-app/.prettierignore +0 -21
  41. data/client-app/.prettierrc +0 -1
  42. data/client-app/.template-lintrc.js +0 -10
  43. data/client-app/.watchmanconfig +0 -3
  44. data/client-app/README.md +0 -56
  45. data/client-app/app/app.js +0 -12
  46. data/client-app/app/components/actions-menu.js +0 -50
  47. data/client-app/app/components/back-to-site-link.js +0 -9
  48. data/client-app/app/components/back-trace.js +0 -153
  49. data/client-app/app/components/env-tab.js +0 -68
  50. data/client-app/app/components/message-info.js +0 -151
  51. data/client-app/app/components/message-row.js +0 -46
  52. data/client-app/app/components/page-nav.js +0 -42
  53. data/client-app/app/components/panel-resizer.js +0 -108
  54. data/client-app/app/components/patterns-list.js +0 -142
  55. data/client-app/app/components/tab-contents.js +0 -23
  56. data/client-app/app/components/tabbed-section.js +0 -45
  57. data/client-app/app/components/time-formatter.js +0 -36
  58. data/client-app/app/controllers/index.js +0 -288
  59. data/client-app/app/controllers/show.js +0 -39
  60. data/client-app/app/helpers/logster-url.js +0 -12
  61. data/client-app/app/helpers/or.js +0 -7
  62. data/client-app/app/index.html +0 -31
  63. data/client-app/app/initializers/app-init.js +0 -71
  64. data/client-app/app/lib/decorators.js +0 -13
  65. data/client-app/app/lib/preload.js +0 -43
  66. data/client-app/app/lib/utilities.js +0 -230
  67. data/client-app/app/models/group.js +0 -34
  68. data/client-app/app/models/message-collection.js +0 -303
  69. data/client-app/app/models/message.js +0 -128
  70. data/client-app/app/models/pattern-item.js +0 -32
  71. data/client-app/app/resolver.js +0 -3
  72. data/client-app/app/router.js +0 -13
  73. data/client-app/app/routes/index.js +0 -64
  74. data/client-app/app/routes/settings.js +0 -32
  75. data/client-app/app/routes/show.js +0 -16
  76. data/client-app/app/services/events.js +0 -4
  77. data/client-app/app/styles/app.css +0 -898
  78. data/client-app/app/templates/application.hbs +0 -1
  79. data/client-app/app/templates/components/actions-menu.hbs +0 -31
  80. data/client-app/app/templates/components/back-to-site-link.hbs +0 -8
  81. data/client-app/app/templates/components/back-trace.hbs +0 -15
  82. data/client-app/app/templates/components/env-tab.hbs +0 -10
  83. data/client-app/app/templates/components/message-info.hbs +0 -86
  84. data/client-app/app/templates/components/message-row.hbs +0 -32
  85. data/client-app/app/templates/components/page-nav.hbs +0 -37
  86. data/client-app/app/templates/components/panel-resizer.hbs +0 -3
  87. data/client-app/app/templates/components/patterns-list.hbs +0 -78
  88. data/client-app/app/templates/components/tabbed-section.hbs +0 -18
  89. data/client-app/app/templates/components/time-formatter.hbs +0 -1
  90. data/client-app/app/templates/index.hbs +0 -192
  91. data/client-app/app/templates/settings.hbs +0 -47
  92. data/client-app/app/templates/show.hbs +0 -13
  93. data/client-app/config/ember-cli-update.json +0 -18
  94. data/client-app/config/environment.js +0 -51
  95. data/client-app/config/icons.js +0 -28
  96. data/client-app/config/optional-features.json +0 -6
  97. data/client-app/config/targets.js +0 -26
  98. data/client-app/ember-cli-build.js +0 -34
  99. data/client-app/package.json +0 -76
  100. data/client-app/preload-json-manager.rb +0 -35
  101. data/client-app/public/assets/images/icon_144x144.png +0 -0
  102. data/client-app/public/assets/images/icon_64x64.png +0 -0
  103. data/client-app/testem.js +0 -23
  104. data/client-app/tests/index.html +0 -41
  105. data/client-app/tests/integration/components/back-to-site-link-test.js +0 -20
  106. data/client-app/tests/integration/components/back-trace-test.js +0 -138
  107. data/client-app/tests/integration/components/env-tab-test.js +0 -220
  108. data/client-app/tests/integration/components/message-info-test.js +0 -122
  109. data/client-app/tests/integration/components/patterns-list-test.js +0 -76
  110. data/client-app/tests/test-helper.js +0 -12
  111. data/client-app/tests/unit/controllers/index-test.js +0 -77
  112. data/client-app/tests/unit/controllers/show-test.js +0 -12
  113. data/client-app/tests/unit/routes/index-test.js +0 -11
  114. data/client-app/tests/unit/routes/show-test.js +0 -11
  115. data/client-app/yarn.lock +0 -9905
  116. data/gemfiles/rails_6.1.gemfile +0 -12
  117. data/gemfiles/rails_7.0.gemfile +0 -12
  118. data/gemfiles/rails_7.1.gemfile +0 -9
  119. data/gemfiles/rails_7.2.gemfile +0 -9
  120. data/logster.gemspec +0 -43
  121. data/test/dummy/config/application.rb +0 -31
  122. data/test/dummy/config/boot.rb +0 -6
  123. data/test/dummy/config/environment.rb +0 -6
  124. data/test/examples/test_sidekiq_reporter_example.rb +0 -47
  125. data/test/fake_data/Gemfile +0 -6
  126. data/test/fake_data/generate.rb +0 -23
  127. data/test/logster/middleware/test_reporter.rb +0 -84
  128. data/test/logster/middleware/test_viewer.rb +0 -495
  129. data/test/logster/test_base_store.rb +0 -224
  130. data/test/logster/test_cache.rb +0 -39
  131. data/test/logster/test_defer_logger.rb +0 -36
  132. data/test/logster/test_group.rb +0 -92
  133. data/test/logster/test_ignore_pattern.rb +0 -42
  134. data/test/logster/test_logger.rb +0 -177
  135. data/test/logster/test_message.rb +0 -269
  136. data/test/logster/test_pattern.rb +0 -144
  137. data/test/logster/test_railtie.rb +0 -21
  138. data/test/logster/test_redis_rate_limiter.rb +0 -246
  139. data/test/logster/test_redis_store.rb +0 -1165
  140. data/test/test_helper.rb +0 -66
File without changes
@@ -1 +0,0 @@
1
- body{font-family:Arial,"Liberation Sans","DejaVu Sans",sans-serif;font-size:12px}body.mobile,body.mobile .message{font-size:14px}pre{font-family:"Roboto Mono",Consolas,Monaco,Ubuntu Mono,monospace}table.env-table tbody tr td{border-top:none;line-height:18px;height:18px;vertical-align:top}table.env-table,table.env-table table{border-spacing:0;border-collapse:collapse}table.env-table td{padding-right:5px}tbody tr{width:98%}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.loading{border:4px solid #f3f3f3;border-top:4px solid #3498db;border-radius:50%;width:30px;height:30px;animation:spin 1s linear infinite;margin:40dvh auto}.message-row,.message-row-wrapper{display:flex;width:inherit}.message-row{font-family:Roboto}.message-row .protected,.message-row .severity{text-align:center;width:25px;flex-grow:0;flex-shrink:0;font-size:12px}.message-row div{border-top:.5px #e9e9e9 solid;padding-top:1px;padding-bottom:1px;line-height:25px}.message-row .count{width:30px;flex-grow:0;flex-shrink:0;padding-right:4px;box-sizing:border-box;font-size:11px;font-weight:700;text-align:right}.message-row .message-body{flex-grow:1;flex-shrink:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:13px}.message-row .time{flex-grow:0;flex-shrink:0;color:#999;vertical-align:top;font-size:12px;padding-right:8px}.action-panel .search,.action-panel .svg-inline--fa,.pattern-wrapper .pattern-input,.pattern-wrapper .shrink,.search-clear-all .btn.clear span,.search-clear-all .clear,input,label span{vertical-align:middle}.message-row:hover{background-color:#f8f8f8;cursor:pointer}.message-row.selected{background-color:#dfdfdf}.svg-inline--fa.fatal{color:#e00}.svg-inline--fa.error{color:#900}.svg-inline--fa.warning{color:#feb800}.debug{color:#777}.action-panel .search{border:1px solid #ddd;padding:3px;box-sizing:border-box}#log-table .show-more{text-align:center;height:30px;line-height:30px;text-decoration:none;background-color:#ddd;cursor:pointer;margin-top:8px}#bottom-panel{position:fixed;bottom:0;left:0;right:0;height:300px;background-color:#f1f1f1;padding:0 8px 8px;z-index:2}#bottom-panel.full{position:static;background-color:inherit;height:90%}#bottom-panel.full>div{padding-bottom:40px}#bottom-panel.full .tabs{display:none}#bottom-panel.full .message-info{position:static}#bottom-panel.full .message-info .content{display:block;position:static}#bottom-panel.full .save,#bottom-panel.full .share{bottom:10px}#bottom-panel.full button.delete{display:none}#bottom-panel.full .message-actions button{margin-top:8px}@media (max-width:382px){#bottom-panel.full .message-actions{height:73px}}@media (min-width:383px){#bottom-panel.full .message-actions{height:40px}}#bottom-panel.full .message-actions{position:fixed;width:100%;left:0;bottom:0;background-color:#eee;border-top:1px solid #dfdfdf;padding-left:10px}.divider,.tabs{border-top:1px solid #ddd}.message-actions{position:absolute;bottom:5px;right:0;margin-right:10px}.message-actions button{margin-left:5px}.divider{position:fixed;bottom:310px;left:0;right:0;height:15px;border-bottom:1px solid #ddd;background-color:#fafafa;cursor:row-resize}.divider div{margin:auto;width:24px;height:1px;background-color:#ccc;position:relative}.divider .line-1{top:5px}.divider .line-2{top:6px}.divider .line-3{top:7px}#top-panel{position:fixed;top:0;left:0;right:0;bottom:320px;overflow:auto}#top-panel.with-top-menu{top:35px}#top-menu{position:fixed;z-index:900;left:0;top:0;width:100%}.action-panel,.message-info,.nav-controls.group-nav{position:absolute;right:0;left:0}#back-to-site-panel{padding:10px;background-color:#f1f1f1;height:15px}.message-info{border-bottom:1px solid #ddd;top:0}#bottom-panel.group-view .message-info{top:43px}.nav-controls.group-nav{border-bottom:1px solid #ddd}.action-panel{bottom:0;font-weight:700}.action-panel input{margin:0}.severity-filters label{margin-right:10px}.search-clear-all .clear{float:right}#log-table{margin:auto;width:99%}.btn span{display:inline}.hidden{display:none}.message-info .env-table,.message-info pre{position:relative;margin:5px 10px 10px}#overlay{position:fixed;z-index:99999;top:0;bottom:0;left:0;right:0;cursor:row-resize;opacity:0}.message-info .content{position:absolute;top:0;bottom:35px;left:0;right:0;overflow:auto;display:none}.message-info .content.active{display:block}.tabs{position:absolute;bottom:13px;left:0;right:0;list-style-type:none;margin:0 0 5px;padding:0 0 0 10px}.tabs a,.tabs li{position:relative}.tabs li{float:left;padding-right:5px;margin:0}.tabs a{top:6px;text-decoration:none;color:#333;border:1px solid #ddd;border-top:none;border-bottom-left-radius:5px;border-bottom-right-radius:5px;padding:6px;background-color:#e1e1e1}.tabs a.active{border-top:1px solid #f1f1f1;background-color:#f1f1f1}.btn{display:inline-block;margin:0;padding:5px 8px;font-size:1em;line-height:0;text-align:center;cursor:pointer;transition:all .25s;background-color:#ddd;text-decoration:none;border:none;color:#333;font-weight:400}.btn:hover{color:#000;background-color:#ccc}.btn .svg-inline--fa{margin-right:7px}.btn:active{text-shadow:none}.btn.danger:hover{background-color:#c63c1b;color:#eee}.btn.ok{background-color:#3781dc;color:#fff}.btn.ok:hover{background-color:#286dc2;color:#fff}.search-clear-all .btn.clear,.search-clear-all .search{height:100%}.search-clear-all .btn.clear,.search-clear-all .search,.severity-filters label{align-self:center}.search-clear-all .footer-btns .settings{height:100%;box-sizing:border-box;display:inline-flex;align-items:center}.search-clear-all{display:flex;justify-content:space-between}.search-clear-all .search{min-width:0;flex-shrink:2}.footer-btns{display:flex;gap:.7em}@media (min-width:871px){.search-clear-all,.severity-filters{height:100%}.more-wrapping,.severity-filters{display:flex}.severity-filters{float:left}.action-panel{padding:10px;box-sizing:border-box;height:45px}.message-info{bottom:45px}}@media (max-width:870px){.severity-filters{padding:10px}.search-clear-all{padding:0 10px 10px}.action-panel{height:69px}.message-info{bottom:69px}}@media (max-width:430px){.severity-filters{overflow-x:scroll;overflow-y:hidden;white-space:nowrap}.more-wrapping:after,.more-wrapping:before{content:"";position:absolute;height:18px}.more-wrapping:before{width:15px;margin-left:-10px;background:linear-gradient(to right,#f1f1f1 0,rgba(241,241,241,.001) 100%)}.more-wrapping:after{right:0;width:23px;background:linear-gradient(to left,#f1f1f1 0,rgba(241,241,241,.001) 100%)}}.btn.no-text .svg-inline--fa,.retro-checkbox .checkbox{margin:0}.btn[disabled]{opacity:.5}.actions-menu{position:absolute;background:#fafafa;display:inline-flex;flex-direction:column;bottom:27px;right:45px;width:115px;padding:5px 5px 0;box-shadow:0 4px 14px rgba(0,0,0,.15);z-index:3}.actions-menu button{margin:0 0 5px;height:27px}.nav-controls{padding:10px}#bottom-panel:not(.full) .nav-controls.env-nav{position:sticky;position:-webkit-sticky;position:-moz-sticky;position:-ms-sticky;position:-o-sticky;top:0;background:#f1f1f1;z-index:1;border-bottom:1px solid #ddd}.current-number{margin:0 7px}.expand-list,.recent-link{text-decoration:underline;color:#00f;cursor:pointer}.settings-page{max-width:1110px;margin-right:auto;margin-left:auto;font-size:15px;padding:0 10px 70px}.settings-header{display:flex;align-items:center;margin-bottom:5px}.settings-header .header-title{flex-grow:1}.settings-header .header-logo{width:50px;height:50px}.settings-section{padding-top:15px}.settings-section .section-title{margin-top:0}.settings-section .subsection-title{margin-bottom:10px}.settings-section .tip{font-style:italic;font-size:13px;color:grey}.settings-section .pattern-wrapper{margin-top:10px;font-size:16px;display:flex;height:33px}.settings-section .api-error{font-family:Consolas,"Roboto Mono",Monaco,Ubuntu Mono,monospace;margin-top:5px;color:red}.pattern-wrapper .pattern-input{font-family:Consolas,"Roboto Mono",Monaco,Ubuntu Mono,monospace;width:600px;font-size:inherit;padding:5px 0;height:100%;box-sizing:border-box;flex-grow:1;flex-shrink:1}.retro-checkbox{margin-top:7px}.btn.new-pattern{height:100%;line-height:18px}.pattern-wrapper .shrink{height:100%;width:40px;text-align:center;box-sizing:border-box;flex-grow:0;flex-shrink:0;margin-left:10px}.svg-inline--fa{opacity:.7}.pattern-wrapper .shrink.reset{background:unset;width:unset;padding:0;margin-left:8px}.grouping-patterns button.new-pattern{margin-top:10px}.grouping-pattern-dialog-overlay{position:fixed;z-index:100000;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.5);display:flex;align-items:center;justify-content:center}.grouping-pattern-dialog{background:#fff;border-radius:4px;padding:20px;min-width:600px;box-shadow:0 4px 16px rgba(0,0,0,.3)}.grouping-pattern-dialog h3{margin:0 0 8px;font-size:1em;font-weight:700}.grouping-pattern-dialog p{margin:0 0 10px;font-size:.9em;color:#555}.grouping-pattern-input{width:100%;box-sizing:border-box;padding:8px;font-size:1.1em;font-family:monospace;border:1px solid #ccc;border-radius:3px;margin-bottom:14px}.grouping-pattern-dialog-buttons{display:flex;justify-content:flex-end;gap:8px}.grouping-pattern-dialog .btn{padding:12px}.backtrace-line .line-link{color:#9e9e9e;margin-left:3px;text-decoration:none;white-space:normal}@media (prefers-color-scheme:dark){#bottom-panel,body{background:#181818}.btn,.tabs a,body{color:#cecece}.message-row div{border-top-color:#404040}.message-row:hover{background:#262626}.message-row.selected{background:#303030}#log-table .show-more,.divider{background:#262626}.divider div{background:#707070}.divider,.tabs{border-top-color:#555}#bottom-panel:not(.full) .nav-controls.env-nav,.divider,.message-info,.nav-controls.group-nav{border-bottom-color:#555}.action-panel .search{background:#262626;border-color:#404040}.tabs a{background:#323232;border-color:#404040}.tabs a.active{background:#555;border-color:#707070;color:#f4f4f4}.btn{background:#323232}#bottom-panel.full .message-actions{background:#181818;border-color:#555}#bottom-panel:not(.full) .nav-controls.env-nav{background:#181818}.expand-list,.recent-link{color:#44f}#back-to-site-panel{background-color:#181818}.grouping-pattern-dialog{background:#262626;color:#cecece}.grouping-pattern-dialog p{color:#aaa}.grouping-pattern-input{background:#181818;color:#cecece;border-color:#555}}
@@ -1 +0,0 @@
1
- .fa-duotone.fa-inverse,.fa-inverse,.fa-layers-counter,.fad.fa-inverse{color:var(--fa-inverse,#fff)}:host,:root{--fa-font-solid:normal 900 1em/1 "Font Awesome 6 Solid";--fa-font-regular:normal 400 1em/1 "Font Awesome 6 Regular";--fa-font-light:normal 300 1em/1 "Font Awesome 6 Light";--fa-font-thin:normal 100 1em/1 "Font Awesome 6 Thin";--fa-font-duotone:normal 900 1em/1 "Font Awesome 6 Duotone";--fa-font-sharp-solid:normal 900 1em/1 "Font Awesome 6 Sharp";--fa-font-sharp-regular:normal 400 1em/1 "Font Awesome 6 Sharp";--fa-font-brands:normal 400 1em/1 "Font Awesome 6 Brands"}svg:not(:host).svg-inline--fa,svg:not(:root).svg-inline--fa{overflow:visible;box-sizing:content-box}.svg-inline--fa{display:var(--fa-display,inline-block);height:1em;overflow:visible;vertical-align:-.125em}.svg-inline--fa.fa-2xs{vertical-align:.1em}.svg-inline--fa.fa-xs{vertical-align:0}.svg-inline--fa.fa-sm{vertical-align:-.0714285705em}.svg-inline--fa.fa-lg{vertical-align:-.2em}.svg-inline--fa.fa-xl{vertical-align:-.25em}.svg-inline--fa.fa-2xl{vertical-align:-.3125em}.svg-inline--fa.fa-pull-left{margin-right:var(--fa-pull-margin,.3em);width:auto}.svg-inline--fa.fa-pull-right{margin-left:var(--fa-pull-margin,.3em);width:auto}.svg-inline--fa.fa-li{width:var(--fa-li-width,2em);top:.25em}.svg-inline--fa.fa-fw{width:var(--fa-fw-width,1.25em)}.fa-layers svg.svg-inline--fa{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0;-webkit-transform-origin:center center;transform-origin:center center}.fa-layers-counter,.fa-layers-text{display:inline-block;position:absolute;text-align:center}.fa-layers,.fa-ul>li{position:relative}.fa-layers{display:inline-block;height:1em;text-align:center;vertical-align:-.125em;width:1em}.fa-layers-text{left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);-webkit-transform-origin:center center;transform-origin:center center}.fa-layers-counter{background-color:var(--fa-counter-background-color,#ff253a);border-radius:var(--fa-counter-border-radius,1em);box-sizing:border-box;line-height:var(--fa-counter-line-height,1);max-width:var(--fa-counter-max-width,5em);min-width:var(--fa-counter-min-width,1.5em);overflow:hidden;padding:var(--fa-counter-padding,.25em .5em);right:var(--fa-right,0);text-overflow:ellipsis;top:var(--fa-top,0);-webkit-transform:scale(var(--fa-counter-scale,.25));transform:scale(var(--fa-counter-scale,.25));-webkit-transform-origin:top right;transform-origin:top right}.fa-layers-bottom-right{bottom:var(--fa-bottom,0);right:var(--fa-right,0);top:auto;-webkit-transform:scale(var(--fa-layers-scale,.25));transform:scale(var(--fa-layers-scale,.25));-webkit-transform-origin:bottom right;transform-origin:bottom right}.fa-layers-bottom-left,.fa-layers-top-right{-webkit-transform:scale(var(--fa-layers-scale,.25))}.fa-layers-bottom-left{bottom:var(--fa-bottom,0);left:var(--fa-left,0);right:auto;top:auto;transform:scale(var(--fa-layers-scale,.25));-webkit-transform-origin:bottom left;transform-origin:bottom left}.fa-layers-top-right{top:var(--fa-top,0);right:var(--fa-right,0);transform:scale(var(--fa-layers-scale,.25));-webkit-transform-origin:top right;transform-origin:top right}.fa-layers-top-left{left:var(--fa-left,0);right:auto;top:var(--fa-top,0);-webkit-transform:scale(var(--fa-layers-scale,.25));transform:scale(var(--fa-layers-scale,.25));-webkit-transform-origin:top left;transform-origin:top left}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-2xs{font-size:.625em;line-height:.1em;vertical-align:.225em}.fa-xs{font-size:.75em;line-height:.0833333337em;vertical-align:.125em}.fa-sm{font-size:.875em;line-height:.0714285718em;vertical-align:.0535714295em}.fa-lg{font-size:1.25em;line-height:.05em;vertical-align:-.075em}.fa-xl{font-size:1.5em;line-height:.0416666682em;vertical-align:-.125em}.fa-2xl{font-size:2em;line-height:.03125em;vertical-align:-.1875em}.fa-fw{text-align:center;width:1.25em}.fa-ul{list-style-type:none;margin-left:var(--fa-li-margin,2.5em);padding-left:0}.fa-li{left:calc(var(--fa-li-width,2em) * -1);position:absolute;text-align:center;width:var(--fa-li-width,2em);line-height:inherit}.fa-border{border-color:var(--fa-border-color,#eee);border-radius:var(--fa-border-radius,.1em);border-style:var(--fa-border-style,solid);border-width:var(--fa-border-width,.08em);padding:var(--fa-border-padding,.2em .25em .15em)}.fa-pull-left{float:left;margin-right:var(--fa-pull-margin,.3em)}.fa-pull-right{float:right;margin-left:var(--fa-pull-margin,.3em)}.fa-beat{-webkit-animation-name:fa-beat;animation-name:fa-beat;-webkit-animation-delay:var(--fa-animation-delay,0s);animation-delay:var(--fa-animation-delay,0s);-webkit-animation-direction:var(--fa-animation-direction,normal);animation-direction:var(--fa-animation-direction,normal);-webkit-animation-duration:var(--fa-animation-duration,1s);animation-duration:var(--fa-animation-duration,1s);-webkit-animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-iteration-count:var(--fa-animation-iteration-count,infinite);-webkit-animation-timing-function:var(--fa-animation-timing,ease-in-out);animation-timing-function:var(--fa-animation-timing,ease-in-out)}.fa-bounce,.fa-fade{-webkit-animation-direction:var(--fa-animation-direction,normal);-webkit-animation-iteration-count:var(--fa-animation-iteration-count,infinite)}.fa-bounce{-webkit-animation-name:fa-bounce;animation-name:fa-bounce;-webkit-animation-delay:var(--fa-animation-delay,0s);animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);-webkit-animation-duration:var(--fa-animation-duration,1s);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);-webkit-animation-timing-function:var(--fa-animation-timing,cubic-bezier(.28,.84,.42,1));animation-timing-function:var(--fa-animation-timing,cubic-bezier(.28,.84,.42,1))}.fa-beat-fade,.fa-fade{-webkit-animation-delay:var(--fa-animation-delay,0s)}.fa-fade{-webkit-animation-name:fa-fade;animation-name:fa-fade;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);-webkit-animation-duration:var(--fa-animation-duration,1s);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);-webkit-animation-timing-function:var(--fa-animation-timing,cubic-bezier(.4,0,.6,1));animation-timing-function:var(--fa-animation-timing,cubic-bezier(.4,0,.6,1))}.fa-beat-fade,.fa-flip{-webkit-animation-direction:var(--fa-animation-direction,normal);-webkit-animation-iteration-count:var(--fa-animation-iteration-count,infinite)}.fa-beat-fade{-webkit-animation-name:fa-beat-fade;animation-name:fa-beat-fade;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);-webkit-animation-duration:var(--fa-animation-duration,1s);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);-webkit-animation-timing-function:var(--fa-animation-timing,cubic-bezier(.4,0,.6,1));animation-timing-function:var(--fa-animation-timing,cubic-bezier(.4,0,.6,1))}.fa-flip,.fa-shake{-webkit-animation-delay:var(--fa-animation-delay,0s)}.fa-flip{-webkit-animation-name:fa-flip;animation-name:fa-flip;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);-webkit-animation-duration:var(--fa-animation-duration,1s);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);-webkit-animation-timing-function:var(--fa-animation-timing,ease-in-out);animation-timing-function:var(--fa-animation-timing,ease-in-out)}.fa-shake,.fa-spin{-webkit-animation-direction:var(--fa-animation-direction,normal);-webkit-animation-iteration-count:var(--fa-animation-iteration-count,infinite)}.fa-shake{-webkit-animation-name:fa-shake;animation-name:fa-shake;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);-webkit-animation-duration:var(--fa-animation-duration,1s);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);-webkit-animation-timing-function:var(--fa-animation-timing,linear);animation-timing-function:var(--fa-animation-timing,linear)}.fa-spin{-webkit-animation-name:fa-spin;animation-name:fa-spin;-webkit-animation-delay:var(--fa-animation-delay,0s);animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);-webkit-animation-duration:var(--fa-animation-duration,2s);animation-duration:var(--fa-animation-duration,2s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);-webkit-animation-timing-function:var(--fa-animation-timing,linear);animation-timing-function:var(--fa-animation-timing,linear)}.fa-spin-reverse{--fa-animation-direction:reverse}.fa-pulse,.fa-spin-pulse{-webkit-animation-name:fa-spin;animation-name:fa-spin;-webkit-animation-direction:var(--fa-animation-direction,normal);animation-direction:var(--fa-animation-direction,normal);-webkit-animation-duration:var(--fa-animation-duration,1s);animation-duration:var(--fa-animation-duration,1s);-webkit-animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-iteration-count:var(--fa-animation-iteration-count,infinite);-webkit-animation-timing-function:var(--fa-animation-timing,steps(8));animation-timing-function:var(--fa-animation-timing,steps(8))}@media (prefers-reduced-motion:reduce){.fa-beat,.fa-beat-fade,.fa-bounce,.fa-fade,.fa-flip,.fa-pulse,.fa-shake,.fa-spin,.fa-spin-pulse{-webkit-animation-delay:-1ms;animation-delay:-1ms;-webkit-animation-duration:1ms;animation-duration:1ms;-webkit-animation-iteration-count:1;animation-iteration-count:1;-webkit-transition-delay:0s;transition-delay:0s;-webkit-transition-duration:0s;transition-duration:0s}}@-webkit-keyframes fa-beat{0%,90%{-webkit-transform:scale(1);transform:scale(1)}45%{-webkit-transform:scale(var(--fa-beat-scale,1.25));transform:scale(var(--fa-beat-scale,1.25))}}@keyframes fa-beat{0%,90%{-webkit-transform:scale(1);transform:scale(1)}45%{-webkit-transform:scale(var(--fa-beat-scale,1.25));transform:scale(var(--fa-beat-scale,1.25))}}@-webkit-keyframes fa-bounce{0%,100%,64%{-webkit-transform:scale(1,1) translateY(0);transform:scale(1,1) translateY(0)}10%{-webkit-transform:scale(var(--fa-bounce-start-scale-x,1.1),var(--fa-bounce-start-scale-y,.9)) translateY(0);transform:scale(var(--fa-bounce-start-scale-x,1.1),var(--fa-bounce-start-scale-y,.9)) translateY(0)}30%{-webkit-transform:scale(var(--fa-bounce-jump-scale-x,.9),var(--fa-bounce-jump-scale-y,1.1)) translateY(var(--fa-bounce-height,-.5em));transform:scale(var(--fa-bounce-jump-scale-x,.9),var(--fa-bounce-jump-scale-y,1.1)) translateY(var(--fa-bounce-height,-.5em))}50%{-webkit-transform:scale(var(--fa-bounce-land-scale-x,1.05),var(--fa-bounce-land-scale-y,.95)) translateY(0);transform:scale(var(--fa-bounce-land-scale-x,1.05),var(--fa-bounce-land-scale-y,.95)) translateY(0)}57%{-webkit-transform:scale(1,1) translateY(var(--fa-bounce-rebound,-.125em));transform:scale(1,1) translateY(var(--fa-bounce-rebound,-.125em))}}@keyframes fa-bounce{0%,100%,64%{-webkit-transform:scale(1,1) translateY(0);transform:scale(1,1) translateY(0)}10%{-webkit-transform:scale(var(--fa-bounce-start-scale-x,1.1),var(--fa-bounce-start-scale-y,.9)) translateY(0);transform:scale(var(--fa-bounce-start-scale-x,1.1),var(--fa-bounce-start-scale-y,.9)) translateY(0)}30%{-webkit-transform:scale(var(--fa-bounce-jump-scale-x,.9),var(--fa-bounce-jump-scale-y,1.1)) translateY(var(--fa-bounce-height,-.5em));transform:scale(var(--fa-bounce-jump-scale-x,.9),var(--fa-bounce-jump-scale-y,1.1)) translateY(var(--fa-bounce-height,-.5em))}50%{-webkit-transform:scale(var(--fa-bounce-land-scale-x,1.05),var(--fa-bounce-land-scale-y,.95)) translateY(0);transform:scale(var(--fa-bounce-land-scale-x,1.05),var(--fa-bounce-land-scale-y,.95)) translateY(0)}57%{-webkit-transform:scale(1,1) translateY(var(--fa-bounce-rebound,-.125em));transform:scale(1,1) translateY(var(--fa-bounce-rebound,-.125em))}}@-webkit-keyframes fa-fade{50%{opacity:var(--fa-fade-opacity,.4)}}@keyframes fa-fade{50%{opacity:var(--fa-fade-opacity,.4)}}@-webkit-keyframes fa-beat-fade{0%,100%{opacity:var(--fa-beat-fade-opacity,.4);-webkit-transform:scale(1);transform:scale(1)}50%{opacity:1;-webkit-transform:scale(var(--fa-beat-fade-scale,1.125));transform:scale(var(--fa-beat-fade-scale,1.125))}}@keyframes fa-beat-fade{0%,100%{opacity:var(--fa-beat-fade-opacity,.4);-webkit-transform:scale(1);transform:scale(1)}50%{opacity:1;-webkit-transform:scale(var(--fa-beat-fade-scale,1.125));transform:scale(var(--fa-beat-fade-scale,1.125))}}@-webkit-keyframes fa-flip{50%{-webkit-transform:rotate3d(var(--fa-flip-x,0),var(--fa-flip-y,1),var(--fa-flip-z,0),var(--fa-flip-angle,-180deg));transform:rotate3d(var(--fa-flip-x,0),var(--fa-flip-y,1),var(--fa-flip-z,0),var(--fa-flip-angle,-180deg))}}@keyframes fa-flip{50%{-webkit-transform:rotate3d(var(--fa-flip-x,0),var(--fa-flip-y,1),var(--fa-flip-z,0),var(--fa-flip-angle,-180deg));transform:rotate3d(var(--fa-flip-x,0),var(--fa-flip-y,1),var(--fa-flip-z,0),var(--fa-flip-angle,-180deg))}}@-webkit-keyframes fa-shake{0%{-webkit-transform:rotate(-15deg);transform:rotate(-15deg)}4%{-webkit-transform:rotate(15deg);transform:rotate(15deg)}24%,8%{-webkit-transform:rotate(-18deg);transform:rotate(-18deg)}12%,28%{-webkit-transform:rotate(18deg);transform:rotate(18deg)}16%{-webkit-transform:rotate(-22deg);transform:rotate(-22deg)}20%{-webkit-transform:rotate(22deg);transform:rotate(22deg)}32%{-webkit-transform:rotate(-12deg);transform:rotate(-12deg)}36%{-webkit-transform:rotate(12deg);transform:rotate(12deg)}100%,40%{-webkit-transform:rotate(0);transform:rotate(0)}}@keyframes fa-shake{0%{-webkit-transform:rotate(-15deg);transform:rotate(-15deg)}4%{-webkit-transform:rotate(15deg);transform:rotate(15deg)}24%,8%{-webkit-transform:rotate(-18deg);transform:rotate(-18deg)}12%,28%{-webkit-transform:rotate(18deg);transform:rotate(18deg)}16%{-webkit-transform:rotate(-22deg);transform:rotate(-22deg)}20%{-webkit-transform:rotate(22deg);transform:rotate(22deg)}32%{-webkit-transform:rotate(-12deg);transform:rotate(-12deg)}36%{-webkit-transform:rotate(12deg);transform:rotate(12deg)}100%,40%{-webkit-transform:rotate(0);transform:rotate(0)}}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.fa-rotate-90{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-webkit-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-webkit-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{-webkit-transform:scale(1,-1);transform:scale(1,-1)}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical{-webkit-transform:scale(-1,-1);transform:scale(-1,-1)}.fa-rotate-by{-webkit-transform:rotate(var(--fa-rotate-angle,none));transform:rotate(var(--fa-rotate-angle,none))}.fa-stack{display:inline-block;vertical-align:middle;height:2em;position:relative;width:2.5em}.fa-stack-1x,.fa-stack-2x{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0;z-index:var(--fa-stack-z-index,auto)}.svg-inline--fa.fa-stack-1x{height:1em;width:1.25em}.svg-inline--fa.fa-stack-2x{height:2em;width:2.5em}.fa-sr-only,.fa-sr-only-focusable:not(:focus),.sr-only,.sr-only-focusable:not(:focus){position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.svg-inline--fa .fa-primary{fill:var(--fa-primary-color,currentColor);opacity:var(--fa-primary-opacity,1)}.svg-inline--fa .fa-secondary,.svg-inline--fa.fa-swap-opacity .fa-primary{opacity:var(--fa-secondary-opacity,.4)}.svg-inline--fa .fa-secondary{fill:var(--fa-secondary-color,currentColor)}.svg-inline--fa.fa-swap-opacity .fa-secondary{opacity:var(--fa-primary-opacity,1)}.svg-inline--fa mask .fa-primary,.svg-inline--fa mask .fa-secondary{fill:#000}
data/build_client_app.sh DELETED
@@ -1,10 +0,0 @@
1
- #!/bin/bash
2
-
3
- (cd client-app && yarn && yarn ember build --environment=${1:-production})
4
-
5
- rm -f assets/javascript/*
6
- rm -f assets/stylesheets/client-app.css
7
- rm -f assets/stylesheets/vendor.css
8
-
9
- cp client-app/dist/assets/*.js assets/javascript/
10
- cp client-app/dist/assets/*.css assets/stylesheets/
@@ -1,19 +0,0 @@
1
- # EditorConfig helps developers define and maintain consistent
2
- # coding styles between different editors and IDEs
3
- # editorconfig.org
4
-
5
- root = true
6
-
7
- [*]
8
- end_of_line = lf
9
- charset = utf-8
10
- trim_trailing_whitespace = true
11
- insert_final_newline = true
12
- indent_style = space
13
- indent_size = 2
14
-
15
- [*.hbs]
16
- insert_final_newline = false
17
-
18
- [*.{diff,md}]
19
- trim_trailing_whitespace = false
@@ -1,9 +0,0 @@
1
- {
2
- /**
3
- Ember CLI sends analytics information by default. The data is completely
4
- anonymous, but there are times when you might want to disable this behavior.
5
-
6
- Setting `disableAnalytics` to true will prevent any data from being sent.
7
- */
8
- "disableAnalytics": true
9
- }
@@ -1,20 +0,0 @@
1
- # unconventional js
2
- /blueprints/*/files/
3
- /vendor/
4
-
5
- # compiled output
6
- /dist/
7
- /tmp/
8
-
9
- # dependencies
10
- /node_modules/
11
-
12
- # misc
13
- /coverage/
14
- !.*
15
- .*/
16
- .eslintcache
17
-
18
- # ember-try
19
- /.node_modules.ember-try/
20
- /package.json.ember-try
data/client-app/.eslintrc DELETED
@@ -1,10 +0,0 @@
1
- {
2
- "extends": "eslint-config-discourse",
3
- "rules": {
4
- // Temporarily disable some newer rules
5
- "ember/no-classic-components": "off",
6
- "ember/no-component-lifecycle-hooks": "off",
7
- "ember/no-get": "error",
8
- "ember/require-tagless-components": "off"
9
- }
10
- }
@@ -1,23 +0,0 @@
1
- # See https://help.github.com/ignore-files/ for more about ignoring files.
2
-
3
- # compiled output
4
- /dist/
5
- /tmp/
6
-
7
- # dependencies
8
- /node_modules/
9
-
10
- # misc
11
- /.env*
12
- /.pnp*
13
- /.sass-cache
14
- /.eslintcache
15
- /connect.lock
16
- /coverage/
17
- /libpeerconnection.log
18
- /testem.log
19
- /yarn-error.log
20
-
21
- # ember-try
22
- /.node_modules.ember-try/
23
- /package.json.ember-try
@@ -1,21 +0,0 @@
1
- # unconventional js
2
- /blueprints/*/files/
3
- /vendor/
4
-
5
- # compiled output
6
- /dist/
7
- /tmp/
8
-
9
- # dependencies
10
- /bower_components/
11
- /node_modules/
12
-
13
- # misc
14
- /coverage/
15
- !.*
16
- .eslintcache
17
-
18
- # ember-try
19
- /.node_modules.ember-try/
20
- /bower.json.ember-try
21
- /package.json.ember-try
@@ -1 +0,0 @@
1
- {}
@@ -1,10 +0,0 @@
1
- module.exports = {
2
- plugins: ["ember-template-lint-plugin-discourse"],
3
- extends: "discourse:recommended",
4
- rules: {
5
- "no-invalid-interactive": "off",
6
- "no-unbound": "off",
7
- "require-input-label": "off",
8
- "require-valid-alt-text": "off",
9
- },
10
- };
@@ -1,3 +0,0 @@
1
- {
2
- "ignore_dirs": ["tmp", "dist"]
3
- }
data/client-app/README.md DELETED
@@ -1,56 +0,0 @@
1
- # client-app
2
-
3
- This README outlines the details of collaborating on this Ember application.
4
- A short introduction of this app could easily go here.
5
-
6
- ## Prerequisites
7
-
8
- You will need the following things properly installed on your computer.
9
-
10
- * [Git](https://git-scm.com/)
11
- * [Node.js](https://nodejs.org/) (with yarn)
12
- * [Ember CLI](https://ember-cli.com/)
13
- * [Google Chrome](https://google.com/chrome/)
14
-
15
- ## Installation
16
-
17
- * `git clone <repository-url>` this repository
18
- * `cd client-app`
19
- * `yarn install`
20
-
21
- ## Running / Development
22
-
23
- * `ember serve`
24
- * Visit your app at [http://localhost:4200/logs](http://localhost:4200).
25
- * Visit your tests at [http://localhost:4200/logs/tests](http://localhost:4200/tests).
26
-
27
- ### Code Generators
28
-
29
- Make use of the many generators for code, try `ember help generate` for more details
30
-
31
- ### Running Tests
32
-
33
- * `ember test`
34
- * `ember test --server`
35
-
36
- ### Linting
37
-
38
- * `yarn lint`
39
- * `yarn lint:fix`
40
-
41
- ### Building
42
-
43
- * `ember build` (development)
44
- * `ember build --environment production` (production)
45
-
46
- ### Deploying
47
-
48
- Specify what it takes to deploy your app.
49
-
50
- ## Further Reading / Useful Links
51
-
52
- * [ember.js](https://emberjs.com/)
53
- * [ember-cli](https://ember-cli.com/)
54
- * Development Browser Extensions
55
- * [ember inspector for chrome](https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi)
56
- * [ember inspector for firefox](https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/)
@@ -1,12 +0,0 @@
1
- import Application from "@ember/application";
2
- import Resolver from "ember-resolver";
3
- import loadInitializers from "ember-load-initializers";
4
- import config from "client-app/config/environment";
5
-
6
- export default class App extends Application {
7
- modulePrefix = config.modulePrefix;
8
- podModulePrefix = config.podModulePrefix;
9
- Resolver = Resolver;
10
- }
11
-
12
- loadInitializers(App, config.modulePrefix);
@@ -1,50 +0,0 @@
1
- import classic from "ember-classic-decorator";
2
- import { tagName } from "@ember-decorators/component";
3
- import Component from "@ember/component";
4
- import { bound } from "client-app/lib/decorators";
5
- import { action } from "@ember/object";
6
-
7
- @classic
8
- @tagName("span")
9
- export default class ActionsMenu extends Component {
10
- showMenu = false;
11
-
12
- willDestroyElement() {
13
- super.willDestroyElement(...arguments);
14
- this.removeOutsideClickHandler();
15
- }
16
-
17
- @bound
18
- outsideClickHandler(event) {
19
- if (
20
- this.element &&
21
- !this.element.contains(event.target) &&
22
- this.element !== event.target
23
- ) {
24
- this.set("showMenu", false);
25
- this.updateMenu();
26
- }
27
- }
28
-
29
- updateMenu() {
30
- if (this.showMenu) {
31
- this.addOutsideClickHandler();
32
- } else {
33
- this.removeOutsideClickHandler();
34
- }
35
- }
36
-
37
- addOutsideClickHandler() {
38
- document.addEventListener("click", this.outsideClickHandler);
39
- }
40
-
41
- removeOutsideClickHandler() {
42
- document.removeEventListener("click", this.outsideClickHandler);
43
- }
44
-
45
- @action
46
- expandMenu() {
47
- this.toggleProperty("showMenu");
48
- this.updateMenu();
49
- }
50
- }
@@ -1,9 +0,0 @@
1
- import Component from "@ember/component";
2
- import { computed } from "@ember/object";
3
-
4
- export default class BackToSiteLink extends Component {
5
- @computed("attrs.text", "attrs.path")
6
- get shouldDisplay() {
7
- return this.text && this.path;
8
- }
9
- }
@@ -1,153 +0,0 @@
1
- import classic from "ember-classic-decorator";
2
- import { computed } from "@ember/object";
3
- import Component from "@ember/component";
4
- import Preloaded from "client-app/lib/preload";
5
-
6
- function appendSlash(str) {
7
- if (str && str[str.length - 1] !== "/") {
8
- return str + "/";
9
- } else {
10
- return str;
11
- }
12
- }
13
-
14
- function assembleURL({ repo, path, filename, lineNumber, commitSha = null }) {
15
- let url = appendSlash(repo);
16
-
17
- if (!/\/tree\//.test(url)) {
18
- url += "blob/";
19
- url += commitSha ? `${commitSha}/` : "master/";
20
- }
21
-
22
- url += path + filename;
23
-
24
- if (/^[0-9]+$/.test(lineNumber)) {
25
- url += `#L${lineNumber}`;
26
- }
27
-
28
- return url;
29
- }
30
-
31
- function shortenLine(line) {
32
- const isGem = line.startsWith(Preloaded.get("gems_dir"));
33
-
34
- if (isGem) {
35
- const gemsDir = Preloaded.get("gems_dir");
36
- return line.substring(gemsDir.length);
37
- } else {
38
- return line;
39
- }
40
- }
41
-
42
- @classic
43
- export default class BackTrace extends Component {
44
- @computed("env.application_version")
45
- get commitSha() {
46
- let sha = null;
47
-
48
- if (Array.isArray(this.env)) {
49
- sha = this.env.map((e) => e.application_version).filter((e) => e)[0];
50
- } else if (this.env) {
51
- sha = this.env.application_version;
52
- }
53
-
54
- return sha || Preloaded.get("application_version");
55
- }
56
-
57
- @computed("backtrace.length", "commitSha")
58
- get lines() {
59
- if (!this.backtrace || this.backtrace.length === 0) {
60
- return [];
61
- }
62
-
63
- return this.backtrace.split("\n").map((line) => {
64
- const shortenedLine = shortenLine(line);
65
- return {
66
- line: shortenedLine,
67
- url: this.findGithubURL(line, shortenedLine),
68
- };
69
- });
70
- }
71
-
72
- githubURLForGem(line) {
73
- if (!Preloaded.get("backtrace_links_enabled")) {
74
- return null;
75
- }
76
-
77
- const regexResults = line.match(/([^/]+)\/(.+\/)(.+):(\d+):.*/);
78
- const [, gemWithVersion, path, filename, lineNumber] = regexResults || [];
79
- if (!gemWithVersion) {
80
- return null;
81
- }
82
-
83
- const gemsData = Preloaded.get("gems_data");
84
- const match = gemsData
85
- .filter((g) => gemWithVersion.startsWith(`${g.name}-`))
86
- .sortBy("name.length")
87
- .reverse()[0];
88
-
89
- if (!match) {
90
- return null;
91
- }
92
-
93
- return assembleURL({ repo: match.url, path, filename, lineNumber });
94
- }
95
-
96
- githubURLForApp(line) {
97
- if (!Preloaded.get("backtrace_links_enabled")) {
98
- return null;
99
- }
100
-
101
- const projectDirs = Preloaded.get("directories");
102
- const match = projectDirs
103
- .filter((dir) => line.startsWith(dir.path))
104
- .sortBy("path.length")
105
- .reverse()[0];
106
-
107
- if (!match) {
108
- return null;
109
- }
110
-
111
- const root = appendSlash(match.path);
112
- const lineWithoutRoot = line.substring(root.length);
113
- const hasSlash = lineWithoutRoot.includes("/");
114
- let path = "";
115
- let filename;
116
- let lineNumber;
117
- let remaining;
118
-
119
- if (hasSlash) {
120
- [, path, filename, lineNumber, remaining] =
121
- lineWithoutRoot.match(/(.+\/)(.+):(\d+)(:.*)/) || [];
122
- } else {
123
- [, filename, lineNumber, remaining] =
124
- lineWithoutRoot.match(/(.+):(\d+)(:.*)/) || [];
125
- }
126
-
127
- if (!filename || !lineNumber || !remaining) {
128
- return null;
129
- }
130
-
131
- const commitSha = match.main_app ? this.commitSha : null;
132
-
133
- return assembleURL({
134
- repo: match.url,
135
- path,
136
- filename,
137
- lineNumber,
138
- commitSha,
139
- });
140
- }
141
-
142
- findGithubURL(line, shortenedLine) {
143
- const projectDirs = Preloaded.get("directories") || [];
144
- const isGem = line.startsWith(Preloaded.get("gems_dir"));
145
- const isApp = projectDirs.some((p) => line.startsWith(p.path));
146
-
147
- if (isGem || !isApp) {
148
- return this.githubURLForGem(shortenedLine);
149
- } else {
150
- return this.githubURLForApp(line);
151
- }
152
- }
153
- }
@@ -1,68 +0,0 @@
1
- import classic from "ember-classic-decorator";
2
- import { computed } from "@ember/object";
3
- import Component from "@ember/component";
4
- import { buildHashString, clone } from "client-app/lib/utilities";
5
- import Preload from "client-app/lib/preload";
6
- import { htmlSafe } from "@ember/template";
7
-
8
- @classic
9
- export default class EnvTab extends Component {
10
- @computed("currentEnvPosition", "isEnvArray", "message.env")
11
- get currentEnv() {
12
- if (this.isEnvArray) {
13
- return this.message.env[this.currentEnvPosition];
14
- } else {
15
- return this.message.env;
16
- }
17
- }
18
-
19
- @computed("message.env")
20
- get isEnvArray() {
21
- return Array.isArray(this.message.env);
22
- }
23
-
24
- @computed("currentEnv", "expanded.[]", "isEnvArray", "message.env")
25
- get html() {
26
- if (!this.isEnvArray) {
27
- return htmlSafe(buildHashString(this.message.env));
28
- }
29
-
30
- const currentEnv = clone(this.currentEnv);
31
- const expandableKeys = Preload.get("env_expandable_keys") || [];
32
-
33
- for (const key of expandableKeys) {
34
- if (
35
- Object.prototype.hasOwnProperty.call(currentEnv, key) &&
36
- !Array.isArray(currentEnv[key])
37
- ) {
38
- const list = [currentEnv[key]];
39
- for (const env of this.message.env) {
40
- if (env[key] && !list.includes(env[key])) {
41
- list.push(env[key]);
42
- }
43
- }
44
- currentEnv[key] = list.length > 1 ? list : list[0];
45
- }
46
- }
47
-
48
- return htmlSafe(buildHashString(currentEnv, false, this.expanded || []));
49
- }
50
-
51
- click(e) {
52
- const elem = e.target;
53
- const dataKey = elem.dataset.key;
54
- const expandableKeys = Preload.get("env_expandable_keys") || [];
55
-
56
- if (
57
- expandableKeys.includes(dataKey) &&
58
- elem.classList.contains("expand-list")
59
- ) {
60
- e.preventDefault();
61
- if (this.expanded) {
62
- this.expanded.pushObject(dataKey);
63
- } else {
64
- this.set("expanded", [dataKey]);
65
- }
66
- }
67
- }
68
- }