You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
# 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
|
|
|
|
from flask import request
|
|
|
|
|
|
|
|
from admin.model import Crontab
|
|
|
|
|
|
|
|
blueprint = Blueprint('crontab', __name__, url_prefix='/crontab', template_folder='../../templates/default')
|
|
|
|
@blueprint.route('/index', endpoint='index')
|
|
|
|
def index():
|
|
|
|
return render_template('crontab.html', data={})
|
|
|
|
|
|
|
|
# 插件列表
|
|
|
|
@blueprint.route('/list', endpoint='list', methods=['GET','POST'])
|
|
|
|
def list():
|
|
|
|
page = request.args.get('p', 1)
|
|
|
|
size = 10
|
|
|
|
count = Crontab.query.count()
|
|
|
|
print(count)
|
|
|
|
clist = Crontab.query.paginate(page=int(page), per_page=size)
|
|
|
|
print(clist)
|
|
|
|
|
|
|
|
return []
|