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
f98c8032
Commit
f98c8032
authored
May 14, 2013
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
StorageSelector: alow to use new target option
Useful for clone API to restrict storage list.
parent
1fd63606
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
8 deletions
+39
-8
StorageSelector.js
www/manager/form/StorageSelector.js
+35
-8
Clone.js
www/manager/qemu/Clone.js
+4
-0
No files found.
www/manager/form/StorageSelector.js
View file @
f98c8032
...
...
@@ -2,26 +2,53 @@ Ext.define('PVE.form.StorageSelector', {
extend
:
'
PVE.form.ComboGrid
'
,
alias
:
[
'
widget.PVE.form.StorageSelector
'
],
setNodename
:
function
(
nodename
)
{
reloadStorageList
:
function
(
)
{
var
me
=
this
;
if
(
!
nodename
||
(
me
.
nodename
===
nodename
))
{
if
(
!
me
.
nodename
)
{
return
;
}
me
.
nodename
=
nodename
;
var
params
=
{};
var
url
=
'
/api2/json/nodes/
'
+
me
.
nodename
+
'
/storage
'
;
if
(
me
.
storageContent
)
{
url
+=
'
?content=
'
+
me
.
storageContent
;
params
.
content
=
me
.
storageContent
;
}
if
(
me
.
targetNode
)
{
params
.
target
=
me
.
targetNode
;
params
.
enabled
=
1
;
// skip disabled storages
}
me
.
store
.
setProxy
({
type
:
'
pve
'
,
url
:
url
url
:
url
,
extraParams
:
params
});
me
.
store
.
load
();
},
setTargetNode
:
function
(
targetNode
)
{
var
me
=
this
;
if
(
!
targetNode
||
(
me
.
targetNode
===
targetNode
))
{
return
;
}
me
.
targetNode
=
targetNode
;
me
.
reloadStorageList
();
},
setNodename
:
function
(
nodename
)
{
var
me
=
this
;
if
(
!
nodename
||
(
me
.
nodename
===
nodename
))
{
return
;
}
me
.
nodename
=
nodename
;
me
.
reloadStorageList
();
},
initComponent
:
function
()
{
...
...
www/manager/qemu/Clone.js
View file @
f98c8032
...
...
@@ -204,6 +204,10 @@ Ext.define('PVE.window.Clone', {
});
me
.
targetSel
.
on
(
'
change
'
,
function
(
f
,
value
)
{
me
.
hdstoragesel
.
setTargetNode
(
value
);
});
me
.
formatsel
=
Ext
.
create
(
'
PVE.form.DiskFormatSelector
'
,
{
name
:
'
diskformat
'
,
fieldLabel
:
gettext
(
'
Format
'
),
...
...
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