Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
510aa2d6
Commit
510aa2d6
authored
Oct 12, 2021
by
Guillaume CHAUVEL
Committed by
Terri Chu
Nov 09, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add pipeline artifacts size to admin area project statistics
Changelog: changed
parent
c8d65dda
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
12 deletions
+14
-12
app/helpers/storage_helper.rb
app/helpers/storage_helper.rb
+2
-1
locale/gitlab.pot
locale/gitlab.pot
+1
-1
spec/features/admin/admin_sees_project_statistics_spec.rb
spec/features/admin/admin_sees_project_statistics_spec.rb
+1
-1
spec/helpers/storage_helper_spec.rb
spec/helpers/storage_helper_spec.rb
+10
-9
No files found.
app/helpers/storage_helper.rb
View file @
510aa2d6
...
...
@@ -14,12 +14,13 @@ module StorageHelper
counter_repositories:
storage_counter
(
statistics
.
repository_size
),
counter_wikis:
storage_counter
(
statistics
.
wiki_size
),
counter_build_artifacts:
storage_counter
(
statistics
.
build_artifacts_size
),
counter_pipeline_artifacts:
storage_counter
(
statistics
.
pipeline_artifacts_size
),
counter_lfs_objects:
storage_counter
(
statistics
.
lfs_objects_size
),
counter_snippets:
storage_counter
(
statistics
.
snippets_size
),
counter_packages:
storage_counter
(
statistics
.
packages_size
),
counter_uploads:
storage_counter
(
statistics
.
uploads_size
)
}
_
(
"Repository: %{counter_repositories} / Wikis: %{counter_wikis} / Build Artifacts: %{counter_build_artifacts} / LFS: %{counter_lfs_objects} / Snippets: %{counter_snippets} / Packages: %{counter_packages} / Uploads: %{counter_uploads}"
)
%
counters
_
(
"Repository: %{counter_repositories} / Wikis: %{counter_wikis} / Build Artifacts: %{counter_build_artifacts} /
Pipeline Artifacts: %{counter_pipeline_artifacts} /
LFS: %{counter_lfs_objects} / Snippets: %{counter_snippets} / Packages: %{counter_packages} / Uploads: %{counter_uploads}"
)
%
counters
end
end
locale/gitlab.pot
View file @
510aa2d6
...
...
@@ -29184,7 +29184,7 @@ msgstr ""
msgid "Repository update events"
msgstr ""
msgid "Repository: %{counter_repositories} / Wikis: %{counter_wikis} / Build Artifacts: %{counter_build_artifacts} / LFS: %{counter_lfs_objects} / Snippets: %{counter_snippets} / Packages: %{counter_packages} / Uploads: %{counter_uploads}"
msgid "Repository: %{counter_repositories} / Wikis: %{counter_wikis} / Build Artifacts: %{counter_build_artifacts} /
Pipeline Artifacts: %{counter_pipeline_artifacts} /
LFS: %{counter_lfs_objects} / Snippets: %{counter_snippets} / Packages: %{counter_packages} / Uploads: %{counter_uploads}"
msgstr ""
msgid "RepositorySettingsAccessLevel|Select"
...
...
spec/features/admin/admin_sees_project_statistics_spec.rb
View file @
510aa2d6
...
...
@@ -16,7 +16,7 @@ RSpec.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 (Repository: 0 Bytes / Wikis: 0 Bytes / Build Artifacts: 0 Bytes / LFS: 0 Bytes / Snippets: 0 Bytes / Packages: 0 Bytes / Uploads: 0 Bytes)"
)
expect
(
page
).
to
have_content
(
"Storage: 0 Bytes (Repository: 0 Bytes / Wikis: 0 Bytes / Build Artifacts: 0 Bytes /
Pipeline Artifacts: 0 Bytes /
LFS: 0 Bytes / Snippets: 0 Bytes / Packages: 0 Bytes / Uploads: 0 Bytes)"
)
end
end
...
...
spec/helpers/storage_helper_spec.rb
View file @
510aa2d6
...
...
@@ -27,17 +27,18 @@ RSpec.describe StorageHelper do
create
(
:project
,
namespace:
namespace
,
statistics:
build
(
:project_statistics
,
namespace:
namespace
,
repository_size:
10
.
kilobytes
,
wiki_size:
10
.
bytes
,
lfs_objects_size:
20
.
gigabytes
,
build_artifacts_size:
30
.
megabytes
,
snippets_size:
40
.
megabytes
,
packages_size:
12
.
megabytes
,
uploads_size:
15
.
megabytes
))
namespace:
namespace
,
repository_size:
10
.
kilobytes
,
wiki_size:
10
.
bytes
,
lfs_objects_size:
20
.
gigabytes
,
build_artifacts_size:
30
.
megabytes
,
pipeline_artifacts_size:
11
.
megabytes
,
snippets_size:
40
.
megabytes
,
packages_size:
12
.
megabytes
,
uploads_size:
15
.
megabytes
))
end
let
(
:message
)
{
'Repository: 10 KB / Wikis: 10 Bytes / Build Artifacts: 30 MB / LFS: 20 GB / Snippets: 40 MB / Packages: 12 MB / Uploads: 15 MB'
}
let
(
:message
)
{
'Repository: 10 KB / Wikis: 10 Bytes / Build Artifacts: 30 MB /
Pipeline Artifacts: 11 MB /
LFS: 20 GB / Snippets: 40 MB / Packages: 12 MB / Uploads: 15 MB'
}
it
'works on ProjectStatistics'
do
expect
(
helper
.
storage_counters_details
(
project
.
statistics
)).
to
eq
(
message
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment