Add fix of keys.

pull/529/head
Andrey Dolgolev 2022-01-19 13:25:32 +02:00
rodzic b258afcdf8
commit 4206012192
2 zmienionych plików z 9 dodań i 9 usunięć

Wyświetl plik

@ -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(

Wyświetl plik

@ -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 = ({
})}
</Flex>
)}
{data?.functions && functionKeys && (
{data?.methods && methodKeys && (
<Flex
w="100%"
h="auto"
@ -199,9 +199,9 @@ const SubscriptionReport = ({
direction="column"
>
<Heading size="md" pt={4}>
Functions
Methods
</Heading>
{functionKeys.map((key) => {
{methodKeys.map((key) => {
return (
<Flex
key={`methods-list-${key}`}
@ -225,7 +225,7 @@ const SubscriptionReport = ({
{isFetching && <Spinner size="sm" m={2} />}
</Flex>
<Report
data={data.functions[key]}
data={data.methods[key]}
metric={key}
timeRange={timeRange}
/>