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
Show 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: {
},
format_size
:
function
(
size
)
{
/*jslint confusion: true */
if
(
size
<
1024
)
{
return
size
;
...
...
@@ -606,6 +607,7 @@ Ext.define('PVE.Utils', { statics: {
},
render_size
:
function
(
value
,
metaData
,
record
,
rowIndex
,
colIndex
,
store
)
{
/*jslint confusion: true */
if
(
!
Ext
.
isNumeric
(
value
))
{
return
''
;
...
...
www/manager/button/Button.js
View file @
f6e64492
...
...
@@ -16,6 +16,8 @@ Ext.define('PVE.button.Button', {
confirmMsg
:
false
,
initComponent
:
function
()
{
/*jslint confusion: true */
var
me
=
this
;
if
(
me
.
handler
)
{
...
...
@@ -31,7 +33,7 @@ Ext.define('PVE.button.Button', {
}
if
(
me
.
confirmMsg
)
{
var
msg
=
me
.
confirmMsg
;
msg
=
me
.
confirmMsg
;
if
(
Ext
.
isFunction
(
me
.
confirmMsg
))
{
msg
=
me
.
confirmMsg
(
rec
);
}
...
...
www/manager/dc/Backup.js
View file @
f6e64492
...
...
@@ -3,10 +3,14 @@ Ext.define('PVE.dc.BackupEdit', {
alias
:
[
'
widget.pveDcBackupEdit
'
],
initComponent
:
function
()
{
/*jslint confusion: true */
var
me
=
this
;
me
.
create
=
!
me
.
jobid
;
var
url
;
var
method
;
if
(
me
.
create
)
{
url
=
'
/api2/extjs/cluster/backup
'
;
method
=
'
POST
'
;
...
...
@@ -83,7 +87,6 @@ Ext.define('PVE.dc.BackupEdit', {
},
{
header
:
'
Status
'
,
dataIndex
:
'
vmid
'
,
dataIndex
:
'
uptime
'
,
renderer
:
function
(
value
)
{
if
(
value
)
{
...
...
@@ -136,7 +139,7 @@ Ext.define('PVE.dc.BackupEdit', {
fieldLabel
:
'
Day of week
'
,
multiSelect
:
true
,
value
:
[
'
sat
'
],
allowBlank
:
false
,
allowBlank
:
false
},
{
xtype
:
'
timefield
'
,
...
...
@@ -168,7 +171,7 @@ Ext.define('PVE.dc.BackupEdit', {
name
:
'
maxfiles
'
,
minValue
:
1
,
maxValue
:
365
,
value
:
1
,
value
:
'
1
'
,
allowBlank
:
false
},
{
...
...
@@ -433,7 +436,7 @@ Ext.define('PVE.dc.BackupView', {
header
:
'
Start time
'
,
width
:
60
,
sortable
:
true
,
dataIndex
:
'
starttime
'
,
dataIndex
:
'
starttime
'
},
{
header
:
'
Storage ID
'
,
...
...
www/manager/dc/GroupView.js
View file @
f6e64492
www/manager/dc/UserEdit.js
View file @
f6e64492
www/manager/dc/UserView.js
View file @
f6e64492
www/manager/form/VMIDSelector.js
View file @
f6e64492
...
...
@@ -11,6 +11,7 @@ Ext.define('PVE.form.VMIDSelector', {
validateExists
:
undefined
,
validator
:
function
(
value
)
{
/*jslint confusion: true */
var
me
=
this
;
if
(
!
Ext
.
isDefined
(
me
.
validateExists
))
{
...
...
www/manager/grid/BackupView.js
View file @
f6e64492
...
...
@@ -109,41 +109,6 @@ Ext.define('PVE.grid.BackupView', {
});
win
.
show
();
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', {
return
;
}
autoscroll
=
false
;
}
,
}
}
});
...
...
www/manager/node/BCFailCnt.js
View file @
f6e64492
...
...
@@ -49,8 +49,7 @@ Ext.define('PVE.node.BCFailCnt', {
itemdblclick
:
function
(
v
,
record
)
{
var
ws
=
me
.
up
(
'
pveStdWorkspace
'
);
ws
.
selectById
(
'
openvz/
'
+
record
.
data
.
id
);
},
}
}
});
...
...
www/manager/openvz/BeanCounterGrid.js
View file @
f6e64492
www/manager/openvz/Config.js
View file @
f6e64492
...
...
@@ -25,7 +25,7 @@ Ext.define('PVE.openvz.Config', {
{
title
:
'
Summary
'
,
xtype
:
'
pveOpenVZSummary
'
,
itemId
:
'
summary
'
,
itemId
:
'
summary
'
},
{
title
:
'
Ressources
'
,
...
...
www/manager/openvz/CreateWizard.js
View file @
f6e64492
/*jslint confusion: true */
Ext
.
define
(
'
PVE.openvz.CreateWizard
'
,
{
extend
:
'
PVE.window.Wizard
'
,
requires
:
[
...
...
@@ -125,7 +126,7 @@ Ext.define('PVE.openvz.CreateWizard', {
},
{
xtype
:
'
pveOpenVZResourceInputPanel
'
,
title
:
'
Resources
'
,
title
:
'
Resources
'
},
{
xtype
:
'
inputpanel
'
,
...
...
@@ -203,7 +204,7 @@ Ext.define('PVE.openvz.CreateWizard', {
var
field
=
me
.
down
(
'
#dns1
'
);
field
.
setDisabled
(
!
value
);
field
.
clearInvalid
();
var
field
=
me
.
down
(
'
#dns2
'
);
field
=
me
.
down
(
'
#dns2
'
);
field
.
setDisabled
(
!
value
);
field
.
clearInvalid
();
}
...
...
www/manager/openvz/Network.js
View file @
f6e64492
/*jslint confusion: true */
Ext
.
define
(
'
PVE.OpenVZ.NetIfEdit
'
,
{
extend
:
'
PVE.window.Edit
'
,
...
...
@@ -116,7 +117,7 @@ Ext.define('PVE.OpenVZ.IPAdd', {
return
{
ip_address
:
me
.
dataCache
.
ip_address
+
'
'
+
values
.
ipaddress
};
}
else
{
return
{
ip_address
:
values
.
ipaddress
};
}
;
}
},
initComponent
:
function
()
{
...
...
@@ -147,7 +148,7 @@ Ext.define('PVE.OpenVZ.IPAdd', {
Ext
.
define
(
'
PVE.openvz.NetworkView
'
,
{
extend
:
'
Ext.grid.GridPanel
'
,
requires
:
[
'
Ext.grid.*
'
,
'
Ext.grid.*
'
],
alias
:
[
'
widget.pveOpenVZNetworkView
'
],
...
...
@@ -223,12 +224,12 @@ Ext.define('PVE.openvz.NetworkView', {
initComponent
:
function
()
{
var
me
=
this
;
nodename
=
me
.
pveSelNode
.
data
.
node
;
var
nodename
=
me
.
pveSelNode
.
data
.
node
;
if
(
!
nodename
)
{
throw
"
no node name specified
"
;
}
vmid
=
me
.
pveSelNode
.
data
.
vmid
;
v
ar
v
mid
=
me
.
pveSelNode
.
data
.
vmid
;
if
(
!
vmid
)
{
throw
"
no VM ID specified
"
;
}
...
...
@@ -313,7 +314,7 @@ Ext.define('PVE.openvz.NetworkView', {
});
win
.
on
(
'
destroy
'
,
me
.
load
,
me
);
win
.
show
();
}
}
;
var
edit_btn
=
new
Ext
.
Button
({
text
:
'
Edit
'
,
...
...
www/manager/openvz/Options.js
View file @
f6e64492
...
...
@@ -59,7 +59,7 @@ Ext.define('PVE.openvz.Options', {
defaultValue
:
'
0
'
,
renderer
:
function
(
value
)
{
if
(
value
==
0
)
{
return
'
User quotas disabled.
'
return
'
User quotas disabled.
'
;
}
return
value
;
},
...
...
www/manager/openvz/RessourceView.js
View file @
f6e64492
...
...
@@ -39,7 +39,7 @@ Ext.define('PVE.openvz.RessourceView', {
header
:
'
Processors
'
,
never_delete
:
true
,
editor
:
'
PVE.openvz.RessourceEdit
'
,
defaultValue
:
1
,
defaultValue
:
1
},
disk
:
{
header
:
'
Disk space
'
,
...
...
www/manager/openvz/StatusView.js
View file @
f6e64492
...
...
@@ -55,10 +55,11 @@ Ext.define('PVE.openvz.StatusView', {
var
render_status
=
function
(
value
,
metaData
,
record
,
rowIndex
,
colIndex
,
store
)
{
var
failcnt
=
me
.
getObjectValue
(
'
failcnt
'
,
0
);
if
(
failcnt
>
0
)
{
return
value
+
"
(failure count
"
+
failcnt
+
"
)
"
;
return
value
+
"
(failure count
"
+
failcnt
.
toString
()
+
"
)
"
;
}
return
value
;
}
};
var
rows
=
{
name
:
{
header
:
'
Name
'
,
defaultValue
:
'
no name specified
'
},
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', {
layout
:
'
auto
'
,
border
:
false
,
items
:
[
me
.
formPanel
],
buttons
:
[
submitBtn
]
,
buttons
:
[
submitBtn
]
});
me
.
callParent
();
...
...
www/manager/qemu/Monitor.js
View file @
f6e64492
...
...
@@ -33,7 +33,7 @@ Ext.define('PVE.qemu.Monitor', {
var
el
=
textbox
.
getTargetEl
();
var
dom
=
Ext
.
getDom
(
el
);
dom
.
scrollTop
=
dom
.
scrollHeight
-
dom
.
clientHeight
;
}
}
;
var
refresh
=
function
()
{
textbox
.
update
(
lines
.
join
(
'
\n
'
));
...
...
www/manager/qemu/Summary.js
View file @
f6e64492
...
...
@@ -68,7 +68,7 @@ Ext.define('PVE.qemu.Summary', {
text
:
'
Migrate
'
,
handler
:
function
()
{
var
win
=
Ext
.
create
(
'
PVE.qemu.Migrate
'
,
{
pveSelNode
:
me
.
pveSelNode
,
pveSelNode
:
me
.
pveSelNode
});
win
.
show
();
}
...
...
www/manager/storage/ContentView.js
View file @
f6e64492
...
...
@@ -7,6 +7,7 @@ Ext.define('PVE.storage.Upload', {
modal
:
true
,
initComponent
:
function
()
{
/*jslint confusion: true */
var
me
=
this
;
var
xhr
;
...
...
@@ -95,8 +96,9 @@ Ext.define('PVE.storage.Upload', {
text
:
'
Upload
'
,
disabled
:
true
,
handler
:
function
(
button
)
{
var
fd
;
try
{
var
fd
=
new
FormData
();
fd
=
new
FormData
();
}
catch
(
err
)
{
doStandardSubmit
();
return
;
...
...
@@ -109,7 +111,7 @@ Ext.define('PVE.storage.Upload', {
fd
.
append
(
"
content
"
,
field
.
getValue
());
field
.
setDisabled
(
true
);
var
field
=
form
.
findField
(
'
filename
'
);
field
=
form
.
findField
(
'
filename
'
);
var
file
=
field
.
fileInputEl
.
dom
;
fd
.
append
(
"
filename
"
,
file
.
files
[
0
]);
field
.
setDisabled
(
true
);
...
...
@@ -123,7 +125,7 @@ Ext.define('PVE.storage.Upload', {
if
(
xhr
.
status
==
200
)
{
me
.
close
();
}
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
)
{
me
.
close
();
});
...
...
@@ -132,7 +134,7 @@ Ext.define('PVE.storage.Upload', {
},
false
);
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
)
{
me
.
close
();
});
...
...
@@ -195,7 +197,7 @@ Ext.define('PVE.storage.ContentView', {
groupField
:
'
content
'
,
proxy
:
{
type
:
'
pve
'
,
url
:
'
/api2/json
'
+
baseurl
,
url
:
'
/api2/json
'
+
baseurl
},
sorters
:
{
property
:
'
volid
'
,
...
...
www/manager/tree/ResourceTree.js
View file @
f6e64492
...
...
@@ -375,7 +375,7 @@ Ext.define('PVE.tree.ResourceTree', {
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
);
Ext
.
defer
(
function
()
{
me
.
selectExpand
(
node
)
;
},
100
,
me
);
}
},
applyState
:
function
(
state
)
{
...
...
www/manager/window/Backup.js
View file @
f6e64492
...
...
@@ -97,7 +97,7 @@ Ext.define('PVE.window.Backup', {
layout
:
'
auto
'
,
border
:
false
,
items
:
[
me
.
formPanel
],
buttons
:
[
submitBtn
]
,
buttons
:
[
submitBtn
]
});
me
.
callParent
();
...
...
www/manager/window/Restore.js
View file @
f6e64492
...
...
@@ -53,10 +53,6 @@ Ext.define('PVE.window.Restore', {
var
form
=
me
.
formPanel
.
getForm
();
form
.
on
(
'
validitychange
'
,
function
(
f
,
valid
)
{
submitBtn
.
setDisabled
(
!
valid
);
});
var
doRestore
=
function
(
url
,
params
)
{
PVE
.
Utils
.
API2Request
({
url
:
url
,
...
...
@@ -85,10 +81,11 @@ Ext.define('PVE.window.Restore', {
var
params
=
{
storage
:
storage
,
vmid
:
me
.
vmid
?
me
.
vmid
:
values
.
vmid
,
vmid
:
me
.
vmid
||
values
.
vmid
,
force
:
me
.
vmid
?
1
:
0
};
var
url
;
if
(
me
.
vmtype
===
'
openvz
'
)
{
url
=
'
/nodes/
'
+
me
.
nodename
+
'
/openvz
'
;
params
.
ostemplate
=
me
.
volid
;
...
...
@@ -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
"
;
Ext
.
apply
(
me
,
{
...
...
@@ -124,7 +125,7 @@ Ext.define('PVE.window.Restore', {
layout
:
'
auto
'
,
border
:
false
,
items
:
[
me
.
formPanel
],
buttons
:
[
submitBtn
]
,
buttons
:
[
submitBtn
]
});
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