Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 046D5200BAC for ; Wed, 26 Oct 2016 23:42:41 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 02FD0160AEE; Wed, 26 Oct 2016 21:42:41 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 47236160AE1 for ; Wed, 26 Oct 2016 23:42:40 +0200 (CEST) Received: (qmail 73940 invoked by uid 500); 26 Oct 2016 21:42:39 -0000 Mailing-List: contact commits-help@airflow.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airflow.incubator.apache.org Delivered-To: mailing list commits@airflow.incubator.apache.org Received: (qmail 73927 invoked by uid 99); 26 Oct 2016 21:42:39 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Oct 2016 21:42:39 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id E8029C767D for ; Wed, 26 Oct 2016 21:42:38 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -6.219 X-Spam-Level: X-Spam-Status: No, score=-6.219 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id Llh6G7T8gpIb for ; Wed, 26 Oct 2016 21:42:36 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id BCA625FBA6 for ; Wed, 26 Oct 2016 21:42:35 +0000 (UTC) Received: (qmail 73904 invoked by uid 99); 26 Oct 2016 21:42:34 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Oct 2016 21:42:34 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id B168CE0ADC; Wed, 26 Oct 2016 21:42:34 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sanand@apache.org To: commits@airflow.incubator.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: incubator-airflow git commit: [AIRFLOW-453] Add XCom Admin Page Date: Wed, 26 Oct 2016 21:42:34 +0000 (UTC) archived-at: Wed, 26 Oct 2016 21:42:41 -0000 Repository: incubator-airflow Updated Branches: refs/heads/master 84cb7e809 -> 2bbcdc3a9 [AIRFLOW-453] Add XCom Admin Page Closes #1756 from msumit/AIRFLOW-453 Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/2bbcdc3a Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/2bbcdc3a Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/2bbcdc3a Branch: refs/heads/master Commit: 2bbcdc3a9958103db49fb98727831d1aee4e12ed Parents: 84cb7e8 Author: Sumit Maheshwari Authored: Wed Oct 26 14:42:18 2016 -0700 Committer: Siddharth Anand Committed: Wed Oct 26 14:42:18 2016 -0700 ---------------------------------------------------------------------- airflow/www/app.py | 2 ++ airflow/www/views.py | 21 +++++++++++++++++++++ tests/core.py | 2 ++ 3 files changed, 25 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/2bbcdc3a/airflow/www/app.py ---------------------------------------------------------------------- diff --git a/airflow/www/app.py b/airflow/www/app.py index c4dff6f..6ab4ffd 100644 --- a/airflow/www/app.py +++ b/airflow/www/app.py @@ -89,6 +89,8 @@ def create_app(config=None): models.Connection, Session, name="Connections", category="Admin")) av(vs.VariableView( models.Variable, Session, name="Variables", category="Admin")) + av(vs.XComView( + models.XCom, Session, name="XComs", category="Admin")) admin.add_link(base.MenuLink( category='Docs', name='Documentation', http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/2bbcdc3a/airflow/www/views.py ---------------------------------------------------------------------- diff --git a/airflow/www/views.py b/airflow/www/views.py index b0ccfaa..36384d8 100644 --- a/airflow/www/views.py +++ b/airflow/www/views.py @@ -2161,6 +2161,27 @@ class VariableView(wwwutils.DataProfilingMixin, AirflowModelView): form.val.data = '*' * 8 +class XComView(wwwutils.LoginMixin, AirflowModelView): + verbose_name = "XCom" + verbose_name_plural = "XComs" + page_size = 20 + + form_columns = ( + 'key', + 'value', + 'execution_date', + 'task_id', + 'dag_id', + ) + + form_extra_fields = { + 'value': StringField('Value'), + } + + column_filters = ('key', 'timestamp', 'execution_date', 'task_id', 'dag_id') + column_searchable_list = ('key', 'timestamp', 'execution_date', 'task_id', 'dag_id') + + class JobModelView(ModelViewOnly): verbose_name_plural = "jobs" verbose_name = "job" http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/2bbcdc3a/tests/core.py ---------------------------------------------------------------------- diff --git a/tests/core.py b/tests/core.py index 9ce71d4..e2612f4 100644 --- a/tests/core.py +++ b/tests/core.py @@ -1399,6 +1399,8 @@ class WebUiTests(unittest.TestCase): response = self.app.get( "/admin/airflow/paused?" "dag_id=example_python_operator&is_paused=false") + response = self.app.get("/admin/xcom", follow_redirects=True) + assert "Xcoms" in response.data.decode('utf-8') def test_charts(self): session = Session()