twigg-app 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2146b57d426335ffa33202b730a54c57488967a5
4
- data.tar.gz: 0e8686beafb42dbadbfa5fa15c3143eddfc516b8
3
+ metadata.gz: 1fdfbf0ad8a9b1ec00aa15b6f7ca5e8723a8dea9
4
+ data.tar.gz: 1cafd53c94f68a438904efe2ea1eddf3a15c15e2
5
5
  SHA512:
6
- metadata.gz: 04497b886c27f52e353a8bde0af24c7d927a45404a2409a0e72155e52dcd5d79115e9c4e7b0e572d51c47a2a437a33ebc05521a79d548f17a9dc9af034daf5e2
7
- data.tar.gz: 87574c1298693984d14f1b37988a73ef80c31c32aa491d23411708b2d386b59db5294904b73c5b61ea4508e08146abcc4195274b3474fb35d880aeea13c129fb
6
+ metadata.gz: a3c0b18fbe63c0c8bf0f90b35baea9154dd04b1bb4f721a11dbd29f8d60472b74d773e90f1bd3768bddabaea8571c7f9151a911a8a8006278073b6632e9f3a04
7
+ data.tar.gz: 8d1bfe80372324f7fd7c95439dd9e4cc4d8327b47896d5573dc630641dcc07328197ca4eb8eec61e1fea0269ceb02d67c64b8a77b1890ec1c8037a394be43d06
@@ -1,5 +1,5 @@
1
1
  module Twigg
2
2
  module App
3
- VERSION = '0.0.4'
3
+ VERSION = '0.0.5'
4
4
  end
5
5
  end
@@ -0,0 +1,20 @@
1
+ - content_for :title do
2
+ Commit stats over past #{pluralize @days, 'day'}
3
+ %small
4
+ %span{day_links}
5
+
6
+ %h2= pluralize @commit_set.count, 'commit'
7
+ %table.table.table-striped.table-hover.table-bordered.sortable
8
+ %thead
9
+ %tr
10
+ %th{ data: { sort: 'int' } } Total commits
11
+ %th{ data: { sort: 'string-ins' } } Author
12
+ %th{ data: { sort: 'string-ins' } } Breakdown by project
13
+ %th  
14
+ %tbody
15
+ - @commit_set.authors.each do |object|
16
+ = haml :'shared/commit_row',
17
+ locals: { author: object[:author],
18
+ author_href: author_path(object[:author]),
19
+ author_tooltip: object[:author],
20
+ commit_set: object[:commit_set] }
@@ -0,0 +1,12 @@
1
+ - content_for :title do
2
+ = @author
3
+
4
+ %ul.breadcrumb
5
+ %li
6
+ %a(href='/') Home
7
+ %li
8
+ %a{ href: authors_path } Authors
9
+ %li.active= @author
10
+
11
+ = haml :'shared/commit_set',
12
+ locals: { commit_set: @commit_set, days: @days }
@@ -0,0 +1,38 @@
1
+ - content_for :title do
2
+ Author activity in Gerrit over past #{pluralize @days, 'day'}
3
+ %small
4
+ %span{day_links}
5
+
6
+ %table.table.table-hover.table-bordered.sortable
7
+ %thead
8
+ %tr
9
+ %th
10
+ %th.text-center{ colspan: 3 } Activity
11
+ %th.text-center{ colspan: 4 } Quality
12
+ %tr
13
+ %th{ data: { sort: 'string-ins' } } Author
14
+ %th{ data: { sort: 'int' } } Comments posted
15
+ %th{ data: { sort: 'int' } } Scores assigned
16
+ %th{ data: { sort: 'int' } } Changes pushed
17
+ %th{ data: { sort: 'int' } } Comments received
18
+ %th{ data: { sort: 'float' } } Comments / change
19
+ %th{ data: { sort: 'int' } } Revisions pushed
20
+ %th{ data: { sort: 'float' } } Revisions / change
21
+ %tbody
22
+ - @authors.each do |author, stats|
23
+ %tr
24
+ %td&= author
25
+ %td{ 'data-sort-value' => stats[:comments_posted] || 0 }
26
+ = number_with_delimiter(stats[:comments_posted])
27
+ %td{ 'data-sort-value' => stats[:scores_assigned] || 0 }
28
+ = number_with_delimiter(stats[:scores_assigned])
29
+ %td{ 'data-sort-value' => stats[:recently_active_changes] || 0 }
30
+ = number_with_delimiter(stats[:recently_active_changes])
31
+ %td{ 'data-sort-value' => stats[:comments_received] || 0 }
32
+ = number_with_delimiter(stats[:comments_received])
33
+ - comments_per_change = stats[:comments_received].to_i / stats[:recently_active_changes].to_f
34
+ %td{ 'data-sort-value' => (comments_per_change.nan? ? 0 : comments_per_change) }= '%.2f' % comments_per_change unless comments_per_change.nan?
35
+ %td{ 'data-sort-value' => stats[:revisions_pushed] || 0 }
36
+ = number_with_delimiter(stats[:revisions_pushed])
37
+ - revisions_per_change = stats[:revisions_pushed].to_i / stats[:recently_active_changes].to_f
38
+ %td{ 'data-sort-value' => (revisions_per_change.nan? ? 0 : revisions_per_change) }= '%.2f' % revisions_per_change unless revisions_per_change.nan?
@@ -0,0 +1,19 @@
1
+ - content_for :title do
2
+ Open changes in Gerrit
3
+
4
+ %h2= pluralize(@changes.count, 'open change')
5
+ %table.table.table-striped.table-hover.table-bordered
6
+ %thead
7
+ %tr
8
+ %th #
9
+ %th Subject
10
+ %th Author
11
+ %th Last modified
12
+ %tbody
13
+ - @changes.each do |change|
14
+ %tr
15
+ %td= change.change_id
16
+ %td
17
+ %a{ href: change.url }&= change.subject
18
+ %td&= change.full_name
19
+ %td= age(change.last_updated_on)
@@ -0,0 +1,25 @@
1
+ - content_for :title do
2
+ Tag use in Gerrit over past #{pluralize @days, 'day'}
3
+ %small
4
+ %span{day_links}
5
+
6
+ %section{ data: { view: 'Tags', authors: h(@authors.to_json) } }
7
+ %h2 Global tag use
8
+ #global-used= haml :'shared/progress'
9
+
10
+ %h2 Per-author tag use
11
+ - @authors.each do |author|
12
+ %h3&= author
13
+ %ul.nav.nav-tabs{ data: { tabs: 'tabs' } }
14
+ - if @stats[:from][author].any?
15
+ %li.active
16
+ %a{ href: "##{name_to_id author}-used", data: { toggle: 'tab' } } Used
17
+ - if @stats[:to][author].any?
18
+ %li{ class: ('active' unless @stats[:from][author].any?) }
19
+ %a{ href: "##{name_to_id author}-received", data: { toggle: 'tab' } } Received
20
+
21
+ .tab-content
22
+ - if @stats[:from][author].any?
23
+ .tab-pane.active{ id: "#{name_to_id author}-used" }
24
+ - if @stats[:to][author].any?
25
+ .tab-pane{ class: ('active' unless @stats[:from][author].any?), id: "#{name_to_id author}-received" }
@@ -0,0 +1,33 @@
1
+ - content_for :title do
2
+ Pairing stats over past #{pluralize @days, 'day'}
3
+ %small
4
+ %span{day_links}
5
+
6
+ %table.pairs.table.table-condensed.text-center
7
+ %thead
8
+ %tr
9
+ %td
10
+ - @pairs.authors.each do |pairee|
11
+ %th.text-center
12
+ %a{ href: author_path(pairee), data: { toggle: 'tooltip' }, title: pairee }
13
+ &= pairee.scan(/\b\w/).join
14
+ - @pairs.authors.each do |pairer|
15
+ %tr
16
+ %th.text-right
17
+ %a{ href: author_path(pairer), data: { toggle: 'tooltip' }, title: pairer }
18
+ &= pairer.scan(/\b\w/).join
19
+ - @pairs.authors.each do |pairee|
20
+ - solo = pairer == pairee
21
+ - alpha = @pairs[pairer][pairee].to_f / (solo ? @pairs.max_solo : @pairs.max_pair) * 0.5
22
+ - color = 'color: #f8f8ff;' if solo && alpha > 0.4
23
+ %td{ style: "background: rgba(0, #{solo ? 80 : 255}, #{solo ? 255 : 0}, #{alpha}); #{color}" }
24
+ - if @pairs[pairer][pairee] > 0
25
+ - if solo
26
+ %a{ href: author_path(pairee), data: { toggle: 'tooltip' }, title: pairee }
27
+ = number_with_delimiter @pairs[pairer][pairee]
28
+ - else
29
+ -# need inner container for tooltip, otherwise cell will resize on hover
30
+ .count{ data: { toggle: 'tooltip' }, title: "#{pairee} & #{pairer}" }
31
+ = number_with_delimiter @pairs[pairer][pairee]
32
+ - else
33
+  
@@ -0,0 +1,9 @@
1
+ - content_for :title do
2
+ Russian Novel-ness over past #{pluralize @days, 'day'}
3
+ %small
4
+ %span{day_links}
5
+
6
+ .bubble-chart{ data: { view: 'Russia',
7
+ authors_path: authors_path,
8
+ url: russian_novels_path(days: @days) } }
9
+ = haml :'shared/progress'
@@ -0,0 +1,22 @@
1
+ %table.table.table-hover.table-bordered.table-condensed.sortable
2
+ %tbody
3
+ - commit_set.commits.each do |commit|
4
+ %tr
5
+ %td +#{number_with_delimiter commit.stat[:additions]}
6
+ %td -#{number_with_delimiter commit.stat[:deletions]}
7
+ %td
8
+ %code
9
+ - if commit.link
10
+ %a{ href: commit.link, title: commit.commit }&= commit.subject
11
+ - else
12
+ &= commit.subject
13
+ %td
14
+ - if commit.repo.link
15
+ %a{ href: commit.repo.link }= commit.repo.name
16
+ - else
17
+ = commit.repo.name
18
+ %tr
19
+ %th +#{number_with_delimiter commit_set.additions}
20
+ %th -#{number_with_delimiter commit_set.deletions}
21
+ %th  
22
+ %th  
@@ -0,0 +1,19 @@
1
+ %tr
2
+ %td= number_with_delimiter(commit_set.count)
3
+ %td
4
+ %a{ href: author_href, data: { toggle: 'tooltip' }, title: author_tooltip }&= author
5
+ %td= breakdown(commit_set)
6
+ %td
7
+ %a{ data: { toggle: 'modal' }, href: '#' + name_to_id(author) + '-details' }
8
+ Details
9
+ .modal.fade{ id: name_to_id(author) + '-details', tabindex: '-1' }
10
+ .modal-dialog
11
+ .modal-content
12
+ .modal-header
13
+ %button(type='button' class='close' data-dismiss='modal' aria-hidden='true')
14
+ ×
15
+ %h3 Details for #{author}
16
+ .modal-body
17
+ = haml :'shared/commit_list', locals: { commit_set: commit_set }
18
+ .modal-footer
19
+ %a(href='#' class='btn btn-default' data-dismiss='modal') Close
@@ -0,0 +1,18 @@
1
+ %h2
2
+ Past #{pluralize days, 'day'}
3
+ %small
4
+ %span{day_links}
5
+
6
+ %table.table.table-striped.table-hover.table-bordered
7
+ %tbody
8
+ %tr
9
+ %th Total commits
10
+ %td= number_with_delimiter(commit_set.count)
11
+ %tr
12
+ %th Breakdown by project
13
+ %td= breakdown(commit_set)
14
+
15
+ .bar-chart{ data: { view: 'CommitSetBarChart' } }= haml :'shared/progress'
16
+
17
+ %h2= pluralize commit_set.count, 'commit'
18
+ = haml :'shared/commit_list', locals: { commit_set: commit_set }
@@ -0,0 +1,8 @@
1
+ %ul.list-unstyled
2
+ - [3, 7, 14, 30, 60, 90, 180].each do |count|
3
+ %li
4
+ - if @days == count
5
+ #{count} days
6
+ - else
7
+ %a{ href: "#{request.path_info}?days=#{count}" }
8
+ #{count} days</a>
@@ -0,0 +1,2 @@
1
+ .progress.progress-striped.active
2
+ .progress-bar{ style: 'width: 100%' }
@@ -0,0 +1,20 @@
1
+ - content_for :title do
2
+ Commit stats over past #{pluralize @days, 'day'}
3
+ %small
4
+ %span{day_links}
5
+
6
+ %h2= pluralize @commit_set.count, 'commit'
7
+ %table.table.table-striped.table-hover.table-bordered.sortable
8
+ %thead
9
+ %tr
10
+ %th{ data: { sort: 'int' } } Total commits
11
+ %th{ data: { sort: 'string-ins' } } Team
12
+ %th{ data: { sort: 'string-ins' } } Breakdown by project
13
+ %th &nbsp;
14
+ %tbody
15
+ - @commit_set.teams.each do |object|
16
+ = haml :'shared/commit_row',
17
+ locals: { author: object[:author],
18
+ author_href: team_path(object[:author]),
19
+ author_tooltip: object[:authors].join(', '),
20
+ commit_set: object[:commit_set] }
@@ -0,0 +1,12 @@
1
+ - content_for :title do
2
+ = @team
3
+
4
+ %ul.breadcrumb
5
+ %li
6
+ %a(href='/') Home
7
+ %li
8
+ %a{ href: teams_path } Teams
9
+ %li.active= @team
10
+
11
+ = haml :'shared/commit_set',
12
+ locals: { commit_set: @commit_set, days: @days }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twigg-app
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Causes Engineering
@@ -408,8 +408,22 @@ files:
408
408
  - public/vendor/underscore/test/vendor/runner.js
409
409
  - public/vendor/underscore/underscore-min.js
410
410
  - public/vendor/underscore/underscore.js
411
+ - views/authors/index.haml
412
+ - views/authors/show.haml
411
413
  - views/dashboard.haml
414
+ - views/gerrit/authors.haml
415
+ - views/gerrit/index.haml
416
+ - views/gerrit/tags.haml
412
417
  - views/layout.haml
418
+ - views/pairs/index.haml
419
+ - views/russian-novels/index.haml
420
+ - views/shared/commit_list.haml
421
+ - views/shared/commit_row.haml
422
+ - views/shared/commit_set.haml
423
+ - views/shared/day_links.haml
424
+ - views/shared/progress.haml
425
+ - views/teams/index.haml
426
+ - views/teams/show.haml
413
427
  - data/quips.yml
414
428
  homepage: https://github.com/causes/twigg
415
429
  licenses: