Add more deeplinks
This commit is contained in:
@ -63,7 +63,7 @@ module StatisticsHelper
|
|||||||
name: t('statistics.entries.exercises.submissions_per_minute'),
|
name: t('statistics.entries.exercises.submissions_per_minute'),
|
||||||
data: (Submission.where('created_at >= ?', DateTime.now - 1.hours).count.to_f / 60).round(2),
|
data: (Submission.where('created_at >= ?', DateTime.now - 1.hours).count.to_f / 60).round(2),
|
||||||
unit: '/min',
|
unit: '/min',
|
||||||
url: 'statistics/graphs'
|
url: statistics_graphs_path
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'execution_environments',
|
key: 'execution_environments',
|
||||||
@ -122,28 +122,32 @@ module StatisticsHelper
|
|||||||
name: t('statistics.entries.request_for_comments.percent_solved'),
|
name: t('statistics.entries.request_for_comments.percent_solved'),
|
||||||
data: (100.0 / RequestForComment.in_range(from, to).count * RequestForComment.in_range(from, to).where(solved: true).count).round(1),
|
data: (100.0 / RequestForComment.in_range(from, to).count * RequestForComment.in_range(from, to).where(solved: true).count).round(1),
|
||||||
unit: '%',
|
unit: '%',
|
||||||
axis: 'right'
|
axis: 'right',
|
||||||
|
url: statistics_graphs_path
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'percent_soft_solved',
|
key: 'percent_soft_solved',
|
||||||
name: t('statistics.entries.request_for_comments.percent_soft_solved'),
|
name: t('statistics.entries.request_for_comments.percent_soft_solved'),
|
||||||
data: (100.0 / RequestForComment.in_range(from, to).count * RequestForComment.in_range(from, to).unsolved.where(full_score_reached: true).count).round(1),
|
data: (100.0 / RequestForComment.in_range(from, to).count * RequestForComment.in_range(from, to).unsolved.where(full_score_reached: true).count).round(1),
|
||||||
unit: '%',
|
unit: '%',
|
||||||
axis: 'right'
|
axis: 'right',
|
||||||
|
url: statistics_graphs_path
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'percent_unsolved',
|
key: 'percent_unsolved',
|
||||||
name: t('statistics.entries.request_for_comments.percent_unsolved'),
|
name: t('statistics.entries.request_for_comments.percent_unsolved'),
|
||||||
data: (100.0 / RequestForComment.in_range(from, to).count * RequestForComment.in_range(from, to).unsolved.count).round(1),
|
data: (100.0 / RequestForComment.in_range(from, to).count * RequestForComment.in_range(from, to).unsolved.count).round(1),
|
||||||
unit: '%',
|
unit: '%',
|
||||||
axis: 'right'
|
axis: 'right',
|
||||||
|
url: statistics_graphs_path
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'rfcs_with_comments',
|
key: 'rfcs_with_comments',
|
||||||
name: t('statistics.entries.request_for_comments.with_comments'),
|
name: t('statistics.entries.request_for_comments.with_comments'),
|
||||||
data: RequestForComment.in_range(from, to).joins('join "submissions" s on s.id = request_for_comments.submission_id
|
data: RequestForComment.in_range(from, to).joins('join "submissions" s on s.id = request_for_comments.submission_id
|
||||||
join "files" f on f.context_id = s.id and f.context_type = \'Submission\'
|
join "files" f on f.context_id = s.id and f.context_type = \'Submission\'
|
||||||
join "comments" c on c.file_id = f.id').group('request_for_comments.id').count.size
|
join "comments" c on c.file_id = f.id').group('request_for_comments.id').count.size,
|
||||||
|
url: statistics_graphs_path
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user