show.html.haml 6.44 KB
Newer Older
Phil Hughes's avatar
Phil Hughes committed
1
- add_to_breadcrumbs "Projects", admin_projects_path
2 3
- breadcrumb_title @project.full_name
- page_title @project.full_name, "Projects"
4
%h3.page-title
5
  Project: #{@project.full_name}
6
  = link_to edit_project_path(@project), class: "btn btn-nr pull-right" do
7
    %i.fa.fa-pencil-square-o
8
    Edit
9
%hr
10
- if @project.last_repository_check_failed?
Jacob Vosmaer's avatar
Jacob Vosmaer committed
11 12 13 14
  .row
    .col-md-12
      .panel
        .panel-heading.alert.alert-danger
15
          Last repository check
16 17
          = "(#{time_ago_in_words(@project.last_repository_check_at)} ago)"
          failed. See
Jacob Vosmaer's avatar
Jacob Vosmaer committed
18 19
          = link_to 'repocheck.log', admin_logs_path
          for error messages.
20
.row
21
  .col-md-6
22
    .panel.panel-default
23
      .panel-heading
24 25 26 27
        Project info:
      %ul.well-list
        %li
          %span.light Name:
28
          %strong
29
            = link_to @project.name, project_path(@project)
30 31 32 33 34 35 36 37 38 39 40
        %li
          %span.light Namespace:
          %strong
            - if @project.namespace
              = link_to @project.namespace.human_name, [:admin, @project.group || @project.owner]
            - else
              Global
        %li
          %span.light Owned by:
          %strong
            - if @project.owner
41
              = link_to @project.owner_name, [:admin, @project.owner]
42 43
            - else
              (deleted)
gitlabhq's avatar
gitlabhq committed
44

45 46 47 48
        %li
          %span.light Created by:
          %strong
            = @project.creator.try(:name) || '(deleted)'
49

50
        %li
51
          %span.light Created on:
52
          %strong
53
            = @project.created_at.to_s(:medium)
54

55 56 57
        %li
          %span.light http:
          %strong
58
            = link_to @project.http_url_to_repo, project_path(@project)
59 60 61
        %li
          %span.light ssh:
          %strong
62
            = link_to @project.ssh_url_to_repo, project_path(@project)
63 64
        - if @project.repository.exists?
          %li
65
            %span.light Gitaly storage name:
66
            %strong
67 68 69 70 71
              = @project.repository.storage
          %li
            %span.light Gitaly relative path:
            %strong
              = @project.repository.relative_path
72

73
          %li
74
            %span.light Storage used:
75 76 77 78 79 80 81 82 83
            %strong= storage_counter(@project.statistics.storage_size)
            (
            = storage_counter(@project.statistics.repository_size)
            repository,
            = storage_counter(@project.statistics.build_artifacts_size)
            build artifacts,
            = storage_counter(@project.statistics.lfs_objects_size)
            LFS
            )
84

85 86 87
          %li
            %span.light last commit:
            %strong
88
              = last_commit(@project)
89 90

          %li
91
            %span.light Git LFS status:
92 93
            %strong
              = project_lfs_status(@project)
94
              = link_to icon('question-circle'), help_page_path('workflow/lfs/manage_large_binaries_with_git_lfs')
95 96 97 98 99
        - else
          %li
            %span.light repository:
            %strong.cred
              does not exist
100

101 102 103 104 105
        - if @project.archived?
          %li
            %span.light archived:
            %strong repository is read-only

106 107 108
        %li
          %span.light access:
          %strong
109 110 111 112
            %span{ class: visibility_level_color(@project.visibility_level) }
              = visibility_level_icon(@project.visibility_level)
              = visibility_level_label(@project.visibility_level)

113
    .panel.panel-default
114
      .panel-heading
115
        Transfer project
116
      .panel-body
117
        = form_for @project, url: transfer_admin_project_path(@project), method: :put, html: { class: 'form-horizontal' } do |f|
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
118
          .form-group
Vinnie Okada's avatar
Vinnie Okada committed
119
            = f.label :new_namespace_id, "Namespace", class: 'control-label'
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
120
            .col-sm-10
121
              .dropdown
122
                = dropdown_toggle('Search for Namespace', { toggle: 'dropdown', field_name: 'new_namespace_id' }, { toggle_class: 'js-namespace-select large' })
123 124 125 126 127
                .dropdown-menu.dropdown-select
                  = dropdown_title('Namespaces')
                  = dropdown_filter("Search for Namespace")
                  = dropdown_content
                  = dropdown_loading
128

Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
129
          .form-group
130
            .col-sm-offset-2.col-sm-10
131 132
              = f.submit 'Transfer', class: 'btn btn-primary'

133
    .panel.panel-default.repository-check
Jacob Vosmaer's avatar
Jacob Vosmaer committed
134
      .panel-heading
135
        Repository check
Jacob Vosmaer's avatar
Jacob Vosmaer committed
136
      .panel-body
137
        = form_for @project, url: repository_check_admin_project_path(@project), method: :post do |f|
Jacob Vosmaer's avatar
Jacob Vosmaer committed
138
          .form-group
139
            - if @project.last_repository_check_at.nil?
Jacob Vosmaer's avatar
Jacob Vosmaer committed
140 141 142
              This repository has never been checked.
            - else
              This repository was last checked
143
              = @project.last_repository_check_at.to_s(:medium) + '.'
Jacob Vosmaer's avatar
Jacob Vosmaer committed
144
              The check
145
              - if @project.last_repository_check_failed?
Jacob Vosmaer's avatar
Jacob Vosmaer committed
146 147 148 149 150 151 152 153
                = succeed '.' do
                  %strong.cred failed
                See
                = link_to 'repocheck.log', admin_logs_path
                for error messages.
              - else
                passed.

154
            = link_to icon('question-circle'), help_page_path('administration/repository_checks')
155

Jacob Vosmaer's avatar
Jacob Vosmaer committed
156
          .form-group
157
            = f.submit 'Trigger repository check', class: 'btn btn-primary'
Jacob Vosmaer's avatar
Jacob Vosmaer committed
158

159
  .col-md-6
160
    - if @group
161
      .panel.panel-default
162
        .panel-heading
163 164
          %strong= @group.name
          group members
165
          %span.badge.badge-pill= @group_members.size
166
          .pull-right
167
            = link_to admin_group_path(@group), class: 'btn btn-xs' do
168
              = icon('pencil-square-o', text: 'Manage access')
169
        %ul.well-list.content-list.members-list
170
          = render partial: 'shared/members/member', collection: @group_members, as: :member, locals: { show_controls: false }
171
        .panel-footer
172
          = paginate @group_members, param_name: 'group_members_page', theme: 'gitlab'
173

174
    = render 'shared/members/requests', membership_source: @project, requesters: @requesters, force_mobile_view: true
175

176
    .panel.panel-default
177
      .panel-heading
178 179
        %strong= @project.name
        project members
180
        %span.badge.badge-pill= @project.users.size
181
        .pull-right
182
          = link_to icon('pencil-square-o', text: 'Manage access'), polymorphic_url([@project, :members]), class: "btn btn-xs"
183
      %ul.well-list.project_members.content-list.members-list
184
        = render partial: 'shared/members/member', collection: @project_members, as: :member, locals: { show_controls: false }
185
      .panel-footer
186
        = paginate @project_members, param_name: 'project_members_page', theme: 'gitlab'