Dont refresh server statuses unless the page is active

Reduces the number of polling requests happening on the server by only sending those requests if the user is actively viewing the dashboard.

There was no point in updating the resource usage if no one is viewing it. After 30 seconds away from the window when a user comes back it will update instantenously, otherwise it'll just update after 5 seconds.
This commit is contained in:
Dane Everitt 2018-06-02 22:23:54 -07:00
parent 02b29a66ea
commit be5a9108f9
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
4 changed files with 57 additions and 4 deletions

View file

@ -26,6 +26,7 @@
"jquery": "^3.3.1",
"jwt-decode": "^2.2.0",
"lodash": "^4.17.5",
"luxon": "^1.2.1",
"postcss": "^6.0.21",
"postcss-import": "^11.1.0",
"postcss-preset-env": "^3.4.0",
@ -35,6 +36,7 @@
"vue": "^2.5.7",
"vue-axios": "^2.1.1",
"vue-devtools": "^3.1.9",
"vue-feather-icons": "^4.7.1",
"vue-loader": "^14.2.2",
"vue-mc": "^0.2.4",
"vue-router": "^3.0.1",