Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Everywhere: Renamed ApplicationWebSocket.policies (the RUDict) to App…
…licationWebSocket.prefs to more accurately reflect what it holds. Changed some version strings from 1.1 to 1.2. gateone.js: Fixed a bug with GateOne.Logging.setLevel() where it would fail to set the level if given a string instead of an integer (because of "use strict"). setup.py: Removed the 'help' plugin from the list of plugins that should get moved inside the terminal application. Help plugin: Moved it back to the old location in <gateone dir>/plugins/ MANIFEST.in: Added .git and .gitignore to the list of excludes. stdeb.cfg: Removed python-pam from the list of recommends (since "I wrote my own damned PAM module" we don't need that mess of a module anymore). gateone.py: Renamed WATCHER to SESSION_WATCHER to better indicate what it is for. gateone.py: The SESSION_WATCHER will now reload gateone.py after the last session has timed out. This should keep Gate One's memory consumption really tight after a while of being idle. gateone.py: While rather obscure, if you want you can now control the SESSION_WATCHER's check interval with the 'session_timeout_check_interval' 'gateone' setting. The default of 30 seconds should be fine in 99.99% of situations. gateone.py: Added a new PeriodicCallback that watches files for changes and calls registered functions if modified: ApplicationWebSocket.file_watcher. gateone.py: Added a new classmethod to handle check files for changes: ApplicationWebSocket.file_checker(). It checks all the files in ApplicationWebSocket.watched_files (by calling file_watcher()) every 5 seconds by default but this can be overridden with the 'file_check_interval' 'gateone' setting. gateone.py: Added a function that gets registered in ApplicationWebSocket.watched_files that will broadcast any text that's written to <session_dir>/broadcast (configurable with the 'broadcast_file' 'gateone' setting): ApplicationWebSocket.broadcast_file_update(). So if you want to send a message to all users connected to Gate One from *outside* of Gate One on the host in question you can do something like this: echo "This server will be rebooting to apply a kernel update in 10 minutes. Please save your work." > /tmp/gateone/broadcast gateone.py: Added a convenience function for registering files to watch: ApplicationWebSocket.watch_file(). GOApplications can use it to register files and respective call-on-modify functions like so: self.ws.watch_file(path, func) gateone.py: Removed PluginCSSTemplateHandler since it is no longer being used. gateone.js: Removed CSSPluginAction() and the related "load_css" WebSocket action since it is no longer being used. utils.py: Added a memoize() function that will cache function calls to provide a speedup. The kind of memoization it uses covers multiple and unhashable arguments so it should be very useful for functions that get passed things like dicts. auth.py: The applicable_policies() function is now using the new @memoize decorator. Since this function gets called regularly it really speeds it up quite a bit without interfering with it's power to provide applications/plugins with updated prefs/policy information.
- Loading branch information
Showing
12 changed files
with
158 additions
and
118 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
include LICENSE.txt | ||
include README.rst | ||
include AGPLv3.txt | ||
include babel_gateone.cfg | ||
include *.rst | ||
graft scripts | ||
graft gateone | ||
exclude .gitignore | ||
global-exclude *.kate-swp | ||
global-exclude *.pyc | ||
global-exclude *.pyc | ||
global-exclude *.git |
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
File renamed without changes.
Oops, something went wrong.