Skip to content

Commit

Permalink
Merge pull request #420 from midoks/dev
Browse files Browse the repository at this point in the history
0.15.0
  • Loading branch information
midoks authored Jul 4, 2023
2 parents a78fd95 + bf58cd8 commit 714acd2
Show file tree
Hide file tree
Showing 66 changed files with 3,016 additions and 266 deletions.
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,15 @@ docker run -itd --name mw-server --privileged=true -p 7200:7200 -p 80:80 -p 443:
```


### 版本更新 0.14.5

* 软件管理-搜索功能。
* 文件-右键功能优化。
### 版本更新 0.15.0

* debian12适配。
* 添加nezha插件。
* 优化域名ssl保存功能。
* 修复PHP扩展intl不加载问题(debian/ubuntu)。
* 修复redhat安装openresty缺少openssl-devel。
* docker插件-将就能用。
* tgbot接收和push任务分离。

### JSDelivr安装地址

Expand Down
1 change: 1 addition & 0 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
from gevent.pywsgi import WSGIServer
from geventwebsocket.handler import WebSocketHandler


from gevent import monkey
monkey.patch_all()

Expand Down
3 changes: 2 additions & 1 deletion class/core/cert_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,8 @@ def createCsr(self, index):
index).encode()
)
X509Req.set_pubkey(pk)
X509Req.set_version(2)
# X509Req.set_version(2)
X509Req.set_version(0)
X509Req.sign(pk, self.__digest)
return OpenSSL.crypto.dump_certificate_request(OpenSSL.crypto.FILETYPE_ASN1, X509Req)

Expand Down
3 changes: 2 additions & 1 deletion class/core/cert_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,8 @@ def createCsr(self, index):
index).encode()
)
X509Req.set_pubkey(pk)
X509Req.set_version(2)
# X509Req.set_version(2)
X509Req.set_version(0)
X509Req.sign(pk, self.__digest)
return OpenSSL.crypto.dump_certificate_request(OpenSSL.crypto.FILETYPE_ASN1, X509Req)

Expand Down
2 changes: 1 addition & 1 deletion class/core/config_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

class config_api:

__version = '0.14.5'
__version = '0.15.0'
__api_addr = 'data/api.json'

def __init__(self):
Expand Down
2 changes: 1 addition & 1 deletion class/core/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def table(self, table):
self.__DB_TABLE = table
return self

def where(self, where, param):
def where(self, where, param=()):
# WHERE条件
if where:
self.__OPT_WHERE = " WHERE " + where
Expand Down
2 changes: 1 addition & 1 deletion class/core/mw.py
Original file line number Diff line number Diff line change
Expand Up @@ -1405,7 +1405,7 @@ def makeConf():
file = getRunDir() + '/data/json/config.json'
if not os.path.exists(file):
c = {}
c['title'] = '金蝉面板'
c['title'] = '金灵面板'
c['home'] = 'http://github/midoks/mdserver-web'
c['recycle_bin'] = True
c['template'] = 'default'
Expand Down
25 changes: 20 additions & 5 deletions class/core/site_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,19 +101,31 @@ def listApi(self):
limit = request.form.get('limit', '10')
p = request.form.get('p', '1')
type_id = request.form.get('type_id', '0').strip()
search = request.form.get('search', '').strip()

start = (int(p) - 1) * (int(limit))

siteM = mw.M('sites').field('id,name,path,status,ps,addtime,edate')
if type_id != '' and int(type_id) >= 0:
siteM.where('type_id=?', (type_id,))

sql_where = ''
if search != '':
sql_where = " name like '%" + search + "%' or ps like '%" + search + "%' "

if type_id != '' and int(type_id) >= 0 and search != '':
sql_where = sql_where + " and type_id=" + type_id + ""
elif type_id != '' and int(type_id) >= 0:
sql_where = " type_id=" + type_id

if sql_where != '':
siteM.where(sql_where)

_list = siteM.limit((str(start)) + ',' +
limit).order('id desc').select()

for i in range(len(_list)):
_list[i]['backup_count'] = mw.M('backup').where(
"pid=? AND type=?", (_list[i]['id'], 0)).count()
if _list != None:
for i in range(len(_list)):
_list[i]['backup_count'] = mw.M('backup').where(
"pid=? AND type=?", (_list[i]['id'], 0)).count()

_ret = {}
_ret['data'] = _list
Expand Down Expand Up @@ -775,6 +787,9 @@ def deploySslApi(self):
mw.execShell('echo "lets" > "' + path + '/README"')
elif ssl_type == 'acme':
ssl_acme_dir = mw.getAcmeDir() + '/' + site_name
if not os.path.exists(ssl_acme_dir):
ssl_acme_dir = mw.getAcmeDir() + '/' + site_name + '_ecc'

acme_csrpath = ssl_acme_dir + '/fullchain.cer'
acme_keypath = ssl_acme_dir + '/' + site_name + '.key'
if mw.md5(mw.readFile(acme_csrpath)) == mw.md5(mw.readFile(csr_path)):
Expand Down
37 changes: 20 additions & 17 deletions compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ cd /www/server/mdserver-web/plugins/php/versions && bash all_test.sh
| CentOS 9 Stream |||
| Debian 10.3 |||
| Debian 11.3 |||
| Debian 12.0 |||
| Ubuntu 18.04 |||
| Ubuntu 20.04 |||
| Ubuntu 22.04 |||
Expand All @@ -28,23 +29,24 @@ cd /www/server/mdserver-web/plugins/php/versions && bash all_test.sh



| 系统名称 |PHP53 |PHP54 |PHP55 |PHP56 |PHP70 |PHP71 |PHP72 |PHP73 |PHP74 |PHP80 |PHP81 |
| ----------------- |-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|
| CentOS 7.9 ||||||||||||
| CentOS 8.4 ||||||||||||
| CentOS 8 Stream ||||||||||||
| CentOS 9 Stream ||||||||||||
| Debian 10.3 ||||||||||||
| Debian 11.3 ||||||||||||
| Ubuntu 18.04 ||||||||||||
| Ubuntu 20.04 ||||||||||||
| Ubuntu 22.04 ||||||||||||
| Fedora 31 ||||||||||||
| Fedora 32 ||||||||||||
| AlmaLinux 9 ||||||||||||
| RockyLinux 8.6 ||||||||||||
| Arch Linux ||||||||||||
| openSUSE 15.4 ||||||||||||
| 系统名称 |PHP53 |PHP54 |PHP55 |PHP56 |PHP70 |PHP71 |PHP72 |PHP73 |PHP74 |PHP80 |PHP81 |PHP82 |
| ----------------- |-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|
| CentOS 7.9 |||||||||||||
| CentOS 8.4 |||||||||||||
| CentOS 8 Stream |||||||||||||
| CentOS 9 Stream |||||||||||||
| Debian 10.3 |||||||||||||
| Debian 11.3 |||||||||||||
| Debian 12 |||||||||||||
| Ubuntu 18.04 |||||||||||||
| Ubuntu 20.04 |||||||||||||
| Ubuntu 22.04 |||||||||||||
| Fedora 31 |||||||||||||
| Fedora 32 |||||||||||||
| AlmaLinux 9 |||||||||||||
| RockyLinux 8.6 |||||||||||||
| Arch Linux |||||||||||||
| openSUSE 15.4 |||||||||||||



Expand All @@ -56,6 +58,7 @@ cd /www/server/mdserver-web/plugins/php/versions && bash all_test.sh
| CentOS 9 Stream |||||
| Debian 10.3 |||||
| Debian 11.3 |||||
| Debian 12 |||||
| Ubuntu 18.04 |||||
| Ubuntu 20.04 |||||
| Ubuntu 22.04 |||||
Expand Down
40 changes: 38 additions & 2 deletions plugins/docker/index.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,54 @@
<style type="text/css">

.docker-sub {
border-bottom: 1px solid #ccc;
height: 30px;
line-height: 30px;
margin-bottom: 15px;
}

.docker-sub .on {
border-bottom: 2px solid #20a53a;
color: #20a53a;
font-weight: bold;
font-family: "宋体";
}
.docker-sub span {
display: inline-block;
font-size: 14px;
height: 30px;
padding: 0 25px;
cursor: pointer;
}

.docker-environments {
resize: none;
width: 330px;
height: 80px;
line-height: 20px;
padding: 5px 8px;
border: 1px solid #ddd;
font-size: 12px;
}
</style>

<div class="bt-form">
<div class='plugin_version'></div>
<div class="bt-w-main">
<div class="bt-w-menu">
<p class="bgw" onclick="pluginService('docker');">服务</p>
<p onclick="pluginInitD('docker');">自启动</p>
<p onclick="dockerList();">容器列表</p>
<p onclick="dockerConList();">容器列表</p>
<p onclick="dockerImageList();">镜像列表</p>
<p onclick="repoList();">仓库</p>
</div>
<div class="bt-w-con pd15">
<div class="soft-man-con"></div>
</div>
</div>
</div>
<script type="text/javascript">
resetPluginWinWidth(700);
resetPluginWinWidth(800);
resetPluginWinHeight(400);
$.getScript( "/plugins/file?name=docker&f=js/docker.js", function(){
pluginService('docker', $('.plugin_version').attr('version'));
Expand Down
Loading

0 comments on commit 714acd2

Please sign in to comment.