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
3640326d
Commit
3640326d
authored
Jul 03, 2015
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
copy window/Backup.js from manager to manager5
parent
b00c92b7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
107 additions
and
0 deletions
+107
-0
Backup.js
www/manager5/window/Backup.js
+107
-0
No files found.
www/manager5/window/Backup.js
0 → 100644
View file @
3640326d
Ext
.
define
(
'
PVE.window.Backup
'
,
{
extend
:
'
Ext.window.Window
'
,
resizable
:
false
,
initComponent
:
function
()
{
var
me
=
this
;
if
(
!
me
.
nodename
)
{
throw
"
no node name specified
"
;
}
if
(
!
me
.
vmid
)
{
throw
"
no VM ID specified
"
;
}
if
(
!
me
.
vmtype
)
{
throw
"
no VM type specified
"
;
}
var
storagesel
=
Ext
.
create
(
'
PVE.form.StorageSelector
'
,
{
nodename
:
me
.
nodename
,
name
:
'
storage
'
,
value
:
me
.
storage
,
fieldLabel
:
gettext
(
'
Storage
'
),
storageContent
:
'
backup
'
,
allowBlank
:
false
});
me
.
formPanel
=
Ext
.
create
(
'
Ext.form.Panel
'
,
{
bodyPadding
:
10
,
border
:
false
,
fieldDefaults
:
{
labelWidth
:
100
,
anchor
:
'
100%
'
},
items
:
[
storagesel
,
{
xtype
:
'
pveBackupModeSelector
'
,
fieldLabel
:
gettext
(
'
Mode
'
),
value
:
'
snapshot
'
,
name
:
'
mode
'
},
{
xtype
:
'
pveCompressionSelector
'
,
name
:
'
compress
'
,
value
:
'
lzo
'
,
fieldLabel
:
gettext
(
'
Compression
'
)
}
]
});
var
form
=
me
.
formPanel
.
getForm
();
var
submitBtn
=
Ext
.
create
(
'
Ext.Button
'
,
{
text
:
gettext
(
'
Backup
'
),
handler
:
function
(){
var
storage
=
storagesel
.
getValue
();
var
values
=
form
.
getValues
();
var
params
=
{
storage
:
storage
,
vmid
:
me
.
vmid
,
mode
:
values
.
mode
,
remove
:
0
};
if
(
values
.
compress
)
{
params
.
compress
=
values
.
compress
;
}
PVE
.
Utils
.
API2Request
({
url
:
'
/nodes/
'
+
me
.
nodename
+
'
/vzdump
'
,
params
:
params
,
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
();
}
});
}
});
var
title
=
gettext
(
'
Backup
'
)
+
"
"
+
((
me
.
vmtype
===
'
openvz
'
)
?
"
CT
"
:
"
VM
"
)
+
"
"
+
me
.
vmid
;
Ext
.
apply
(
me
,
{
title
:
title
,
width
:
350
,
modal
:
true
,
layout
:
'
auto
'
,
border
:
false
,
items
:
[
me
.
formPanel
],
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