PLT-5071: Client side component of Telemetry. (#5516)

Этот коммит содержится в:
George Goldberg
2017-02-24 17:34:21 +00:00
коммит произвёл GitHub
родитель f182d196ff
Коммит 97cc0a0d73
23 изменённых файлов: 280 добавлений и 129 удалений

Просмотреть файл

@@ -21,6 +21,7 @@ import * as Utils from 'utils/utils.jsx';
import * as ChannelUtils from 'utils/channel_utils.jsx';
import * as ChannelActions from 'actions/channel_actions.jsx';
import {trackEvent} from 'actions/diagnostics_actions.jsx';
import Constants from 'utils/constants.jsx';
import {FormattedMessage, FormattedHTMLMessage} from 'react-intl';
@@ -363,6 +364,7 @@ export default class Sidebar extends React.Component {
showMoreChannelsModal() {
this.setState({showMoreChannelsModal: true});
trackEvent('ui', 'ui_channels_more_public');
}
hideMoreChannelsModal() {
@@ -378,6 +380,7 @@ export default class Sidebar extends React.Component {
}
showMoreDirectChannelsModal() {
trackEvent('ui', 'ui_channels_more_direct');
this.setState({showDirectChannelsModal: true});
}
@@ -448,6 +451,7 @@ export default class Sidebar extends React.Component {
placement='right'
screens={screens}
overlayClass='tip-overlay--sidebar'
diagnosticsTag='tutorial_tip_2_channels'
/>
);
}
@@ -566,6 +570,7 @@ export default class Sidebar extends React.Component {
<Link
to={link}
className={rowClass}
onClick={this.trackChannelSelectedEvent}
>
{icon}
{channel.display_name}
@@ -577,6 +582,10 @@ export default class Sidebar extends React.Component {
);
}
trackChannelSelectedEvent() {
trackEvent('ui', 'ui_channel_selected');
}
render() {
// Check if we have all info needed to render
if (this.state.currentTeam == null || this.state.currentUser == null) {