示例#1
0
文件: views.py 项目: 2221758805/harpc
def child(request):
    if request.method == 'GET':
        data = request.GET
        service = data.get('service', None)

        isExists = False
        if service and len(service) > 0:
            isExists = ZK_HARPC.service_exist(service=service)
            isOperate = ZK_HARPC.get_service_acl(service=service)

        if not isExists:
            services = ZK_HARPC.get_services()
        else:
            servers_total = ZK_HARPC.get_servers_total(service)
            clients_total = ZK_HARPC.get_clients_total(service)

        return render_to_response("child.html", locals(), RequestContext(request))
示例#2
0
def child(request):
    if request.method == 'GET':
        data = request.GET
        service = data.get('service', None)

        isExists = False
        if service and len(service) > 0:
            isExists = ZK_HARPC.service_exist(service=service)
            isOperate = ZK_HARPC.get_service_acl(service=service)

        if not isExists:
            services = ZK_HARPC.get_services()
        else:
            servers_total = ZK_HARPC.get_servers_total(service)
            clients_total = ZK_HARPC.get_clients_total(service)

        return render_to_response("child.html", locals(),
                                  RequestContext(request))
示例#3
0
文件: views.py 项目: 2221758805/harpc
def clients(request):
    """
    显示clients页面
    :param request:
    :return:
    """
    if request.method == 'GET':
        data = request.GET
        service = data.get("service", None)

        isExists = False
        if service and len(service) > 0:
            isExists = ZK_HARPC.service_exist(service=service)

        if not isExists:
            services = ZK_HARPC.get_services()

        return render_to_response("clients.html", locals(), RequestContext(request))
示例#4
0
def clients(request):
    """
    显示clients页面
    :param request:
    :return:
    """
    if request.method == 'GET':
        data = request.GET
        service = data.get("service", None)

        isExists = False
        if service and len(service) > 0:
            isExists = ZK_HARPC.service_exist(service=service)

        if not isExists:
            services = ZK_HARPC.get_services()

        return render_to_response("clients.html", locals(),
                                  RequestContext(request))