Commit db1b15e4 authored by Clement Ho's avatar Clement Ho

Merge branch '61284-frontend-follow-up-from-add-packages_size-to-projectstatistics' into 'master'

FE Follow-up from "Add packages_size to ProjectStatistics"

Closes #61284

See merge request gitlab-org/gitlab-ce!30406
parents 2523672b 476f0955
......@@ -17,6 +17,6 @@ module StorageHelper
counter_lfs_objects: storage_counter(statistics.lfs_objects_size)
}
_("%{counter_repositories} repositories, %{counter_wikis} wikis, %{counter_build_artifacts} build artifacts, %{counter_lfs_objects} LFS") % counters
_("Repository: %{counter_repositories} / Wikis: %{counter_wikis} / Build Artifacts: %{counter_build_artifacts} / LFS: %{counter_lfs_objects}") % counters
end
end
......@@ -43,11 +43,7 @@
= render_if_exists 'admin/namespace_plan_info', namespace: @group
%li
%span.light= _('Storage:')
%strong= storage_counter(@group.storage_size)
(
= storage_counters_details(@group)
)
= render 'shared/storage_counter_statistics', storage_size: @group.storage_size, storage_details: @group
%li
%span.light= _('Group Git LFS status:')
......
......@@ -73,11 +73,7 @@
= @project.repository.relative_path
%li
%span.light= _('Storage:')
%strong= storage_counter(@project.statistics&.storage_size)
- if @project.statistics
= surround '(', ')' do
= storage_counters_details(@project.statistics)
= render 'shared/storage_counter_statistics', storage_size: @project.statistics&.storage_size, storage_details: @project.statistics
%li
%span.light last commit:
......
%span.light= _('Storage:')
%strong= storage_counter(storage_size)
- if storage_details
(#{storage_counters_details(storage_details)})
---
title: Improved readability of storage statistics in group / project admin area
merge_request: 30406
author:
type: other
......@@ -124,9 +124,6 @@ msgstr ""
msgid "%{commit_author_link} authored %{commit_timeago}"
msgstr ""
msgid "%{counter_repositories} repositories, %{counter_wikis} wikis, %{counter_build_artifacts} build artifacts, %{counter_lfs_objects} LFS"
msgstr ""
msgid "%{count} more"
msgstr ""
......@@ -8877,6 +8874,9 @@ msgstr ""
msgid "Repository storage"
msgstr ""
msgid "Repository: %{counter_repositories} / Wikis: %{counter_wikis} / Build Artifacts: %{counter_build_artifacts} / LFS: %{counter_lfs_objects}"
msgstr ""
msgid "Request Access"
msgstr ""
......
......@@ -15,7 +15,7 @@ describe "Admin > Admin sees project statistics" do
let(:project) { create(:project, :repository) }
it "shows project statistics" do
expect(page).to have_content("Storage: 0 Bytes (0 Bytes repositories, 0 Bytes wikis, 0 Bytes build artifacts, 0 Bytes LFS)")
expect(page).to have_content("Storage: 0 Bytes (Repository: 0 Bytes / Wikis: 0 Bytes / Build Artifacts: 0 Bytes / LFS: 0 Bytes)")
end
end
......
......@@ -31,7 +31,7 @@ describe StorageHelper do
build_artifacts_size: 30.megabytes))
end
let(:message) { '10 KB repositories, 10 Bytes wikis, 30 MB build artifacts, 20 GB LFS' }
let(:message) { 'Repository: 10 KB / Wikis: 10 Bytes / Build Artifacts: 30 MB / LFS: 20 GB' }
it 'works on ProjectStatistics' do
expect(helper.storage_counters_details(project.statistics)).to eq(message)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment