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
df6e40ea
Commit
df6e40ea
authored
Jul 03, 2015
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
copy form/StorageSelector.js from manager to manager5
parent
94308622
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
116 additions
and
0 deletions
+116
-0
StorageSelector.js
www/manager5/form/StorageSelector.js
+116
-0
No files found.
www/manager5/form/StorageSelector.js
0 → 100644
View file @
df6e40ea
Ext
.
define
(
'
PVE.form.StorageSelector
'
,
{
extend
:
'
PVE.form.ComboGrid
'
,
alias
:
[
'
widget.PVE.form.StorageSelector
'
],
reloadStorageList
:
function
()
{
var
me
=
this
;
if
(
!
me
.
nodename
)
{
return
;
}
var
params
=
{};
var
url
=
'
/api2/json/nodes/
'
+
me
.
nodename
+
'
/storage
'
;
if
(
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
,
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
()
{
var
me
=
this
;
var
nodename
=
me
.
nodename
;
me
.
nodename
=
undefined
;
var
store
=
Ext
.
create
(
'
Ext.data.Store
'
,
{
model
:
'
pve-storage-status
'
,
sorters
:
{
property
:
'
storage
'
,
order
:
'
DESC
'
}
});
Ext
.
apply
(
me
,
{
store
:
store
,
allowBlank
:
false
,
valueField
:
'
storage
'
,
displayField
:
'
storage
'
,
listConfig
:
{
columns
:
[
{
header
:
gettext
(
'
Name
'
),
dataIndex
:
'
storage
'
,
hideable
:
false
,
flex
:
1
},
{
header
:
gettext
(
'
Type
'
),
width
:
60
,
dataIndex
:
'
type
'
},
{
header
:
gettext
(
'
Avail
'
),
width
:
80
,
dataIndex
:
'
avail
'
,
renderer
:
PVE
.
Utils
.
format_size
},
{
header
:
gettext
(
'
Capacity
'
),
width
:
80
,
dataIndex
:
'
total
'
,
renderer
:
PVE
.
Utils
.
format_size
}
]
}
});
me
.
callParent
();
if
(
nodename
)
{
me
.
setNodename
(
nodename
);
}
}
},
function
()
{
Ext
.
define
(
'
pve-storage-status
'
,
{
extend
:
'
Ext.data.Model
'
,
fields
:
[
'
storage
'
,
'
active
'
,
'
type
'
,
'
avail
'
,
'
total
'
],
idProperty
:
'
storage
'
});
});
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