From commits-return-686-archive-asf-public=cust-asf.ponee.io@superset.incubator.apache.org Fri Feb 23 23:18:13 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 8B37A180652 for ; Fri, 23 Feb 2018 23:18:12 +0100 (CET) Received: (qmail 22928 invoked by uid 500); 23 Feb 2018 22:18:11 -0000 Mailing-List: contact commits-help@superset.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@superset.incubator.apache.org Delivered-To: mailing list commits@superset.incubator.apache.org Received: (qmail 22919 invoked by uid 99); 23 Feb 2018 22:18:11 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Feb 2018 22:18:11 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 6DA028618E; Fri, 23 Feb 2018 22:18:09 +0000 (UTC) Date: Fri, 23 Feb 2018 22:18:09 +0000 To: "commits@superset.apache.org" Subject: [incubator-superset] branch master updated: Pass param of limit for recent activity (#4475) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <151942428974.25647.14682274889503901493@gitbox.apache.org> From: maximebeauchemin@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: incubator-superset X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 5830846060909fb5e01e8d7d174c6c7bf7c9b039 X-Git-Newrev: cacf53c92ee6aecc642170ff0ab4bf58b4b348ae X-Git-Rev: cacf53c92ee6aecc642170ff0ab4bf58b4b348ae X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated This is an automated email from the ASF dual-hosted git repository. maximebeauchemin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-superset.git The following commit(s) were added to refs/heads/master by this push: new cacf53c Pass param of limit for recent activity (#4475) cacf53c is described below commit cacf53c92ee6aecc642170ff0ab4bf58b4b348ae Author: Hugh A. Miles II AuthorDate: Fri Feb 23 14:18:06 2018 -0800 Pass param of limit for recent activity (#4475) --- superset/views/core.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/superset/views/core.py b/superset/views/core.py index e5a6bf0..b51f0cd 100755 --- a/superset/views/core.py +++ b/superset/views/core.py @@ -1651,6 +1651,12 @@ class Superset(BaseSupersetView): def recent_activity(self, user_id): """Recent activity (actions) for a given user""" M = models # noqa + + if request.args.get('limit'): + limit = int(request.args.get('limit')) + else: + limit = 1000 + qry = ( db.session.query(M.Log, M.Dashboard, M.Slice) .outerjoin( @@ -1668,7 +1674,7 @@ class Superset(BaseSupersetView): ), ) .order_by(M.Log.dttm.desc()) - .limit(1000) + .limit(limit) ) payload = [] for log in qry.all(): -- To stop receiving notification emails like this one, please contact maximebeauchemin@apache.org.