summaryrefslogtreecommitdiff
path: root/app/views/admin/projects/show.html.haml
blob: 8204a908f1bbc62107bd069370a28fec2edbff93 (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
%h4.page-title
  Project: #{@project.name}

%p
  = link_to admin_projects_path do
    ← Back to projects list
%hr
.row
  .col-md-6
    %fieldset
      %legend Project info
      %p
        ID:
        %strong= @project.id
      %p
        Name:
        %strong= @project.name
      %p
        Build timeout:
        %strong= @project.timeout
      %p
        GitLab ID:
        %strong= @project.gitlab_id
      %p
        Created at:
        %strong= @project.created_at
      %p
        Token:
        %strong= @project.token
      %p
        Public:
        %strong= @project.public
      %p
        Last build:
        - if @project.last_commit_date
          = time_ago_in_words @project.last_commit_date
    %br
    %fieldset
      %legend Email notification
      %p
        Repicients:
        %strong= @project.email_recipients
      %p
        Send mail to commiter:
        %strong= @project.email_add_committer
      %p
        Send on all broken builds:
        %strong= @project.email_only_broken_builds

  .col-md-6
    - @project.jobs.active.each do |job|
      %fieldset
        %legend 
          Build script for #{job.name}
        = preserve do
          %pre
            = job.commands

    %br
    %fieldset
      %legend Builds stats
      %p
        Total:
        %strong= pluralize @project.builds.count(:all), 'build'
      %p
        Successful:
        %strong= pluralize @project.builds.success.count(:all), 'build'
      %p
        Failed:
        %strong= pluralize @project.builds.failed.count(:all), 'build'

      %p
        Success ratio:
        %strong
          #{success_ratio(@project.builds.success, @project.builds.failed)}%

      %p
        Commits covered:
        %strong
          = @project.commits.count