Skip to content

Commit

Permalink
Add Directories in pgAdmin4 Object Explorer.
Browse files Browse the repository at this point in the history
  • Loading branch information
RohitBhati8269 committed Feb 25, 2025
1 parent adcf089 commit 7fff656
Show file tree
Hide file tree
Showing 38 changed files with 1,598 additions and 4 deletions.
85 changes: 85 additions & 0 deletions docs/en_US/directory_dialog.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
.. _directory_dialog:

******************************
`Directory Dialog`:index:
******************************

Use the Directory dialog to define a directory. A directory allows
superusers to create an alias for a file system directory path that can be used
by database objects. The directory does not store any database objects itself
but provides a reference for accessing the file system.
Please note that directories are supported when connected to EDB Postgres Advanced Server.
For more information about using directories, please see the EDB Postgres Advanced Server Guide, available at:

http://www.enterprisedb.com/


The *Directory* dialog organizes the definition of a directory through the
following tabs: *General*, *Definition*, *Security*, and *SQL*.
The *SQL* tab displays the SQL code generated by dialog selections.

.. image:: images/directory_general.png
:alt: Directory general tab
:align: center

Use the fields on the *General* tab to specify directory attributes:

* Use the *Name* field to add a descriptive name for the directory. This
name will be displayed in the tree control.
* Select the owner of the directory from the drop-down listbox in the *Owner*
field.

Click the *Definition* tab to continue.

.. image:: images/directory_definition.png
:alt: Directory dialog definition tab
:align: center

* Use the *Location* field to specify an absolute path to a directory that will
use to alias.

Click the *Security* tab to continue.

.. image:: images/directory_security.png
:alt: Directory dialog security tab
:align: center

NOTE:- This *Security* tab will be only available for EPAS 17.

Use the *Security* tab to assign privileges for the directory.

Use the *Privileges* panel to assign security privileges. Click the *Add* icon
(+) to assign a set of privileges:

* Select the name of the role from the drop-down listbox in the *Grantee* field.
* The current user, who is the default grantor for granting the privilege, is displayed in the *Grantor* field.
* Click inside the *Privileges* field. Check the boxes to the left of one or
more privileges to grant the selected privileges to the specified user.

Click the *Add* icon to assign additional sets of privileges; to discard a
privilege, click the trash icon to the left of the row and confirm deletion in
the *Delete Row* popup.

Click the *SQL* tab to continue.

Your entries in the *Directory* dialog generate a SQL command (see an example
below). Use the *SQL* tab for review; revisit or switch tabs to make any changes
to the SQL command.

Example
*******

The following is an example of the sql command generated by user selections in
the *Directory* dialog:

.. image:: images/directory_sql.png
:alt: Directory dialog sql tab
:align: center

The example shown demonstrates creating a directory named *test*. It has a
*location* value equal to */data/dbs*.

* Click the *Info* button (i) to access online help.
* Click the *Save* button to save work.
* Click the *Close* button to exit without saving work.
* Click the *Reset* button to restore configuration parameters.
Binary file added docs/en_US/images/directory_definition.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/en_US/images/directory_general.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/en_US/images/directory_security.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/en_US/images/directory_sql.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion docs/en_US/managing_cluster_objects.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ database, right-click on the *Databases* node, and select *Create Database...*
tablespace_dialog
replica_nodes_dialog
pgd_replication_group_dialog
role_reassign_dialog
role_reassign_dialog
directory_dialog
3 changes: 3 additions & 0 deletions web/pgadmin/browser/server_groups/servers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,9 @@ def register(self, app, options):
from .tablespaces import blueprint as module
self.submodules.append(module)

from .directories import blueprint as module
self.submodules.append(module)

from .replica_nodes import blueprint as module
self.submodules.append(module)

Expand Down
Loading

0 comments on commit 7fff656

Please sign in to comment.