Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

set num data for scale rather then shown all datas #60

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion web/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ def logic(self):
# should be sorted by freshness
commits = get_commits()
kpis = {}
for commit in commits:
for commit in commits[:-self.N:-1]:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

需要确认下这里是按时间从新往旧排序过的,取 top N 才有效

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

恩恩, 确认过~

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

加个按时间排序?最好验证下

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok. I have added the sorting by date in this pr:
#59

rcd = query_commit_from_db(commit.commit)
if self.task_name not in rcd: continue
for (kpi,val) in rcd[self.task_name].kpis.items():
Expand Down