GUI: add new vtype ConfigId, use it for snapshot names

This commit is contained in:
Dietmar Maurer 2015-10-12 08:09:34 +02:00
parent ac9336bc99
commit 24bf5bd4d4
5 changed files with 16 additions and 4 deletions

View File

@ -1,5 +1,7 @@
pve-manager (4.0-49) unstable; urgency=medium pve-manager (4.0-49) unstable; urgency=medium
* GUI: add new vtype ConfigId, use it for snapshot names
* IP4_cidr_match: allow short masks like /8 * IP4_cidr_match: allow short masks like /8
-- Proxmox Support Team <support@proxmox.com> Fri, 09 Oct 2015 08:16:55 +0200 -- Proxmox Support Team <support@proxmox.com> Fri, 09 Oct 2015 08:16:55 +0200

View File

@ -73,7 +73,12 @@ Ext.apply(Ext.form.field.VTypes, {
StorageId: function(v) { StorageId: function(v) {
return (/^[a-z][a-z0-9\-\_\.]*[a-z0-9]$/i).test(v); return (/^[a-z][a-z0-9\-\_\.]*[a-z0-9]$/i).test(v);
}, },
StorageIdText: gettext("Allowed characters") + ": 'a-z', '0-9', '-', '_', '.'", StorageIdText: gettext("Allowed characters") + ": 'A-Z', 'a-z', '0-9', '-', '_', '.'",
ConfigId: function(v) {
return (/^[a-z][a-z0-9\_]+$/i).test(v);
},
ConfigIdText: gettext("Allowed characters") + ": 'A-Z', 'a-z', '0-9', '_'",
HttpProxy: function(v) { HttpProxy: function(v) {
return (/^http:\/\/.*$/).test(v); return (/^http:\/\/.*$/).test(v);

View File

@ -71,7 +71,7 @@ Ext.define('PVE.window.LxcSnapshot', {
name: 'snapname', name: 'snapname',
value: me.snapname, value: me.snapname,
fieldLabel: gettext('Name'), fieldLabel: gettext('Name'),
vtype: 'StorageId', vtype: 'ConfigId',
allowBlank: false allowBlank: false
} }
]; ];

View File

@ -71,7 +71,7 @@ Ext.define('PVE.window.Snapshot', {
name: 'snapname', name: 'snapname',
value: me.snapname, value: me.snapname,
fieldLabel: gettext('Name'), fieldLabel: gettext('Name'),
vtype: 'StorageId', vtype: 'ConfigId',
allowBlank: false allowBlank: false
} }
]; ];

View File

@ -73,7 +73,12 @@ Ext.apply(Ext.form.field.VTypes, {
StorageId: function(v) { StorageId: function(v) {
return (/^[a-z][a-z0-9\-\_\.]*[a-z0-9]$/i).test(v); return (/^[a-z][a-z0-9\-\_\.]*[a-z0-9]$/i).test(v);
}, },
StorageIdText: gettext("Allowed characters") + ": 'a-z', '0-9', '-', '_', '.'", StorageIdText: gettext("Allowed characters") + ": 'A-Z', 'a-z', '0-9', '-', '_', '.'",
ConfigId: function(v) {
return (/^[a-z][a-z0-9\_]+$/i).test(v);
},
ConfigIdText: gettext("Allowed characters") + ": 'A-Z', 'a-z', '0-9', '_'",
HttpProxy: function(v) { HttpProxy: function(v) {
return (/^http:\/\/.*$/).test(v); return (/^http:\/\/.*$/).test(v);