]>
git.proxmox.com Git - pve-manager.git/blob - www/manager6/ceph/FS.js
1 Ext
.define('PVE.CephCreateFS', {
2 extend
: 'Proxmox.window.Edit',
3 alias
: 'widget.pveCephCreateFS',
6 onlineHelp
: 'pveceph_fs_create',
12 setFSName: function(fsName
) {
15 if (fsName
=== '' || fsName
=== undefined) {
19 me
.url
= "/nodes/" + me
.nodename
+ "/ceph/fs/" + fsName
;
25 fieldLabel
: gettext('Name'),
29 change: function(f
, value
) {
30 this.up('pveCephCreateFS').setFSName(value
);
33 submitValue
: false, // already encoded in apicall URL
37 xtype
: 'proxmoxintegerfield',
38 fieldLabel
: 'Placement Groups',
47 xtype
: 'proxmoxcheckbox',
48 fieldLabel
: gettext('Add as Storage'),
53 'data-qtip': gettext('Add the new CephFS to the cluster storage configuration.'),
58 initComponent: function() {
62 throw "no node name specified";
70 Ext
.define('PVE.NodeCephFSPanel', {
71 extend
: 'Ext.panel.Panel',
72 xtype
: 'pveNodeCephFSPanel',
73 mixins
: ['Proxmox.Mixin.CBind'],
75 title
: gettext('CephFS'),
76 onlineHelp
: 'pveceph_fs',
82 nodename
: '{nodename}',
92 canCreateFS: function(get) {
93 return get('mdsCount') > 0;
101 emptyText
: Ext
.String
.format(gettext('No {0} configured.'), 'CephFS'),
103 xclass
: 'Ext.app.ViewController',
105 init: function(view
) {
106 view
.rstore
= Ext
.create('Proxmox.data.UpdateStore', {
111 storeid
: 'pve-ceph-fs',
114 url
: `/api2/json/nodes/${view.nodename}/ceph/fs`,
116 model
: 'pve-ceph-fs',
118 view
.setStore(Ext
.create('Proxmox.data.DiffStore', {
125 // manages the "install ceph?" overlay
126 PVE
.Utils
.monitor_ceph_installed(view
, view
.rstore
, view
.nodename
, true);
127 view
.on('destroy', () => view
.rstore
.stopUpdate());
130 onCreate: function() {
131 let view
= this.getView();
132 view
.rstore
.stopUpdate();
133 Ext
.create('PVE.CephCreateFS', {
135 nodename
: view
.nodename
,
137 destroy
: () => view
.rstore
.startUpdate(),
144 text
: gettext('Create CephFS'),
145 reference
: 'createButton',
148 disabled
: '{!canCreateFS}',
154 header
: gettext('Name'),
161 dataIndex
: 'data_pool',
164 header
: 'Metadata Pool',
166 dataIndex
: 'metadata_pool',
170 nodename
: '{nodename}',
174 xtype
: 'pveNodeCephMDSList',
175 title
: gettext('Metadata Servers'),
176 stateId
: 'grid-ceph-mds',
178 storeLoadCallback: function(store
, records
, success
) {
179 var vm
= this.getViewModel();
180 if (!success
|| !records
) {
181 vm
.set('mdsCount', 0);
185 for (const mds
of records
) {
186 if (mds
.data
.state
=== 'up:standby') {
190 vm
.set('mdsCount', count
);
193 nodename
: '{nodename}',
198 Ext
.define('pve-ceph-fs', {
199 extend
: 'Ext.data.Model',
200 fields
: ['name', 'data_pool', 'metadata_pool'],
203 url
: "/api2/json/nodes/localhost/ceph/fs",