mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-13 11:01:50 +00:00
63 lines
2.8 KiB
HTML
63 lines
2.8 KiB
HTML
<%+header%>
|
|
|
|
<% if stderr and #stderr > 0 then %><pre class="error"><%=pcdata(stderr)%></pre><% end %>
|
|
<form class="inline" method="post" action="<%=url('admin/system/openmptcprouter/settings_add')%>">
|
|
<div class="cbi-map">
|
|
<h2 name="content"><%:Advanced Settings%></h2>
|
|
<fieldset class="cbi-section" id="networks">
|
|
<legend><%:Networks settings%></legend>
|
|
<div class="cbi-section-descr"></div>
|
|
<div class="cbi-value">
|
|
<label class="cbi-value-title"><%:IPv4 TCP Keepalive time%></label>
|
|
<div class="cbi-value-field">
|
|
<input type="text" name="tcp_keepalive_time" class="cbi-input-text" value="<%=tonumber((luci.sys.exec("sysctl net.ipv4.tcp_keepalive_time")):match(" %d+"))%>">
|
|
</div>
|
|
</div>
|
|
<div class="cbi-value">
|
|
<label class="cbi-value-title"><%:Disable IPv6%></label>
|
|
<div class="cbi-value-field">
|
|
<input type="checkbox" name="disable_ipv6" class="cbi-input-checkbox" value="1" <% if tonumber((luci.sys.exec("sysctl net.ipv6.conf.all.disable_ipv6")):match(" %d+")) == 1 then %>checked<% end %>>
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
<% if nixio.fs.access("/sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq") then %>
|
|
<fieldset class="cbi-section" id="system">
|
|
<legend><%:Systems settings%></legend>
|
|
<div class="cbi-section-descr"></div>
|
|
<div class="cbi-value">
|
|
<label class="cbi-value-title"><%:Minimum scaling CPU frequency%></label>
|
|
<div class="cbi-value-field">
|
|
<input type="text" name="scaling_min_freq" class="cbi-input-text" value="<%=tonumber((luci.sys.exec("cat /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq")):match("%d+"))%>">
|
|
</div>
|
|
</div>
|
|
<div class="cbi-value">
|
|
<label class="cbi-value-title"><%:Maximum scaling CPU frequency%></label>
|
|
<div class="cbi-value-field">
|
|
<input type="text" name="scaling_max_freq" class="cbi-input-text" value="<%=tonumber((luci.sys.exec("cat /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq")):match("%d+"))%>">
|
|
</div>
|
|
</div>
|
|
<div class="cbi-value">
|
|
<label class="cbi-value-title"><%:Scaling governor%></label>
|
|
<div class="cbi-value-field">
|
|
<select class="cbi-input-select" name="scaling_governor">
|
|
<%
|
|
governor=luci.util.trim(luci.sys.exec("cat /sys/devices/system/cpu/cpufreq/policy0/scaling_governor"))
|
|
available_governors=luci.sys.exec("cat /sys/devices/system/cpu/cpufreq/policy0/scaling_available_governors")
|
|
for gov in string.gmatch(available_governors, "[^%s]+") do
|
|
%>
|
|
<option value="<%=gov%>" <% if governor == gov then %>selected="selected"<% end %>><%=gov%></option>
|
|
<%
|
|
end
|
|
%>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
<% end %>
|
|
</div>
|
|
<div class="cbi-page-actions">
|
|
<input type="hidden" name="token" value="<%=token%>" />
|
|
<button class="btn" type="submit">Submit</button>
|
|
</div>
|
|
</form>
|
|
<%+footer%>
|