Add delay for server search requests

This commit is contained in:
Gaëtan L
2023-02-17 17:30:58 +01:00
parent 78d8db0cce
commit b836398530
5 changed files with 18 additions and 2 deletions
+1
View File
@@ -13,6 +13,7 @@
"@mdi/font": "^5.9.55",
"apexcharts": "^3.25.0",
"core-js": "^3.6.5",
"debounce": "^1.2.1",
"js-cookie": "^2.2.1",
"luxon": "^1.28.1",
"vee-validate": "^3.4.5",
+4 -1
View File
@@ -63,7 +63,7 @@
<script>
import alarms from '@/api/alarms'
import debounce from 'debounce'
export default {
data () {
return {
@@ -104,6 +104,9 @@ export default {
mounted () {
this.fetchAlarms()
},
created () {
this.fetchAlarms = debounce(this.fetchAlarms, 500)
},
watch: {
options: {
handler () {
@@ -31,7 +31,7 @@
<script>
import logs from '@/api/logs'
import debounce from 'debounce'
export default {
data () {
return {
@@ -80,6 +80,9 @@ export default {
})
}
},
created () {
this.fetchLogs = debounce(this.fetchLogs, 500)
},
watch: {
options: {
handler () {
@@ -32,6 +32,7 @@
<script>
import logs from '@/api/logs'
import debounce from 'debounce'
export default {
data () {
@@ -70,6 +71,9 @@ export default {
})
}
},
created () {
this.fetchMessages = debounce(this.fetchMessages, 500)
},
watch: {
options: {
handler () {
+5
View File
@@ -3002,6 +3002,11 @@ de-indent@^1.0.2:
resolved "https://registry.yarnpkg.com/de-indent/-/de-indent-1.0.2.tgz#b2038e846dc33baa5796128d0804b455b8c1e21d"
integrity sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==
debounce@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/debounce/-/debounce-1.2.1.tgz#38881d8f4166a5c5848020c11827b834bcb3e0a5"
integrity sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==
debug@2.6.9, debug@^2.6.9:
version "2.6.9"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"