Tobias/sw precache logging (#843)
Tobias/sw precache logging (#843)

* workbox added

* added workbox build to gulpfile

* installl service worker on login

* inject manifest only into prepared service worker

* resolve dashboard and calendar from cache

* handle background update of events

* networkFirst for news section enabled

* update calendar on events change after load

* record rendering metrics

* updated gulpfile patterns for service worker

* send analytics logs of page creation to server

* added connection type

* disable sw

* ignore changes for calendar

* Revert "disable sw"

This reverts commit d300fb15d5ac2885f59ce9b6a7c24b52d64c178f.

* cleanup sw

* recvert calendar

* modify requests

* cleanup comments

* differentiate from local requests

* formatting

* downlink added to statistical metrics

* do not install service worker by default

* revert sw

* reset gulpfile merge failure

* allow logging

* ignore line ending for binary files

* fix package lock file

* enable winston logger

* add sw enabled to sw fetch request on /logs/ controller

* added sw workbox locally

* fix response of logs request in service worker

* fix spelling

* disable sw on logout of client user

* gulp recreate service worker on change

* enable service worker for half of users only

* added service worker workbox

* added userid to hidden fields

* clear caches on logout

* cache templated urls

* ignore sw-workbox files in webpack

* apply stalewhilerevalidate for calendar events

* add missing files for calendar

* service renamed

* added ressources of news and dashboard to precache

* removed some comments

* add images and some pages to cache

* show offline alert if not online

* staleWhileRevalidate Giphy

* queue logging requests if offline

* send response on cache

* formatting

* check online state on page load

* logging enabled for dashboard, news, and calendar only

* convert line endings of js files only

* fix logging output of ga id

* added school id to analytics logging

* response times added to metrix

* enable logging on courses page

* renamed env ga tracking id

* fix gulp task order

* hide IDs from URLs

* replace multiple ids in url

* enable logging on all pages

* queue offline logging

* added comments

* test group calculation moved to client

* single quotes

* naming of broadcast channel optimized for calendar

* indention corrected

* enable service worker only if SW_ENABLED has been set in environment

* remove pages and images cache on logout

schul-cloud/schulcloud-client,schul-cloud/schulcloud-client,schul-cloud/schulcloud-client