diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-17 18:08:15 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-17 18:08:15 +0300 |
commit | c2b98d3dbd47ab92c79c702276fe9130d9a28036 (patch) | |
tree | bf4071f551fdc12c22b23b2bb66483064e7b9ea9 /app/presenters | |
parent | badb9c1deacbea601b02f88811b7e123589d9251 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/presenters')
-rw-r--r-- | app/presenters/hooks/project_hook_presenter.rb | 13 | ||||
-rw-r--r-- | app/presenters/hooks/service_hook_presenter.rb | 13 | ||||
-rw-r--r-- | app/presenters/web_hook_log_presenter.rb | 13 |
3 files changed, 39 insertions, 0 deletions
diff --git a/app/presenters/hooks/project_hook_presenter.rb b/app/presenters/hooks/project_hook_presenter.rb new file mode 100644 index 00000000000..a65c7221b5a --- /dev/null +++ b/app/presenters/hooks/project_hook_presenter.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +class ProjectHookPresenter < Gitlab::View::Presenter::Delegated + presents :project_hook + + def logs_details_path(log) + project_hook_hook_log_path(project, self, log) + end + + def logs_retry_path(log) + retry_project_hook_hook_log_path(project, self, log) + end +end diff --git a/app/presenters/hooks/service_hook_presenter.rb b/app/presenters/hooks/service_hook_presenter.rb new file mode 100644 index 00000000000..bc20d5b1a3b --- /dev/null +++ b/app/presenters/hooks/service_hook_presenter.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +class ServiceHookPresenter < Gitlab::View::Presenter::Delegated + presents :service_hook + + def logs_details_path(log) + project_service_hook_log_path(service.project, service, log) + end + + def logs_retry_path(log) + retry_project_service_hook_log_path(service.project, service, log) + end +end diff --git a/app/presenters/web_hook_log_presenter.rb b/app/presenters/web_hook_log_presenter.rb new file mode 100644 index 00000000000..fca03ddb5d7 --- /dev/null +++ b/app/presenters/web_hook_log_presenter.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +class WebHookLogPresenter < Gitlab::View::Presenter::Delegated + presents :web_hook_log + + def details_path + web_hook.present.logs_details_path(self) + end + + def retry_path + web_hook.present.logs_retry_path(self) + end +end |