From e3a359bbc6c5282597cea8cd10ca70f413366813 Mon Sep 17 00:00:00 2001 From: LukasDoesDev Date: Sun, 17 Jan 2021 19:20:28 +0200 Subject: [PATCH] File Manager: DONE --- app/classes/shared/controller.py | 2 +- app/classes/shared/helpers.py | 16 +- app/classes/shared/server.py | 2 +- app/classes/web/ajax_handler.py | 196 +++++++++- app/classes/web/panel_handler.py | 3 - .../templates/panel/server_files.html | 370 ++++++++++++++++-- 6 files changed, 544 insertions(+), 45 deletions(-) diff --git a/app/classes/shared/controller.py b/app/classes/shared/controller.py index 805abe5d..54c858eb 100644 --- a/app/classes/shared/controller.py +++ b/app/classes/shared/controller.py @@ -49,7 +49,7 @@ class Controller: continue # if this server path no longer exists - let's warn and bomb out - if not helper.check_path_exits(s['path']): + if not helper.check_path_exists(s['path']): logger.warning("Unable to find server {} at path {}. Skipping this server".format(s['server_name'], s['path'])) diff --git a/app/classes/shared/helpers.py b/app/classes/shared/helpers.py index 46e2e4e4..3cba2eea 100644 --- a/app/classes/shared/helpers.py +++ b/app/classes/shared/helpers.py @@ -272,7 +272,7 @@ class Helpers: return "%.1f%s%s" % (num, 'Y', suffix) @staticmethod - def check_path_exits(path: str): + def check_path_exists(path: str): logger.debug('Looking for path: {}'.format(path)) if os.path.exists(path): @@ -463,13 +463,21 @@ class Helpers: print(filename) rel = os.path.join(folder, raw_filename) if os.path.isdir(rel): - output += '
  • \n{}\n