projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Only register each Sone once!
[Sone.git]
/
src
/
main
/
resources
/
templates
/
include
/
viewSone.html
diff --git
a/src/main/resources/templates/include/viewSone.html
b/src/main/resources/templates/include/viewSone.html
index
e054122
..
896f670
100644
(file)
--- a/
src/main/resources/templates/include/viewSone.html
+++ b/
src/main/resources/templates/include/viewSone.html
@@
-19,9
+19,20
@@
$("#sone .sone#" + soneId + " .last-update span.time").text(lastUpdated);
}
$("#sone .sone#" + soneId + " .last-update span.time").text(lastUpdated);
}
+ registeredSones = {};
+
$(document).ready(function() {
$("#sone .sone").each(function() {
$(document).ready(function() {
$("#sone .sone").each(function() {
- getStatus($(this).attr("id"));
+ soneId = $(this).attr("id");
+ if (registeredSones[soneId]) {
+ return;
+ }
+ registeredSones[soneId] = true;
+ (function(soneId) {
+ setTimeout(function() {
+ getStatus(soneId);
+ }, 5000);
+ })(soneId);
});
});
</script>
});
});
</script>