Skip to content
This repository has been archived by the owner on Oct 30, 2021. It is now read-only.

Commit

Permalink
Merge pull request #10 from sirensolutions/issue9
Browse files Browse the repository at this point in the history
mark search source as inactive when destroying timeline #9
  • Loading branch information
scampi committed Mar 8, 2016
2 parents 8b9e5cf + bef5b4e commit 8f8ee8d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions public/kibi_timeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ define(function (require) {
require('ui/modules').get('kibana').directive('kibiTimeline', function (Private, createNotifier, courier) {

var filterManager = Private(require('ui/filter_manager/filter_manager'));
var requestQueue = Private(require('./lib/courier/_request_queue_wrapped'));
var notify = createNotifier({
location: 'Kibi Timeline'
});
Expand Down Expand Up @@ -235,6 +236,9 @@ define(function (require) {


$element.on('$destroy', function () {
_.each($scope.groups, (group) => {
requestQueue.markAllRequestsWithSourceIdAsInactive(group.searchSource._id);
});
if (timeline) {
timeline.off('select', onSelect);
}
Expand Down
2 changes: 1 addition & 1 deletion public/kibi_timeline_vis_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ define(function (require) {
initOptions($scope.savedVis);
});

$scope.$watch('vis', function () {
$scope.$watch('savedVis', function () {
if ($scope.savedVis) {
initOptions($scope.savedVis);
initSearchSources($scope.savedVis);
Expand Down

0 comments on commit 8f8ee8d

Please sign in to comment.