Browse Source
Merge pull request #762 from NastiaS/manager-analytics-integration
Manager analytics integration
master
Gaëtan Renaudeau
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with
38 additions and
4 deletions
-
src/components/ManagerPage/AppsList.js
-
src/components/ManagerPage/Dashboard.js
-
src/components/ManagerPage/FirmwareUpdate.js
-
src/components/ManagerPage/ManagerApp.js
-
src/components/ManagerPage/ManagerGenuineCheck.js
-
src/components/ManagerPage/UpdateFirmwareButton.js
|
@ -26,6 +26,7 @@ import Progress from 'components/base/Progress' |
|
|
import Spinner from 'components/base/Spinner' |
|
|
import Spinner from 'components/base/Spinner' |
|
|
import Button from 'components/base/Button' |
|
|
import Button from 'components/base/Button' |
|
|
import TranslatedError from 'components/TranslatedError' |
|
|
import TranslatedError from 'components/TranslatedError' |
|
|
|
|
|
import TrackPage from 'analytics/TrackPage' |
|
|
|
|
|
|
|
|
import IconInfoCircle from 'icons/InfoCircle' |
|
|
import IconInfoCircle from 'icons/InfoCircle' |
|
|
import ExclamationCircleThin from 'icons/ExclamationCircleThin' |
|
|
import ExclamationCircleThin from 'icons/ExclamationCircleThin' |
|
@ -193,6 +194,12 @@ class AppsList extends PureComponent<Props, State> { |
|
|
</Fragment> |
|
|
</Fragment> |
|
|
) : status === 'error' ? ( |
|
|
) : status === 'error' ? ( |
|
|
<Fragment> |
|
|
<Fragment> |
|
|
|
|
|
<TrackPage |
|
|
|
|
|
category="Manager" |
|
|
|
|
|
name="Error Modal" |
|
|
|
|
|
error={error && error.name} |
|
|
|
|
|
app={app} |
|
|
|
|
|
/> |
|
|
<ModalContent grow align="center" justify="center" mt={3}> |
|
|
<ModalContent grow align="center" justify="center" mt={3}> |
|
|
<Box color="alertRed"> |
|
|
<Box color="alertRed"> |
|
|
<ExclamationCircleThin size={44} /> |
|
|
<ExclamationCircleThin size={44} /> |
|
|
|
@ -7,6 +7,7 @@ import type { DeviceInfo } from 'helpers/devices/getDeviceInfo' |
|
|
|
|
|
|
|
|
import Box from 'components/base/Box' |
|
|
import Box from 'components/base/Box' |
|
|
import Text from 'components/base/Text' |
|
|
import Text from 'components/base/Text' |
|
|
|
|
|
import TrackPage from 'analytics/TrackPage' |
|
|
|
|
|
|
|
|
import AppsList from './AppsList' |
|
|
import AppsList from './AppsList' |
|
|
import FirmwareUpdate from './FirmwareUpdate' |
|
|
import FirmwareUpdate from './FirmwareUpdate' |
|
@ -19,6 +20,7 @@ type Props = { |
|
|
|
|
|
|
|
|
const Dashboard = ({ device, deviceInfo, t }: Props) => ( |
|
|
const Dashboard = ({ device, deviceInfo, t }: Props) => ( |
|
|
<Box flow={4} pb={8}> |
|
|
<Box flow={4} pb={8}> |
|
|
|
|
|
<TrackPage category="Manager" name="Dashboard" /> |
|
|
<Box> |
|
|
<Box> |
|
|
<Text ff="Museo Sans|Regular" fontSize={7} color="black"> |
|
|
<Text ff="Museo Sans|Regular" fontSize={7} color="black"> |
|
|
{t('app:manager.title')} |
|
|
{t('app:manager.title')} |
|
|
|
@ -124,7 +124,6 @@ class FirmwareUpdate extends PureComponent<Props, State> { |
|
|
render() { |
|
|
render() { |
|
|
const { deviceInfo, t } = this.props |
|
|
const { deviceInfo, t } = this.props |
|
|
const { latestFirmware, modal } = this.state |
|
|
const { latestFirmware, modal } = this.state |
|
|
|
|
|
|
|
|
return ( |
|
|
return ( |
|
|
<Card p={4}> |
|
|
<Card p={4}> |
|
|
<Box horizontal align="center" flow={2}> |
|
|
<Box horizontal align="center" flow={2}> |
|
|
|
@ -63,10 +63,27 @@ function ManagerApp({ name, version, icon, onInstall, onUninstall, t }: Props) { |
|
|
{version} |
|
|
{version} |
|
|
</Text> |
|
|
</Text> |
|
|
</Box> |
|
|
</Box> |
|
|
<Button outline onClick={onInstall}> |
|
|
<Button |
|
|
|
|
|
outline |
|
|
|
|
|
onClick={onInstall} |
|
|
|
|
|
event={'Manager Install Click'} |
|
|
|
|
|
eventProperties={{ |
|
|
|
|
|
appName: name, |
|
|
|
|
|
appVersion: version, |
|
|
|
|
|
}} |
|
|
|
|
|
> |
|
|
{t('app:manager.apps.install')} |
|
|
{t('app:manager.apps.install')} |
|
|
</Button> |
|
|
</Button> |
|
|
<Button outline onClick={onUninstall} outlineColor="grey"> |
|
|
<Button |
|
|
|
|
|
outline |
|
|
|
|
|
onClick={onUninstall} |
|
|
|
|
|
event={'Manager Uninstall Click'} |
|
|
|
|
|
eventProperties={{ |
|
|
|
|
|
appName: name, |
|
|
|
|
|
appVersion: version, |
|
|
|
|
|
}} |
|
|
|
|
|
outlineColor="grey" |
|
|
|
|
|
> |
|
|
<Trash size={16} fill="grey" /> |
|
|
<Trash size={16} fill="grey" /> |
|
|
</Button> |
|
|
</Button> |
|
|
</Container> |
|
|
</Container> |
|
|
|
@ -11,6 +11,7 @@ import GenuineCheck from 'components/GenuineCheck' |
|
|
import Box from 'components/base/Box' |
|
|
import Box from 'components/base/Box' |
|
|
import Space from 'components/base/Space' |
|
|
import Space from 'components/base/Space' |
|
|
import Text from 'components/base/Text' |
|
|
import Text from 'components/base/Text' |
|
|
|
|
|
import TrackPage from 'analytics/TrackPage' |
|
|
|
|
|
|
|
|
type Props = { |
|
|
type Props = { |
|
|
t: T, |
|
|
t: T, |
|
@ -22,6 +23,7 @@ class ManagerGenuineCheck extends PureComponent<Props> { |
|
|
const { t, onSuccess } = this.props |
|
|
const { t, onSuccess } = this.props |
|
|
return ( |
|
|
return ( |
|
|
<Box align="center"> |
|
|
<Box align="center"> |
|
|
|
|
|
<TrackPage category="Manager" name="Genuine Check" /> |
|
|
<Space of={60} /> |
|
|
<Space of={60} /> |
|
|
<Box align="center" style={{ maxWidth: 460 }}> |
|
|
<Box align="center" style={{ maxWidth: 460 }}> |
|
|
<img |
|
|
<img |
|
|
|
@ -27,7 +27,14 @@ const UpdateFirmwareButton = ({ t, firmware, onClick }: Props) => |
|
|
<Text ff="Open Sans|Regular" fontSize={4} style={{ marginLeft: 'auto', marginRight: 15 }}> |
|
|
<Text ff="Open Sans|Regular" fontSize={4} style={{ marginLeft: 'auto', marginRight: 15 }}> |
|
|
{t('app:manager.firmware.latest', { version: getCleanVersion(firmware.name) })} |
|
|
{t('app:manager.firmware.latest', { version: getCleanVersion(firmware.name) })} |
|
|
</Text> |
|
|
</Text> |
|
|
<Button primary onClick={onClick}> |
|
|
<Button |
|
|
|
|
|
primary |
|
|
|
|
|
onClick={onClick} |
|
|
|
|
|
event={'Manager Firmware Update Click'} |
|
|
|
|
|
eventProperties={{ |
|
|
|
|
|
firmwareName: firmware.name, |
|
|
|
|
|
}} |
|
|
|
|
|
> |
|
|
{t('app:manager.firmware.update')} |
|
|
{t('app:manager.firmware.update')} |
|
|
</Button> |
|
|
</Button> |
|
|
</Fragment> |
|
|
</Fragment> |
|
|