var deps = [
"jquery",
"splunkjs/ready!",
"splunkjs/mvc/searchmanager"
];
require(deps, function(mvc) {
// Load individual components
var SearchManager = require("splunkjs/mvc/searchmanager");
// Create the search manager
var mysearch = new SearchManager({
id: "search1",
app: "search",
earliest_time: "-7d@d",
latest_time: "now",
cache: false,
search: "index="test_summary" | eval result = 99999 | fields result"
});
mysearch.on('search:failed', function(properties) {
// Print the entire properties object
console.log("FAILED:", properties);
$("#aa").text("Failed!");
});
mysearch.on('search:progress', function(properties) {
// Print just the event count from the search job
console.log("IN PROGRESS.\nEvents so far:", properties.content.eventCount);
$("#aa").text("In progress with " + properties.content.eventCount + " events...");
});
mysearch.on('search:done', function(properties) {
// Print the search job properties
console.log("DONE!\nSearch job properties:", properties.content);
$("#aa").text("Done!"+properties.content);
});
});
I want to output the result to the spl ("# aa").
How do I output the results of the spl?
... View more