QModem/luci-app-modem/luasrc/view/modem/modem_debug_new.htm
fujr 260548fcb2 feat:优化拨号逻辑
当前逻辑:开机触发modem_scan scan到modem则开始拨号
2024-05-13 21:23:45 +08:00

510 lines
15 KiB
HTML

<%+header%>
<script type="text/javascript" src="<%=resource%>/xhr.js"></script>
<div class="cbi-map" id="cbi-modem-debug">
<h2 id="content" name="content">
<%:Modem Debug%>
</h2>
<div class="cbi-map-descr">
<%:Debug Your Module%>
</div>
<head>
<style type="text/css">
/* table {
width: 100%;
border-spacing: 10px;
border: 0px;
} */
tr td:first-child {
width: 33%;
}
/* AT命令响应 */
/* #response_label {
font-size: 15px;
} */
/* 隐藏tab菜单 */
.cbi-tabmenu {
display: none;
}
/* 隐藏tab内容 */
#tab_context {
display: none;
}
/* 隐藏AT命令标题 */
#at_command_title {
display: none;
}
/* AT命令响应 */
textarea {
background: #373737;
border: none;
color: #FFF;
width: 100%;
}
#popup {
width: 560px;
height: 190px;
padding: 20px;
background-color: gainsboro;
border-style: solid;
position: fixed;
top: 40%;
margin-left: auto;
margin-right: auto;
left: 0;
right: 0;
text-align: center;
display: none;
}
#lockcell_feature {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
}
</style>
</head>
<fieldset class="cbi-section" id="cbi-info" style="display: block;">
<div class="cbi-section fade-in">
<h3>
<%:Message%>
</h3>
<table class="table" id="message">
<tr class="tr">
<td colspan="2" class="td left">
<div align="left" id="info_message" style="font-size:1.875em">
<img src="<%=resource%>/icons/loading.gif" alt="<%:Loading%>"
style="vertical-align:middle" />
<%:Loading modem%>...
</div>
</td>
</tr>
</table>
</div>
</fieldset>
<fieldset class="cbi-section" id="cbi-modem" style="display: none;">
<div class="cbi-section fade-in">
<!-- <legend><%:Modem Select%></legend> -->
<h3>
<%:Modem Select%>
</h3>
<div class="cbi-section-node">
<div class="cbi-value cbi-value-last">
<label class="cbi-value-title">
<%:Modem Name%>
</label>
<div class="cbi-value-field">
<div class="cbi-checkbox">
<select name="modem_select" id="modem_select" class="cbi-input-select"></select>
</div>
<div class="cbi-value-description">
<%:Select a modem for debugging%>
</div>
</div>
</div>
</div>
</div>
</fieldset>
<ul class="cbi-tabmenu" id="tab_menu">
<li class="cbi-tab" data-tab="mode_tab"><a href="#">
<%:Mode%>
</a></li>
<li class="cbi-tab-disabled" data-tab="network_prefer_tab"><a href="#">
<%:Network Preferences%>
</a></li>
<li class="cbi-tab-disabled" data-tab="lockband_tab"><a href="#">
<%:LockBand Settings%>
</a></li>
<li class="cbi-tab-disabled" data-tab="lockcell_tab"><a href="#">
<%:Lock Cell/Arfcn Settings%>
</a></li>
<li class="cbi-tab-disabled" data-tab="self_test_tab"><a href="#">
<%:Self Test%>
</a></li>
<li class="cbi-tab-disabled" data-tab="at_command_tab"><a href="#">
<%:AT Command%>
</a></li>
<li class="cbi-tab-disabled" data-tab="set_imei_tab"><a href="#">
<%:Set IMEI%>
</a></li>
</ul>
<div class="cbi-section-node cbi-section-node-tabbed" id="tab_context">
<!-- <div class="cbi-section cbi-tblsection" data-tab-active="true"> -->
<div class="cbi-section" data-tab="mode_tab" data-tab-title="<%:Mode%>" data-tab-active="true"
style="display: block;">
<!-- <legend><%:Mode%></legend> -->
<!-- <h3><%:Mode%></h3> -->
<table class="table cbi-section-table">
<tbody>
<tr class="tr cbi-section-table-titles anonymous">
<th class="th cbi-section-table-cell">
<%:Current%>
</th>
<th class="th cbi-section-table-cell">
<%:Config%>
</th>
<th class="th cbi-section-table-cell cbi-section-actions"></th>
</tr>
<tr class="tr cbi-section-table-row cbi-rowstyle-1">
<td class="td cbi-value-field" data-title="<%:Current%>" id="current_mode"></td>
<td class="td cbi-value-field" data-title="<%:Config%>" id="mode_option">
<!-- <div>
<span class="cbi-radio">
<input type="radio" name="mode_option" id="mode_option_qmi" value="qmi" checked="true">
<span>QMI</span>
</span>&nbsp;
<span class="cbi-radio">
<input type="radio" name="mode_option" id="mode_option_ecm" value="ecm">
<span>ECM</span>
</span>&nbsp;
<span class="cbi-radio">
<input type="radio" name="mode_option" id="mode_option_mbim" value="mbim">
<span>MBIM</span>
</span>&nbsp;
<span class="cbi-radio">
<input type="radio" name="mode_option" id="mode_option_rndis" value="rndis">
<span>RNDIS</span>
</span>&nbsp;
<span class="cbi-radio">
<input type="radio" name="mode_option" id="mode_option_ncm" value="ncm">
<span>NCM</span>
</span>
</div> -->
</td>
<td class="td">
<div>
<input type="button" class="cbi-button-apply" id="mode_button" onclick="set_mode()"
alt="<%:Apply%>" value="<%:Apply%>">
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- <div class="cbi-section cbi-tblsection"> -->
<div class="cbi-section" data-tab="network_prefer_tab" data-tab-title="<%:Network Preferences%>"
data-tab-active="false" style="display: none;">
<!-- <legend><%:Network Preferences%></legend> -->
<!-- <h3><%:Network Preferences%></h3> -->
<table class="table cbi-section-table">
<tbody>
<tr class="tr cbi-section-table-titles anonymous">
<th class="th cbi-section-table-cell">
<%:Config%>
</th>
<th class="th cbi-section-table-cell cbi-section-actions">
<%:Apply%>
</th>
</tr>
<tr class="tr cbi-section-table-row cbi-rowstyle-1">
<td class="td cbi-value-field" data-title="<%:Config%>" id="prefer_custom_config">
<div>
<span class="cbi-checkbox">
<input id="prefer_config_3g" type="checkbox" class="cbi-input-checkbox"
value="3g">
<span>
<%:3G%>
</span>
</span> &nbsp;
<span class="cbi-checkbox">
<input id="prefer_config_4g" type="checkbox" class="cbi-input-checkbox"
value="4g">
<span>
<%:4G%>
</span>
</span> &nbsp;
<span class="cbi-checkbox">
<input id="prefer_config_5g" type="checkbox" class="cbi-input-checkbox"
value="5g">
<span>
<%:5G%>
</span>
</span>
</div>
</td>
<td class="td">
<input type="button" class="cbi-button-apply" id="network_prefer_button"
onclick="set_network_prefer()" value="<%:Apply%>">
</td>
</tr>
</tbody>
</table>
</div>
<div class="cbi-section" data-tab="lockband_tab" data-tab-title="<%:LockBand Settings%>"
data-tab-active="false" style="display: none;">
<!-- <legend><%:Network Preferences%></legend> -->
<!-- <h3><%:Network Preferences%></h3> -->
<table class="table cbi-section-table">
<tbody>
<tr class="tr cbi-section-table-titles anonymous">
<th class="th cbi-section-table-cell">
<%:Config%>
</th>
</tr>
<tr class="tr cbi-section-table-row">
<td class="td cbi-value-field" data-title="<%:Config%>" id="lockband_custom_config">
</td>
</tr>
</tbody>
</table>
<input type="button" class="cbi-button-apply" onclick="all_choose_lockband_custom_config()"value="<%:Select All Band%>">
<input type="button" class="cbi-button-apply" onclick="set_lockband()" value="<%:Apply%>">
</div>
<div class="cbi-section" data-tab="lockcell_tab" data-tab-title="<%:Lock Cell/Arfcn Settings%>"
data-tab-active="false" style="display: none;">
<h3 id="Lock Cell/Arfcn_title">
<%:Current Settings%>
</h3>
<table class="table" id="CurrentStatus">
<tbody id="current_cell_status">
</tbody>
</table>
<h3 id="Lock Cell/Arfcn_title">
<%:Available Neighbor%>
</h3>
<table class="table" id="AvailableNeighbor">
<tbody id="neighbor_cell_info">
</tbody>
</table>
<!-- <legend><%:AT Command%></legend> -->
<h3 id="Lock Cell/Arfcn_title">
<%:Lock Cell/Arfcn Settings%>
</h3>
<table class="table" id="lockcell_info">
<tbody>
<tr class="tr">
<td class="td left">
<%:Select Rat%>
</td>
<td class="td left">
<select name="rat_select" id="rat_select" class="cbi-input-select"
onchange="lockcell_rat_onchange()">
<option value="0">4G</option>
<option value="1">5G</option>
</select>
</td>
</tr>
<tr class="tr">
<td class="td left">
<%:Enter Arfcn%>
</td>
<td class="td left">
<div>
<input type="text" id="arfcn_input" class="cbi-input-text"></input>
</div>
</td>
</tr>
<tr class="tr">
<td class="td left">
<%:Enter PCI%>
</td>
<td class="td left">
<div>
<input type="text" id="pci_input" class="cbi-input-text"></input>
</div>
</td>
</tr>
<tr class="tr" id="scs_input_tr" style="display:none;">
<td class="td left">
<%:Enter SCS%>
</td>
<td class="td left">
<select name="rat_select" id="scs_select" class="cbi-input-select">
<option value="0">15KHZ</option>
<option value="1">30KHZ</option>
<option value="2">60KHZ</option>
</select>
</td>
</tr>
<tr class="tr" id="nr_input_tr" style="display:none;">
<td class="td left">
<%:Enter NRBAND%>
</td>
<td class="td left">
<div>
<input type="text" id="nrband_input" class="cbi-input-text"></input>
</div>
</td>
</tr>
<tr class="tr">
<td class="td left">
<%:Submit%>
</td>
<td class="td left">
<div id="lockcell_feature">
</div>
</td>
</tr>
<span></span>
</tbody>
</table>
</div>
<!-- <div class="cbi-section fade-in"> -->
<div class="cbi-section" data-tab="self_test_tab" data-tab-title="<%:Self Test%>" data-tab-active="false"
style="display: none;">
<!-- <legend><%:Self Test%></legend> -->
<!-- <h3><%:Self Test%></h3> -->
<table class="table cbi-section-table">
<tbody>
<tr class="tr cbi-section-table-titles anonymous">
<th class="th cbi-section-table-cell">
<%:Item%>
</th>
<th class="th cbi-section-table-cell">
<%:Current%>
</th>
<th class="th cbi-section-table-cell">
<%:Status%>
</th>
</tr>
<tr class="tr cbi-section-table-row cbi-rowstyle-1">
<td class="td cbi-value-field" data-title="<%:Item%>" id="voltage_label">
<%:Voltage%>
</td>
<td class="td cbi-value-field" data-title="<%:Current%>" id="current_voltage"></td>
<td class="td cbi-value-field" data-title="<%:Status%>" id="voltage_status">-</td>
</tr>
<tr class="tr cbi-section-table-row cbi-rowstyle-2">
<td class="td cbi-value-field" data-title="<%:Item%>" id="temperature_label">
<%:Temperature%>
</td>
<td class="td cbi-value-field" data-title="<%:Current%>" id="current_temperature"></td>
<td class="td cbi-value-field" data-title="<%:Status%>" id="temperature_status">-</td>
</tr>
</tbody>
</table>
</div>
<!-- <div class="cbi-section fade-in"> -->
<div class="cbi-section" data-tab="at_command_tab" data-tab-title="<%:AT Command%>" data-tab-active="false"
style="display: none;">
<!-- <legend><%:AT Command%></legend> -->
<h3 id="at_command_title">
<%:AT Command%>
</h3>
<table class="table" id="at_command_info">
<tbody>
<!-- <tr class="tr">
<td class="td left"><%:Modem Select%></td>
<td class="td left"><select name="modem_select" id="modem_select" class="cbi-input-select"></select></td>
</tr> -->
<tr class="tr">
<td class="td left">
<%:Quick Option%>
</td>
<td class="td left" id="quick_option_td">
<div>
<span class="cbi-radio">
<input type="radio" name="quick_option" value="auto" checked="true">
<span>
<%:Auto%>
</span>
</span>&nbsp;
<span class="cbi-radio">
<input type="radio" name="quick_option" value="custom">
<span>
<%:Custom%>
</span>
</span>
</div>
</td>
</tr>
<tr class="tr">
<td class="td left">
<%:Quick Commands%>
</td>
<td class="td left"><select name="command_select" id="command_select"
class="cbi-input-select"></select></td>
</tr>
<tr class="tr">
<td class="td left">
<%:Enter Command%>
</td>
<td class="td left">
<div>
<input type="text" id="at_command" class="cbi-input-text"></input>
</div>
<div>
<input class="cbi-button cbi-button-apply" type="button" value="<%:Send%>"
onclick="send_at_command()" alt="<%:Send%>" title="<%:Send%>">
<input class="cbi-button cbi-button-reset" type="button" value="<%:Clean%>"
onclick="clean_at_command()" alt="<%:Clean%>" title="<%:Clean%>">
</div>
</td>
</tr>
<tr class="tr">
<td colspan="2" class="td left">
<div id="response_label">
<%:Response%>
</div><br />
<div><textarea readonly="readonly" id="response" rows="20" maxlength="160"></textarea>
</div>
<div class="cbi-page-actions">
<input class="btn cbi-button cbi-button-link" type="button"
value="<%:Return to old page%>"
onclick="location.href='/cgi-bin/luci/admin/network/modem/at_command_old'"
alt="<%:Return to old page%>" title="<%:Return to old page%>">
<input class="btn cbi-button cbi-button-link" type="button"
value="<%:Custom quick commands%>"
onclick="location.href='/cgi-bin/luci/admin/network/modem/quick_commands_config'"
alt="<%:Custom quick commands%>" title="<%:Custom quick commands%>">
<input class="cbi-button cbi-button-reset" type="button" value="<%:Clean%>"
onclick="clean_response()" alt="<%:Clean%>" title="<%:Clean%>">
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="cbi-section" data-tab="set_imei_tab" data-tab-title="<%:Set IMEI%>" data-tab-active="false"
style="display: none;">
<table class="table cbi-section-table">
<tbody id="imei_setting">
<tr class="tr cbi-section-table-titles anonymous">
<th>
<%:IMEI%>
</th>
<th>
<%:Set IMEI%>
</th>
</tr>
<tr class="tr">
<td class="td" style="width: auto;">
<%:IMEI%>
</td>
<td class="td cbi-value-field">
<input type="text" id="imei1_input" class="cbi-input-text"></input>
</td>
</tr>
</tbody>
</table>
<input type="button" class="cbi-button-apply" onclick="set_imei()" value="<%:Apply%>">
</div>
</div>
</div>
<%+footer%>