From b258afcdf884a90ca400f75d47cd58dd71e1788c Mon Sep 17 00:00:00 2001 From: Andrey Dolgolev Date: Wed, 19 Jan 2022 12:33:59 +0200 Subject: [PATCH 1/2] Add keys fixes. --- frontend/src/components/SubscriptionReport.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/frontend/src/components/SubscriptionReport.js b/frontend/src/components/SubscriptionReport.js index 05006882..f33b50e3 100644 --- a/frontend/src/components/SubscriptionReport.js +++ b/frontend/src/components/SubscriptionReport.js @@ -45,10 +45,10 @@ const SubscriptionReport = ({ : undefined, [data] ); - const methodKeys = useMemo( + const functionKeys = useMemo( () => - Object.keys(data?.methods ?? {}).length > 0 - ? Object.keys(data?.methods) + Object.keys(data?.functions ?? {}).length > 0 + ? Object.keys(data?.functions) : undefined, [data] ); @@ -190,7 +190,7 @@ const SubscriptionReport = ({ })} )} - {data?.functions && methodKeys && ( + {data?.functions && functionKeys && ( - functions + Functions - {methodKeys.map((key) => { + {functionKeys.map((key) => { return ( Date: Wed, 19 Jan 2022 13:25:32 +0200 Subject: [PATCH 2/2] Add fix of keys. --- .../mooncrawl/mooncrawl/stats_worker/dashboard.py | 4 ++-- frontend/src/components/SubscriptionReport.js | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/crawlers/mooncrawl/mooncrawl/stats_worker/dashboard.py b/crawlers/mooncrawl/mooncrawl/stats_worker/dashboard.py index 3b3cb6ea..6f57dd3d 100644 --- a/crawlers/mooncrawl/mooncrawl/stats_worker/dashboard.py +++ b/crawlers/mooncrawl/mooncrawl/stats_worker/dashboard.py @@ -645,7 +645,7 @@ def stats_generate_handler(args: argparse.Namespace): metric_type="tx_call", crawler_label=crawler_label, ) - s3_data_object["functions"] = functions_calls_data + s3_data_object["methods"] = functions_calls_data # Generte events timeseries events_data = generate_data( @@ -804,7 +804,7 @@ def stats_generate_api_task( metric_type="tx_call", crawler_label=crawler_label, ) - s3_data_object["functions"] = functions_calls_data + s3_data_object["methods"] = functions_calls_data # Generate events timeseries events_data = generate_data( diff --git a/frontend/src/components/SubscriptionReport.js b/frontend/src/components/SubscriptionReport.js index f33b50e3..fa6b17ca 100644 --- a/frontend/src/components/SubscriptionReport.js +++ b/frontend/src/components/SubscriptionReport.js @@ -45,10 +45,10 @@ const SubscriptionReport = ({ : undefined, [data] ); - const functionKeys = useMemo( + const methodKeys = useMemo( () => - Object.keys(data?.functions ?? {}).length > 0 - ? Object.keys(data?.functions) + Object.keys(data?.methods ?? {}).length > 0 + ? Object.keys(data?.methods) : undefined, [data] ); @@ -190,7 +190,7 @@ const SubscriptionReport = ({ })} )} - {data?.functions && functionKeys && ( + {data?.methods && methodKeys && ( - Functions + Methods - {functionKeys.map((key) => { + {methodKeys.map((key) => { return ( }