Skip to content

Commit

Permalink
Merge pull request #679 from midoks/dev
Browse files Browse the repository at this point in the history
时区接口与phpmyadmin/mysql[Tar]优化
  • Loading branch information
midoks authored Jan 3, 2025
2 parents a36b0b7 + 7c944b2 commit 1b38c60
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion plugins/mysql-community/js/mysql-community.js
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,7 @@ function openPhpmyadmin(name,username,password){
return;
}

if (rdata.data['cfg']['choose'] != 'mysql-apt'){
if (rdata.data['cfg']['choose'] != 'mysql-community'){
layer.msg('当前为['+rdata.data['cfg']['choose'] + ']模式,若要使用请修改phpMyAdmin访问切换.',{icon:2,shade: [0.3, '#000']});
return;
}
Expand Down
3 changes: 3 additions & 0 deletions plugins/phpmyadmin/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ def contentReplace(content):
if cfg['choose'] == "mysql":
content = content.replace('{$CHOOSE_DB}', 'mysql')
content = content.replace('{$CHOOSE_DB_DIR}', 'mysql')
elif cfg['choose'] == "mysql-community":
content = content.replace('{$CHOOSE_DB}', 'mysql-community')
content = content.replace('{$CHOOSE_DB_DIR}', 'mysql-community')
elif cfg['choose'] == "mysql-apt":
content = content.replace('{$CHOOSE_DB}', 'mysql')
content = content.replace('{$CHOOSE_DB_DIR}', 'mysql-apt')
Expand Down
1 change: 1 addition & 0 deletions plugins/phpmyadmin/js/phpmyadmin.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ function safeConf() {
<select id="access_choose" class="bt-input-text mr20" name="choose" style="width:110px">\
<option value="mariadb" '+(cfg['choose']=="mariadb"?"selected='selected'":"")+'>MariaDB</option>\
<option value="mysql" '+ (cfg['choose']=="mysql"?"selected='selected'":"")+'>MySQL</option>\
<option value="mysql-community" '+ (cfg['choose']=="mysql-community"?"selected='selected'":"")+'>MySQL[Tar]</option>\
<option value="mysql-apt" '+ (cfg['choose']=="mysql-apt"?"selected='selected'":"")+'>MySQL[APT]</option>\
<option value="mysql-yum" '+ (cfg['choose']=="mysql-yum"?"selected='selected'":"")+'>MySQL[YUM]</option>\
</select>\
Expand Down
2 changes: 1 addition & 1 deletion web/admin/setting/timezone.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def get_timezone_list():
# 获取时区列表
# pytz.all_timezones | 所有
# pytz.common_timezones
return pytz.all_timezones
return mw.returnData(True, 'ok', pytz.all_timezones)

@blueprint.route('/sync_date', endpoint='sync_date', methods=['POST'])
@panel_login_required
Expand Down
3 changes: 2 additions & 1 deletion web/static/app/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,8 @@ function setTimezone(){
</div>",
success:function(){
var tbody = '';
$.post('/setting/get_timezone_list', {}, function (rdata) {
$.post('/setting/get_timezone_list', {}, function (data) {
var rdata = data['data'];
for (var i = 0; i < rdata.length; i++) {

if (rdata[i] == 'Asia/Shanghai'){
Expand Down

0 comments on commit 1b38c60

Please sign in to comment.