From commits-return-2304-archive-asf-public=cust-asf.ponee.io@superset.incubator.apache.org Wed Feb 20 23:39:02 2019 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 F301918075F for ; Thu, 21 Feb 2019 00:39:01 +0100 (CET) Received: (qmail 4502 invoked by uid 500); 20 Feb 2019 23:39:01 -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 4493 invoked by uid 99); 20 Feb 2019 23:39:01 -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; Wed, 20 Feb 2019 23:39:01 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 4FBB5851A8; Wed, 20 Feb 2019 23:39:00 +0000 (UTC) Date: Wed, 20 Feb 2019 23:38:59 +0000 To: "commits@superset.apache.org" Subject: [incubator-superset] branch master updated: [fix] minor fix for Superset logger (#6922) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <155070593903.7057.11626887539964156824@gitbox.apache.org> From: graceguo@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: ba9523c7c4d6e11876455eb0a1bf090e1ddacc7f X-Git-Newrev: 16f4721a9257e3ff842258d3a2d5b9555f7e1fb4 X-Git-Rev: 16f4721a9257e3ff842258d3a2d5b9555f7e1fb4 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. graceguo 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 16f4721 [fix] minor fix for Superset logger (#6922) 16f4721 is described below commit 16f4721a9257e3ff842258d3a2d5b9555f7e1fb4 Author: Grace Guo AuthorDate: Wed Feb 20 15:38:45 2019 -0800 [fix] minor fix for Superset logger (#6922) --- superset/assets/src/components/OmniContainer.jsx | 18 +++++------------- superset/assets/src/dashboard/components/Dashboard.jsx | 7 +------ superset/assets/src/dashboard/components/Header.jsx | 4 ++-- .../src/dashboard/components/gridComponents/Tabs.jsx | 2 +- 4 files changed, 9 insertions(+), 22 deletions(-) diff --git a/superset/assets/src/components/OmniContainer.jsx b/superset/assets/src/components/OmniContainer.jsx index 792d8ba..edf33b9 100644 --- a/superset/assets/src/components/OmniContainer.jsx +++ b/superset/assets/src/components/OmniContainer.jsx @@ -24,14 +24,11 @@ import { SupersetClient } from '@superset-ui/connection'; import { isFeatureEnabled, FeatureFlag } from 'src/featureFlags'; import Omnibar from 'omnibar'; import { - Logger, - ActionLog, LOG_ACTIONS_OMNIBAR_TRIGGERED, } from '../logger/LogUtils'; const propTypes = { - impressionId: PropTypes.string.isRequired, - dashboardId: PropTypes.number.isRequired, + logEvent: PropTypes.func.isRequired, }; const getDashboards = query => @@ -71,20 +68,15 @@ class OmniContainer extends React.Component { if (controlOrCommand && isFeatureEnabled(FeatureFlag.OMNIBAR)) { const isK = event.key === 'k' || event.keyCode === 83; if (isK) { + this.props.logEvent(LOG_ACTIONS_OMNIBAR_TRIGGERED, { + show_omni: !this.state.showOmni, + }); + this.setState({ showOmni: !this.state.showOmni }); document .getElementsByClassName('Omnibar')[0] .focus(); - - Logger.send( - new ActionLog({ - impressionId: this.props.impressionId, // impo - source: 'dashboard', - sourceId: this.props.dashboardId, // sourceId: this.props.dashboardId - eventNames: LOG_ACTIONS_OMNIBAR_TRIGGERED, - }), - ); } } } diff --git a/superset/assets/src/dashboard/components/Dashboard.jsx b/superset/assets/src/dashboard/components/Dashboard.jsx index d884e9a..dc1f054 100644 --- a/superset/assets/src/dashboard/components/Dashboard.jsx +++ b/superset/assets/src/dashboard/components/Dashboard.jsx @@ -167,14 +167,9 @@ class Dashboard extends React.PureComponent { } render() { - const { - impressionId, - dashboardInfo: { id }, - } = this.props; - return ( - + ); diff --git a/superset/assets/src/dashboard/components/Header.jsx b/superset/assets/src/dashboard/components/Header.jsx index bba1a72..b2238d0 100644 --- a/superset/assets/src/dashboard/components/Header.jsx +++ b/superset/assets/src/dashboard/components/Header.jsx @@ -171,10 +171,10 @@ class Header extends React.PureComponent { } toggleEditMode() { - this.props.setEditMode(!this.props.editMode); this.props.logEvent(LOG_ACTIONS_TOGGLE_EDIT_DASHBOARD, { - editMode: !this.props.editMode, + edit_mode: !this.props.editMode, }); + this.props.setEditMode(!this.props.editMode); } overwriteDashboard() { diff --git a/superset/assets/src/dashboard/components/gridComponents/Tabs.jsx b/superset/assets/src/dashboard/components/gridComponents/Tabs.jsx index e899a4a..dc9d599 100644 --- a/superset/assets/src/dashboard/components/gridComponents/Tabs.jsx +++ b/superset/assets/src/dashboard/components/gridComponents/Tabs.jsx @@ -109,7 +109,7 @@ class Tabs extends React.PureComponent { }); } else if (tabIndex !== this.state.tabIndex) { this.props.logEvent(LOG_ACTIONS_SELECT_DASHBOARD_TAB, { - id: component.id, + tab_id: component.id, index: tabIndex, });