mirror of
https://github.com/status-im/cabot.git
synced 2025-02-24 18:38:07 +00:00
Add a delay in updateGraphiteData before making the backend call (#354)
This commit is contained in:
parent
dbe45f9b20
commit
718120c056
@ -36,7 +36,11 @@ GRAPHITE_ENDPOINT = '/graphite/'
|
||||
|
||||
$(document).ready ->
|
||||
updateGraphiteData()
|
||||
$('#id_metric').on('keyup', updateGraphiteData)
|
||||
$('#id_metric').on('keyup', complete)
|
||||
|
||||
complete = () ->
|
||||
clearTimeout(timer)
|
||||
timer = setTimeout(updateGraphiteData, 1000)
|
||||
|
||||
$('#id_metric').autocomplete
|
||||
source: (request, response) ->
|
||||
|
Loading…
x
Reference in New Issue
Block a user