From fbb33b96db87f1302dace75d5e9409d396715a0e Mon Sep 17 00:00:00 2001 From: vapao Date: Wed, 29 Jul 2020 21:43:05 +0800 Subject: [PATCH] =?UTF-8?q?U=20=E5=8F=91=E5=B8=83=E7=94=B3=E8=AF=B7?= =?UTF-8?q?=E5=9B=BE=E8=A1=A8=E5=B1=95=E7=A4=BAtop10?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spug_api/apps/home/views.py | 2 +- spug_web/src/pages/home/RequestTop.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spug_api/apps/home/views.py b/spug_api/apps/home/views.py index cb117d9..7766efd 100644 --- a/spug_api/apps/home/views.py +++ b/spug_api/apps/home/views.py @@ -45,7 +45,7 @@ def get_request(request): data = {x.id: {'name': x.name, 'count': 0} for x in App.objects.all()} for req in DeployRequest.objects.filter(created_at__gt=s_date, created_at__lt=e_date): data[req.deploy.app_id]['count'] += 1 - data = sorted(data.values(), key=lambda x: x['count'], reverse=True)[:5] + data = sorted(data.values(), key=lambda x: x['count'], reverse=True)[:10] return json_response(data) return json_response(error=error) diff --git a/spug_web/src/pages/home/RequestTop.js b/spug_web/src/pages/home/RequestTop.js index 6847cc8..a437fb1 100644 --- a/spug_web/src/pages/home/RequestTop.js +++ b/spug_web/src/pages/home/RequestTop.js @@ -50,7 +50,7 @@ export default function () { } return ( - handleClick('day')}>今日