Merge
This commit is contained in:
parent
93eba6358b
commit
e9c64de9d8
|
@ -948,11 +948,12 @@ def get_project_info(project_id):
|
|||
anno_sum = len(annos)
|
||||
issue_sum = len(Issue.objects.filter(project_id=project_id))
|
||||
question_sum = len(Question.objects.filter(project_id=project_id))
|
||||
issue_question_sum = issue_sum + question_sum
|
||||
|
||||
|
||||
# 参与用户数
|
||||
usersum = len(annos.values('user_id').annotate(user_num=Count('user_id')))
|
||||
|
||||
|
||||
annoted_method_num = 0
|
||||
# 获取文件信息和热门问题
|
||||
anno_filenum = len(annos.values(
|
||||
'file_id').annotate(file_num=Count('file_id')))
|
||||
|
@ -1021,9 +1022,11 @@ def get_annoted_method_num(file_ids):
|
|||
for i in range(len(file_ids)):
|
||||
file_id = file_ids[i]
|
||||
method_lines = get_files_method_lines(file_id)
|
||||
if method_lines is None:
|
||||
return 0
|
||||
for j in range(len(method_lines)):
|
||||
current_line = method_lines[j]
|
||||
if Annotation.objects.filter(linenum=current_line) is not None:
|
||||
if len(Annotation.objects.filter(file_id__in=file_ids,linenum=current_line))>0:
|
||||
annoted_method_num = annoted_method_num + 1
|
||||
return annoted_method_num
|
||||
# 调用api接口
|
||||
|
@ -1068,6 +1071,7 @@ def get_dir_info(project_id,path):
|
|||
question_sum += fileid_questionnum[i]['question_num']
|
||||
|
||||
issue_question_sum = issue_sum + question_sum
|
||||
print(issue_question_sum)
|
||||
|
||||
anno_num = len(Annotation.objects.filter(file_id=file_id))
|
||||
question_num = len(Question.objects.filter(file_id=file_id))
|
||||
|
|
|
@ -83,8 +83,9 @@
|
|||
<span class="fl mt7 info-nav">Comments</span>
|
||||
</p>
|
||||
</div> -->
|
||||
<div class="filePathInfo">
|
||||
<div class="fl font-20 colorFFF">Annotated Files</div>
|
||||
<div class="filePathInfo">
|
||||
<div></div>
|
||||
<div class="clearfix filePathline fileinfo-item">
|
||||
<span>File Name</span>
|
||||
<span>Num.of Annotations</span>
|
||||
|
|
Loading…
Reference in New Issue