diff --git a/assets/pages/StatisticsPage.tsx b/assets/pages/StatisticsPage.tsx index 8b135ba..2ad38ab 100644 --- a/assets/pages/StatisticsPage.tsx +++ b/assets/pages/StatisticsPage.tsx @@ -18,8 +18,10 @@ export default function StatisticsPage() { getStatistics().then(setStats) }, []) + const totalDomainPurchase = (stats?.domainPurchased ?? 0) + (stats?.domainPurchaseFailed ?? 0) + const successRate = stats !== undefined ? - (stats.domainPurchaseFailed === 0 ? undefined : stats.domainPurchased / stats.domainPurchaseFailed) + (totalDomainPurchase === 0 ? undefined : stats.domainPurchased / totalDomainPurchase) : undefined return <> diff --git a/src/Controller/DomainRefreshController.php b/src/Controller/DomainRefreshController.php index e45bc36..3fab035 100644 --- a/src/Controller/DomainRefreshController.php +++ b/src/Controller/DomainRefreshController.php @@ -35,6 +35,7 @@ class DomainRefreshController extends AbstractController * @throws ExceptionInterface * @throws \Exception * @throws HttpExceptionInterface + * @throws \Throwable */ public function __invoke(string $ldhName, KernelInterface $kernel): ?Domain { diff --git a/translations/translations.pot b/translations/translations.pot index a7c27e9..7241fb7 100644 --- a/translations/translations.pot +++ b/translations/translations.pot @@ -486,33 +486,33 @@ msgstr "" msgid "Sorry, the page you visited does not exist." msgstr "" -#: assets/pages/StatisticsPage.tsx:32 +#: assets/pages/StatisticsPage.tsx:34 msgid "RDAP queries" msgstr "" -#: assets/pages/StatisticsPage.tsx:41 +#: assets/pages/StatisticsPage.tsx:43 msgid "Alerts sent" msgstr "" -#: assets/pages/StatisticsPage.tsx:55 +#: assets/pages/StatisticsPage.tsx:57 msgid "Domain names in database" msgstr "" -#: assets/pages/StatisticsPage.tsx:66 +#: assets/pages/StatisticsPage.tsx:68 msgid "Tracked domain names" msgstr "" -#: assets/pages/StatisticsPage.tsx:80 +#: assets/pages/StatisticsPage.tsx:82 msgid "Purchased domain names" msgstr "" -#: assets/pages/StatisticsPage.tsx:90 +#: assets/pages/StatisticsPage.tsx:92 msgid "" "This value is based on the status code of the HTTP response from the " "providers following the domain order." msgstr "" -#: assets/pages/StatisticsPage.tsx:93 +#: assets/pages/StatisticsPage.tsx:95 msgid "Success rate" msgstr ""