mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Moved the javascripts of the following browser node modules to the
'static' directory from 'templates' in the respective module directory: - Server Group - Server - Database - Schema - Cast - Event trigger - Extension - Foreign data wrapper - Language - Catalog Object - Collation - Domain Constraint - Domain - Foreign server - FTS Configuration - FTS Dictionary - FTS Parser - FTS Template - Function - Procedure - Trigger Function - Package - Sequence - Catalog - Schema - Synonym - Table - Type - Materialized View - View - pgAgent Modules + Job (pga_job) + Schedule (pga_schedule) + Steps (pga_jobstep) Added new dynanic modules for listing the supported server types, and current user information. NOTE: We've not yet moved the javascripts for the children of the table module.
This commit is contained in:
@@ -13,7 +13,7 @@ import simplejson as json
|
||||
from functools import wraps
|
||||
|
||||
import pgadmin.browser.server_groups.servers.databases as databases
|
||||
from flask import render_template, make_response, request, jsonify
|
||||
from flask import render_template, request, jsonify
|
||||
from flask_babel import gettext
|
||||
from pgadmin.browser.collection import CollectionNodeModule
|
||||
from pgadmin.browser.utils import PGChildNodeView
|
||||
@@ -82,6 +82,14 @@ class ExtensionModule(CollectionNodeModule):
|
||||
"""
|
||||
return databases.DatabaseModule.NODE_TYPE
|
||||
|
||||
@property
|
||||
def module_use_template_javascript(self):
|
||||
"""
|
||||
Returns whether Jinja2 template is used for generating the javascript
|
||||
module.
|
||||
"""
|
||||
return False
|
||||
|
||||
|
||||
# Create blueprint of extension module
|
||||
blueprint = ExtensionModule(__name__)
|
||||
@@ -123,7 +131,6 @@ class ExtensionView(PGChildNodeView):
|
||||
'stats': [{'get': 'statistics'}],
|
||||
'dependency': [{'get': 'dependencies'}],
|
||||
'dependent': [{'get': 'dependents'}],
|
||||
'module.js': [{}, {}, {'get': 'module_js'}],
|
||||
'avails': [{}, {'get': 'avails'}],
|
||||
'schemas': [{}, {'get': 'schemas'}],
|
||||
'children': [{'get': 'children'}]
|
||||
@@ -450,18 +457,6 @@ class ExtensionView(PGChildNodeView):
|
||||
status=200
|
||||
)
|
||||
|
||||
def module_js(self):
|
||||
"""
|
||||
This property defines whether javascript exists for this node.
|
||||
"""
|
||||
return make_response(
|
||||
render_template(
|
||||
"extensions/js/extensions.js",
|
||||
_=gettext
|
||||
),
|
||||
200, {'Content-Type': 'application/x-javascript'}
|
||||
)
|
||||
|
||||
@check_precondition
|
||||
def sql(self, gid, sid, did, eid):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user