On Wed, Jul 10, 2024 at 02:43:00PM GMT, Aaron Lauterer wrote: > [..] > www/manager6/ceph/ServiceList.js | 21 +++++++++++---------- > 1 file changed, 11 insertions(+), 10 deletions(-) > > diff --git a/www/manager6/ceph/ServiceList.js > b/www/manager6/ceph/ServiceList.js > index 76710146..9075f197 100644 > --- a/www/manager6/ceph/ServiceList.js > +++ b/www/manager6/ceph/ServiceList.js > [..] > @@ -40,15 +39,17 @@ Ext.define('PVE.CephCreateService', { > listeners: { > change: function(f, value) { > let view = this.up('pveCephCreateService'); > + view.lookup('mds-id').setValue(value); > view.setNode(value); > }, > }, > }, > { > xtype: 'textfield', > - fieldLabel: gettext('Extra ID'), > - regex: /[a-zA-Z0-9]+/, > - regexText: gettext('ID may only consist of alphanumeric > characters'), > + reference: 'mds-id', > + fieldLabel: gettext('MDS ID'), > + regex: /^([a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?)$/, > + regexText: gettext('ID may consist of alphanumeric characters and > hyphen. It cannot start with a number or end in a hyphen.'),
Is there a check in the backend whether the name ends with a hyphen? If not, should there be one? Also, while at it, maybe also set `maxLength` to a sensible value? E.g. while the API schema allows up to 200 characters, it then fails to create a task log file with "File name too long" :^) ~ 180 characters seem to be fine, but probably something like 128 characters is already a pretty sensible limit. > submitValue: false, > emptyText: Proxmox.Utils.NoneText, > cbind: { > @@ -58,7 +59,7 @@ Ext.define('PVE.CephCreateService', { > listeners: { > change: function(f, value) { > let view = this.up('pveCephCreateService'); > - view.setExtraID(value); > + view.setServiceID(value); > }, > }, > }, > @@ -73,7 +74,7 @@ Ext.define('PVE.CephCreateService', { > cbind: { > hidden: get => get('type') !== 'mds', > }, > - html: gettext('The Extra ID allows creating multiple MDS per node, > which increases redundancy with more than one CephFS.'), > + html: gettext('By using different IDs, you can have multiple MDS > per node, which increases redundancy with more than one CephFS.'), > }, > ], > > -- > 2.39.2 > > > > _______________________________________________ > pve-devel mailing list > pve-devel@lists.proxmox.com > https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel > > _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel