public inbox for [email protected]
help / color / mirror / Atom feedFrom: Murtuza Zabuawala <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: [pgAdmin4][RM#3073] Allow user to schedule without End date from UI
Date: Mon, 26 Feb 2018 20:16:27 +0530
Message-ID: <CAKKotZR-a320X7Jq30Nf+wWNk13z_TV-DLPsZNdaZHw9wj5oiQ@mail.gmail.com> (raw)
Hi,
PFA patch to fix the issue where user was not able to create pgAgent job
from UI without entering End date in schedule section.
--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
diff --git a/web/pgadmin/browser/server_groups/servers/pgagent/schedules/static/js/pga_schedule.js b/web/pgadmin/browser/server_groups/servers/pgagent/schedules/static/js/pga_schedule.js
index 6972dca..a88f9d0 100644
--- a/web/pgadmin/browser/server_groups/servers/pgagent/schedules/static/js/pga_schedule.js
+++ b/web/pgadmin/browser/server_groups/servers/pgagent/schedules/static/js/pga_schedule.js
@@ -464,18 +464,16 @@ define('pgadmin.node.pga_schedule', [
this.errorModel.unset('jscstart');
}
- val = this.get('jscend');
- if (_.isUndefined(val) || _.isNull(val) ||
- String(val).replace(/^\s+|\s+$/g, '') == '') {
- msg = gettext('Please enter the end time.');
- this.errorModel.set('jscend', msg);
- errMsg = errMsg || msg;
- } else {
- this.errorModel.unset('jscend');
- }
-
// End time must be greater than Start time
if(!errMsg) {
+ val = this.get('jscend');
+ // No further validation required if end date is not provided by
+ // the user
+ if (_.isUndefined(val) || _.isNull(val) ||
+ String(val).replace(/^\s+|\s+$/g, '') == '') {
+ return;
+ }
+
var start_time = this.get('jscstart'),
end_time = this.get('jscend'),
start_time_js = start_time.split(' '),
Attachments:
[text/plain] RM_3073.diff (1.4K, 3-RM_3073.diff)
download | inline diff:
diff --git a/web/pgadmin/browser/server_groups/servers/pgagent/schedules/static/js/pga_schedule.js b/web/pgadmin/browser/server_groups/servers/pgagent/schedules/static/js/pga_schedule.js
index 6972dca..a88f9d0 100644
--- a/web/pgadmin/browser/server_groups/servers/pgagent/schedules/static/js/pga_schedule.js
+++ b/web/pgadmin/browser/server_groups/servers/pgagent/schedules/static/js/pga_schedule.js
@@ -464,18 +464,16 @@ define('pgadmin.node.pga_schedule', [
this.errorModel.unset('jscstart');
}
- val = this.get('jscend');
- if (_.isUndefined(val) || _.isNull(val) ||
- String(val).replace(/^\s+|\s+$/g, '') == '') {
- msg = gettext('Please enter the end time.');
- this.errorModel.set('jscend', msg);
- errMsg = errMsg || msg;
- } else {
- this.errorModel.unset('jscend');
- }
-
// End time must be greater than Start time
if(!errMsg) {
+ val = this.get('jscend');
+ // No further validation required if end date is not provided by
+ // the user
+ if (_.isUndefined(val) || _.isNull(val) ||
+ String(val).replace(/^\s+|\s+$/g, '') == '') {
+ return;
+ }
+
var start_time = this.get('jscstart'),
end_time = this.get('jscend'),
start_time_js = start_time.split(' '),
view thread (14+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: [pgAdmin4][RM#3073] Allow user to schedule without End date from UI
In-Reply-To: <CAKKotZR-a320X7Jq30Nf+wWNk13z_TV-DLPsZNdaZHw9wj5oiQ@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox