Skip to content
Permalink
Browse files

Add fit xtermjs plugin and tips

  • Loading branch information...
subuk committed Sep 2, 2019
1 parent 7fb8998 commit 0f1bb34c4b7e33b9b6778ed9181137be6a742797
@@ -18,6 +18,7 @@
wsUri += $consoleEl.attr('data-JSConsole-WSUrl');
terminal.off();
terminal.open($consoleWindowEl[0]);
terminal.fit();
terminal.focus();
terminal.write("Connecting...\r\n");
socket = new WebSocket(wsUri);

Some generated files are not rendered by default. Learn more.

Some generated files are not rendered by default. Learn more.

@@ -7,11 +7,17 @@
<script src="{{ Static "coreui/js/app.js" }}"></script>
<!-- <script src="{{ Static "coreui/js/views/main.js" }}"></script> -->
<script src="{{ Static "xterm/xterm.js" }}"></script>
<script src="{{ Static "xterm/addons/fit/fit.js" }}"></script>

<script src="{{ Static "vmango/vmango.CheckboxCard.js" }}"></script>
<script src="{{ Static "vmango/vmango.ReactiveForm.js" }}"></script>
<script src="{{ Static "vmango/vmango.WSConsole.js" }}"></script>
<script>
(function(exports){
Terminal.applyAddon(fit);
})(window);
$(function(){
$('.JS-WSConsole').each(function(idx, el){
Vmango.WSConsole(el);
@@ -11,7 +11,11 @@
<div class="container">
<div class="card border-0">
<div class="card-block JS-WSConsole" data-JSConsole-WSUrl="{{ Url "virtual-machine-console-ws" "id" .Vm.Id }}">
<div class="JS-WSConsole-Window"></div>
<div class="JS-WSConsole-Window" style="width: 100%; height: 600px;"></div>
<pre class="text-muted">
export TERM=xterm COLUMNS=117 LINES=35
stty rows $LINES cols $COLUMNS
</pre>
</div>
</div>
</div>

0 comments on commit 0f1bb34

Please sign in to comment.
You can’t perform that action at this time.