def index(request, path=""): path = "/" + path try: znode = ZNode(path) znode.children.sort() if znode.data and not istext(znode.data): znode.data = "0x" + "".join(["%d" % (ord(d)) for d in znode.data]) znode.datatype = "bin" else: znode.datatype = "str" return render_to_response('zktree/index.html', {'znode': znode}) except Exception as err: traceback.print_exc() return render_to_response('zktree/error.html', {'error': str(err)})
def index(request, path=""): path = "/" + path try: znode = ZNode(path) znode.children.sort() if znode.data and not istext(znode.data): znode.data = "0x" + "".join(["%d" % (ord(d)) for d in znode.data]) znode.datatype = "bin" else: znode.datatype = "str" return render_to_response("zktree/index.html", {"znode": znode}) except Exception as err: traceback.print_exc() return render_to_response("zktree/error.html", {"error": str(err)})
def index(request, path=''): try: znode = ZNode('/' + path) znode.children.sort() if not istext(znode.data): znode.data = '0x' + ''.join(['%d' % (ord(d)) for d in znode.data]) znode.datatype = 'bin' else: znode.datatype = 'str' return render_to_response('zktree/index.html', {'znode':znode}) except Exception as err: return render_to_response('zktree/error.html', {'error':str(err)})
def index(request, path=""): print(path) path = "/" + path try: znode = ZNode(path) znode.children.sort() if not istext(znode.data): znode.data = "0x" + "".join(["%d" % (ord(d)) for d in znode.data]) znode.datatype = "bin" else: znode.datatype = "str" return render_to_response('zktree/index.html', {'znode':znode}) except Exception as err: return render_to_response('zktree/error.html', {'error':str(err)})
def index(request, path=""): print(path) path = "/" + path try: znode = ZNode(path) znode.children.sort() if not istext(znode.data): znode.data = "0x" + "".join(["%d" % (ord(d)) for d in znode.data]) znode.datatype = "bin" else: znode.datatype = "str" return render_to_response('zktree/index.html', {'znode':znode, 'isZKPath':str(znode.path).startswith("/zookeeper"), 'zchildren':znode.getExtendedChildren()}) except Exception as err: tback = traceback.format_exc(err) return render_to_response('zktree/error.html', {'error':str(err), 'traceback':tback})
def index(request, path=""): print(path) path = "/" + path try: znode = ZNode(path) znode.children.sort() if not istext(znode.data): znode.data = "0x" + "".join(["%d" % (ord(d)) for d in znode.data]) znode.datatype = "bin" else: znode.datatype = "str" return render_to_response( 'zktree/index.html', { 'znode': znode, 'isZKPath': str(znode.path).startswith("/zookeeper"), 'zchildren': znode.getExtendedChildren() }) except Exception as err: tback = traceback.format_exc(err) return render_to_response('zktree/error.html', { 'error': str(err), 'traceback': tback })