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

From: "zhangjie2(at)fujitsu(dot)com" <zhangjie2(at)fujitsu(dot)com>
To: "pgadmin-hackers(at)lists(dot)postgresql(dot)org" <pgadmin-hackers(at)lists(dot)postgresql(dot)org>
Subject: [pgAdmin4] Questions about trigger properties's Fires in edit mode
Date: 2021-07-29 09:53:20
Message-ID: TYWPR01MB7678F54D0FF66E99986B277AF9EB9@TYWPR01MB7678.jpnprd01.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

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;
}

Attachment Content-Type Size
image/png 17.6 KB

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Aditya Toshniwal 2021-07-29 10:17:16 Re: [pgAdmin4] Questions about trigger properties's Fires in edit mode
Previous Message Aditya Toshniwal 2021-07-29 07:52:08 Re: [pgAdmin][patch] Incorrect indentation in table python code