[pve-devel] [PATCH RFC manager 2/2] ui: grid/Replication: change the default format of schedule text

Dominik Csapak d.csapak at proxmox.com
Thu Sep 10 14:57:09 CEST 2020


we want to sometimes elminiate the 'minute-only' syntax, so change
the defaults from '*/15' to the semantically identical '*:00/15'

make the replication edit window a bit wider to show the complete
empty text

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 www/manager6/grid/Replication.js | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/www/manager6/grid/Replication.js b/www/manager6/grid/Replication.js
index 19e67d90..c1f756b4 100644
--- a/www/manager6/grid/Replication.js
+++ b/www/manager6/grid/Replication.js
@@ -4,6 +4,7 @@ Ext.define('PVE.window.ReplicaEdit', {
 
     subject: gettext('Replication Job'),
 
+    width: 350,
 
     url: '/cluster/replication',
     method: 'POST',
@@ -35,7 +36,7 @@ Ext.define('PVE.window.ReplicaEdit', {
 	    {
 		xtype: 'pveCalendarEvent',
 		fieldLabel: gettext('Schedule'),
-		emptyText: '*/15 - ' + Ext.String.format(gettext('Every {0} minutes'), 15),
+		emptyText: '*:00/15 - ' + Ext.String.format(gettext('Every {0} minutes'), 15),
 		name: 'schedule'
 	    },
 	    {
@@ -74,7 +75,7 @@ Ext.define('PVE.window.ReplicaEdit', {
 
 		    PVE.Utils.delete_if_default(values, 'rate', '', me.isCreate);
 		    PVE.Utils.delete_if_default(values, 'disable', 0, me.isCreate);
-		    PVE.Utils.delete_if_default(values, 'schedule', '*/15', me.isCreate);
+		    PVE.Utils.delete_if_default(values, 'schedule', '*:00/15', me.isCreate);
 		    PVE.Utils.delete_if_default(values, 'comment', '', me.isCreate);
 
 		    if (me.isCreate) {
@@ -481,7 +482,7 @@ Ext.define('PVE.grid.ReplicaView', {
 	    'id', 'target', 'comment', 'rate', 'type',
 	    { name: 'guest', type: 'integer' },
 	    { name: 'jobnum', type: 'integer' },
-	    { name: 'schedule', defaultValue: '*/15' },
+	    { name: 'schedule', defaultValue: '*:00/15' },
 	    { name: 'disable', defaultValue: '' },
 	    { name: 'enabled', calculate: function(data) { return !data.disable; } }
 	]
-- 
2.20.1





More information about the pve-devel mailing list