mirror of
https://github.com/weaveworks/scope.git
synced 2026-05-06 09:18:27 +00:00
Pass layout when tracking mixpanel event
This commit is contained in:
@@ -4,6 +4,7 @@ import NodeDetailsHealthItem from './node-details-health-item';
|
||||
import CloudLink from '../cloud-link';
|
||||
import { getMetricColor } from '../../utils/metric-utils';
|
||||
import { trackMixpanelEvent } from '../../utils/tracking-utils';
|
||||
import { GRAPH_VIEW_MODE } from '../../constants/naming';
|
||||
|
||||
export default class NodeDetailsHealthLinkItem extends React.Component {
|
||||
|
||||
@@ -27,7 +28,10 @@ export default class NodeDetailsHealthLinkItem extends React.Component {
|
||||
}
|
||||
|
||||
onClick() {
|
||||
trackMixpanelEvent('scope.node.metric.click', { topologyId: this.props.topologyId });
|
||||
trackMixpanelEvent('scope.node.metric.click', {
|
||||
layout: GRAPH_VIEW_MODE,
|
||||
topologyId: this.props.topologyId,
|
||||
});
|
||||
}
|
||||
|
||||
render() {
|
||||
|
||||
@@ -3,6 +3,7 @@ import React from 'react';
|
||||
import CloudLink from '../cloud-link';
|
||||
import { formatMetric } from '../../utils/string-utils';
|
||||
import { trackMixpanelEvent } from '../../utils/tracking-utils';
|
||||
import { TABLE_VIEW_MODE } from '../../constants/naming';
|
||||
|
||||
class NodeDetailsTableNodeMetricLink extends React.Component {
|
||||
constructor(props) {
|
||||
@@ -12,7 +13,10 @@ class NodeDetailsTableNodeMetricLink extends React.Component {
|
||||
}
|
||||
|
||||
onClick() {
|
||||
trackMixpanelEvent('scope.node.metric.click', { topologyId: this.props.topologyId });
|
||||
trackMixpanelEvent('scope.node.metric.click', {
|
||||
layout: TABLE_VIEW_MODE,
|
||||
topologyId: this.props.topologyId,
|
||||
});
|
||||
}
|
||||
|
||||
static dismissEvent(ev) {
|
||||
|
||||
Reference in New Issue
Block a user