pull/628/head
Mr Chen 7 months ago
parent d3e228bcd6
commit ce2affb119
  1. 4
      web/admin/__init__.py
  2. 4
      web/admin/dashboard/__init__.py
  3. 17
      web/admin/site/__init__.py
  4. 4
      web/admin/submodules.py
  5. 17
      web/admin/task/__init__.py
  6. 4
      web/version.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

@ -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"
return render_template('index.html', data = {})

@ -0,0 +1,17 @@
# coding:utf-8
# ---------------------------------------------------------------------------------
# MW-Linux面板
# ---------------------------------------------------------------------------------
# copyright (c) 2018-∞(https://github.com/midoks/mdserver-web) All rights reserved.
# ---------------------------------------------------------------------------------
# Author: midoks <midoks@163.com>
# ---------------------------------------------------------------------------------
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={})

@ -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,
]

@ -0,0 +1,17 @@
# coding:utf-8
# ---------------------------------------------------------------------------------
# MW-Linux面板
# ---------------------------------------------------------------------------------
# copyright (c) 2018-∞(https://github.com/midoks/mdserver-web) All rights reserved.
# ---------------------------------------------------------------------------------
# Author: midoks <midoks@163.com>
# ---------------------------------------------------------------------------------
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"

@ -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 = ''

Loading…
Cancel
Save