diff --git a/web/admin/__init__.py b/web/admin/__init__.py index 7adf309c4..d2087bca3 100644 --- a/web/admin/__init__.py +++ b/web/admin/__init__.py @@ -26,6 +26,8 @@ socketio = SocketIO(manage_session=False, async_mode='threading', app = Flask(__name__, template_folder='templates/default') socketio.init_app(app, cors_allowed_origins="*") +from whitenoise import WhiteNoise +app.wsgi_app = WhiteNoise(app.wsgi_app, root="../web/static/", prefix="static/", max_age=604800) # 加载模块 from .submodules import get_submodules @@ -51,6 +53,4 @@ app.logger.debug("Python syspath: %s", sys.path) # cli_mode = False # if app_name.endswith('-cli'): # cli_mode = True - - # return app \ No newline at end of file diff --git a/web/admin/dashboard/__init__.py b/web/admin/dashboard/__init__.py index 89b5ab404..4028586d0 100644 --- a/web/admin/dashboard/__init__.py +++ b/web/admin/dashboard/__init__.py @@ -11,7 +11,7 @@ from flask import Blueprint, render_template -blueprint = Blueprint('dashboard', __name__, url_prefix='/') +blueprint = Blueprint('dashboard', __name__, url_prefix='/', template_folder='../../templates/default') @blueprint.route('/') def index(): - return "dashboard" \ No newline at end of file + return render_template('index.html', data = {}) diff --git a/web/admin/site/__init__.py b/web/admin/site/__init__.py new file mode 100644 index 000000000..fb3ac9d8d --- /dev/null +++ b/web/admin/site/__init__.py @@ -0,0 +1,17 @@ +# coding:utf-8 + +# --------------------------------------------------------------------------------- +# MW-Linux面板 +# --------------------------------------------------------------------------------- +# copyright (c) 2018-∞(https://github.com/midoks/mdserver-web) All rights reserved. +# --------------------------------------------------------------------------------- +# Author: midoks +# --------------------------------------------------------------------------------- + + +from flask import Blueprint, render_template + +blueprint = Blueprint('site', __name__, url_prefix='/site', template_folder='../../templates/default') +@blueprint.route('/index', endpoint='index') +def index(): + return render_template('site.html', data={}) \ No newline at end of file diff --git a/web/admin/submodules.py b/web/admin/submodules.py index 3e9f5b9e1..e32526ee9 100644 --- a/web/admin/submodules.py +++ b/web/admin/submodules.py @@ -1,7 +1,11 @@ from .dashboard import blueprint as DashboardModule +from .site import blueprint as SiteModule +from .task import blueprint as TaskModule def get_submodules(): return [ DashboardModule, + SiteModule, + TaskModule, ] diff --git a/web/admin/task/__init__.py b/web/admin/task/__init__.py new file mode 100644 index 000000000..b42c04bcd --- /dev/null +++ b/web/admin/task/__init__.py @@ -0,0 +1,17 @@ +# coding:utf-8 + +# --------------------------------------------------------------------------------- +# MW-Linux面板 +# --------------------------------------------------------------------------------- +# copyright (c) 2018-∞(https://github.com/midoks/mdserver-web) All rights reserved. +# --------------------------------------------------------------------------------- +# Author: midoks +# --------------------------------------------------------------------------------- + + +from flask import Blueprint, render_template + +blueprint = Blueprint('task', __name__, url_prefix='/task', template_folder='../../templates/default') +@blueprint.route('/count', endpoint='task_count') +def task_count(): + return "0" \ No newline at end of file diff --git a/web/version.py b/web/version.py index 035807849..31ccc059f 100644 --- a/web/version.py +++ b/web/version.py @@ -12,8 +12,8 @@ # 应用程序版本号组件 APP_RELEASE = 0 -APP_REVISION = 17 -APP_SMALL_VERSION = 3 +APP_REVISION = 18 +APP_SMALL_VERSION = 0 # 应用程序版本后缀,例如“beta1”、“dev”。通常为空字符串GA发布。 APP_SUFFIX = ''