logster 2.11.3 → 2.12.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +72 -11
- data/.gitignore +2 -0
- data/CHANGELOG.md +13 -3
- data/README.md +8 -0
- data/assets/javascript/.gitkeep +0 -0
- data/assets/javascript/chunk.143.2faa04830259ce9aa59a.js +22 -0
- data/assets/javascript/chunk.178.ca5ade1d8cbdbfbe6d72.js +22 -0
- data/assets/javascript/chunk.468.95dd450003497c781cb3.js +1213 -0
- data/assets/javascript/chunk.916.85a3fc9d873df80f5ea5.js +579 -0
- data/assets/javascript/client-app.js +1261 -276
- data/assets/javascript/vendor.js +4199 -3514
- data/assets/stylesheets/.gitkeep +0 -0
- data/assets/stylesheets/client-app.css +1 -1
- data/assets/stylesheets/vendor.css +1 -1
- data/build_client_app.sh +6 -8
- data/client-app/.editorconfig +0 -1
- data/client-app/.eslintignore +2 -0
- data/client-app/.eslintrc +10 -0
- data/client-app/.gitignore +1 -1
- data/client-app/.prettierignore +21 -0
- data/client-app/.prettierrc +1 -0
- data/client-app/.template-lintrc.js +10 -0
- data/client-app/README.md +4 -5
- data/client-app/app/app.js +2 -2
- data/client-app/app/components/actions-menu.js +21 -21
- data/client-app/app/components/back-trace.js +89 -90
- data/client-app/app/components/env-tab.js +41 -29
- data/client-app/app/components/message-info.js +78 -75
- data/client-app/app/components/message-row.js +20 -17
- data/client-app/app/components/page-nav.js +33 -24
- data/client-app/app/components/panel-resizer.js +53 -37
- data/client-app/app/components/patterns-list.js +101 -84
- data/client-app/app/components/tab-contents.js +15 -19
- data/client-app/app/components/tabbed-section.js +30 -18
- data/client-app/app/components/time-formatter.js +29 -18
- data/client-app/app/controllers/index.js +143 -119
- data/client-app/app/controllers/show.js +17 -13
- data/client-app/app/helpers/or.js +1 -1
- data/client-app/app/initializers/app-init.js +23 -34
- data/client-app/app/lib/decorators.js +4 -2
- data/client-app/app/lib/preload.js +7 -4
- data/client-app/app/lib/utilities.js +55 -54
- data/client-app/app/models/group.js +20 -15
- data/client-app/app/models/message-collection.js +153 -148
- data/client-app/app/models/message.js +60 -58
- data/client-app/app/models/pattern-item.js +24 -22
- data/client-app/app/router.js +2 -2
- data/client-app/app/routes/index.js +19 -12
- data/client-app/app/routes/settings.js +12 -10
- data/client-app/app/routes/show.js +6 -4
- data/client-app/app/services/events.js +4 -0
- data/client-app/app/styles/app.css +2 -0
- data/client-app/app/templates/application.hbs +1 -2
- data/client-app/app/templates/components/actions-menu.hbs +23 -8
- data/client-app/app/templates/components/back-trace.hbs +10 -3
- data/client-app/app/templates/components/env-tab.hbs +9 -7
- data/client-app/app/templates/components/message-info.hbs +65 -34
- data/client-app/app/templates/components/message-row.hbs +25 -8
- data/client-app/app/templates/components/page-nav.hbs +34 -10
- data/client-app/app/templates/components/panel-resizer.hbs +3 -3
- data/client-app/app/templates/components/patterns-list.hbs +54 -20
- data/client-app/app/templates/components/tabbed-section.hbs +12 -4
- data/client-app/app/templates/components/time-formatter.hbs +1 -1
- data/client-app/app/templates/index.hbs +100 -78
- data/client-app/app/templates/settings.hbs +30 -19
- data/client-app/app/templates/show.hbs +9 -8
- data/client-app/config/ember-cli-update.json +18 -0
- data/client-app/config/environment.js +13 -13
- data/client-app/config/icons.js +3 -3
- data/client-app/config/targets.js +16 -8
- data/client-app/ember-cli-build.js +4 -4
- data/client-app/package.json +43 -30
- data/client-app/testem.js +16 -17
- data/client-app/tests/index.html +8 -1
- data/client-app/tests/integration/components/back-trace-test.js +32 -26
- data/client-app/tests/integration/components/env-tab-test.js +79 -53
- data/client-app/tests/integration/components/message-info-test.js +25 -23
- data/client-app/tests/integration/components/patterns-list-test.js +14 -11
- data/client-app/tests/test-helper.js +8 -4
- data/client-app/tests/unit/controllers/index-test.js +32 -16
- data/client-app/tests/unit/controllers/show-test.js +5 -5
- data/client-app/tests/unit/routes/index-test.js +5 -5
- data/client-app/tests/unit/routes/show-test.js +5 -5
- data/client-app/yarn.lock +9673 -0
- data/lib/logster/middleware/viewer.rb +12 -12
- data/lib/logster/version.rb +1 -1
- data/logster.gemspec +6 -3
- data/test/logster/middleware/test_viewer.rb +14 -8
- metadata +15 -6
- data/client-app/.eslintrc.js +0 -60
- data/client-app/.travis.yml +0 -28
- data/client-app/app/components/update-time.js +0 -21
- data/client-app/package-lock.json +0 -39196
File without changes
|
@@ -1 +1 @@
|
|
1
|
-
|
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%}.message-row{font-family:Roboto;display:flex}.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}.btn,.tabs a{text-decoration:none;color:#333}.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}#overlay,.divider{cursor:row-resize}#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}.divider div{margin:auto;width:24px;height:1px;background-color:#ccc;position:relative}.divider .line-1{top:5px}.divider .line-2,.tabs a{top:6px}.divider .line-3{top:7px}#top-panel{position:fixed;top:0;left:0;right:0;bottom:320px;overflow:auto}.action-panel,.message-info,.nav-controls.group-nav{position:absolute;left:0;right:0}.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:18px}.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;opacity:0}.message-info .content,.tabs{position:absolute;left:0;right:0}.message-info .content{top:0;bottom:35px;overflow:auto;display:none}.message-info .content.active{display:block}.tabs{bottom:13px;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{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 12px;font-size:1em;line-height:0;text-align:center;cursor:pointer;transition:all .25s;background-color:#ddd;border:none;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;margin:0 7px;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{flex-grow:0;flex-shrink:0}@media (min-width:771px){.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:770px){.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{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 .checkbox{margin:0}.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}.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}}
|
@@ -1 +1 @@
|
|
1
|
-
.svg-inline--fa,svg:not(:root).svg-inline--fa{overflow:visible}.fa-inverse,.fa-layers-counter,.fad.fa-inverse{color:#fff}.svg-inline--fa{display:inline-block;font-size:inherit;height:1em;vertical-align:-.125em}.svg-inline--fa.fa-lg{vertical-align:-.225em}.svg-inline--fa.fa-w-1{width:.0625em}.svg-inline--fa.fa-w-2{width:.125em}.svg-inline--fa.fa-w-3{width:.1875em}.svg-inline--fa.fa-w-4{width:.25em}.svg-inline--fa.fa-w-5{width:.3125em}.svg-inline--fa.fa-w-6{width:.375em}.svg-inline--fa.fa-w-7{width:.4375em}.svg-inline--fa.fa-w-8{width:.5em}.svg-inline--fa.fa-w-9{width:.5625em}.svg-inline--fa.fa-w-10{width:.625em}.svg-inline--fa.fa-w-11{width:.6875em}.svg-inline--fa.fa-w-12{width:.75em}.svg-inline--fa.fa-w-13{width:.8125em}.svg-inline--fa.fa-w-14{width:.875em}.svg-inline--fa.fa-w-15{width:.9375em}.svg-inline--fa.fa-w-16{width:1em}.svg-inline--fa.fa-w-17{width:1.0625em}.svg-inline--fa.fa-w-18{width:1.125em}.svg-inline--fa.fa-w-19{width:1.1875em}.svg-inline--fa.fa-w-20{width:1.25em}.svg-inline--fa.fa-pull-left{margin-right:.3em;width:auto}.svg-inline--fa.fa-pull-right{margin-left:.3em;width:auto}.svg-inline--fa.fa-border{height:1.5em}.svg-inline--fa.fa-li{width:2em}.svg-inline--fa.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,.fa-stack,.fa-ul>li{position:relative}.fa-layers{display:inline-block;height:1em;text-align:center;vertical-align:-.125em;width:1em}.fa-layers-counter,.fa-layers-text{display:inline-block;position:absolute;text-align:center}.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:#ff253a;border-radius:1em;-webkit-box-sizing:border-box;box-sizing:border-box;height:1.5em;line-height:1;max-width:5em;min-width:1.5em;overflow:hidden;padding:.25em;right:0;text-overflow:ellipsis;top:0;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:top right;transform-origin:top right}.fa-layers-bottom-right{bottom:0;right:0;top:auto;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:bottom right;transform-origin:bottom right}.fa-layers-bottom-left{bottom:0;left:0;right:auto;top:auto;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:bottom left;transform-origin:bottom left}.fa-layers-top-right{right:0;top:0;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:top right;transform-origin:top right}.fa-layers-top-left{left:0;right:auto;top:0;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:top left;transform-origin:top left}.fa-lg{font-size:1.3333333333em;line-height:.75em;vertical-align:-.0667em}.fa-xs{font-size:.75em}.fa-sm{font-size:.875em}.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-fw{text-align:center;width:1.25em}.fa-ul{list-style-type:none;margin-left:2.5em;padding-left:0}.fa-li{left:-2em;position:absolute;text-align:center;width:2em;line-height:inherit}.fa-border{border:.08em solid #eee;border-radius:.1em;padding:.2em .25em .15em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left,.fab.fa-pull-left,.fal.fa-pull-left,.far.fa-pull-left,.fas.fa-pull-left{margin-right:.3em}.fa.fa-pull-right,.fab.fa-pull-right,.fal.fa-pull-right,.far.fa-pull-right,.fas.fa-pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-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{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1,-1);transform:scale(1,-1)}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(-1,-1);transform:scale(-1,-1)}:root .fa-flip-both,:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-rotate-90{-webkit-filter:none;filter:none}.fa-stack{display:inline-block;height:2em;width:2.5em}.fa-stack-1x,.fa-stack-2x{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0}.svg-inline--fa.fa-stack-1x{height:1em;width:1.25em}.svg-inline--fa.fa-stack-2x{height:2em;width:2.5em}.sr-only{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.sr-only-focusable:active,.sr-only-focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.svg-inline--fa .fa-primary{fill:var(--fa-primary-color,currentColor);opacity:1;opacity:var(--fa-primary-opacity,1)}.svg-inline--fa .fa-secondary{fill:var(--fa-secondary-color,currentColor);opacity:.4;opacity:var(--fa-secondary-opacity,.4)}.svg-inline--fa.fa-swap-opacity .fa-primary{opacity:.4;opacity:var(--fa-secondary-opacity,.4)}.svg-inline--fa.fa-swap-opacity .fa-secondary{opacity:1;opacity:var(--fa-primary-opacity,1)}.svg-inline--fa mask .fa-primary,.svg-inline--fa mask .fa-secondary{fill:#000}
|
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
CHANGED
@@ -1,12 +1,10 @@
|
|
1
1
|
#!/bin/bash
|
2
2
|
|
3
|
-
(cd client-app &&
|
3
|
+
(cd client-app && yarn && yarn ember build --environment=${1:-production})
|
4
4
|
|
5
|
-
rm assets/javascript/*
|
6
|
-
rm assets/stylesheets/client-app.css
|
7
|
-
rm assets/stylesheets/vendor.css
|
5
|
+
rm -f assets/javascript/*
|
6
|
+
rm -f assets/stylesheets/client-app.css
|
7
|
+
rm -f assets/stylesheets/vendor.css
|
8
8
|
|
9
|
-
cp client-app/dist/assets
|
10
|
-
cp client-app/dist/assets
|
11
|
-
cp client-app/dist/assets/client-app.css assets/stylesheets/client-app.css
|
12
|
-
cp client-app/dist/assets/vendor.css assets/stylesheets/vendor.css
|
9
|
+
cp client-app/dist/assets/*.js assets/javascript/
|
10
|
+
cp client-app/dist/assets/*.css assets/stylesheets/
|
data/client-app/.editorconfig
CHANGED
data/client-app/.eslintignore
CHANGED
@@ -0,0 +1,10 @@
|
|
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
|
+
}
|
data/client-app/.gitignore
CHANGED
@@ -0,0 +1,21 @@
|
|
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
|
@@ -0,0 +1 @@
|
|
1
|
+
{}
|
data/client-app/README.md
CHANGED
@@ -8,7 +8,7 @@ A short introduction of this app could easily go here.
|
|
8
8
|
You will need the following things properly installed on your computer.
|
9
9
|
|
10
10
|
* [Git](https://git-scm.com/)
|
11
|
-
* [Node.js](https://nodejs.org/) (with
|
11
|
+
* [Node.js](https://nodejs.org/) (with yarn)
|
12
12
|
* [Ember CLI](https://ember-cli.com/)
|
13
13
|
* [Google Chrome](https://google.com/chrome/)
|
14
14
|
|
@@ -16,7 +16,7 @@ You will need the following things properly installed on your computer.
|
|
16
16
|
|
17
17
|
* `git clone <repository-url>` this repository
|
18
18
|
* `cd client-app`
|
19
|
-
* `
|
19
|
+
* `yarn install`
|
20
20
|
|
21
21
|
## Running / Development
|
22
22
|
|
@@ -35,9 +35,8 @@ Make use of the many generators for code, try `ember help generate` for more det
|
|
35
35
|
|
36
36
|
### Linting
|
37
37
|
|
38
|
-
* `
|
39
|
-
* `
|
40
|
-
* `npm run lint:js -- --fix`
|
38
|
+
* `yarn lint`
|
39
|
+
* `yarn lint:fix`
|
41
40
|
|
42
41
|
### Building
|
43
42
|
|
data/client-app/app/app.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import Application from "@ember/application";
|
2
|
-
import Resolver from "
|
2
|
+
import Resolver from "ember-resolver";
|
3
3
|
import loadInitializers from "ember-load-initializers";
|
4
|
-
import config from "
|
4
|
+
import config from "client-app/config/environment";
|
5
5
|
|
6
6
|
export default class App extends Application {
|
7
7
|
modulePrefix = config.modulePrefix;
|
@@ -1,9 +1,18 @@
|
|
1
|
+
import classic from "ember-classic-decorator";
|
2
|
+
import { tagName } from "@ember-decorators/component";
|
1
3
|
import Component from "@ember/component";
|
2
4
|
import { bound } from "client-app/lib/decorators";
|
5
|
+
import { action } from "@ember/object";
|
3
6
|
|
4
|
-
|
5
|
-
|
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
|
+
}
|
7
16
|
|
8
17
|
@bound
|
9
18
|
outsideClickHandler(event) {
|
@@ -15,7 +24,7 @@ export default Component.extend({
|
|
15
24
|
this.set("showMenu", false);
|
16
25
|
this.updateMenu();
|
17
26
|
}
|
18
|
-
}
|
27
|
+
}
|
19
28
|
|
20
29
|
updateMenu() {
|
21
30
|
if (this.showMenu) {
|
@@ -23,28 +32,19 @@ export default Component.extend({
|
|
23
32
|
} else {
|
24
33
|
this.removeOutsideClickHandler();
|
25
34
|
}
|
26
|
-
}
|
35
|
+
}
|
27
36
|
|
28
37
|
addOutsideClickHandler() {
|
29
38
|
document.addEventListener("click", this.outsideClickHandler);
|
30
|
-
}
|
39
|
+
}
|
31
40
|
|
32
41
|
removeOutsideClickHandler() {
|
33
42
|
document.removeEventListener("click", this.outsideClickHandler);
|
34
|
-
}
|
35
|
-
|
36
|
-
willDestroyElement() {
|
37
|
-
this._super(...arguments);
|
38
|
-
this.removeOutsideClickHandler();
|
39
|
-
},
|
43
|
+
}
|
40
44
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
},
|
46
|
-
share() {
|
47
|
-
this.share();
|
48
|
-
}
|
45
|
+
@action
|
46
|
+
expandMenu() {
|
47
|
+
this.toggleProperty("showMenu");
|
48
|
+
this.updateMenu();
|
49
49
|
}
|
50
|
-
}
|
50
|
+
}
|
@@ -1,17 +1,7 @@
|
|
1
|
+
import classic from "ember-classic-decorator";
|
2
|
+
import { computed } from "@ember/object";
|
1
3
|
import Component from "@ember/component";
|
2
4
|
import Preloaded from "client-app/lib/preload";
|
3
|
-
import { computed } from "@ember/object";
|
4
|
-
|
5
|
-
function startsWith(str, search) {
|
6
|
-
if (!str || !search || search.length > str.length) {
|
7
|
-
return false;
|
8
|
-
}
|
9
|
-
return str.substring(0, search.length) === search;
|
10
|
-
}
|
11
|
-
|
12
|
-
function backtraceLinksEnabled() {
|
13
|
-
return Preloaded.get("backtrace_links_enabled");
|
14
|
-
}
|
15
5
|
|
16
6
|
function appendSlash(str) {
|
17
7
|
if (str && str[str.length - 1] !== "/") {
|
@@ -23,19 +13,24 @@ function appendSlash(str) {
|
|
23
13
|
|
24
14
|
function assembleURL({ repo, path, filename, lineNumber, commitSha = null }) {
|
25
15
|
let url = appendSlash(repo);
|
16
|
+
|
26
17
|
if (!/\/tree\//.test(url)) {
|
27
18
|
url += "blob/";
|
28
19
|
url += commitSha ? `${commitSha}/` : "master/";
|
29
20
|
}
|
21
|
+
|
30
22
|
url += path + filename;
|
23
|
+
|
31
24
|
if (/^[0-9]+$/.test(lineNumber)) {
|
32
25
|
url += `#L${lineNumber}`;
|
33
26
|
}
|
27
|
+
|
34
28
|
return url;
|
35
29
|
}
|
36
30
|
|
37
31
|
function shortenLine(line) {
|
38
|
-
const isGem = startsWith(
|
32
|
+
const isGem = line.startsWith(Preloaded.get("gems_dir"));
|
33
|
+
|
39
34
|
if (isGem) {
|
40
35
|
const gemsDir = Preloaded.get("gems_dir");
|
41
36
|
return line.substring(gemsDir.length);
|
@@ -44,107 +39,111 @@ function shortenLine(line) {
|
|
44
39
|
}
|
45
40
|
}
|
46
41
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
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;
|
52
75
|
}
|
53
76
|
|
54
77
|
const regexResults = line.match(/([^/]+)\/(.+\/)(.+):(\d+):.*/);
|
55
78
|
const [, gemWithVersion, path, filename, lineNumber] = regexResults || [];
|
56
79
|
const gemsData = Preloaded.get("gems_data");
|
57
80
|
const match = gemsData
|
58
|
-
.filter(g => startsWith(
|
81
|
+
.filter((g) => gemWithVersion.startsWith(`${g.name}-`))
|
59
82
|
.sortBy("name.length")
|
60
83
|
.reverse()[0];
|
61
84
|
|
62
|
-
if (match) {
|
63
|
-
|
85
|
+
if (!match) {
|
86
|
+
return null;
|
64
87
|
}
|
65
|
-
return url;
|
66
|
-
},
|
67
88
|
|
68
|
-
|
69
|
-
|
89
|
+
return assembleURL({ repo: match.url, path, filename, lineNumber });
|
90
|
+
}
|
70
91
|
|
71
|
-
|
72
|
-
|
92
|
+
githubURLForApp(line) {
|
93
|
+
if (!Preloaded.get("backtrace_links_enabled")) {
|
94
|
+
return null;
|
73
95
|
}
|
74
96
|
|
75
97
|
const projectDirs = Preloaded.get("directories");
|
76
|
-
|
77
98
|
const match = projectDirs
|
78
|
-
.filter(dir => startsWith(
|
99
|
+
.filter((dir) => line.startsWith(dir.path))
|
79
100
|
.sortBy("path.length")
|
80
101
|
.reverse()[0];
|
81
102
|
|
82
|
-
if (match) {
|
83
|
-
|
84
|
-
const lineWithoutRoot = line.substring(root.length);
|
85
|
-
|
86
|
-
let path = "",
|
87
|
-
filename,
|
88
|
-
lineNumber,
|
89
|
-
remaining;
|
90
|
-
|
91
|
-
const hasSlash = lineWithoutRoot.indexOf("/") !== -1;
|
92
|
-
const regex = hasSlash ? /(.+\/)(.+):(\d+)(:.*)/ : /(.+):(\d+)(:.*)/;
|
93
|
-
|
94
|
-
if (hasSlash) {
|
95
|
-
[, path, filename, lineNumber, remaining] =
|
96
|
-
lineWithoutRoot.match(regex) || [];
|
97
|
-
} else {
|
98
|
-
[, filename, lineNumber, remaining] =
|
99
|
-
lineWithoutRoot.match(regex) || [];
|
100
|
-
}
|
101
|
-
|
102
|
-
if (filename && lineNumber && remaining) {
|
103
|
-
const commitSha = match.main_app ? this.commitSha : null;
|
104
|
-
|
105
|
-
url = assembleURL({
|
106
|
-
repo: match.url,
|
107
|
-
path,
|
108
|
-
filename,
|
109
|
-
lineNumber,
|
110
|
-
commitSha
|
111
|
-
});
|
112
|
-
}
|
103
|
+
if (!match) {
|
104
|
+
return null;
|
113
105
|
}
|
114
|
-
return url;
|
115
|
-
},
|
116
106
|
|
117
|
-
|
118
|
-
const
|
119
|
-
const
|
120
|
-
|
121
|
-
|
122
|
-
|
107
|
+
const root = appendSlash(match.path);
|
108
|
+
const lineWithoutRoot = line.substring(root.length);
|
109
|
+
const hasSlash = lineWithoutRoot.includes("/");
|
110
|
+
let path = "";
|
111
|
+
let filename;
|
112
|
+
let lineNumber;
|
113
|
+
let remaining;
|
114
|
+
|
115
|
+
if (hasSlash) {
|
116
|
+
[, path, filename, lineNumber, remaining] =
|
117
|
+
lineWithoutRoot.match(/(.+\/)(.+):(\d+)(:.*)/) || [];
|
123
118
|
} else {
|
124
|
-
|
119
|
+
[, filename, lineNumber, remaining] =
|
120
|
+
lineWithoutRoot.match(/(.+):(\d+)(:.*)/) || [];
|
125
121
|
}
|
126
|
-
},
|
127
122
|
|
128
|
-
|
129
|
-
|
130
|
-
if (Array.isArray(this.env)) {
|
131
|
-
env = this.env.map(e => e.application_version).filter(e => e)[0];
|
132
|
-
} else if (this.env) {
|
133
|
-
env = this.env.application_version;
|
123
|
+
if (!filename || !lineNumber || !remaining) {
|
124
|
+
return null;
|
134
125
|
}
|
135
|
-
return env || Preloaded.get("application_version");
|
136
|
-
}),
|
137
126
|
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
url: this.findGithubURL(line, shortenedLine)
|
147
|
-
};
|
127
|
+
const commitSha = match.main_app ? this.commitSha : null;
|
128
|
+
|
129
|
+
return assembleURL({
|
130
|
+
repo: match.url,
|
131
|
+
path,
|
132
|
+
filename,
|
133
|
+
lineNumber,
|
134
|
+
commitSha,
|
148
135
|
});
|
149
|
-
}
|
150
|
-
|
136
|
+
}
|
137
|
+
|
138
|
+
findGithubURL(line, shortenedLine) {
|
139
|
+
const projectDirs = Preloaded.get("directories") || [];
|
140
|
+
const isGem = line.startsWith(Preloaded.get("gems_dir"));
|
141
|
+
const isApp = projectDirs.some((p) => line.startsWith(p.path));
|
142
|
+
|
143
|
+
if (isGem || !isApp) {
|
144
|
+
return this.githubURLForGem(shortenedLine);
|
145
|
+
} else {
|
146
|
+
return this.githubURLForApp(line);
|
147
|
+
}
|
148
|
+
}
|
149
|
+
}
|
@@ -1,56 +1,68 @@
|
|
1
|
-
import
|
1
|
+
import classic from "ember-classic-decorator";
|
2
2
|
import { computed } from "@ember/object";
|
3
|
+
import Component from "@ember/component";
|
3
4
|
import { buildHashString, clone } from "client-app/lib/utilities";
|
4
5
|
import Preload from "client-app/lib/preload";
|
6
|
+
import { htmlSafe } from "@ember/template";
|
5
7
|
|
6
|
-
|
7
|
-
|
8
|
+
@classic
|
9
|
+
export default class EnvTab extends Component {
|
10
|
+
@computed("currentEnvPosition", "isEnvArray", "message.env")
|
11
|
+
get currentEnv() {
|
8
12
|
if (this.isEnvArray) {
|
9
13
|
return this.message.env[this.currentEnvPosition];
|
10
14
|
} else {
|
11
15
|
return this.message.env;
|
12
16
|
}
|
13
|
-
}
|
17
|
+
}
|
14
18
|
|
15
|
-
|
16
|
-
|
17
|
-
|
19
|
+
@computed("message.env")
|
20
|
+
get isEnvArray() {
|
21
|
+
return Array.isArray(this.message.env);
|
22
|
+
}
|
18
23
|
|
19
|
-
|
24
|
+
@computed("currentEnv", "expanded.[]", "isEnvArray", "message.env")
|
25
|
+
get html() {
|
20
26
|
if (!this.isEnvArray) {
|
21
|
-
return buildHashString(this.
|
22
|
-
}
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
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
|
+
}
|
34
43
|
}
|
35
|
-
|
36
|
-
|
44
|
+
currentEnv[key] = list.length > 1 ? list : list[0];
|
45
|
+
}
|
37
46
|
}
|
38
|
-
|
47
|
+
|
48
|
+
return htmlSafe(buildHashString(currentEnv, false, this.expanded || []));
|
49
|
+
}
|
39
50
|
|
40
51
|
click(e) {
|
41
52
|
const elem = e.target;
|
42
53
|
const dataKey = elem.dataset.key;
|
43
54
|
const expandableKeys = Preload.get("env_expandable_keys") || [];
|
55
|
+
|
44
56
|
if (
|
45
|
-
expandableKeys.
|
57
|
+
expandableKeys.includes(dataKey) &&
|
46
58
|
elem.classList.contains("expand-list")
|
47
59
|
) {
|
48
60
|
e.preventDefault();
|
49
|
-
if (
|
50
|
-
this.set("expanded", [dataKey]);
|
51
|
-
} else {
|
61
|
+
if (this.expanded) {
|
52
62
|
this.expanded.pushObject(dataKey);
|
63
|
+
} else {
|
64
|
+
this.set("expanded", [dataKey]);
|
53
65
|
}
|
54
66
|
}
|
55
67
|
}
|
56
|
-
}
|
68
|
+
}
|