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
09109431
Commit
09109431
authored
Jan 08, 2015
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correctly check for undefined values
parent
c838c7a3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
10 deletions
+18
-10
HardwareView.js
www/manager/qemu/HardwareView.js
+14
-7
Options.js
www/manager/qemu/Options.js
+4
-3
No files found.
www/manager/qemu/HardwareView.js
View file @
09109431
...
...
@@ -286,7 +286,10 @@ Ext.define('PVE.qemu.HardwareView', {
selModel
:
sm
,
disabled
:
true
,
enableFn
:
function
(
rec
)
{
if
(
!
rec
||
rec
.
data
.
key
.
match
(
/^unused
\d
+/
)
||
rec
.
data
[
'
pending
'
]
||
rec
.
data
[
'
delete
'
])
{
if
(
!
rec
||
rec
.
data
.
key
.
match
(
/^unused
\d
+/
)
||
rec
.
data
[
'
delete
'
])
{
return
false
;
}
if
(
Ext
.
isDefined
(
rec
.
data
.
pending
)
&&
(
rec
.
data
.
pending
!==
''
))
{
return
false
;
}
var
rowdef
=
rows
[
rec
.
data
.
key
];
...
...
@@ -344,7 +347,7 @@ Ext.define('PVE.qemu.HardwareView', {
if
(
!
rec
)
{
return
false
;
}
if
(
rec
.
data
[
'
delete
'
])
{
if
(
rec
.
data
[
'
delete
'
])
{
return
false
;
}
var
rowdef
=
rows
[
rec
.
data
.
key
];
...
...
@@ -363,7 +366,7 @@ Ext.define('PVE.qemu.HardwareView', {
reload
();
},
failure
:
function
(
response
,
opts
)
{
Ext
.
Msg
.
alert
(
'
Error
'
,
response
.
htmlStatus
);
Ext
.
Msg
.
alert
(
'
Error
'
,
response
.
htmlStatus
);
}
});
}
...
...
@@ -377,12 +380,16 @@ Ext.define('PVE.qemu.HardwareView', {
if
(
!
rec
)
{
return
false
;
}
if
(
!
rec
.
data
[
'
pending
'
]
&&
!
rec
.
data
[
'
delete
'
]){
return
false
;
if
(
Ext
.
isDefined
(
rec
.
data
.
pending
)
&&
(
rec
.
data
.
pending
!==
''
))
{
return
true
;
}
var
rowdef
=
rows
[
rec
.
data
.
key
];
if
(
rec
.
data
[
'
delete
'
])
{
return
true
;
}
return
false
;
},
handler
:
function
(
b
,
e
,
rec
)
{
PVE
.
Utils
.
API2Request
({
...
...
www/manager/qemu/Options.js
View file @
09109431
...
...
@@ -338,9 +338,10 @@ Ext.define('PVE.qemu.Options', {
return
;
}
if
(
rec
.
data
[
'
pending
'
]
||
rec
.
data
[
'
delete
'
]){
if
((
Ext
.
isDefined
(
rec
.
data
.
pending
)
&&
(
rec
.
data
.
pending
!==
''
))
||
rec
.
data
[
'
delete
'
])
{
revert_btn
.
setDisabled
(
false
);
}
else
{
}
else
{
revert_btn
.
setDisabled
(
true
);
}
...
...
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