2014-12-18 17:49:09 +00:00
|
|
|
##########################################################################
|
|
|
|
#
|
|
|
|
# pgAdmin 4 - PostgreSQL Tools
|
|
|
|
#
|
|
|
|
# Copyright (C) 2013 - 2014, The pgAdmin Development Team
|
|
|
|
# This software is released under the PostgreSQL Licence
|
|
|
|
#
|
|
|
|
##########################################################################
|
|
|
|
|
2015-01-21 12:00:13 +00:00
|
|
|
"""A blueprint module providing utility functions for the application."""
|
2015-01-20 13:57:51 +00:00
|
|
|
MODULE_NAME = 'utils'
|
|
|
|
|
2014-12-18 17:49:09 +00:00
|
|
|
import config
|
2015-01-20 13:57:51 +00:00
|
|
|
from flask import Blueprint, render_template
|
2015-01-22 15:56:23 +00:00
|
|
|
from flask.ext.security import login_required
|
2014-12-18 17:49:09 +00:00
|
|
|
|
2015-01-19 16:38:47 +00:00
|
|
|
# Initialise the module
|
2015-02-05 14:06:20 +00:00
|
|
|
blueprint = Blueprint(MODULE_NAME, __name__, static_folder='static', template_folder='templates', url_prefix='/' + MODULE_NAME)
|
2015-01-19 16:38:47 +00:00
|
|
|
|
2014-12-18 17:49:09 +00:00
|
|
|
##########################################################################
|
|
|
|
# A special URL used to "ping" the server
|
|
|
|
##########################################################################
|
2015-01-19 16:38:47 +00:00
|
|
|
@blueprint.route("/ping")
|
2014-12-18 17:49:09 +00:00
|
|
|
def ping():
|
2015-01-21 12:00:13 +00:00
|
|
|
"""Generate a "PING" response to indicate that the server is alive."""
|
2014-12-18 17:49:09 +00:00
|
|
|
return "PING"
|
2015-01-21 12:00:13 +00:00
|
|
|
|