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:
Ashesh Vashi
2017-06-22 15:56:45 +05:30
parent 67fd119de8
commit d26337a1ba
54 changed files with 255 additions and 259 deletions

View File

@@ -87,7 +87,7 @@ class ServerGroupPluginModule(BrowserPluginModule):
pass
blueprint = ServerGroupModule(__name__, static_url_path='')
blueprint = ServerGroupModule(__name__)
class ServerGroupView(NodeView):
@@ -276,16 +276,6 @@ class ServerGroupView(NodeView):
def dependents(self, gid):
return make_json_response(status=422)
def module_js(self, **kwargs):
"""
This property defines (if javascript) exists for this node.
Override this property for your own logic.
"""
return make_response(
render_template("server_groups/server_groups.js"),
200, {'Content-Type': 'application/x-javascript'}
)
def nodes(self, gid=None):
"""Return a JSON document listing the server groups for the user"""
nodes = []