diff options
Diffstat (limited to 'app/presenters')
-rw-r--r-- | app/presenters/ci/build_runner_presenter.rb | 5 | ||||
-rw-r--r-- | app/presenters/packages/nuget/packages_metadata_presenter.rb | 10 | ||||
-rw-r--r-- | app/presenters/packages/nuget/presenter_helpers.rb | 6 | ||||
-rw-r--r-- | app/presenters/project_presenter.rb | 3 |
4 files changed, 13 insertions, 11 deletions
diff --git a/app/presenters/ci/build_runner_presenter.rb b/app/presenters/ci/build_runner_presenter.rb index 7242a80b924..9a586a1733f 100644 --- a/app/presenters/ci/build_runner_presenter.rb +++ b/app/presenters/ci/build_runner_presenter.rb @@ -33,13 +33,10 @@ module Ci end def runner_variables - stop_expanding_raw_refs = ::Feature.enabled?(:ci_raw_variables_in_yaml_config, project) - variables .sort_and_expand_all(keep_undefined: true, expand_file_refs: false, - expand_raw_refs: !stop_expanding_raw_refs, - project: project) + expand_raw_refs: false) .to_runner_variables end diff --git a/app/presenters/packages/nuget/packages_metadata_presenter.rb b/app/presenters/packages/nuget/packages_metadata_presenter.rb index 5f5859d46c9..9f1dee17cea 100644 --- a/app/presenters/packages/nuget/packages_metadata_presenter.rb +++ b/app/presenters/packages/nuget/packages_metadata_presenter.rb @@ -10,6 +10,10 @@ module Packages def initialize(packages) @packages = packages + .preload_nuget_files + .preload_nuget_metadatum + .including_tags + .including_dependency_links_with_nuget_metadatum end def count @@ -23,12 +27,14 @@ module Packages private def summary + packages_with_metadata = @packages.map { |pkg| metadata_for(pkg) } + { json_url: json_url, lower_version: lower_version, upper_version: upper_version, - packages_count: @packages.count, - packages: @packages.map { |pkg| metadata_for(pkg) } + packages_count: packages_with_metadata.size, + packages: packages_with_metadata } end diff --git a/app/presenters/packages/nuget/presenter_helpers.rb b/app/presenters/packages/nuget/presenter_helpers.rb index 5334e4aa6f8..82ed80d8372 100644 --- a/app/presenters/packages/nuget/presenter_helpers.rb +++ b/app/presenters/packages/nuget/presenter_helpers.rb @@ -8,7 +8,6 @@ module Packages BLANK_STRING = '' PACKAGE_DEPENDENCY_GROUP = 'PackageDependencyGroup' PACKAGE_DEPENDENCY = 'PackageDependency' - NUGET_PACKAGE_FORMAT = 'nupkg' private @@ -27,8 +26,7 @@ module Packages end def archive_url_for(package) - package_filename = package.installable_package_files - .with_format(NUGET_PACKAGE_FORMAT) + package_filename = package.installable_nuget_package_files .last &.file_name path = api_v4_projects_packages_nuget_download_package_name_package_version_package_filename_path( @@ -75,8 +73,6 @@ module Packages def dependency_links_grouped_by_target_framework(package) package .dependency_links - .includes_dependency - .preload_nuget_metadatum .group_by { |dependency_link| dependency_link.nuget_metadatum&.target_framework } end diff --git a/app/presenters/project_presenter.rb b/app/presenters/project_presenter.rb index 4d1a9b3f589..780740fd805 100644 --- a/app/presenters/project_presenter.rb +++ b/app/presenters/project_presenter.rb @@ -5,6 +5,7 @@ class ProjectPresenter < Gitlab::View::Presenter::Delegated include GitlabRoutingHelper include StorageHelper include TreeHelper + include Ci::PipelineEditorHelper include IconsHelper include BlobHelper include ChecksCollaboration @@ -349,6 +350,8 @@ class ProjectPresenter < Gitlab::View::Presenter::Delegated end def gitlab_ci_anchor_data + return unless can_view_pipeline_editor?(project) + if cicd_missing? AnchorData.new(false, statistic_icon + _('Set up CI/CD'), |