Skip to content

Commit a8ec4ef

Browse files
committed
reload now happen after 30 second of no user activity (activity is when user clicked somewhere)
1 parent 6cbe4d1 commit a8ec4ef

3 files changed

Lines changed: 27 additions & 3 deletions

File tree

dashboard/templates/_base.html

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8">
5-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6-
<meta http-equiv="refresh" content="30">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
76
<meta name="viewport" content="width=device-width, initial-scale=1">
87
<meta name="description" content="A SQL Server Integration Services monitoring dashboard">
98

@@ -91,5 +90,28 @@
9190

9291
<!-- Page-Specific JavaScript -->
9392
{% block pagejs %}{% endblock %}
93+
94+
<script lang="JavaScript">
95+
96+
var timeOut;
97+
98+
function reloadPage() {
99+
timeOut = setTimeout(function() {
100+
location.reload();
101+
}, 30000);
102+
}
103+
104+
$(function() {
105+
reloadPage();
106+
107+
$(document).click(function(e) {
108+
clearTimeout(timeOut);
109+
timeOut = reloadPage();
110+
});
111+
});
112+
113+
114+
115+
</script>
94116
</body>
95117
</html>

dashboard/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from dashboard import app
99

1010
# Set app version
11-
version = "0.6.7 (beta)"
11+
version = "0.6.8 (beta)"
1212

1313
# Define routes
1414
@app.route('/')

run.bat

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
set FLASK_APP=dashboard\__init__.py
2+
flask run

0 commit comments

Comments
 (0)