Challenge Overview
A previous challenge has implemented a set of REST APIs for handling video assets, including storing them and managing them (create, retrieve, update, delete). This challenge will some changes to the Admin UI.
Existing API
The existing Node application and deployment details are in Gitlab, and the URL to the repository can be found in the forum.
Existing API
The existing Node application and deployment details are in Gitlab, and the URL to the repository can be found in the forum.
Admin UI updates
Adding a live video
In the Admin UI, we need a way to add a live video *without* going through a scraper.
Example: https://www.youtube.com/watch?v=y60wDzZt8yg
We want to make sure we can define this live video with all the information necessary to have it display in the UI, but it won't be "scraped" when the scrapers run. We need to test that the customer-facing UI can playback the video correctly based on the URL. This is expecially true for YouTube videos, since they have a different playback mechanism. Please make sure your solution is properly tested.
Disabled flag
In the admin UI, we are going to add a "Disabled" checkbox for:
* Videos
* Live TV videos
* Regular scrapers
* Live TV scrapers
If a video or live TV video is listed as "disabled", we won't show it in the customer-facing UI
If a regular or live TV scraper is disabled, we won't run the scraper when "Refresh All" is clicked.
New refresh scrapers page
We currently have a "Refresh All" link on the scrapers screen, but it's a bit limited in it's functionality. This challenge will update it as follows:
1. Add a new "Content Update" page
2. Have the "Refresh All" link on the scrapers screen just redirect to the Content Update page
The content update page will have a list of all scrapers, both regular *and* live TV. They will all have a checkbox next to them in a "Run" column, and the checkboxes will be checked by default.
There will be two buttons at the top - "Run" and "Clear & Run".
When "Run" is clicked, we will take all scrapers that are checked and run them, without clearing the data for each scraper.
When "Clear & Run" is clicked, we will take all scrapers that are checked, delete their current videos and scraper history, and *then* run the scrapers.
We need to make sure we aren't clearing *all* videos - only those for the scrapers that are checked in the list.
When the scrapers are running, we need to show some UI states so the user knows what is happening.
The state for each will be one of these:
* Skipped (not checked, so nothing happening with this scraper)
* Waiting
* Scraper running (shown when the scraper is running)
* Success (xx videos added) (shown when the scraper is done, and "xx" is the number of videos parsed)
* Failure
If a scraper fails, we will just skip it and move on to the next one, instead of failing the entire process, like
READMEAdding a live video
In the Admin UI, we need a way to add a live video *without* going through a scraper.
Example: https://www.youtube.com/watch?v=y60wDzZt8yg
We want to make sure we can define this live video with all the information necessary to have it display in the UI, but it won't be "scraped" when the scrapers run. We need to test that the customer-facing UI can playback the video correctly based on the URL. This is expecially true for YouTube videos, since they have a different playback mechanism. Please make sure your solution is properly tested.
Disabled flag
In the admin UI, we are going to add a "Disabled" checkbox for:
* Videos
* Live TV videos
* Regular scrapers
* Live TV scrapers
If a video or live TV video is listed as "disabled", we won't show it in the customer-facing UI
If a regular or live TV scraper is disabled, we won't run the scraper when "Refresh All" is clicked.
New refresh scrapers page
We currently have a "Refresh All" link on the scrapers screen, but it's a bit limited in it's functionality. This challenge will update it as follows:
1. Add a new "Content Update" page
2. Have the "Refresh All" link on the scrapers screen just redirect to the Content Update page
The content update page will have a list of all scrapers, both regular *and* live TV. They will all have a checkbox next to them in a "Run" column, and the checkboxes will be checked by default.
There will be two buttons at the top - "Run" and "Clear & Run".
When "Run" is clicked, we will take all scrapers that are checked and run them, without clearing the data for each scraper.
When "Clear & Run" is clicked, we will take all scrapers that are checked, delete their current videos and scraper history, and *then* run the scrapers.
We need to make sure we aren't clearing *all* videos - only those for the scrapers that are checked in the list.
When the scrapers are running, we need to show some UI states so the user knows what is happening.
The state for each will be one of these:
* Skipped (not checked, so nothing happening with this scraper)
* Waiting
* Scraper running (shown when the scraper is running)
* Success (xx videos added) (shown when the scraper is done, and "xx" is the number of videos parsed)
* Failure
If a scraper fails, we will just skip it and move on to the next one, instead of failing the entire process, like
Make sure the README is updated with verification information about the new features and configuration information so they can be easily added.
Unit tests
As with the other scrapers, unit tests are required for these new changes. Your tests must cover positive and negative cases and should be reasonably good at covering edge cases and error cases.
Heroku deploy
Make sure the Heroku deployment information is up-to-date and that you keep the package.json up to date as well. Don't expect the deployment to be anything other than "npm install" / "npm start" locally and "git push heroku master" for Heroku deployment.
Submission format
Your submission should be provided as a Git patch file against the commit hash mentioned in the forum. MAKE SURE TO TEST YOUR PATCH FILE!