Skip to content

Commit b1c1f12

Browse files
committed
qmodem-next: use luci textarea in dial log and at debug output area
1 parent 0ba9af5 commit b1c1f12

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

application/qmodem/files/usr/libexec/rpcd/qmodem

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ EOF
349349
json_init
350350
log_file="/var/run/qmodem/${config_section}_dir/dial_log"
351351
if [ -f "$log_file" ]; then
352-
log_content=$(cat "$log_file")
352+
log_content=$(cat "$log_file" | tail -n 100)
353353
json_add_string log "$log_content"
354354
else
355355
json_add_string log ""

luci/luci-app-qmodem-next/htdocs/luci-static/resources/view/qmodem/debug.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,11 @@ return view.extend({
171171
responseSection.appendChild(E('label', { 'class': 'cbi-value-title' }, _('Response')));
172172
var responseField = E('div', { 'class': 'cbi-value-field' });
173173

174-
var responseDiv = E('pre', {
174+
var responseDiv = E('textarea', {
175175
'id': 'at_response_' + modem.id,
176-
'style': 'background: var(#404040); color: var(#ffffff); padding: 10px; min-height: 100px; max-height: 400px; overflow-y: auto; font-family: monospace; white-space: pre-wrap; border: 1px solid var(--border-color-medium, #cccccc);'
176+
'style': 'padding: 10px; overflow-y: auto; font-family: monospace; white-space: pre-wrap; width: 80%;',
177+
'rows': 20,
178+
'readonly': 'readonly',
177179
}, _('Click "Send AT Command" to execute'));
178180

179181
var sendBtn = E('button', {

luci/luci-app-qmodem-next/htdocs/luci-static/resources/view/qmodem/network_config.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -876,11 +876,10 @@ return view.extend({
876876
var dialog = ui.showModal(title, [
877877
E('style', {}, '\
878878
.dial-log-content { \
879-
background: #f5f5f5; \
880879
padding: 10px; \
881-
border: 1px solid #ddd; \
882880
border-radius: 3px; \
883881
max-height: 400px; \
882+
width: 100%; \
884883
overflow-y: auto; \
885884
font-family: monospace; \
886885
font-size: 12px; \
@@ -890,7 +889,6 @@ return view.extend({
890889
.dial-log-empty { \
891890
text-align: center; \
892891
padding: 40px; \
893-
color: #999; \
894892
}'),
895893
logContent,
896894
E('div', { 'class': 'right' }, [
@@ -932,7 +930,7 @@ return view.extend({
932930
);
933931
} else {
934932
container.appendChild(
935-
E('pre', { 'class': 'dial-log-content' }, result.log)
933+
E('textarea', { 'class': 'dial-log-content','readonly':'readonly','rows':'20','maxlength':'160' }, result.log)
936934
);
937935
}
938936
} else {

0 commit comments

Comments
 (0)