logster 2.20.1 → 2.21.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.
- checksums.yaml +4 -4
- data/.rubocop.yml +4 -0
- data/CHANGELOG.md +3 -92
- data/Rakefile +1 -4
- data/assets/javascript/{chunk.524.c3042190e39d148beaf9.js → chunk.524.b7d0b89d25457a72409c.js} +4 -4
- data/assets/javascript/{chunk.582.695dcbfb11a784b110cd.js → chunk.582.5a04ae4713e692cd335a.js} +3 -3
- data/assets/javascript/client-app.js +298 -299
- data/assets/stylesheets/client-app.css +1 -1
- data/client-app/app/controllers/index.js +37 -18
- data/client-app/app/styles/app.css +69 -0
- data/client-app/app/templates/index.hbs +27 -0
- data/client-app/ember-cli-build.js +6 -0
- data/lib/logster/group.rb +2 -2
- data/lib/logster/message.rb +4 -4
- data/lib/logster/middleware/viewer.rb +1 -1
- data/lib/logster/version.rb +1 -1
- data/test/examples/test_sidekiq_reporter_example.rb +1 -1
- data/test/logster/test_group.rb +1 -1
- data/test/logster/test_message.rb +1 -1
- data/test/test_helper.rb +23 -1
- metadata +4 -4
|
@@ -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%}@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}.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}#overlay,#top-menu,#top-panel{position:fixed}.divider .line-1{top:5px}.divider .line-2,.tabs a{top:6px}.divider .line-3{top:7px}#top-panel{top:0;left:0;right:0;bottom:320px;overflow:auto}#top-panel.with-top-menu{top:35px}#top-menu{z-index:900;left:0;top:0;width:100%}.action-panel,.message-info,.nav-controls.group-nav{position:absolute;left:0;right: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{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 8px;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;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{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}#back-to-site-panel{background-color:#181818}}
|
|
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}}
|
|
@@ -15,6 +15,8 @@ export default class IndexController extends Controller {
|
|
|
15
15
|
@tracked loading = false;
|
|
16
16
|
@tracked buildingGroupingPattern = false;
|
|
17
17
|
@tracked rowMessagesForGroupingPattern = [];
|
|
18
|
+
@tracked showGroupingPatternDialog = false;
|
|
19
|
+
@tracked groupingPatternValue = "";
|
|
18
20
|
|
|
19
21
|
showDebug = getLocalStorage("showDebug", false);
|
|
20
22
|
showInfo = getLocalStorage("showInfo", false);
|
|
@@ -215,32 +217,49 @@ export default class IndexController extends Controller {
|
|
|
215
217
|
}
|
|
216
218
|
|
|
217
219
|
@action
|
|
218
|
-
|
|
220
|
+
createGroupingPatternFromSelectedRows() {
|
|
219
221
|
let match = this.findLongestMatchingPrefix(
|
|
220
222
|
this.rowMessagesForGroupingPattern
|
|
221
223
|
);
|
|
222
224
|
match = this.escapeRegExp(match);
|
|
223
225
|
|
|
224
|
-
if (
|
|
225
|
-
match.trim().length &&
|
|
226
|
-
// eslint-disable-next-line no-alert
|
|
227
|
-
confirm(
|
|
228
|
-
`Do you want to create the grouping pattern\n\n"${match}"\n\nCancel = No, OK = Create`
|
|
229
|
-
)
|
|
230
|
-
) {
|
|
231
|
-
await ajax("/patterns/grouping.json", {
|
|
232
|
-
method: "POST",
|
|
233
|
-
data: {
|
|
234
|
-
pattern: match,
|
|
235
|
-
},
|
|
236
|
-
});
|
|
237
|
-
this.rowMessagesForGroupingPattern = [];
|
|
238
|
-
this.buildingGroupingPattern = false;
|
|
239
|
-
this.model.reload();
|
|
240
|
-
} else if (!match.trim().length) {
|
|
226
|
+
if (!match.trim().length) {
|
|
241
227
|
// eslint-disable-next-line no-alert
|
|
242
228
|
alert("Can not create a grouping pattern with the given rows");
|
|
229
|
+
return;
|
|
243
230
|
}
|
|
231
|
+
|
|
232
|
+
this.groupingPatternValue = match;
|
|
233
|
+
this.showGroupingPatternDialog = true;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
@action
|
|
237
|
+
updateGroupingPatternValue(event) {
|
|
238
|
+
this.groupingPatternValue = event.target.value;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
@action
|
|
242
|
+
async confirmGroupingPattern() {
|
|
243
|
+
const pattern = this.groupingPatternValue.trim();
|
|
244
|
+
if (!pattern.length) {
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
await ajax("/patterns/grouping.json", {
|
|
249
|
+
method: "POST",
|
|
250
|
+
data: { pattern },
|
|
251
|
+
});
|
|
252
|
+
this.showGroupingPatternDialog = false;
|
|
253
|
+
this.groupingPatternValue = "";
|
|
254
|
+
this.rowMessagesForGroupingPattern = [];
|
|
255
|
+
this.buildingGroupingPattern = false;
|
|
256
|
+
this.model.reload();
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
@action
|
|
260
|
+
cancelGroupingPattern() {
|
|
261
|
+
this.showGroupingPatternDialog = false;
|
|
262
|
+
this.groupingPatternValue = "";
|
|
244
263
|
}
|
|
245
264
|
|
|
246
265
|
findLongestMatchingPrefix(strings) {
|
|
@@ -731,6 +731,60 @@ label span {
|
|
|
731
731
|
margin-top: 10px;
|
|
732
732
|
}
|
|
733
733
|
|
|
734
|
+
.grouping-pattern-dialog-overlay {
|
|
735
|
+
position: fixed;
|
|
736
|
+
z-index: 100000;
|
|
737
|
+
top: 0;
|
|
738
|
+
left: 0;
|
|
739
|
+
right: 0;
|
|
740
|
+
bottom: 0;
|
|
741
|
+
background: rgba(0, 0, 0, 0.5);
|
|
742
|
+
display: flex;
|
|
743
|
+
align-items: center;
|
|
744
|
+
justify-content: center;
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
.grouping-pattern-dialog {
|
|
748
|
+
background: #fff;
|
|
749
|
+
border-radius: 4px;
|
|
750
|
+
padding: 20px;
|
|
751
|
+
min-width: 600px;
|
|
752
|
+
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
.grouping-pattern-dialog h3 {
|
|
756
|
+
margin: 0 0 8px 0;
|
|
757
|
+
font-size: 1em;
|
|
758
|
+
font-weight: bold;
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
.grouping-pattern-dialog p {
|
|
762
|
+
margin: 0 0 10px 0;
|
|
763
|
+
font-size: 0.9em;
|
|
764
|
+
color: #555;
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
.grouping-pattern-input {
|
|
768
|
+
width: 100%;
|
|
769
|
+
box-sizing: border-box;
|
|
770
|
+
padding: 8px;
|
|
771
|
+
font-size: 1.1em;
|
|
772
|
+
font-family: monospace;
|
|
773
|
+
border: 1px solid #ccc;
|
|
774
|
+
border-radius: 3px;
|
|
775
|
+
margin-bottom: 14px;
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
.grouping-pattern-dialog-buttons {
|
|
779
|
+
display: flex;
|
|
780
|
+
justify-content: flex-end;
|
|
781
|
+
gap: 8px;
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
.grouping-pattern-dialog .btn {
|
|
785
|
+
padding: 12px;
|
|
786
|
+
}
|
|
787
|
+
|
|
734
788
|
.backtrace-line .line-link {
|
|
735
789
|
color: #9e9e9e;
|
|
736
790
|
margin-left: 3px;
|
|
@@ -826,4 +880,19 @@ label span {
|
|
|
826
880
|
#back-to-site-panel {
|
|
827
881
|
background-color: #181818;
|
|
828
882
|
}
|
|
883
|
+
|
|
884
|
+
.grouping-pattern-dialog {
|
|
885
|
+
background: #262626;
|
|
886
|
+
color: #cecece;
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
.grouping-pattern-dialog p {
|
|
890
|
+
color: #aaa;
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
.grouping-pattern-input {
|
|
894
|
+
background: #181818;
|
|
895
|
+
color: #cecece;
|
|
896
|
+
border-color: #555;
|
|
897
|
+
}
|
|
829
898
|
}
|
|
@@ -162,4 +162,31 @@
|
|
|
162
162
|
</div>
|
|
163
163
|
</div>
|
|
164
164
|
|
|
165
|
+
{{#if this.showGroupingPatternDialog}}
|
|
166
|
+
<div class="grouping-pattern-dialog-overlay">
|
|
167
|
+
<div class="grouping-pattern-dialog">
|
|
168
|
+
<h3>Create Grouping Pattern</h3>
|
|
169
|
+
<p>Edit the pattern below before creating:</p>
|
|
170
|
+
<input
|
|
171
|
+
type="text"
|
|
172
|
+
class="grouping-pattern-input"
|
|
173
|
+
value={{this.groupingPatternValue}}
|
|
174
|
+
{{on "input" this.updateGroupingPatternValue}}
|
|
175
|
+
/>
|
|
176
|
+
<div class="grouping-pattern-dialog-buttons">
|
|
177
|
+
<button
|
|
178
|
+
class="btn danger"
|
|
179
|
+
type="button"
|
|
180
|
+
{{on "click" this.cancelGroupingPattern}}
|
|
181
|
+
>Cancel</button>
|
|
182
|
+
<button
|
|
183
|
+
class="btn"
|
|
184
|
+
type="button"
|
|
185
|
+
{{on "click" this.confirmGroupingPattern}}
|
|
186
|
+
>Create</button>
|
|
187
|
+
</div>
|
|
188
|
+
</div>
|
|
189
|
+
</div>
|
|
190
|
+
{{/if}}
|
|
191
|
+
|
|
165
192
|
<PanelResizer />
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
// clean-css v3 uses util.isRegExp which was removed in Node.js 22+
|
|
4
|
+
const util = require("util");
|
|
5
|
+
if (!util.isRegExp) {
|
|
6
|
+
util.isRegExp = (value) => value instanceof RegExp;
|
|
7
|
+
}
|
|
8
|
+
|
|
3
9
|
const EmberApp = require("ember-cli/lib/broccoli/ember-app");
|
|
4
10
|
|
|
5
11
|
module.exports = function (defaults) {
|
data/lib/logster/group.rb
CHANGED
|
@@ -48,7 +48,7 @@ module Logster
|
|
|
48
48
|
end
|
|
49
49
|
|
|
50
50
|
def to_json(opts = nil)
|
|
51
|
-
JSON.
|
|
51
|
+
JSON.generate(self.to_h, opts)
|
|
52
52
|
end
|
|
53
53
|
|
|
54
54
|
def add_message(message)
|
|
@@ -109,7 +109,7 @@ module Logster
|
|
|
109
109
|
GroupWeb =
|
|
110
110
|
Struct.new(*%i[regex count timestamp messages row_id]) do
|
|
111
111
|
def to_json(opts = nil)
|
|
112
|
-
JSON.
|
|
112
|
+
JSON.generate(self.to_h.merge(severity: -1, group: true), opts)
|
|
113
113
|
end
|
|
114
114
|
|
|
115
115
|
def key
|
data/lib/logster/message.rb
CHANGED
|
@@ -65,7 +65,7 @@ module Logster
|
|
|
65
65
|
|
|
66
66
|
def to_json(opts = nil)
|
|
67
67
|
exclude_env = Hash === opts && opts.delete(:exclude_env)
|
|
68
|
-
JSON.
|
|
68
|
+
JSON.generate(to_h(exclude_env: exclude_env), opts)
|
|
69
69
|
end
|
|
70
70
|
|
|
71
71
|
def self.from_json(json)
|
|
@@ -134,7 +134,7 @@ module Logster
|
|
|
134
134
|
|
|
135
135
|
# todo - memoize?
|
|
136
136
|
def grouping_key
|
|
137
|
-
Digest::SHA1.hexdigest JSON.
|
|
137
|
+
Digest::SHA1.hexdigest JSON.generate grouping_hash
|
|
138
138
|
end
|
|
139
139
|
|
|
140
140
|
# todo - memoize?
|
|
@@ -273,10 +273,10 @@ module Logster
|
|
|
273
273
|
protected
|
|
274
274
|
|
|
275
275
|
def truncate_env(env, limit)
|
|
276
|
-
if JSON.
|
|
276
|
+
if JSON.generate(env).bytesize > limit
|
|
277
277
|
sizes = {}
|
|
278
278
|
braces = "{}".bytesize
|
|
279
|
-
env.each { |k, v| sizes[k] = JSON.
|
|
279
|
+
env.each { |k, v| sizes[k] = JSON.generate(k => v).bytesize - braces }
|
|
280
280
|
sorted = env.keys.sort { |a, b| sizes[a] <=> sizes[b] }
|
|
281
281
|
|
|
282
282
|
kept_keys = []
|
data/lib/logster/version.rb
CHANGED
|
@@ -6,7 +6,7 @@ require "logster/redis_store"
|
|
|
6
6
|
require "logger"
|
|
7
7
|
require "examples/sidekiq_logster_reporter"
|
|
8
8
|
|
|
9
|
-
class TestSidekiqReporter <
|
|
9
|
+
class TestSidekiqReporter < Minitest::Test
|
|
10
10
|
def setup
|
|
11
11
|
Logster.store = @store = Logster::RedisStore.new(Redis.new)
|
|
12
12
|
Logster.logger = @logger = Logster::Logger.new(Logster.store)
|
data/test/logster/test_group.rb
CHANGED
data/test/test_helper.rb
CHANGED
|
@@ -1,9 +1,31 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require "minitest"
|
|
4
|
-
require "minitest/unit"
|
|
5
4
|
require "minitest/autorun"
|
|
6
5
|
require "minitest/pride"
|
|
6
|
+
|
|
7
|
+
module StubSupport
|
|
8
|
+
def stub(method_name, value_or_callable = nil, &block)
|
|
9
|
+
original = method(method_name)
|
|
10
|
+
define_singleton_method(method_name) do |*args, &blk|
|
|
11
|
+
value_or_callable.respond_to?(:call) ? value_or_callable.call(*args, &blk) : value_or_callable
|
|
12
|
+
end
|
|
13
|
+
yield self
|
|
14
|
+
ensure
|
|
15
|
+
begin
|
|
16
|
+
singleton_class.undef_method(method_name)
|
|
17
|
+
rescue StandardError
|
|
18
|
+
nil
|
|
19
|
+
end
|
|
20
|
+
begin
|
|
21
|
+
define_singleton_method(method_name, original)
|
|
22
|
+
rescue StandardError
|
|
23
|
+
nil
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
Module.include StubSupport
|
|
7
29
|
require "redis"
|
|
8
30
|
require "logster"
|
|
9
31
|
require "logster/base_store"
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: logster
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.21.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sam Saffron
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-04-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -186,8 +186,8 @@ files:
|
|
|
186
186
|
- assets/images/icon_144x144.png
|
|
187
187
|
- assets/images/icon_64x64.png
|
|
188
188
|
- assets/javascript/.gitkeep
|
|
189
|
-
- assets/javascript/chunk.524.
|
|
190
|
-
- assets/javascript/chunk.582.
|
|
189
|
+
- assets/javascript/chunk.524.b7d0b89d25457a72409c.js
|
|
190
|
+
- assets/javascript/chunk.582.5a04ae4713e692cd335a.js
|
|
191
191
|
- assets/javascript/chunk.747.a730c497582bb6742a6e.js
|
|
192
192
|
- assets/javascript/chunk.761.64949d89942c829e5c1b.js
|
|
193
193
|
- assets/javascript/client-app.js
|