Load nodes under the schema at database level.
The following node module script will be loaded, when first database node object is added in the browser tree. * Domains * Foreign tables * FTS Configuration * FTS Dictionary, and * Functions Icons for these modules needs to be shown in the dependents list.pull/3/head
parent
c96f28b66f
commit
6cb83f08d6
|
@ -16,7 +16,7 @@ from pgadmin.utils.ajax import make_json_response, \
|
||||||
make_response as ajax_response, internal_server_error, gone
|
make_response as ajax_response, internal_server_error, gone
|
||||||
from pgadmin.browser.utils import PGChildNodeView
|
from pgadmin.browser.utils import PGChildNodeView
|
||||||
from pgadmin.browser.collection import CollectionNodeModule
|
from pgadmin.browser.collection import CollectionNodeModule
|
||||||
import pgadmin.browser.server_groups.servers.databases.schemas as schemas
|
import pgadmin.browser.server_groups.servers.databases as databases
|
||||||
from pgadmin.utils.ajax import precondition_required
|
from pgadmin.utils.ajax import precondition_required
|
||||||
from pgadmin.utils.driver import get_driver
|
from pgadmin.utils.driver import get_driver
|
||||||
from config import PG_DEFAULT_DRIVER
|
from config import PG_DEFAULT_DRIVER
|
||||||
|
@ -66,7 +66,7 @@ class DomainModule(SchemaChildModule):
|
||||||
Load the module script for domain, when schema node is
|
Load the module script for domain, when schema node is
|
||||||
initialized.
|
initialized.
|
||||||
"""
|
"""
|
||||||
return schemas.SchemaModule.NODE_TYPE
|
return databases.DatabaseModule.NODE_TYPE
|
||||||
|
|
||||||
|
|
||||||
blueprint = DomainModule(__name__)
|
blueprint = DomainModule(__name__)
|
||||||
|
|
|
@ -21,7 +21,7 @@ from pgadmin.utils.ajax import make_json_response, \
|
||||||
make_response as ajax_response, internal_server_error, gone
|
make_response as ajax_response, internal_server_error, gone
|
||||||
from pgadmin.browser.utils import PGChildNodeView
|
from pgadmin.browser.utils import PGChildNodeView
|
||||||
from pgadmin.browser.collection import CollectionNodeModule
|
from pgadmin.browser.collection import CollectionNodeModule
|
||||||
import pgadmin.browser.server_groups.servers.databases.schemas as schemas
|
import pgadmin.browser.server_groups.servers.databases as databases
|
||||||
from pgadmin.utils.ajax import precondition_required
|
from pgadmin.utils.ajax import precondition_required
|
||||||
from pgadmin.browser.server_groups.servers.databases.schemas.utils import \
|
from pgadmin.browser.server_groups.servers.databases.schemas.utils import \
|
||||||
SchemaChildModule, DataTypeReader
|
SchemaChildModule, DataTypeReader
|
||||||
|
@ -80,7 +80,7 @@ class ForeignTableModule(SchemaChildModule):
|
||||||
Load the module script for foreign table, when the
|
Load the module script for foreign table, when the
|
||||||
schema node is initialized.
|
schema node is initialized.
|
||||||
"""
|
"""
|
||||||
return schemas.SchemaModule.NODE_TYPE
|
return databases.DatabaseModule.NODE_TYPE
|
||||||
|
|
||||||
|
|
||||||
blueprint = ForeignTableModule(__name__)
|
blueprint = ForeignTableModule(__name__)
|
||||||
|
|
|
@ -17,7 +17,7 @@ from pgadmin.utils.ajax import make_json_response, \
|
||||||
from pgadmin.browser.utils import PGChildNodeView
|
from pgadmin.browser.utils import PGChildNodeView
|
||||||
from pgadmin.browser.server_groups.servers.databases.schemas.utils \
|
from pgadmin.browser.server_groups.servers.databases.schemas.utils \
|
||||||
import SchemaChildModule
|
import SchemaChildModule
|
||||||
import pgadmin.browser.server_groups.servers.databases.schemas as schemas
|
import pgadmin.browser.server_groups.servers.databases as databases
|
||||||
from pgadmin.utils.ajax import precondition_required
|
from pgadmin.utils.ajax import precondition_required
|
||||||
from pgadmin.utils.driver import get_driver
|
from pgadmin.utils.driver import get_driver
|
||||||
from config import PG_DEFAULT_DRIVER
|
from config import PG_DEFAULT_DRIVER
|
||||||
|
@ -79,7 +79,7 @@ class FtsConfigurationModule(SchemaChildModule):
|
||||||
Load the module script for fts template, when any of the schema
|
Load the module script for fts template, when any of the schema
|
||||||
node is initialized.
|
node is initialized.
|
||||||
"""
|
"""
|
||||||
return schemas.SchemaModule.NODE_TYPE
|
return databases.DatabaseModule.NODE_TYPE
|
||||||
|
|
||||||
blueprint = FtsConfigurationModule(__name__)
|
blueprint = FtsConfigurationModule(__name__)
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ from pgadmin.utils.ajax import make_json_response, \
|
||||||
from pgadmin.browser.utils import PGChildNodeView
|
from pgadmin.browser.utils import PGChildNodeView
|
||||||
from pgadmin.browser.server_groups.servers.databases.schemas.utils \
|
from pgadmin.browser.server_groups.servers.databases.schemas.utils \
|
||||||
import SchemaChildModule
|
import SchemaChildModule
|
||||||
import pgadmin.browser.server_groups.servers.databases.schemas as schemas
|
import pgadmin.browser.server_groups.servers.databases as databases
|
||||||
from pgadmin.utils.ajax import precondition_required
|
from pgadmin.utils.ajax import precondition_required
|
||||||
from pgadmin.utils.driver import get_driver
|
from pgadmin.utils.driver import get_driver
|
||||||
from config import PG_DEFAULT_DRIVER
|
from config import PG_DEFAULT_DRIVER
|
||||||
|
@ -78,7 +78,7 @@ class FtsDictionaryModule(SchemaChildModule):
|
||||||
Load the module script for fts template, when any of the schema
|
Load the module script for fts template, when any of the schema
|
||||||
node is initialized.
|
node is initialized.
|
||||||
"""
|
"""
|
||||||
return schemas.SchemaModule.NODE_TYPE
|
return databases.DatabaseModule.NODE_TYPE
|
||||||
|
|
||||||
|
|
||||||
blueprint = FtsDictionaryModule(__name__)
|
blueprint = FtsDictionaryModule(__name__)
|
||||||
|
|
|
@ -22,7 +22,7 @@ from pgadmin.utils.ajax import make_json_response, \
|
||||||
make_response as ajax_response, internal_server_error, gone
|
make_response as ajax_response, internal_server_error, gone
|
||||||
from pgadmin.browser.utils import PGChildNodeView
|
from pgadmin.browser.utils import PGChildNodeView
|
||||||
from pgadmin.browser.collection import CollectionNodeModule
|
from pgadmin.browser.collection import CollectionNodeModule
|
||||||
import pgadmin.browser.server_groups.servers.databases.schemas as schemas
|
import pgadmin.browser.server_groups.servers.databases as databases
|
||||||
from pgadmin.utils.ajax import precondition_required
|
from pgadmin.utils.ajax import precondition_required
|
||||||
from pgadmin.utils.driver import get_driver
|
from pgadmin.utils.driver import get_driver
|
||||||
from pgadmin.browser.server_groups.servers.utils import parse_priv_from_db, \
|
from pgadmin.browser.server_groups.servers.utils import parse_priv_from_db, \
|
||||||
|
@ -95,7 +95,7 @@ class FunctionModule(SchemaChildModule):
|
||||||
Load the module script for Functions, when the
|
Load the module script for Functions, when the
|
||||||
schema node is initialized.
|
schema node is initialized.
|
||||||
"""
|
"""
|
||||||
return schemas.SchemaModule.NODE_TYPE
|
return databases.DatabaseModule.NODE_TYPE
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def csssnippets(self):
|
def csssnippets(self):
|
||||||
|
@ -1357,9 +1357,9 @@ class ProcedureModule(SchemaChildModule):
|
||||||
def script_load(self):
|
def script_load(self):
|
||||||
"""
|
"""
|
||||||
Load the module script for Procedures, when the
|
Load the module script for Procedures, when the
|
||||||
schema node is initialized.
|
database node is initialized.
|
||||||
"""
|
"""
|
||||||
return schemas.SchemaModule.NODE_TYPE
|
return databases.DatabaseModule.NODE_TYPE
|
||||||
|
|
||||||
|
|
||||||
procedure_blueprint = ProcedureModule(__name__)
|
procedure_blueprint = ProcedureModule(__name__)
|
||||||
|
@ -1469,7 +1469,7 @@ class TriggerFunctionModule(SchemaChildModule):
|
||||||
Load the module script for Trigger function, when the
|
Load the module script for Trigger function, when the
|
||||||
schema node is initialized.
|
schema node is initialized.
|
||||||
"""
|
"""
|
||||||
return schemas.SchemaModule.NODE_TYPE
|
return databases.DatabaseModule.NODE_TYPE
|
||||||
|
|
||||||
|
|
||||||
trigger_function_blueprint = TriggerFunctionModule(__name__)
|
trigger_function_blueprint = TriggerFunctionModule(__name__)
|
||||||
|
|
Loading…
Reference in New Issue