Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

时区接口与phpmyadmin/mysql[Tar]优化 #679

Merged
merged 4 commits into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading