superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h...@apache.org
Subject [incubator-superset] branch omnibar updated: add logger
Date Fri, 25 Jan 2019 08:16:11 GMT
This is an automated email from the ASF dual-hosted git repository.

hugh pushed a commit to branch omnibar
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/omnibar by this push:
     new c23f8ae  add logger
c23f8ae is described below

commit c23f8ae68c8b9cddf99955e4c124c855d2e77a2c
Author: hughhhh <hmiles@lyft.com>
AuthorDate: Fri Jan 25 00:15:47 2019 -0800

    add logger
---
 superset/assets/src/dashboard/components/Dashboard.jsx | 9 +++++++++
 superset/assets/src/logger.js                          | 2 ++
 2 files changed, 11 insertions(+)

diff --git a/superset/assets/src/dashboard/components/Dashboard.jsx b/superset/assets/src/dashboard/components/Dashboard.jsx
index 18bd5b1..a1a8c8d 100644
--- a/superset/assets/src/dashboard/components/Dashboard.jsx
+++ b/superset/assets/src/dashboard/components/Dashboard.jsx
@@ -40,6 +40,7 @@ import {
   LOG_ACTIONS_MOUNT_DASHBOARD,
   LOG_ACTIONS_LOAD_DASHBOARD_PANE,
   LOG_ACTIONS_FIRST_DASHBOARD_LOAD,
+  LOG_ACTIONS_OMNIBAR_TRIGGERED,
 } from '../../logger';
 import OmniContianer from '../../components/OmniContainer';
 
@@ -229,6 +230,14 @@ class Dashboard extends React.PureComponent {
       if (isK) {
         this.setState({ showOmni: !this.state.showOmni });
         $('.modal-dialog:first input').focus();
+        Logger.send(
+          new ActionLog({
+            impressionId: this.props.impressionId,
+            source: 'dashboard',
+            sourceId: this.props.dashboardInfo.id,
+            eventNames: LOG_ACTIONS_OMNIBAR_TRIGGERED,
+          }),
+        );
       }
     }
   }
diff --git a/superset/assets/src/logger.js b/superset/assets/src/logger.js
index 54e9a54..5bea387 100644
--- a/superset/assets/src/logger.js
+++ b/superset/assets/src/logger.js
@@ -158,6 +158,7 @@ export const LOG_ACTIONS_REFRESH_DASHBOARD = 'force_refresh_dashboard';
 export const LOG_ACTIONS_EXPLORE_DASHBOARD_CHART = 'explore_dashboard_chart';
 export const LOG_ACTIONS_EXPORT_CSV_DASHBOARD_CHART = 'export_csv_dashboard_chart';
 export const LOG_ACTIONS_CHANGE_DASHBOARD_FILTER = 'change_dashboard_filter';
+export const LOG_ACTIONS_OMNIBAR_TRIGGERED = 'omnibar_dashboard_triggered';
 
 export const DASHBOARD_EVENT_NAMES = [
   LOG_ACTIONS_MOUNT_DASHBOARD,
@@ -170,6 +171,7 @@ export const DASHBOARD_EVENT_NAMES = [
   LOG_ACTIONS_EXPORT_CSV_DASHBOARD_CHART,
   LOG_ACTIONS_CHANGE_DASHBOARD_FILTER,
   LOG_ACTIONS_REFRESH_DASHBOARD,
+  LOG_ACTIONS_OMNIBAR_TRIGGERED,
 ];
 
 export const EXPLORE_EVENT_NAMES = [


Mime
View raw message