コード例 #1
0
ファイル: __init__.py プロジェクト: caimmy/horner
# _*_ coding:utf-8 _*_
__author__ = 'caimiao'
__date__ = '15-7-3'


"""
子应用平台管理模块
"""

from core_proxy.blueprint import Blueprint

from mgr.FrontHandlers import FrontpageHandler, LoginHandler, RegisteHandler, LogoutHandler
from mgr.FrontHandlers import LoginAjaxHandler
from mgr.CompanyMgrHandler import CompanyConfigHandler

module_mgr_platform = Blueprint(r"mgr")


module_mgr_platform.initRouteRule([
    (r"/?", FrontpageHandler),
    (r"/login", LoginHandler, 'url_login'),
    (r"/loginajax", LoginAjaxHandler),
    (r"/logout", LogoutHandler),
    (r"/reg", RegisteHandler, 'url_register'),
    (r"/config", CompanyConfigHandler)
])


コード例 #2
0
ファイル: __init__.py プロジェクト: caimmy/horner
# _*_ coding:utf-8 _*_
__author__ = 'caimiao'
__date__ = '15-7-8'

"""
子应用聊天服务界面
"""

from core_proxy.blueprint import Blueprint
from service.service_handlers import ServiceIndex, DemoVisitor, ServiceVisitor, QueryServiceInfo
from service.webrtc import KsgcustomerrtcRequest, KsgservicertcPage
from service.webrtc import DemortcrecverPage, DemortcsenderPage, DemosimpleRtc

module_service_platform = Blueprint(r"service")


module_service_platform.initRouteRule([
    (r"/?", ServiceIndex),
    (r"/user_info", QueryServiceInfo),
    (r"/visitor", ServiceVisitor),
    (r"/kefurtc", KsgcustomerrtcRequest),
    (r"/servicertc", KsgservicertcPage),
    (r"/demo_visit", DemoVisitor),
    (r"/rtcsender", DemortcsenderPage),
    (r"/rtcrecver", DemortcrecverPage),
    (r"/simplertc", DemosimpleRtc)
])
コード例 #3
0
ファイル: __init__.py プロジェクト: caimmy/horner
# _*_ coding:utf-8 _*_
__author__ = 'caimiao'
__date__ = '15-6-30'


from core_proxy.blueprint import Blueprint
from business.horner_server_handler import CustomerServiceHandler, CometRequestCometHandler,\
    CometRequestQueryAnswers
from business.conch_rtc_handler import ConchrtcSignallingHandler

module_custom_service = Blueprint(r'customservice')

module_custom_service.initRouteRule([
    (r"/ws", CustomerServiceHandler),
    (r"/signalling", ConchrtcSignallingHandler),
    (r"/comet_cmd", CometRequestCometHandler),
    (r"/comet_query", CometRequestQueryAnswers)
])
コード例 #4
0
ファイル: __init__.py プロジェクト: caimmy/horner
from models.cores import ServiceCompany

class DebugTalkpage(HornerWebRequestHandler):
    def get(self, *args, **kwargs):
        uname = self.get_argument('uname', '9527')
        return self.render("debug/testpage.html",
                           uname=uname)

class RedisFlushDb(HornerWebRequestHandler):
    @devops_require
    def get(self, *args, **kwargs):
        HornerGear().getHandler().flushdb()
        return self.write("flush redis db")

class MysqltableRebuild(HornerWebRequestHandler):
    '''
    rebuild mysql table information, for dev-ops
    '''
    @devops_require
    def get(self, *args, **kwargs):
        Base.metadata.create_all(mysql_master_engine)
        return self.write("OK")


sub_app_debug = Blueprint(r'debug')
sub_app_debug.initRouteRule([
    (r"/talk", DebugTalkpage),
    (r"/ws", CustomerServiceHandler),
    (r"/flushredis", RedisFlushDb),
    (r"/tablerebuild", MysqltableRebuild)
])