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
5d9d74ea
Commit
5d9d74ea
authored
Jun 26, 2020
by
Francisco Javier López
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated storage views to include snippets_size
parent
1b0feb52
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
20 additions
and
6 deletions
+20
-6
app/helpers/storage_helper.rb
app/helpers/storage_helper.rb
+3
-2
ee/app/assets/javascripts/storage_counter/components/project.vue
...assets/javascripts/storage_counter/components/project.vue
+1
-0
ee/app/assets/javascripts/storage_counter/queries/storage.graphql
...ssets/javascripts/storage_counter/queries/storage.graphql
+1
-0
ee/changelogs/unreleased/fj-223707-add-snippets-size-to-usage-data-views.yml
...eased/fj-223707-add-snippets-size-to-usage-data-views.yml
+5
-0
ee/spec/frontend/storage_counter/components/project_spec.js
ee/spec/frontend/storage_counter/components/project_spec.js
+2
-0
locale/gitlab.pot
locale/gitlab.pot
+4
-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
+3
-2
No files found.
app/helpers/storage_helper.rb
View file @
5d9d74ea
...
...
@@ -14,9 +14,10 @@ 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_lfs_objects:
storage_counter
(
statistics
.
lfs_objects_size
)
counter_lfs_objects:
storage_counter
(
statistics
.
lfs_objects_size
),
counter_snippets:
storage_counter
(
statistics
.
snippets_size
)
}
_
(
"Repository: %{counter_repositories} / Wikis: %{counter_wikis} / Build Artifacts: %{counter_build_artifacts} / LFS: %{counter_lfs_objects}"
)
%
counters
_
(
"Repository: %{counter_repositories} / Wikis: %{counter_wikis} / Build Artifacts: %{counter_build_artifacts} / LFS: %{counter_lfs_objects}
/ Snippets: %{counter_snippets}
"
)
%
counters
end
end
ee/app/assets/javascripts/storage_counter/components/project.vue
View file @
5d9d74ea
...
...
@@ -78,6 +78,7 @@ export default {
buildArtifactsSize
:
s__
(
'
UsageQuota|Artifacts
'
),
packagesSize
:
s__
(
'
UsageQuota|Packages
'
),
wikiSize
:
s__
(
'
UsageQuota|Wiki
'
),
snippetsSize
:
s__
(
'
UsageQuota|Snippets
'
),
},
};
</
script
>
...
...
ee/app/assets/javascripts/storage_counter/queries/storage.graphql
View file @
5d9d74ea
...
...
@@ -27,6 +27,7 @@ query getStorageCounter($fullPath: ID!) {
buildArtifactsSize
packagesSize
wikiSize
snippetsSize
}
}
}
...
...
ee/changelogs/unreleased/fj-223707-add-snippets-size-to-usage-data-views.yml
0 → 100644
View file @
5d9d74ea
---
title
:
Update storage views to show snippets size
merge_request
:
35419
author
:
type
:
changed
ee/spec/frontend/storage_counter/components/project_spec.js
View file @
5d9d74ea
...
...
@@ -19,6 +19,8 @@ const data = {
lfsObjectsSize
:
0
,
buildArtifactsSize
:
1272375
,
packagesSize
:
0
,
wikiSize
:
2048
,
snippetsSize
:
1024
,
},
};
...
...
locale/gitlab.pot
View file @
5d9d74ea
...
...
@@ -19222,7 +19222,7 @@ msgstr ""
msgid "Repository sync capacity"
msgstr ""
msgid "Repository: %{counter_repositories} / Wikis: %{counter_wikis} / Build Artifacts: %{counter_build_artifacts} / LFS: %{counter_lfs_objects}"
msgid "Repository: %{counter_repositories} / Wikis: %{counter_wikis} / Build Artifacts: %{counter_build_artifacts} / LFS: %{counter_lfs_objects}
/ Snippets: %{counter_snippets}
"
msgstr ""
msgid "RepositorySettingsAccessLevel|Select"
...
...
@@ -24725,6 +24725,9 @@ msgstr ""
msgid "UsageQuota|Repository"
msgstr ""
msgid "UsageQuota|Snippets"
msgstr ""
msgid "UsageQuota|Storage"
msgstr ""
...
...
spec/features/admin/admin_sees_project_statistics_spec.rb
View file @
5d9d74ea
...
...
@@ -15,7 +15,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)"
)
expect
(
page
).
to
have_content
(
"Storage: 0 Bytes (Repository: 0 Bytes / Wikis: 0 Bytes / Build Artifacts: 0 Bytes / LFS: 0 Bytes
/ Snippets: 0 Bytes
)"
)
end
end
...
...
spec/helpers/storage_helper_spec.rb
View file @
5d9d74ea
...
...
@@ -30,10 +30,11 @@ RSpec.describe StorageHelper do
repository_size:
10
.
kilobytes
,
wiki_size:
10
.
bytes
,
lfs_objects_size:
20
.
gigabytes
,
build_artifacts_size:
30
.
megabytes
))
build_artifacts_size:
30
.
megabytes
,
snippets_size:
40
.
megabytes
))
end
let
(
:message
)
{
'Repository: 10 KB / Wikis: 10 Bytes / Build Artifacts: 30 MB / LFS: 20 GB'
}
let
(
:message
)
{
'Repository: 10 KB / Wikis: 10 Bytes / Build Artifacts: 30 MB / LFS: 20 GB
/ Snippets: 40 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