[pgAdmin][patch] Incorrect indentation in table python code

2021-07-29 Thread Aditya Toshniwal
Hi Hackers,

Attached patch fixes the indentation of a python code which can be a
potential bug.
Please review.

-- 
Thanks,
Aditya Toshniwal
pgAdmin hacker | Sr. Software Engineer | *edbpostgres.com*

"Don't Complain about Heat, Plant a TREE"


table.incorrect-indentation.patch
Description: Binary data


Re: [pgAdmin][patch] Incorrect indentation in table python code

2021-07-29 Thread Aditya Toshniwal
Hi Hackers,

Please ignore the previous patch. Attached is the updated one.
The patch aims - Fix potential buggy code in table python code.

On Thu, Jul 29, 2021 at 12:32 PM Aditya Toshniwal <
aditya.toshni...@enterprisedb.com> wrote:

> Hi Hackers,
>
> Attached patch fixes the indentation of a python code which can be a
> potential bug.
> Please review.
>
> --
> Thanks,
> Aditya Toshniwal
> pgAdmin hacker | Sr. Software Engineer | *edbpostgres.com*
> 
> "Don't Complain about Heat, Plant a TREE"
>


-- 
Thanks,
Aditya Toshniwal
pgAdmin hacker | Sr. Software Engineer | *edbpostgres.com*

"Don't Complain about Heat, Plant a TREE"


table.incorrect-indentation_v2.patch
Description: Binary data


[pgAdmin4] Questions about trigger properties's Fires in edit mode

2021-07-29 Thread zhangj...@fujitsu.com
Hi, all

In trigger's Properties screen, the 'fires' is disabled.
What is the reason why 'fires' is disabled?
I think it should be the same as 'evnt_insert',
When server_type is ppas and in edit mode, 'fires' is disabled.

file: 
web/pgadmin/browser/server_groups/servers/databases/schemas/tables/triggers/static/js/trigger.js

 id: 'fires', label: gettext('Fires'), deps: ['is_constraint_trigger'],
  mode: ['create','edit', 'properties'], group: gettext('Events'),

disabled: function(m) {
if (!m.isNew()) ★ In edit mode, 'fires' is disabled.
  return true;  
// If contraint trigger is set to True then only enable it
var is_constraint_trigger = m.get('is_constraint_trigger');
if(!m.inSchemaWithModelCheck.apply(this, [m])) {
  if(!_.isUndefined(is_constraint_trigger) &&
is_constraint_trigger === true) {
setTimeout(function() { m.set('fires', 'AFTER'); }, 10);
return true;
  } else {
return false;
  }
} else {
  // Check if it is row trigger then enabled it.
  var fires_ = m.get('fires');
  if (!_.isUndefined(fires_) && 
m.node_info['server']['server_type'] == 'ppas') {
return false;
  }
  // Disable it
  return true;
}




Re: [pgAdmin4] Questions about trigger properties's Fires in edit mode

2021-07-29 Thread Aditya Toshniwal
Hi,

PostgreSQL allows an alter only for name -
https://www.postgresql.org/docs/current/sql-altertrigger.html. Even if we
enable it, we cannot generate the SQL for the change.

On Thu, Jul 29, 2021 at 3:23 PM zhangj...@fujitsu.com 
wrote:

> Hi, all
>
> In trigger's Properties screen, the 'fires' is disabled.
> What is the reason why 'fires' is disabled?
> I think it should be the same as 'evnt_insert',
> When server_type is ppas and in edit mode, 'fires' is disabled.
>
> file:
> web/pgadmin/browser/server_groups/servers/databases/schemas/tables/triggers/static/js/trigger.js
>
>  id: 'fires', label: gettext('Fires'), deps: ['is_constraint_trigger'],
>   mode: ['create','edit', 'properties'], group: gettext('Events'),
>
> disabled: function(m) {
> if (!m.isNew()) ★ In edit mode, 'fires' is disabled.
>   return true;
> // If contraint trigger is set to True then only enable it
> var is_constraint_trigger = m.get('is_constraint_trigger');
> if(!m.inSchemaWithModelCheck.apply(this, [m])) {
>   if(!_.isUndefined(is_constraint_trigger) &&
> is_constraint_trigger === true) {
> setTimeout(function() { m.set('fires', 'AFTER'); }, 10);
> return true;
>   } else {
> return false;
>   }
> } else {
>   // Check if it is row trigger then enabled it.
>   var fires_ = m.get('fires');
>   if (!_.isUndefined(fires_) &&
> m.node_info['server']['server_type'] == 'ppas') {
> return false;
>   }
>   // Disable it
>   return true;
> }
>
>
>

-- 
Thanks,
Aditya Toshniwal
pgAdmin hacker | Sr. Software Engineer | *edbpostgres.com*

"Don't Complain about Heat, Plant a TREE"


[pgAdmin][RM-6592]: [React] Port Materialized View node to react

2021-07-29 Thread Nikhil Mohite
Hi Hackers,

Please find the attached patch for RM-6592
: [React] Port Materialized
View node to react
Also fixed issues in view node related to validation and code field is
editable for views under catalogs node.


-- 
*Thanks & Regards,*
*Nikhil Mohite*
*Software Engineer.*
*EDB Postgres* 
*Mob.No: +91-7798364578.*


RM-6592.patch
Description: Binary data