summaryrefslogtreecommitdiff
path: root/app/views/admin/dashboard/index.html.haml
blob: 8c9fdc9ae4246b95a848cd3319e169323394b7b3 (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
- @no_container = true
= render "admin/dashboard/head"

%div{ class: container_class }
  .admin-dashboard.prepend-top-default
    .row
      .col-md-4
        %h4 Statistics
        %hr
        %p
          Forks
          %span.light.pull-right
            = number_with_delimiter(ForkedProjectLink.count)
        %p
          Issues
          %span.light.pull-right
            = number_with_delimiter(Issue.count)
        %p
          Merge Requests
          %span.light.pull-right
            = number_with_delimiter(MergeRequest.count)
        %p
          Notes
          %span.light.pull-right
            = number_with_delimiter(Note.count)
        %p
          Snippets
          %span.light.pull-right
            = number_with_delimiter(Snippet.count)
        %p
          SSH Keys
          %span.light.pull-right
            = number_with_delimiter(Key.count)
        %p
          Milestones
          %span.light.pull-right
            = number_with_delimiter(Milestone.count)
        %p
          Active Users
          %span.light.pull-right
            = number_with_delimiter(User.active.count)
      .col-md-4
        %h4
          Features
        %hr
        - sign_up = "Sign up"
        %p{ "aria-label" => "#{sign_up}: status " + (signup_enabled? ? "on" : "off") }
          = sign_up
          %span.light.pull-right
            = boolean_to_icon signup_enabled?
        - ldap = "LDAP"
        %p{ "aria-label" => "#{ldap}: status " + (Gitlab.config.ldap.enabled ? "on" : "off") }
          = ldap
          %span.light.pull-right
            = boolean_to_icon Gitlab.config.ldap.enabled
        - gravatar = "Gravatar"
        %p{ "aria-label" => "#{gravatar}: status " + (gravatar_enabled? ? "on" : "off") }
          = gravatar
          %span.light.pull-right
            = boolean_to_icon gravatar_enabled?
        - omniauth = "OmniAuth"
        %p{ "aria-label" => "#{omniauth}: status " + (Gitlab.config.omniauth.enabled ? "on" : "off") }
          = omniauth
          %span.light.pull-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.pull-right
            = boolean_to_icon Gitlab::IncomingEmail.enabled?
        - container_reg = "Container Registry"
        %p{ "aria-label" => "#{container_reg}: status " + (Gitlab.config.registry.enabled ? "on" : "off") }
          = container_reg
          %span.light.pull-right
            = boolean_to_icon Gitlab.config.registry.enabled

      .col-md-4
        %h4
          Components
          - if current_application_settings.version_check_enabled
            .pull-right
              = version_status_badge

        %hr
        %p
          GitLab
          %span.pull-right
            = Gitlab::VERSION
        %p
          GitLab Shell
          %span.pull-right
            = Gitlab::Shell.new.version
        %p
          GitLab Workhorse
          %span.pull-right
            = gitlab_workhorse_version
        %p
          GitLab API
          %span.pull-right
            = API::API::version
        %p
          Git
          %span.pull-right
            = Gitlab::Git.version
        %p
          Ruby
          %span.pull-right
            #{RUBY_VERSION}p#{RUBY_PATCHLEVEL}

        %p
          Rails
          %span.pull-right
            #{Rails::VERSION::STRING}

        %p
          = Gitlab::Database.adapter_name
          %span.pull-right
            = Gitlab::Database.version
    %hr
    .row
      .col-sm-4
        .light-well.well-centered
          %h4 Projects
          .data
            = link_to admin_projects_path do
              %h1= number_with_delimiter(Project.cached_count)
            %hr
            = link_to('New project', new_project_path, class: "btn btn-new")
      .col-sm-4
        .light-well.well-centered
          %h4 Users
          .data
            = link_to admin_users_path do
              %h1= number_with_delimiter(User.count)
            %hr
            = link_to 'New user', new_admin_user_path, class: "btn btn-new"
      .col-sm-4
        .light-well.well-centered
          %h4 Groups
          .data
            = link_to admin_groups_path do
              %h1= number_with_delimiter(Group.count)
            %hr
            = link_to 'New group', new_admin_group_path, class: "btn btn-new"

    .row.prepend-top-10
      .col-md-4
        %h4 Latest projects
        %hr
        - @projects.each do |project|
          %p
            = link_to project.name_with_namespace, [:admin, project.namespace.becomes(Namespace), project], class: 'str-truncated-60'
            %span.light.pull-right
              #{time_ago_with_tooltip(project.created_at)}

      .col-md-4
        %h4 Latest users
        %hr
        - @users.each do |user|
          %p
            = link_to [:admin, user], class: 'str-truncated-60' do
              = user.name
            %span.light.pull-right
              #{time_ago_with_tooltip(user.created_at)}

      .col-md-4
        %h4 Latest groups
        %hr
        - @groups.each do |group|
          %p
            = link_to [:admin, group], class: 'str-truncated-60' do
              = group.full_name
            %span.light.pull-right
              #{time_ago_with_tooltip(group.created_at)}