Merge pull request #6461 from mmohtashamirad/fix_stale_scan_result_in_channel_analysis

luci-mod-status: channel_analysis.js: fix stale scan result.
This commit is contained in:
Jo-Philipp Wich 2023-07-13 11:17:45 +02:00 committed by GitHub
commit 6c259f71d4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -191,6 +191,7 @@ return view.extend({
scanCache[results[i].bssid] = {};
scanCache[results[i].bssid].data = results[i];
scanCache[results[i].bssid].data.stale = false;
}
if (scanCache[local_wifi.bssid] == null)
@ -226,7 +227,7 @@ return view.extend({
}
for (var k in scanCache)
if (scanCache[k].stale)
if (scanCache[k].data.stale)
results.push(scanCache[k].data);
results.sort(function(a, b) {
@ -302,7 +303,7 @@ return view.extend({
E('span', { 'style': s }, '%h'.format(res.bssid))
]);
res.stale = true;
scanCache[results[i].bssid].data.stale = true;
}
cbi_update_table(table, rows);