Commit Graph

672 Commits

Author SHA1 Message Date
Robert Speicher 006659e745 Merge branch 'render-text-deprecated' into 'master'
Fix deprecation: render :text is deprecated because it does not actually render…

See merge request gitlab-org/gitlab-ce!23425
2018-12-03 16:44:59 +00:00
Imre Farkas bd3a484032
Add config to disable impersonation
Adds gitlab.impersonation_enabled config option defaulting to true to
keep the current default behaviour.

Only the act of impersonation is modified, impersonation token
management is not affected.
2018-11-29 09:37:16 +01:00
Jasper Maes 1bb4ad9262 Fix deprecation: render :text is deprecated because it does not actually render a text/plain response 2018-11-29 08:05:13 +01:00
Stan Hu 1d16530501 Merge branch 'if-53347_fix_impersonation_tokens' into 'master'
Display impersonation token value only after creation

See merge request gitlab-org/gitlab-ce!22916
2018-11-15 19:06:28 +00:00
Stan Hu 23bcbf04c8 Remove display of local Sidekiq process in /admin/sidekiq
In a cloud-native or high-availability configuration, Sidekiq may not
be running on the same node as the Web worker. The output of the `ps`
output does not work in this case and can mislead admins that
Sidekiq isn't running. Remove it in favor of the Sidekiq dashboard,
which shows local processes using the Redis information.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/46133
2018-11-15 06:37:12 -08:00
Imre Farkas f3cd24a9f3
Display impersonation token value only after creation
Since we migrated all PersonlAccessTokens to store only its hash in the
DB, the token value can no longer be shown to the user.
2018-11-12 12:16:25 +01:00
Achilleas Pipinellis 7f47e13218 Merge branch 'gt-update-typos-in-comments-and-specs' into 'master'
Fix typos in comments and specs

See merge request gitlab-org/gitlab-ce!22683
2018-11-01 10:34:23 +00:00
George Tsiolis 733ae94921 Fix typos in comments and specs 2018-11-01 08:59:20 +02:00
Mark Chao 39ae9a59a5 Make Highlight accept language param
This replaces the repository param.
This allows more flexiblity as sometimes we have highlight content
not related to repository. Sometimes we know ahead of time the language
of the content. Lastly language determination seems better fit as a
logic in the Blob class.
`repository` param is only used to determine the language, which seems
to be the responsiblity of Blob.
2018-10-30 15:44:55 +08:00
Rémy Coutable 631f4e2f54 Merge branch '52559-applications-api-get-delete' into 'master'
Add Applications API endpoints for listing and deleting entries.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/52559

See merge request https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/22296
2018-10-22 08:52:42 +00:00
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
JB Vasseur 9f34083901 Remove useless braces !22296 2018-10-18 17:46:03 +09:00
JB Vasseur 6da9733652 Use ApplicationsFinder !22296 2018-10-18 09:43:35 +09:00
Zeger-Jan van de Weg 30b4ce940d
Remove Git circuit breaker
Was introduced in the time that GitLab still used NFS, which is not
required anymore in most cases. By removing this, the API it calls will
return empty responses. This interface has to be removed in the next
major release, expected to be 12.0.
2018-10-10 09:08:18 +02:00
Tomasz Maczukin 42af229510
Simplify runner registration token resetting
This icommit adds several changes related to the same topic
- resetting a Runner registration token:

1. On Project settings page it adds a button for resetting the
   registration token and it removes the Runner token field
   that was confusing all GitLab users.

2. On Group settings page it adds the same button for resetting
   the registration token.

3. On Admin Runners settings page it moves the button to the same
   place as in Project and Group settings and it changes slightly
   the page layout to make it more similar to Group and Project
   setting pages.

4. It refactorizes a little the partial that prints runner
   registration description. Thanks to this Project, Group
   and Admin settings of the Runner are re-using the same
   code to generate the button.

5. Updates the translations of changed text.
2018-10-04 08:37:01 +02:00
Valery Sizov 2daa8d387b Remove background job throttling feature
We remove this feature as it never worked properly
2018-09-24 18:41:14 +03:00
Stan Hu 711e9f0796 Merge branch 'frozen-string-app-controller' into 'master'
Enable frozen string in app/controllers/**/*.rb

See merge request gitlab-org/gitlab-ce!21736
2018-09-20 22:53:27 +00:00
Dmitriy Zaporozhets 00057a75f4 Merge branch '44998-split-admin-settings-into-multiple-sub-pages' into 'master'
Resolve "Split admin settings into multiple sub pages"

Closes #44998

See merge request gitlab-org/gitlab-ce!21467
2018-09-20 13:24:20 +00:00
Martin Wortschack df9cb93091 Add empty controller actions and utilize referer_path helper 2018-09-19 12:57:14 +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
Martin Wortschack a7071deddc Parse request.referer properly 2018-09-18 10:47:05 +02:00
Yorick Peterse f0e7b5e7a3
Cleaned up CI runner administration code
In https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/19625 some
changes were introduced that do not meet our abstraction reuse rules.
This commit cleans up some of these changes so the requirements are met.

Most notably, sorting of the runners in Admin::RunnersFinder has been
delegated to Ci::Runner.order_by, similar to how we order data in
models that include the Sortable module. If we need more sort orders in
the future we can include Sortable and have Ci::Runner.order_by call
`super` to delegate to Sortable.order_by.
2018-09-14 15:05:46 +02:00
Martin Wortschack 378242d760 Adds empty methods for 'geo' and 'templates' 2018-09-14 14:37:05 +02:00
Grzegorz Bizon 55c23a0935 Merge branch 'feature/runner-state-filter-for-admin-view' into 'master'
Feature: State filter for admin runners view

See merge request gitlab-org/gitlab-ce!19625
2018-09-14 09:03:44 +00:00
Alexis Reigel 03890558b4
rename variable from *_cnt to *_count 2018-09-12 17:31:25 +02: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
Martin Wortschack a2f7936c74 merge master and resolve conflicts 2018-09-11 08:43:10 +02:00
Martin Wortschack bfd2181310 use referer for redirect instead of hidden field param from partials 2018-09-10 19:45:33 +02:00
Jan Provaznik a415a904b8 Ask user explicitly about usage stats agreement 2018-09-07 14:32:28 +00:00
Felipe Artur 9710cda30e Move project services log to a separate file 2018-09-06 14:48:31 -03:00
Martin Wortschack 276e78e058 handle redirect properly 2018-09-06 15:44:15 +02:00
Martin Wortschack be41338b66 redirect to the relevant sub page after updating application settings 2018-09-05 11:22:18 +02:00
Alexis Reigel 34bdb74740
add sort dropdown to admin runners page 2018-08-29 15:02:54 +02:00
Alexis Reigel 0a0350be00
extract filter/sort/paging logic to finder class 2018-08-20 17:15:11 +02:00
Alexis Reigel 16d12491c5
add status filter to admin runners page 2018-08-20 17:15:11 +02:00
Rémy Coutable f20a40f4a1 Merge branch 'frozen-string-enable-app-models' into 'master'
Enable frozen string in app/models/*.rb

See merge request gitlab-org/gitlab-ce!20851
2018-08-02 09:11:52 +00:00
Luke Bennett 1b27c45753 Merge branch 'master' into '41416-making-instance-wide-data-tools-more-accessible'
# Conflicts:
#   app/models/application_setting.rb
#   lib/api/settings.rb
2018-07-31 16:29:13 +00:00
Stan Hu 00709a13a4 Fix /admin/jobs failing to load due to statement timeout
The `ORDER BY created_at DESC` clause causes a sequential scan because
there is no index on the `created_at` column. We can sort by `id`
or by `updated_at` to make things fast.

Closes #49767
2018-07-30 10:03:05 -07:00
Luke Bennett 602a1c34e3 Create instance_statistics namespace and move convdev index and cohorts to it 2018-07-27 15:54:26 +02:00
Sean McGivern ed81ee9ba2 Revert "Merge branch '41416-making-instance-wide-data-tools-more-accessible' into 'master'"
This reverts merge request !20679
2018-07-27 13:12:35 +00:00
gfyoung 50abbd3e53 Enable frozen string in app/models/*.rb
Partially addresses #47424.
2018-07-26 16:55:41 -07:00
Luke Bennett f8f2d0f9e1 Create instance_statistics namespace and move convdev index and cohorts to it 2018-07-26 19:00:09 +02:00
Lin Jen-Shin 4ee08b77bc Updates from `rubocop -a` 2018-07-09 21:13:08 +08:00
Yorick Peterse f30089075f
Fixed pagination of web hook logs
For reasons unknown, the logs of a web hook were paginated in memory.
This would result in the "Edit" page of a web hook timing out once it
has more than a few thousand log entries.

This commit makes the following changes:

1. We use LIMIT/OFFSET to paginate the data, instead of doing this in
   memory.

2. We limit the logs to the last two days, just like the documentation
   says (instead of retrieving everything).

3. We change the indexes on "web_hook_logs" so the query to get the data
   can perform a backwards index scan, without the need for a Filter.

These changes combined ensure that Projects::HooksController#edit no
longer times out.
2018-07-03 14:24:17 +02:00
Rémy Coutable 955f0ea57f Merge branch 'patch-28' into 'master'
Update wrong initial setting transfer in application_settings_controller.rb

See merge request gitlab-org/gitlab-ce!20059
2018-06-26 10:39:32 +00:00
Andrei Vukolov 6d2b934d44 Fix initial settings loading at the first run of GitLab installed from source 2018-06-25 17:44:03 +00:00
Lin Jen-Shin b23428d664 Bring changes from EE 2018-06-25 21:11:00 +08:00
Andrei Vukolov 1d116f3ecd Update wrong initial setting transfer in application_settings_controller.rb 2018-06-21 10:08:59 +00:00
Jasper Maes e3046dcabe Rails5 fix Admin::HooksController 2018-06-20 08:30:24 +02:00
Alexis Reigel ce6172e863
allow uploading favicon in appearance settings 2018-06-05 16:20:18 +02:00