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
f6e64492
Commit
f6e64492
authored
Nov 09, 2011
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make jslint happy
parent
a74f4de9
Changes
24
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
64 additions
and
86 deletions
+64
-86
Utils.js
www/manager/Utils.js
+2
-0
Button.js
www/manager/button/Button.js
+3
-1
Backup.js
www/manager/dc/Backup.js
+10
-7
GroupView.js
www/manager/dc/GroupView.js
+1
-1
UserEdit.js
www/manager/dc/UserEdit.js
+1
-1
UserView.js
www/manager/dc/UserView.js
+2
-2
VMIDSelector.js
www/manager/form/VMIDSelector.js
+1
-0
BackupView.js
www/manager/grid/BackupView.js
+0
-35
LogView.js
www/manager/grid/LogView.js
+1
-1
BCFailCnt.js
www/manager/node/BCFailCnt.js
+1
-2
BeanCounterGrid.js
www/manager/openvz/BeanCounterGrid.js
+2
-2
Config.js
www/manager/openvz/Config.js
+1
-1
CreateWizard.js
www/manager/openvz/CreateWizard.js
+4
-3
Network.js
www/manager/openvz/Network.js
+7
-6
Options.js
www/manager/openvz/Options.js
+1
-1
RessourceView.js
www/manager/openvz/RessourceView.js
+1
-1
StatusView.js
www/manager/openvz/StatusView.js
+3
-2
Migrate.js
www/manager/qemu/Migrate.js
+1
-1
Monitor.js
www/manager/qemu/Monitor.js
+1
-1
Summary.js
www/manager/qemu/Summary.js
+1
-1
ContentView.js
www/manager/storage/ContentView.js
+11
-9
ResourceTree.js
www/manager/tree/ResourceTree.js
+1
-1
Backup.js
www/manager/window/Backup.js
+1
-1
Restore.js
www/manager/window/Restore.js
+7
-6
No files found.
www/manager/Utils.js
View file @
f6e64492
...
@@ -420,6 +420,7 @@ Ext.define('PVE.Utils', { statics: {
...
@@ -420,6 +420,7 @@ Ext.define('PVE.Utils', { statics: {
},
},
format_size
:
function
(
size
)
{
format_size
:
function
(
size
)
{
/*jslint confusion: true */
if
(
size
<
1024
)
{
if
(
size
<
1024
)
{
return
size
;
return
size
;
...
@@ -606,6 +607,7 @@ Ext.define('PVE.Utils', { statics: {
...
@@ -606,6 +607,7 @@ Ext.define('PVE.Utils', { statics: {
},
},
render_size
:
function
(
value
,
metaData
,
record
,
rowIndex
,
colIndex
,
store
)
{
render_size
:
function
(
value
,
metaData
,
record
,
rowIndex
,
colIndex
,
store
)
{
/*jslint confusion: true */
if
(
!
Ext
.
isNumeric
(
value
))
{
if
(
!
Ext
.
isNumeric
(
value
))
{
return
''
;
return
''
;
...
...
www/manager/button/Button.js
View file @
f6e64492
...
@@ -16,6 +16,8 @@ Ext.define('PVE.button.Button', {
...
@@ -16,6 +16,8 @@ Ext.define('PVE.button.Button', {
confirmMsg
:
false
,
confirmMsg
:
false
,
initComponent
:
function
()
{
initComponent
:
function
()
{
/*jslint confusion: true */
var
me
=
this
;
var
me
=
this
;
if
(
me
.
handler
)
{
if
(
me
.
handler
)
{
...
@@ -31,7 +33,7 @@ Ext.define('PVE.button.Button', {
...
@@ -31,7 +33,7 @@ Ext.define('PVE.button.Button', {
}
}
if
(
me
.
confirmMsg
)
{
if
(
me
.
confirmMsg
)
{
var
msg
=
me
.
confirmMsg
;
msg
=
me
.
confirmMsg
;
if
(
Ext
.
isFunction
(
me
.
confirmMsg
))
{
if
(
Ext
.
isFunction
(
me
.
confirmMsg
))
{
msg
=
me
.
confirmMsg
(
rec
);
msg
=
me
.
confirmMsg
(
rec
);
}
}
...
...
www/manager/dc/Backup.js
View file @
f6e64492
...
@@ -3,10 +3,14 @@ Ext.define('PVE.dc.BackupEdit', {
...
@@ -3,10 +3,14 @@ Ext.define('PVE.dc.BackupEdit', {
alias
:
[
'
widget.pveDcBackupEdit
'
],
alias
:
[
'
widget.pveDcBackupEdit
'
],
initComponent
:
function
()
{
initComponent
:
function
()
{
var
me
=
this
;
/*jslint confusion: true */
var
me
=
this
;
me
.
create
=
!
me
.
jobid
;
me
.
create
=
!
me
.
jobid
;
var
url
;
var
method
;
if
(
me
.
create
)
{
if
(
me
.
create
)
{
url
=
'
/api2/extjs/cluster/backup
'
;
url
=
'
/api2/extjs/cluster/backup
'
;
method
=
'
POST
'
;
method
=
'
POST
'
;
...
@@ -83,7 +87,6 @@ Ext.define('PVE.dc.BackupEdit', {
...
@@ -83,7 +87,6 @@ Ext.define('PVE.dc.BackupEdit', {
},
},
{
{
header
:
'
Status
'
,
header
:
'
Status
'
,
dataIndex
:
'
vmid
'
,
dataIndex
:
'
uptime
'
,
dataIndex
:
'
uptime
'
,
renderer
:
function
(
value
)
{
renderer
:
function
(
value
)
{
if
(
value
)
{
if
(
value
)
{
...
@@ -136,7 +139,7 @@ Ext.define('PVE.dc.BackupEdit', {
...
@@ -136,7 +139,7 @@ Ext.define('PVE.dc.BackupEdit', {
fieldLabel
:
'
Day of week
'
,
fieldLabel
:
'
Day of week
'
,
multiSelect
:
true
,
multiSelect
:
true
,
value
:
[
'
sat
'
],
value
:
[
'
sat
'
],
allowBlank
:
false
,
allowBlank
:
false
},
},
{
{
xtype
:
'
timefield
'
,
xtype
:
'
timefield
'
,
...
@@ -163,12 +166,12 @@ Ext.define('PVE.dc.BackupEdit', {
...
@@ -163,12 +166,12 @@ Ext.define('PVE.dc.BackupEdit', {
uncheckedValue
:
0
uncheckedValue
:
0
},
},
{
{
xtype
:
'
numberfield
'
,
xtype
:
'
numberfield
'
,
fieldLabel
:
'
Max files
'
,
fieldLabel
:
'
Max files
'
,
name
:
'
maxfiles
'
,
name
:
'
maxfiles
'
,
minValue
:
1
,
minValue
:
1
,
maxValue
:
365
,
maxValue
:
365
,
value
:
1
,
value
:
'
1
'
,
allowBlank
:
false
allowBlank
:
false
},
},
{
{
...
@@ -398,7 +401,7 @@ Ext.define('PVE.dc.BackupView', {
...
@@ -398,7 +401,7 @@ Ext.define('PVE.dc.BackupView', {
viewConfig
:
{
viewConfig
:
{
trackOver
:
false
trackOver
:
false
},
},
tbar
:
[
tbar
:
[
{
{
text
:
'
Add
'
,
text
:
'
Add
'
,
handler
:
function
()
{
handler
:
function
()
{
...
@@ -433,7 +436,7 @@ Ext.define('PVE.dc.BackupView', {
...
@@ -433,7 +436,7 @@ Ext.define('PVE.dc.BackupView', {
header
:
'
Start time
'
,
header
:
'
Start time
'
,
width
:
60
,
width
:
60
,
sortable
:
true
,
sortable
:
true
,
dataIndex
:
'
starttime
'
,
dataIndex
:
'
starttime
'
},
},
{
{
header
:
'
Storage ID
'
,
header
:
'
Storage ID
'
,
...
...
www/manager/dc/GroupView.js
View file @
f6e64492
...
@@ -22,7 +22,7 @@ Ext.define('PVE.dc.GroupView', {
...
@@ -22,7 +22,7 @@ Ext.define('PVE.dc.GroupView', {
store
.
load
();
store
.
load
();
};
};
var
remove_btn
=
new
Ext
.
Button
({
var
remove_btn
=
new
Ext
.
Button
({
text
:
'
Delete
'
,
text
:
'
Delete
'
,
disabled
:
true
,
disabled
:
true
,
handler
:
function
()
{
handler
:
function
()
{
...
...
www/manager/dc/UserEdit.js
View file @
f6e64492
...
@@ -71,7 +71,7 @@ Ext.define('PVE.dc.UserEdit', {
...
@@ -71,7 +71,7 @@ Ext.define('PVE.dc.UserEdit', {
];
];
var
column2
=
[
var
column2
=
[
{
{
xtype
:
'
textfield
'
,
xtype
:
'
textfield
'
,
name
:
'
firstname
'
,
name
:
'
firstname
'
,
fieldLabel
:
'
First Name
'
fieldLabel
:
'
First Name
'
...
...
www/manager/dc/UserView.js
View file @
f6e64492
...
@@ -23,7 +23,7 @@ Ext.define('PVE.dc.UserView', {
...
@@ -23,7 +23,7 @@ Ext.define('PVE.dc.UserView', {
store
.
load
();
store
.
load
();
};
};
var
remove_btn
=
new
Ext
.
Button
({
var
remove_btn
=
new
Ext
.
Button
({
text
:
'
Delete
'
,
text
:
'
Delete
'
,
disabled
:
true
,
disabled
:
true
,
handler
:
function
()
{
handler
:
function
()
{
...
@@ -102,7 +102,7 @@ Ext.define('PVE.dc.UserView', {
...
@@ -102,7 +102,7 @@ Ext.define('PVE.dc.UserView', {
win
.
show
();
win
.
show
();
}
}
},
},
edit_btn
,
remove_btn
edit_btn
,
remove_btn
];
];
var
render_expire
=
function
(
date
)
{
var
render_expire
=
function
(
date
)
{
...
...
www/manager/form/VMIDSelector.js
View file @
f6e64492
...
@@ -11,6 +11,7 @@ Ext.define('PVE.form.VMIDSelector', {
...
@@ -11,6 +11,7 @@ Ext.define('PVE.form.VMIDSelector', {
validateExists
:
undefined
,
validateExists
:
undefined
,
validator
:
function
(
value
)
{
validator
:
function
(
value
)
{
/*jslint confusion: true */
var
me
=
this
;
var
me
=
this
;
if
(
!
Ext
.
isDefined
(
me
.
validateExists
))
{
if
(
!
Ext
.
isDefined
(
me
.
validateExists
))
{
...
...
www/manager/grid/BackupView.js
View file @
f6e64492
...
@@ -109,41 +109,6 @@ Ext.define('PVE.grid.BackupView', {
...
@@ -109,41 +109,6 @@ Ext.define('PVE.grid.BackupView', {
});
});
win
.
show
();
win
.
show
();
win
.
on
(
'
destroy
'
,
reload
);
win
.
on
(
'
destroy
'
,
reload
);
return
;
var
url
;
var
params
=
{
vmid
:
vmid
,
force
:
1
};
if
(
vmtype
===
'
openvz
'
)
{
url
=
'
/nodes/
'
+
nodename
+
'
/openvz
'
;
params
.
ostemplate
=
volid
;
}
else
if
(
vmtype
===
'
qemu
'
)
{
url
=
'
/nodes/
'
+
nodename
+
'
/qemu
'
;
params
.
archive
=
volid
;
}
else
{
throw
'
unknown VM type
'
;
}
PVE
.
Utils
.
API2Request
({
url
:
url
,
params
:
params
,
method
:
'
POST
'
,
waitMsgTarget
:
me
,
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
();
}
});
}
}
});
});
...
...
www/manager/grid/LogView.js
View file @
f6e64492
...
@@ -96,7 +96,7 @@ Ext.define('PVE.grig.LogView', {
...
@@ -96,7 +96,7 @@ Ext.define('PVE.grig.LogView', {
return
;
return
;
}
}
autoscroll
=
false
;
autoscroll
=
false
;
}
,
}
}
}
});
});
...
...
www/manager/node/BCFailCnt.js
View file @
f6e64492
...
@@ -49,8 +49,7 @@ Ext.define('PVE.node.BCFailCnt', {
...
@@ -49,8 +49,7 @@ Ext.define('PVE.node.BCFailCnt', {
itemdblclick
:
function
(
v
,
record
)
{
itemdblclick
:
function
(
v
,
record
)
{
var
ws
=
me
.
up
(
'
pveStdWorkspace
'
);
var
ws
=
me
.
up
(
'
pveStdWorkspace
'
);
ws
.
selectById
(
'
openvz/
'
+
record
.
data
.
id
);
ws
.
selectById
(
'
openvz/
'
+
record
.
data
.
id
);
},
}
}
}
});
});
...
...
www/manager/openvz/BeanCounterGrid.js
View file @
f6e64492
...
@@ -10,10 +10,10 @@ Ext.define('PVE.openvz.BeanCounterGrid', {
...
@@ -10,10 +10,10 @@ Ext.define('PVE.openvz.BeanCounterGrid', {
}
}
if
(
record
.
id
.
match
(
/pages$/
))
{
if
(
record
.
id
.
match
(
/pages$/
))
{
return
PVE
.
Utils
.
format_size
(
value
*
4096
);
return
PVE
.
Utils
.
format_size
(
value
*
4096
);
}
}
if
(
record
.
id
.
match
(
/
(
size|buf
)
$/
))
{
if
(
record
.
id
.
match
(
/
(
size|buf
)
$/
))
{
return
PVE
.
Utils
.
format_size
(
value
);
return
PVE
.
Utils
.
format_size
(
value
);
}
}
return
value
;
return
value
;
...
...
www/manager/openvz/Config.js
View file @
f6e64492
...
@@ -25,7 +25,7 @@ Ext.define('PVE.openvz.Config', {
...
@@ -25,7 +25,7 @@ Ext.define('PVE.openvz.Config', {
{
{
title
:
'
Summary
'
,
title
:
'
Summary
'
,
xtype
:
'
pveOpenVZSummary
'
,
xtype
:
'
pveOpenVZSummary
'
,
itemId
:
'
summary
'
,
itemId
:
'
summary
'
},
},
{
{
title
:
'
Ressources
'
,
title
:
'
Ressources
'
,
...
...
www/manager/openvz/CreateWizard.js
View file @
f6e64492
/*jslint confusion: true */
Ext
.
define
(
'
PVE.openvz.CreateWizard
'
,
{
Ext
.
define
(
'
PVE.openvz.CreateWizard
'
,
{
extend
:
'
PVE.window.Wizard
'
,
extend
:
'
PVE.window.Wizard
'
,
requires
:
[
requires
:
[
...
@@ -125,7 +126,7 @@ Ext.define('PVE.openvz.CreateWizard', {
...
@@ -125,7 +126,7 @@ Ext.define('PVE.openvz.CreateWizard', {
},
},
{
{
xtype
:
'
pveOpenVZResourceInputPanel
'
,
xtype
:
'
pveOpenVZResourceInputPanel
'
,
title
:
'
Resources
'
,
title
:
'
Resources
'
},
},
{
{
xtype
:
'
inputpanel
'
,
xtype
:
'
inputpanel
'
,
...
@@ -200,10 +201,10 @@ Ext.define('PVE.openvz.CreateWizard', {
...
@@ -200,10 +201,10 @@ Ext.define('PVE.openvz.CreateWizard', {
if
(
!
me
.
rendered
)
{
if
(
!
me
.
rendered
)
{
return
;
return
;
}
}
var
field
=
me
.
down
(
'
#dns1
'
);
var
field
=
me
.
down
(
'
#dns1
'
);
field
.
setDisabled
(
!
value
);
field
.
setDisabled
(
!
value
);
field
.
clearInvalid
();
field
.
clearInvalid
();
var
field
=
me
.
down
(
'
#dns2
'
);
field
=
me
.
down
(
'
#dns2
'
);
field
.
setDisabled
(
!
value
);
field
.
setDisabled
(
!
value
);
field
.
clearInvalid
();
field
.
clearInvalid
();
}
}
...
...
www/manager/openvz/Network.js
View file @
f6e64492
/*jslint confusion: true */
Ext
.
define
(
'
PVE.OpenVZ.NetIfEdit
'
,
{
Ext
.
define
(
'
PVE.OpenVZ.NetIfEdit
'
,
{
extend
:
'
PVE.window.Edit
'
,
extend
:
'
PVE.window.Edit
'
,
...
@@ -116,7 +117,7 @@ Ext.define('PVE.OpenVZ.IPAdd', {
...
@@ -116,7 +117,7 @@ Ext.define('PVE.OpenVZ.IPAdd', {
return
{
ip_address
:
me
.
dataCache
.
ip_address
+
'
'
+
values
.
ipaddress
};
return
{
ip_address
:
me
.
dataCache
.
ip_address
+
'
'
+
values
.
ipaddress
};
}
else
{
}
else
{
return
{
ip_address
:
values
.
ipaddress
};
return
{
ip_address
:
values
.
ipaddress
};
}
;
}
},
},
initComponent
:
function
()
{
initComponent
:
function
()
{
...
@@ -147,7 +148,7 @@ Ext.define('PVE.OpenVZ.IPAdd', {
...
@@ -147,7 +148,7 @@ Ext.define('PVE.OpenVZ.IPAdd', {
Ext
.
define
(
'
PVE.openvz.NetworkView
'
,
{
Ext
.
define
(
'
PVE.openvz.NetworkView
'
,
{
extend
:
'
Ext.grid.GridPanel
'
,
extend
:
'
Ext.grid.GridPanel
'
,
requires
:
[
requires
:
[
'
Ext.grid.*
'
,
'
Ext.grid.*
'
],
],
alias
:
[
'
widget.pveOpenVZNetworkView
'
],
alias
:
[
'
widget.pveOpenVZNetworkView
'
],
...
@@ -223,12 +224,12 @@ Ext.define('PVE.openvz.NetworkView', {
...
@@ -223,12 +224,12 @@ Ext.define('PVE.openvz.NetworkView', {
initComponent
:
function
()
{
initComponent
:
function
()
{
var
me
=
this
;
var
me
=
this
;
nodename
=
me
.
pveSelNode
.
data
.
node
;
var
nodename
=
me
.
pveSelNode
.
data
.
node
;
if
(
!
nodename
)
{
if
(
!
nodename
)
{
throw
"
no node name specified
"
;
throw
"
no node name specified
"
;
}
}
vmid
=
me
.
pveSelNode
.
data
.
vmid
;
v
ar
v
mid
=
me
.
pveSelNode
.
data
.
vmid
;
if
(
!
vmid
)
{
if
(
!
vmid
)
{
throw
"
no VM ID specified
"
;
throw
"
no VM ID specified
"
;
}
}
...
@@ -313,7 +314,7 @@ Ext.define('PVE.openvz.NetworkView', {
...
@@ -313,7 +314,7 @@ Ext.define('PVE.openvz.NetworkView', {
});
});
win
.
on
(
'
destroy
'
,
me
.
load
,
me
);
win
.
on
(
'
destroy
'
,
me
.
load
,
me
);
win
.
show
();
win
.
show
();
}
}
;
var
edit_btn
=
new
Ext
.
Button
({
var
edit_btn
=
new
Ext
.
Button
({
text
:
'
Edit
'
,
text
:
'
Edit
'
,
...
@@ -419,7 +420,7 @@ Ext.define('PVE.openvz.NetworkView', {
...
@@ -419,7 +420,7 @@ Ext.define('PVE.openvz.NetworkView', {
}
}
});
});
me
.
callParent
();
me
.
callParent
();
me
.
load
();
me
.
load
();
}
}
...
...
www/manager/openvz/Options.js
View file @
f6e64492
...
@@ -59,7 +59,7 @@ Ext.define('PVE.openvz.Options', {
...
@@ -59,7 +59,7 @@ Ext.define('PVE.openvz.Options', {
defaultValue
:
'
0
'
,
defaultValue
:
'
0
'
,
renderer
:
function
(
value
)
{
renderer
:
function
(
value
)
{
if
(
value
==
0
)
{
if
(
value
==
0
)
{
return
'
User quotas disabled.
'
return
'
User quotas disabled.
'
;
}
}
return
value
;
return
value
;
},
},
...
...
www/manager/openvz/RessourceView.js
View file @
f6e64492
...
@@ -39,7 +39,7 @@ Ext.define('PVE.openvz.RessourceView', {
...
@@ -39,7 +39,7 @@ Ext.define('PVE.openvz.RessourceView', {
header
:
'
Processors
'
,
header
:
'
Processors
'
,
never_delete
:
true
,
never_delete
:
true
,
editor
:
'
PVE.openvz.RessourceEdit
'
,
editor
:
'
PVE.openvz.RessourceEdit
'
,
defaultValue
:
1
,
defaultValue
:
1
},
},
disk
:
{
disk
:
{
header
:
'
Disk space
'
,
header
:
'
Disk space
'
,
...
...
www/manager/openvz/StatusView.js
View file @
f6e64492
...
@@ -55,10 +55,11 @@ Ext.define('PVE.openvz.StatusView', {
...
@@ -55,10 +55,11 @@ Ext.define('PVE.openvz.StatusView', {
var
render_status
=
function
(
value
,
metaData
,
record
,
rowIndex
,
colIndex
,
store
)
{
var
render_status
=
function
(
value
,
metaData
,
record
,
rowIndex
,
colIndex
,
store
)
{
var
failcnt
=
me
.
getObjectValue
(
'
failcnt
'
,
0
);
var
failcnt
=
me
.
getObjectValue
(
'
failcnt
'
,
0
);
if
(
failcnt
>
0
)
{
if
(
failcnt
>
0
)
{
return
value
+
"
(failure count
"
+
failcnt
+
"
)
"
;
return
value
+
"
(failure count
"
+
failcnt
.
toString
()
+
"
)
"
;
}
}
return
value
;
return
value
;
}
};
var
rows
=
{
var
rows
=
{
name
:
{
header
:
'
Name
'
,
defaultValue
:
'
no name specified
'
},
name
:
{
header
:
'
Name
'
,
defaultValue
:
'
no name specified
'
},
status
:
{
header
:
'
Status
'
,
defaultValue
:
'
unknown
'
,
renderer
:
render_status
},
status
:
{
header
:
'
Status
'
,
defaultValue
:
'
unknown
'
,
renderer
:
render_status
},
...
...
www/manager/qemu/Migrate.js
View file @
f6e64492
...
@@ -80,7 +80,7 @@ Ext.define('PVE.qemu.Migrate', {
...
@@ -80,7 +80,7 @@ Ext.define('PVE.qemu.Migrate', {
layout
:
'
auto
'
,
layout
:
'
auto
'
,
border
:
false
,
border
:
false
,
items
:
[
me
.
formPanel
],
items
:
[
me
.
formPanel
],
buttons
:
[
submitBtn
]
,
buttons
:
[
submitBtn
]
});
});
me
.
callParent
();
me
.
callParent
();
...
...
www/manager/qemu/Monitor.js
View file @
f6e64492
...
@@ -33,7 +33,7 @@ Ext.define('PVE.qemu.Monitor', {
...
@@ -33,7 +33,7 @@ Ext.define('PVE.qemu.Monitor', {
var
el
=
textbox
.
getTargetEl
();
var
el
=
textbox
.
getTargetEl
();
var
dom
=
Ext
.
getDom
(
el
);
var
dom
=
Ext
.
getDom
(
el
);
dom
.
scrollTop
=
dom
.
scrollHeight
-
dom
.
clientHeight
;
dom
.
scrollTop
=
dom
.
scrollHeight
-
dom
.
clientHeight
;
}
}
;
var
refresh
=
function
()
{
var
refresh
=
function
()
{
textbox
.
update
(
lines
.
join
(
'
\n
'
));
textbox
.
update
(
lines
.
join
(
'
\n
'
));
...
...
www/manager/qemu/Summary.js
View file @
f6e64492
...
@@ -68,7 +68,7 @@ Ext.define('PVE.qemu.Summary', {
...
@@ -68,7 +68,7 @@ Ext.define('PVE.qemu.Summary', {
text
:
'
Migrate
'
,
text
:
'
Migrate
'
,
handler
:
function
()
{
handler
:
function
()
{
var
win
=
Ext
.
create
(
'
PVE.qemu.Migrate
'
,
{
var
win
=
Ext
.
create
(
'
PVE.qemu.Migrate
'
,
{
pveSelNode
:
me
.
pveSelNode
,
pveSelNode
:
me
.
pveSelNode
});
});
win
.
show
();
win
.
show
();
}
}
...
...
www/manager/storage/ContentView.js
View file @
f6e64492
...
@@ -7,6 +7,7 @@ Ext.define('PVE.storage.Upload', {
...
@@ -7,6 +7,7 @@ Ext.define('PVE.storage.Upload', {
modal
:
true
,
modal
:
true
,
initComponent
:
function
()
{
initComponent
:
function
()
{
/*jslint confusion: true */
var
me
=
this
;
var
me
=
this
;
var
xhr
;
var
xhr
;
...
@@ -24,7 +25,7 @@ Ext.define('PVE.storage.Upload', {
...
@@ -24,7 +25,7 @@ Ext.define('PVE.storage.Upload', {
var
pbar
=
Ext
.
create
(
'
Ext.ProgressBar
'
,
{
var
pbar
=
Ext
.
create
(
'
Ext.ProgressBar
'
,
{
text
:
'
Ready
'
,
text
:
'
Ready
'
,
hidden
:
true
hidden
:
true
});
});
me
.
formPanel
=
Ext
.
create
(
'
Ext.form.Panel
'
,
{
me
.
formPanel
=
Ext
.
create
(
'
Ext.form.Panel
'
,
{
method
:
'
POST
'
,
method
:
'
POST
'
,
...
@@ -95,8 +96,9 @@ Ext.define('PVE.storage.Upload', {
...
@@ -95,8 +96,9 @@ Ext.define('PVE.storage.Upload', {
text
:
'
Upload
'
,
text
:
'
Upload
'
,
disabled
:
true
,
disabled
:
true
,
handler
:
function
(
button
)
{
handler
:
function
(
button
)
{
var
fd
;
try
{
try
{
var
fd
=
new
FormData
();
fd
=
new
FormData
();
}
catch
(
err
)
{
}
catch
(
err
)
{
doStandardSubmit
();
doStandardSubmit
();
return
;
return
;
...
@@ -109,7 +111,7 @@ Ext.define('PVE.storage.Upload', {
...
@@ -109,7 +111,7 @@ Ext.define('PVE.storage.Upload', {
fd
.
append
(
"
content
"
,
field
.
getValue
());
fd
.
append
(
"
content
"
,
field
.
getValue
());
field
.
setDisabled
(
true
);
field
.
setDisabled
(
true
);
var
field
=
form
.
findField
(
'
filename
'
);
field
=
form
.
findField
(
'
filename
'
);
var
file
=
field
.
fileInputEl
.
dom
;
var
file
=
field
.
fileInputEl
.
dom
;
fd
.
append
(
"
filename
"
,
file
.
files
[
0
]);
fd
.
append
(
"
filename
"
,
file
.
files
[
0
]);
field
.
setDisabled
(
true
);
field
.
setDisabled
(
true
);
...
@@ -123,7 +125,7 @@ Ext.define('PVE.storage.Upload', {
...
@@ -123,7 +125,7 @@ Ext.define('PVE.storage.Upload', {
if
(
xhr
.
status
==
200
)
{
if
(
xhr
.
status
==
200
)
{
me
.
close
();
me
.
close
();
}
else
{
}
else
{
var
msg
=
"
Error
"
+
xhr
.
status
+
"
:
"
+
Ext
.
htmlEncode
(
xhr
.
statusText
);
var
msg
=
"
Error
"
+
xhr
.
status
.
toString
()
+
"
:
"
+
Ext
.
htmlEncode
(
xhr
.
statusText
);
Ext
.
Msg
.
alert
(
'
Upload failed
'
,
msg
,
function
(
btn
)
{
Ext
.
Msg
.
alert
(
'
Upload failed
'
,
msg
,
function
(
btn
)
{
me
.
close
();
me
.
close
();
});
});
...
@@ -132,7 +134,7 @@ Ext.define('PVE.storage.Upload', {
...
@@ -132,7 +134,7 @@ Ext.define('PVE.storage.Upload', {
},
false
);
},
false
);
xhr
.
addEventListener
(
"
error
"
,
function
(
e
)
{
xhr
.
addEventListener
(
"
error
"
,
function
(
e
)
{
var
msg
=
"
Error
"
+
e
.
target
.
status
+
"
occurred while receiving the document.
"
;
var
msg
=
"
Error
"
+
e
.
target
.
status
.
toString
()
+
"
occurred while receiving the document.
"
;
Ext
.
Msg
.
alert
(
'
Upload failed
'
,
msg
,
function
(
btn
)
{
Ext
.
Msg
.
alert
(
'
Upload failed
'
,
msg
,
function
(
btn
)
{
me
.
close
();
me
.
close
();
});
});
...
@@ -155,8 +157,8 @@ Ext.define('PVE.storage.Upload', {
...
@@ -155,8 +157,8 @@ Ext.define('PVE.storage.Upload', {
});
});
Ext
.
applyIf
(
me
,
{
Ext
.
applyIf
(
me
,
{
title
:
'
Upload
'
,
title
:
'
Upload
'
,
items
:
me
.
formPanel
,
items
:
me
.
formPanel
,
buttons
:
[
abortBtn
,
submitBtn
],
buttons
:
[
abortBtn
,
submitBtn
],
listeners
:
{
listeners
:
{
close
:
function
()
{
close
:
function
()
{
...
@@ -195,7 +197,7 @@ Ext.define('PVE.storage.ContentView', {
...
@@ -195,7 +197,7 @@ Ext.define('PVE.storage.ContentView', {
groupField
:
'
content
'
,
groupField
:
'
content
'
,
proxy
:
{
proxy
:
{
type
:
'
pve
'
,
type
:
'
pve
'
,
url
:
'
/api2/json
'
+
baseurl
,
url
:
'
/api2/json
'
+
baseurl
},
},
sorters
:
{
sorters
:
{
property
:
'
volid
'
,
property
:
'
volid
'
,
...
@@ -213,7 +215,7 @@ Ext.define('PVE.storage.ContentView', {
...
@@ -213,7 +215,7 @@ Ext.define('PVE.storage.ContentView', {
store
.
load
();
store
.
load
();
};
};
Ext
.
apply
(
me
,
{
Ext
.
apply
(
me
,
{
store
:
store
,
store
:
store
,
selModel
:
sm
,
selModel
:
sm
,
stateful
:
false
,
stateful
:
false
,
...
...
www/manager/tree/ResourceTree.js
View file @
f6e64492
...
@@ -375,7 +375,7 @@ Ext.define('PVE.tree.ResourceTree', {
...
@@ -375,7 +375,7 @@ Ext.define('PVE.tree.ResourceTree', {
if
(
node
&&
node
.
data
.
type
===
record
.
data
.
type
&&
if
(
node
&&
node
.
data
.
type
===
record
.
data
.
type
&&
node
.
data
.
node
!==
record
.
data
.
node
)
{
node
.
data
.
node
!==
record
.
data
.
node
)
{
// defer select (else we get strange errors)
// defer select (else we get strange errors)
Ext
.
defer
(
function
()
{
me
.
selectExpand
(
node
)
},
100
,
me
);
Ext
.
defer
(
function
()
{
me
.
selectExpand
(
node
)
;
},
100
,
me
);
}
}
},
},
applyState
:
function
(
state
)
{
applyState
:
function
(
state
)
{
...
...
www/manager/window/Backup.js
View file @
f6e64492
...
@@ -97,7 +97,7 @@ Ext.define('PVE.window.Backup', {
...
@@ -97,7 +97,7 @@ Ext.define('PVE.window.Backup', {
layout
:
'
auto
'
,
layout
:
'
auto
'
,
border
:
false
,
border
:
false
,
items
:
[
me
.
formPanel
],
items
:
[
me
.
formPanel
],
buttons
:
[
submitBtn
]
,
buttons
:
[
submitBtn
]
});
});
me
.
callParent
();
me
.
callParent
();
...
...
www/manager/window/Restore.js
View file @
f6e64492
...
@@ -53,10 +53,6 @@ Ext.define('PVE.window.Restore', {
...
@@ -53,10 +53,6 @@ Ext.define('PVE.window.Restore', {
var
form
=
me
.
formPanel
.
getForm
();
var
form
=
me
.
formPanel
.
getForm
();
form
.
on
(
'
validitychange
'
,
function
(
f
,
valid
)
{
submitBtn
.
setDisabled
(
!
valid
);
});
var
doRestore
=
function
(
url
,
params
)
{
var
doRestore
=
function
(
url
,
params
)
{
PVE
.
Utils
.
API2Request
({
PVE
.
Utils
.
API2Request
({
url
:
url
,
url
:
url
,
...
@@ -85,10 +81,11 @@ Ext.define('PVE.window.Restore', {
...
@@ -85,10 +81,11 @@ Ext.define('PVE.window.Restore', {
var
params
=
{
var
params
=
{
storage
:
storage
,
storage
:
storage
,
vmid
:
me
.
vmid
?
me
.
vmid
:
values
.
vmid
,
vmid
:
me
.
vmid
||
values
.
vmid
,
force
:
me
.
vmid
?
1
:
0
force
:
me
.
vmid
?
1
:
0
};
};
var
url
;
if
(
me
.
vmtype
===
'
openvz
'
)
{
if
(
me
.
vmtype
===
'
openvz
'
)
{
url
=
'
/nodes/
'
+
me
.
nodename
+
'
/openvz
'
;
url
=
'
/nodes/
'
+
me
.
nodename
+
'
/openvz
'
;
params
.
ostemplate
=
me
.
volid
;
params
.
ostemplate
=
me
.
volid
;
...
@@ -115,6 +112,10 @@ Ext.define('PVE.window.Restore', {
...
@@ -115,6 +112,10 @@ Ext.define('PVE.window.Restore', {
}
}
});
});
form
.
on
(
'
validitychange
'
,
function
(
f
,
valid
)
{
submitBtn
.
setDisabled
(
!
valid
);
});
var
title
=
(
me
.
vmtype
===
'
openvz
'
)
?
"
Restore CT
"
:
"
Restore VM
"
;
var
title
=
(
me
.
vmtype
===
'
openvz
'
)
?
"
Restore CT
"
:
"
Restore VM
"
;
Ext
.
apply
(
me
,
{
Ext
.
apply
(
me
,
{
...
@@ -124,7 +125,7 @@ Ext.define('PVE.window.Restore', {
...
@@ -124,7 +125,7 @@ Ext.define('PVE.window.Restore', {
layout
:
'
auto
'
,
layout
:
'
auto
'
,
border
:
false
,
border
:
false
,
items
:
[
me
.
formPanel
],
items
:
[
me
.
formPanel
],
buttons
:
[
submitBtn
]
,
buttons
:
[
submitBtn
]
});
});
me
.
callParent
();
me
.
callParent
();
...
...
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