Application Framework Reference

Splunk API

isRealTime()

The isRealTime() method tests if the current time range is a real-time representation.

Synopsis

realTime = isRealTime()

Return Value

Boolean

Real-time current time range indication:

true = Current time range is real-time.

false = Current time range is not real-time.

Example

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;
},
 

See Also

containsRange()
containsTime()
equalToRange()
getDuration()
isAbsolute()
isAllTime()
isRelative()