Adds abortable timeout counter to notifications#6364
Adds abortable timeout counter to notifications#6364rashidkpc merged 1 commit intoelastic:masterfrom
Conversation
608099c to
7b7c4f9
Compare
7b7c4f9 to
eda2333
Compare
|
Looks like one test failed |
src/ui/public/notify/notifier.js
Outdated
There was a problem hiding this comment.
Ideally this would be configurable, try searching the repo for "courier:maxSegmentCount" to see how it is implemented.
eda2333 to
28f6070
Compare
|
@tylersmalley In this situation, toss the review label on it and assign it back to whichever reviewer feels most appropriate. I'll take it for tomorrow, but it'll need two reviews anyway, so @spalger can take another look when he gets a chance. |
|
This doesn't seem to respect the errorLifetime setting. I changed mine to 5 seconds, but the auto-close still counts down from 300 seconds. I thought it may have been a caching bug, but it doesn't work even after a full page refresh. |
|
@epixa it appears Notifier is bootstrapped before the config is initialized. I was testing by changing defaults, so this got by me. Is this a logical change to https://github.com/elastic/kibana/pull/6364/files#diff-8441652c6398f70b4afcb491325bc8e9R20? module.run(function ($rootScope, $interval, config) {
Notifier.applyConfig({
setInterval: $interval,
clearInterval: $interval.cancel
});
$rootScope.$on('init:config', function () {
// provide alternate methods for setting intervals
// which will properly trigger digest cycles
Notifier.applyConfig({
errorLifetime: config.get('notifications:errorLifetime')
});
});
});Also, should we also add warningLifetime and infoLifetime to the advanced configuration? |
|
It'd probably be best to keep the implementation as simple as possible at first. What do you think about changing the config property to |
d4e98b9 to
73d40ec
Compare
f482501 to
8f90829
Compare
|
@epixa, I have updated the PR per our conversation. 'change:config' is only called on subsequent updates after the initialization, so we have to use two listeners the but we remove the 'init:config' listener after it has been called. |
This prevents errors from stacking up for long running dashboards. * Clicking "Auto-closing in X" dismisses timer * Clicking "More Info" dismisses timer * Timer is reset when a stack is added to the notification Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
8f90829 to
933851c
Compare
|
LGTM |
|
@tylersmalley I'm merging this and handing you another pull to make a small change |
Adds abortable timeout counter to notifications
This prevents errors from stacking up for long running dashboards.