diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 07:33:21 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 07:33:21 +0000 |
commit | 36a59d088eca61b834191dacea009677a96c052f (patch) | |
tree | e4f33972dab5d8ef79e3944a9f403035fceea43f /app/presenters | |
parent | a1761f15ec2cae7c7f7bbda39a75494add0dfd6f (diff) | |
download | gitlab-ce-36a59d088eca61b834191dacea009677a96c052f.tar.gz |
Add latest changes from gitlab-org/gitlab@15-0-stable-eev15.0.0-rc42
Diffstat (limited to 'app/presenters')
-rw-r--r-- | app/presenters/clusterable_presenter.rb | 16 | ||||
-rw-r--r-- | app/presenters/clusters/cluster_presenter.rb | 2 | ||||
-rw-r--r-- | app/presenters/dev_ops_report/metric_presenter.rb | 2 | ||||
-rw-r--r-- | app/presenters/instance_clusterable_presenter.rb | 20 | ||||
-rw-r--r-- | app/presenters/issue_presenter.rb | 16 | ||||
-rw-r--r-- | app/presenters/project_presenter.rb | 3 | ||||
-rw-r--r-- | app/presenters/projects/security/configuration_presenter.rb | 2 | ||||
-rw-r--r-- | app/presenters/user_presenter.rb | 2 |
8 files changed, 6 insertions, 57 deletions
diff --git a/app/presenters/clusterable_presenter.rb b/app/presenters/clusterable_presenter.rb index c2ed40d8b0c..9558eee55a6 100644 --- a/app/presenters/clusterable_presenter.rb +++ b/app/presenters/clusterable_presenter.rb @@ -28,10 +28,6 @@ class ClusterablePresenter < Gitlab::View::Presenter::Delegated polymorphic_path([clusterable, :clusters], options) end - def new_path(options = {}) - new_polymorphic_path([clusterable, :cluster], options) - end - def connect_path polymorphic_path([clusterable, :clusters], action: :connect) end @@ -40,22 +36,10 @@ class ClusterablePresenter < Gitlab::View::Presenter::Delegated polymorphic_path([clusterable, :clusters], action: :new_cluster_docs) end - def authorize_aws_role_path - polymorphic_path([clusterable, :clusters], action: :authorize_aws_role) - end - def create_user_clusters_path polymorphic_path([clusterable, :clusters], action: :create_user) end - def create_gcp_clusters_path - polymorphic_path([clusterable, :clusters], action: :create_gcp) - end - - def create_aws_clusters_path - polymorphic_path([clusterable, :clusters], action: :create_aws) - end - def cluster_status_cluster_path(cluster, params = {}) raise NotImplementedError end diff --git a/app/presenters/clusters/cluster_presenter.rb b/app/presenters/clusters/cluster_presenter.rb index e2fc2b4b485..454e5c0e44a 100644 --- a/app/presenters/clusters/cluster_presenter.rb +++ b/app/presenters/clusters/cluster_presenter.rb @@ -70,7 +70,7 @@ module Clusters { 'clusters-path': clusterable.index_path, 'dashboard-endpoint': clusterable.metrics_dashboard_path(cluster), - 'documentation-path': help_page_path('user/project/clusters/index', anchor: 'monitoring-your-kubernetes-cluster'), + 'documentation-path': help_page_path('user/infrastructure/clusters/manage/clusters_health'), 'add-dashboard-documentation-path': help_page_path('operations/metrics/dashboards/index.md', anchor: 'add-a-new-dashboard-to-your-project'), 'empty-getting-started-svg-path': image_path('illustrations/monitoring/getting_started.svg'), 'empty-loading-svg-path': image_path('illustrations/monitoring/loading.svg'), diff --git a/app/presenters/dev_ops_report/metric_presenter.rb b/app/presenters/dev_ops_report/metric_presenter.rb index ec85c5d3809..1a5b12fa408 100644 --- a/app/presenters/dev_ops_report/metric_presenter.rb +++ b/app/presenters/dev_ops_report/metric_presenter.rb @@ -60,7 +60,7 @@ module DevOpsReport description: 'created per active user', feature: 'environments', blog: 'https://about.gitlab.com/2016/08/26/ci-deployment-and-environments/', - docs: help_page_path('ci/environments') + docs: help_page_path('ci/environments/index') ), Card.new( metric: metric, diff --git a/app/presenters/instance_clusterable_presenter.rb b/app/presenters/instance_clusterable_presenter.rb index 001c9cbb4e9..12b7ce2f5e7 100644 --- a/app/presenters/instance_clusterable_presenter.rb +++ b/app/presenters/instance_clusterable_presenter.rb @@ -18,11 +18,6 @@ class InstanceClusterablePresenter < ClusterablePresenter admin_clusters_path(options) end - override :new_path - def new_path(options = {}) - new_admin_cluster_path(options) - end - override :cluster_status_cluster_path def cluster_status_cluster_path(cluster, params = {}) cluster_status_admin_cluster_path(cluster, params) @@ -53,21 +48,6 @@ class InstanceClusterablePresenter < ClusterablePresenter create_user_admin_clusters_path end - override :create_gcp_clusters_path - def create_gcp_clusters_path - create_gcp_admin_clusters_path - end - - override :create_aws_clusters_path - def create_aws_clusters_path - create_aws_admin_clusters_path - end - - override :authorize_aws_role_path - def authorize_aws_role_path - authorize_aws_role_admin_clusters_path - end - override :empty_state_help_text def empty_state_help_text s_('ClusterIntegration|Adding an integration will share the cluster across all projects.') diff --git a/app/presenters/issue_presenter.rb b/app/presenters/issue_presenter.rb index 75f6d749acb..9b4e7e22165 100644 --- a/app/presenters/issue_presenter.rb +++ b/app/presenters/issue_presenter.rb @@ -4,9 +4,7 @@ class IssuePresenter < Gitlab::View::Presenter::Delegated presents ::Issue, as: :issue def issue_path - return url_builder.build(issue, only_path: true) unless use_work_items_path? - - project_work_items_path(issue.project, work_items_path: issue.id) + web_path end delegator_override :subscribed? @@ -17,18 +15,6 @@ class IssuePresenter < Gitlab::View::Presenter::Delegated def project_emails_disabled? issue.project.emails_disabled? end - - def web_url - return super unless use_work_items_path? - - project_work_items_url(issue.project, work_items_path: issue.id) - end - - private - - def use_work_items_path? - issue.issue_type == 'task' && issue.project.work_items_feature_flag_enabled? - end end IssuePresenter.prepend_mod_with('IssuePresenter') diff --git a/app/presenters/project_presenter.rb b/app/presenters/project_presenter.rb index 098519cdffe..af1b254c46f 100644 --- a/app/presenters/project_presenter.rb +++ b/app/presenters/project_presenter.rb @@ -36,7 +36,6 @@ class ProjectPresenter < Gitlab::View::Presenter::Delegated def statistics_buttons(show_auto_devops_callout:) [ - upload_anchor_data, readme_anchor_data, license_anchor_data, changelog_anchor_data, @@ -458,7 +457,7 @@ class ProjectPresenter < Gitlab::View::Presenter::Delegated def project_topic_list strong_memoize(:project_topic_list) do - project.topics.map(&:name) + project.topics.map { |topic| { name: topic.name, title: topic.title_or_name } } end end diff --git a/app/presenters/projects/security/configuration_presenter.rb b/app/presenters/projects/security/configuration_presenter.rb index 77f4d57ae09..772be0125a0 100644 --- a/app/presenters/projects/security/configuration_presenter.rb +++ b/app/presenters/projects/security/configuration_presenter.rb @@ -68,7 +68,7 @@ module Projects end def latest_pipeline_path - return help_page_path('ci/pipelines') unless latest_default_branch_pipeline + return help_page_path('ci/pipelines/index') unless latest_default_branch_pipeline project_pipeline_path(self, latest_default_branch_pipeline) end diff --git a/app/presenters/user_presenter.rb b/app/presenters/user_presenter.rb index dc775fb4160..26b8169d2b0 100644 --- a/app/presenters/user_presenter.rb +++ b/app/presenters/user_presenter.rb @@ -21,7 +21,7 @@ class UserPresenter < Gitlab::View::Presenter::Delegated delegator_override :saved_replies def saved_replies - return ::Users::SavedReply.none unless Feature.enabled?(:saved_replies, current_user, default_enabled: :yaml) + return ::Users::SavedReply.none unless Feature.enabled?(:saved_replies, current_user) return ::Users::SavedReply.none unless current_user.can?(:read_saved_replies, user) user.saved_replies |