Introduced a mechanism to load required javascripts at runtime

(lazy loading) using the require.js. This allows us to load the
javascript required for any node, only when it was loaded in the browser
tree. Also, introduced the mechanism to show/edit/create of any node in
a tab panel (wcDocker.Panel).
This commit is contained in:
Ashesh Vashi
2015-06-30 11:21:55 +05:30
parent 35d01bea3e
commit aa150030eb
77 changed files with 24504 additions and 1395 deletions

View File

@@ -11,7 +11,8 @@
a webserver, this will provide the WSGI interface, otherwise, we're going
to start a web server."""
import os, sys
import os
import sys
# We need to include the root directory in sys.path to ensure that we can
# find everything we need when running in the standalone runtime.
@@ -27,8 +28,9 @@ from pgadmin import create_app
##########################################################################
# Check for local settings if running in server mode
if config.SERVER_MODE == True:
local_config = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'config_local.py')
if config.SERVER_MODE is True:
local_config = os.path.join(os.path.dirname(os.path.realpath(__file__)),
'config_local.py')
if not os.path.isfile(local_config):
print "The configuration file %s does not exist.\n" % local_config
print "Before running this application, ensure that config_local.py has been created"
@@ -40,7 +42,8 @@ if config.SERVER_MODE == True:
# Check if the database exists. If it does not, tell the user and exit.
if not os.path.isfile(config.SQLITE_PATH):
print "The configuration database %s does not exist.\n" % config.SQLITE_PATH
print "Please run 'python %s' to create it.\nExiting..." % os.path.join(os.path.dirname(os.path.realpath(__file__)), 'setup.py')
print "Please run 'python %s' to create it.\nExiting..." % os.path.join(
os.path.dirname(os.path.realpath(__file__)), 'setup.py')
sys.exit(1)
##########################################################################
@@ -57,10 +60,13 @@ if config.DEBUG:
# runtime if we're running in desktop mode, otherwise we'll just use the
# Flask default.
if 'PGADMIN_PORT' in globals():
app.logger.debug('PGADMIN_PORT set in the runtime environment to %s', PGADMIN_PORT)
server_port = PGADMIN_PORT
app.logger.debug('PGADMIN_PORT set in the runtime environment to %s',
globals()['PGADMIN_PORT'])
server_port = int(globals()['PGADMIN_PORT'])
else:
app.logger.debug('PGADMIN_PORT is not set in the runtime environment, using default of %s', config.DEFAULT_SERVER_PORT)
app.logger.debug(
'PGADMIN_PORT is not set in the runtime environment, using default of %s',
config.DEFAULT_SERVER_PORT)
server_port = config.DEFAULT_SERVER_PORT
try: