Advanced cache
Fixes#1993
* Build missing cache values in background job after each push
* Store commit_count in project table. Refresh in background job
* moved repository size calculation in background job
## Advantages
Every time push is triggered - we build cache for project even without user visiting project page.
That means first visit is as fast as others now. This is especially good for active projects where people have some requests fast because of cache and some slow - because cache was build in their request.
Between cache expired and cache built we we had gap when Linux repo can give 502 error because calculation commits count takes 30 seconds or even more.
Using value from database fix this problem. Before cache is updated you see old value from database. After - you see new one.
Basically this merge request is super win to GitLab. We don't do some heavy operations in user request but instead in background job.
## Temporary problem
After this migration all projects will have `0` commits in database. It fill be replaced with real value on next push. I did not add recalculation to migration because it will last forever on big instances. Can be fixed by adding rake task which will go in background on live instance without downtime
See merge request !986
Show edit readme from project home page
I added pencil icon which redirect you to edit README page (web editor). In this case people can make changes to README easily without going to Files tab, searching for README and pressing edit button here
cc @job @darby
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
See merge request !1892
New project home page
## Why?
Because current project page is overloaded with information
## Changes
* move activity to separate tab
* make project show page cleaner by removing redundant information
* render README as main content of project page
cc @sytses @JobV
See merge request !938
Add ref switching support for graphs
It is now possible to view contributor and commit statistics for
refs beyond the default branch. While the Git ref already was part of
the path it has not been used before.
Additionally, the code in RefsController#switch has been slighliy
refactored since it would have become confusing with additional if-else
branches added.
See merge request !932
It is now possible to view contributor and commit statistics for
refs beyond the default branch.
Additionally, conditions in RefsController#switch have been refactored
in order that a `case` block is used now.
UX improvements
* make atom feed on commits page smaller so it capture less attention
* open big image 400px instead of default 40px when click on user avatar
See merge request !910