Skip to content

Commit

Permalink
Merge branch 'openwrt:master' into luci-app-file-plug-manager
Browse files Browse the repository at this point in the history
  • Loading branch information
rdmitry0911 authored Dec 23, 2024
2 parents e48c2cc + 779ca14 commit 7617053
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 42 deletions.
2 changes: 1 addition & 1 deletion modules/luci-base/htdocs/luci-static/resources/network.js
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ function initNetworkState(refresh) {
L.resolveDefault(callLuciHostHints(), {}),
getProtocolHandlers(),
L.resolveDefault(uci.load('network')),
L.resolveDefault(uci.load('wireless')),
L.hasSystemFeature('wifi') ? L.resolveDefault(uci.load('wireless')) : L.resolveDefault(),
L.resolveDefault(uci.load('luci'))
]).then(function(data) {
var netifd_ifaces = data[0],
Expand Down
1 change: 1 addition & 0 deletions modules/luci-base/root/usr/share/rpcd/ucode/luci
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ const methods = {
cabundle: access('/etc/ssl/certs/ca-certificates.crt') == true,
relayd: access('/usr/sbin/relayd') == true,
apk: access('/usr/bin/apk') == true,
wifi: access('/sbin/wifi') == true,
};

const wifi_features = [ 'eap', '11ac', '11ax', '11be', '11r', 'acs', 'sae', 'owe', 'suiteb192', 'wep', 'wps', 'ocv' ];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,65 +52,63 @@ return view.extend({
},

add_wifi_to_graph: function(chan_analysis, res, scanCache, channels, channel_width) {
var offset_tbl = chan_analysis.offset_tbl,
height = chan_analysis.graph.offsetHeight - 2,
step = chan_analysis.col_width,
height_diff = (height-(height-(res.signal*-4)));
const offset_tbl = chan_analysis.offset_tbl;
const height = chan_analysis.graph.offsetHeight - 2;
const step = chan_analysis.col_width;
const height_diff = (height-(height-(res.signal*-4)));

if (scanCache[res.bssid].color == null)
scanCache[res.bssid].color = random.derive_color(res.bssid);

if (scanCache[res.bssid].graph == null)
scanCache[res.bssid].graph = [];
if (scanCache[res.bssid].graph == null || scanCache[res.bssid].graph === undefined) {
const group = document.createElementNS('http://www.w3.org/2000/svg', 'g');
const line = document.createElementNS('http://www.w3.org/2000/svg', 'polyline');
const text = document.createElementNS('http://www.w3.org/2000/svg', 'text');
const color = scanCache[res.bssid].color;

channels.forEach(function(channel) {
if (scanCache[res.bssid].graph[i] == null) {
var group = document.createElementNS('http://www.w3.org/2000/svg', 'g'),
line = document.createElementNS('http://www.w3.org/2000/svg', 'polyline'),
text = document.createElementNS('http://www.w3.org/2000/svg', 'text'),
color = scanCache[res.bssid].color;
line.setAttribute('style', 'fill:'+color+'4f'+';stroke:'+color+';stroke-width:0.5');
text.setAttribute('style', 'fill:'+color+';font-size:9pt; font-family:sans-serif; text-shadow:1px 1px 1px #000');
text.appendChild(document.createTextNode(res.ssid || res.bssid));

line.setAttribute('style', 'fill:'+color+'4f'+';stroke:'+color+';stroke-width:0.5');
text.setAttribute('style', 'fill:'+color+';font-size:9pt; font-family:sans-serif; text-shadow:1px 1px 1px #000');
text.appendChild(document.createTextNode(res.ssid || res.bssid));
group.appendChild(line);
group.appendChild(text);

group.appendChild(line)
group.appendChild(text)
chan_analysis.graph.firstElementChild.appendChild(group);
scanCache[res.bssid].graph = { group : group, line : line, text : text };
}

chan_analysis.graph.firstElementChild.appendChild(group);
scanCache[res.bssid].graph[i] = { group : group, line : line, text : text };
}
channels.forEach(function(channel) {
if (channel_width > 2) {
if (!("main" in scanCache[res.bssid].graph[i])) {
var main = document.createElementNS('http://www.w3.org/2000/svg', 'polyline');
if (!("main" in scanCache[res.bssid].graph)) {
const main = document.createElementNS('http://www.w3.org/2000/svg', 'polyline');
main.setAttribute('style', 'fill:url(#GradientVerticalCenteredBlack)');
scanCache[res.bssid].graph[i].group.appendChild(main)
scanCache[res.bssid].graph.group.appendChild(main);
chan_analysis.graph.firstElementChild.lastElementChild.appendChild(main);
scanCache[res.bssid].graph[i]["main"] = main;
scanCache[res.bssid].graph["main"] = main;
}
var main_offset = offset_tbl[res.channel],
points = [
const main_offset = offset_tbl[res.channel];
const points = [
(main_offset-(step*(2 )))+','+height,
(main_offset-(step*(2-1)))+','+height_diff,
(main_offset+(step*(2-1)))+','+height_diff,
(main_offset+(step*(2 )))+','+height
];
scanCache[res.bssid].graph[i].main.setAttribute('points', points);
scanCache[res.bssid].graph.main.setAttribute('points', points);
}

var chan_offset = offset_tbl[channel],
points = [
const chan_offset = offset_tbl[channel];
const points = [
(chan_offset-(step*(channel_width )))+','+height,
(chan_offset-(step*(channel_width-1)))+','+height_diff,
(chan_offset+(step*(channel_width-1)))+','+height_diff,
(chan_offset+(step*(channel_width )))+','+height
];

scanCache[res.bssid].graph[i].text.setAttribute('x', offset_tbl[res.channel]-step);
scanCache[res.bssid].graph[i].text.setAttribute('y', height_diff - 2);
scanCache[res.bssid].graph[i].line.setAttribute('points', points);
scanCache[res.bssid].graph[i].group.style.zIndex = res.signal*-1;
scanCache[res.bssid].graph[i].group.style.opacity = res.stale ? '0.5' : null;
scanCache[res.bssid].graph.text.setAttribute('x', offset_tbl[res.channel]-step);
scanCache[res.bssid].graph.text.setAttribute('y', height_diff - 2);
scanCache[res.bssid].graph.line.setAttribute('points', points);
scanCache[res.bssid].graph.group.style.zIndex = res.signal*-1;
scanCache[res.bssid].graph.group.style.opacity = res.stale ? '0.5' : null;
})
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ return baseclass.extend({
network.getHostHints(),
this.callSessionAccess('access-group', 'luci-mod-status-index-wifi', 'read'),
this.callSessionAccess('access-group', 'luci-mod-status-index-wifi', 'write'),
uci.load('wireless')
L.hasSystemFeature('wifi') ? L.resolveDefault(uci.load('wireless')) : L.resolveDefault(),
]).then(L.bind(function(data) {
var tasks = [],
radios_networks_hints = data[1],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,6 @@ ol, ul {

html {
font-size: 100%;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
height: 100%;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,6 @@ h6 {

html {
overflow-y: hidden;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}

body {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
background: none;
outline: none;
-webkit-appearance: none;
-webkit-text-size-adjust: none;
}

html {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1791,7 +1791,7 @@ select + .cbi-button {

@media screen and (max-width: 992px) {
body {
-webkit-text-size-adjust: 100%;

}

#maincontainer {
Expand Down

0 comments on commit 7617053

Please sign in to comment.