summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2020-12-31 13:22:16 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2020-12-31 13:22:16 (GMT)
commitc4c2002d000b0705fbbbefb5db5e97ccf25d4edf (patch)
treeb95efb661505790dc1a0ee698bc8e05902a52d92
parentf46b4dcb7c8873553c4ef5810f18a246fb7357f2 (diff)
downloadpublik-website-c4c2002d000b0705fbbbefb5db5e97ccf25d4edf.zip
publik-website-c4c2002d000b0705fbbbefb5db5e97ccf25d4edf.tar.gz
publik-website-c4c2002d000b0705fbbbefb5db5e97ccf25d4edf.tar.bz2
references: resync submitted forms counter with actual count & rate
-rw-r--r--static/js/combo.public.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/static/js/combo.public.js b/static/js/combo.public.js
index ce96a74..3c62e5e 100644
--- a/static/js/combo.public.js
+++ b/static/js/combo.public.js
@@ -49,11 +49,14 @@ $(function() {
  suffix : ' demandes'
};
function get_current_count() { // (saas only)
- var base_number = 1780000;
- var base_date = new Date("2020-06-19T00:00:00");
+ var base_number = 2370000;
+ var base_date = new Date("2020-12-31T00:00:00");
var diff = (Date.now() - base_date.getTime()) / 1000;
- /* approx rate on base date: 1 request every 30 seconds */
- return base_number + (diff / 30);
+ /* approx rate on base date: 1 request every 26 seconds
+ * December 1st: 2250000, December 31st: 2380000
+ * 1 / ((2380000 - 2250000) / (86400seconds * 31days)) -> 20
+ */
+ return base_number + (diff / 20);
}
//var count = new CountUp("counter", 1234, parseInt(total), 0, 4.5, options);
var count = new CountUp("counter", 1, parseInt(get_current_count()), 0, 4.5, options);