mirror of https://github.com/Aidaho12/haproxy-wi
pull/390/head
parent
62bce859cf
commit
e095a88b2e
|
@ -17,6 +17,13 @@ scheduler.start()
|
||||||
|
|
||||||
jwt = JWTManager(app)
|
jwt = JWTManager(app)
|
||||||
|
|
||||||
|
from app.modules.db.db_model import create_tables
|
||||||
|
from app.create_db import default_values, update_all
|
||||||
|
|
||||||
|
create_tables()
|
||||||
|
default_values()
|
||||||
|
update_all()
|
||||||
|
|
||||||
from app.api.routes import bp as api_bp
|
from app.api.routes import bp as api_bp
|
||||||
|
|
||||||
app.register_blueprint(api_bp, url_prefix='/api')
|
app.register_blueprint(api_bp, url_prefix='/api')
|
||||||
|
|
|
@ -1,13 +1,9 @@
|
||||||
#!/usr/bin/env python3.11
|
#!/usr/bin/env python3.11
|
||||||
import os
|
|
||||||
import sys
|
|
||||||
import distro
|
import distro
|
||||||
|
|
||||||
sys.path.append(os.path.join(sys.path[0], '/var/www/haproxy-wi/'))
|
from app.modules.db.db_model import (
|
||||||
|
|
||||||
from modules.db.db_model import (
|
|
||||||
connect, Setting, Role, User, UserGroups, Groups, Services, RoxyTool, Version, SmonHttpCheck, GeoipCodes, SmonTcpCheck, SMON,
|
connect, Setting, Role, User, UserGroups, Groups, Services, RoxyTool, Version, SmonHttpCheck, GeoipCodes, SmonTcpCheck, SMON,
|
||||||
SmonPingCheck, migrate, mysql_enable, create_tables
|
SmonPingCheck, migrate, mysql_enable
|
||||||
)
|
)
|
||||||
from peewee import DateTimeField, IntegerField, CharField, SQL
|
from peewee import DateTimeField, IntegerField, CharField, SQL
|
||||||
|
|
||||||
|
@ -734,9 +730,3 @@ def update_all():
|
||||||
update_db_v_7_3_1()
|
update_db_v_7_3_1()
|
||||||
update_db_v_7_4()
|
update_db_v_7_4()
|
||||||
update_ver()
|
update_ver()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
create_tables()
|
|
||||||
default_values()
|
|
||||||
update_all()
|
|
||||||
|
|
Loading…
Reference in New Issue