mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2025-06-28 01:06:58 +00:00
Update
This commit is contained in:
parent
5732867407
commit
ca67a6897f
@ -32,7 +32,6 @@ DB_PATH = os.path.join(CONFIGURATION_PATH, 'db')
|
||||
if not os.path.isdir(DB_PATH):
|
||||
os.mkdir(DB_PATH)
|
||||
DASHBOARD_CONF = os.path.join(CONFIGURATION_PATH, 'wg-dashboard.ini')
|
||||
WG_CONF_PATH = None
|
||||
UPDATE = None
|
||||
app = Flask("WGDashboard", template_folder=os.path.abspath("./static/app/dist"))
|
||||
app.config['SEND_FILE_MAX_AGE_DEFAULT'] = 5206928
|
||||
@ -45,7 +44,7 @@ class CustomJsonEncoder(DefaultJSONProvider):
|
||||
def default(self, o):
|
||||
if callable(getattr(o, "toJson", None)):
|
||||
return o.toJson()
|
||||
return super().default(self, o)
|
||||
return super().default(self)
|
||||
app.json = CustomJsonEncoder(app)
|
||||
|
||||
'''
|
||||
@ -319,6 +318,7 @@ class WireguardConfiguration:
|
||||
self.Name: str = ""
|
||||
self.PrivateKey: str = ""
|
||||
self.PublicKey: str = ""
|
||||
|
||||
self.ListenPort: str = ""
|
||||
self.Address: str = ""
|
||||
self.DNS: str = ""
|
||||
|
@ -1,10 +1,6 @@
|
||||
import os.path
|
||||
|
||||
import dashboard, configparser
|
||||
from datetime import datetime
|
||||
import multiprocessing
|
||||
|
||||
|
||||
global sqldb, cursor, DashboardConfig, WireguardConfigurations, AllPeerJobs, JobLogger
|
||||
app_host, app_port = dashboard.gunicornConfig()
|
||||
date = datetime.today().strftime('%Y_%m_%d_%H_%M_%S')
|
||||
|
Loading…
x
Reference in New Issue
Block a user