Esempio n. 1
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))
Esempio n. 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))
Esempio n. 3
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))
Esempio n. 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))