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
b2c71ac9
Commit
b2c71ac9
authored
Jun 07, 2013
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PVE.window.Edit: add backgroundDelay option
This can be used for the new async qemu config API.
parent
af5ed080
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
2 deletions
+18
-2
Utils.js
www/manager/Utils.js
+1
-0
MemoryEdit.js
www/manager/qemu/MemoryEdit.js
+2
-0
Edit.js
www/manager/window/Edit.js
+15
-2
No files found.
www/manager/Utils.js
View file @
b2c71ac9
...
@@ -448,6 +448,7 @@ Ext.define('PVE.Utils', { statics: {
...
@@ -448,6 +448,7 @@ Ext.define('PVE.Utils', { statics: {
qmshutdown
:
[
'
VM
'
,
gettext
(
'
Shutdown
'
)
],
qmshutdown
:
[
'
VM
'
,
gettext
(
'
Shutdown
'
)
],
qmsuspend
:
[
'
VM
'
,
gettext
(
'
Suspend
'
)
],
qmsuspend
:
[
'
VM
'
,
gettext
(
'
Suspend
'
)
],
qmresume
:
[
'
VM
'
,
gettext
(
'
Resume
'
)
],
qmresume
:
[
'
VM
'
,
gettext
(
'
Resume
'
)
],
qmconfig
:
[
'
VM
'
,
gettext
(
'
Configure
'
)
],
vzcreate
:
[
'
CT
'
,
gettext
(
'
Create
'
)
],
vzcreate
:
[
'
CT
'
,
gettext
(
'
Create
'
)
],
vzrestore
:
[
'
CT
'
,
gettext
(
'
Restore
'
)
],
vzrestore
:
[
'
CT
'
,
gettext
(
'
Restore
'
)
],
vzdestroy
:
[
'
CT
'
,
gettext
(
'
Destroy
'
)
],
vzdestroy
:
[
'
CT
'
,
gettext
(
'
Destroy
'
)
],
...
...
www/manager/qemu/MemoryEdit.js
View file @
b2c71ac9
...
@@ -148,6 +148,8 @@ Ext.define('PVE.qemu.MemoryEdit', {
...
@@ -148,6 +148,8 @@ Ext.define('PVE.qemu.MemoryEdit', {
Ext
.
apply
(
me
,
{
Ext
.
apply
(
me
,
{
subject
:
gettext
(
'
Memory
'
),
subject
:
gettext
(
'
Memory
'
),
items
:
[
Ext
.
create
(
'
PVE.qemu.MemoryInputPanel
'
)
],
items
:
[
Ext
.
create
(
'
PVE.qemu.MemoryInputPanel
'
)
],
// uncomment the following to use the async configiguration API
// backgroundDelay: 5,
width
:
400
width
:
400
});
});
...
...
www/manager/window/Edit.js
View file @
b2c71ac9
...
@@ -17,6 +17,8 @@ Ext.define('PVE.window.Edit', {
...
@@ -17,6 +17,8 @@ Ext.define('PVE.window.Edit', {
// set to true if you want an Add button (instead of Create)
// set to true if you want an Add button (instead of Create)
isAdd
:
false
,
isAdd
:
false
,
backgroundDelay
:
0
,
isValid
:
function
()
{
isValid
:
function
()
{
var
me
=
this
;
var
me
=
this
;
...
@@ -82,19 +84,30 @@ Ext.define('PVE.window.Edit', {
...
@@ -82,19 +84,30 @@ Ext.define('PVE.window.Edit', {
values
.
digest
=
me
.
digest
;
values
.
digest
=
me
.
digest
;
}
}
if
(
me
.
backgroundDelay
)
{
values
.
background_delay
=
me
.
backgroundDelay
;
}
PVE
.
Utils
.
API2Request
({
PVE
.
Utils
.
API2Request
({
url
:
me
.
url
,
url
:
me
.
url
,
waitMsgTarget
:
me
,
waitMsgTarget
:
me
,
method
:
me
.
method
||
'
PUT
'
,
method
:
me
.
method
||
(
me
.
backgroundDelay
?
'
POST
'
:
'
PUT
'
)
,
params
:
values
,
params
:
values
,
failure
:
function
(
response
,
options
)
{
failure
:
function
(
response
,
options
)
{
if
(
response
.
result
.
errors
)
{
if
(
response
.
result
&&
response
.
result
.
errors
)
{
form
.
markInvalid
(
response
.
result
.
errors
);
form
.
markInvalid
(
response
.
result
.
errors
);
}
}
Ext
.
Msg
.
alert
(
gettext
(
'
Error
'
),
response
.
htmlStatus
);
Ext
.
Msg
.
alert
(
gettext
(
'
Error
'
),
response
.
htmlStatus
);
},
},
success
:
function
(
response
,
options
)
{
success
:
function
(
response
,
options
)
{
me
.
close
();
me
.
close
();
if
(
me
.
backgroundDelay
&&
response
.
result
.
data
)
{
var
upid
=
response
.
result
.
data
;
var
win
=
Ext
.
create
(
'
PVE.window.TaskProgress
'
,
{
upid
:
upid
});
win
.
show
();
}
}
}
});
});
},
},
...
...
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