The isRealTime() method tests if the current time range is a real-time representation.
realTime = isRealTime()
|
Boolean |
Real-time current time range indication: true = Current time range is real-time. false = Current time range is not real-time. |
onContextChange: function() { var context = this.getContext();
var search = context.get("search");
var range = search.getTimeRange();
var currentSID = search.job.getSearchId();
if (range.isRealTime() ) {
this.hide(this.PREVIEW_AND_REAL_TIME_CONFLICT);
}
else {
this.show(this.PREVIEW_AND_REAL_TIME_CONFLICT);
if (search.isJobDispatched() && !search.job.isDone() && currentSID != this.previousSID) {
search.job.setPreviewable(this.isChecked());
}
}
this.previousSID = currentSID;
},