Commit Graph

161 Commits

Author SHA1 Message Date
Danny van Kooten 6bc1af3564 set sqlite _busy_timeout to 5s to handle database is locked errors 2018-10-10 11:59:21 +02:00
Danny van Kooten 3b99e78135 set sqlite _busy_timeout to 5s to handle database is locked errors 2018-10-10 11:59:17 +02:00
Danny van Kooten 470db5189d get rid of some column placeholders so we can increase buffer cap #132 2018-10-10 10:50:05 +02:00
Danny van Kooten 3c934b29fc add is_finished column indicating whether a pageview is done (ready to be aggregated). closes #123 2018-10-10 10:27:55 +02:00
Danny van Kooten c877319046 fix DROP INDEX statements for mysql 2018-10-10 10:27:16 +02:00
Danny van Kooten 051d0addb3 fix realtime visitor count query incl. bc for pageviews without an expliti site tracking ID 2018-10-10 09:45:17 +02:00
Danny van Kooten 2f64d56771 alter stats table constraints to take site_id column into consideration 2018-10-10 09:30:52 +02:00
Danny van Kooten ce8f585827 sqlstore GetXStats funcs should return nil when there are 0 results. #50 2018-10-10 09:02:32 +02:00
Danny van Kooten 1b06bd3179 change precision on numeric columns for postgres so we don't have to apply rounding. closes #116 2018-10-09 13:27:50 +02:00
Danny van Kooten 0f0db205ae account for empty site_tracking_id in realtime visitor query 2018-10-09 11:57:56 +02:00
Danny van Kooten 84cd897319 use auto increment column for pk on sites table 2018-10-09 11:17:26 +02:00
Danny van Kooten 266d05019a return json error when authorization middleware fails 2018-10-09 11:17:13 +02:00
Danny van Kooten 80088570b0 default to site_id 1, even though it may not exist yet 2018-10-05 16:07:15 +02:00
Danny van Kooten 21371e2c30 close site settings when pressing ESC 2018-10-05 15:59:36 +02:00
Danny van Kooten 53c1702d0d only re-fetch data when needed 2018-10-05 15:13:48 +02:00
Danny van Kooten 876309ae59 clean-up sqlstore pkg 2018-10-05 14:34:39 +02:00
Danny van Kooten d4176de238 get aggregator to take site ID's into account 2018-10-05 14:19:11 +02:00
Danny van Kooten c1367325e6 modify all routes & queries to take a site ID parameter 2018-10-05 13:09:58 +02:00
Danny van Kooten dc8bf7fdc3 modify tracker.js to take a siteId and insert that into pageviews table. add siteId to tracking snippet. 2018-10-05 10:07:00 +02:00
Danny van Kooten 4c4a42879c fix ID assignment in SaveUser func 2018-10-04 13:44:36 +02:00
Danny van Kooten 3674855200 apply authorize middleware to site endpoints 2018-10-04 13:40:52 +02:00
Danny van Kooten e51bbe047d update state after adding, updating or deleting a site 2018-10-04 13:37:46 +02:00
Danny van Kooten 927c50b419 add & delete sites through api 2018-10-03 15:27:36 +02:00
Danny van Kooten 61cc23eb0d fetch sites from server & update dashboard state from site switcher 2018-10-03 11:54:48 +02:00
Danny van Kooten dc78bb45d9 add api routes + handlers for managing sites 2018-10-03 11:07:04 +02:00
Danny van Kooten f721b75f43 modify SaveUser to support updating existing users 2018-10-03 10:47:23 +02:00
Danny van Kooten 4b855c6d05 add site related func to sqlstore 2018-10-03 10:44:31 +02:00
Danny van Kooten 26d7ba5578 Merge branch 'master' into multiple-sites
* master:
  use classnames to determine main-col
  add actual lib 😅
  use classNames for table row width
  use classname for active state
  use classnames for loading state
  add classnames as a dependency
  update README on new user command
  rework user cli management
2018-10-02 11:02:19 +02:00
Danny van Kooten 7c3adcb10b rework user cli management 2018-09-26 14:44:13 +02:00
Danny van Kooten f0eecc04cd add sites table & site_id columns for multi-site tracking #50 2018-09-25 15:03:07 +02:00
Danny van Kooten 5507fbcd92 update test for respond func 2018-09-21 10:50:34 +02:00
Danny van Kooten 734d32082a client-side error handling structure incl. better error message for invalid login details. #131 2018-09-21 10:45:47 +02:00
Danny van Kooten d116f1fd70 limit buffer capacity to 99 pageviews, hotfix for #132 2018-09-21 09:30:05 +02:00
Danny van Kooten 2ff9676043 always show at least 1 visitor if there are pageviews. #129 2018-09-19 08:21:04 +02:00
Vincent Boutour e712f0fcdd
Adding /health endpoint and using it in container 2018-09-17 17:20:48 +02:00
Danny van Kooten 221e6394de assume dashboard is public when there are no users in connected datastore. #117 2018-09-12 09:36:59 +02:00
Danny van Kooten 291d53fcaf add CountUsers func to sqlstore 2018-09-12 09:11:50 +02:00
Danny van Kooten b860937107 always clear request context, even for unauthorized requests 2018-09-12 09:07:55 +02:00
Danny van Kooten 3b721b88a8 sanitize email address before saving to datastore 2018-09-10 09:26:15 +02:00
Danny van Kooten b6aa00caef add tests for aggregating referrer stats 2018-08-09 15:04:38 +02:00
Danny van Kooten 8313c64610 add tests for aggregating page-specific stats 2018-08-09 14:57:35 +02:00
Danny van Kooten 2ccbfbf372 add tests for aggregating site-wide stats 2018-08-09 14:43:42 +02:00
Danny van Kooten 064b5cb038 re-use buffer (to get rid of allocation) & separate inserts vs. updates early on in collect handler. 2018-08-08 09:43:06 +02:00
Danny van Kooten 720fa4a5da clear gorilla context after request is handled 2018-08-07 08:48:22 +02:00
Danny van Kooten 01474759c6 add stats command for getting site-wide stats via cli. 2018-08-01 14:03:44 +02:00
Danny van Kooten 33ffa557ee move setting pwd & comparing into user model + tests 2018-08-01 13:13:42 +02:00
Danny van Kooten 4ecaff85ac don't parse database driver from URL to also support mysql and sqlite. 2018-07-31 15:29:15 +02:00
Charley DAVID 98970057a2
Add support for FATHOM_DATABASE_URL 2018-07-31 08:41:08 -03:00
Danny van Kooten e90e100f18 fix query args for batch updating pageviews 2018-07-30 10:51:20 +02:00
Danny van Kooten b6f3be0e8e build postgres dsn string dynamically 2018-07-30 09:33:49 +02:00