The passContextToParent() method passes the current module context to the parent module until a parent is found that accepts the context.
Note: Be careful using this method because of the inherent complexity of contexts passing in both directions of the hierarchy.
results = passContextToParent( context )
|
context |
Object |
Module context to pass to parent. |
|
Boolean |
Context accepted indication: True = An upstream parent accepted the context. False = No upstream parent accepted the context. |
onTimestampSelect: function(event) {
var em = $(event.target);
var epoch = em.attr(this.TIMESTAMP_EPOCH_TIME_ATTRIBUTE_NAME);
if (epoch) {
epoch = parseInt(epoch, 10);
var context = new Splunk.Context();
var search = new Splunk.Search();
var range = new Splunk.TimeRange(epoch, epoch+1);
search.setTimeRange(range);
context.set("search", search);
this.passContextToParent(context);
} else {
this.logger.error("cannot continue.");
}
return false;
},