fix: dirty_device_ids同时检测source变更
This commit is contained in:
parent
6ff7acf283
commit
64febdc0cb
@ -394,7 +394,12 @@
|
||||
var did = row.getAttribute('data-device-id');
|
||||
var feats = [];
|
||||
row.querySelectorAll('input[type=checkbox]:checked').forEach(function(cb) { feats.push(cb.value); });
|
||||
if (feats.sort().join(',') === (initialFeatures[did]||[]).sort().join(',')) return;
|
||||
if (feats.sort().join(',') === (initialFeatures[did]||[]).sort().join(',')) {
|
||||
// Check sources too - device may be dirty from source changes only
|
||||
var srcs = [];
|
||||
row.querySelectorAll('input[type=hidden][name^=device_]').forEach(function(h) { srcs.push(h.value); });
|
||||
if (srcs.sort().join(',') === (initialSources[did]||[]).sort().join(',')) return;
|
||||
}
|
||||
dirtyDevs.push(did);
|
||||
var nameEl = row.querySelector('.console-device-name');
|
||||
var dname = nameEl ? nameEl.textContent : did;
|
||||
|
||||
Binary file not shown.
Loading…
Reference in New Issue
Block a user