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
47b80718
Commit
47b80718
authored
Nov 29, 2011
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
display VM name in console title window
parent
5e8c9a28
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
42 additions
and
25 deletions
+42
-25
Utils.js
www/manager/Utils.js
+3
-2
VNCConsole.js
www/manager/VNCConsole.js
+2
-2
Workspace.js
www/manager/Workspace.js
+9
-1
CmdMenu.js
www/manager/openvz/CmdMenu.js
+10
-6
Config.js
www/manager/openvz/Config.js
+3
-2
CmdMenu.js
www/manager/qemu/CmdMenu.js
+10
-6
Config.js
www/manager/qemu/Config.js
+3
-2
ResourceTree.js
www/manager/tree/ResourceTree.js
+2
-4
No files found.
www/manager/Utils.js
View file @
47b80718
...
...
@@ -695,10 +695,11 @@ Ext.define('PVE.Utils', { statics: {
return
PVE
.
Utils
.
format_task_description
(
type
,
id
);
},
openConoleWindow
:
function
(
vmtype
,
vmid
,
nodename
)
{
openConoleWindow
:
function
(
vmtype
,
vmid
,
nodename
,
vmname
)
{
var
url
=
Ext
.
urlEncode
({
console
:
vmtype
,
// kvm
or openvz
console
:
vmtype
,
// kvm
, openvz or shell
vmid
:
vmid
,
vmname
:
vmname
,
node
:
nodename
});
var
nw
=
window
.
open
(
"
?
"
+
url
,
'
_blank
'
,
...
...
www/manager/VNCConsole.js
View file @
47b80718
...
...
@@ -320,7 +320,7 @@ Ext.define('PVE.KVMConsole', {
{
text
:
gettext
(
'
Console
'
),
handler
:
function
()
{
PVE
.
Utils
.
openConoleWindow
(
'
kvm
'
,
me
.
vmid
,
me
.
nodename
);
PVE
.
Utils
.
openConoleWindow
(
'
kvm
'
,
me
.
vmid
,
me
.
nodename
,
me
.
vmname
);
}
}
];
...
...
@@ -414,7 +414,7 @@ Ext.define('PVE.OpenVZConsole', {
{
text
:
gettext
(
'
Console
'
),
handler
:
function
()
{
PVE
.
Utils
.
openConoleWindow
(
'
openvz
'
,
me
.
vmid
,
me
.
nodename
);
PVE
.
Utils
.
openConoleWindow
(
'
openvz
'
,
me
.
vmid
,
me
.
nodename
,
me
.
vmname
);
}
}
];
...
...
www/manager/Workspace.js
View file @
47b80718
...
...
@@ -119,22 +119,30 @@ Ext.define('PVE.ConsoleWorkspace', {
var
content
;
if
(
consoleType
===
'
kvm
'
)
{
me
.
title
=
"
VM
"
+
param
.
vmid
;
if
(
param
.
vmname
)
{
me
.
title
+=
"
('
"
+
param
.
vmname
+
"
')
"
;
}
content
=
{
xtype
:
'
pveKVMConsole
'
,
vmid
:
param
.
vmid
,
nodename
:
param
.
node
,
vmname
:
param
.
vmname
,
toplevel
:
true
};
}
else
if
(
consoleType
===
'
openvz
'
)
{
me
.
title
=
"
CT
"
+
param
.
vmid
;
if
(
param
.
vmname
)
{
me
.
title
+=
"
('
"
+
param
.
vmname
+
"
')
"
;
}
content
=
{
xtype
:
'
pveOpenVZConsole
'
,
vmid
:
param
.
vmid
,
nodename
:
param
.
node
,
vmname
:
param
.
vmname
,
toplevel
:
true
};
}
else
if
(
consoleType
===
'
shell
'
)
{
me
.
title
=
"
node
"
+
param
.
node
+
"
- Proxmox Shell
"
;
me
.
title
=
"
node
'
"
+
param
.
node
+
"
'
- Proxmox Shell
"
;
content
=
{
xtype
:
'
pveShell
'
,
nodename
:
param
.
node
,
...
...
www/manager/openvz/CmdMenu.js
View file @
47b80718
...
...
@@ -4,18 +4,22 @@ Ext.define('PVE.openvz.CmdMenu', {
initComponent
:
function
()
{
var
me
=
this
;
if
(
!
me
.
nodename
)
{
var
nodename
=
me
.
pveSelNode
.
data
.
node
;
if
(
!
nodename
)
{
throw
"
no node name specified
"
;
}
if
(
!
me
.
vmid
)
{
var
vmid
=
me
.
pveSelNode
.
data
.
vmid
;
if
(
!
vmid
)
{
throw
"
no VM ID specified
"
;
}
var
vmname
=
me
.
pveSelNode
.
data
.
name
;
var
vm_command
=
function
(
cmd
,
params
)
{
PVE
.
Utils
.
API2Request
({
params
:
params
,
url
:
'
/nodes/
'
+
me
.
nodename
+
'
/openvz/
'
+
me
.
vmid
+
"
/status/
"
+
cmd
,
url
:
'
/nodes/
'
+
nodename
+
'
/openvz/
'
+
vmid
+
"
/status/
"
+
cmd
,
method
:
'
POST
'
,
failure
:
function
(
response
,
opts
)
{
Ext
.
Msg
.
alert
(
'
Error
'
,
response
.
htmlStatus
);
...
...
@@ -23,7 +27,7 @@ Ext.define('PVE.openvz.CmdMenu', {
});
};
me
.
title
=
"
CT
"
+
me
.
vmid
;
me
.
title
=
"
CT
"
+
vmid
;
me
.
items
=
[
{
...
...
@@ -37,7 +41,7 @@ Ext.define('PVE.openvz.CmdMenu', {
text
:
gettext
(
'
Shutdown
'
),
icon
:
'
/pve2/images/stop.png
'
,
handler
:
function
()
{
var
msg
=
Ext
.
String
.
format
(
gettext
(
"
Do you really want to shutdown VM {0}?
"
),
me
.
vmid
);
var
msg
=
Ext
.
String
.
format
(
gettext
(
"
Do you really want to shutdown VM {0}?
"
),
vmid
);
Ext
.
Msg
.
confirm
(
gettext
(
'
Confirm
'
),
msg
,
function
(
btn
)
{
if
(
btn
!==
'
yes
'
)
{
return
;
...
...
@@ -51,7 +55,7 @@ Ext.define('PVE.openvz.CmdMenu', {
text
:
gettext
(
'
Console
'
),
icon
:
'
/pve2/images/display.png
'
,
handler
:
function
()
{
PVE
.
Utils
.
openConoleWindow
(
'
openvz
'
,
me
.
vmid
,
me
.
node
name
);
PVE
.
Utils
.
openConoleWindow
(
'
openvz
'
,
vmid
,
nodename
,
vm
name
);
}
}
];
...
...
www/manager/openvz/Config.js
View file @
47b80718
...
...
@@ -82,14 +82,15 @@ Ext.define('PVE.openvz.Config', {
}
});
var
vmname
=
me
.
pveSelNode
.
data
.
name
;
var
consoleBtn
=
Ext
.
create
(
'
Ext.Button
'
,
{
text
:
gettext
(
'
Console
'
),
handler
:
function
()
{
PVE
.
Utils
.
openConoleWindow
(
'
openvz
'
,
vmid
,
nodename
);
PVE
.
Utils
.
openConoleWindow
(
'
openvz
'
,
vmid
,
nodename
,
vmname
);
}
});
var
vmname
=
me
.
pveSelNode
.
data
.
name
;
var
descr
=
vmid
+
"
(
"
+
(
vmname
?
"
'
"
+
vmname
+
"
'
"
:
"
'CT
"
+
vmid
+
"
'
"
)
+
"
)
"
;
Ext
.
apply
(
me
,
{
...
...
www/manager/qemu/CmdMenu.js
View file @
47b80718
...
...
@@ -4,18 +4,22 @@ Ext.define('PVE.qemu.CmdMenu', {
initComponent
:
function
()
{
var
me
=
this
;
if
(
!
me
.
nodename
)
{
var
nodename
=
me
.
pveSelNode
.
data
.
node
;
if
(
!
nodename
)
{
throw
"
no node name specified
"
;
}
if
(
!
me
.
vmid
)
{
var
vmid
=
me
.
pveSelNode
.
data
.
vmid
;
if
(
!
vmid
)
{
throw
"
no VM ID specified
"
;
}
var
vmname
=
me
.
pveSelNode
.
data
.
name
;
var
vm_command
=
function
(
cmd
,
params
)
{
PVE
.
Utils
.
API2Request
({
params
:
params
,
url
:
'
/nodes/
'
+
me
.
nodename
+
'
/qemu/
'
+
me
.
vmid
+
"
/status/
"
+
cmd
,
url
:
'
/nodes/
'
+
nodename
+
'
/qemu/
'
+
vmid
+
"
/status/
"
+
cmd
,
method
:
'
POST
'
,
failure
:
function
(
response
,
opts
)
{
Ext
.
Msg
.
alert
(
'
Error
'
,
response
.
htmlStatus
);
...
...
@@ -23,7 +27,7 @@ Ext.define('PVE.qemu.CmdMenu', {
});
};
me
.
title
=
"
VM
"
+
me
.
vmid
;
me
.
title
=
"
VM
"
+
vmid
;
me
.
items
=
[
{
...
...
@@ -37,7 +41,7 @@ Ext.define('PVE.qemu.CmdMenu', {
text
:
gettext
(
'
Shutdown
'
),
icon
:
'
/pve2/images/stop.png
'
,
handler
:
function
()
{
var
msg
=
Ext
.
String
.
format
(
gettext
(
"
Do you really want to shutdown VM {0}?
"
),
me
.
vmid
);
var
msg
=
Ext
.
String
.
format
(
gettext
(
"
Do you really want to shutdown VM {0}?
"
),
vmid
);
Ext
.
Msg
.
confirm
(
gettext
(
'
Confirm
'
),
msg
,
function
(
btn
)
{
if
(
btn
!==
'
yes
'
)
{
return
;
...
...
@@ -51,7 +55,7 @@ Ext.define('PVE.qemu.CmdMenu', {
text
:
gettext
(
'
Console
'
),
icon
:
'
/pve2/images/display.png
'
,
handler
:
function
()
{
PVE
.
Utils
.
openConoleWindow
(
'
kvm
'
,
me
.
vmid
,
me
.
node
name
);
PVE
.
Utils
.
openConoleWindow
(
'
kvm
'
,
vmid
,
nodename
,
vm
name
);
}
}
];
...
...
www/manager/qemu/Config.js
View file @
47b80718
...
...
@@ -90,14 +90,15 @@ Ext.define('PVE.qemu.Config', {
}
});
var
vmname
=
me
.
pveSelNode
.
data
.
name
;
var
consoleBtn
=
Ext
.
create
(
'
Ext.Button
'
,
{
text
:
gettext
(
'
Console
'
),
handler
:
function
()
{
PVE
.
Utils
.
openConoleWindow
(
'
kvm
'
,
vmid
,
nodename
);
PVE
.
Utils
.
openConoleWindow
(
'
kvm
'
,
vmid
,
nodename
,
vmname
);
}
});
var
vmname
=
me
.
pveSelNode
.
data
.
name
;
var
descr
=
vmid
+
"
(
"
+
(
vmname
?
"
'
"
+
vmname
+
"
'
"
:
"
'VM
"
+
vmid
+
"
'
"
)
+
"
)
"
;
Ext
.
apply
(
me
,
{
...
...
www/manager/tree/ResourceTree.js
View file @
47b80718
...
...
@@ -329,13 +329,11 @@ Ext.define('PVE.tree.ResourceTree', {
if
(
record
.
data
.
type
===
'
qemu
'
)
{
menu
=
Ext
.
create
(
'
PVE.qemu.CmdMenu
'
,
{
vmid
:
record
.
data
.
vmid
,
nodename
:
record
.
data
.
node
pveSelNode
:
record
});
}
else
if
(
record
.
data
.
type
===
'
openvz
'
)
{
menu
=
Ext
.
create
(
'
PVE.openvz.CmdMenu
'
,
{
vmid
:
record
.
data
.
vmid
,
nodename
:
record
.
data
.
node
pveSelNode
:
record
});
}
else
{
return
;
...
...
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