]> git.datanom.net - omvzfs.git/blobdiff - gui/js/omv/module/admin/storage/zfs/Overview.js
Made it optional to use /dev/disk/by-path
[omvzfs.git] / gui / js / omv / module / admin / storage / zfs / Overview.js
index 9db8915221f4ce396ea2fb1738f7607a7cf9b2e2..7341205c6db9fb363423dc5922ba40bc01dfa1f6 100644 (file)
@@ -177,6 +177,14 @@ Ext.define("OMV.module.admin.storage.zfs.AddPool", {
                                ptype: "fieldinfo",
                                text: _("Optional mountpoint for the pool. Default is to use pool name.")
                        }]
+               },{
+                       xtype: "checkbox",
+                       name: "diskpath",
+                       fieldLabel: _("Disk-by-path"),
+                       plugins: [{
+                               ptype: "fieldinfo",
+                               text: _("Use /dev/disk/by-path when creating the pool. Recommended.")
+                       }]
                },{
                        xtype: "checkbox",
                        name: "force",
@@ -261,23 +269,33 @@ Ext.define("OMV.module.admin.storage.zfs.AddObject", {
                                        var sizeField = this.findField("size");
                                        var cloneField = this.findField("clonename");
                                        var nameField = this.findField("name");
+                                       var mountField = this.findField("mountpoint");
                                        switch(value) {
+                                               case "filesystem":
+                                                       sizeField.hide();
+                                                       sizeField.allowBlank = true;
+                                                       cloneField.hide();
+                                                       nameField.show();
+                                                       mountField.show();
                                                case "volume":
                                                        sizeField.show();
                                                        sizeField.allowBlank = false;
                                                        cloneField.hide();
                                                        nameField.show();
+                                                       mountField.hide();
                                                break;
                                                case "clone":
                                                        sizeField.hide();
                                                        sizeField.allowBlank = true;
                                                        cloneField.show();
                                                        nameField.hide();
+                                                       mountField.hide();
                                                default:
                                                        sizeField.hide();
                                                        sizeField.allowBlank = true;
                                                        cloneField.hide();
                                                        nameField.show();
+                                                       mountField.hide();
                                                break;
                                        }
                                        sizeField.validate();
@@ -324,6 +342,26 @@ Ext.define("OMV.module.admin.storage.zfs.AddObject", {
                                        }
                                }
                        }
+               },{
+                       xtype: "textfield",
+                       name: "mountpoint",
+                       fieldLabel: _("Mountpoint"),
+                       allowBlank: true,
+                       plugins: [{
+                               ptype: "fieldinfo",
+                               text: _("Optional mountpoint of the filesystem. If left blank parent mountpoint will be prepended to name of the filesystem.")
+                       }],
+                       listeners: {
+                               scope: me,
+                               beforerender: function(e, eOpts) {
+                                       var mountField = this.findField("mountpoint");
+                                       if (combodata[0][0] === "filesystem") {
+                                               mountField.show();
+                                       } else {
+                                               mountField.hide();
+                                       }
+                               }
+                       }
                },{
                        xtype: "textfield",
                        name: "clonename",
@@ -497,6 +535,14 @@ Ext.define("OMV.module.admin.storage.zfs.ExpandPool", {
                                        flex: 1
                                }]
                        }
+               },{
+                       xtype: "checkbox",
+                       name: "diskpath",
+                       fieldLabel: _("Disk-by-path"),
+                       plugins: [{
+                               ptype: "fieldinfo",
+                               text: _("Use /dev/disk/by-path when creating the vdev. Recommended.")
+                       }]
                },{
                        xtype: "checkbox",
                        name: "force",
This page took 0.038001 seconds and 5 git commands to generate.