Commit 67622b86 by Bach Dániel

dashboard: move activity vars

parent 5f3e7e7b
var in_progress = false;
var activity_hash = 5;
var show_all = false;
var reload_vm_detail = false;
$(function() {
var in_progress = false;
var activity_hash = 5;
var show_all = false;
var reload_vm_detail = false;
/* do we need to check for new activities */
if(decideActivityRefresh()) {
if(!in_progress) {
......@@ -102,19 +102,16 @@ $(function() {
return false;
});
});
function decideActivityRefresh() {
function decideActivityRefresh() {
var check = false;
/* if something is still spinning */
if($('.timeline .activity i').hasClass('fa-spin'))
check = true;
return check;
}
}
function checkNewActivity(runs) {
function checkNewActivity(runs) {
$.ajax({
type: 'GET',
url: $('a[href="#activity"]').attr('data-activity-url'),
......@@ -178,7 +175,9 @@ function checkNewActivity(runs) {
in_progress = false;
}
});
}
}
});
String.prototype.hashCode = function() {
var hash = 0, i, chr, len;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment