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
3eaa25db
Commit
3eaa25db
authored
Sep 15, 2011
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implemente migrate UI
parent
26bcb13b
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
114 additions
and
1 deletion
+114
-1
Makefile
www/manager/Makefile
+1
-0
Migrate.js
www/manager/qemu/Migrate.js
+95
-0
Summary.js
www/manager/qemu/Summary.js
+11
-0
TaskViewer.js
www/manager/window/TaskViewer.js
+7
-1
No files found.
www/manager/Makefile
View file @
3eaa25db
...
@@ -63,6 +63,7 @@ JSSRC= \
...
@@ -63,6 +63,7 @@ JSSRC= \
node/Tasks.js
\
node/Tasks.js
\
node/Config.js
\
node/Config.js
\
qemu/StatusView.js
\
qemu/StatusView.js
\
qemu/Migrate.js
\
qemu/Summary.js
\
qemu/Summary.js
\
qemu/OSTypeEdit.js
\
qemu/OSTypeEdit.js
\
qemu/ProcessorEdit.js
\
qemu/ProcessorEdit.js
\
...
...
www/manager/qemu/Migrate.js
0 → 100644
View file @
3eaa25db
Ext
.
define
(
'
PVE.qemu.Migrate
'
,
{
extend
:
'
Ext.window.Window
'
,
resizable
:
false
,
migrate
:
function
(
vmid
,
nodename
,
target
,
online
)
{
var
me
=
this
;
PVE
.
Utils
.
API2Request
({
params
:
{
target
:
target
,
online
:
online
},
url
:
'
/nodes/
'
+
nodename
+
'
/qemu/
'
+
vmid
+
"
/migrate
"
,
waitMsgTarget
:
me
,
method
:
'
POST
'
,
failure
:
function
(
response
,
opts
)
{
Ext
.
Msg
.
alert
(
'
Error
'
,
response
.
htmlStatus
);
},
success
:
function
(
response
,
options
)
{
var
upid
=
response
.
result
.
data
;
var
win
=
Ext
.
create
(
'
PVE.window.TaskViewer
'
,
{
upid
:
upid
});
win
.
show
();
me
.
close
();
me
.
workspace
.
selectById
(
'
root
'
);
}
});
},
initComponent
:
function
()
{
var
me
=
this
;
var
nodename
=
me
.
pveSelNode
.
data
.
node
;
if
(
!
nodename
)
{
throw
"
no node name specified
"
;
}
var
vmid
=
me
.
pveSelNode
.
data
.
vmid
;
if
(
!
vmid
)
{
throw
"
no VM ID specified
"
;
}
if
(
!
me
.
workspace
)
{
throw
"
no Workspace specified
"
;
}
me
.
formPanel
=
Ext
.
create
(
'
Ext.form.Panel
'
,
{
bodyPadding
:
10
,
border
:
false
,
fieldDefaults
:
{
labelWidth
:
100
,
anchor
:
'
100%
'
},
items
:
[
{
xtype
:
'
PVE.form.NodeSelector
'
,
name
:
'
target
'
,
fieldLabel
:
'
Target node
'
,
allowBlank
:
false
,
onlineValidator
:
true
},
{
xtype
:
'
pvecheckbox
'
,
name
:
'
online
'
,
uncheckedValue
:
0
,
defaultValue
:
0
,
fieldLabel
:
'
Online
'
}
]
});
var
form
=
me
.
formPanel
.
getForm
();
var
submitBtn
=
Ext
.
create
(
'
Ext.Button
'
,
{
text
:
'
Migrate
'
,
handler
:
function
()
{
var
values
=
form
.
getValues
();
console
.
log
(
"
STARTMIGRATE
"
+
vmid
+
"
"
+
values
.
target
+
"
"
+
values
.
online
);
me
.
migrate
(
vmid
,
nodename
,
values
.
target
,
values
.
online
);
}
});
Ext
.
apply
(
me
,
{
title
:
"
Migrate KVM
"
+
vmid
,
width
:
350
,
modal
:
true
,
layout
:
'
auto
'
,
border
:
false
,
items
:
[
me
.
formPanel
],
buttons
:
[
submitBtn
],
});
me
.
callParent
();
}
});
www/manager/qemu/Summary.js
View file @
3eaa25db
...
@@ -59,6 +59,17 @@ Ext.define('PVE.qemu.Summary', {
...
@@ -59,6 +59,17 @@ Ext.define('PVE.qemu.Summary', {
});
});
}
}
},
},
{
itemId
:
'
migrate
'
,
text
:
'
Migrate
'
,
handler
:
function
()
{
var
win
=
Ext
.
create
(
'
PVE.qemu.Migrate
'
,
{
pveSelNode
:
me
.
pveSelNode
,
workspace
:
me
.
up
(
'
pveStdWorkspace
'
)
});
win
.
show
();
}
},
{
{
text
:
'
Reset
'
,
text
:
'
Reset
'
,
itemId
:
'
reset
'
,
itemId
:
'
reset
'
,
...
...
www/manager/window/TaskViewer.js
View file @
3eaa25db
...
@@ -103,15 +103,21 @@ Ext.define('PVE.window.TaskViewer', {
...
@@ -103,15 +103,21 @@ Ext.define('PVE.window.TaskViewer', {
border
:
false
border
:
false
});
});
var
lastStatus
=
'
unknown
'
;
me
.
mon
(
statstore
,
'
load
'
,
function
()
{
me
.
mon
(
statstore
,
'
load
'
,
function
()
{
var
status
=
statgrid
.
getObjectValue
(
'
status
'
);
var
status
=
statgrid
.
getObjectValue
(
'
status
'
);
if
(
status
===
'
stopped
'
)
{
if
(
status
===
'
stopped
'
)
{
statstore
.
stopUpdate
();
statstore
.
stopUpdate
();
}
}
if
(
status
===
'
running
'
)
{
if
(
status
===
'
running
'
||
lastStatus
===
'
running
'
)
{
store
.
load
();
store
.
load
();
}
}
lastStatus
=
status
;
stop_btn1
.
setDisabled
(
status
!==
'
running
'
);
stop_btn1
.
setDisabled
(
status
!==
'
running
'
);
stop_btn2
.
setDisabled
(
status
!==
'
running
'
);
stop_btn2
.
setDisabled
(
status
!==
'
running
'
);
});
});
...
...
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