From 33d53a43a7f4b2dffc942075a4f2440d4679cd45 Mon Sep 17 00:00:00 2001 From: Arnei Date: Fri, 5 Apr 2024 14:43:10 +0200 Subject: [PATCH 01/13] Respect config option for adding series ACL to new event The backend configuration file `org.opencastproject.organization-mh_default_org.cfg` has a config option called `admin.init.event.acl.with.series.acl`. It determines whether the ACL of a new event is initialized with the ACL of its series, and true per default. We were not respecting this config option at all. This PR changes that. --- .../ModalTabsAndPages/NewAccessPage.tsx | 34 ++++++++++++++++++- .../partials/wizards/NewEventWizard.tsx | 15 ++++++-- .../partials/wizards/NewSeriesWizard.tsx | 1 + 3 files changed, 46 insertions(+), 4 deletions(-) diff --git a/app/src/components/events/partials/ModalTabsAndPages/NewAccessPage.tsx b/app/src/components/events/partials/ModalTabsAndPages/NewAccessPage.tsx index 9006cfd766..58dc08a7d1 100644 --- a/app/src/components/events/partials/ModalTabsAndPages/NewAccessPage.tsx +++ b/app/src/components/events/partials/ModalTabsAndPages/NewAccessPage.tsx @@ -16,7 +16,9 @@ import { getUserInformation } from "../../../../selectors/userInfoSelectors"; import { hasAccess } from "../../../../utils/utils"; import DropDown from "../../../shared/DropDown"; import { filterRoles, getAclTemplateText } from "../../../../utils/aclUtils"; -import { useAppSelector } from "../../../../store"; +import { useAppDispatch, useAppSelector } from "../../../../store"; +import { fetchSeriesDetailsAcls } from "../../../../slices/seriesDetailsSlice"; +import { getSeriesDetailsAcl } from "../../../../selectors/seriesDetailsSelectors"; /** * This component renders the access page for new events and series in the wizards. @@ -32,8 +34,11 @@ const NewAccessPage = ({ editAccessRole, // @ts-expect-error TS(7031): Binding element 'checkAcls' implicitly has an 'any... Remove this comment to see the full error message checkAcls, + // @ts-expect-error TS(7031): Binding element 'checkAcls' implicitly has an 'any... Remove this comment to see the full error messag + initEventAclWithSeriesAcl //boolean }) => { const { t } = useTranslation(); + const dispatch = useAppDispatch(); // States containing response from server concerning acl templates, actions and roles const [aclTemplates, setAclTemplates] = useState([]); @@ -42,6 +47,7 @@ const NewAccessPage = ({ const [loading, setLoading] = useState(false); const user = useAppSelector(state => getUserInformation(state)); + const seriesAcl = useAppSelector(state => getSeriesDetailsAcl(state)); useEffect(() => { // fetch data about roles, acl templates and actions from backend @@ -61,6 +67,32 @@ const NewAccessPage = ({ fetchData(); }, []); + // If we have to add series ACL, fetch it + useEffect(() => { + if (initEventAclWithSeriesAcl && formik.values.isPartOf) { + dispatch(fetchSeriesDetailsAcls(formik.values.isPartOf)) + } + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [formik.values, initEventAclWithSeriesAcl]); + + // If we have to add series ACL, add it + useEffect(() => { + if (initEventAclWithSeriesAcl && formik.values.isPartOf && seriesAcl) { + let rolesToAdd = [] + for (const ace of seriesAcl) { + // @ts-expect-error TS(2345): + if (!formik.values.acls.some(acl => acl.role === ace.role)) { + rolesToAdd.push(ace) + } + } + + if (rolesToAdd.length > 0) { + formik.setFieldValue("acls", [ ...formik.values.acls, ...rolesToAdd ]) + } + } + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [initEventAclWithSeriesAcl, seriesAcl]); + // @ts-expect-error TS(7006): Parameter 'value' implicitly has an 'any' type. const handleTemplateChange = async (value) => { // fetch information about chosen template from backend diff --git a/app/src/components/events/partials/wizards/NewEventWizard.tsx b/app/src/components/events/partials/wizards/NewEventWizard.tsx index 5a6c759c1c..6c3137396c 100644 --- a/app/src/components/events/partials/wizards/NewEventWizard.tsx +++ b/app/src/components/events/partials/wizards/NewEventWizard.tsx @@ -19,7 +19,7 @@ import { } from "../../../../selectors/eventSelectors"; import { useAppDispatch, useAppSelector } from "../../../../store"; import { postNewEvent } from "../../../../slices/eventSlice"; -import { getUserInformation } from "../../../../selectors/userInfoSelectors"; +import { getOrgProperties, getUserInformation } from "../../../../selectors/userInfoSelectors"; /** * This component manages the pages of the new event wizard and the submission of values @@ -35,12 +35,20 @@ const NewEventWizard: React.FC<{ const metadataFields = useAppSelector(state => getEventMetadata(state)); const extendedMetadata = useAppSelector(state => getExtendedEventMetadata(state)); const user = useAppSelector(state => getUserInformation(state)); + const orgProperties = useAppSelector(state => getOrgProperties(state)); + + // Whether the ACL of a new event is initialized with the ACL of its series. + let initEventAclWithSeriesAcl = true + const ADMIN_INIT_EVENT_ACL_WITH_SERIES_ACL = "admin.init.event.acl.with.series.acl"; + if (!!orgProperties && !!orgProperties[ADMIN_INIT_EVENT_ACL_WITH_SERIES_ACL]) { + initEventAclWithSeriesAcl = user.org.properties[ADMIN_INIT_EVENT_ACL_WITH_SERIES_ACL] === 'true'; + } const initialValues = getInitialValues( metadataFields, extendedMetadata, uploadAssetOptions, - user + user, ); let workflowPanelRef = React.useRef(); @@ -200,6 +208,7 @@ const NewEventWizard: React.FC<{ nextPage={nextPage} formik={formik} editAccessRole="ROLE_UI_SERIES_DETAILS_ACL_EDIT" + initEventAclWithSeriesAcl={initEventAclWithSeriesAcl} /> )} {page === 6 && ( @@ -228,7 +237,7 @@ const getInitialValues = ( // @ts-expect-error TS(7006): Parameter 'uploadAssetOptions' implicitly has an '... Remove this comment to see the full error message uploadAssetOptions, // @ts-expect-error TS(7006): Parameter 'uploadAssetOptions' implicitly has an '... Remove this comment to see the full error message - user + user, ) => { // Transform metadata fields provided by backend (saved in redux) let initialValues = getInitialMetadataFieldValues( diff --git a/app/src/components/events/partials/wizards/NewSeriesWizard.tsx b/app/src/components/events/partials/wizards/NewSeriesWizard.tsx index 02185dd387..925d132c39 100644 --- a/app/src/components/events/partials/wizards/NewSeriesWizard.tsx +++ b/app/src/components/events/partials/wizards/NewSeriesWizard.tsx @@ -155,6 +155,7 @@ const NewSeriesWizard: React.FC<{ previousPage={previousPage} formik={formik} editAccessRole="ROLE_UI_SERIES_DETAILS_ACL_EDIT" + initEventAclWithSeriesAcl={false} /> )} {page === 3 && ( From 0f225f798244d4a88132fce8882fddeac0521cb3 Mon Sep 17 00:00:00 2001 From: Arnei Date: Thu, 11 Apr 2024 10:14:26 +0200 Subject: [PATCH 02/13] Overwrite new event ACL with series ACL Previously we were combining existing roles with the series roles. But apparently the series roles should just overwrite all other roles. This changes it to that. --- .../partials/ModalTabsAndPages/NewAccessPage.tsx | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/app/src/components/events/partials/ModalTabsAndPages/NewAccessPage.tsx b/app/src/components/events/partials/ModalTabsAndPages/NewAccessPage.tsx index 58dc08a7d1..ba746244cb 100644 --- a/app/src/components/events/partials/ModalTabsAndPages/NewAccessPage.tsx +++ b/app/src/components/events/partials/ModalTabsAndPages/NewAccessPage.tsx @@ -67,7 +67,7 @@ const NewAccessPage = ({ fetchData(); }, []); - // If we have to add series ACL, fetch it + // If we have to use series ACL, fetch it useEffect(() => { if (initEventAclWithSeriesAcl && formik.values.isPartOf) { dispatch(fetchSeriesDetailsAcls(formik.values.isPartOf)) @@ -75,20 +75,10 @@ const NewAccessPage = ({ // eslint-disable-next-line react-hooks/exhaustive-deps }, [formik.values, initEventAclWithSeriesAcl]); - // If we have to add series ACL, add it + // If we have to use series ACL, overwrite existing rules useEffect(() => { if (initEventAclWithSeriesAcl && formik.values.isPartOf && seriesAcl) { - let rolesToAdd = [] - for (const ace of seriesAcl) { - // @ts-expect-error TS(2345): - if (!formik.values.acls.some(acl => acl.role === ace.role)) { - rolesToAdd.push(ace) - } - } - - if (rolesToAdd.length > 0) { - formik.setFieldValue("acls", [ ...formik.values.acls, ...rolesToAdd ]) - } + formik.setFieldValue("acls", seriesAcl) } // eslint-disable-next-line react-hooks/exhaustive-deps }, [initEventAclWithSeriesAcl, seriesAcl]); From 28dcba3d693acaf8ca5b8b05529dfd7acdcaff82 Mon Sep 17 00:00:00 2001 From: Ron Lucke Date: Thu, 6 Jun 2024 09:39:58 +0200 Subject: [PATCH 03/13] increase contrast ratio fix #640 --- src/styles/components/_steps.scss | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/styles/components/_steps.scss b/src/styles/components/_steps.scss index dddea0cd2a..127a762fb8 100644 --- a/src/styles/components/_steps.scss +++ b/src/styles/components/_steps.scss @@ -22,8 +22,12 @@ .step-by-step { + .MuiStepLabel-iconContainer svg { + color: $color-gray !important; + } + .MuiStepLabel-labelContainer span { - color: #92a0ab; + color: $color-darkgray; margin: 3px 10px; position: relative; } From aec24429505cdd9d12f4587b027ed916a7090c11 Mon Sep 17 00:00:00 2001 From: Crowdin Bot Date: Mon, 17 Jun 2024 05:22:12 +0000 Subject: [PATCH 04/13] Automatically update translation keys --- src/i18n/org/opencastproject/adminui/languages/lang-da_DK.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/org/opencastproject/adminui/languages/lang-da_DK.json b/src/i18n/org/opencastproject/adminui/languages/lang-da_DK.json index 8e1a452d7a..422e882cc0 100644 --- a/src/i18n/org/opencastproject/adminui/languages/lang-da_DK.json +++ b/src/i18n/org/opencastproject/adminui/languages/lang-da_DK.json @@ -8,7 +8,7 @@ "COMMIT": "Git commit this version of Opencast was built from.", "VERSION": "Common bundle version of Opencast modules" }, - "NO": "No", + "NO": "Nej", "SUBMIT": "Submit", "UPDATE": { "MINOR": "Minor update available", From c100442b287cb403dd7ff671f82781329f3ea846 Mon Sep 17 00:00:00 2001 From: Arnei Date: Tue, 18 Jun 2024 10:51:26 +0200 Subject: [PATCH 05/13] Set initial sort column to "title" When initially loading the admin ui, the events table will reorder itself after a few moments. This avoids the reordering by initializing table sorting parameters with "title" for the "sort by column" parameter. --- src/reducers/tableReducers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/reducers/tableReducers.ts b/src/reducers/tableReducers.ts index 3102bd6688..a00f1f3fd7 100644 --- a/src/reducers/tableReducers.ts +++ b/src/reducers/tableReducers.ts @@ -50,7 +50,7 @@ const initialState = { resource: "", pages: [], columns: [], - sortBy: "", + sortBy: "title", predicate: "", reverse: "ASC", rows: [], From 4ca598c4a6310cf6f5f4f3ac7f5e0f064896ea92 Mon Sep 17 00:00:00 2001 From: Julian Kniephoff Date: Tue, 18 Jun 2024 11:12:35 +0200 Subject: [PATCH 06/13] Remove unused `eslint` config --- package.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/package.json b/package.json index 86c663b1a3..1d5f506868 100644 --- a/package.json +++ b/package.json @@ -49,9 +49,6 @@ "serve": "vite preview", "test": "vitest" }, - "eslintConfig": { - "extends": "react-app" - }, "browserslist": { "production": [ ">0.2%", From e7880e73e81ab4a05817b3bfb027dc0ced90e544 Mon Sep 17 00:00:00 2001 From: Arnei Date: Tue, 18 Jun 2024 12:30:53 +0200 Subject: [PATCH 07/13] Fix date table filter from event column In the event table you can click on a date in the date column to set a filter. That filter was not very helpful, as it would only show the event of the row you clicked on. Now it shows all events of that day, bringing it in line with how setting a date filter manually works. --- src/components/events/partials/EventsDateCell.tsx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/components/events/partials/EventsDateCell.tsx b/src/components/events/partials/EventsDateCell.tsx index 0dafd820d2..d77c49480e 100644 --- a/src/components/events/partials/EventsDateCell.tsx +++ b/src/components/events/partials/EventsDateCell.tsx @@ -24,11 +24,19 @@ const EventsDateCell = ({ const filterMap = useAppSelector(state => getFilters(state)); // Filter with value of current cell -// @ts-expect-error TS(7006): Parameter 'date' implicitly has an 'any' type. - const addFilter = async (date) => { + const addFilter = async (date: string) => { let filter = filterMap.find(({ name }) => name === "startDate"); if (!!filter) { - await dispatch(editFilterValue({filterName: filter.name, value: date + "/" + date})); + let startDate = new Date(date); + startDate.setHours(0); + startDate.setMinutes(0); + startDate.setSeconds(0); + let endDate = new Date(date); + endDate.setHours(23); + endDate.setMinutes(59); + endDate.setSeconds(59); + + await dispatch(editFilterValue({filterName: filter.name, value: startDate.toISOString() + "/" + endDate.toISOString()})); await dispatch(fetchEvents()); loadEventsIntoTable(); } From dd878ee41d45358c7a466f47ec34040a066eb875 Mon Sep 17 00:00:00 2001 From: Arnei Date: Tue, 18 Jun 2024 16:00:52 +0200 Subject: [PATCH 08/13] Refetch event ACL after saving After successfully saving event ACL, refetch event ACL from backend and update our state accordingly. This should fix some niche issues, such as described in #353. --- src/slices/eventDetailsSlice.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/slices/eventDetailsSlice.ts b/src/slices/eventDetailsSlice.ts index 31e5d20b9e..bdde6074a4 100644 --- a/src/slices/eventDetailsSlice.ts +++ b/src/slices/eventDetailsSlice.ts @@ -1631,6 +1631,7 @@ export const saveAccessPolicies = createAsyncThunk('eventDetails/saveAccessPolic .post(`/admin-ng/event/${eventId}/access`, data.toString(), headers) .then((response) => { console.info(response); + dispatch(fetchAccessPolicies(eventId)) dispatch( addNotification({ type: "info", From 047d018e9df46d2e3bb6e3925ee7dc9a63fc0e88 Mon Sep 17 00:00:00 2001 From: Arnei Date: Tue, 18 Jun 2024 16:18:33 +0200 Subject: [PATCH 09/13] Fix pagination in capture agent table The pagination for the capture agent table (also called location table), was broken. Clicking to any page beyond the first would change nothing. This fixes that. --- src/thunks/tableThunks.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/thunks/tableThunks.ts b/src/thunks/tableThunks.ts index 983aacfcf6..4818da5e74 100644 --- a/src/thunks/tableThunks.ts +++ b/src/thunks/tableThunks.ts @@ -40,7 +40,7 @@ import { fetchServices, setServiceColumns } from "../slices/serviceSlice"; import { fetchUsers, setUserColumns } from "../slices/userSlice"; import { fetchGroups } from "../slices/groupSlice"; import { fetchThemes, setThemeColumns } from "../slices/themeSlice"; -import { setRecordingsColumns } from "../slices/recordingSlice"; +import { fetchRecordings, setRecordingsColumns } from "../slices/recordingSlice"; import { setGroupColumns } from "../slices/groupSlice"; import { fetchAcls, setAclColumns } from "../slices/aclSlice"; @@ -423,7 +423,6 @@ export const goToPage = (pageNumber) => async (dispatch, getState) => { break; } case "recordings": { -// @ts-expect-error TS(2554): Expected 1 arguments, but got 0. await dispatch(fetchRecordings()); dispatch(loadRecordingsIntoTable()); break; @@ -494,7 +493,6 @@ export const updatePages = () => async (dispatch, getState) => { break; } case "recordings": { -// @ts-expect-error TS(2554): Expected 1 arguments, but got 0. await dispatch(fetchRecordings()); dispatch(loadRecordingsIntoTable()); break; From b7e828b0fc25c0f19a4862e58937fb59049e4d99 Mon Sep 17 00:00:00 2001 From: Arnei Date: Tue, 18 Jun 2024 16:59:50 +0200 Subject: [PATCH 10/13] Make selected table filter smaller After selecting a filter, the displayed filter would increase the size of the surrounding box, causing the row of buttons to be misaligned. This fixes that be removing some unnecessary padding. --- src/styles/main.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/styles/main.scss b/src/styles/main.scss index c043c9096b..d066cc7a09 100644 --- a/src/styles/main.scss +++ b/src/styles/main.scss @@ -405,7 +405,7 @@ div.table-filter { } .ng-multi-value { - padding: 5px; + align-self: center; } .MuiInputBase-root { From e087545f16cef5d727b1df7be4e99894db1bd0e5 Mon Sep 17 00:00:00 2001 From: Julian Kniephoff Date: Wed, 19 Jun 2024 13:11:19 +0200 Subject: [PATCH 11/13] `npm audit fix` --- package-lock.json | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index d6ee46cd21..9ae4571b76 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2645,11 +2645,12 @@ "integrity": "sha512-u9ZUqmaX7K7nkarKODlFT4/XYfWafLRoadlv2Lye8hytrIA4Urg/50rav1eFdbdbO6o9GnK9a6qf7zwq808atA==" }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "license": "MIT", "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -3169,9 +3170,10 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -3528,6 +3530,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "license": "MIT", "engines": { "node": ">=0.12.0" } @@ -4614,6 +4617,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "license": "MIT", "dependencies": { "is-number": "^7.0.0" }, From 2e4b2dafaef1119d86b67adebf8f14179bf857b3 Mon Sep 17 00:00:00 2001 From: Arnei Date: Wed, 19 Jun 2024 17:10:15 +0200 Subject: [PATCH 12/13] Actually set initial sort column to "date" instead Solves the same problem as the previous commit, but instead of setting "title" as the default, this instead sets "date" as the default. --- src/reducers/tableReducers.ts | 4 +++- src/thunks/tableThunks.ts | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/reducers/tableReducers.ts b/src/reducers/tableReducers.ts index a00f1f3fd7..155d53cd68 100644 --- a/src/reducers/tableReducers.ts +++ b/src/reducers/tableReducers.ts @@ -50,7 +50,7 @@ const initialState = { resource: "", pages: [], columns: [], - sortBy: "title", + sortBy: "date", predicate: "", reverse: "ASC", rows: [], @@ -76,6 +76,7 @@ const table = (state = initialState, action) => { pages, rows, sortBy, + reverse, totalItems, } = payload; return { @@ -86,6 +87,7 @@ const table = (state = initialState, action) => { rows: rows, pages: pages, sortBy: sortBy, + reverse: reverse, pagination: { ...state.pagination, totalItems: totalItems, diff --git a/src/thunks/tableThunks.ts b/src/thunks/tableThunks.ts index 983aacfcf6..74a8bc1904 100644 --- a/src/thunks/tableThunks.ts +++ b/src/thunks/tableThunks.ts @@ -83,6 +83,7 @@ export const loadEventsIntoTable = () => async (dispatch, getState) => { multiSelect: table.multiSelect, pages: pages, sortBy: table.sortBy, + reverse: table.reverse, totalItems: total, }; @@ -91,7 +92,8 @@ export const loadEventsIntoTable = () => async (dispatch, getState) => { tableData = { ...tableData, - sortBy: "title", + sortBy: "date", + reverse: "DESC", multiSelect: multiSelect, }; } From 46b8d314ca683bc0e592e7fa0c454edb1bef4183 Mon Sep 17 00:00:00 2001 From: Arnei Date: Thu, 20 Jun 2024 14:40:10 +0200 Subject: [PATCH 13/13] Set default sort order to DESC Sets the default sort order to DESC, so that when we initially sort the table by date, the "newest" events are listed first. Requires that we set ASC explicitly for all other tables. --- src/reducers/tableReducers.ts | 2 +- src/thunks/tableThunks.ts | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/reducers/tableReducers.ts b/src/reducers/tableReducers.ts index 155d53cd68..3548765b3a 100644 --- a/src/reducers/tableReducers.ts +++ b/src/reducers/tableReducers.ts @@ -52,7 +52,7 @@ const initialState = { columns: [], sortBy: "date", predicate: "", - reverse: "ASC", + reverse: "DESC", rows: [], maxLabel: "", pagination: { diff --git a/src/thunks/tableThunks.ts b/src/thunks/tableThunks.ts index 74a8bc1904..667fbf4c5f 100644 --- a/src/thunks/tableThunks.ts +++ b/src/thunks/tableThunks.ts @@ -135,6 +135,7 @@ export const loadSeriesIntoTable = () => (dispatch, getState) => { multiSelect: table.multiSelect, pages: pages, sortBy: table.sortBy, + reverse: table.reverse, totalItems: total, }; @@ -144,6 +145,7 @@ export const loadSeriesIntoTable = () => (dispatch, getState) => { tableData = { ...tableData, sortBy: "title", + reverse: "ASC", multiSelect: multiSelect, }; } @@ -165,6 +167,7 @@ export const loadRecordingsIntoTable = () => (dispatch, getState) => { multiSelect: table.multiSelect, pages: pages, sortBy: table.sortBy, + reverse: table.reverse, rows: resource, totalItems: total, }; @@ -175,6 +178,7 @@ export const loadRecordingsIntoTable = () => (dispatch, getState) => { tableData = { ...tableData, sortBy: "status", + reverse: "ASC", multiSelect: multiSelect, }; } @@ -198,6 +202,7 @@ export const loadJobsIntoTable = () => (dispatch, getState) => { multiSelect: table.multiSelect, pages: pages, sortBy: table.sortBy, + reverse: table.reverse, totalItems: total, }; @@ -207,6 +212,7 @@ export const loadJobsIntoTable = () => (dispatch, getState) => { tableData = { ...tableData, sortBy: "id", + reverse: "ASC", multiSelect: multiSelect, }; } @@ -229,6 +235,7 @@ export const loadServersIntoTable = () => (dispatch, getState) => { multiSelect: table.multiSelect, pages: pages, sortBy: table.sortBy, + reverse: table.reverse, totalItems: total, }; @@ -238,6 +245,7 @@ export const loadServersIntoTable = () => (dispatch, getState) => { tableData = { ...tableData, sortBy: "online", + reverse: "ASC", multiSelect: multiSelect, }; } @@ -261,6 +269,7 @@ export const loadServicesIntoTable = () => (dispatch, getState) => { columns: services.columns, multiSelect: table.multiSelect, sortBy: table.sortBy, + reverse: table.reverse, }; if (table.resource !== "services") { @@ -269,6 +278,7 @@ export const loadServicesIntoTable = () => (dispatch, getState) => { tableData = { ...tableData, sortBy: "status", + reverse: "ASC", multiSelect: multiSelect, }; } @@ -292,6 +302,7 @@ export const loadUsersIntoTable = () => (dispatch, getState) => { multiSelect: table.multiSelect, pages: pages, sortBy: table.sortBy, + reverse: table.reverse, totalItems: total, }; @@ -301,6 +312,7 @@ export const loadUsersIntoTable = () => (dispatch, getState) => { tableData = { ...tableData, sortBy: "name", + reverse: "ASC", multiSelect: multiSelect, }; } @@ -323,6 +335,7 @@ export const loadGroupsIntoTable = () => (dispatch, getState) => { multiSelect: table.multiSelect, pages: pages, sortBy: table.sortBy, + reverse: table.reverse, totalItems: total, }; @@ -332,6 +345,7 @@ export const loadGroupsIntoTable = () => (dispatch, getState) => { tableData = { ...tableData, sortBy: "name", + reverse: "ASC", multiSelect: multiSelect, }; } @@ -354,6 +368,7 @@ export const loadAclsIntoTable = () => (dispatch, getState) => { multiSelect: table.multiSelect, pages: pages, sortBy: table.sortBy, + reverse: table.reverse, totalItems: total, }; @@ -362,6 +377,7 @@ export const loadAclsIntoTable = () => (dispatch, getState) => { tableData = { ...tableData, sortBy: "name", + reverse: "ASC", multiSelect: multiSelect, }; } @@ -384,6 +400,7 @@ export const loadThemesIntoTable = () => (dispatch, getState) => { multiSelect: table.multiSelect, pages: pages, sortBy: table.sortBy, + reverse: table.reverse, totalItems: total, }; @@ -393,6 +410,7 @@ export const loadThemesIntoTable = () => (dispatch, getState) => { tableData = { ...tableData, sortBy: "name", + reverse: "ASC", multiSelect: multiSelect, }; }