diff --git a/package-lock.json b/package-lock.json index 8f330be5df..8818a287f2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,6 @@ "@mui/x-date-pickers": "^7.23.1", "@reduxjs/toolkit": "^2.5.0", "@types/dompurify": "^3.2.0", - "@types/react-router-dom": "^5.3.3", "array-move": "^4.0.0", "axios": "^1.7.9", "bourbon": "^7.3.0", @@ -37,7 +36,7 @@ "react-i18next": "^15.4.0", "react-icons": "^5.3.0", "react-redux": "^9.2.0", - "react-router-dom": "^6.27.0", + "react-router": "^7.1.1", "react-select": "^5.8.0", "redux": "^5.0.1", "redux-persist": "^6.0.0", @@ -3389,14 +3388,6 @@ } } }, - "node_modules/@remix-run/router": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.20.0.tgz", - "integrity": "sha512-mUnk8rPJBI9loFDZ+YzPGdeniYK+FTmRD1TMCz7ev2SNIozyKKpnGgsxO34u6Z4z/t0ITuu7voi/AshfsGsgFg==", - "engines": { - "node": ">=14.0.0" - } - }, "node_modules/@rollup/pluginutils": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.0.tgz", @@ -4092,6 +4083,12 @@ "@swc/counter": "^0.1.3" } }, + "node_modules/@types/cookie": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==", + "license": "MIT" + }, "node_modules/@types/dompurify": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/@types/dompurify/-/dompurify-3.2.0.tgz", @@ -4107,11 +4104,6 @@ "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", "dev": true }, - "node_modules/@types/history": { - "version": "4.7.11", - "resolved": "https://registry.npmjs.org/@types/history/-/history-4.7.11.tgz", - "integrity": "sha512-qjDJRrmvBMiTx+jyLxvLfJU7UznFuokDv4f3WRuriHKERccVpFU+8XMQUAbDzoiJCsmexxRExQeMwwCdamSKDA==" - }, "node_modules/@types/hoist-non-react-statics": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz", @@ -4185,25 +4177,6 @@ "@types/react": "*" } }, - "node_modules/@types/react-router": { - "version": "5.1.20", - "resolved": "https://registry.npmjs.org/@types/react-router/-/react-router-5.1.20.tgz", - "integrity": "sha512-jGjmu/ZqS7FjSH6owMcD5qpq19+1RS9DeVRqfl1FeBMxTDQAGwlMWOcs52NDoXaNKyG3d1cYQFMs9rCrb88o9Q==", - "dependencies": { - "@types/history": "^4.7.11", - "@types/react": "*" - } - }, - "node_modules/@types/react-router-dom": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/@types/react-router-dom/-/react-router-dom-5.3.3.tgz", - "integrity": "sha512-kpqnYK4wcdm5UaWI3fLcELopqLrHgLqNsdpHauzlQktfkHL3npOSwtj1Uz9oKBAzs7lFtVkV8j83voAz2D8fhw==", - "dependencies": { - "@types/history": "^4.7.11", - "@types/react": "*", - "@types/react-router": "*" - } - }, "node_modules/@types/react-transition-group": { "version": "4.4.12", "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.12.tgz", @@ -5640,9 +5613,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001636", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001636.tgz", - "integrity": "sha512-bMg2vmr8XBsbL6Lr0UHXy/21m84FTxDLWn2FSqMd5PrlbMxwJlQnC2YWYxVgp66PZE+BBNF2jYQUBKCo1FDeZg==", + "version": "1.0.30001692", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001692.tgz", + "integrity": "sha512-A95VKan0kdtrsnMubMKxEKUKImOPSuCpYgxSQBo036P5YYgVIcOYJEgt/txJWqObiRQeISNCfef9nvlQ0vbV7A==", "dev": true, "funding": [ { @@ -5784,6 +5757,15 @@ "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==" }, + "node_modules/cookie": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-1.0.2.tgz", + "integrity": "sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA==", + "license": "MIT", + "engines": { + "node": ">=18" + } + }, "node_modules/core-js-compat": { "version": "3.37.1", "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.37.1.tgz", @@ -7976,6 +7958,7 @@ "url": "https://www.i18next.com/how-to/faq#i18next-is-awesome.-how-can-i-support-the-project" } ], + "license": "MIT", "dependencies": { "@babel/runtime": "^7.23.2" }, @@ -9407,33 +9390,27 @@ } }, "node_modules/react-router": { - "version": "6.27.0", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.27.0.tgz", - "integrity": "sha512-YA+HGZXz4jaAkVoYBE98VQl+nVzI+cVI2Oj/06F5ZM+0u3TgedN9Y9kmMRo2mnkSK2nCpNQn0DVob4HCsY/WLw==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-7.1.1.tgz", + "integrity": "sha512-39sXJkftkKWRZ2oJtHhCxmoCrBCULr/HAH4IT5DHlgu/Q0FCPV0S4Lx+abjDTx/74xoZzNYDYbOZWlJjruyuDQ==", + "license": "MIT", "dependencies": { - "@remix-run/router": "1.20.0" + "@types/cookie": "^0.6.0", + "cookie": "^1.0.1", + "set-cookie-parser": "^2.6.0", + "turbo-stream": "2.4.0" }, "engines": { - "node": ">=14.0.0" + "node": ">=20.0.0" }, "peerDependencies": { - "react": ">=16.8" - } - }, - "node_modules/react-router-dom": { - "version": "6.27.0", - "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.27.0.tgz", - "integrity": "sha512-+bvtFWMC0DgAFrfKXKG9Fc+BcXWRUO1aJIihbB79xaeq0v5UzfvnM5houGUm1Y461WVRcgAQ+Clh5rdb1eCx4g==", - "dependencies": { - "@remix-run/router": "1.20.0", - "react-router": "6.27.0" - }, - "engines": { - "node": ">=14.0.0" + "react": ">=18", + "react-dom": ">=18" }, - "peerDependencies": { - "react": ">=16.8", - "react-dom": ">=16.8" + "peerDependenciesMeta": { + "react-dom": { + "optional": true + } } }, "node_modules/react-select": { @@ -9822,6 +9799,12 @@ "semver": "bin/semver.js" } }, + "node_modules/set-cookie-parser": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.1.tgz", + "integrity": "sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ==", + "license": "MIT" + }, "node_modules/set-function-length": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", @@ -10350,6 +10333,12 @@ "dev": true, "license": "0BSD" }, + "node_modules/turbo-stream": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/turbo-stream/-/turbo-stream-2.4.0.tgz", + "integrity": "sha512-FHncC10WpBd2eOmGwpmQsWLDoK4cqsA/UT/GqNoaKOQnT8uzhtCbg3EoUDMvqpOSAI0S26mr0rkjzbOO6S3v1g==", + "license": "ISC" + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", diff --git a/package.json b/package.json index 3fd2476ab9..0564433fe7 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,6 @@ "@mui/x-date-pickers": "^7.23.1", "@reduxjs/toolkit": "^2.5.0", "@types/dompurify": "^3.2.0", - "@types/react-router-dom": "^5.3.3", "array-move": "^4.0.0", "axios": "^1.7.9", "bourbon": "^7.3.0", @@ -34,7 +33,7 @@ "react-i18next": "^15.4.0", "react-icons": "^5.3.0", "react-redux": "^9.2.0", - "react-router-dom": "^6.27.0", + "react-router": "^7.1.1", "react-select": "^5.8.0", "redux": "^5.0.1", "redux-persist": "^6.0.0", diff --git a/src/App.tsx b/src/App.tsx index 26742260bf..3acd3833e9 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,5 +1,5 @@ import React, { useEffect } from "react"; -import { HashRouter, Navigate, Route, Routes } from "react-router-dom"; +import { HashRouter, Navigate, Route, Routes } from "react-router"; import "./App.scss"; import Events from "./components/events/Events"; import Recordings from "./components/recordings/Recordings"; diff --git a/src/components/About.tsx b/src/components/About.tsx index 0fbe18e67e..6dc5c1f264 100644 --- a/src/components/About.tsx +++ b/src/components/About.tsx @@ -4,7 +4,7 @@ import NavBar from "./NavBar"; import Footer from "./Footer"; import MainNav from "./shared/MainNav"; import { useTranslation } from "react-i18next"; -import { Link, useLocation } from "react-router-dom"; +import { Link, useLocation } from "react-router"; import cn from "classnames"; import axios from 'axios'; import i18n from "../i18n/i18n"; diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx index 226d33f36e..40074a48f4 100644 --- a/src/components/Footer.tsx +++ b/src/components/Footer.tsx @@ -4,7 +4,7 @@ import { getUserInformation, } from "../selectors/userInfoSelectors"; import { useAppSelector } from "../store"; -import { Link } from "react-router-dom"; +import { Link } from "react-router"; import { useTranslation } from "react-i18next"; import { Tooltip } from "./shared/Tooltip"; diff --git a/src/components/Header.tsx b/src/components/Header.tsx index 6fc6a2a0e8..9ef6ec5ee3 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -1,6 +1,6 @@ import React, { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; -import { Link } from "react-router-dom"; +import { Link } from "react-router"; import i18n from "../i18n/i18n"; import languages from "../i18n/languages"; import opencastLogo from "../img/opencast-white.svg?url"; diff --git a/src/components/configuration/Themes.tsx b/src/components/configuration/Themes.tsx index fa4fab200c..28bb30321c 100644 --- a/src/components/configuration/Themes.tsx +++ b/src/components/configuration/Themes.tsx @@ -1,7 +1,7 @@ import React, { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; import MainNav from "../shared/MainNav"; -import { Link } from "react-router-dom"; +import { Link } from "react-router"; import cn from "classnames"; import TableFilters from "../shared/TableFilters"; import Table from "../shared/Table"; diff --git a/src/components/events/Events.tsx b/src/components/events/Events.tsx index fe797a1be5..460cd44712 100644 --- a/src/components/events/Events.tsx +++ b/src/components/events/Events.tsx @@ -1,7 +1,7 @@ import React, { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; import cn from "classnames"; -import { Link, useLocation } from "react-router-dom"; +import { Link, useLocation } from "react-router"; import TableFilters from "../shared/TableFilters"; import MainNav from "../shared/MainNav"; import Stats from "../shared/Stats"; diff --git a/src/components/events/Series.tsx b/src/components/events/Series.tsx index 64be53c147..7fd00e7f22 100644 --- a/src/components/events/Series.tsx +++ b/src/components/events/Series.tsx @@ -2,7 +2,7 @@ import React, { useEffect, useState } from "react"; import MainNav from "../shared/MainNav"; import { useTranslation } from "react-i18next"; import cn from "classnames"; -import { Link, useLocation } from "react-router-dom"; +import { Link, useLocation } from "react-router"; import TableFilters from "../shared/TableFilters"; import Table from "../shared/Table"; import Notifications from "../shared/Notifications"; diff --git a/src/components/events/partials/SeriesDetailsAction.tsx b/src/components/events/partials/SeriesDetailsAction.tsx index 147a5c90b2..2afd0bacb7 100644 --- a/src/components/events/partials/SeriesDetailsAction.tsx +++ b/src/components/events/partials/SeriesDetailsAction.tsx @@ -3,7 +3,7 @@ import { t } from "i18next"; import { getUserInformation } from "../../../selectors/userInfoSelectors"; import { useAppSelector } from "../../../store"; import { hasAccess } from "../../../utils/utils"; -import { useSearchParams } from "react-router-dom"; +import { useSearchParams } from "react-router"; export const SeriesDetailsAction = ({ id }: { id: string, diff --git a/src/components/events/partials/SeriesTitleCell.tsx b/src/components/events/partials/SeriesTitleCell.tsx index 27eeede05a..7b1b8fe3bc 100644 --- a/src/components/events/partials/SeriesTitleCell.tsx +++ b/src/components/events/partials/SeriesTitleCell.tsx @@ -2,7 +2,7 @@ import React from "react"; import { useTranslation } from "react-i18next"; import { loadEventsIntoTable } from "../../../thunks/tableThunks"; import { setSpecificEventFilter } from "../../../slices/tableFilterSlice"; -import { Link } from "react-router-dom"; +import { Link } from "react-router"; import { useAppDispatch } from "../../../store"; import { Tooltip } from "../../shared/Tooltip"; import { Series } from "../../../slices/seriesSlice"; diff --git a/src/components/events/partials/modals/EventDetails.tsx b/src/components/events/partials/modals/EventDetails.tsx index bb11401a7d..8ba662b2a8 100644 --- a/src/components/events/partials/modals/EventDetails.tsx +++ b/src/components/events/partials/modals/EventDetails.tsx @@ -26,6 +26,7 @@ import { getModalWorkflowTabHierarchy, getModalPage, getEventDetailsTobiraDataError, + getEventDetailsTobiraStatus, } from "../../../../selectors/eventDetailsSelectors"; import { getUserInformation } from "../../../../selectors/userInfoSelectors"; import EventDetailsStatisticsTab from "../ModalTabsAndPages/EventDetailsStatisticsTab"; @@ -84,6 +85,7 @@ const EventDetails = ({ dispatch(fetchSchedulingInfo(eventId)).then(); dispatch(fetchEventStatistics(eventId)).then(); dispatch(fetchAssetUploadOptions()).then(); + dispatch(fetchEventDetailsTobira(eventId)); // eslint-disable-next-line react-hooks/exhaustive-deps }, []); @@ -98,6 +100,7 @@ const EventDetails = ({ const hasStatistics = useAppSelector(state => getHasStatistics(state)); const isLoadingStatistics = useAppSelector(state => isFetchingStatistics(state)); const captureAgents = useAppSelector(state => getRecordings(state)); + const tobiraStatus = useAppSelector(state => getEventDetailsTobiraStatus(state)); const tobiraError = useAppSelector(state => getEventDetailsTobiraDataError(state)); const tabs = [ @@ -164,7 +167,7 @@ const EventDetails = ({ accessRole: "ROLE_UI_EVENTS_DETAILS_COMMENTS_VIEW", name: "tobira", page: EventDetailsPage.Tobira, - hidden: tobiraError?.message?.includes("503"), + hidden: tobiraStatus === "failed" && tobiraError?.message?.includes("503"), }, { tabNameTranslation: "EVENTS.EVENTS.DETAILS.TABS.STATISTICS", @@ -178,9 +181,6 @@ const EventDetails = ({ const openTab = (tabNr: EventDetailsPage) => { dispatch(removeNotificationWizardForm()); - if (tabNr === EventDetailsPage.Tobira) { - dispatch(fetchEventDetailsTobira(eventId)); - } dispatch(openModalTab(tabNr, "entry", "entry")) }; diff --git a/src/components/events/partials/modals/SeriesDetails.tsx b/src/components/events/partials/modals/SeriesDetails.tsx index 7f76be77ee..d26ce685b3 100644 --- a/src/components/events/partials/modals/SeriesDetails.tsx +++ b/src/components/events/partials/modals/SeriesDetails.tsx @@ -8,6 +8,7 @@ import { getSeriesDetailsTheme, getSeriesDetailsThemeNames, getSeriesDetailsTobiraDataError, + getSeriesDetailsTobiraStatus, hasStatistics as seriesHasStatistics, } from "../../../../selectors/seriesDetailsSelectors"; import { getOrgProperties, getUserInformation } from "../../../../selectors/userInfoSelectors"; @@ -20,6 +21,7 @@ import DetailsMetadataTab from "../ModalTabsAndPages/DetailsMetadataTab"; import DetailsExtendedMetadataTab from "../ModalTabsAndPages/DetailsExtendedMetadataTab"; import { useAppDispatch, useAppSelector } from "../../../../store"; import { + fetchSeriesDetailsTobira, fetchSeriesStatistics, setTobiraTabHierarchy, updateExtendedSeriesMetadata, @@ -48,10 +50,12 @@ const SeriesDetails = ({ const theme = useAppSelector(state => getSeriesDetailsTheme(state)); const themeNames = useAppSelector(state => getSeriesDetailsThemeNames(state)); const hasStatistics = useAppSelector(state => seriesHasStatistics(state)); + const tobiraStatus = useAppSelector(state => getSeriesDetailsTobiraStatus(state)); const tobiraError = useAppSelector(state => getSeriesDetailsTobiraDataError(state)); useEffect(() => { dispatch(fetchSeriesStatistics(seriesId)); + dispatch(fetchSeriesDetailsTobira(seriesId)); dispatch(setTobiraTabHierarchy("main")); // eslint-disable-next-line react-hooks/exhaustive-deps }, []); @@ -90,7 +94,7 @@ const SeriesDetails = ({ tabNameTranslation: "EVENTS.SERIES.DETAILS.TABS.TOBIRA", accessRole: "ROLE_UI_SERIES_DETAILS_TOBIRA_VIEW", name: "tobira", - hidden: tobiraError?.message?.includes("503"), + hidden: tobiraStatus === "failed" && tobiraError?.message?.includes("503"), }, { tabNameTranslation: "EVENTS.SERIES.DETAILS.TABS.STATISTICS", diff --git a/src/components/events/partials/modals/ShowSeriesDetailsModal.tsx b/src/components/events/partials/modals/ShowSeriesDetailsModal.tsx index d73a63f408..b5942f41a4 100644 --- a/src/components/events/partials/modals/ShowSeriesDetailsModal.tsx +++ b/src/components/events/partials/modals/ShowSeriesDetailsModal.tsx @@ -2,7 +2,7 @@ import { useEffect, useState } from "react"; import SeriesDetailsModal from "./SeriesDetailsModal"; import { useAppDispatch, useAppSelector } from "../../../../store"; import { fetchSeriesDetailsMetadata, fetchSeriesDetailsAcls, fetchSeriesDetailsFeeds, fetchSeriesDetailsTheme, fetchSeriesDetailsThemeNames, fetchSeriesDetailsTobira } from "../../../../slices/seriesDetailsSlice"; -import { useSearchParams } from "react-router-dom"; +import { useSearchParams } from "react-router"; import { getSeriesDetailsMetadata } from "../../../../selectors/seriesDetailsSelectors"; export const ShowSeriesDetailsModal = () => { diff --git a/src/components/events/partials/wizards/NewSeriesWizard.tsx b/src/components/events/partials/wizards/NewSeriesWizard.tsx index 16a5dd8035..e476e812bf 100644 --- a/src/components/events/partials/wizards/NewSeriesWizard.tsx +++ b/src/components/events/partials/wizards/NewSeriesWizard.tsx @@ -6,6 +6,7 @@ import { getSeriesExtendedMetadata, getSeriesMetadata, getSeriesTobiraPageError, + getSeriesTobiraPageStatus, } from "../../../../selectors/seriesSeletctor"; import NewMetadataPage from "../ModalTabsAndPages/NewMetadataPage"; import NewMetadataExtendedPage from "../ModalTabsAndPages/NewMetadataExtendedPage"; @@ -15,7 +16,7 @@ import { initialFormValuesNewSeries } from "../../../../configs/modalConfig"; import { MetadataSchema, NewSeriesSchema } from "../../../../utils/validate"; import { getInitialMetadataFieldValues } from "../../../../utils/resourceUtils"; import { useAppDispatch, useAppSelector } from "../../../../store"; -import { TobiraPage, postNewSeries } from "../../../../slices/seriesSlice"; +import { TobiraPage, fetchSeriesDetailsTobiraNew, postNewSeries } from "../../../../slices/seriesSlice"; import { MetadataCatalog } from "../../../../slices/eventSlice"; import NewTobiraPage from "../ModalTabsAndPages/NewTobiraPage"; import { getOrgProperties, getUserInformation } from "../../../../selectors/userInfoSelectors"; @@ -34,6 +35,7 @@ const NewSeriesWizard: React.FC<{ const metadataFields = useAppSelector(state => getSeriesMetadata(state)); const extendedMetadata = useAppSelector(state => getSeriesExtendedMetadata(state)); + const tobiraStatus = useAppSelector(state => getSeriesTobiraPageStatus(state)); const tobiraError = useAppSelector(state => getSeriesTobiraPageError(state)); const user = useAppSelector(state => getUserInformation(state)); const orgProperties = useAppSelector(state => getOrgProperties(state)); @@ -46,6 +48,13 @@ const NewSeriesWizard: React.FC<{ const [snapshot, setSnapshot] = useState(initialValues); const [pageCompleted, setPageCompleted] = useState<{ [key: number]: boolean }>({}); + useEffect(() => { + // This should set off a web request that will intentionally fail, in order + // to check if tobira is available at all + dispatch(fetchSeriesDetailsTobiraNew("")); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []); + // Caption of steps used by Stepper const steps = [ { @@ -71,7 +80,7 @@ const NewSeriesWizard: React.FC<{ { translation: "EVENTS.SERIES.NEW.TOBIRA.CAPTION", name: "tobira", - hidden: !!tobiraError?.message?.includes("503"), + hidden: !!(tobiraStatus === "failed" && tobiraError?.message?.includes("503")), }, { translation: "EVENTS.SERIES.NEW.SUMMARY.CAPTION", diff --git a/src/components/recordings/Recordings.tsx b/src/components/recordings/Recordings.tsx index fa8c11cb27..b004339195 100644 --- a/src/components/recordings/Recordings.tsx +++ b/src/components/recordings/Recordings.tsx @@ -1,7 +1,7 @@ import React, { useEffect, useState } from "react"; import MainNav from "../shared/MainNav"; import { useTranslation } from "react-i18next"; -import { Link } from "react-router-dom"; +import { Link } from "react-router"; import cn from "classnames"; import TableFilters from "../shared/TableFilters"; import Table from "../shared/Table"; diff --git a/src/components/recordings/partials/RecordingsNameCell.tsx b/src/components/recordings/partials/RecordingsNameCell.tsx index 2b91e8e9db..113ad479dc 100644 --- a/src/components/recordings/partials/RecordingsNameCell.tsx +++ b/src/components/recordings/partials/RecordingsNameCell.tsx @@ -1,6 +1,6 @@ import React from "react"; import { useTranslation } from "react-i18next"; -import { Link } from "react-router-dom"; +import { Link } from "react-router"; import { setSpecificEventFilter } from "../../../slices/tableFilterSlice"; import { loadEventsIntoTable } from "../../../thunks/tableThunks"; import { useAppDispatch } from "../../../store"; diff --git a/src/components/shared/MainNav.tsx b/src/components/shared/MainNav.tsx index e0d40ab02a..2207141cd8 100644 --- a/src/components/shared/MainNav.tsx +++ b/src/components/shared/MainNav.tsx @@ -1,6 +1,6 @@ import React from "react"; import { useTranslation } from "react-i18next"; -import { Link, useNavigate } from "react-router-dom"; +import { Link, useNavigate } from "react-router"; import { loadAclsIntoTable, loadEventsIntoTable, diff --git a/src/components/statistics/Statistics.tsx b/src/components/statistics/Statistics.tsx index 2d1b46dba8..9591f1f66f 100644 --- a/src/components/statistics/Statistics.tsx +++ b/src/components/statistics/Statistics.tsx @@ -1,5 +1,5 @@ import React, { useEffect, useState } from "react"; -import { Link } from "react-router-dom"; +import { Link } from "react-router"; import { useTranslation } from "react-i18next"; import cn from "classnames"; import Header from "../Header"; diff --git a/src/components/systems/Jobs.tsx b/src/components/systems/Jobs.tsx index ea81b0afa0..5278ad93e1 100644 --- a/src/components/systems/Jobs.tsx +++ b/src/components/systems/Jobs.tsx @@ -1,5 +1,5 @@ import React, { useEffect, useState } from "react"; -import { Link } from "react-router-dom"; +import { Link } from "react-router"; import { useTranslation } from "react-i18next"; import cn from "classnames"; import TableFilters from "../shared/TableFilters"; diff --git a/src/components/systems/Servers.tsx b/src/components/systems/Servers.tsx index dea50ec9a2..a5bb5ddbe9 100644 --- a/src/components/systems/Servers.tsx +++ b/src/components/systems/Servers.tsx @@ -1,7 +1,7 @@ import React, { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; import MainNav from "../shared/MainNav"; -import { Link } from "react-router-dom"; +import { Link } from "react-router"; import cn from "classnames"; import TableFilters from "../shared/TableFilters"; import Table from "../shared/Table"; diff --git a/src/components/systems/Services.tsx b/src/components/systems/Services.tsx index 672561ef44..93dd7ef4ea 100644 --- a/src/components/systems/Services.tsx +++ b/src/components/systems/Services.tsx @@ -1,6 +1,6 @@ import React, { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; -import { Link } from "react-router-dom"; +import { Link } from "react-router"; import cn from "classnames"; import TableFilters from "../shared/TableFilters"; import Table from "../shared/Table"; diff --git a/src/components/users/Acls.tsx b/src/components/users/Acls.tsx index e018947ae0..b6db16719c 100644 --- a/src/components/users/Acls.tsx +++ b/src/components/users/Acls.tsx @@ -1,7 +1,7 @@ import React, { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; import MainNav from "../shared/MainNav"; -import { Link } from "react-router-dom"; +import { Link } from "react-router"; import cn from "classnames"; import TableFilters from "../shared/TableFilters"; import Table from "../shared/Table"; diff --git a/src/components/users/Groups.tsx b/src/components/users/Groups.tsx index b6e267309c..9dc6f25cdf 100644 --- a/src/components/users/Groups.tsx +++ b/src/components/users/Groups.tsx @@ -1,7 +1,7 @@ import React, { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; import MainNav from "../shared/MainNav"; -import { Link } from "react-router-dom"; +import { Link } from "react-router"; import cn from "classnames"; import TableFilters from "../shared/TableFilters"; import Table from "../shared/Table"; diff --git a/src/components/users/Users.tsx b/src/components/users/Users.tsx index f3c1f8ff1e..2368105f72 100644 --- a/src/components/users/Users.tsx +++ b/src/components/users/Users.tsx @@ -1,6 +1,6 @@ import React, { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; -import { Link } from "react-router-dom"; +import { Link } from "react-router"; import cn from "classnames"; import MainNav from "../shared/MainNav"; import TableFilters from "../shared/TableFilters"; diff --git a/src/selectors/seriesDetailsSelectors.ts b/src/selectors/seriesDetailsSelectors.ts index b5af556e4d..f484e37511 100644 --- a/src/selectors/seriesDetailsSelectors.ts +++ b/src/selectors/seriesDetailsSelectors.ts @@ -13,6 +13,8 @@ export const getSeriesDetailsThemeNames = (state: RootState) => export const getSeriesDetailsTobiraData = (state: RootState) => state.seriesDetails.tobiraData; +export const getSeriesDetailsTobiraStatus = (state: RootState) => + state.seriesDetails.statusTobiraData; export const getSeriesDetailsTobiraDataError = (state: RootState) => state.seriesDetails.errorTobiraData; export const getTobiraTabHierarchy = (state: RootState) => diff --git a/src/slices/shared/tobiraErrors.ts b/src/slices/shared/tobiraErrors.ts index 130a45e1c9..a68ea1bf17 100644 --- a/src/slices/shared/tobiraErrors.ts +++ b/src/slices/shared/tobiraErrors.ts @@ -24,7 +24,6 @@ type AxiosErrorResponse = { // as it isn't really helpful and might not even be considered as one (see TODO comment below). export const handleTobiraError = (response: AxiosErrorResponse, dispatch: AppDispatch) => { const data = response.response; - console.info(response.message); if (data.status === 503) { // TODO: figure out what to do: @@ -42,7 +41,6 @@ export const handleTobiraError = (response: AxiosErrorResponse, dispatch: AppDis // context: NOTIFICATION_CONTEXT, // })); - console.info(data.data); throw Error(response.message); } else if (data.status === 500) { dispatch(addNotification({ @@ -53,7 +51,6 @@ export const handleTobiraError = (response: AxiosErrorResponse, dispatch: AppDis noDuplicates: true, })); - console.error(response); throw Error(response.message); } else if (data.status === 404) { dispatch(addNotification({ @@ -64,7 +61,6 @@ export const handleTobiraError = (response: AxiosErrorResponse, dispatch: AppDis noDuplicates: true, })); - console.error(response); throw Error(response.message); } };