Commit ff25cb934beac5189f9d80341873bba8d635d537
Exists in
master
and in
4 other branches
Merge branch 'feature/repo_size_in_admin' of /home/git/repositories/gitlab/gitlabhq
Showing
3 changed files
with
6 additions
and
2 deletions
Show diff stats
app/helpers/projects_helper.rb
... | ... | @@ -137,8 +137,8 @@ module ProjectsHelper |
137 | 137 | end |
138 | 138 | end |
139 | 139 | |
140 | - def repository_size | |
141 | - "#{@project.repository.size} MB" | |
140 | + def repository_size(project = nil) | |
141 | + "#{(project || @project).repository.size} MB" | |
142 | 142 | rescue |
143 | 143 | # In order to prevent 500 error |
144 | 144 | # when application cannot allocate memory | ... | ... |
app/views/admin/groups/show.html.haml
app/views/admin/projects/index.html.haml
... | ... | @@ -49,6 +49,8 @@ |
49 | 49 | = visibility_level_icon(project.visibility_level) |
50 | 50 | = link_to project.name_with_namespace, [:admin, project] |
51 | 51 | .pull-right |
52 | + %span.label.label-gray | |
53 | + = repository_size(project) | |
52 | 54 | = link_to 'Edit', edit_project_path(project), id: "edit_#{dom_id(project)}", class: "btn btn-small" |
53 | 55 | = link_to 'Destroy', [project], confirm: remove_project_message(project), method: :delete, class: "btn btn-small btn-remove" |
54 | 56 | - if @projects.blank? | ... | ... |