Commit caa6cad8 authored by Nick Kipling's avatar Nick Kipling

Implemented frontend suggestions

Converted storage details into a small partial
Reworded the storage details summary as suggested
Updated pot file
Updating tests to support new wording of storage details
parent d78a88bd
...@@ -17,6 +17,6 @@ module StorageHelper ...@@ -17,6 +17,6 @@ module StorageHelper
counter_lfs_objects: storage_counter(statistics.lfs_objects_size) 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
end end
...@@ -43,11 +43,7 @@ ...@@ -43,11 +43,7 @@
= render_if_exists 'admin/namespace_plan_info', namespace: @group = render_if_exists 'admin/namespace_plan_info', namespace: @group
%li %li
%span.light= _('Storage:') = render 'shared/storage_counter_statistics', storage_size: @group.storage_size, storage_details: @group
%strong= storage_counter(@group.storage_size)
(
= storage_counters_details(@group)
)
%li %li
%span.light= _('Group Git LFS status:') %span.light= _('Group Git LFS status:')
......
...@@ -73,11 +73,7 @@ ...@@ -73,11 +73,7 @@
= @project.repository.relative_path = @project.repository.relative_path
%li %li
%span.light= _('Storage:') = render 'shared/storage_counter_statistics', storage_size: @project.statistics&.storage_size, storage_details: @project.statistics
%strong= storage_counter(@project.statistics&.storage_size)
- if @project.statistics
= surround '(', ')' do
= storage_counters_details(@project.statistics)
%li %li
%span.light last commit: %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
...@@ -161,9 +161,6 @@ msgstr "" ...@@ -161,9 +161,6 @@ msgstr ""
msgid "%{commit_author_link} authored %{commit_timeago}" msgid "%{commit_author_link} authored %{commit_timeago}"
msgstr "" msgstr ""
msgid "%{counter_repositories} repositories, %{counter_wikis} wikis, %{counter_build_artifacts} build artifacts, %{counter_lfs_objects} LFS"
msgstr ""
msgid "%{count} approval required from %{name}" msgid "%{count} approval required from %{name}"
msgid_plural "%{count} approvals required from %{name}" msgid_plural "%{count} approvals required from %{name}"
msgstr[0] "" msgstr[0] ""
...@@ -11620,6 +11617,9 @@ msgstr "" ...@@ -11620,6 +11617,9 @@ msgstr ""
msgid "Repository storage" msgid "Repository storage"
msgstr "" msgstr ""
msgid "Repository: %{counter_repositories} / Wikis: %{counter_wikis} / Build Artifacts: %{counter_build_artifacts} / LFS: %{counter_lfs_objects}"
msgstr ""
msgid "RepositorySettingsAccessLevel|Select" msgid "RepositorySettingsAccessLevel|Select"
msgstr "" msgstr ""
......
...@@ -15,7 +15,7 @@ describe "Admin > Admin sees project statistics" do ...@@ -15,7 +15,7 @@ describe "Admin > Admin sees project statistics" do
let(:project) { create(:project, :repository) } let(:project) { create(:project, :repository) }
it "shows project statistics" do 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
end end
......
...@@ -31,7 +31,7 @@ describe StorageHelper do ...@@ -31,7 +31,7 @@ describe StorageHelper do
build_artifacts_size: 30.megabytes)) build_artifacts_size: 30.megabytes))
end 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 it 'works on ProjectStatistics' do
expect(helper.storage_counters_details(project.statistics)).to eq(message) 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