diff --git a/Plan/react/dashboard/src/components/cards/server/graphs/JoinAddressGroupCard.jsx b/Plan/react/dashboard/src/components/cards/server/graphs/JoinAddressGroupCard.jsx deleted file mode 100644 index 4bb282f8f..000000000 --- a/Plan/react/dashboard/src/components/cards/server/graphs/JoinAddressGroupCard.jsx +++ /dev/null @@ -1,32 +0,0 @@ -import React from 'react'; -import {useTranslation} from "react-i18next"; -import {useDataRequest} from "../../../../hooks/dataFetchHook"; -import {fetchJoinAddressPie} from "../../../../service/serverService"; -import {ErrorViewCard} from "../../../../views/ErrorView"; -import {CardLoader} from "../../../navigation/Loader"; -import {Card} from "react-bootstrap"; -import {FontAwesomeIcon as Fa} from "@fortawesome/react-fontawesome"; -import {faLocationArrow} from "@fortawesome/free-solid-svg-icons"; -import GroupVisualizer from "../../../graphs/GroupVisualizer"; - -const JoinAddressGroupCard = ({identifier}) => { - const {t} = useTranslation(); - - const {data, loadingError} = useDataRequest(fetchJoinAddressPie, [identifier]); - - if (loadingError) return - if (!data) return ; - - return ( - - -
- {t('html.label.latestJoinAddresses')} -
-
- -
- ) -}; - -export default JoinAddressGroupCard \ No newline at end of file diff --git a/Plan/react/dashboard/src/service/serverService.js b/Plan/react/dashboard/src/service/serverService.js index 51229f82b..1097fdb60 100644 --- a/Plan/react/dashboard/src/service/serverService.js +++ b/Plan/react/dashboard/src/service/serverService.js @@ -261,26 +261,6 @@ export const fetchPingGraph = async (timestamp, identifier) => { return doGetRequest(url, timestamp); } -export const fetchJoinAddressPie = async (timestamp, identifier) => { - if (identifier) { - return await fetchJoinAddressPieServer(timestamp, identifier); - } else { - return await fetchJoinAddressPieNetwork(timestamp); - } -} - -const fetchJoinAddressPieServer = async (timestamp, identifier) => { - let url = `/v1/graph?type=joinAddressPie&server=${identifier}`; - if (staticSite) url = `/data/graph-joinAddressPie_${identifier}.json`; - return doGetRequest(url, timestamp); -} - -const fetchJoinAddressPieNetwork = async (timestamp) => { - let url = `/v1/graph?type=joinAddressPie`; - if (staticSite) url = `/data/graph-joinAddressPie.json`; - return doGetRequest(url, timestamp); -} - export const fetchJoinAddressByDay = async (timestamp, addresses, identifier) => { if (identifier) { return await fetchJoinAddressByDayServer(timestamp, addresses, identifier);