Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improved behaviour of terminal window
* Disabling autoscrolling now also stops cutting of the log while it's enabled, effectively preventing log lines from being modified at all * Applying filters displays "[...]" where lines where removed * Added a link to scroll to the end of the terminal log (useful for when autoscroll is disabled) * Added a link to select all current contents of the terminal log for easy copy-pasting * Added a display of how many lines are displayed, how many are filtered and how many are available in total Closes #735
- Loading branch information
Showing
6 changed files
with
137 additions
and
39 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
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,22 @@ | ||
<pre id="terminal-output" class="pre-scrollable"></pre> | ||
<label class="checkbox"> | ||
<input type="checkbox" id="terminal-autoscroll" data-bind="checked: autoscrollEnabled"> {{ _('Autoscroll') }} | ||
</label> | ||
<div data-bind="foreach: filters"> | ||
<label class="checkbox"> | ||
<input type="checkbox" data-bind="attr: { value: regex }, checked: $parent.activeFilters"> <span data-bind="text: name"></span> | ||
</label> | ||
<div class="terminal"> | ||
<pre id="terminal-output" class="pre-scrollable" data-bind="foreach: displayedLines"><span data-bind="text: line, css: {muted: type == 'filtered'}"></span><br></pre> | ||
<small class="pull-left"><button class="btn btn-mini" data-bind="click: toggleAutoscroll, css: {active: autoscrollEnabled}">{{ _('Autoscroll') }}</button> <span data-bind="text: lineCount"></span></small> | ||
<small class="pull-right"><a href="#" data-bind="click: scrollToEnd">{{ _("Scroll to end") }}</a> | <a href="#" data-bind="click: selectAll">{{ _("Select all") }}</a></small> | ||
</div> | ||
|
||
<div class="input-append" style="display: none;" data-bind="visible: loginState.isUser"> | ||
<input type="text" id="terminal-command" data-bind="value: command, event: { keyup: function(d,e) { return handleKeyUp(e); }, keydown: function(d,e) { return handleKeyDown(e); } }, enable: isOperational() && loginState.isUser()"> | ||
<button class="btn" type="button" id="terminal-send" data-bind="click: sendCommand, enable: isOperational() && loginState.isUser()">{{ _('Send') }}</button> | ||
<div class="row-fluid"> | ||
<div class="span6" id="termin-filterpanel"> | ||
<div data-bind="foreach: filters"> | ||
<label class="checkbox"> | ||
<input type="checkbox" data-bind="attr: { value: regex }, checked: $parent.activeFilters"> <span data-bind="text: name"></span> | ||
</label> | ||
</div> | ||
</div> | ||
<div class="span6" id="terminal-sendpanel" style="display: none;" data-bind="visible: loginState.isUser"> | ||
<div class="input-append"> | ||
<input type="text" id="terminal-command" data-bind="value: command, event: { keyup: function(d,e) { return handleKeyUp(e); }, keydown: function(d,e) { return handleKeyDown(e); } }, enable: isOperational() && loginState.isUser()"> | ||
<button class="btn" type="button" id="terminal-send" data-bind="click: sendCommand, enable: isOperational() && loginState.isUser()">{{ _('Send') }}</button> | ||
</div> | ||
<small class="muted">{{ _('Hint: Use the arrow up/down keys to recall commands sent previously') }}</small> | ||
</div> | ||
</div> |