Skip to content

Commit

Permalink
Merge branch 'main' into series-links
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianKniephoff committed Jan 16, 2025
2 parents 02e954a + 9511948 commit 4787324
Show file tree
Hide file tree
Showing 27 changed files with 90 additions and 91 deletions.
105 changes: 47 additions & 58 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
2 changes: 1 addition & 1 deletion src/components/About.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
2 changes: 1 addition & 1 deletion src/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down
2 changes: 1 addition & 1 deletion src/components/Header.tsx
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
2 changes: 1 addition & 1 deletion src/components/configuration/Themes.tsx
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
2 changes: 1 addition & 1 deletion src/components/events/Events.tsx
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
2 changes: 1 addition & 1 deletion src/components/events/Series.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
2 changes: 1 addition & 1 deletion src/components/events/partials/SeriesDetailsAction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/components/events/partials/SeriesTitleCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
8 changes: 4 additions & 4 deletions src/components/events/partials/modals/EventDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import {
getModalWorkflowTabHierarchy,
getModalPage,
getEventDetailsTobiraDataError,
getEventDetailsTobiraStatus,
} from "../../../../selectors/eventDetailsSelectors";
import { getUserInformation } from "../../../../selectors/userInfoSelectors";
import EventDetailsStatisticsTab from "../ModalTabsAndPages/EventDetailsStatisticsTab";
Expand Down Expand Up @@ -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
}, []);

Expand All @@ -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 = [
Expand Down Expand Up @@ -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",
Expand All @@ -178,9 +181,6 @@ const EventDetails = ({

const openTab = (tabNr: EventDetailsPage) => {
dispatch(removeNotificationWizardForm());
if (tabNr === EventDetailsPage.Tobira) {
dispatch(fetchEventDetailsTobira(eventId));
}
dispatch(openModalTab(tabNr, "entry", "entry"))
};

Expand Down
6 changes: 5 additions & 1 deletion src/components/events/partials/modals/SeriesDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
getSeriesDetailsTheme,
getSeriesDetailsThemeNames,
getSeriesDetailsTobiraDataError,
getSeriesDetailsTobiraStatus,
hasStatistics as seriesHasStatistics,
} from "../../../../selectors/seriesDetailsSelectors";
import { getOrgProperties, getUserInformation } from "../../../../selectors/userInfoSelectors";
Expand All @@ -20,6 +21,7 @@ import DetailsMetadataTab from "../ModalTabsAndPages/DetailsMetadataTab";
import DetailsExtendedMetadataTab from "../ModalTabsAndPages/DetailsExtendedMetadataTab";
import { useAppDispatch, useAppSelector } from "../../../../store";
import {
fetchSeriesDetailsTobira,
fetchSeriesStatistics,
setTobiraTabHierarchy,
updateExtendedSeriesMetadata,
Expand Down Expand Up @@ -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
}, []);
Expand Down Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = () => {
Expand Down
Loading

0 comments on commit 4787324

Please sign in to comment.