Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/error_tracking/error_repository/active_record_strategy.rb')
-rw-r--r--lib/gitlab/error_tracking/error_repository/active_record_strategy.rb21
1 files changed, 20 insertions, 1 deletions
diff --git a/lib/gitlab/error_tracking/error_repository/active_record_strategy.rb b/lib/gitlab/error_tracking/error_repository/active_record_strategy.rb
index e5b532ee0f0..01e7fbda384 100644
--- a/lib/gitlab/error_tracking/error_repository/active_record_strategy.rb
+++ b/lib/gitlab/error_tracking/error_repository/active_record_strategy.rb
@@ -39,11 +39,12 @@ module Gitlab
handle_exceptions(e)
end
- def list_errors(filters:, sort:, limit:, cursor:)
+ def list_errors(filters:, query:, sort:, limit:, cursor:)
errors = project_errors
errors = filter_by_status(errors, filters[:status])
errors = sort(errors, sort)
errors = errors.keyset_paginate(cursor: cursor, per_page: limit)
+ # query is not supported
pagination = ErrorRepository::Pagination.new(errors.cursor_for_next_page, errors.cursor_for_previous_page)
@@ -60,6 +61,24 @@ module Gitlab
project_error(id).update(attributes)
end
+ def dsn_url(public_key)
+ gitlab = Settings.gitlab
+
+ custom_port = Settings.gitlab_on_standard_port? ? nil : ":#{gitlab.port}"
+
+ base_url = [
+ gitlab.protocol,
+ "://",
+ public_key,
+ '@',
+ gitlab.host,
+ custom_port,
+ gitlab.relative_url_root
+ ].join('')
+
+ "#{base_url}/api/v4/error_tracking/collector/#{project.id}"
+ end
+
private
attr_reader :project