def listlogs(path): basepath = cfg['LOGPATH'] fullpath = os.path.join(basepath, path) # Deal with bad data if not os.path.exists(fullpath): return abort(404) # Get all files in directory files = get_info(fullpath) return render_template('logfiles.html', files=files)
def listlogs(path): basepath = cfg['LOGPATH'] fullpath = os.path.join(basepath, path) # Deal with bad data if not os.path.exists(fullpath): return render_template('error.html') # Get all files in directory files = utils.get_info(fullpath) return render_template('logfiles.html', files=files, date_format=cfg['DATE_FORMAT'])
def listlogs(path): """ The 'View logs' page - show a list of logfiles in the log folder with creation time and size Gives the user links to tail/arm/Full/download """ basepath = cfg['LOGPATH'] fullpath = os.path.join(basepath, path) # Deal with bad data if not os.path.exists(fullpath): return render_template('error.html') # Get all files in directory files = utils.get_info(fullpath) return render_template('logfiles.html', files=files, date_format=cfg['DATE_FORMAT'])