Re-organise node structure and loading to make things somewhat more

simple. This also adds the ability to display servers on the treeview.
This commit is contained in:
Dave Page
2015-03-10 13:09:11 +00:00
parent 7f68d6fced
commit fe834d1ed2
24 changed files with 400 additions and 80 deletions

28
web/pgadmin/utils/ajax.py Normal file
View File

@@ -0,0 +1,28 @@
##########################################################################
#
# pgAdmin 4 - PostgreSQL Tools
#
# Copyright (C) 2013 - 2015, The pgAdmin Development Team
# This software is released under the PostgreSQL Licence
#
##########################################################################
"""Utility functions for dealing with AJAX."""
from flask import Response
import json
def make_json_response(success=1, errormsg='', info='', result={}, data={}):
"""Create a HTML response document describing the results of a request and
containing the data."""
doc = { }
doc['success'] = success
doc['errormsg'] = errormsg
doc['info'] = info
doc['result'] = result
doc['data'] = data
response = Response(response=json.dumps(doc),
status=200,
mimetype="text/json")
return response