diff --git a/client/app/scripts/components/node-details.js b/client/app/scripts/components/node-details.js
index 421155396..937f8be32 100644
--- a/client/app/scripts/components/node-details.js
+++ b/client/app/scripts/components/node-details.js
@@ -151,7 +151,7 @@ class NodeDetails extends React.Component {
}
renderDetails() {
- const { details, nodeControlStatus, nodeMatches = makeMap() } = this.props;
+ const { details, nodeControlStatus, nodeMatches = makeMap(), topologyId } = this.props;
const showControls = details.controls && details.controls.length > 0;
const nodeColor = getNodeColorDark(details.rank, details.label, details.pseudo);
const {error, pending} = nodeControlStatus ? nodeControlStatus.toJS() : {};
@@ -204,6 +204,7 @@ class NodeDetails extends React.Component {
metrics={details.metrics}
metricLinks={metricLinks}
unattachedLinks={unattachedLinks}
+ topologyId={topologyId}
/>
}
{details.metadata &&
diff --git a/client/app/scripts/components/node-details/node-details-health-link-item.js b/client/app/scripts/components/node-details/node-details-health-link-item.js
index a536b51d8..be020e393 100644
--- a/client/app/scripts/components/node-details/node-details-health-link-item.js
+++ b/client/app/scripts/components/node-details/node-details-health-link-item.js
@@ -1,5 +1,6 @@
import React from 'react';
+import { trackMixpanelEvent } from '../../utils/tracking-utils';
import NodeDetailsHealthItem from './node-details-health-item';
export default class NodeDetailsHealthLinkItem extends React.Component {
@@ -15,7 +16,9 @@ export default class NodeDetailsHealthLinkItem extends React.Component {
ev.preventDefault();
if (!href) return;
- const {router} = this.props;
+ const { router, topologyId } = this.props;
+ trackMixpanelEvent('scope.node.health.click', { topologyId });
+
if (router && href[0] === '/') {
router.push(href);
} else {
@@ -29,7 +32,7 @@ export default class NodeDetailsHealthLinkItem extends React.Component {
}
render() {
- const {links, withoutGraph, id, ...props} = this.props;
+ const { links, withoutGraph, id, ...props } = this.props;
const href = this.buildHref(links[id] && links[id].url);
if (!href) return ;
diff --git a/client/app/scripts/components/node-details/node-details-health.js b/client/app/scripts/components/node-details/node-details-health.js
index 193e1dc6d..8ec61817b 100644
--- a/client/app/scripts/components/node-details/node-details-health.js
+++ b/client/app/scripts/components/node-details/node-details-health.js
@@ -21,8 +21,7 @@ export default class NodeDetailsHealth extends React.Component {
}
render() {
- const metrics = this.props.metrics || [];
- const metricLinks = this.props.metricLinks || {};
+ const { metrics = [], metricLinks = {}, topologyId } = this.props;
const unattachedLinks = this.props.unattachedLinks || {};
const hasUnattached = Object.keys(unattachedLinks).length > 0;
const primeCutoff = metrics.length > 3 && !this.state.expanded ? 2 : metrics.length;
@@ -40,6 +39,7 @@ export default class NodeDetailsHealth extends React.Component {
)}
{showOverflow &&
)}
}