Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pve-manager
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
pve-manager
Commits
251f2f6b
Commit
251f2f6b
authored
Jun 25, 2014
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use novnc as default viewer
parent
cccb3b91
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
24 deletions
+21
-24
Utils.js
www/manager/Utils.js
+11
-4
ConsoleButton.js
www/manager/button/ConsoleButton.js
+9
-19
OptionView.js
www/manager/dc/OptionView.js
+1
-1
No files found.
www/manager/Utils.js
View file @
251f2f6b
...
@@ -422,11 +422,13 @@ Ext.define('PVE.Utils', { statics: {
...
@@ -422,11 +422,13 @@ Ext.define('PVE.Utils', { statics: {
render_console_viewer
:
function
(
value
)
{
render_console_viewer
:
function
(
value
)
{
if
(
!
value
)
{
if
(
!
value
)
{
return
PVE
.
Utils
.
defaultText
+
'
(
Java VNC Applet
)
'
;
return
PVE
.
Utils
.
defaultText
+
'
(
HTML5
)
'
;
}
else
if
(
value
===
'
applet
'
)
{
}
else
if
(
value
===
'
applet
'
)
{
return
'
Java VNC Applet
'
;
return
'
Java VNC Applet
'
;
}
else
if
(
value
===
'
vv
'
)
{
}
else
if
(
value
===
'
vv
'
)
{
return
'
SPICE (remote-viewer)
'
;
return
'
SPICE (remote-viewer)
'
;
}
else
if
(
value
===
'
html5
'
)
{
return
'
HTML5 (noVNC)
'
;
}
else
{
}
else
{
return
value
;
return
value
;
}
}
...
@@ -1101,10 +1103,15 @@ Ext.define('PVE.Utils', { statics: {
...
@@ -1101,10 +1103,15 @@ Ext.define('PVE.Utils', { statics: {
nw
.
focus
();
nw
.
focus
();
},
},
defaultViewer
:
function
(){
defaultViewer
:
function
(
allowSpice
)
{
return
PVE
.
VersionInfo
.
console
||
'
applet
'
;
var
vncdefault
=
'
html5
'
;
},
var
dv
=
PVE
.
VersionInfo
.
console
||
vncdefault
;
if
(
dv
===
'
vv
'
&&
!
allowSpice
)
{
dv
=
vncdefault
;
}
return
dv
;
},
openSpiceViewer
:
function
(
url
,
params
){
openSpiceViewer
:
function
(
url
,
params
){
...
...
www/manager/button/ConsoleButton.js
View file @
251f2f6b
...
@@ -6,7 +6,7 @@ Ext.define('PVE.button.ConsoleButton', {
...
@@ -6,7 +6,7 @@ Ext.define('PVE.button.ConsoleButton', {
consoleName
:
undefined
,
consoleName
:
undefined
,
enableSpice
:
undefined
,
enableSpice
:
true
,
nodename
:
undefined
,
nodename
:
undefined
,
...
@@ -19,20 +19,6 @@ Ext.define('PVE.button.ConsoleButton', {
...
@@ -19,20 +19,6 @@ Ext.define('PVE.button.ConsoleButton', {
me
.
spiceMenu
.
setDisabled
(
!
enable
);
me
.
spiceMenu
.
setDisabled
(
!
enable
);
},
},
getEnableSpice
:
function
()
{
var
me
=
this
;
if
(
me
.
enableSpice
===
undefined
)
{
if
(
PVE
.
VersionInfo
.
console
&&
PVE
.
VersionInfo
.
console
===
'
vv
'
)
{
return
true
;
}
else
{
return
false
;
}
}
else
{
return
me
.
enableSpice
;
}
},
initComponent
:
function
()
{
initComponent
:
function
()
{
var
me
=
this
;
var
me
=
this
;
...
@@ -107,11 +93,15 @@ Ext.define('PVE.button.ConsoleButton', {
...
@@ -107,11 +93,15 @@ Ext.define('PVE.button.ConsoleButton', {
Ext
.
apply
(
me
,
{
Ext
.
apply
(
me
,
{
handler
:
function
()
{
handler
:
function
()
{
if
(
!
me
.
getEnableSpice
()
||
var
dv
=
PVE
.
Utils
.
defaultViewer
(
me
.
enableSpice
);
(
PVE
.
VersionInfo
.
console
&&
PVE
.
VersionInfo
.
console
===
'
applet
'
))
{
if
(
dv
===
'
vv
'
)
{
create_vnc_console
();
}
else
{
create_spice_console
();
create_spice_console
();
}
else
if
(
dv
===
'
applet
'
)
{
create_vnc_console
(
0
);
}
else
if
(
dv
===
'
html5
'
)
{
create_vnc_console
(
1
);
}
else
{
throw
"
unknown defaultViewer
"
;
}
}
},
},
menu
:
new
Ext
.
menu
.
Menu
({
menu
:
new
Ext
.
menu
.
Menu
({
...
...
www/manager/dc/OptionView.js
View file @
251f2f6b
...
@@ -53,7 +53,7 @@ Ext.define('PVE.dc.ConsoleViewerEdit', {
...
@@ -53,7 +53,7 @@ Ext.define('PVE.dc.ConsoleViewerEdit', {
var
data
=
[];
var
data
=
[];
Ext
.
Array
.
each
([
''
,
'
applet
'
,
'
vv
'
],
function
(
value
)
{
Ext
.
Array
.
each
([
''
,
'
applet
'
,
'
vv
'
,
'
html5
'
],
function
(
value
)
{
data
.
push
([
value
,
PVE
.
Utils
.
render_console_viewer
(
value
)]);
data
.
push
([
value
,
PVE
.
Utils
.
render_console_viewer
(
value
)]);
});
});
...
...
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