소스 검색

Moved 'Commits by Domains' to 'Authors' page.

The activity page is about the date/time of commits, and authors about commit
authorship-related information.
Heikki Hokkanen 16 년 전
부모
커밋
d4ae9a07a5
1개의 변경된 파일21개의 추가작업 그리고 21개의 파일을 삭제
  1. 21
    21
      gitstats

+ 21
- 21
gitstats 파일 보기

@@ -656,27 +656,6 @@ class HTMLReportCreator(ReportCreator):
656 656
 		f.write('<img src="day_of_week.png" alt="Day of Week" />')
657 657
 		fp.close()
658 658
 
659
-		# Domains
660
-		f.write(html_header(2, 'Commits by Domains'))
661
-		domains_by_commits = getkeyssortedbyvaluekey(data.domains, 'commits')
662
-		domains_by_commits.reverse() # most first
663
-		f.write('<div class="vtable"><table>')
664
-		f.write('<tr><th>Domains</th><th>Total (%)</th></tr>')
665
-		fp = open(path + '/domains.dat', 'w')
666
-		n = 0
667
-		max_domains = 10
668
-		for domain in domains_by_commits:
669
-			if n == max_domains:
670
-				break
671
-			commits = 0
672
-			n += 1
673
-			info = data.getDomainInfo(domain)
674
-			fp.write('%s %d %d\n' % (domain, n , info['commits']))
675
-			f.write('<tr><th>%s</th><td>%d (%.2f%%)</td></tr>' % (domain, info['commits'], (100.0 * info['commits'] / totalcommits)))
676
-		f.write('</table></div>')
677
-		f.write('<img src="domains.png" alt="Commits by Domains" />')
678
-		fp.close()
679
-
680 659
 		# Hour of Week
681 660
 		f.write(html_header(2, 'Hour of Week'))
682 661
 		f.write('<table>')
@@ -800,6 +779,27 @@ class HTMLReportCreator(ReportCreator):
800 779
 			f.write('<tr><td>%s</td><td>%s</td><td>%d (%.2f%% of %d)</td><td>%s</td></tr>' % (yy, authors[0], commits, (100.0 * commits) / data.commits_by_year[yy], data.commits_by_year[yy], next))
801 780
 		f.write('</table>')
802 781
 
782
+		# Domains
783
+		f.write(html_header(2, 'Commits by Domains'))
784
+		domains_by_commits = getkeyssortedbyvaluekey(data.domains, 'commits')
785
+		domains_by_commits.reverse() # most first
786
+		f.write('<div class="vtable"><table>')
787
+		f.write('<tr><th>Domains</th><th>Total (%)</th></tr>')
788
+		fp = open(path + '/domains.dat', 'w')
789
+		n = 0
790
+		max_domains = 10
791
+		for domain in domains_by_commits:
792
+			if n == max_domains:
793
+				break
794
+			commits = 0
795
+			n += 1
796
+			info = data.getDomainInfo(domain)
797
+			fp.write('%s %d %d\n' % (domain, n , info['commits']))
798
+			f.write('<tr><th>%s</th><td>%d (%.2f%%)</td></tr>' % (domain, info['commits'], (100.0 * info['commits'] / totalcommits)))
799
+		f.write('</table></div>')
800
+		f.write('<img src="domains.png" alt="Commits by Domains" />')
801
+		fp.close()
802
+
803 803
 		f.write('</body></html>')
804 804
 		f.close()
805 805