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

修复缩略SQL乱码问题 #1305

Merged
merged 3 commits into from
Dec 28, 2021
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
7 changes: 4 additions & 3 deletions sql/templates/detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -609,10 +609,11 @@ <h4 class="modal-title text-danger">修改可执行时间</h4>
title: 'SQL内容',
field: 'sql',
formatter: function (value, row, index) {
if (value.length > 80) {
return value.substr(0, 80) + '...';
var sql=row.sql;
if (sql.length > 80) {
return sql.substr(0, 80) + '...';
} else {
return value
return sql
}
},
sortable: false
Expand Down
7 changes: 4 additions & 3 deletions sql/templates/rollback.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,11 @@
title: '回滚语句',
field: 1,
formatter: function (value, row, index) {
if (value.length > 80) {
return value.substr(0, 80) + '...';
var sql=row[1];
if (sql.length > 80) {
return sql.substr(0, 80) + '...';
} else {
return value
return sql
}
}
}, {
Expand Down
5 changes: 3 additions & 2 deletions sql/templates/sqlquery.html
Original file line number Diff line number Diff line change
Expand Up @@ -359,8 +359,9 @@ <h4 class="modal-title text-danger">收藏语句</h4>
title: '语句',
field: 'sqllog',
formatter: function (value, row, index) {
if (value.length > 50) {
var sql = value.substr(0, 50) + '...';
var _sql=row.sqllog
if (_sql.length > 50) {
var sql = _sql.substr(0, 50) + '...';
return sql;
} else {
return value
Expand Down