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
0139b256
Commit
0139b256
authored
Apr 03, 2012
by
Anthony Young
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify nova-novncproxy related logic.
* Don't clobber default host/port
parent
4c75210a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
vnc_auto.html
vnc_auto.html
+13
-8
No files found.
vnc_auto.html
View file @
0139b256
...
...
@@ -90,9 +90,20 @@
$D
(
'sendCtrlAltDelButton'
).
onclick
=
sendCtrlAltDel
;
document
.
title
=
unescape
(
WebUtil
.
getQueryVar
(
'title'
,
'noVNC'
));
host
=
WebUtil
.
getQueryVar
(
'host'
,
null
);
port
=
WebUtil
.
getQueryVar
(
'port'
,
null
);
// If a token variable is passed in, set the parameter in a cookie.
// This is used by nova-novncproxy.
token
=
WebUtil
.
getQueryVar
(
'token'
,
null
);
host
=
window
.
location
.
hostname
;
port
=
window
.
location
.
port
;
if
(
token
)
{
// If token is set, we are using nova-novncproxy.
// Use host and port of server that served this file.
host
=
window
.
location
.
hostname
;
port
=
window
.
location
.
port
;
WebUtil
.
createCookie
(
'token'
,
token
,
1
)
}
password
=
WebUtil
.
getQueryVar
(
'password'
,
''
);
path
=
WebUtil
.
getQueryVar
(
'path'
,
'websockify'
);
if
((
!
host
)
||
(
!
port
))
{
...
...
@@ -110,12 +121,6 @@
'view_only'
:
WebUtil
.
getQueryVar
(
'view_only'
,
false
),
'updateState'
:
updateState
,
'onPasswordRequired'
:
passwordRequired
});
/* If a token variable is passed in, set the parameter in a cookie. This is
used by nova-novncproxy. */
if
(
token
)
{
WebUtil
.
createCookie
(
'token'
,
token
,
1
)
}
rfb
.
connect
(
host
,
port
,
password
,
path
);
};
</script>
...
...
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