Releases: Samuel1698/fakeViewport
RELEASE v2.4.3
🐛 Fixed
- Issue #40: Updating to Debian Trixie would break concurrent.futures
max_retriesnow correctly displays the default value as Blue.
🔥 Changed
get_driver_pathnow more robustly handles cached drivers. Aims to prevent rare occurence where a script restart would not fully close the geckodriver/chromedriver and it would prevent script execution with "file busy" error message.- Rework how
main()determines if the process crashed before it's being called again. Aims to solve edge case where a power outage and a subsequent system restart would not reset thescript_start_timefile.
The full release is a copy of the entire repo. It's the same as cloning from the terminal.
The minimal is just what's needed to run the script - no tests or development files.
The no api is the same as minimal except it also does not include monitoring.py nor the html, css, and js files to run it.
RELEASE v2.4.2
🐛 Fixed
- Issue #38: Automatically attempt to dismiss modals from Ubiquiti by clicking the closeButton
- Remove
preventDefaultfrom tooltip mouse event handlers. It would prevent the click from sending the command on touch-enabled devices.
The full release is a copy of the entire repo. It's the same as cloning from the terminal.
The minimal is just what's needed to run the script - no tests or development files.
The no api is the same as minimal except it also does not include monitoring.py nor the html, css, and js files to run it.
RELEASE v2.4.1
🔥🐛 v2.4.1: Visual Fixes & Cache
🔥Changed
driver_pathgets cached in the same script run to prevent repeated calls toget_driver_pathunless the script restarts.monitoring.logflask logs now less verbose.configtab in dashboard now has more clear coloring and a color-guide.
🐛 Fixed
update.pyproperly logs toviewport.loginstead ofmonitoring.log.- Missing meta viewport tag in login page.
- Update button not having a pointer cursor.
The full release is a copy of the entire repo. It's the same as cloning from the terminal.
The minimal is just what's needed to run the script - no tests or development files.
The no api is the same as minimal except it also does not include monitoring.py nor the html, css, and js files to run it.
RELEASE v2.4.0
✨💥🐛 Edgecase Bug Fix & Login Page
💥 /api/script_uptime and /api/status return "null" instead of throwing a 500 Error if the file from which we read those values is invalid or does not exist.
✨ Added
stale_drivers_handlerfunction clears driver directory of stale versions to save space.handle_viewchecks for presence of elements that indicate the account that's trying to view the cameras lost permissions to view them.
🔥Changed
- Swap some invocations of
logging.infotologging.warning. get_driver_pathselects old version of the driver (if available) if the new version's download gets stuck.handle_fullscreen_buttontries to calldriver.maximize_window()before attempting to click the full-screen button.conftest.pyscope limited to "session". Tests run 5x faster.browser_handlercatchesInvalidArgumentException: Binary is not a browser executable.api_handlerfilters out ANSI and Timestamps from the captured log output.- Use docstrings for function comments.
🐛 Fixed
- Issue #35:
process_handlerproperly filters invocation ofviewport.pyandmonitoring.pyfrom substring matching. api_handlerproperly checks if it's a standalone invocation of the function in order to capture log output conditionally.signal_handlercall fordriver.quit()is now a try...except block to ignore exceptions raised during exit.browser_handlercorrectly prints and count the retry attempt.- RotatingFileHandler edgecase where a restart of the script would "reset" the 24 hour counter for rotating log files. Now rotating at
Midnight. - Accessing
/loginwithout a referrer correctly lands at/if authenticated.
Dashboard
- Last log entry does not display timestamp or log level.
- Coloring logs moved to a shared function for both the logs tab and last log entry.
- Check for
data?.network?instead of existence of the element. - Rename
infosection todevice. - Login page matches style of dashboard.
- Dashboard tabs is expanded on bigger screens to display all the information at once.
- Logout button
The full release is a copy of the entire repo. It's the same as cloning from the terminal.
The minimal is just what's needed to run the script - no tests or development files.
The no api is the same as minimal except it also does not include monitoring.py nor the html, css, and js files to run it.
RELEASE v2.3.0
✨💥🐛 Dashboard Overhaul
💥 If you had integrated the API endpoints into another service, you have to change them to match the new ones. All the same information is present (and way, way more), but presented differently.
✨ Added
- Feature #27: Automatic Updates without needing to console into the machine.
- Feature #32: Add
Pausebanner on live-view if the mouse moves. /api/self/restartendpoint to forcemonitoring.pyto restart itself./api/update,/api/update/apply, and/api/update/changelogendpoints.viewport --pauseargument toggles execution of the automatic health checks.
💥Changed
- Reworked the Dashboard to look and function better.
- Light and Dark theme selection.
- Added more information from the system, network and configuration.
- Update button pulls the changelog from the latest release and will attempt to
git pullon your directory and if that fails, will fetch theminimalversion of the release and unzip it in your directory. Logstab displays a maximum of 600 lines from your log-file. Default is 10.Configtab fetches yourconfig.iniand will display the value in red if it's invalid. For theloggingsection, it will display in orange if it's changed from the default.
handleElementsfunction can take an array of css classes instead of a single one. If Ubiquiti changes an element's class it's easier to fix.- Hidden Cursor and Player Elements reappear on mouse movement.
- 💥 The api endpoints have drastically changed. Check the Endpoints section of the READ.ME for the new ones.
🐛 Fixed
- Issue #31: Fix login handler breaking if browser had saved password #31
- Issue #33: Login page using
userinstead ofusernamefor the field name.
The full release is a copy of the entire repo. It's the same as cloning from the terminal.
The minimal is just what's needed to run the script - no tests or development files.
The no api is the same as minimal except it also does not include monitoring.py nor the html, css, and js files to run it.
RELEASE v2.2.3
✨ Added
minimize.shwill delete all development and test related files, as well as all files ending in.mdto declutter install folder.
Same as downloading theminimalversion from the release.uninstall.shwill remove the modifications the script makes outside the install folder:- Removes cron job if present
- Removes alias in bashrc/zshrc if present
- Removes Desktop shortcut if present
- Removes all files from the directory except
.env(in case you want a fresh re-install and want to keep the credentials and url saved.)
🔥Changed
setup.shoptionally sets up a cronjob to automatically start the script on startup.setup.shNow has a 250ms delay between each check because I didn't like how fast it spammed the console. If a change is about to be made it prints a new line before to separate it from successful checks.
🐛 Fixed
- Moving the
restart_schedulerlogic tohandle_viewmade it so that the crash detection would erroneously trigger on a restart and override the script start time.handle_restartnow writes to a temporary fileapi/.restartthat gets checked by the crash detection logic to determined if the script restarted or not. - Fix execution of
browser_handlerlast retry attempt.
The full release is a copy of the entire repo. It's the same as cloning from the terminal.
The minimal is just what's needed to run the script - no tests or development files.
The no api is the same as minimal except it also does not include monitoring.py nor the html, css, and js files to run it.
RELEASE v2.2.2
🔥Changed
browser_handlercan now detect if installing the driver is taking too long and properly handle it as aretry attempt. Before, it would not raise an error and silently get stuck forever.browser_handlercan now catch unrecognized browser and raise an error.- Removed
restart_schedulerthread and moved that logic tohandle_viewto avoid the complexity of dealing with 2 separate threads interacting with one another. - Signal Handler uses
os._exitinstead ofsys.exit.
🐛 Fixed
- Issue #25: API would clutter
viewport.logwith Flask logs meant formonitoring.log. - Issue #26: Script would silently exit with bad configuration file.
- Remove killing
viewportin--restartflag to prevent inconsistency in how script start time is determined to have crashed. Letmain()handle the process. - Scheduling Restarts at the same time that a health check would happen no longer breaks execution of the script.
The full release is a copy of the entire repo. It's the same as cloning from the terminal.
The minimal is just what's needed to run the script - no tests or development files.
The no api is the same as minimal except it also does not include monitoring.py nor the html, css, and js files to run it.
RELEASE v2.2.1
✨ Added
viewport --diagnoseargument will look at your current.envandconfig.iniand look for errors.browser_handlercan now deal with dropped/lost connection while attempting to download the ChromeDrivers/GeckoDrivers.- Option to take screenshot on errors (Deleted after
LOG_DAYS). - Test coverage now at
100%with 300 tests.
🔥Changed
configandenvvalidation now a separatevalidate_config.pyfile.- Rewrite
config.inicomments for brevity. restart_handlernow checks if invoked from within a terminal and replaces itself, otherwise it will detach into the background.viewport --restartstill detaches into the background.viewport -rwill only restart if there's already a script running.- Fully validate relevant
.envvariables when using themonitoringapi.
🐛 Fixed
- Argument parsing now exclusively parses expected arguments.
- log_error bad function call with
e=Nonenow correctly usesNoneinstead.
The full release is a copy of the entire repo. It's the same as cloning from the terminal.
The minimal is just what's needed to run the script - no tests or development files.
The no api is the same as minimal except it also does not include monitoring.py nor the html, css, and js files to run it.
RELEASE v2.2.0
💥 What's Changed
💥 If you were using a previous version of config.ini, the category previously known as [Chrome] has been changed to [Browser]. Either delete the old config file and re-run ./setup.sh or edit that category manually.
- Added Firefox support
- Added option for Scheduled Restarts in
config.ini, and display it in the--statusof the script. - Increase testing coverage
API
-
Added new endpoints:
/api/logs
/api/logs?limit=Displays the last N entries in the log file/api/next_restartDisplays the next scheduled restart -
Added
logfilebutton to control panel to fetch/api/logsand display the last 100 log entries
The full release is a copy of the entire repo. It's the same as cloning from the terminal.
The minimal is just what's needed to run the script - no tests or development files.
The no api is the same as minimal except it also does not include monitoring.py nor the html, css, and js files to run it.
RELEASE v2.1.5
What's Changed
- Add an explicit function to check the content of the page for common messages indicating a crashed tab on top of checking for the responsiveness of
driver - Fix a bug where an exception would lead to an infinite restart loop instead of being handled correctly
- Improve monitoring.py at the request of an user who wanted a way to start/restart/stop the script from their phone
Full Changelog: v2.1.4...v2.1.5
The full release is a copy of the entire repo. It's the same as cloning from the terminal.
The minimal is just what's needed to run the script - no tests or development files
The no api version does not include monitoring.py nor the html, css, and js files to run it.