forked from liftoff/GateOne
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[pull] master from liftoff:master #1
Open
pull
wants to merge
665
commits into
10xEngineer:master
Choose a base branch
from
liftoff:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
…nd adjusted comments here and there). Bookmarks plugin: `GateOne.Bookmarks.openBookmark()` now works from the New Workspace Workspace. It also works faster than it did before (precisely 250 milliseconds faster!). gateone.js: Removed the workspace number from the title when a New Workspace Workspace is opened (the user doesn't care what number it is).
…nstead of passing an 'appObj' they are simply passed 'settings' (which is nearly the same thing) and the 'where' argument which in most cases will be a new workspace. gateone.js: Enhanced `GateOne.Visual.newWorkspace()` so that it will empty the current workspace and return it if it happens to be filled with a New Workspace Workspace. gateone.js: Added `GateOne.openApplication(app, settings, where)` which lets you open an application by name, passing it optional settings and a place to put it (where). Ultimately ends up calling the application's `__new__()` method. gateone.js: Fixed a bug in `GateOne.Utils.runPostInit()` where postInit() methods were not being called. Apparently it's been their for over a year now but I never noticed because nothing used postInit() functions until now. gateone.py: Removed the 'icon' attribute from `GOApplication` since that is no longer used. gateone.py: Fixed a bug in `ApplicationWebSocket.list_applications()` where it wasn't filtering enabled_applications properly when sending the list to the user. Bookmarks plugin: Performed some code cleanup/optimization. Bookmarks plugin: Added a new `GateOne.Bookmarks.registerURLHandler()` function that lets plugins register their own protocol handlers. Also modified `GateOne.Bookmarks.openBookmark()` to use it. SSH Plugin: It now registers two protocol handlers ('ssh' and 'telnet') via the aforementioned `registerURLHandler()` function. SSH Plugin: Added `GateOne.SSH.connect()` which performs the same action that the `GateOne.Bookmarks.openBookmark()` function used to do. terminal.js: Changed `GateOne.Terminal.hideIcons()` and `GateOne.Terminal.showIcons()` so they completely remove and re-create the toolbar icon instead of just hiding it. This was done to work around a horrific bug in Firefox where if you have an SVG that exists in two locations and you set 'display: none' on one of them the other one will disappear too!
….js if the slimit module is available. gateone.py: Moved the code that creates the cache_dir (if missing) into `ApplicationWebSocket.initialize()` from `get_theme()` (not sure why it wasn't there in the first place). gateone.py: Added a new method: `ApplicationWebSocket.wrap_and_send_js()`. It's kinda neat: It will take any JavaScript library and wrap it inside a sandbox; only exporting what would be global variables to whatever variables you like. So you could load underscore.js inside Gate One as GateOne._ if you so desired (to avoid clobbering an existing version of underscore.js that might already be on the page). gateone.py: Changed the `sync_log` messages slightly to make it more clear what's going on. gateone.js: Fixed a bug where if you only had one visible application it's `__new__()` method wasn't being automatically called. Basically, I just made it so that hidden applications don't count when making that determination. gateone.js: Fixed a bug where the Ctrl-Alt-W keyboard shortcut wasn't working to close workspaces. gateone.js: Changed how the initialization process takes place in order to start moving modules/functions/whatever outside of the main gateone.js and into their own files. Had to move lots of calls to `GateOne.Net.addAction()` out of init() functions and into the main .js file so they would be ready-to-go before init() functions were called. gateone.js: Moved GateOne.Input into its own file (gateone_input.js) gateone.js: Removed `GateOne.Utils.hasElementClass()` as it is deprecated by browsers' built-in' `elem.classList.contains()`. gateone.js: Moved a bunch of lesser-used functions from gateone.js into their own individual files: gateone_*.js. These files are sent immediately after the user connects (inside of gateone.py in the `ApplicationWebSocket.open()` method). This effort has reduced the size of gateone.js from 340K (~124k minified) to 259K (~98k minified). gateone.js: Fixed a bug in `GateOne.Utils.removeElement()` where it would throw an exception if asked to remove an element that has already been removed. gateone.js: Removed `GateOne.Utils.loadPluginCSS()` as it is no longer used. gateone.js: Fixed a bug in `GateOne.Visual.togglePanel()` where it wasn't passing the correct panel to the `trigger()` function when all panels were toggled out at once. utils.py: Fixed a minor annoyance with `short_hash()` where it could sometimes generate hashes that started with a dash (-). This made inspecting files that used these hashes kind of annoying. From now on if a hash starts with a dash that dash will be replaced with a capital leter A. terminal.js: Instead of creating the terminal info icon inside of `GateOne.Terminal.init()` it now calls it each time the "go:new_terminal" event is fired (it already calls that function whenever you switch to a terminal). app_terminal.py: Renamed the print stylesheet from default.css to printing.css to give it a more accurate client-side name.
…u'd lose your text selection immediately after selecting something in the scrollback buffer. This required a minor change to the Web Worker (see below) as well. term_ww.js: Modified `processScreen()` to wrap every line in the scrollback buffer in a '<span>' element. This was part of the aforementioned bug fix in regards to text highlighting inside the scrollback buffer.
…e you could end up with an exception in your JS console if a terminal was closed at just the right time. gateone.js: Changed where the "go:js_loaded" event gets triggered. It now triggers after the last `postInit()` function gets called. Note that it is still possible for that event to get called more than once if some scripts take a long time to load. gateone.js: Fixed a bug where the user's username/UPN wasn't showing up in the preferences panel. This was happening because the `GateOne.User.setUsernameAction()` WebSocket action was being called before `GateOne.User.init()` (it's one of the few WebSocket actions that gets called before everything else so this kind of thing shouldn't crop up much). gateone.js: As part of the aforementioned change to `GateOne.User.setUsernameAction()`, the "go:user_login" event now gets triggered just after "go:js_loaded". It always happened after "go:js_loaded" but now it will happen at pretty much the same exact time (one right after the other). gateone.js: Added a call to `document.execCommand("ClearAuthenticationCache")` inside of `GateOne.User.logout()` in order to force Internet Explorer to *actually* log the user out (it's the only browser that doesn't work with the usual redirect method).
…`. It controls what command is used to execute commands. By default it is, `["/bin/sh", "-c"]` but you can override it with a string or a list of your choosing *after* the Multiplex instance is created. so that'd be: `m = Multiplex('some_command.sh'); m.shell_command = '/bin/bash -c'` app_terminal.py: Added a new setting you can add to your 50terminal.conf to override the default "/bin/sh -c" command that's used to execute all terminal commands. It modifies the `Multiplex.shell_command` described above. You can use a string or a list in the `shell_command` setting (in 50terminal.conf).
…on: "auth_timeout". It controls how long the cookie/authentication object will be considered valid before the user is forced to re-authenticate. Note that if you're using Google or PAM authentication this will be a completely transparent event since Google will use the cookie that's already set and the browser will re-use the credentials you entered originally. This new setting merely controls the length of time the encrypted value will be considered valid. This required many changes to code all over the place (wherever `get_secure_cookie()` was called). auth.py: Modified to use the new 'auth_timeout' setting. gateone.js: `GateOne.Visual.dialog()` now uses `GateOne.Utils.randomString()` rather than `GateOne.Utils.randomPrime()` for it's unique identifier. gateone.js: Fixed a bug where you'd be left with an empty screen if you lost your connection to the Gate One while you only had a New Workspace Workspace open (no applications). It will now open the New Workspace Workspace whenever the connection is re-established if nothing else is already open. utils.py: Added a new function: `total_seconds()` that takes a `datetime.timedelta` instance and returns it's value in seconds. It basically just emulates the `timedelta.total_seconds()` function that was include in Python 2.7+.
…stall it with 'sudo pip install futures'. NEW MODULE: go_async.py. It has some awesome classes for executing things in an efficient, concise, asynchronous fashion. It's the reason for the new concurrent.futures dependency. gateone.js and terminal.js: Switched to a more reliable transitionend event detection method since it wasn't working properly in Firefox. gateone.js: Fixed a bug with `GateOne.Visual.stopIndicator()` where it wasn't working in Firefox. gateone.py: Added a shortcut to `self.current_user` so that auth.py doesn't get confused and raise an AttributeError exception when a user's authentication information has expired. gateone.py: Moved the code that saves the PID file down below the code that calls drop_privileges() so we don't end up with a permissions problem when it comes time to remove or re-create that file. gateone.py: Gate One will now automatically empty its cache dir every time it quits. Yeah, it's not as efficient this way but it's a lot safer. gateone.py: Removed the `require_auth()` function since it is no longer used (deprecated by the `@require` decorator). app_terminal.py: Fixed a (cosmetic) bug where you'd get an exception in the logs if the client sent a 'terminal:kill_terminal' WebSocket action to the server before it had a chance to run `TerminalApplication.terminals()`. gateone.py: The "enabled_applications" and "enabled_plugins" settings are now case-insentive. gateone.py: Fixed a bug in `ApplicationWebSocket.list_applications()` where it wasn't working if you had explicitly set some enabled_applications. app_terminal.py: The `term_log` function is now setup inside of `TerminalApplication.__init__()` instead of (just) after `authenticate()` so we don't get (cosmetic) exceptions in the logs if a client sends the "terminal:get_terminals" WebSocket action before the `authenticated()` function gets called (really tiny window where that can happen but I managed to reproduce it twice in a reconnect situation so the fix was necessary). app_terminal.py: Changed a bunch of functions using `self.policy` to grab the latest policy every time they're called. This is to make it so that the latest settings get applied if they're changed (gateone.py has a process that reloads its current settings every 5 seconds or so). utils.py: Enhanced `AutoExpireDict`: Removed the ability to pass 'timeout' and 'interval' keys to the `update()` function so you could use those values in your own instance of the dict (just use mydict.timeout and mydict.interval directly instead). Also made it so that the `PeriodicCallback` will stop itself if there are no more keys remaining. It will immediately start itself back up as soon as a new item gets added. Lastly, I added some docstrings that were missing on a few functions inside the class. utils.py: `get_plugins()` and `get_applications()` now perform a case-insentitive comparison when checking if a plugin or application is to be consider enabled.
…here it wasn't passing the name of sub-applications properly. This bug is what caused terminal "commands" to fail top open if you had more than one.
…led directly by child processes they are wrapped via the `safe_call()` function which sets the default signal handler for the `SIGINT` signal before calling the wrapped function. This prevents all sorts of garbage from being spit out to the terminal when you Ctrl-C a running gateone.py process if the `MultiprocessRunner()` hasn't shut itself down yet. go_async.py: Added a new method to `AsyncRunner()`: `map()`. It works similarly to the `map()` function included in `concurrent.futures` but with some special sauce to make it more flexible and expecially *more asynchronous* (take a look). gateone.py: Added a new function: `shutdown_async()`. It just shuts down the `CPU_ASYNC` and `IO_ASYNC` asynchronous task runners. It gets called when gateone.py exits via the @atexit.register decorator. gateone.py: Added a workaround for systems that don't support multiprocessing. So if your (wacky) system doesn't have enough semaphores or something like that the `CPU_ASYNC` global will just fall back to using `ThreadedRunner()` (faking it).
…e (nothing special). go_async.py: Added support for disabling the memoization cache to `AsyncRunner.call()` by passing `memoize=False` as a keyword argument. app_terminal.py: Added `GO_LOCATION` to the list of default environment variables that are set when spawning new terminals. app_terminal.py: Added three new methods to `TerminalWebSocket`: `save_term_settings()`, `restore_term_settings()`, and `clear_term_settings`. They will save, restore, and clear a dictionary of values that will be associated with a given terminal. The point being to be able to restore settings that were lost after the server is restarted (mostly for situations where dtach is used). app_terminal.py: Fixed a bug where setting `"dtach": false` in your 50terminal.conf wasn't being honored and the same problem that caused that was also causing issues with the `kill_terminal()` function (which was also corrected). This should fix the problem reported in issue #303 (#303). Note that this required adding a new function (`apply_cli_overrides()`) to mimic the same one in gateone.py. app_terminal.py: Terminal titles are now restored if you restart your Gate One server and then resume a dtached session. SSH Plugin: Changed how the SSH_SOCKET and sshConnectString values get stored/set/tracked/etc... This required adding some new capabilities to the optional escape sequence handler inside ssh.py as well as changes to ssh.js and ssh_connect.py. SSH Plugin: It is now using the `save_term_settings()` and `restore_term_settings()` functions to save and restore things like the SSH connect string and the path to the SSH socket. SSH Plugin: ssh_connect.py now uses the `GO_LOCATION` environment variable when naming its temporary scripts in the user's session directory. Everywhere: Modified some use of the logging module to use more appropriate loggers.
…_settings.json file was missing in your session directory under certain circumstances.
… term_settings.json file could not be decoded (for whatever reason).
… variabls that get automatically exported to executed commands. It's the equivalent of `GO_SESSION_DIR/GO_SESSION'. SSH Plugin: Fixed a bug where ssh_connect.py was creating scripts in the `session_dir` instead of the user's session dir (e.g. `session_dir/session`).
…native way to wrap JavaScript in a sandbox that automatically takes care of loading dependencies before loading the code wrapped in the superSandbox. All of Gate One's JS code (for the most part) has been modified to use the new superSandbox and the result is spectacular! Pages load *much* faster now and the responsiveness overall is improved (seriously!). go_async.py: Changed the order in which some `__init__()` stuff is loaded in order to resolve a problem reported in issue #303 (#303) where you'd get an AttributeError exception if the `MultiprocessRunner` had it's `__del__()` function called before it had a chance to complete instantiation. gateone.py: You can now disable the cleanup of user's 'logs' directories entirely by setting "user_logs_max_age" to "0". gateone.py: Changed how the license information is set. Gate One will now default to "AGPLv3" as the __license__ but will override that value at startup if a .license file can be found. Also made it so that the license information is sent as an HTTP header ("License") for all requests. This is to easily distinguish between commercial licensees and open source users. utils.py: Added "y" (years) support to the `convert_to_timedelta()` function. It doesn't take leap years into account but whatever. It's good enough for Gate One's purposes. app_terminal.py: Removed the legacy "session_logs_max_age" option from the auto-generated 50terminal.conf as it isn't used anymore. The correct setting for that is "session_logs_max_age" which is in 10server.conf (under "gateone"). Example Plugin: The Example plugin's JavaScript has been modified from `GateOne.Example` to `GateOne.Terminal.Example` to better reflect what it belongs to. Everywhere: All JavaScript has been updated to use the new `GateOne.Base.superSandbox()` sandboxing mechanism. This allowed me to reduce the timeouts on `GateOne.Utils.runPostInit()` so everything loads much quicker now. termio.py: Changed the `RE_OPT_SSH_SEQ` stuff to match the new style of setting the SSH connect string inside of ssh_connect.py. Logging plugin: Increased the size of the pagination text. Logging plugin: Fixed a bug where the 'printable' (aka 'flat') log output wasn't showing the background color the entire length of the page.
…ng uid values given as strings into integers. Note that this doesn't impact Gate One at all since it pre-converts to integers before calling `drop_privileges()` anyway. A bug is a bug though. utils.py: The `drop_privileges()` function will now set `USER`, `LOGNAME`, `SHELL`, and `HOME` after it drops privileges. app_terminal.py: Before spawning a new terminal the environment variables will name have the default `os.environ` applied so the shell process will get the defaults in addition to any extras/overrides set by Gate One or the "environment_vars" setting. Themes: Switched from "Ubuntu, Arial Black, sans-serif" to "Ubuntu, Arial, sans-serif" because Arial Black looks fugly on Windows for some reason. Themes: Tweaked the CSS that controls the application icon grid in the New Workspace Workspace. REMOVED: Mobile plugin: The function it provides has been moved to various individual CSS files in the form of CSS media queries. Not that using a mobile browser is worthwhile anyway... Chrome for Android doesn't register kedown/keyup events (see my >1 year old bug: https://code.google.com/p/chromium/issues/detail?id=118639) which means you can't use the backspace key and Firefox mobile doesn't fire componsition* events properly (a new bug which I opened today: https://bugzilla.mozilla.org/show_bug.cgi?id=921209). terminal_input.js: Not that it matters but I cleaned up the code that deals with mobile browsers a bit.
… a sad attempt to make it work better on mobile browsers. Now if you switch to certain Android keyboards it's almost usable in Chrome.
gateone.js: LOADS of performance optimizations all over the place. The way JS is loaded/initialized happens much faster now. Seriously: The page load should be as quick as it gets. gateone.js: You can now provide "dependencies" in `GOApplication.info` dicts in the form of a list of JavaScript files that must be loaded before the client-side code will call `GateOne.Visual.newWorkspaceWorkspace()`. gateone.js: You can now pass functions as dependencies to `GateOne.Base.superSandbox` when wrapping code. If the function returns `true` it will be assumed that the dependency is met and vice versa. You can also mix & match strings like, "GateOne.Terminal" with functions like, `function() { return (GateOne.Utils.getNode('.✈icon_grid')); }`. If a depdendency function raises an exception it will be caught and assumed to have returned `false`. gateone.js: Applications can now provide a function as their `__appinfo__.icon` value. If `GateOne.Visual.newWorkspaceWorkspace()` detects that it is a function it will call it with the application's 'settings' as the only argument. Whatever is returned will be set as the application square's '✈appicon' innerHTML. gateone.js: Fixed a bug with `GateOne.Base.update()` where it could create `__parent__` attributes with circular references. gateone.js: Changed how `GateOne.Utils.hideElement()` and `GateOne.Utils.showElement()` work... They now use the `classList` attribute. Bookmarks plugin: Added a mechanism to provide favicon handlers: `GateOne.Bookmarks.registerIconHandler()`. Along with this a handler for retrieving favicons for HTTP and HTTPS URLs was also added as a default: `GateOne.Bookmarks.httpIconHandler()`. Bookmarks plugin: Moved the icon to the bottom of the file and moved the SSH icon to the SSH plugin. SSH plugin: Added a function that stores the SSH bookmark icon (uses the new registerIconHandler() function): `GateOne.SSH.bookmarkIconHandler()`. termio.py: Fixed an edge case where if you called `Multiplex.terminate()` before the log was created it would throw an AttributeError exception. terminal.js: Added lots of conditionals to prevent cosmetic exceptions from showing up in the JS console when you perform certain actions (such as closing terminals as fast as you can). gateone.py: Added `self.locations` to `ApplicationWebsocket.__init__()` to lessen the chance of an exception in the event that something closes the WebSocket connection too soon. golog.py: The `go_logger()` function now keeps tracks of which logs it has open via the `LOGS` global. This was added so that gateone.py would know which files to chown if `drop_privileges()` is run. Playback plugin: The playback controls will now hide themselves when switching to a workspace that does not contain a terminal. app_terminal.py: Reduced the time of the race condition check that looks for the situation where terminals are closing too fast from 1 second to 500ms so you can close terminals pretty quickly if you want without running into the forced 5-second delay.
…re the first time you click on a terminal it stops accepting keyboard input until you click on it one more time (and then the problem is fixed forever)!
…r hasn't connected to anything in 120 seconds it will execute a script that waits for the user to press Ctrl-C to exit (tried to make it "Press enter..." but due to threading that didn't work). When it executes the timeout.sh script the memory consumption of ssh_connect.py should drop to minimal amount, saving loads of memory if you have a lot of idle terminal sessions that have yet to be connected. This should address the concerns posed in issue #296 (#296) in regards to having 1600 users with one (yet-to-be-connected/idle) terminal each.
…One.Terminal.Input.capture()` to certain events from `GateOne.Terminal.init()` to `GateOne.Terminal.Input.init()`. This is to prevent an edge case where terminal_input.js is still being loaded when `GateOne.Terminal.init()` is being called (was only ever a small chance it could happen... if terminal_input.js needed to be re-minified but terminal.js did not).
…ines longer than the screen (in the browser) without it messing up edge cases all over the place. gateone.js: Fixed the bug where disabling transitions wasn't working (the setting wasn't being restored on page reload). gateone.js: `GateOne.Visual.stopIndicator()` now takes `GateOne.prefs.disableTransitions` into account when it does its thing. If you have transitions disabled it will set a shorter timeout and won't change the opacity.
…quired added all sorts of drag* event functions and changes to various aspects of the grid view. In the process of making these changes I also worked around the visual bugs (browser bugs) that make the toolbar and sidetitle show up in the wrong place after dropping out of grid view. gateone.js: Added `GateOne.Visual.relocateWorkspace()`. It is a new mechanism that will make it easier for applications to support being relocatable. By that I mean you can move the application from the current window/location to a new window or to the background (virtual location). gateone.js: `GateOne.Visual.disableTransitions()` and `GateOne.Visual.enbleTransitions()` can now be passed any number of elements to enable/disable transitions. They also now use the `classList` mechanism instead of using regular expressions/`indexOf()`. gateone.js: Added `GateOne.Visual.swapWorkspaces()` which will swap the location of any two given workspaces (numbers). It fires the 'go:swapped_workspaces' event when complete so that applications can take care of their own swapping (if any is necessary). gateone.js: Added a new "Locations" toolbar icon and several functions for controlling moving applications to/from locations (separate browser windows). Not enabled yet though (still need to finish the GUI stuff). gateone.js: Workspaces now have a 'data-workspace' attribute to make it easier to figure out what workspace number a particular node belongs to. terminal.js: Renamed `GateOne.Terminal.moveTerminalLocation()` to `GateOne.Terminal.relocateTerminal()` to better line up with the new `GateOne.Visual.relocateWorkspace()` function. terminal.js: Added `GateOne.Terminal.swappedWorkspacesEvent()` which is attached to the 'go:swapped_workspaces' event. It takes care of swapping terminals with each other after the workspaces have swapped. app_terminal.py: Fixed a bug in `TerminalApplication.move_terminal()` where moving a terminal to an existing location with no terminals would throw an IndexError exception. app_terminal.py: Added a new function: `TerminalApplication.swap_terminals()`. It will swap two given terminals with each other (number-wise). Bookmarks CSS: Minor tweak to make sure bookmark tags show up at the bottom of bookmarks. Themes: Adjusted the z-index properties for several classes to make them seem less random. terminal_input.js: Added an optional 'force' argument to `GateOne.Terminal.Input.disableCapture()` as well as some other improvements to the capture-related functions. gateone.py: Changed how `ApplicationWebsocket.get_locations()` works... Instead of sending a list of locations (e.g. `['default']`) it now sends a more complete dict object that contains the applications, running instances, when they were created, what "command" they're running, and their titles.
…erminals after the first click.
…encies. gateone.js: Improved `GateOne.Utils.showElement()` and `GateOne.Utils.hideElement()` so that they do a better job preserving an element's original 'display' style. utils.py: Added a `touch()` function. This function is now being used in gateone.py for various things. utils.py: Updated `check_write_permissions()` to always return True if the user being checked is root. utils.py: Added support for capital "M" to indicate months in `convert_to_timedelta()`. utils.py: Added `kill_session_processes()` which will kill all processes associated with a given session. gateone.py: Fixed some bugs related to logging: Missing log files are now automatically created and setting `--logging=none` works properly. This should take care of the problem mentioned in issue #308 (#308). gateone.py: Added a new global function to cleanup old session directories: `cleanup_old_sessions()`. gateone.py: Added a new global function that calls the new `cleanup_old_sessions()` and the regular `cleanup_user_logs()`: `clean_up()`. gateone.py: Renamed the `user_logs_cleanup_interval` setting to just `cleanup_interval` since it now controls how often the user logs are checked *and* how often old sessions are checked. auth.py: Added a try/except block to the code that sends a message to the user indicating they're unauthorized to catch the edge case where the user disconnected the WebSocket before that message can be sent. Really just prevents a cosmetic exception from appearing in the logs. go_async.py: Fixed a bug in `AsyncRunner.shutdown()` which could crop up if a subclass never completed calling its `__init__()` function before the instance was removed and garbage collection took place. This should correct issue #310 (#310). terminal_input.js: Fixed xterm mouse support. You can now click without having to select text in the process (LOL, what a strange bug). It will also disable the native context menu but you can override this by holding down the alt key and clicking. This should resolve issue #306 (#306) terminal_input.js: xterm mouse support now works with the scroll wheel! Hold down the alt key to scroll normally instead (may be running into a browser bug here--sometimes it doesn't work--no logical reason why other than the browser doesn't like to scroll when alt is held sometimes). This should (hopefully) make the person that reported issue #306 *extra* happy :) gateone.py and app_terminal.py: The old `options.dtach` quitting-time stuff from gateone.py was moved to app_terminal.py in the form of a new `quit()` function that is decorated with the `@atexit.register` decorator (man I love that thing!). Bookmarks plugin: Tweaked the CSS so the edge of the star (in the background of the bookmarks panel) doesn't get cut off.
…xt()` to make it more convenient to work with long strings (since JavaScript sucks and doesn't support proper multi-line strings). gateone.js: Fixed a bug where you'd get a blank screen upon loading Gate One if you had just one visible application but multiple sub-applications. gateone.js: The hard-coded 'text-align: center' in `GateOne.Visual.alert()` has been removed. gateone.js: Removed the `before()` and `after()` stuff from `GateOne.Events`. Nothing used it and it was unnecessary anyway (even though it was some cool JavaScript metaprogramming). gateone.js: Since the only thing using the `__parent__` attribute was the aforementioned functions I have removed that part of `GateOne.Base.module()` and `GateOne.Base.update()`. Help Plugin: This plugin is now using `GateOne.Base.SuperSandbox` to fix a bug where under certain circumstances it would load before `GateOne.Input` resulting in an exception. SSH Plugin: ssh_connect.py: Improved the handling of Ctrl-C and Ctrl-D (both are indications from the user they just want to quit ssh_connect.py). Convenience Plugin: Fixed a bug where clicking on the permissions in the output of 'ls -l' wasn't working. Themes: Added a new '✈centered_text' class which will be handy. `GateOne.Visual.alert()` is already using it.
…r right-hand corner. gateone.js: You can now attach events to dialogs via the 3rd argument ('options') like so: `GateOne.Visual.dialog('title', content, {'events': {'moved': moveFunc, 'resized': resizeFunc, 'mousedown': mouseDownFunc}})`. You can attach whatever regular DOM events you like along with a few extras: 'opened', 'closed', 'moved' and 'resized' which will be called at their obvious junctures. gateone.js: You can now pass a 'style' to apply to dialogs via the 3rd argument ('options'). gateone.js: You can now hold down Ctrl+Shift and use your scroll wheel to control the opacity of dialogs. Themes: Removed the max-width and max-height properties from dialogs. Tweaked the inner container elements of dialogs--they're less complicated now. Themes: Lots and lots of tweaks to dialog-related CSS. Themes: Lots of *little* tweaks here and there. gateone.py: Added 'gateone_misc.js' to the list of JavaScript files that gets sent to the client after a connection is opened. terminal.js: You can now pass 'style' in the 3rd argument to `GateOne.Terminal.newTerminal()` to set the style of the created terminal. terminal.js and app_terminal.py: Changed how the 'terminal:terminals' WebSocket action works in conjunction with `GateOne.Terminal.newTerminal()`. Instead of just sending a list of terminal numbers to the client the server will now send an object that contains extra metadata associated with any given terminal. In conjunction with this, it is now possible to pass a 'metadata' object to `GateOne.Terminal.newTerminal()` inside of the 2nd argument (settings['metadata']). This will be recorded on the server and send back to the client as part of the 'terminal:terminals' WebSocket action. Applications and plugins can register an event (via `GateOne.Events.on()`) to handle terminals with a 'restoreEvent' attribute inside the terminal metadata. It's a bit more complicated than I'd like--but only because I had to maintain backwards compatibility. terminal.js: Added `GateOne.Terminal.popupTerm()`. It opens up a dialog with a terminal inside it. Pretty handy! Especially with the new dialog opacity controls. Still need to finish writing the functions that resume pop-up terminals properly though. Once that's done I'll be adding functions to turn any given terminal *into* a pop-up terminal and vice versa so you can do quick side-by-side comparisons of things (don't worry: split views are coming too). SSH Plugin: ssh.py: Fixed a bug where you'd get an exception trying to edit known hosts. Typo. SSH Plugin: ssh.py: Fixed a bug where if you passed the terminal number as a string to `open_sub_channel()` it would result in KeyError exceptions. Example Plugin: Fixed a couple bugs where it was referencing `GateOne.Example` (old way) instead of `GateOne.Terminal.Example`. Example Plugin: The "Top Top" example widget now looks *much* nicer. Playback Plugin: Fixed a bug where shift + scroll wheel + any other modifiers was controlling the playback history instead of *just* shift + scroll wheel.
…ettings()` in the name of the event it emits (had 'setings' instead of 'settings'). app_terminal.py: The functionality of `TerminalApplication.save_term_settings()` has been moved to a new file, term_utils.py so that it may be called asynchronously. It occurred to me that a web application embedding Gate One may wish to pass a *lot* of metadata when terminals are opened so I took that step to ensure that the read, JSON decode, JSON encode, and write operations don't block the main thread. Also, since this function gets called for every open terminal that could add up to a lot of operations. app_terminal.py: The `TerminalApplication.restore_term_settings()` function has received the same async treatment as `TerminalApplication.save_term_settings()`. app_terminal.py: The `TerminalApplication.set_title()` function now takes an extra keyword argument, `save=True`. If set to `False` it won't bother saving the title using `TerminalApplication.save_term_settings()`. terminal.js: The terminal information display is back! So when you switch terminals it should display the terminal number and the title in a decent-enough manner. gateone.py: The shortcut to the IOLoop inside `GOApplication` has been renamed from 'ioloop' to 'io_loop' to match everything else in Gate One. gateone.py: Added shortcuts to the CPU_ASYNC and IO_ASYNC globals inside of the base `GOApplication` class so Gate One applications can make quick asynchronous calls without having to instantiate their own (no need to ever have more than `cpu_count() + 1` gateone.py processes). go_async.py: Added a new method: `AsyncRunner.call_singleton()`. It works just like `call()` except it ensures that there's only ever one instance of the given function running at any the same time. Useful in situations where a single file may be updated in different places by the same function (e.g. `TerminalApplication.save_term_settings()`). Repeated calls to `AsyncRunner.call_singleton()` will merely result in each function being called when the previous one is complete (which is super handy!). gateone_utils_extra.js: Removed the try/catch block inside `GateOne.Utils.scrollToBottom()` since it really isn't necessary and it also prevents the browser from truly optimizing that function. go_async.py: `MultiprocessRunner()` now enforces itself as a singleton. So you'll only get at most cpu_count()+1 gateone.py processes--even if something calls a fork() later (e.g. if dropping privileges). go_async.py: Reduced the timeout before `AsyncRunner` instances shut down their executors from 2 minutes to 30 seconds. 99% of the time they'll be done with all their operations in just a second or two and it only takes milliseconds for them to restart themselves (very low overhead). It should also be mentioned that the executor shutdown process is safe: It will wait until all futures are done before it actually shuts itself down. gateone.js: Fixed the issue where the grid transition was a bit jerky.
…ying to load the DB data (if it took too long to load--which is an obscure/rare occurrence) would result in an exception.
…king properly with the url_prefix setting.
…plate_not_found This fixes #532. Thanks HaraldWeber
Fixed a bug in ssh_connect.py when /bin/sh is a symlink. Thanks to mammo0 for the PR.
…on chooser appears when using the GateOne.prefs.showAppChooser setting.
…placed with logic that works over the WebSocket. SSH Plugin: The fingerprint display now works properly with ECDSA fingerprints. ssh.js: The known_hosts text editor is now stored as `GateOne.SSH.khEditor` for easy reference.
…registerGlobalShortcut()` are now deprecated. Use the "go:keydown:<key/keystroke>" event instead. terminal.js: Added an additional argument, 'termSettings, to `GateOne.Terminal.popupTerm()` to provide a mechanism for passing arguments through to `GateOne.Terminal.newTerminal()`. terminal.js: Switched from using `GateOne.Input.registerGlobalShortcut` to the new event-based keyboard shortcut mechanism (e.g. `GateOne.Events.on("go:keydown:ctrl-alt-p")`) since the latter is more reliable. terminal.js: Fixed an issue with terminal scaling being incorrect when manually specifying the rows/columns of the terminal (in your preferences). terminal_input.js: Changed the "terminal:onkeydown" and "terminal:onkeyup" events to be "terminal:keydown" and "terminal:keyup" respectively in order to match how they're named everywhere else in Gate One. setup.py: Fixed an issue where having a .zip or .egg in your PYTHONPATH would result in an error at the very last stage of the install when using Python 3. gateone.js: Modified to use the new keyboard shortcut method. Bookmarks Plugin: Modified to use the new keyboard shortcut method. SSH Plugin: Modified to use the new keyboard shortcut method. Help Plugin: Modified to use the new keyboard shortcut method. Example Plugin: Modified to use the new keyboard shortcut method. print.css and terminal.js: Improved the print stylesheet considerably. It actually looks decent now and isn't missing text! Meta-P to print works great.
… so that generating self-signed SSL certificates works with Python 3. gateone.core.server: Fixed a missing .format() call in a log message when SSL certificate auto-generation fails. gateone/docs: Rebuilt the documentation
…errible. Using RTD theme now. Also removed the huge logo.
Gateone service is depend on systemd network.target
Declare package data in a way that is compatible with wheel packages
…thod to send a string to the server.
…er certain circumstances such as after a terminal closed or if the timing was just right
… is no longer necessary and was interfering with F-keys working properly in modern browsers.
…o ensure that key repeat doesn't cause problems.
GateOne.Visual.init() because the reason why they needed to be in postInit() no longer exists (using GateOne.Events for keyboard shortcuts instead of the keyTable). This should also make it easier for applications and plugins to override the default shortcuts.
… likelihood of keyrepeat causing issues.
… One plugin (or application) that can install independently of Gate One itself. This means you can upgrade Gate One without having to reinstall your custom applications/plugins. Also changed how SSL/TLS is setup to ensure that older versions with vulnerabilities don't get enabled. This should correct the issue reported in #683 where older Python versions defaulted to enabling insecure versions of the SSL protocol.
…de variable so applications/plugins can access that info without having to send a request to the client (which means they can have that info earlier on in the process of initializing things and opening terminals). It can be accessed from any application or plugin via self.ws.full_url
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by pull[bot] (v2.0.0-alpha.1)
Can you help keep this open source service alive? 💖 Please sponsor : )