How to set duration while creating alert rule in chronograf UI

I created a simple alert rule using chronograf UI to alert on disk used percent. The chronograf UI didnt ask me to enter duration anywhere but in the tick script created it refers to duration. I can probably overwrite duration with some value in seconds by editing tick script but may be there is an easier way to set duration while creating alert. Can any one help?
My Alert Rule Tick Script created by chronograf.

var db = ‘telegraf’

var rp = ‘autogen’

var measurement = ‘disk’

var groupBy = [‘AppId’, ‘InstanceId’, ‘StackName’, ‘VPC’, ‘fstype’, ‘host’, ‘path’]

var whereFilter = lambda: TRUE

var name = ‘SampleDiskAlert’

var idVar = name + ‘:{{.Group}}’

var message = ‘Disk Used Percent Above Threshold - {{.Tags}} {{.Time}}’

var idTag = ‘alertID’

var levelTag = ‘level’

var messageField = ‘message’

var durationField = ‘duration’

var outputDB = ‘chronograf’

var outputRP = ‘autogen’

var outputMeasurement = ‘alerts’

var triggerType = ‘threshold’

var crit = 6

var data = stream
|from()
.database(db)
.retentionPolicy(rp)
.measurement(measurement)
.groupBy(groupBy)
.where(whereFilter)
|eval(lambda: “used_percent”)
.as(‘value’)

var trigger = data
|alert()
.crit(lambda: “value” > crit)
.stateChangesOnly()
.message(message)
.id(idVar)
.idTag(idTag)
.levelTag(levelTag)
.messageField(messageField)
.durationField(durationField)
.exec(’/etc/kapacitor/scripts/pub2sns.py’)

trigger
|influxDBOut()
.create()
.database(outputDB)
.retentionPolicy(outputRP)
.measurement(outputMeasurement)
.tag(‘alertName’, name)
.tag(‘triggerType’, triggerType)

trigger
|httpOut(‘output’)