Skip to content

Commit

Permalink
gateone.js: Fixed a bug where the "monitor for activity" and "monitor…
Browse files Browse the repository at this point in the history
… for inactivity" checkboxes would stay checked even if the terminal you were viewing didn't have the feature enabled. it will now stay in synch with whatever terminal you're currently viewing.

Documentation:  The most minor of wording changes.
  • Loading branch information
liftoff committed Oct 2, 2012
1 parent 750dcdc commit 6edd753
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion gateone/docs/source/ReleaseNotes/index.rst
Expand Up @@ -78,7 +78,7 @@ Summary of Changes
* **New Feature:** A widget() function has been added to :ref:`gateone-javascript` that allows plugins to create elements that float above terminals. See the the documentation and the Example plugin (example.js) itself for details. * **New Feature:** A widget() function has been added to :ref:`gateone-javascript` that allows plugins to create elements that float above terminals. See the the documentation and the Example plugin (example.js) itself for details.
* **New Feature:** The bell sound is now downloaded over the WebSocket and cached locally in the user's browser so it won't need to be downloaded every time the user connects. * **New Feature:** The bell sound is now downloaded over the WebSocket and cached locally in the user's browser so it won't need to be downloaded every time the user connects.
* **New Feature:** Users can now set a custom bell sound. * **New Feature:** Users can now set a custom bell sound.
* **New Feature:** All use of the threading module in Gate One has been replaced with Tornado's PeriodicCallback feature and multiprocessing (where appropriate). This is both more performant and reduces memory utilization considerably. Especially when there are a large number of open terminals. * **New Feature:** Most useage of the threading module in Gate One has been replaced with Tornado's PeriodicCallback feature and multiprocessing (where appropriate). This is both more performant and reduces memory utilization considerably. Especially when there are a large number of open terminals.
* **New Feature:** Gate One can now be configured to listen on a Unix socket (as opposed to just TCP/IP addresses). Thanks to Tamer Mohammed Abdul-Radi of `Cloud9ers <http://cloud9ers.com/>`_ for this contribution. * **New Feature:** Gate One can now be configured to listen on a Unix socket (as opposed to just TCP/IP addresses). Thanks to Tamer Mohammed Abdul-Radi of `Cloud9ers <http://cloud9ers.com/>`_ for this contribution.
* **New Feature:** Old user session logs are now automatically removed after a configurable time period. See the `session_logs_max_age` option. * **New Feature:** Old user session logs are now automatically removed after a configurable time period. See the `session_logs_max_age` option.
* **New Feature:** If you've set the number of rows/columns Gate One will now scale the size of each terminal in an attempt to fit it within the window. Looks much nicer than having a tiny-sized terminal in the upper left corner of the browser window. * **New Feature:** If you've set the number of rows/columns Gate One will now scale the size of each terminal in an attempt to fit it within the window. Looks much nicer than having a tiny-sized terminal in the upper left corner of the browser window.
Expand Down
15 changes: 11 additions & 4 deletions gateone/static/gateone.js
Expand Up @@ -589,8 +589,6 @@ var go = GateOne.Base.update(GateOne, {
go.Net.sendDimensions(); go.Net.sendDimensions();
}, 3000); }, 3000);
} }
// Connect to the server
// go.Net.connect();
// Apply user-specified dimension styles and settings // Apply user-specified dimension styles and settings
go.Visual.applyStyle(goDiv, go.prefs.style); go.Visual.applyStyle(goDiv, go.prefs.style);
if (go.prefs.fillContainer) { if (go.prefs.fillContainer) {
Expand Down Expand Up @@ -2846,6 +2844,7 @@ GateOne.Base.update(GateOne.Visual, {
}, 1100); }, 1100);
} }
}, },
// TODO: Get this *actually* centering the terminal title info
displayTermInfo: function(term) { displayTermInfo: function(term) {
// Displays the given term's information as a psuedo tooltip that eventually fades away // Displays the given term's information as a psuedo tooltip that eventually fades away
var u = go.Utils, var u = go.Utils,
Expand Down Expand Up @@ -3087,8 +3086,9 @@ GateOne.Base.update(GateOne.Visual, {
node = u.getNode(elem); node = u.getNode(elem);
node.className = node.className.replace(/(?:^|\s)noanimate(?!\S)/, ''); node.className = node.className.replace(/(?:^|\s)noanimate(?!\S)/, '');
}, },
// TODO: Change this so it doesn't hard-code things like setting the terminal title or fixing the activity checkboxes (use a callback array like everything else)
slideToTerm: function(term) { slideToTerm: function(term) {
// Slides the view to the given *term*. If *noReset* is true, don't reset the grid before switching // Slides the view to the given *term*. If *GateOne.Visual.noReset* is true, don't reset the grid before switching
var u = go.Utils, var u = go.Utils,
v = go.Visual, v = go.Visual,
prefix = go.prefs.prefix, prefix = go.prefs.prefix,
Expand All @@ -3106,10 +3106,17 @@ GateOne.Base.update(GateOne.Visual, {
bottomAdjust = 0, bottomAdjust = 0,
reScrollback = u.partial(v.enableScrollback, term), reScrollback = u.partial(v.enableScrollback, term),
paddingRight = (style['padding-right'] || style['paddingRight']), paddingRight = (style['padding-right'] || style['paddingRight']),
paddingBottom = (style['padding-bottom'] || style['paddingBottom']); paddingBottom = (style['padding-bottom'] || style['paddingBottom']),
setActivityCheckboxes = function(term) {
var monitorInactivity = u.getNode('#'+prefix+'monitor_inactivity'),
monitorActivity = u.getNode('#'+prefix+'monitor_activity');
monitorInactivity.checked = go.terminals[term]['inactivityTimer']
monitorActivity.checked = go.terminals[term]['activityNotify'];
};
if (termObj) { if (termObj) {
displayText = termObj.id.split(prefix+'term')[1] + ": " + termObj.title; displayText = termObj.id.split(prefix+'term')[1] + ": " + termObj.title;
termTitleH2.innerHTML = displayText; termTitleH2.innerHTML = displayText;
setActivityCheckboxes(term);
} else { } else {
return; // This can happen if the terminal closed before a timeout completed. Not a big deal, ignore return; // This can happen if the terminal closed before a timeout completed. Not a big deal, ignore
} }
Expand Down

0 comments on commit 6edd753

Please sign in to comment.