-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add delete button to "video details" (#1172)
This adds a "delete" button to the "Video details" page which will remove that event in Tobira and send a `delete` request to Opencast. While that operation is pending and when it fails on Opencast side, the event will still be visible on the "My Videos" page marked respectively, but only there and only as long as it is still present in Opencast. Tobira's sync code will pick up if it gets eventually deleted, and then the "pending/ deletion failed" event will be removed completely. See commits for more technical details. Should be fine to review commit by commit. Closes #806
- Loading branch information
Showing
25 changed files
with
460 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
backend/src/db/migrations/34-event-view-and-deletion-timestamp.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
-- This adds a 'tobira_deletion_timestamp' column to events to mark videos | ||
-- that have been deleted but are either waiting for sync or still present | ||
-- in Opencast due to a failed deletion on that end. It can be used to | ||
-- detect these failed deletions by comparing it to the current time. | ||
|
||
-- Furthermore, the 'events' table is renamed to 'all_events', and a new view | ||
-- called 'events' is created to show all non-deleted records from 'all_events'. | ||
-- This view practically replaces the former 'events' table and removes the | ||
-- need to adjust all queries to check it an event has been deleted. | ||
|
||
alter table events | ||
add column tobira_deletion_timestamp timestamp with time zone; | ||
|
||
alter table events rename to all_events; | ||
|
||
create view events as | ||
select * from all_events where tobira_deletion_timestamp is null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.