diff options
11 files changed, 228 insertions, 147 deletions
diff --git a/applications/luci-app-rosy-file-server/luasrc/controller/rosy-file-server/rosy-file-server.lua b/applications/luci-app-rosy-file-server/luasrc/controller/rosy-file-server/rosy-file-server.lua index 6c7c492089..dd5598a689 100644 --- a/applications/luci-app-rosy-file-server/luasrc/controller/rosy-file-server/rosy-file-server.lua +++ b/applications/luci-app-rosy-file-server/luasrc/controller/rosy-file-server/rosy-file-server.lua @@ -21,7 +21,7 @@ function index() page.index = false page = node("httpfs") - page.title = _("File-server") + page.title = _("Rosy File Server") page.target = alias("httpfs", "rosy-file-server") page.order = 5 page.setuser = "root" @@ -30,23 +30,8 @@ function index() entry({"httpfs", "rosy-file-server"}, form("rosy-file-server/rosy-file-server"), _("Rosy File Server"), 10) - entry({"httpfs", "file-server-download"}, - post("action_download"), nil) entry({"admin", "services", "rosyfs"}, cbi("rosy-file-server/rosyfs"), _("Rosy File Server"), 61) end -function action_download() - local p = luci.http.formvalue("path") or "" - local n = luci.http.formvalue("name") or "" - - if not p or not n then - luci.http.status(400, "Bad Request") - return - end - - luci.http.header('Content-Disposition', 'attachment; filename="%s"' % n) - luci.http.prepare_content("application/octet-stream") - luci.sys.process.exec({ "/bin/dd", "if=%s%s" % { p, n }, "conv=fsync,notrunc" }, luci.http.write) -end diff --git a/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/overview_tab.lua b/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/overview_tab.lua index 7fe5f23a47..827a39b8cf 100644 --- a/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/overview_tab.lua +++ b/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/overview_tab.lua @@ -60,24 +60,30 @@ o2 = s:option(Flag, "trm_captive", translate("Captive Portal Detection"), o2.default = o2.enabled o2.rmempty = false -o3 = s:option(Flag, "trm_proactive", translate("ProActive Uplink Switch"), - translate("Proactively scan and switch to a higher prioritized uplink, despite of an already existing connection.")) -o3.default = o3.enabled +o3 = s:option(Flag, "trm_netcheck", translate("Net Error Check"), + translate("Treat missing internet availability as an error.")) +o3:depends("trm_captive", 1) +o3.default = o3.disabled o3.rmempty = false -o4 = s:option(ListValue, "trm_iface", translate("Uplink / Trigger interface"), +o4 = s:option(Flag, "trm_proactive", translate("ProActive Uplink Switch"), + translate("Proactively scan and switch to a higher prioritized uplink, despite of an already existing connection.")) +o4.default = o4.enabled +o4.rmempty = false + +o5 = s:option(ListValue, "trm_iface", translate("Uplink / Trigger interface"), translate("Name of the used uplink interface.")) if dump then local i, v for i, v in ipairs(dump.interface) do if v.interface ~= "loopback" and v.interface ~= "lan" then local device = v.l3_device or v.device or "-" - o4:value(v.interface, v.interface.. " (" ..device.. ")") + o5:value(v.interface, v.interface.. " (" ..device.. ")") end end end -o4.default = trmiface -o4.rmempty = false +o5.default = trmiface +o5.rmempty = false -- Runtime information @@ -97,34 +103,40 @@ e2 = e:option(Value, "trm_radio", translate("Radio Selection / Order"), translate("Restrict travelmate to a single radio (e.g. 'radio1') or change the overall scanning order (e.g. 'radio1 radio2 radio0').")) e2.rmempty = true -e3 = e:option(Value, "trm_triggerdelay", translate("Trigger Delay"), - translate("Additional trigger delay in seconds before travelmate processing begins.")) -e3.datatype = "range(1,60)" -e3.default = 2 +e3 = e:option(Value, "trm_listexpiry", translate("List Auto Expiry"), + translate("Automatically resets the 'Faulty Stations' list after n minutes. Default is '0' which means no expiry.")) +e3.datatype = "range(0,300)" +e3.default = 0 e3.rmempty = false -e4 = e:option(Value, "trm_maxretry", translate("Connection Limit"), - translate("Retry limit to connect to an uplink.")) -e4.default = 3 -e4.datatype = "range(1,10)" +e4 = e:option(Value, "trm_triggerdelay", translate("Trigger Delay"), + translate("Additional trigger delay in seconds before travelmate processing begins.")) +e4.datatype = "range(1,60)" +e4.default = 2 e4.rmempty = false -e5 = e:option(Value, "trm_minquality", translate("Signal Quality Threshold"), - translate("Minimum signal quality threshold as percent for conditional uplink (dis-) connections.")) -e5.default = 35 -e5.datatype = "range(20,80)" +e5 = e:option(Value, "trm_maxretry", translate("Connection Limit"), + translate("Retry limit to connect to an uplink.")) +e5.default = 5 +e5.datatype = "range(1,10)" e5.rmempty = false -e6 = e:option(Value, "trm_maxwait", translate("Interface Timeout"), - translate("How long should travelmate wait for a successful wlan uplink connection.")) -e6.default = 30 -e6.datatype = "range(20,40)" +e6 = e:option(Value, "trm_minquality", translate("Signal Quality Threshold"), + translate("Minimum signal quality threshold as percent for conditional uplink (dis-) connections.")) +e6.default = 35 +e6.datatype = "range(20,80)" e6.rmempty = false -e7 = e:option(Value, "trm_timeout", translate("Overall Timeout"), - translate("Overall retry timeout in seconds.")) -e7.default = 60 -e7.datatype = "range(30,300)" +e7 = e:option(Value, "trm_maxwait", translate("Interface Timeout"), + translate("How long should travelmate wait for a successful wlan uplink connection.")) +e7.default = 30 +e7.datatype = "range(20,40)" e7.rmempty = false +e8 = e:option(Value, "trm_timeout", translate("Overall Timeout"), + translate("Overall retry timeout in seconds.")) +e8.default = 60 +e8.datatype = "range(30,300)" +e8.rmempty = false + return m diff --git a/modules/luci-base/Makefile b/modules/luci-base/Makefile index 9bc8ec17a1..d94804529c 100644 --- a/modules/luci-base/Makefile +++ b/modules/luci-base/Makefile @@ -14,13 +14,17 @@ LUCI_BASENAME:=base LUCI_TITLE:=LuCI core libraries LUCI_DEPENDS:=+lua +luci-lib-nixio +luci-lib-ip +rpcd +libubus-lua +luci-lib-jsonc +liblucihttp-lua - -PKG_SOURCE:=v1.0.0.tar.gz -PKG_SOURCE_URL:=https://github.com/jirutka/luasrcdiet/archive/ -PKG_HASH:=48162e63e77d009f5848f18a5cabffbdfc867d0e5e73c6d407f6af5d6880151b +LUCI_LUASRCDIET_VERSION:=1.0.0 + +PKG_SOURCE_URL:=https://github.com/jirutka/luasrcdiet.git +PKG_SOURCE_VERSION:=f138fc9359821d9201cd6b57cfa2fcbed5b9af97 +PKG_SOURCE_SUBDIR:=luasrcdiet-$(LUCI_LUASRCDIET_VERSION) +PKG_SOURCE_PROTO:=git +PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz +PKG_MIRROR_HASH:=a5c9d098549fbef618e6022b701e66c8c6fb16c910e63219adad3a4e71341f72 PKG_LICENSE:=MIT -HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/luasrcdiet-1.0.0 +HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_SOURCE_SUBDIR) include $(INCLUDE_DIR)/host-build.mk diff --git a/modules/luci-base/luasrc/view/cbi/tsection.htm b/modules/luci-base/luasrc/view/cbi/tsection.htm index 547a793329..8f3b7f0ffb 100644 --- a/modules/luci-base/luasrc/view/cbi/tsection.htm +++ b/modules/luci-base/luasrc/view/cbi/tsection.htm @@ -2,6 +2,11 @@ <% if self.title and #self.title > 0 then -%> <legend><%=self.title%></legend> <%- end %> + <% if self.error_msg and #self.error_msg > 0 then -%> + <div class="cbi-section-error"> + <%=self.error_msg%> + </div> + <%- end %> <% if self.description and #self.description > 0 then -%> <div class="cbi-section-descr"><%=self.description%></div> <%- end %> diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/network.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/network.js index 40624e741e..fe1ff19fed 100644 --- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/network.js +++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/network.js @@ -1,7 +1,7 @@ function iface_reconnect(id) { L.halt(); L.dom.content(document.getElementById(id + '-ifc-description'), E('em', _('Interface is reconnecting...'))); - L.post(L.url('admin/network/iface_reconnect', id), L.run); + L.post(L.url('admin/network/iface_reconnect', id), null, L.run); } function iface_delete(ev) { diff --git a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/index.js b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/index.js index c2aa3a9b0d..3a895eca18 100644 --- a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/index.js +++ b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/index.js @@ -1,13 +1,15 @@ -function progressbar(q, v, m) +function progressbar(query, value, max, byte) { - var pg = document.querySelector(q), - vn = parseInt(v) || 0, - mn = parseInt(m) || 100, + var pg = document.querySelector(query), + vn = parseInt(value) || 0, + mn = parseInt(max) || 100, + fv = byte ? String.format('%1024.2mB', value) : value, + fm = byte ? String.format('%1024.2mB', max) : max, pc = Math.floor((100 / mn) * vn); if (pg) { pg.firstElementChild.style.width = pc + '%'; - pg.setAttribute('title', '%s / %s (%d%%)'.format(v, m, pc)); + pg.setAttribute('title', '%s / %s (%d%%)'.format(fv, fm, pc)); } } @@ -189,27 +191,32 @@ L.poll(5, L.location(), { status: 1 }, ); progressbar('#memtotal', - ((info.memory.free + info.memory.buffered) / 1024) + ' ' + _('kB'), - (info.memory.total / 1024) + ' ' + _('kB')); + info.memory.free + info.memory.buffered, + info.memory.total, + true); progressbar('#memfree', - (info.memory.free / 1024) + ' ' + _('kB'), - (info.memory.total / 1024) + ' ' + _('kB')); + info.memory.free, + info.memory.total, + true); progressbar('#membuff', - (info.memory.buffered / 1024) + ' ' + _('kB'), - (info.memory.total / 1024) + ' ' + _('kB')); + info.memory.buffered, + info.memory.total, + true); progressbar('#swaptotal', - (info.swap.free / 1024) + ' ' + _('kB'), - (info.swap.total / 1024) + ' ' + _('kB')); + info.swap.free, + info.swap.total, + true); progressbar('#swapfree', - (info.swap.free / 1024) + ' ' + _('kB'), - (info.swap.total / 1024) + ' ' + _('kB')); + info.swap.free, + info.swap.total, + true); progressbar('#conns', - info.conncount, info.connmax); + info.conncount, info.connmax, false); } ); diff --git a/modules/luci-mod-status/luasrc/view/admin_status/connections.htm b/modules/luci-mod-status/luasrc/view/admin_status/connections.htm index d9099aa078..e3dd39d607 100644 --- a/modules/luci-mod-status/luasrc/view/admin_status/connections.htm +++ b/modules/luci-mod-status/luasrc/view/admin_status/connections.htm @@ -165,8 +165,8 @@ rows.push([ c.layer3.toUpperCase(), c.layer4.toUpperCase(), - src + ':' + c.sport, - dst + ':' + c.dport, + c.hasOwnProperty('sport') ? (src + ':' + c.sport) : src, + c.hasOwnProperty('dport') ? (dst + ':' + c.dport) : dst, '%1024.2mB (%d <%:Pkts.%>)'.format(c.bytes, c.packets) ]); } diff --git a/themes/luci-theme-bootstrap/htdocs/luci-static/bootstrap/cascade.css b/themes/luci-theme-bootstrap/htdocs/luci-static/bootstrap/cascade.css index ab4e08a9e9..21a2291e5b 100644 --- a/themes/luci-theme-bootstrap/htdocs/luci-static/bootstrap/cascade.css +++ b/themes/luci-theme-bootstrap/htdocs/luci-static/bootstrap/cascade.css @@ -454,11 +454,14 @@ select, padding: 4px; font-size: 13px; line-height: 18px; - color: #808080; border: 1px solid #ccc; border-radius: 3px; } +.uneditable-input { + color: #808080; +} + .cbi-dropdown, .cbi-dynlist { min-width: 210px; diff --git a/themes/luci-theme-rosy/htdocs/luci-static/rosy/cascade.css b/themes/luci-theme-rosy/htdocs/luci-static/rosy/cascade.css index 4ae8151050..26a08be463 100644 --- a/themes/luci-theme-rosy/htdocs/luci-static/rosy/cascade.css +++ b/themes/luci-theme-rosy/htdocs/luci-static/rosy/cascade.css @@ -165,7 +165,7 @@ header { } header .container { - padding: 0 0.5rem; + padding: 0 0.5rem; } select { @@ -588,7 +588,7 @@ footer > a { .main-right .container .alert-message h4 { margin-top: 1rem; background: url(./no-pwd.png) no-repeat left 1px / 28px; - padding: 7px 0 0 32px; + padding: 7px 0 0 32px; } .main-right .container .alert-message .btn { @@ -782,7 +782,7 @@ form[method="post"] + form[method="post"], .cbi-button[name="zero"], .cbi-button[name="restart"], .cbi-button[onclick="hide_empty(this)"] { - border: 1px solid; + border: 1px solid; } /* dark blue */ @@ -813,10 +813,10 @@ form[method="post"] + form[method="post"], .cbi-button[value="Submit"], .cbi-button[value$="Apply"], .cbi-button[onclick="addKey(event)"] { - font-weight: normal; - color: #fff; - border: 1px solid #468ea4; - background-color: #468ea4; + font-weight: normal; + color: #fff; + border: 1px solid #468ea4; + background-color: #468ea4; } /* red */ @@ -830,10 +830,10 @@ form[method="post"] + form[method="post"], .cbi-button[onclick="reboot(this)"], .cbi-button-neutral[value="Restart"] { padding: 5px .8rem; - font-weight: 100; - color: #f24b7c; - background-color: transparent; - border: 1px solid #f24b7c; + font-weight: 100; + color: #f24b7c; + background-color: transparent; + border: 1px solid #f24b7c; } /* yellow */ @@ -856,10 +856,10 @@ form[method="post"] + form[method="post"], .cbi-button[name="backup"], .cbi-button[value="Upload"], .cbi-button[value="Save mtdblock"] { - font-weight: normal; - color: #468ea4; - border: thin solid #468ea4; - background-color: transparent; + font-weight: normal; + color: #468ea4; + border: thin solid #468ea4; + background-color: transparent; } .cbi-page-actions .cbi-button-link:first-child { @@ -886,40 +886,40 @@ form[method="post"] + form[method="post"], } .tabs > li { - margin-right: .8rem; - padding: .5rem 4px; - position: relative; - display: inline-block; - text-align: center; + margin-right: .8rem; + padding: 6px 10px; + position: relative; + display: inline-block; + text-align: center; } .tabs > li a { - color: #468EA4; + color: #468EA4; font-size: 14px; text-decoration: none; position: relative; z-index: 1; } .tabs > li::after { - content: ''; - background-color: #cccccc82; - position: absolute; - width: 0; - height: 100%; - bottom: 0; - border-radius: 20px; - left: 50%; - transform: translateX(-50%); + content: ''; + background-color: #cccccc82; + position: absolute; + width: 0; + height: 100%; + bottom: 0; + border-radius: 20px; + left: 50%; + transform: translateX(-50%); } .tabs > li:hover::after { - transition: width .35s; - width: calc(100% + 4px); + transition: width .35s; + width: calc(100% + 4px); } .tabs > li.active::after { - width: calc(100% + 4px); - background-color: #468ea473; + width: calc(100% + 4px); + background-color: #468ea473; } .cbi-tabmenu > li { @@ -1164,17 +1164,17 @@ form[method="post"] + form[method="post"], } .cbi-dynlist > .item::after { - position: absolute; - right: -2em; - bottom: 0; - display: inline-flex; - min-height: 17px; - padding: 0 6px; - content: "\00D7"; - pointer-events: auto; - color: #f24b7c; - border: thin solid #f24b7c; - background-color: transparent; + position: absolute; + right: -2em; + bottom: 0; + display: inline-flex; + min-height: 17px; + padding: 0 6px; + content: "\00D7"; + pointer-events: auto; + color: #f24b7c; + border: thin solid #f24b7c; + background-color: transparent; } .cbi-dynlist > .item > span { @@ -1455,6 +1455,11 @@ body.modal-overlay-active { height: 100vh; } +#modal_overlay .alert-message.warning { + background-color: #fff !important; + margin-bottom: 10px; +} + body.modal-overlay-active #modal_overlay { right: 0; left: 0; @@ -2066,9 +2071,9 @@ input[name="nslookup"] { .login .alert-message > h4 { padding: 7px 0 0 32px; - font-size: 18px; - background: url(./no-pwd.png) no-repeat left 0 / 28px; - display: inline-block; + font-size: 18px; + background: url(./no-pwd.png) no-repeat left 0 / 28px; + display: inline-block; } .login .alert-message > p { @@ -2128,30 +2133,30 @@ input[name="nslookup"] { } .login > .main .cbi-value > .cbi-value-field { - display: block; - position: relative; + display: block; + position: relative; } .login > .main .cbi-value-last .cbi-value-field > div { - height: 24px; - width: 24px; - display: inline-block; - background: url(./op-eye.png) no-repeat center center / cover; - position: absolute; - top: 8px; - right: 12px; + height: 24px; + width: 24px; + display: inline-block; + background: url(./op-eye.png) no-repeat center center / cover; + position: absolute; + top: 8px; + right: 12px; } .login > .main .cbi-value-last .cbi-value-field.op-eye > div { - background-image: url(./cl-eye.png); + background-image: url(./cl-eye.png); } .login > .main .cbi-value .cbi-input-text { margin: 0 0 16px; padding-left: 36px; width: 100%; - height: 42px; - border: 1px solid #556270; + height: 42px; + border: 1px solid #556270; border-radius: 20px; background: #fff no-repeat 11px center / 19px; } @@ -2172,14 +2177,14 @@ input[name="nslookup"] { .login .cbi-page-actions .cbi-button-apply, .login .cbi-button-apply { - border: 1px solid #f24b7c; - background-color: #f24b7c; + border: 1px solid #f24b7c; + background-color: #f24b7c; } .login .cbi-button[value="Reset"] { - color: #fff; - border: 1px solid #9a4569; - background-color: #9a4569; + color: #fff; + border: 1px solid #9a4569; + background-color: #9a4569; } .login footer { @@ -2246,13 +2251,49 @@ input[name="nslookup"] { .logged-in .main-right { float: right; width: 84%; - height: 100%; + height: 100%; } .logged-in .main-right .container { margin: 5rem 1rem 1rem; } +/* rosy file server */ +.login-info.node-main-login{ + background-color: #ebf1f6; +} + +.login-info.node-main-login header .container, +.login-info.node-main-login .main { + width: 1170px; +} + +.login-info.node-main-login .main { + padding: 0 15px; +} + +.login-info.node-main-login header { + display: block; +} + +.login-info.node-main-login header .container { + margin: 1rem auto 0; + height: 3rem; + background-color: #fff; + border: 1px solid #ddd; + border-radius: 50px; + line-height: 44px; +} + +.login-info.node-main-login .label.logout { + background-color: #f24b7c; +} + +.login-info.node-main-login .label.logout a { + color: #fff; + text-decoration: none; +} + /* node main login */ .login-info .main { margin: 0 auto; @@ -2435,11 +2476,14 @@ input[name="nslookup"] { flex-basis: 12%; } -#cbi-firewall-zone .table, -#cbi-network-switch_vlan .table { +#cbi-firewall-zone .table { display: table; } +#cbi-network-switch_vlan #vlan_table { + overflow-x: auto; +} + #cbi-firewall-zone .td.cbi-section-actions { width: 100%; } @@ -2592,10 +2636,6 @@ input[name="nslookup"] { font-size: .7rem; } - #modal_overlay { - top: 3.5rem; - } - [data-page="admin-network-firewall-forwards"] .table:not(.cbi-section-table) { display: block; } @@ -2612,10 +2652,17 @@ input[name="nslookup"] { } @media screen and (max-width: 992px) { + .login-info.node-main-login header .container, + .login-info.node-main-login .main { + width: 970px; + } +} + +@media screen and (max-width: 992px) { .login .main-right { background: #354057; } - + .login > .main #maincontent { width: 90%; } @@ -2674,6 +2721,10 @@ input[name="nslookup"] { width: 30px; } + .login-info.node-main-login header .showSide { + display: none; + } + .showSide::before { content: ''; display: inline-block; @@ -2882,6 +2933,22 @@ input[name="nslookup"] { .logged-in .main-left .navbar-container:hover { scrollbar-face-color: #839dd67a; } + + .login-info.node-main-login header .container, + .login-info.node-main-login .main { + width: 750px; + } +} + +@media screen and (max-width: 768px) { + .login-info.node-main-login header { + padding: 0 15px; + } + + .login-info.node-main-login header .container, + .login-info.node-main-login .main { + width: 100%; + } } @media screen and (max-width: 600px) { @@ -2900,10 +2967,6 @@ input[name="nslookup"] { padding: 1rem; } - .tabs { - margin: 0 -1rem; - } - .main-left .nav-container { width: 70%; } diff --git a/themes/luci-theme-rosy/htdocs/luci-static/rosy/js/script.js b/themes/luci-theme-rosy/htdocs/luci-static/rosy/js/script.js index 7f5f1ad0b0..886e175cc4 100755 --- a/themes/luci-theme-rosy/htdocs/luci-static/rosy/js/script.js +++ b/themes/luci-theme-rosy/htdocs/luci-static/rosy/js/script.js @@ -273,7 +273,9 @@ thisParent.removeClass('op-eye'); $(this).prev().attr('type', 'password'); } - + }); + $('#cbi-network-switch_vlan .table').wrap('#vlan_table'); + })(window, jQuery); diff --git a/themes/luci-theme-rosy/luasrc/view/themes/rosy/footer.htm b/themes/luci-theme-rosy/luasrc/view/themes/rosy/footer.htm index 4377e1ca98..25997d145e 100755 --- a/themes/luci-theme-rosy/luasrc/view/themes/rosy/footer.htm +++ b/themes/luci-theme-rosy/luasrc/view/themes/rosy/footer.htm @@ -28,7 +28,7 @@ </div> </div> </div> -<footer class="mobile-hide"> +<footer> <a href="https://github.com/openwrt/luci">Powered by<%= ver.luciname %> (<%= ver.luciversion %>)</a> / <%= ver.distversion %> <% if #categories > 1 then %> |