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
4b079564
Commit
4b079564
authored
Jul 03, 2015
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
copy form/FileSelector.js from manager to manager5
parent
de6bef43
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
76 additions
and
0 deletions
+76
-0
FileSelector.js
www/manager5/form/FileSelector.js
+76
-0
No files found.
www/manager5/form/FileSelector.js
0 → 100644
View file @
4b079564
Ext
.
define
(
'
PVE.form.FileSelector
'
,
{
extend
:
'
PVE.form.ComboGrid
'
,
alias
:
[
'
widget.pveFileSelector
'
],
setStorage
:
function
(
storage
,
nodename
)
{
var
me
=
this
;
var
change
=
false
;
if
(
storage
&&
(
me
.
storage
!==
storage
))
{
me
.
storage
=
storage
;
change
=
true
;
}
if
(
nodename
&&
(
me
.
nodename
!==
nodename
))
{
me
.
nodename
=
nodename
;
change
=
true
;
}
if
(
!
(
me
.
storage
&&
me
.
nodename
&&
change
))
{
return
;
}
var
url
=
'
/api2/json/nodes/
'
+
me
.
nodename
+
'
/storage/
'
+
me
.
storage
+
'
/content
'
;
if
(
me
.
storageContent
)
{
url
+=
'
?content=
'
+
me
.
storageContent
;
}
me
.
store
.
setProxy
({
type
:
'
pve
'
,
url
:
url
});
me
.
store
.
load
();
},
initComponent
:
function
()
{
var
me
=
this
;
var
store
=
Ext
.
create
(
'
Ext.data.Store
'
,
{
model
:
'
pve-storage-content
'
});
Ext
.
apply
(
me
,
{
store
:
store
,
allowBlank
:
false
,
autoSelect
:
false
,
valueField
:
'
volid
'
,
displayField
:
'
text
'
,
listConfig
:
{
columns
:
[
{
header
:
gettext
(
'
Name
'
),
dataIndex
:
'
text
'
,
hideable
:
false
,
flex
:
1
},
{
header
:
gettext
(
'
Format
'
),
width
:
60
,
dataIndex
:
'
format
'
},
{
header
:
gettext
(
'
Size
'
),
width
:
60
,
dataIndex
:
'
size
'
,
renderer
:
PVE
.
Utils
.
format_size
}
]
}
});
me
.
callParent
();
me
.
setStorage
(
me
.
storage
,
me
.
nodename
);
}
});
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