This commit is contained in:
parent
01dee5fe1f
commit
ce95ca6905
14
app.py
14
app.py
|
|
@ -1,6 +1,11 @@
|
|||
from flask import Flask
|
||||
# from flask import Blueprint,render_template
|
||||
from views import dashboard, site, files, soft
|
||||
from views import dashboard
|
||||
from views import site
|
||||
from views import files
|
||||
from views import soft
|
||||
from views import config
|
||||
from views import plugins
|
||||
|
||||
app = Flask(__name__)
|
||||
app.debug = True
|
||||
|
|
@ -9,9 +14,12 @@ DEFAULT_MODULES = (
|
|||
(dashboard, "/"),
|
||||
(site, "/site"),
|
||||
(files, "/files"),
|
||||
(soft, "/soft")
|
||||
(soft, "/soft"),
|
||||
(config, "/config"),
|
||||
(plugins, "/plugins"),
|
||||
)
|
||||
|
||||
|
||||
def setting_modules(app, modules):
|
||||
for module, url_prefix in modules:
|
||||
app.register_blueprint(module, url_prefix=url_prefix)
|
||||
|
|
@ -20,4 +28,4 @@ setting_modules(app, DEFAULT_MODULES)
|
|||
|
||||
|
||||
if __name__ == "__main__":
|
||||
app.run()
|
||||
app.run()
|
||||
|
|
|
|||
1
start.sh
1
start.sh
|
|
@ -1,6 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
DEBUG=True
|
||||
gunicorn -b 127.0.0.1:7200 app:app
|
||||
|
||||
#open "http://127.0.0.1:7200"
|
||||
|
|
@ -1,29 +1,32 @@
|
|||
$def with (data)
|
||||
{% extends "default/layout.html" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="main-content">
|
||||
<div class="container-fluid" style="padding-bottom:54px">
|
||||
<div class="pos-box bgw mtb15">
|
||||
<div class="position f14 c9 pull-left">
|
||||
<a class="plr10 c4" href="/">$data['lan']['H1']</a>/<span class="plr10 c4">$data['lan']['H2']</span>
|
||||
<a class="plr10 c4" href="/">首页</a>/<span class="plr10 c4">面板设置</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix bgw mtb15 pd15">
|
||||
<div class="safe-port pull-left">
|
||||
<div class="ss-text pull-left mr50">
|
||||
<em>$data['lan']['I1']</em>
|
||||
<em>关闭面板</em>
|
||||
<div class='ssh-item'>
|
||||
<input class='btswitch btswitch-ios' id='closePl' type='checkbox'>
|
||||
<label class='btswitch-btn' for='closePl' onclick='ClosePanel()'></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ss-text pull-left mr50">
|
||||
<em>$data['lan']['I2']</em>
|
||||
<em>自动更新</em>
|
||||
<div class='ssh-item'>
|
||||
<input class='btswitch btswitch-ios' id='autoUpdate' type='checkbox' $data['panel']['auto'] >
|
||||
<label class='btswitch-btn' for='autoUpdate' onclick="SetPanelAutoUpload()"></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ss-text pull-left mr50">
|
||||
<em class="btlink" style="color: #20a53a;" onclick="GetPanelSSL()" title="点击自定义面板证书">$data['lan']['I3']</em>
|
||||
<em class="btlink" style="color: #20a53a;" onclick="GetPanelSSL()" title="点击自定义面板证书">面板SSL</em>
|
||||
<div class='ssh-item'>
|
||||
<input class='btswitch btswitch-ios' id='panelSSL' type='checkbox'>
|
||||
<label class='btswitch-btn' for='panelSSL' onclick="setPanelSSL()"></label>
|
||||
|
|
@ -33,11 +36,11 @@ $def with (data)
|
|||
</div>
|
||||
<div class="setbox bgw mtb15">
|
||||
<div class="title c6 plr15">
|
||||
<h3 class="f16">$data['lan']['C1']</h3>
|
||||
<h3 class="f16">设置</h3>
|
||||
<button class="btn btn-default btn-sm" style="float: right;margin-top: 10px;display: none;" onclick="apiSetup()">$data['lan']['C2']</button>
|
||||
</div>
|
||||
<div class="important-title" style="margin: 20px 30px 0px;">
|
||||
<p><span class="glyphicon glyphicon-alert" style="color: #f39c12; margin-right: 10px;"></span>$data['lan']['C3']</p>
|
||||
<p><span class="glyphicon glyphicon-alert" style="color: #f39c12; margin-right: 10px;"></span>为了提高安全,请修改别名、默认端口、面板用户和密码!</p>
|
||||
</div>
|
||||
<div class="setting-con pd15">
|
||||
<form id="set-Config">
|
||||
|
|
@ -184,5 +187,6 @@ $def with (data)
|
|||
<script type="text/javascript" src="/static/js/jquery.qrcode.min.js"></script>
|
||||
<script src="/static/js/config.js?date=20180530"></script>
|
||||
<script type="text/javascript">
|
||||
setCookie('serverType','$web.ctx.session.webserver');
|
||||
// setCookie('serverType','$web.ctx.session.webserver');
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
|
@ -15,10 +15,10 @@
|
|||
</div>
|
||||
<div class="system-info bgw clearfix mtb15">
|
||||
<div class="title c6 f16 plr15">
|
||||
$data['lan']['S1'] <span id="info"> $data['lan']['S2']</span>   $data['lan']['S3'] <span id="running"> $data['lan']['S4']</span>
|
||||
<button onclick="ReBoot()" class="btn btn-success btn-xs" style="vertical-align:1px;margin-left:10px;">$data['lan']['S5']</button>
|
||||
<button onclick="reWeb()" style="vertical-align:1px;" class="btn btn-success btn-xs">$data['lan']['S6']</button>
|
||||
<button onclick="repPanel()" style="vertical-align:1px;" class="btn btn-success btn-xs">$data['lan']['S7']</button>
|
||||
系统:<span id="info"> $data['lan']['S2']</span>   已不间断运行:<span id="running"> $data['lan']['S4']</span>
|
||||
<button onclick="ReBoot()" class="btn btn-success btn-xs" style="vertical-align:1px;margin-left:10px;">重启服务器</button>
|
||||
<button onclick="reWeb()" style="vertical-align:1px;" class="btn btn-success btn-xs">重启面板</button>
|
||||
<button onclick="repPanel()" style="vertical-align:1px;" class="btn btn-success btn-xs">修复面板</button>
|
||||
</div>
|
||||
<div class="system-info-con mtb15">
|
||||
<ul class="clearfix">
|
||||
|
|
|
|||
|
|
@ -43,7 +43,6 @@
|
|||
<a style="display: none;" id="defaultPath">$web.ctx.session.config['sites_path']</a>
|
||||
<script src="/static/js/jquery-1.10.2.min.js"></script>
|
||||
<script src="/static/js/bootstrap.min.js"></script>
|
||||
<script src="/static/language/$web.ctx.session.lan/lan.js?date=20180124"></script>
|
||||
<script src="/static/layer/layer.js?date=20180301"></script>
|
||||
<script src="/static/js/jquery.fly.min.js"></script>
|
||||
<script src="/static/js/clipboard.min.js"></script>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,12 @@
|
|||
{% extends "default/layout.html" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="main-content">
|
||||
<div class="container-fluid" style="padding-bottom:54px">
|
||||
<div class="pos-box bgw mtb15">
|
||||
<div class="position f14 c9 pull-left">
|
||||
<a class="plr10 c4" href="/">$data['lan']['H1']</a>/<span class="plr10 c4">$data['lan']['H2']</span>
|
||||
<a class="plr10 c4" href="/">首页</a>/<span class="plr10 c4">软件管理</span>
|
||||
</div>
|
||||
<div class="search pull-right">
|
||||
<form target="hid" onsubmit='GetSList()'>
|
||||
|
|
@ -16,21 +19,27 @@
|
|||
<div class="softbox bgw mtb15">
|
||||
<div class="softlist">
|
||||
<div class="divtable pd15 relative">
|
||||
|
||||
<div class="menu-sub softtype">
|
||||
<span typeid="0">全部</span>
|
||||
<span typeid="1" class="on">运行环境</span>
|
||||
<span typeid="2">系统工具</span>
|
||||
<span typeid="3">插件</span>
|
||||
</div>
|
||||
<button class="btn btn-default btn-sm" onclick="flush_cache()" title="从云端更新列表" style="position:absolute;top:12px;right:15px">更新软件列表</button>
|
||||
|
||||
<button class="btn btn-default btn-sm" onclick="flush_cache()" title="从云端更新列表" style="position:absolute;top:12px;right:15px">添加插件</button>
|
||||
<div id="updata_pro_info"></div>
|
||||
<table class="table table-hover" width="100%" cellspacing="0" cellpadding="0" border="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="165">$data['lan']['TH1']</th>
|
||||
<th>$data['lan']['TH3']</th>
|
||||
<th width="165">软件名称</th>
|
||||
<th>说明</th>
|
||||
<th class="text-center" width="92">价格</th>
|
||||
<th class="text-center" width="120">到期时间</th>
|
||||
<th width="40">$data['lan']['TH4']</th>
|
||||
<th width="40">$data['lan']['TH5']</th>
|
||||
<th width="64">$data['lan']['TH6']</th>
|
||||
<th style="text-align: right;" width="120">$data['lan']['TH7']</th>
|
||||
<th width="40">状态</th>
|
||||
<th width="40">位置</th>
|
||||
<th width="64">状态</th>
|
||||
<th style="text-align: right;" width="120">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="softList"></tbody>
|
||||
|
|
@ -54,4 +63,5 @@ GetSList();
|
|||
$$.get("/ajax?action=GetCloudHtml&rpath=btpanel_message/updata_pro.html",function(rdata){
|
||||
$$("#updata_pro_info").html(rdata);
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
|
@ -4,4 +4,5 @@ from dashboard import *
|
|||
from site import *
|
||||
from files import *
|
||||
from soft import *
|
||||
|
||||
from config import *
|
||||
from plugins import *
|
||||
|
|
|
|||
|
|
@ -0,0 +1,10 @@
|
|||
# coding:utf-8
|
||||
|
||||
from flask import Blueprint, render_template
|
||||
|
||||
config = Blueprint('config', __name__, template_folder='templates')
|
||||
|
||||
|
||||
@config.route("/")
|
||||
def index():
|
||||
return render_template('default/config.html')
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
# coding:utf-8
|
||||
|
||||
from flask import Blueprint, render_template
|
||||
|
||||
plugins = Blueprint('plugins', __name__, template_folder='templates')
|
||||
|
||||
|
||||
@plugins.route("/")
|
||||
def index():
|
||||
return render_template('default/plugins.html')
|
||||
Loading…
Reference in New Issue