I've just upgraded to Splunk 6.5.2 from 6.3.1 and the data event of the SearchManager seems to be firing twice under certain circumstances. This behaviour was not present in 6.3.1. Is this a bug? I'm aware that some of the search events have changed in 6.5 (e.g. finalized has been removed), but I can't find anything referring to this behaviour in the documentation. Some very simple code below demonstrates the problem:
JavaScript tester.js
require([
'underscore',
'jquery',
'splunkjs/mvc',
'splunkjs/mvc/searchmanager',
'splunkjs/mvc/simplexml/ready!'
], function(_, $, mvc, SearchManager) {
var searchManager = new SearchManager({
autostart: false,
search: "| makeresults"
});
searchManager.data("results").on('data', function() {
console.log("data event fired");
});
searchManager.startSearch();
});
SimpleXML tester.xml
<form script="tester.js">
<label>Tester</label>
<row>
Test of data event
</row>
</form>
Console Output
data event fired
data event fired
If I use the _bump command, and then reload the tester.xml dashboard page, the data event only fires once. If I reload the page again, it fires twice, and then continues to fire twice until I call _bump again. Has anyone experienced this issue?
... View more