RM-2519: Show the trigger function under the trigger node.

From: Akshay Joshi <akshay(dot)joshi(at)enterprisedb(dot)com>
To: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: RM-2519: Show the trigger function under the trigger node.
Date: 2020-10-08 14:42:47
Message-ID: CANxoLDfHPBsNr_cPVBt+ua0=HNh9gn95VHPoo8C7RskCmCjmZw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi Dave/Team

I have started working on RM #2519 to show the trigger function under the
trigger node. I have made the changes to the code and the trigger function
is visible under the respective trigger node.

Changes made to achieve this:

- If the trigger function is in the same schema then it works
absolutely fine, the user can update the properties, view the SQL,
Statistics, Dependencies, and Dependents.
- If the trigger function is from the other schema then we need to
change the schema id as we have a strict API route which adds the schema id
where the trigger exists. Change has been done and it works.
- For the trigger function from the other schema, I have added the
schema-qualified name.
- Remove the menu options and add a dummy menu "No menu is available for
this object" when the user selects the trigger function under the trigger
node. Have to do this because of the different API routes, as the object is
not available and personally, I feel we should not show the context menu to
create, delete, drop from there.

*Note:* To remove the menu option completely I have modified the *menu.js* and
check if the 'showMenu' function is defined. If it is defined then call
that function and based on the return value, will make the decision.

Please refer to the below screenshot for more clarity:
[image: 2519.png]

Thought/Suggestion?

--
*Thanks & Regards*
*Akshay Joshi*
*pgAdmin Hacker | Sr. Software Architect*
*EDB Postgres <http://edbpostgres.com>*

*Mobile: +91 976-788-8246*

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2020-10-08 14:52:27 Re: RM-2519: Show the trigger function under the trigger node.
Previous Message Aditya Toshniwal 2020-10-08 13:03:45 Re: [pgAdmin][RM4855] Renaming a file removes the file extension