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
31cd039b
Commit
31cd039b
authored
Sep 16, 2011
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve handling of migrated VMs
parent
ffb1b69b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
48 additions
and
19 deletions
+48
-19
Workspace.js
www/manager/Workspace.js
+7
-0
ConfigPanel.js
www/manager/panel/ConfigPanel.js
+2
-1
Migrate.js
www/manager/qemu/Migrate.js
+0
-6
Summary.js
www/manager/qemu/Summary.js
+12
-3
ResourceTree.js
www/manager/tree/ResourceTree.js
+27
-9
No files found.
www/manager/Workspace.js
View file @
31cd039b
...
...
@@ -188,6 +188,12 @@ Ext.define('PVE.StdWorkspace', {
tree
.
selectById
(
nodeid
);
},
check_vm_migration
:
function
(
record
)
{
var
me
=
this
;
var
tree
=
me
.
down
(
'
pveResourceTree
'
);
tree
.
check_vm_migration
(
record
);
},
onLogin
:
function
(
loginData
)
{
var
me
=
this
;
...
...
@@ -257,6 +263,7 @@ Ext.define('PVE.StdWorkspace', {
showSearch
:
(
n
.
data
.
id
===
'
root
'
)
||
Ext
.
isDefined
(
n
.
data
.
groupbyid
),
pveSelNode
:
n
,
workspace
:
me
,
viewFilter
:
selview
.
getViewFilter
()
};
}
...
...
www/manager/panel/ConfigPanel.js
View file @
31cd039b
...
...
@@ -22,10 +22,11 @@ Ext.define('PVE.panel.Config', {
defaults
:
{}
});
// pass
rstor
e, pveSelNode and viewFilter to all children
// pass
workspac
e, pveSelNode and viewFilter to all children
Ext
.
apply
(
me
.
defaults
,
{
pveSelNode
:
me
.
pveSelNode
,
viewFilter
:
me
.
viewFilter
,
workspace
:
me
.
workspace
,
border
:
false
});
...
...
www/manager/qemu/Migrate.js
View file @
31cd039b
...
...
@@ -21,8 +21,6 @@ Ext.define('PVE.qemu.Migrate', {
});
win
.
show
();
me
.
close
();
me
.
workspace
.
selectById
(
'
root
'
);
}
});
},
...
...
@@ -40,10 +38,6 @@ Ext.define('PVE.qemu.Migrate', {
throw
"
no VM ID specified
"
;
}
if
(
!
me
.
workspace
)
{
throw
"
no Workspace specified
"
;
}
me
.
formPanel
=
Ext
.
create
(
'
Ext.form.Panel
'
,
{
bodyPadding
:
10
,
border
:
false
,
...
...
www/manager/qemu/Summary.js
View file @
31cd039b
...
...
@@ -15,6 +15,10 @@ Ext.define('PVE.qemu.Summary', {
throw
"
no VM ID specified
"
;
}
if
(
!
me
.
workspace
)
{
throw
"
no workspace specified
"
;
}
var
statusview
=
Ext
.
create
(
'
PVE.qemu.StatusView
'
,
{
title
:
'
Status
'
,
pveSelNode
:
me
.
pveSelNode
,
...
...
@@ -65,7 +69,6 @@ Ext.define('PVE.qemu.Summary', {
handler
:
function
()
{
var
win
=
Ext
.
create
(
'
PVE.qemu.Migrate
'
,
{
pveSelNode
:
me
.
pveSelNode
,
workspace
:
me
.
up
(
'
pveStdWorkspace
'
)
});
win
.
show
();
}
...
...
@@ -138,8 +141,14 @@ Ext.define('PVE.qemu.Summary', {
});
me
.
mon
(
rstore
,
'
load
'
,
function
(
s
,
records
,
success
)
{
var
rec
=
s
.
data
.
get
(
'
status
'
);
var
status
=
rec
?
rec
.
data
.
value
:
'
unknown
'
;
var
status
;
if
(
!
success
)
{
me
.
workspace
.
check_vm_migration
(
me
.
pveSelNode
);
status
=
'
unknown
'
;
}
else
{
var
rec
=
s
.
data
.
get
(
'
status
'
);
status
=
rec
?
rec
.
data
.
value
:
'
unknown
'
;
}
tbar
.
down
(
'
#start
'
).
setDisabled
(
status
===
'
running
'
);
tbar
.
down
(
'
#reset
'
).
setDisabled
(
status
!==
'
running
'
);
...
...
www/manager/tree/ResourceTree.js
View file @
31cd039b
...
...
@@ -330,6 +330,18 @@ Ext.define('PVE.tree.ResourceTree', {
pdata
.
dataIndex
=
{};
me
.
getSelectionModel
().
deselectAll
();
},
selectExpand
:
function
(
node
)
{
var
sm
=
me
.
getSelectionModel
();
if
(
!
sm
.
isSelected
(
node
))
{
sm
.
select
(
node
);
var
cn
=
node
;
while
(
!!
(
cn
=
cn
.
parentNode
))
{
if
(
!
cn
.
isExpanded
())
{
cn
.
expand
();
}
}
}
},
selectById
:
function
(
nodeid
)
{
var
rootnode
=
me
.
store
.
getRootNode
();
var
sm
=
me
.
getSelectionModel
();
...
...
@@ -340,15 +352,21 @@ Ext.define('PVE.tree.ResourceTree', {
node
=
rootnode
.
findChild
(
'
id
'
,
nodeid
,
true
);
}
if
(
node
)
{
if
(
!
sm
.
isSelected
(
node
))
{
sm
.
select
(
node
);
var
cn
=
node
;
while
(
!!
(
cn
=
cn
.
parentNode
))
{
if
(
!
cn
.
isExpanded
())
{
cn
.
expand
();
}
}
}
me
.
selectExpand
(
node
);
}
},
check_vm_migration
:
function
(
record
)
{
if
(
!
(
record
.
data
.
type
===
'
qemu
'
||
record
.
data
.
type
===
'
openvz
'
))
{
throw
"
not a vm type
"
;
}
var
rootnode
=
me
.
store
.
getRootNode
();
var
node
=
rootnode
.
findChild
(
'
id
'
,
record
.
data
.
id
,
true
);
if
(
node
&&
node
.
data
.
type
===
record
.
data
.
type
&&
node
.
data
.
node
!==
record
.
data
.
node
)
{
// defer select (else we get strange errors)
Ext
.
defer
(
function
()
{
me
.
selectExpand
(
node
)},
100
,
me
);
}
},
applyState
:
function
(
state
)
{
...
...
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