web-console 0.4.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of web-console might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.markdown +33 -21
- data/app/assets/javascripts/web_console/console_sessions.js +12 -17
- data/app/controllers/web_console/console_sessions_controller.rb +1 -1
- data/app/models/web_console/console_session.rb +22 -6
- data/lib/assets/stylesheets/web_console.css +255 -0
- data/lib/web_console/colors.rb +3 -2
- data/lib/web_console/colors/monokai.rb +24 -0
- data/lib/web_console/engine.rb +0 -1
- data/lib/web_console/slave.rb +11 -2
- data/lib/web_console/version.rb +1 -1
- data/test/controllers/web_console/console_sessions_controller_test.rb +20 -0
- data/test/dummy/config/application.rb +2 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +65978 -12068
- data/test/dummy/log/test.log +14235 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/0280bb38c5058cc31c4fcd8c392a5ec4 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/{6ad7acc9a22fe2a67ec24a1fc866c20e → 26a3e1c38a6e60bc45d967d210a21fa6} +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/{c649837df826fc310cb80f1adafd6b8d → 2a48be7daff14cf56911b263cbe017c7} +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/{496864a905d53afd8e176f29500f96a8 → 305b55f5220092e63fde09b502d4bbaf} +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/{17c571144b4e44da39bddb2d2c412414 → 4787d1478456f16e87b4b67453741c19} +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/{8aa4c7aabff23c8089d41e9e54193483 → 508ab3c25833ea537a5e3fc90df33595} +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/{e6d6b8bde546349764be7b44ffcf5807 → 55538a15d325a77cefc001df3fbeb5ab} +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/{5ac98782fe3dfd0a766f75ce1801f0a0 → 5adcb7569cdd03204d650e285f19351f} +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/{44117154e909436e7eeaf10cdb18d2b4 → 8524ba6a67aa1b4780df9d219ade9577} +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/{d982412def520c434e2240eae6d29cf2 → ad8eea7f774b674c29708ca90952764f} +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/{680381170dc160e358fc28076ea6886c → b0c3672502453a0959bb662e74f70adf} +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/{7a50a9e605754e99783de95715b976b0 → b90d44fbc7256fb3b64328fd182391e9} +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/{eb25265794d2f7afd1684779d84efdac → bbafe93cdad62ca10f0397f0cb7f75d5} +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/ca9069924054cf28d5d39195f1ac0447 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/{2b96b037f3dfeccfe27113eb95b06ea1 → cdd2c435bd92a68003449e1caabff6e2} +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/e1d89809967e81220dca66770c50aa67 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/{55b7b76605fdffe31d737d4ac1f1ef7b → e3d5cafc071e8f9a8efc88fddf721947} +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/{36341e42f23669574fa1027d0958ff3e → eae513a04f7e3700df598fae5b457003} +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/f48ecedb2c5b2b5e48e71338d5933e8d +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/{d1f6e06bc2f112c4ec3a4c3f68351878 → f4a21ed9cebe2c83a9d988504dc6720b} +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/{cb0065359d3b5b296f71d673f4b276e9 → f4d45273ff5b44879dab0a16805f4309} +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/0280bb38c5058cc31c4fcd8c392a5ec4 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/26a3e1c38a6e60bc45d967d210a21fa6 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/2a48be7daff14cf56911b263cbe017c7 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/305b55f5220092e63fde09b502d4bbaf +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/508ab3c25833ea537a5e3fc90df33595 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/55538a15d325a77cefc001df3fbeb5ab +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/5adcb7569cdd03204d650e285f19351f +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/b0c3672502453a0959bb662e74f70adf +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/b90d44fbc7256fb3b64328fd182391e9 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/bbafe93cdad62ca10f0397f0cb7f75d5 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/ca9069924054cf28d5d39195f1ac0447 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/e1d89809967e81220dca66770c50aa67 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/e3d5cafc071e8f9a8efc88fddf721947 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/f48ecedb2c5b2b5e48e71338d5933e8d +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/f4a21ed9cebe2c83a9d988504dc6720b +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/f4d45273ff5b44879dab0a16805f4309 +0 -0
- data/test/models/console_session_test.rb +12 -6
- data/test/test_helper.rb +3 -0
- data/test/web_console/engine_test.rb +136 -0
- data/test/web_console/slave_test.rb +57 -39
- metadata +157 -119
- data/test/dummy/tmp/cache/assets/development/sprockets/6e4d5b32cc444226f6597198994ccd5e +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/b2401118729720034b6f3eda0b4c5025 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/d6b85d8b0b5c569388b89e56e9f6fed7 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/df048a8b0897b9c04acdf59c8f95b18f +0 -0
- data/test/web_console_test.rb +0 -134
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e96992b0e00e980e4c524e69f28ae6090df9306
|
4
|
+
data.tar.gz: 71fd3a7be8390397ff9fb9fff77edf733d5e02d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 18f21edfbdfa5867d041b1424bde048670d1e375246d3b39ad2701552bf74056e17319d7ac4a24f98a7afe22b67ac1b25e439c8f9025322f431c6223edbea750
|
7
|
+
data.tar.gz: ebf49726b9fea1dd1db7cdc52792d9366243f708a3b32ba61c3c4d4371b0f19daab0b286ab43a29d7ca6c52ec23be3532d9d427ebb9b96a45f1db77f187675ac
|
data/README.markdown
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
<p align=right>
|
2
2
|
Documentation for:
|
3
|
-
<a href=https://github.com/
|
4
|
-
<a href=https://github.com/
|
5
|
-
<a href=https://github.com/
|
3
|
+
<a href=https://github.com/rails/web-console/tree/v0.1.0>v0.1.0</a>
|
4
|
+
<a href=https://github.com/rails/web-console/tree/v0.2.0>v0.2.0</a>
|
5
|
+
<a href=https://github.com/rails/web-console/tree/v0.3.0>v0.3.0</a>
|
6
|
+
<a href=https://github.com/rails/web-console/tree/v0.4.0>v0.4.0</a>
|
6
7
|
</p>
|
7
8
|
|
8
|
-
Web Console [![Version](https://badge.fury.io/rb/web-console.png)](http://badge.fury.io/rb/web-console) [![Travis](https://travis-ci.org/
|
9
|
+
Web Console [![Version](https://badge.fury.io/rb/web-console.png)](http://badge.fury.io/rb/web-console) [![Travis](https://travis-ci.org/rails/web-console.png)](https://travis-ci.org/rails/web-console)
|
9
10
|
===========
|
10
11
|
|
11
12
|
There is no doubt that `rails console` is one of the most useful commands,
|
@@ -18,6 +19,8 @@ This is where _Web Console_ comes to the rescue. It gives you the same
|
|
18
19
|
let's you evaluate Ruby code, there are a lot of those. Its a [VT100]
|
19
20
|
compatible terminal, running `rails console`.
|
20
21
|
|
22
|
+
![demo](http://f.cl.ly/items/1C1x1e0F1u3h3a260V3A/web-console-demo.png)
|
23
|
+
|
21
24
|
You can see _Web Console_ in action at this [video].
|
22
25
|
|
23
26
|
Requirements
|
@@ -41,7 +44,7 @@ To install it in your current application, add the following to your `Gemfile`.
|
|
41
44
|
|
42
45
|
```ruby
|
43
46
|
group :development do
|
44
|
-
gem 'web-console', '~> 0.
|
47
|
+
gem 'web-console', '~> 1.0.0
|
45
48
|
end
|
46
49
|
```
|
47
50
|
|
@@ -133,6 +136,8 @@ run [`login`][login] instead to let users sign into the host system.
|
|
133
136
|
|
134
137
|
```ruby
|
135
138
|
class Application < Rails::Application
|
139
|
+
# You have to run /bin/login as root. That should worry you and you may work
|
140
|
+
# around it by running ssh connecting to the same machine.
|
136
141
|
config.web_console.command = 'sudo /bin/login'
|
137
142
|
end
|
138
143
|
```
|
@@ -140,7 +145,8 @@ end
|
|
140
145
|
_Poor man's solution to SSH._ ![boom](http://f.cl.ly/items/3n2h0p1w0B261u2d201b/boom.png)
|
141
146
|
|
142
147
|
**If you ever decide to use _Web Console_ that way, use SSL to encrypt the
|
143
|
-
traffic, otherwise all the input
|
148
|
+
traffic, otherwise all the input (including the negotiated username and
|
149
|
+
password) can be easily sniffed!**
|
144
150
|
|
145
151
|
### config.web_console.term
|
146
152
|
|
@@ -172,7 +178,7 @@ class Application < Rails::Application
|
|
172
178
|
config.allow_concurrency = true
|
173
179
|
|
174
180
|
# For long-polling, 45 seconds timeout for the development server seems
|
175
|
-
reasonable.
|
181
|
+
# reasonable.
|
176
182
|
config.web_console.timeout = 45.seconds
|
177
183
|
end
|
178
184
|
```
|
@@ -192,10 +198,11 @@ The default color theme is a white-on-black theme called `light`. For
|
|
192
198
|
different appearance you may want to experiment with the other included color
|
193
199
|
themes.
|
194
200
|
|
195
|
-
- `
|
196
|
-
- `tango` _theme based on the tango colors_
|
201
|
+
- `monokai` _the default Sublime Text colors_
|
197
202
|
- `solarized_dark` _light version of the common solarized colors_
|
198
203
|
- `solarized_light` _dark version of the common solarized colors_
|
204
|
+
- `tango` _theme based on the tango colors_
|
205
|
+
- `xterm` _the standard xterm theme_
|
199
206
|
|
200
207
|
If you would like to use a custom theme, you may do so with the following
|
201
208
|
syntax.
|
@@ -243,6 +250,20 @@ end
|
|
243
250
|
You may also change the font, which is following the CSS font property syntax.
|
244
251
|
By default it is `large DejaVu Sans Mono, Liberation Mono, monospace`.
|
245
252
|
|
253
|
+
Try
|
254
|
+
---
|
255
|
+
|
256
|
+
If you just want to try the web-console, without having to go through the
|
257
|
+
trouble of installing it, we provide a [Docker] container that does that for
|
258
|
+
you.
|
259
|
+
|
260
|
+
To try it, install [Docker] first and then paste the following snippet in your
|
261
|
+
shell.
|
262
|
+
|
263
|
+
```bash
|
264
|
+
sudo docker build -t rails/web-console github.com/!#:4 && !#:0-1 run -i -t !#:4
|
265
|
+
```
|
266
|
+
|
246
267
|
FAQ
|
247
268
|
---
|
248
269
|
|
@@ -254,19 +275,10 @@ While spawning processes is relatively cheap on _MRI_, this is not the case in
|
|
254
275
|
_JRuby_. Spawning another process is slow. Spawning another **JRuby** process
|
255
276
|
is even slower. Read more about the problem at the _JRuby_ [wiki].
|
256
277
|
|
257
|
-
|
258
|
-
----------
|
278
|
+
### Changing the colors is broken.
|
259
279
|
|
260
|
-
|
261
|
-
|
262
|
-
you.
|
263
|
-
|
264
|
-
To try it, install [Docker] first and then paste the following snippet in your
|
265
|
-
shell.
|
266
|
-
|
267
|
-
```bash
|
268
|
-
sudo docker build -t gsamokovarov/web-console github.com/!#:4 && !#:0-1 run -i -t !#:4
|
269
|
-
```
|
280
|
+
Some of the style sheets may be cached. Run `rake tmp:cache:clear` to clear it
|
281
|
+
up.
|
270
282
|
|
271
283
|
[Docker]: http://www.docker.io/
|
272
284
|
[Puma]: http://puma.io/
|
@@ -5,16 +5,7 @@ var AJAXTransport = (function(WebConsole) {
|
|
5
5
|
var inherits = WebConsole.inherits;
|
6
6
|
var EventEmitter = WebConsole.EventEmitter;
|
7
7
|
|
8
|
-
|
9
|
-
XHR = (function() {
|
10
|
-
try {
|
11
|
-
return XMLHttpRequest;
|
12
|
-
} catch (e) {
|
13
|
-
return function() {
|
14
|
-
return new ActiveXObject('Microsoft.XMLHTTP');
|
15
|
-
};
|
16
|
-
}
|
17
|
-
}).call(this);
|
8
|
+
var FORM_MIME_TYPE = 'application/x-www-form-urlencoded; charset=utf-8';
|
18
9
|
|
19
10
|
var AJAXTransport = function(options) {
|
20
11
|
EventEmitter.call(this);
|
@@ -28,6 +19,13 @@ var AJAXTransport = (function(WebConsole) {
|
|
28
19
|
|
29
20
|
this.pendingInput = '';
|
30
21
|
|
22
|
+
this.initializeEventHandlers();
|
23
|
+
};
|
24
|
+
|
25
|
+
inherits(AJAXTransport, EventEmitter);
|
26
|
+
|
27
|
+
// Initializes the default event handlers.
|
28
|
+
AJAXTransport.prototype.initializeEventHandlers = function() {
|
31
29
|
this.on('input', this.sendInput);
|
32
30
|
this.on('configuration', this.sendConfiguration);
|
33
31
|
this.once('initialization', function(cols, rows) {
|
@@ -36,13 +34,11 @@ var AJAXTransport = (function(WebConsole) {
|
|
36
34
|
});
|
37
35
|
};
|
38
36
|
|
39
|
-
inherits(AJAXTransport, EventEmitter);
|
40
|
-
|
41
37
|
// Shorthand for creating XHR requests.
|
42
38
|
AJAXTransport.prototype.createRequest = function(method, url, options) {
|
43
39
|
options || (options = {});
|
44
40
|
|
45
|
-
var request = new
|
41
|
+
var request = new XMLHttpRequest;
|
46
42
|
request.open(method, url);
|
47
43
|
|
48
44
|
if (typeof options.form === 'object') {
|
@@ -53,8 +49,7 @@ var AJAXTransport = (function(WebConsole) {
|
|
53
49
|
content.push(encodeURIComponent(key) + '=' + encodeURIComponent(value));
|
54
50
|
}
|
55
51
|
|
56
|
-
|
57
|
-
request.setRequestHeader('Content-Type', formMimeType);
|
52
|
+
request.setRequestHeader('Content-Type', FORM_MIME_TYPE);
|
58
53
|
request.data = content.join('&');
|
59
54
|
}
|
60
55
|
|
@@ -66,7 +61,7 @@ var AJAXTransport = (function(WebConsole) {
|
|
66
61
|
|
67
62
|
var self = this;
|
68
63
|
request.onreadystatechange = function() {
|
69
|
-
if (request.readyState ===
|
64
|
+
if (request.readyState === XMLHttpRequest.DONE) {
|
70
65
|
if (request.status === 200) {
|
71
66
|
self.emit('pendingOutput', request.responseText);
|
72
67
|
self.pollForPendingOutput();
|
@@ -103,7 +98,7 @@ var AJAXTransport = (function(WebConsole) {
|
|
103
98
|
|
104
99
|
var self = this;
|
105
100
|
request.onreadystatechange = function() {
|
106
|
-
if (request.readyState ===
|
101
|
+
if (request.readyState === XMLHttpRequest.DONE) {
|
107
102
|
self.sendingInput = false;
|
108
103
|
if (self.pendingInput) self.sendInput();
|
109
104
|
}
|
@@ -2,7 +2,7 @@ require_dependency 'web_console/application_controller'
|
|
2
2
|
|
3
3
|
module WebConsole
|
4
4
|
class ConsoleSessionsController < ApplicationController
|
5
|
-
rescue_from ConsoleSession::
|
5
|
+
rescue_from ConsoleSession::Unavailable do |exception|
|
6
6
|
render json: exception, status: :gone
|
7
7
|
end
|
8
8
|
|
@@ -18,8 +18,8 @@ module WebConsole
|
|
18
18
|
end
|
19
19
|
|
20
20
|
# Raised when trying to find a session that is no longer in the in-memory
|
21
|
-
# session storage.
|
22
|
-
|
21
|
+
# session storage or when the slave process exited.
|
22
|
+
Unavailable = Class.new(Error)
|
23
23
|
|
24
24
|
# Raised when an operation transition to an invalid state.
|
25
25
|
Invalid = Class.new(Error)
|
@@ -29,7 +29,7 @@ module WebConsole
|
|
29
29
|
#
|
30
30
|
# Raises WebConsole::ConsoleSession::Expired if there is no such session.
|
31
31
|
def find(pid)
|
32
|
-
INMEMORY_STORAGE[pid.to_i] or raise
|
32
|
+
INMEMORY_STORAGE[pid.to_i] or raise Unavailable, 'Session unavailable'
|
33
33
|
end
|
34
34
|
|
35
35
|
# Creates an already persisted consolse session.
|
@@ -63,14 +63,30 @@ module WebConsole
|
|
63
63
|
|
64
64
|
private
|
65
65
|
|
66
|
+
def delegate_and_call_slave_method(name, *args, &block)
|
67
|
+
# Cache the delegated method, so we don't have to hit #method_missing
|
68
|
+
# on every call.
|
69
|
+
define_singleton_method(name) do |*inner_args, &inner_block|
|
70
|
+
begin
|
71
|
+
@slave.public_send(name, *inner_args, &inner_block)
|
72
|
+
rescue ArgumentError => exc
|
73
|
+
raise Invalid, exc
|
74
|
+
rescue Slave::Closed => exc
|
75
|
+
raise Unavailable, exc
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
# Now call the method, since that's our most common use case. Delegate
|
80
|
+
# the method and than call it.
|
81
|
+
public_send(name, *args, &block)
|
82
|
+
end
|
83
|
+
|
66
84
|
def method_missing(name, *args, &block)
|
67
85
|
if @slave.respond_to?(name)
|
68
|
-
|
86
|
+
delegate_and_call_slave_method(name, *args, &block)
|
69
87
|
else
|
70
88
|
super
|
71
89
|
end
|
72
|
-
rescue ArgumentError => exc
|
73
|
-
raise Invalid, exc
|
74
90
|
end
|
75
91
|
|
76
92
|
def respond_to_missing?(name, include_all = false)
|
@@ -0,0 +1,255 @@
|
|
1
|
+
#vt100 a { text-decoration: none; }
|
2
|
+
#vt100 a:hover { cursor: pointer; }
|
3
|
+
|
4
|
+
#vt100 #cursize {
|
5
|
+
background: #EEEEEE;
|
6
|
+
border: 1px solid black;
|
7
|
+
font-family: sans-serif;
|
8
|
+
font-size: large;
|
9
|
+
font-weight: bold;
|
10
|
+
padding: 1ex;
|
11
|
+
position: absolute;
|
12
|
+
z-index: 2;
|
13
|
+
}
|
14
|
+
|
15
|
+
#vt100 pre { margin: 0; }
|
16
|
+
}
|
17
|
+
|
18
|
+
#vt100 pre pre {
|
19
|
+
overflow: hidden;
|
20
|
+
}
|
21
|
+
|
22
|
+
#vt100 #scrollable {
|
23
|
+
overflow-x: hidden;
|
24
|
+
overflow-y: scroll;
|
25
|
+
position: relative;
|
26
|
+
padding: 1px;
|
27
|
+
}
|
28
|
+
|
29
|
+
#vt100 #console, #vt100 #alt_console, #vt100 #cursor, #vt100 #lineheight, #vt100 .hidden pre {
|
30
|
+
font-family: "DejaVu Sans Mono", "Everson Mono", FreeMono, "Andale Mono", monospace;
|
31
|
+
}
|
32
|
+
|
33
|
+
#vt100 #lineheight {
|
34
|
+
position: absolute;
|
35
|
+
visibility: hidden;
|
36
|
+
}
|
37
|
+
|
38
|
+
#vt100 #cursor {
|
39
|
+
position: absolute;
|
40
|
+
left: 0px;
|
41
|
+
top: 0px;
|
42
|
+
overflow: hidden;
|
43
|
+
z-index: 1;
|
44
|
+
}
|
45
|
+
|
46
|
+
#vt100 #cursor.bright {
|
47
|
+
background-color: black;
|
48
|
+
color: white;
|
49
|
+
}
|
50
|
+
|
51
|
+
#vt100 #cursor.dim {
|
52
|
+
visibility: hidden;
|
53
|
+
}
|
54
|
+
|
55
|
+
#vt100 #cursor.inactive {
|
56
|
+
border: 1px solid;
|
57
|
+
margin: -1px;
|
58
|
+
}
|
59
|
+
|
60
|
+
#vt100 #padding {
|
61
|
+
visibility: hidden;
|
62
|
+
width: 1px;
|
63
|
+
height: 0px;
|
64
|
+
overflow: hidden;
|
65
|
+
}
|
66
|
+
|
67
|
+
#vt100 .hidden {
|
68
|
+
position: absolute;
|
69
|
+
top: -10000px;
|
70
|
+
left: -10000px;
|
71
|
+
width: 0px;
|
72
|
+
height: 0px;
|
73
|
+
}
|
74
|
+
|
75
|
+
#vt100 #menu {
|
76
|
+
overflow: visible;
|
77
|
+
position: absolute;
|
78
|
+
z-index: 3;
|
79
|
+
}
|
80
|
+
|
81
|
+
#vt100 #menu .popup {
|
82
|
+
background-color: #EEEEEE;
|
83
|
+
border: 1px solid black;
|
84
|
+
font-family: sans-serif;
|
85
|
+
position: absolute;
|
86
|
+
}
|
87
|
+
|
88
|
+
#vt100 #menu .popup ul {
|
89
|
+
list-style-type: none;
|
90
|
+
padding: 0px;
|
91
|
+
margin: 0px;
|
92
|
+
min-width: 10em;
|
93
|
+
}
|
94
|
+
|
95
|
+
#vt100 #menu .popup li {
|
96
|
+
padding: 3px 0.5ex 3px 0.5ex;
|
97
|
+
}
|
98
|
+
|
99
|
+
#vt100 #menu .popup li.hover {
|
100
|
+
background-color: #444444;
|
101
|
+
color: white;
|
102
|
+
}
|
103
|
+
|
104
|
+
#vt100 #menu .popup li.disabled {
|
105
|
+
color: #AAAAAA;
|
106
|
+
}
|
107
|
+
|
108
|
+
#vt100 #menu .popup hr {
|
109
|
+
margin: 0.5ex 0px 0.5ex 0px;
|
110
|
+
}
|
111
|
+
|
112
|
+
#vt100 #menu img {
|
113
|
+
margin-right: 0.5ex;
|
114
|
+
width: 1ex;
|
115
|
+
height: 1ex;
|
116
|
+
}
|
117
|
+
|
118
|
+
#vt100 #scrollable.inverted { color: #ffffff;
|
119
|
+
background-color: #000000; }
|
120
|
+
|
121
|
+
#vt100 #kbd_button {
|
122
|
+
float: left;
|
123
|
+
position: fixed;
|
124
|
+
z-index: 0;
|
125
|
+
visibility: hidden;
|
126
|
+
}
|
127
|
+
|
128
|
+
#vt100 #keyboard {
|
129
|
+
z-index: 3;
|
130
|
+
position: absolute;
|
131
|
+
}
|
132
|
+
|
133
|
+
#vt100 #keyboard .box {
|
134
|
+
font-family: sans-serif;
|
135
|
+
background-color: #cccccc;
|
136
|
+
padding: .8em;
|
137
|
+
float: left;
|
138
|
+
position: absolute;
|
139
|
+
border-radius: 10px;
|
140
|
+
-moz-border-radius: 10px;
|
141
|
+
box-shadow: 4px 4px 6px #222222;
|
142
|
+
-webkit-box-shadow: 4px 4px 6px #222222;
|
143
|
+
/* Don't set the -moz-box-shadow. It doesn't properly scale when CSS
|
144
|
+
* transforms are in effect. Once Firefox supports box-shadow, it should
|
145
|
+
* automatically do the right thing. Until then, leave shadows disabled
|
146
|
+
* for Firefox.
|
147
|
+
*/
|
148
|
+
opacity: 0.85;
|
149
|
+
-moz-opacity: 0.85;
|
150
|
+
filter: alpha(opacity=85);
|
151
|
+
}
|
152
|
+
|
153
|
+
#vt100 #keyboard .box * {
|
154
|
+
vertical-align: top;
|
155
|
+
display: inline-block;
|
156
|
+
}
|
157
|
+
|
158
|
+
#vt100 #keyboard b, #vt100 #keyboard i, #vt100 #keyboard s, #vt100 #keyboard u {
|
159
|
+
font-style: normal;
|
160
|
+
font-weight: bold;
|
161
|
+
border-radius: 5px;
|
162
|
+
-moz-border-radius: 5px;
|
163
|
+
background-color: #555555;
|
164
|
+
color: #eeeeee;
|
165
|
+
box-shadow: 2px 2px 3px #222222;
|
166
|
+
-webkit-box-shadow: 2px 2px 3px #222222;
|
167
|
+
padding: 4px;
|
168
|
+
margin: 2px;
|
169
|
+
height: 2ex;
|
170
|
+
display: inline-block;
|
171
|
+
text-align: center;
|
172
|
+
text-decoration: none;
|
173
|
+
}
|
174
|
+
|
175
|
+
#vt100 #keyboard b, #vt100 #keyboard s {
|
176
|
+
width: 2ex;
|
177
|
+
}
|
178
|
+
|
179
|
+
#vt100 #keyboard u, #vt100 #keyboard s {
|
180
|
+
visibility: hidden;
|
181
|
+
}
|
182
|
+
|
183
|
+
#vt100 #keyboard .shifted {
|
184
|
+
display: none;
|
185
|
+
}
|
186
|
+
|
187
|
+
#vt100 #keyboard .selected {
|
188
|
+
color: #888888;
|
189
|
+
background-color: #eeeeee;
|
190
|
+
box-shadow: 0px 0px 3px #222222;
|
191
|
+
-webkit-box-shadow: 0px 0px 3px #222222;
|
192
|
+
position: relative;
|
193
|
+
top: 1px;
|
194
|
+
left: 1px;
|
195
|
+
}
|
196
|
+
|
197
|
+
[if DEFINES_COLORS]
|
198
|
+
/* IE cannot properly handle "inherit" properties. So, the monochrome.css/
|
199
|
+
* color.css style sheets cannot work, if we define colors in styles.css.
|
200
|
+
*/
|
201
|
+
[else DEFINES_COLORS]
|
202
|
+
#vt100 .ansi0 { }
|
203
|
+
#vt100 .ansi1 { color: #cd0000; }
|
204
|
+
#vt100 .ansi2 { color: #00cd00; }
|
205
|
+
#vt100 .ansi3 { color: #cdcd00; }
|
206
|
+
#vt100 .ansi4 { color: #0000ee; }
|
207
|
+
#vt100 .ansi5 { color: #cd00cd; }
|
208
|
+
#vt100 .ansi6 { color: #00cdcd; }
|
209
|
+
#vt100 .ansi7 { color: #e5e5e5; }
|
210
|
+
#vt100 .ansi8 { color: #7f7f7f; }
|
211
|
+
#vt100 .ansi9 { color: #ff0000; }
|
212
|
+
#vt100 .ansi10 { color: #00ff00; }
|
213
|
+
#vt100 .ansi11 { color: #e8e800; }
|
214
|
+
#vt100 .ansi12 { color: #5c5cff; }
|
215
|
+
#vt100 .ansi13 { color: #ff00ff; }
|
216
|
+
#vt100 .ansi14 { color: #00ffff; }
|
217
|
+
#vt100 .ansi15 { color: #ffffff; }
|
218
|
+
|
219
|
+
#vt100 .bgAnsi0 { background-color: #000000; }
|
220
|
+
#vt100 .bgAnsi1 { background-color: #cd0000; }
|
221
|
+
#vt100 .bgAnsi2 { background-color: #00cd00; }
|
222
|
+
#vt100 .bgAnsi3 { background-color: #cdcd00; }
|
223
|
+
#vt100 .bgAnsi4 { background-color: #0000ee; }
|
224
|
+
#vt100 .bgAnsi5 { background-color: #cd00cd; }
|
225
|
+
#vt100 .bgAnsi6 { background-color: #00cdcd; }
|
226
|
+
#vt100 .bgAnsi7 { background-color: #e5e5e5; }
|
227
|
+
#vt100 .bgAnsi8 { background-color: #7f7f7f; }
|
228
|
+
#vt100 .bgAnsi9 { background-color: #ff0000; }
|
229
|
+
#vt100 .bgAnsi10 { background-color: #00ff00; }
|
230
|
+
#vt100 .bgAnsi11 { background-color: #e8e800; }
|
231
|
+
#vt100 .bgAnsi12 { background-color: #5c5cff; }
|
232
|
+
#vt100 .bgAnsi13 { background-color: #ff00ff; }
|
233
|
+
#vt100 .bgAnsi14 { background-color: #00ffff; }
|
234
|
+
#vt100 .bgAnsi15 { }
|
235
|
+
[endif DEFINES_COLORS]
|
236
|
+
|
237
|
+
@media print {
|
238
|
+
#vt100 .scrollback {
|
239
|
+
display: none;
|
240
|
+
}
|
241
|
+
|
242
|
+
#vt100 #reconnect, #vt100 #cursor, #vt100 #menu, #vt100 #kbd_button, #vt100 #keyboard {
|
243
|
+
visibility: hidden;
|
244
|
+
}
|
245
|
+
|
246
|
+
#vt100 #scrollable {
|
247
|
+
overflow: hidden;
|
248
|
+
}
|
249
|
+
|
250
|
+
#vt100 #console, #vt100 #alt_console {
|
251
|
+
overflow: hidden;
|
252
|
+
width: 1000000ex;
|
253
|
+
}
|
254
|
+
}
|
255
|
+
|