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
61f53cab
Commit
61f53cab
authored
Aug 17, 2012
by
Alexandre Derumier
Committed by
Dietmar Maurer
Aug 23, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add rbd storage panel
Signed-off-by:
Alexandre Derumier
<
aderumier@odiso.com
>
parent
9c297419
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
152 additions
and
2 deletions
+152
-2
Makefile
www/manager/Makefile
+1
-0
StorageView.js
www/manager/dc/StorageView.js
+14
-2
RBDEdit.js
www/manager/storage/RBDEdit.js
+137
-0
No files found.
www/manager/Makefile
View file @
61f53cab
...
@@ -121,6 +121,7 @@ JSSRC= \
...
@@ -121,6 +121,7 @@ JSSRC= \
storage/NFSEdit.js
\
storage/NFSEdit.js
\
storage/IScsiEdit.js
\
storage/IScsiEdit.js
\
storage/LVMEdit.js
\
storage/LVMEdit.js
\
storage/RBDEdit.js
\
dc/Summary.js
\
dc/Summary.js
\
dc/OptionView.js
\
dc/OptionView.js
\
dc/StorageView.js
\
dc/StorageView.js
\
...
...
www/manager/dc/StorageView.js
View file @
61f53cab
...
@@ -40,6 +40,8 @@ Ext.define('PVE.dc.StorageView', {
...
@@ -40,6 +40,8 @@ Ext.define('PVE.dc.StorageView', {
editor
=
'
PVE.storage.LVMEdit
'
;
editor
=
'
PVE.storage.LVMEdit
'
;
}
else
if
(
type
===
'
iscsi
'
)
{
}
else
if
(
type
===
'
iscsi
'
)
{
editor
=
'
PVE.storage.IScsiEdit
'
;
editor
=
'
PVE.storage.IScsiEdit
'
;
}
else
if
(
type
===
'
rbd
'
)
{
editor
=
'
PVE.storage.RBDEdit
'
;
}
else
{
}
else
{
return
;
return
;
}
}
...
@@ -128,7 +130,17 @@ Ext.define('PVE.dc.StorageView', {
...
@@ -128,7 +130,17 @@ Ext.define('PVE.dc.StorageView', {
win
.
on
(
'
destroy
'
,
reload
);
win
.
on
(
'
destroy
'
,
reload
);
win
.
show
();
win
.
show
();
}
}
}
},
{
text
:
'
RBD
'
,
iconCls
:
'
pve-itype-icon-node
'
,
handler
:
function
()
{
var
win
=
Ext
.
create
(
'
PVE.storage.RBDEdit
'
,
{});
win
.
on
(
'
destroy
'
,
reload
);
win
.
show
();
}
},
]
]
})
})
},
},
...
@@ -203,4 +215,4 @@ Ext.define('PVE.dc.StorageView', {
...
@@ -203,4 +215,4 @@ Ext.define('PVE.dc.StorageView', {
idProperty
:
'
storage
'
idProperty
:
'
storage
'
});
});
});
});
\ No newline at end of file
www/manager/storage/RBDEdit.js
0 → 100644
View file @
61f53cab
Ext
.
define
(
'
PVE.storage.RBDInputPanel
'
,
{
extend
:
'
PVE.panel.InputPanel
'
,
onGetValues
:
function
(
values
)
{
var
me
=
this
;
if
(
me
.
create
)
{
values
.
type
=
'
rbd
'
;
values
.
content
=
'
images
'
;
}
else
{
delete
values
.
storage
;
}
values
.
disable
=
values
.
enable
?
0
:
1
;
delete
values
.
enable
;
return
values
;
},
initComponent
:
function
()
{
var
me
=
this
;
me
.
column1
=
[
{
xtype
:
me
.
create
?
'
textfield
'
:
'
displayfield
'
,
name
:
'
storage
'
,
height
:
22
,
// hack: set same height as text fields
value
:
me
.
storageId
||
''
,
fieldLabel
:
'
ID
'
,
vtype
:
'
StorageId
'
,
allowBlank
:
false
},
{
xtype
:
me
.
create
?
'
textfield
'
:
'
displayfield
'
,
height
:
22
,
// hack: set same height as text fields
name
:
'
pool
'
,
value
:
'
rbd
'
,
fieldLabel
:
gettext
(
'
Pool
'
),
allowBlank
:
false
},
{
xtype
:
me
.
create
?
'
textfield
'
:
'
displayfield
'
,
height
:
22
,
// hack: set same height as text fields
name
:
'
monhost
'
,
value
:
'
X.X.X.X:6789;X.X.X.X:6789;X.X.X.X:6789
'
,
fieldLabel
:
gettext
(
'
Monitor Host
'
),
allowBlank
:
false
},
{
xtype
:
me
.
create
?
'
textfield
'
:
'
displayfield
'
,
height
:
22
,
// hack: set same height as text fields
name
:
'
username
'
,
value
:
'
admin
'
,
fieldLabel
:
gettext
(
'
username
'
),
allowBlank
:
false
},
{
xtype
:
me
.
create
?
'
textfield
'
:
'
displayfield
'
,
height
:
22
,
// hack: set same height as text fields
name
:
'
authsupported
'
,
value
:
'
cephx;none
'
,
fieldLabel
:
gettext
(
'
authsupported
'
),
allowBlank
:
false
},
];
me
.
column2
=
[
{
xtype
:
'
pvecheckbox
'
,
name
:
'
enable
'
,
checked
:
true
,
uncheckedValue
:
0
,
fieldLabel
:
gettext
(
'
Enable
'
)
},
];
if
(
me
.
create
||
me
.
storageId
!==
'
local
'
)
{
me
.
column2
.
unshift
({
xtype
:
'
PVE.form.NodeSelector
'
,
name
:
'
nodes
'
,
fieldLabel
:
gettext
(
'
Nodes
'
),
emptyText
:
gettext
(
'
All
'
)
+
'
(
'
+
gettext
(
'
No restrictions
'
)
+
'
)
'
,
multiSelect
:
true
,
autoSelect
:
false
});
}
me
.
callParent
();
}
});
Ext
.
define
(
'
PVE.storage.RBDEdit
'
,
{
extend
:
'
PVE.window.Edit
'
,
initComponent
:
function
()
{
var
me
=
this
;
me
.
create
=
!
me
.
storageId
;
if
(
me
.
create
)
{
me
.
url
=
'
/api2/extjs/storage
'
;
me
.
method
=
'
POST
'
;
}
else
{
me
.
url
=
'
/api2/extjs/storage/
'
+
me
.
storageId
;
me
.
method
=
'
PUT
'
;
}
var
ipanel
=
Ext
.
create
(
'
PVE.storage.RBDInputPanel
'
,
{
create
:
me
.
create
,
storageId
:
me
.
storageId
});
Ext
.
apply
(
me
,
{
subject
:
'
RBD Storage
'
,
isAdd
:
true
,
items
:
[
ipanel
]
});
me
.
callParent
();
if
(
!
me
.
create
)
{
me
.
load
({
success
:
function
(
response
,
options
)
{
var
values
=
response
.
result
.
data
;
if
(
values
.
nodes
)
{
values
.
nodes
=
values
.
nodes
.
split
(
'
,
'
);
}
values
.
enable
=
values
.
disable
?
0
:
1
;
ipanel
.
setValues
(
values
);
}
});
}
}
});
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