Thread: PATCH: pgAgent support

PATCH: pgAgent support

From
Ashesh Vashi
Date:
Hi Dave,

Please find the patch for support for paAgent in pgAdmin 4.

I have also attached another patch for miscellaneous fixes, and adding new controls.
It includes:
- Added DatetimepickerControl, MomentCell (using moment.js)
- Used the 'DatetimepickerControl' in Role (Also - resolved an issue, when unset the datetime for 'Valid Until'.)
- Added a 'Select All/Unselect All' adaptor for Select2 used by pgAgent nodes.
- Fixed an issue with SubNodeCollectionControl, which was not starting the modification session of the child model, when created default value for collection is not null/undefined. And, hence - validation on the child model was not working.
- Fixed a memory leak with SqlFieldControl, and SqlTabControl, which was not releasing the CodeMirror properly.

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company


http://www.linkedin.com/in/asheshvashi

Attachment

Re: PATCH: pgAgent support

From
Dave Page
Date:
Hi

On Thu, Sep 22, 2016 at 11:47 AM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote:
Hi Dave,

Please find the patch for support for paAgent in pgAdmin 4.

Did you forget the binary switch?

piranha:web dpage$ git apply --binary ~/Downloads/pgagent_v2.patch 
error: cannot apply binary patch to 'web/pgadmin/browser/server_groups/servers/pgAgent/schedules/static/img/coll-pga_schedule.png' without full index line
error: web/pgadmin/browser/server_groups/servers/pgAgent/schedules/static/img/coll-pga_schedule.png: patch does not apply
error: cannot apply binary patch to 'web/pgadmin/browser/server_groups/servers/pgAgent/schedules/static/img/pga_schedule.png' without full index line
error: web/pgadmin/browser/server_groups/servers/pgAgent/schedules/static/img/pga_schedule.png: patch does not apply
error: cannot apply binary patch to 'web/pgadmin/browser/server_groups/servers/pgAgent/static/img/coll-pga_job.png' without full index line
error: web/pgadmin/browser/server_groups/servers/pgAgent/static/img/coll-pga_job.png: patch does not apply
error: cannot apply binary patch to 'web/pgadmin/browser/server_groups/servers/pgAgent/static/img/pga_job-disabled.png' without full index line
error: web/pgadmin/browser/server_groups/servers/pgAgent/static/img/pga_job-disabled.png: patch does not apply
error: cannot apply binary patch to 'web/pgadmin/browser/server_groups/servers/pgAgent/static/img/pga_job.png' without full index line
error: web/pgadmin/browser/server_groups/servers/pgAgent/static/img/pga_job.png: patch does not apply
error: cannot apply binary patch to 'web/pgadmin/browser/server_groups/servers/pgAgent/steps/static/img/coll-pga_jobstep.png' without full index line
error: web/pgadmin/browser/server_groups/servers/pgAgent/steps/static/img/coll-pga_jobstep.png: patch does not apply
error: cannot apply binary patch to 'web/pgadmin/browser/server_groups/servers/pgAgent/steps/static/img/pga_jobstep.png' without full index line
error: web/pgadmin/browser/server_groups/servers/pgAgent/steps/static/img/pga_jobstep.png: patch does not apply 

I have also attached another patch for miscellaneous fixes, and adding new controls.
It includes:
- Added DatetimepickerControl, MomentCell (using moment.js)
- Used the 'DatetimepickerControl' in Role (Also - resolved an issue, when unset the datetime for 'Valid Until'.)
- Added a 'Select All/Unselect All' adaptor for Select2 used by pgAgent nodes.
- Fixed an issue with SubNodeCollectionControl, which was not starting the modification session of the child model, when created default value for collection is not null/undefined. And, hence - validation on the child model was not working.
- Fixed a memory leak with SqlFieldControl, and SqlTabControl, which was not releasing the CodeMirror properly.

Urgh, that's big. Applied - but can you look at the following please? 

- Account expires has a hint of 'MMM D YYYY HH:mm:ss.SSS Z". Are milliseconds really needed? I also get 00 as a fractional timezone offset. Perhaps we should hide that, when it's 00?

- The date format differs from the ISO format displayed by the query tool. They should be consistent - and really should be either based on the client's locale settings, or ISO format.

Thanks.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Re: PATCH: pgAgent support

From
Ashesh Vashi
Date:

I sent an updated patch immediately.


On Sep 22, 2016 20:01, "Dave Page" <dpage@pgadmin.org> wrote:
Hi

On Thu, Sep 22, 2016 at 11:47 AM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote:
Hi Dave,

Please find the patch for support for paAgent in pgAdmin 4.

Did you forget the binary switch?

piranha:web dpage$ git apply --binary ~/Downloads/pgagent_v2.patch 
error: cannot apply binary patch to 'web/pgadmin/browser/server_groups/servers/pgAgent/schedules/static/img/coll-pga_schedule.png' without full index line
error: web/pgadmin/browser/server_groups/servers/pgAgent/schedules/static/img/coll-pga_schedule.png: patch does not apply
error: cannot apply binary patch to 'web/pgadmin/browser/server_groups/servers/pgAgent/schedules/static/img/pga_schedule.png' without full index line
error: web/pgadmin/browser/server_groups/servers/pgAgent/schedules/static/img/pga_schedule.png: patch does not apply
error: cannot apply binary patch to 'web/pgadmin/browser/server_groups/servers/pgAgent/static/img/coll-pga_job.png' without full index line
error: web/pgadmin/browser/server_groups/servers/pgAgent/static/img/coll-pga_job.png: patch does not apply
error: cannot apply binary patch to 'web/pgadmin/browser/server_groups/servers/pgAgent/static/img/pga_job-disabled.png' without full index line
error: web/pgadmin/browser/server_groups/servers/pgAgent/static/img/pga_job-disabled.png: patch does not apply
error: cannot apply binary patch to 'web/pgadmin/browser/server_groups/servers/pgAgent/static/img/pga_job.png' without full index line
error: web/pgadmin/browser/server_groups/servers/pgAgent/static/img/pga_job.png: patch does not apply
error: cannot apply binary patch to 'web/pgadmin/browser/server_groups/servers/pgAgent/steps/static/img/coll-pga_jobstep.png' without full index line
error: web/pgadmin/browser/server_groups/servers/pgAgent/steps/static/img/coll-pga_jobstep.png: patch does not apply
error: cannot apply binary patch to 'web/pgadmin/browser/server_groups/servers/pgAgent/steps/static/img/pga_jobstep.png' without full index line
error: web/pgadmin/browser/server_groups/servers/pgAgent/steps/static/img/pga_jobstep.png: patch does not apply 

I have also attached another patch for miscellaneous fixes, and adding new controls.
It includes:
- Added DatetimepickerControl, MomentCell (using moment.js)
- Used the 'DatetimepickerControl' in Role (Also - resolved an issue, when unset the datetime for 'Valid Until'.)
- Added a 'Select All/Unselect All' adaptor for Select2 used by pgAgent nodes.
- Fixed an issue with SubNodeCollectionControl, which was not starting the modification session of the child model, when created default value for collection is not null/undefined. And, hence - validation on the child model was not working.
- Fixed a memory leak with SqlFieldControl, and SqlTabControl, which was not releasing the CodeMirror properly.

Urgh, that's big. Applied - but can you look at the following please? 

- Account expires has a hint of 'MMM D YYYY HH:mm:ss.SSS Z". Are milliseconds really needed? I also get 00 as a fractional timezone offset. Perhaps we should hide that, when it's 00?

- The date format differs from the ISO format displayed by the query tool. They should be consistent - and really should be either based on the client's locale settings, or ISO format.

Thanks.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Re: PATCH: pgAgent support

From
Dave Page
Date:
Hmm - that was clearly hiding from me. I'll take a look now.

Did you see the rest of my comments?

On Thu, Sep 22, 2016 at 3:37 PM, Ashesh Vashi
<ashesh.vashi@enterprisedb.com> wrote:
> I sent an updated patch immediately.
>
>
> On Sep 22, 2016 20:01, "Dave Page" <dpage@pgadmin.org> wrote:
>>
>> Hi
>>
>> On Thu, Sep 22, 2016 at 11:47 AM, Ashesh Vashi
>> <ashesh.vashi@enterprisedb.com> wrote:
>>>
>>> Hi Dave,
>>>
>>> Please find the patch for support for paAgent in pgAdmin 4.
>>
>>
>> Did you forget the binary switch?
>>
>> piranha:web dpage$ git apply --binary ~/Downloads/pgagent_v2.patch
>> error: cannot apply binary patch to
>> 'web/pgadmin/browser/server_groups/servers/pgAgent/schedules/static/img/coll-pga_schedule.png'
>> without full index line
>> error:
>> web/pgadmin/browser/server_groups/servers/pgAgent/schedules/static/img/coll-pga_schedule.png:
>> patch does not apply
>> error: cannot apply binary patch to
>> 'web/pgadmin/browser/server_groups/servers/pgAgent/schedules/static/img/pga_schedule.png'
>> without full index line
>> error:
>> web/pgadmin/browser/server_groups/servers/pgAgent/schedules/static/img/pga_schedule.png:
>> patch does not apply
>> error: cannot apply binary patch to
>> 'web/pgadmin/browser/server_groups/servers/pgAgent/static/img/coll-pga_job.png'
>> without full index line
>> error:
>> web/pgadmin/browser/server_groups/servers/pgAgent/static/img/coll-pga_job.png:
>> patch does not apply
>> error: cannot apply binary patch to
>> 'web/pgadmin/browser/server_groups/servers/pgAgent/static/img/pga_job-disabled.png'
>> without full index line
>> error:
>> web/pgadmin/browser/server_groups/servers/pgAgent/static/img/pga_job-disabled.png:
>> patch does not apply
>> error: cannot apply binary patch to
>> 'web/pgadmin/browser/server_groups/servers/pgAgent/static/img/pga_job.png'
>> without full index line
>> error:
>> web/pgadmin/browser/server_groups/servers/pgAgent/static/img/pga_job.png:
>> patch does not apply
>> error: cannot apply binary patch to
>> 'web/pgadmin/browser/server_groups/servers/pgAgent/steps/static/img/coll-pga_jobstep.png'
>> without full index line
>> error:
>> web/pgadmin/browser/server_groups/servers/pgAgent/steps/static/img/coll-pga_jobstep.png:
>> patch does not apply
>> error: cannot apply binary patch to
>> 'web/pgadmin/browser/server_groups/servers/pgAgent/steps/static/img/pga_jobstep.png'
>> without full index line
>> error:
>> web/pgadmin/browser/server_groups/servers/pgAgent/steps/static/img/pga_jobstep.png:
>> patch does not apply
>>>
>>>
>>> I have also attached another patch for miscellaneous fixes, and adding
>>> new controls.
>>> It includes:
>>> - Added DatetimepickerControl, MomentCell (using moment.js)
>>> - Used the 'DatetimepickerControl' in Role (Also - resolved an issue,
>>> when unset the datetime for 'Valid Until'.)
>>> - Added a 'Select All/Unselect All' adaptor for Select2 used by pgAgent
>>> nodes.
>>> - Fixed an issue with SubNodeCollectionControl, which was not starting
>>> the modification session of the child model, when created default value for
>>> collection is not null/undefined. And, hence - validation on the child model
>>> was not working.
>>> - Fixed a memory leak with SqlFieldControl, and SqlTabControl, which was
>>> not releasing the CodeMirror properly.
>>
>>
>> Urgh, that's big. Applied - but can you look at the following please?
>>
>> - Account expires has a hint of 'MMM D YYYY HH:mm:ss.SSS Z". Are
>> milliseconds really needed? I also get 00 as a fractional timezone offset.
>> Perhaps we should hide that, when it's 00?
>>
>> - The date format differs from the ISO format displayed by the query tool.
>> They should be consistent - and really should be either based on the
>> client's locale settings, or ISO format.
>>
>> Thanks.
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company



--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: PATCH: pgAgent support

From
Ashesh Vashi
Date:

Will look at them.


On Sep 22, 2016 20:08, "Dave Page" <dpage@pgadmin.org> wrote:
Hmm - that was clearly hiding from me. I'll take a look now.

Did you see the rest of my comments?

On Thu, Sep 22, 2016 at 3:37 PM, Ashesh Vashi
<ashesh.vashi@enterprisedb.com> wrote:
> I sent an updated patch immediately.
>
>
> On Sep 22, 2016 20:01, "Dave Page" <dpage@pgadmin.org> wrote:
>>
>> Hi
>>
>> On Thu, Sep 22, 2016 at 11:47 AM, Ashesh Vashi
>> <ashesh.vashi@enterprisedb.com> wrote:
>>>
>>> Hi Dave,
>>>
>>> Please find the patch for support for paAgent in pgAdmin 4.
>>
>>
>> Did you forget the binary switch?
>>
>> piranha:web dpage$ git apply --binary ~/Downloads/pgagent_v2.patch
>> error: cannot apply binary patch to
>> 'web/pgadmin/browser/server_groups/servers/pgAgent/schedules/static/img/coll-pga_schedule.png'
>> without full index line
>> error:
>> web/pgadmin/browser/server_groups/servers/pgAgent/schedules/static/img/coll-pga_schedule.png:
>> patch does not apply
>> error: cannot apply binary patch to
>> 'web/pgadmin/browser/server_groups/servers/pgAgent/schedules/static/img/pga_schedule.png'
>> without full index line
>> error:
>> web/pgadmin/browser/server_groups/servers/pgAgent/schedules/static/img/pga_schedule.png:
>> patch does not apply
>> error: cannot apply binary patch to
>> 'web/pgadmin/browser/server_groups/servers/pgAgent/static/img/coll-pga_job.png'
>> without full index line
>> error:
>> web/pgadmin/browser/server_groups/servers/pgAgent/static/img/coll-pga_job.png:
>> patch does not apply
>> error: cannot apply binary patch to
>> 'web/pgadmin/browser/server_groups/servers/pgAgent/static/img/pga_job-disabled.png'
>> without full index line
>> error:
>> web/pgadmin/browser/server_groups/servers/pgAgent/static/img/pga_job-disabled.png:
>> patch does not apply
>> error: cannot apply binary patch to
>> 'web/pgadmin/browser/server_groups/servers/pgAgent/static/img/pga_job.png'
>> without full index line
>> error:
>> web/pgadmin/browser/server_groups/servers/pgAgent/static/img/pga_job.png:
>> patch does not apply
>> error: cannot apply binary patch to
>> 'web/pgadmin/browser/server_groups/servers/pgAgent/steps/static/img/coll-pga_jobstep.png'
>> without full index line
>> error:
>> web/pgadmin/browser/server_groups/servers/pgAgent/steps/static/img/coll-pga_jobstep.png:
>> patch does not apply
>> error: cannot apply binary patch to
>> 'web/pgadmin/browser/server_groups/servers/pgAgent/steps/static/img/pga_jobstep.png'
>> without full index line
>> error:
>> web/pgadmin/browser/server_groups/servers/pgAgent/steps/static/img/pga_jobstep.png:
>> patch does not apply
>>>
>>>
>>> I have also attached another patch for miscellaneous fixes, and adding
>>> new controls.
>>> It includes:
>>> - Added DatetimepickerControl, MomentCell (using moment.js)
>>> - Used the 'DatetimepickerControl' in Role (Also - resolved an issue,
>>> when unset the datetime for 'Valid Until'.)
>>> - Added a 'Select All/Unselect All' adaptor for Select2 used by pgAgent
>>> nodes.
>>> - Fixed an issue with SubNodeCollectionControl, which was not starting
>>> the modification session of the child model, when created default value for
>>> collection is not null/undefined. And, hence - validation on the child model
>>> was not working.
>>> - Fixed a memory leak with SqlFieldControl, and SqlTabControl, which was
>>> not releasing the CodeMirror properly.
>>
>>
>> Urgh, that's big. Applied - but can you look at the following please?
>>
>> - Account expires has a hint of 'MMM D YYYY HH:mm:ss.SSS Z". Are
>> milliseconds really needed? I also get 00 as a fractional timezone offset.
>> Perhaps we should hide that, when it's 00?
>>
>> - The date format differs from the ISO format displayed by the query tool.
>> They should be consistent - and really should be either based on the
>> client's locale settings, or ISO format.
>>
>> Thanks.
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company



--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Re: PATCH: pgAgent support

From
Dave Page
Date:
Thanks. From the pgAgent patch:

- The date/time format is different again. Should be locale or ISO
(consistent across the app)

- I think we need to add hints under the less obvious options - e.g.
Job class and host agent

- On the job step subnode control, lets move the Script to it's own
tab (called Code). We should alter the label based on the Kind option
- either "SQL query" or "Script"

- Why can't we use the Date/time picker for Exceptions? I assume we
just need to either disable Date or Time selection?

- The SQL tab doesn't use the available space. See screenshot.

- The SQL should have blank lines between sections, e.g. before --
Steps and -- Schedules


On Thu, Sep 22, 2016 at 3:49 PM, Ashesh Vashi
<ashesh.vashi@enterprisedb.com> wrote:
> Will look at them.
>
>
> On Sep 22, 2016 20:08, "Dave Page" <dpage@pgadmin.org> wrote:
>>
>> Hmm - that was clearly hiding from me. I'll take a look now.
>>
>> Did you see the rest of my comments?
>>
>> On Thu, Sep 22, 2016 at 3:37 PM, Ashesh Vashi
>> <ashesh.vashi@enterprisedb.com> wrote:
>> > I sent an updated patch immediately.
>> >
>> >
>> > On Sep 22, 2016 20:01, "Dave Page" <dpage@pgadmin.org> wrote:
>> >>
>> >> Hi
>> >>
>> >> On Thu, Sep 22, 2016 at 11:47 AM, Ashesh Vashi
>> >> <ashesh.vashi@enterprisedb.com> wrote:
>> >>>
>> >>> Hi Dave,
>> >>>
>> >>> Please find the patch for support for paAgent in pgAdmin 4.
>> >>
>> >>
>> >> Did you forget the binary switch?
>> >>
>> >> piranha:web dpage$ git apply --binary ~/Downloads/pgagent_v2.patch
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/pgAgent/schedules/static/img/coll-pga_schedule.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/pgAgent/schedules/static/img/coll-pga_schedule.png:
>> >> patch does not apply
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/pgAgent/schedules/static/img/pga_schedule.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/pgAgent/schedules/static/img/pga_schedule.png:
>> >> patch does not apply
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/pgAgent/static/img/coll-pga_job.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/pgAgent/static/img/coll-pga_job.png:
>> >> patch does not apply
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/pgAgent/static/img/pga_job-disabled.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/pgAgent/static/img/pga_job-disabled.png:
>> >> patch does not apply
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/pgAgent/static/img/pga_job.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/pgAgent/static/img/pga_job.png:
>> >> patch does not apply
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/pgAgent/steps/static/img/coll-pga_jobstep.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/pgAgent/steps/static/img/coll-pga_jobstep.png:
>> >> patch does not apply
>> >> error: cannot apply binary patch to
>> >>
>> >> 'web/pgadmin/browser/server_groups/servers/pgAgent/steps/static/img/pga_jobstep.png'
>> >> without full index line
>> >> error:
>> >>
>> >> web/pgadmin/browser/server_groups/servers/pgAgent/steps/static/img/pga_jobstep.png:
>> >> patch does not apply
>> >>>
>> >>>
>> >>> I have also attached another patch for miscellaneous fixes, and adding
>> >>> new controls.
>> >>> It includes:
>> >>> - Added DatetimepickerControl, MomentCell (using moment.js)
>> >>> - Used the 'DatetimepickerControl' in Role (Also - resolved an issue,
>> >>> when unset the datetime for 'Valid Until'.)
>> >>> - Added a 'Select All/Unselect All' adaptor for Select2 used by
>> >>> pgAgent
>> >>> nodes.
>> >>> - Fixed an issue with SubNodeCollectionControl, which was not starting
>> >>> the modification session of the child model, when created default
>> >>> value for
>> >>> collection is not null/undefined. And, hence - validation on the child
>> >>> model
>> >>> was not working.
>> >>> - Fixed a memory leak with SqlFieldControl, and SqlTabControl, which
>> >>> was
>> >>> not releasing the CodeMirror properly.
>> >>
>> >>
>> >> Urgh, that's big. Applied - but can you look at the following please?
>> >>
>> >> - Account expires has a hint of 'MMM D YYYY HH:mm:ss.SSS Z". Are
>> >> milliseconds really needed? I also get 00 as a fractional timezone
>> >> offset.
>> >> Perhaps we should hide that, when it's 00?
>> >>
>> >> - The date format differs from the ISO format displayed by the query
>> >> tool.
>> >> They should be consistent - and really should be either based on the
>> >> client's locale settings, or ISO format.
>> >>
>> >> Thanks.
>> >>
>> >> --
>> >> Dave Page
>> >> Blog: http://pgsnake.blogspot.com
>> >> Twitter: @pgsnake
>> >>
>> >> EnterpriseDB UK: http://www.enterprisedb.com
>> >> The Enterprise PostgreSQL Company
>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company



--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: PATCH: pgAgent support

From
Ashesh Vashi
Date:

Hi Dave,


On Thu, Sep 22, 2016 at 8:01 PM, Dave Page <dpage@pgadmin.org> wrote:

Hi

On Thu, Sep 22, 2016 at 11:47 AM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote:
Hi Dave,

Please find the patch for support for paAgent in pgAdmin 4.

Did you forget the binary switch?

piranha:web dpage$ git apply --binary ~/Downloads/pgagent_v2.patch 
error: cannot apply binary patch to 'web/pgadmin/browser/server_groups/servers/pgAgent/schedules/static/img/coll-pga_schedule.png' without full index line
error: web/pgadmin/browser/server_groups/servers/pgAgent/schedules/static/img/coll-pga_schedule.png: patch does not apply
error: cannot apply binary patch to 'web/pgadmin/browser/server_groups/servers/pgAgent/schedules/static/img/pga_schedule.png' without full index line
error: web/pgadmin/browser/server_groups/servers/pgAgent/schedules/static/img/pga_schedule.png: patch does not apply
error: cannot apply binary patch to 'web/pgadmin/browser/server_groups/servers/pgAgent/static/img/coll-pga_job.png' without full index line
error: web/pgadmin/browser/server_groups/servers/pgAgent/static/img/coll-pga_job.png: patch does not apply
error: cannot apply binary patch to 'web/pgadmin/browser/server_groups/servers/pgAgent/static/img/pga_job-disabled.png' without full index line
error: web/pgadmin/browser/server_groups/servers/pgAgent/static/img/pga_job-disabled.png: patch does not apply
error: cannot apply binary patch to 'web/pgadmin/browser/server_groups/servers/pgAgent/static/img/pga_job.png' without full index line
error: web/pgadmin/browser/server_groups/servers/pgAgent/static/img/pga_job.png: patch does not apply
error: cannot apply binary patch to 'web/pgadmin/browser/server_groups/servers/pgAgent/steps/static/img/coll-pga_jobstep.png' without full index line
error: web/pgadmin/browser/server_groups/servers/pgAgent/steps/static/img/coll-pga_jobstep.png: patch does not apply
error: cannot apply binary patch to 'web/pgadmin/browser/server_groups/servers/pgAgent/steps/static/img/pga_jobstep.png' without full index line
error: web/pgadmin/browser/server_groups/servers/pgAgent/steps/static/img/pga_jobstep.png: patch does not apply 

I have also attached another patch for miscellaneous fixes, and adding new controls.
It includes:
- Added DatetimepickerControl, MomentCell (using moment.js)
- Used the 'DatetimepickerControl' in Role (Also - resolved an issue, when unset the datetime for 'Valid Until'.)
- Added a 'Select All/Unselect All' adaptor for Select2 used by pgAgent nodes.
- Fixed an issue with SubNodeCollectionControl, which was not starting the modification session of the child model, when created default value for collection is not null/undefined. And, hence - validation on the child model was not working.
- Fixed a memory leak with SqlFieldControl, and SqlTabControl, which was not releasing the CodeMirror properly.

Urgh, that's big.
I know.
That's reason - I was reluctant to send earlier. 
Applied - but can you look at the following please? 

- Account expires has a hint of 'MMM D YYYY HH:mm:ss.SSS Z". Are milliseconds really needed? I also get 00 as a fractional timezone offset. Perhaps we should hide that, when it's 00?
Changed to 'YYYY-MM-DD HH:mm:ss Z'. 

- The date format differs from the ISO format displayed by the query tool. They should be consistent - and really should be either based on the client's locale settings, or ISO format.
Done

--
Thanks & Regards,

Ashesh Vashi

Thanks.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Attachment

Re: PATCH: pgAgent support

From
Dave Page
Date:
Thanks, applied.

On Fri, Sep 23, 2016 at 7:33 AM, Ashesh Vashi
<ashesh.vashi@enterprisedb.com> wrote:
> Hi Dave,
>
>
> On Thu, Sep 22, 2016 at 8:01 PM, Dave Page <dpage@pgadmin.org> wrote:
>>
>> Hi
>>
>> On Thu, Sep 22, 2016 at 11:47 AM, Ashesh Vashi
>> <ashesh.vashi@enterprisedb.com> wrote:
>>>
>>> Hi Dave,
>>>
>>> Please find the patch for support for paAgent in pgAdmin 4.
>>
>>
>> Did you forget the binary switch?
>>
>> piranha:web dpage$ git apply --binary ~/Downloads/pgagent_v2.patch
>> error: cannot apply binary patch to
>> 'web/pgadmin/browser/server_groups/servers/pgAgent/schedules/static/img/coll-pga_schedule.png'
>> without full index line
>> error:
>> web/pgadmin/browser/server_groups/servers/pgAgent/schedules/static/img/coll-pga_schedule.png:
>> patch does not apply
>> error: cannot apply binary patch to
>> 'web/pgadmin/browser/server_groups/servers/pgAgent/schedules/static/img/pga_schedule.png'
>> without full index line
>> error:
>> web/pgadmin/browser/server_groups/servers/pgAgent/schedules/static/img/pga_schedule.png:
>> patch does not apply
>> error: cannot apply binary patch to
>> 'web/pgadmin/browser/server_groups/servers/pgAgent/static/img/coll-pga_job.png'
>> without full index line
>> error:
>> web/pgadmin/browser/server_groups/servers/pgAgent/static/img/coll-pga_job.png:
>> patch does not apply
>> error: cannot apply binary patch to
>> 'web/pgadmin/browser/server_groups/servers/pgAgent/static/img/pga_job-disabled.png'
>> without full index line
>> error:
>> web/pgadmin/browser/server_groups/servers/pgAgent/static/img/pga_job-disabled.png:
>> patch does not apply
>> error: cannot apply binary patch to
>> 'web/pgadmin/browser/server_groups/servers/pgAgent/static/img/pga_job.png'
>> without full index line
>> error:
>> web/pgadmin/browser/server_groups/servers/pgAgent/static/img/pga_job.png:
>> patch does not apply
>> error: cannot apply binary patch to
>> 'web/pgadmin/browser/server_groups/servers/pgAgent/steps/static/img/coll-pga_jobstep.png'
>> without full index line
>> error:
>> web/pgadmin/browser/server_groups/servers/pgAgent/steps/static/img/coll-pga_jobstep.png:
>> patch does not apply
>> error: cannot apply binary patch to
>> 'web/pgadmin/browser/server_groups/servers/pgAgent/steps/static/img/pga_jobstep.png'
>> without full index line
>> error:
>> web/pgadmin/browser/server_groups/servers/pgAgent/steps/static/img/pga_jobstep.png:
>> patch does not apply
>>>
>>>
>>> I have also attached another patch for miscellaneous fixes, and adding
>>> new controls.
>>> It includes:
>>> - Added DatetimepickerControl, MomentCell (using moment.js)
>>> - Used the 'DatetimepickerControl' in Role (Also - resolved an issue,
>>> when unset the datetime for 'Valid Until'.)
>>> - Added a 'Select All/Unselect All' adaptor for Select2 used by pgAgent
>>> nodes.
>>> - Fixed an issue with SubNodeCollectionControl, which was not starting
>>> the modification session of the child model, when created default value for
>>> collection is not null/undefined. And, hence - validation on the child model
>>> was not working.
>>> - Fixed a memory leak with SqlFieldControl, and SqlTabControl, which was
>>> not releasing the CodeMirror properly.
>>
>>
>> Urgh, that's big.
>
> I know.
> That's reason - I was reluctant to send earlier.
>>
>> Applied - but can you look at the following please?
>>
>> - Account expires has a hint of 'MMM D YYYY HH:mm:ss.SSS Z". Are
>> milliseconds really needed? I also get 00 as a fractional timezone offset.
>> Perhaps we should hide that, when it's 00?
>
> Changed to 'YYYY-MM-DD HH:mm:ss Z'.
>>
>>
>> - The date format differs from the ISO format displayed by the query tool.
>> They should be consistent - and really should be either based on the
>> client's locale settings, or ISO format.
>
> Done
>
> --
> Thanks & Regards,
>
> Ashesh Vashi
>>
>>
>> Thanks.
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>
>



--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: PATCH: pgAgent support

From
Ashesh Vashi
Date:
Thanks - working on the rest of the comments.

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company


http://www.linkedin.com/in/asheshvashi


On Fri, Sep 23, 2016 at 2:40 PM, Dave Page <dpage@pgadmin.org> wrote:
Thanks, applied.

On Fri, Sep 23, 2016 at 7:33 AM, Ashesh Vashi
<ashesh.vashi@enterprisedb.com> wrote:
> Hi Dave,
>
>
> On Thu, Sep 22, 2016 at 8:01 PM, Dave Page <dpage@pgadmin.org> wrote:
>>
>> Hi
>>
>> On Thu, Sep 22, 2016 at 11:47 AM, Ashesh Vashi
>> <ashesh.vashi@enterprisedb.com> wrote:
>>>
>>> Hi Dave,
>>>
>>> Please find the patch for support for paAgent in pgAdmin 4.
>>
>>
>> Did you forget the binary switch?
>>
>> piranha:web dpage$ git apply --binary ~/Downloads/pgagent_v2.patch
>> error: cannot apply binary patch to
>> 'web/pgadmin/browser/server_groups/servers/pgAgent/schedules/static/img/coll-pga_schedule.png'
>> without full index line
>> error:
>> web/pgadmin/browser/server_groups/servers/pgAgent/schedules/static/img/coll-pga_schedule.png:
>> patch does not apply
>> error: cannot apply binary patch to
>> 'web/pgadmin/browser/server_groups/servers/pgAgent/schedules/static/img/pga_schedule.png'
>> without full index line
>> error:
>> web/pgadmin/browser/server_groups/servers/pgAgent/schedules/static/img/pga_schedule.png:
>> patch does not apply
>> error: cannot apply binary patch to
>> 'web/pgadmin/browser/server_groups/servers/pgAgent/static/img/coll-pga_job.png'
>> without full index line
>> error:
>> web/pgadmin/browser/server_groups/servers/pgAgent/static/img/coll-pga_job.png:
>> patch does not apply
>> error: cannot apply binary patch to
>> 'web/pgadmin/browser/server_groups/servers/pgAgent/static/img/pga_job-disabled.png'
>> without full index line
>> error:
>> web/pgadmin/browser/server_groups/servers/pgAgent/static/img/pga_job-disabled.png:
>> patch does not apply
>> error: cannot apply binary patch to
>> 'web/pgadmin/browser/server_groups/servers/pgAgent/static/img/pga_job.png'
>> without full index line
>> error:
>> web/pgadmin/browser/server_groups/servers/pgAgent/static/img/pga_job.png:
>> patch does not apply
>> error: cannot apply binary patch to
>> 'web/pgadmin/browser/server_groups/servers/pgAgent/steps/static/img/coll-pga_jobstep.png'
>> without full index line
>> error:
>> web/pgadmin/browser/server_groups/servers/pgAgent/steps/static/img/coll-pga_jobstep.png:
>> patch does not apply
>> error: cannot apply binary patch to
>> 'web/pgadmin/browser/server_groups/servers/pgAgent/steps/static/img/pga_jobstep.png'
>> without full index line
>> error:
>> web/pgadmin/browser/server_groups/servers/pgAgent/steps/static/img/pga_jobstep.png:
>> patch does not apply
>>>
>>>
>>> I have also attached another patch for miscellaneous fixes, and adding
>>> new controls.
>>> It includes:
>>> - Added DatetimepickerControl, MomentCell (using moment.js)
>>> - Used the 'DatetimepickerControl' in Role (Also - resolved an issue,
>>> when unset the datetime for 'Valid Until'.)
>>> - Added a 'Select All/Unselect All' adaptor for Select2 used by pgAgent
>>> nodes.
>>> - Fixed an issue with SubNodeCollectionControl, which was not starting
>>> the modification session of the child model, when created default value for
>>> collection is not null/undefined. And, hence - validation on the child model
>>> was not working.
>>> - Fixed a memory leak with SqlFieldControl, and SqlTabControl, which was
>>> not releasing the CodeMirror properly.
>>
>>
>> Urgh, that's big.
>
> I know.
> That's reason - I was reluctant to send earlier.
>>
>> Applied - but can you look at the following please?
>>
>> - Account expires has a hint of 'MMM D YYYY HH:mm:ss.SSS Z". Are
>> milliseconds really needed? I also get 00 as a fractional timezone offset.
>> Perhaps we should hide that, when it's 00?
>
> Changed to 'YYYY-MM-DD HH:mm:ss Z'.
>>
>>
>> - The date format differs from the ISO format displayed by the query tool.
>> They should be consistent - and really should be either based on the
>> client's locale settings, or ISO format.
>
> Done
>
> --
> Thanks & Regards,
>
> Ashesh Vashi
>>
>>
>> Thanks.
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>
>



--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Re: PATCH: pgAgent support

From
Ashesh Vashi
Date:

Hi Dave,


On Thu, Sep 22, 2016 at 8:27 PM, Dave Page <dpage@pgadmin.org> wrote:
Thanks. From the pgAgent patch:

- The date/time format is different again. Should be locale or ISO
(consistent across the app)
Using ISO now.

- I think we need to add hints under the less obvious options - e.g.
Job class and host agent
I added few string.
Will need your feedback on that. 

- On the job step subnode control, lets move the Script to it's own
tab (called Code). We should alter the label based on the Kind option
- either "SQL query" or "Script"
Done 

- Why can't we use the Date/time picker for Exceptions? I assume we
just need to either disable Date or Time selection?
Done.
 
I was avoiding to show date time picker for multiple reasons:
1. It needed a special effort to show datetime picker in the backgrid cell.
2. The datetime picker did not fit in the subnode control.

A special DatetimePickerCell was needed to be created the cell with datetime picker.
And, I had to specify the min-height in the exceptions tab as a hack. 

- The SQL tab doesn't use the available space. See screenshot.
Fixed.
 
This was a general issue for the properties dialog having more than 550px.
We have hardcoded the height to 500px of CodeMirror in the SQL tab. 

- The SQL should have blank lines between sections, e.g. before --
Steps and -- Schedules
Done. 

Also - fixed an issue of setting the helpMessage in SwitchControl.

Again - attaching two patches.
1. Misc changes
- Setting the CodeMirror height when panel is resized, which you had mentioned.
- Added a new CellEditor (DatetimePickerEditor) for datetime picker.
2. pgAgent support (updated)

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company



Attachment

Re: PATCH: pgAgent support

From
Dave Page
Date:
Hi

I've applied the misc changes patch, but it looks like you forgot the --binary option for the pgAgent patch. Can you recreate it please?

Thanks.

On Fri, Sep 23, 2016 at 9:34 PM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote:

Hi Dave,


On Thu, Sep 22, 2016 at 8:27 PM, Dave Page <dpage@pgadmin.org> wrote:
Thanks. From the pgAgent patch:

- The date/time format is different again. Should be locale or ISO
(consistent across the app)
Using ISO now.

- I think we need to add hints under the less obvious options - e.g.
Job class and host agent
I added few string.
Will need your feedback on that. 

- On the job step subnode control, lets move the Script to it's own
tab (called Code). We should alter the label based on the Kind option
- either "SQL query" or "Script"
Done 

- Why can't we use the Date/time picker for Exceptions? I assume we
just need to either disable Date or Time selection?
Done.
 
I was avoiding to show date time picker for multiple reasons:
1. It needed a special effort to show datetime picker in the backgrid cell.
2. The datetime picker did not fit in the subnode control.

A special DatetimePickerCell was needed to be created the cell with datetime picker.
And, I had to specify the min-height in the exceptions tab as a hack. 

- The SQL tab doesn't use the available space. See screenshot.
Fixed.
 
This was a general issue for the properties dialog having more than 550px.
We have hardcoded the height to 500px of CodeMirror in the SQL tab. 

- The SQL should have blank lines between sections, e.g. before --
Steps and -- Schedules
Done. 

Also - fixed an issue of setting the helpMessage in SwitchControl.

Again - attaching two patches.
1. Misc changes
- Setting the CodeMirror height when panel is resized, which you had mentioned.
- Added a new CellEditor (DatetimePickerEditor) for datetime picker.
2. pgAgent support (updated)

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company






--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Re: PATCH: pgAgent support

From
Ashesh Vashi
Date:
On Mon, Sep 26, 2016 at 2:36 PM, Dave Page <dpage@pgadmin.org> wrote:
Hi

I've applied the misc changes patch, but it looks like you forgot the --binary option for the pgAgent patch. Can you recreate it please?

Oh my bad, please find the updated patch.

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company



Thanks.

On Fri, Sep 23, 2016 at 9:34 PM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote:

Hi Dave,


On Thu, Sep 22, 2016 at 8:27 PM, Dave Page <dpage@pgadmin.org> wrote:
Thanks. From the pgAgent patch:

- The date/time format is different again. Should be locale or ISO
(consistent across the app)
Using ISO now.

- I think we need to add hints under the less obvious options - e.g.
Job class and host agent
I added few string.
Will need your feedback on that. 

- On the job step subnode control, lets move the Script to it's own
tab (called Code). We should alter the label based on the Kind option
- either "SQL query" or "Script"
Done 

- Why can't we use the Date/time picker for Exceptions? I assume we
just need to either disable Date or Time selection?
Done.
 
I was avoiding to show date time picker for multiple reasons:
1. It needed a special effort to show datetime picker in the backgrid cell.
2. The datetime picker did not fit in the subnode control.

A special DatetimePickerCell was needed to be created the cell with datetime picker.
And, I had to specify the min-height in the exceptions tab as a hack. 

- The SQL tab doesn't use the available space. See screenshot.
Fixed.
 
This was a general issue for the properties dialog having more than 550px.
We have hardcoded the height to 500px of CodeMirror in the SQL tab. 

- The SQL should have blank lines between sections, e.g. before --
Steps and -- Schedules
Done. 

Also - fixed an issue of setting the helpMessage in SwitchControl.

Again - attaching two patches.
1. Misc changes
- Setting the CodeMirror height when panel is resized, which you had mentioned.
- Added a new CellEditor (DatetimePickerEditor) for datetime picker.
2. pgAgent support (updated)

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company






--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Attachment