summaryrefslogtreecommitdiff
path: root/app/views/admin/dashboard/index.html.haml
blob: 3df4ce93fa8b514514690caae679dbd50dc1ff9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
- @no_container = true
- breadcrumb_title "Dashboard"

%div{ class: container_class }
  = render_if_exists "admin/licenses/breakdown", license: @license

  .admin-dashboard.prepend-top-default
    .row
      .col-sm-4
        .info-well.dark-well
          .well-segment.well-centered
            = link_to admin_projects_path do
              %h3.text-center
                Projects:
                = approximate_count_with_delimiters(Project)
            %hr
            = link_to('New project', new_project_path, class: "btn btn-new")
      .col-sm-4
        .info-well.dark-well
          .well-segment.well-centered
            = link_to admin_users_path do
              %h3.text-center
                Users:
                = approximate_count_with_delimiters(User)
            = render_if_exists 'users_statistics'
            %hr
            = link_to 'New user', new_admin_user_path, class: "btn btn-new"
      .col-sm-4
        .info-well.dark-well
          .well-segment.well-centered
            = link_to admin_groups_path do
              %h3.text-center
                Groups:
                = approximate_count_with_delimiters(Group)
            %hr
            = link_to 'New group', new_admin_group_path, class: "btn btn-new"
    .row
      .col-md-4
        .info-well
          .well-segment.admin-well.admin-well-statistics
            %h4 Statistics
            %p
              Forks
              %span.light.float-right
                = approximate_count_with_delimiters(ForkedProjectLink)
            %p
              Issues
              %span.light.float-right
                = approximate_count_with_delimiters(Issue)
            %p
              Merge Requests
              %span.light.float-right
                = approximate_count_with_delimiters(MergeRequest)
            %p
              Notes
              %span.light.float-right
                = approximate_count_with_delimiters(Note)
            %p
              Snippets
              %span.light.float-right
                = approximate_count_with_delimiters(Snippet)
            %p
              SSH Keys
              %span.light.float-right
                = approximate_count_with_delimiters(Key)
            %p
              Milestones
              %span.light.float-right
                = approximate_count_with_delimiters(Milestone)
            %p
              Active Users
              %span.light.float-right
                = number_with_delimiter(User.active.count)
      .col-md-4
        .info-well
          .well-segment.admin-well.admin-well-features
            %h4 Features
            - sign_up = "Sign up"
            %p{ "aria-label" => "#{sign_up}: status " + (allow_signup? ? "on" : "off") }
              = sign_up
              %span.light.float-right
                = boolean_to_icon allow_signup?
            - ldap = "LDAP"
            %p{ "aria-label" => "#{ldap}: status " + (Gitlab.config.ldap.enabled ? "on" : "off") }
              = ldap
              %span.light.float-right
                = boolean_to_icon Gitlab.config.ldap.enabled
            - gravatar = "Gravatar"
            %p{ "aria-label" => "#{gravatar}: status " + (gravatar_enabled? ? "on" : "off") }
              = gravatar
              %span.light.float-right
                = boolean_to_icon gravatar_enabled?
            - omniauth = "OmniAuth"
            %p{ "aria-label" => "#{omniauth}: status " + (Gitlab.config.omniauth.enabled ? "on" : "off") }
              = omniauth
              %span.light.float-right
                = boolean_to_icon Gitlab.config.omniauth.enabled
            - reply_email = "Reply by email"
            %p{ "aria-label" => "#{reply_email}: status " + (Gitlab::IncomingEmail.enabled? ? "on" : "off") }
              = reply_email
              %span.light.float-right
                = boolean_to_icon Gitlab::IncomingEmail.enabled?

            = render_if_exists 'elastic_and_geo'

            - container_reg = "Container Registry"
            %p{ "aria-label" => "#{container_reg}: status " + (Gitlab.config.registry.enabled ? "on" : "off") }
              = container_reg
              %span.light.float-right
                = boolean_to_icon Gitlab.config.registry.enabled
            - gitlab_pages = 'GitLab Pages'
            - gitlab_pages_enabled = Gitlab.config.pages.enabled
            %p{ "aria-label" => "#{gitlab_pages}: status " + (gitlab_pages_enabled ? "on" : "off") }
              = gitlab_pages
              %span.light.float-right
                = boolean_to_icon gitlab_pages_enabled
            - gitlab_shared_runners = 'Shared Runners'
            - gitlab_shared_runners_enabled = Gitlab.config.gitlab_ci.shared_runners_enabled
            %p{ "aria-label" => "#{gitlab_shared_runners}: status " + (gitlab_shared_runners_enabled ? "on" : "off") }
              = gitlab_shared_runners
              %span.light.float-right
                = boolean_to_icon gitlab_shared_runners_enabled
      .col-md-4
        .info-well
          .well-segment.admin-well
            %h4
              Components
              - if Gitlab::CurrentSettings.version_check_enabled
                .float-right
                  = version_status_badge
            %p
              GitLab
              %span.float-right
                = Gitlab::VERSION
                = "(#{Gitlab.revision})"
            %p
              GitLab Shell
              %span.float-right
                = Gitlab::Shell.new.version
            %p
              GitLab Workhorse
              %span.float-right
                = gitlab_workhorse_version
            %p
              GitLab API
              %span.float-right
                = API::API::version
            - if Gitlab.config.pages.enabled
              %p
                GitLab Pages
                %span.float-right
                  = Gitlab::Pages::VERSION

            = render_if_exists 'geo'

            %p
              Ruby
              %span.float-right
                #{RUBY_VERSION}p#{RUBY_PATCHLEVEL}
            %p
              Rails
              %span.float-right
                #{Rails::VERSION::STRING}
            %p
              = Gitlab::Database.adapter_name
              %span.float-right
                = Gitlab::Database.version
            %p
              = link_to "Gitaly Servers", admin_gitaly_servers_path
    .row
      .col-md-4
        .info-well
          .well-segment.admin-well
            %h4 Latest projects
            - @projects.each do |project|
              %p
                = link_to project.full_name, [:admin, project.namespace.becomes(Namespace), project], class: 'str-truncated-60'
                %span.light.float-right
                  #{time_ago_with_tooltip(project.created_at)}
      .col-md-4
        .info-well
          .well-segment.admin-well
            %h4 Latest users
            - @users.each do |user|
              %p
                = link_to [:admin, user], class: 'str-truncated-60' do
                  = user.name
                %span.light.float-right
                  #{time_ago_with_tooltip(user.created_at)}
      .col-md-4
        .info-well
          .well-segment.admin-well
            %h4 Latest groups
            - @groups.each do |group|
              %p
                = link_to [:admin, group], class: 'str-truncated-60' do
                  = group.full_name
                %span.light.float-right
                  #{time_ago_with_tooltip(group.created_at)}