From b4c735f0deb3f98e7fc5211e5392b50396e72d96 Mon Sep 17 00:00:00 2001 From: Bec Scott Date: Fri, 5 Jun 2020 09:14:55 +1000 Subject: [PATCH] Jetpack stats on home page (https://github.com/woocommerce/woocommerce-admin/pull/4481) * Get Jetpack stats appearing on the home page * Update hidden stats in stats overview test * Make jetpack stats appear by default * Add reportUrlType to dashboard store performance area Co-authored-by: Rebecca Scott --- .../dashboard/store-performance/index.js | 6 +++-- .../dashboard/store-performance/utils.js | 26 ++++++++++++++----- .../homepage/stats-overview/defaults.js | 2 ++ .../homepage/stats-overview/stats-list.js | 6 +++-- .../packages/components/src/summary/number.js | 8 ++++++ .../PerformanceIndicators/Controller.php | 2 ++ 6 files changed, 39 insertions(+), 11 deletions(-) diff --git a/plugins/woocommerce-admin/client/dashboard/store-performance/index.js b/plugins/woocommerce-admin/client/dashboard/store-performance/index.js index 4d8a53d395e..ba1b56c319d 100644 --- a/plugins/woocommerce-admin/client/dashboard/store-performance/index.js +++ b/plugins/woocommerce-admin/client/dashboard/store-performance/index.js @@ -30,7 +30,7 @@ import withSelect from 'wc-api/with-select'; import './style.scss'; import { recordEvent } from 'lib/tracks'; import { CurrencyContext } from 'lib/currency-context'; -import { getIndicatorData, getIndictorValues } from './utils'; +import { getIndicatorData, getIndicatorValues } from './utils'; const { performanceIndicators: indicators } = getSetting( 'dataEndpoints', { performanceIndicators: [], @@ -146,7 +146,8 @@ class StorePerformance extends Component { secondaryValue, delta, reportUrl, - } = getIndictorValues( { + reportUrlType, + } = getIndicatorValues( { indicator, primaryData, secondaryData, @@ -159,6 +160,7 @@ class StorePerformance extends Component { endpoints[ $endpoint ] = '/jetpack/v4/module/' . $item['module'] . '/data'; $this->formats[ $stat ] = $item['format']; } + + $this->urls['jetpack/stats'] = '/jetpack'; } /**