Commit Graph

16 Commits

Author SHA1 Message Date
Bob Van Landuyt f3fba178b9 Remove the `ForkedProjectLink` model
This removes the `ForkedProjectLink` model that has been replaced by
the `ForkNetworkMember` and `ForkNetwork` combination. All existing
relations have been adjusted to use these new models.

The `forked_project_link` table has been dropped.

The "Forks" count on the admin dashboard has been updated to count all
`ForkNetworkMember` rows and deduct the number of `ForkNetwork`
rows. This is because now the "root-project" of a fork network also
has a `ForkNetworkMember` row. This count could become inaccurate when
the root of a fork network is deleted.
2018-10-19 11:57:20 +02:00
gfyoung 73322a0e55 Enable frozen string in app/controllers/**/*.rb
Enables frozen string for the following:

* app/controllers/*.rb
* app/controllers/admin/**/*.rb
* app/controllers/boards/**/*.rb
* app/controllers/ci/**/*.rb
* app/controllers/concerns/**/*.rb

Partially addresses #47424.
2018-09-18 21:22:45 -07:00
Yorick Peterse 2039c8280d
Disable existing offenses for the CodeReuse cops
This whitelists all existing offenses for the various CodeReuse cops, of
which most are triggered by the CodeReuse/ActiveRecord cop.
2018-09-11 17:32:00 +02:00
Stan Hu b6125f7045 Fix fast admin counters not working when PostgreSQL has secondaries
This commit does a number of things:

1. Reduces the number of queries needed by perform a single query to get all
the tuples for the relevant rows.

2. Uses a transaction to query the tuple counts to ensure that the data
is retrieved from the primary.

Closes #46742
2018-05-25 22:58:43 -07:00
Stan Hu e38938b332 Fix Error 500 viewing admin page due to statement timeouts
Uses PostgreSQL tuple estimates to provide a much faster yet approximate
count. See https://wiki.postgresql.org/wiki/Slow_Counting for more details.
We only use this fast method if the table has been analyzed or vacuumed
within the last hour.

Closes #46255
2018-05-16 08:27:48 -07:00
Tiago Botelho cfd475a45e Removes default scope from sortable 2017-09-07 13:01:59 +01:00
Tiago Botelho 22d53f0607 Fixes 500 error caused by pending delete projects in admin dashboard 2017-07-25 17:59:47 +01:00
Dmitriy Zaporozhets 2989192d1a
Store group and project full name and full path in routes table
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2017-02-08 19:14:29 +02:00
Dmitriy Zaporozhets 62ed1c537e Explicitly define ordering in models using default_scope 2015-02-05 14:20:55 -08:00
Dmitriy Zaporozhets b07c02eb13
Add more info to admin dashboard
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2013-11-20 13:41:41 +02:00
Dmitriy Zaporozhets a52936f36a Renames resque resource to background_jobs 2013-05-30 09:46:28 +03:00
Andrey Kumanyaev 9d318db48f Added the correct hierarchy of controllers for the administrative part 2013-01-24 22:31:24 +02:00
Dmitriy Zaporozhets c7bb3a1f72 sidekiq 2013-01-09 08:14:05 +03:00
Dmitriy Zaporozhets 898d09a21e Gitlab_meta to 3.1. Added workaround for 500 Redis error until it will be fixed 2012-11-21 12:45:15 +02:00
Robert Speicher 925183ed7a Add an AdminController base class for Admin controllers
Handles stuff that's shared across admin controllers.
2012-09-16 10:06:29 -04:00
randx 35e21b3402 Admin dashboard 2012-04-20 19:41:49 +03:00