def example_view_log(): filename = request.args.get('filename') seekTail = request.args.get('seek_tail') if seekTail: return logsLib.getLogContent(filename) else: return render_template("example/log.html", common = sysLib.getCommonInfo({"username": session['username']}, "logs"), content = logsLib.getLogContent(filename), filename = filename, )
def view_log(): filename = request.args.get('filename') seekTail = request.args.get('seek_tail') content = logsLib.getLogContent(filename) if content == '': flash("Unable to load file") return redirect(request.referrer) if seekTail: return content else: return render_template("log.html", common = sysLib.getCommonInfo({"username": session['username']}, "logs"), content = content, filename = filename, )