Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
N
noVNC
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rasky
noVNC
Commits
6209639f
Commit
6209639f
authored
13 years ago
by
Joel Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add WebSocket URL path to UI settings.
parent
7cd6118c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
6 deletions
+15
-6
base.css
include/base.css
+3
-0
rfb.js
include/rfb.js
+4
-4
ui.js
include/ui.js
+7
-2
vnc.html
vnc.html
+1
-0
No files found.
include/base.css
View file @
6209639f
...
...
@@ -36,6 +36,9 @@ html {
#noVNC_connectTimeout
{
width
:
30px
;
}
#noVNC_path
{
width
:
100px
;
}
#noVNC_connect_button
{
width
:
110px
;
float
:
right
;
...
...
This diff is collapsed.
Click to expand it.
include/rfb.js
View file @
6209639f
...
...
@@ -35,7 +35,7 @@ var that = {}, // Public API methods
rfb_host
=
''
,
rfb_port
=
5900
,
rfb_password
=
''
,
rfb_
uri
=
''
,
rfb_
path
=
''
,
rfb_state
=
'disconnected'
,
rfb_version
=
0
,
...
...
@@ -273,7 +273,7 @@ function connect() {
}
else
{
uri
=
"ws://"
;
}
uri
+=
rfb_host
+
":"
+
rfb_port
+
"/"
+
rfb_
uri
;
uri
+=
rfb_host
+
":"
+
rfb_port
+
"/"
+
rfb_
path
;
Util
.
Info
(
"connecting to "
+
uri
);
ws
.
open
(
uri
);
...
...
@@ -1526,13 +1526,13 @@ clientCutText = function(text) {
// Public API interface functions
//
that
.
connect
=
function
(
host
,
port
,
password
,
uri
)
{
that
.
connect
=
function
(
host
,
port
,
password
,
path
)
{
//Util.Debug(">> connect");
rfb_host
=
host
;
rfb_port
=
port
;
rfb_password
=
(
password
!==
undefined
)
?
password
:
""
;
rfb_
uri
=
(
uri
!==
undefined
)
?
uri
:
""
;
rfb_
path
=
(
path
!==
undefined
)
?
path
:
""
;
if
((
!
rfb_host
)
||
(
!
rfb_port
))
{
return
fail
(
"Must set host and port"
);
...
...
This diff is collapsed.
Click to expand it.
include/ui.js
View file @
6209639f
...
...
@@ -52,6 +52,7 @@ load: function() {
UI
.
initSetting
(
'cursor'
,
false
);
UI
.
initSetting
(
'shared'
,
true
);
UI
.
initSetting
(
'connectTimeout'
,
2
);
UI
.
initSetting
(
'path'
,
''
);
UI
.
rfb
=
RFB
({
'target'
:
$D
(
'noVNC_canvas'
),
'onUpdateState'
:
UI
.
updateState
,
...
...
@@ -246,6 +247,7 @@ toggleSettingsPanel: function() {
UI
.
updateSetting
(
'clip'
);
UI
.
updateSetting
(
'shared'
);
UI
.
updateSetting
(
'connectTimeout'
);
UI
.
updateSetting
(
'path'
);
UI
.
updateSetting
(
'stylesheet'
);
UI
.
updateSetting
(
'logging'
);
...
...
@@ -283,6 +285,7 @@ settingsApply: function() {
UI
.
saveSetting
(
'clip'
);
UI
.
saveSetting
(
'shared'
);
UI
.
saveSetting
(
'connectTimeout'
);
UI
.
saveSetting
(
'path'
);
UI
.
saveSetting
(
'stylesheet'
);
UI
.
saveSetting
(
'logging'
);
...
...
@@ -394,6 +397,7 @@ updateVisualState: function() {
}
$D
(
'noVNC_shared'
).
disabled
=
connected
;
$D
(
'noVNC_connectTimeout'
).
disabled
=
connected
;
$D
(
'noVNC_path'
).
disabled
=
connected
;
if
(
connected
)
{
UI
.
setViewClip
();
...
...
@@ -435,7 +439,7 @@ clipReceive: function(rfb, text) {
connect
:
function
()
{
var
host
,
port
,
password
;
var
host
,
port
,
password
,
path
;
UI
.
closeSettingsMenu
();
UI
.
toggleConnectPanel
();
...
...
@@ -443,6 +447,7 @@ connect: function() {
host
=
$D
(
'noVNC_host'
).
value
;
port
=
$D
(
'noVNC_port'
).
value
;
password
=
$D
(
'noVNC_password'
).
value
;
path
=
$D
(
'noVNC_path'
).
value
;
if
((
!
host
)
||
(
!
port
))
{
throw
(
"Must set host and port"
);
}
...
...
@@ -453,7 +458,7 @@ connect: function() {
UI
.
rfb
.
set_shared
(
UI
.
getSetting
(
'shared'
));
UI
.
rfb
.
set_connectTimeout
(
UI
.
getSetting
(
'connectTimeout'
));
UI
.
rfb
.
connect
(
host
,
port
,
password
);
UI
.
rfb
.
connect
(
host
,
port
,
password
,
path
);
//Close dialog.
setTimeout
(
UI
.
setBarPosition
,
100
);
$D
(
'noVNC_logo'
).
style
.
display
=
"none"
;
...
...
This diff is collapsed.
Click to expand it.
vnc.html
View file @
6209639f
...
...
@@ -122,6 +122,7 @@
<li><input
id=
"noVNC_clip"
type=
"checkbox"
>
Clip to window
</li>
<li><input
id=
"noVNC_shared"
type=
"checkbox"
>
Shared Mode
</li>
<li><input
id=
"noVNC_connectTimeout"
type=
"input"
>
Connect Timeout (s)
</li>
<li><input
id=
"noVNC_path"
type=
"input"
>
Path
</li>
<hr>
<!-- Stylesheet selection dropdown -->
<li><label><strong>
Style:
</strong>
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment