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