[pve-devel] [PATCH manager 16/20] gui: ceph: rework OSD Create window

Dominik Csapak d.csapak at proxmox.com
Tue Jun 4 14:47:55 CEST 2019


to reflect the changes on the backend (no filestore, db/wal size)

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 www/manager6/ceph/OSD.js | 101 ++++++++++++++++++++++++++++++++++-------------
 1 file changed, 73 insertions(+), 28 deletions(-)

diff --git a/www/manager6/ceph/OSD.js b/www/manager6/ceph/OSD.js
index 7d656ae1..1711d7be 100644
--- a/www/manager6/ceph/OSD.js
+++ b/www/manager6/ceph/OSD.js
@@ -1,6 +1,6 @@
 Ext.define('PVE.CephCreateOsd', {
     extend: 'Proxmox.window.Edit',
-    alias: ['widget.pveCephCreateOsd'],
+    xtype: 'pveCephCreateOsd',
 
     subject: 'Ceph OSD',
 
@@ -22,35 +22,80 @@ Ext.define('PVE.CephCreateOsd', {
 	    method: 'POST',
 	    items: [
 		{
-		    xtype: 'pveDiskSelector',
-		    name: 'dev',
-		    nodename: me.nodename,
-		    diskType: 'unused',
-		    fieldLabel: gettext('Disk'),
-		    allowBlank: false
-		},
-		{
-		    xtype: 'pveDiskSelector',
-		    name: 'journal_dev',
-		    nodename: me.nodename,
-		    diskType: 'journal_disks',
-		    fieldLabel: gettext('Journal/DB Disk'),
-		    value: '',
-		    autoSelect: false,
-		    allowBlank: true,
-		    emptyText: 'use OSD disk'
-		},
-		{
-		    xtype: 'proxmoxcheckbox',
-		    name: 'bluestore',
-		    fieldLabel: 'Bluestore',
-		    uncheckedValue: '0',
-		    value: '1'
+		    xtype: 'inputpanel',
+		    column1: [
+			{
+			    xtype: 'pveDiskSelector',
+			    name: 'dev',
+			    nodename: me.nodename,
+			    diskType: 'unused',
+			    fieldLabel: gettext('Disk'),
+			    allowBlank: false
+			}
+		    ],
+		    column2: [
+			{
+			    xtype: 'pveDiskSelector',
+			    name: 'db_dev',
+			    nodename: me.nodename,
+			    diskType: 'journal_disks',
+			    fieldLabel: gettext('DB Disk'),
+			    value: '',
+			    autoSelect: false,
+			    allowBlank: true,
+			    emptyText: 'use OSD disk',
+			    listeners: {
+				change: function(field, val) {
+				    me.down('field[name=db_size]').setDisabled(!val);
+				}
+			    }
+			},
+			{
+			    xtype: 'numberfield',
+			    name: 'db_size',
+			    fieldLabel: gettext('DB size') + ' (GiB)',
+			    minValue: 1,
+			    maxValue: 128*1024,
+			    decimalPrecision: 2,
+			    allowBlank: true,
+			    disabled: true,
+			    emptyText: gettext('Automatic')
+			}
+		    ],
+		    advancedColumn1: [
+			{
+			    xtype: 'pveDiskSelector',
+			    name: 'wal_dev',
+			    nodename: me.nodename,
+			    diskType: 'journal_disks',
+			    fieldLabel: gettext('WAL Disk'),
+			    value: '',
+			    autoSelect: false,
+			    allowBlank: true,
+			    emptyText: 'use OSD/DB disk',
+			    listeners: {
+				change: function(field, val) {
+				    me.down('field[name=wal_size]').setDisabled(!val);
+				}
+			    }
+			},
+			{
+			    xtype: 'numberfield',
+			    name: 'wal_size',
+			    fieldLabel: gettext('WAL size') + ' (GiB)',
+			    minValue: 0.5,
+			    maxValue: 128*1024,
+			    decimalPrecision: 2,
+			    allowBlank: true,
+			    disabled: true,
+			    emptyText: gettext('Automatic')
+			}
+		    ]
 		}
-            ]
-        });
+	    ]
+	});
 
-        me.callParent();
+	me.callParent();
     }
 });
 
-- 
2.11.0





More information about the pve-devel mailing list