|
208 | 208 | <svg viewBox="0 0 24 24"><path d="M19.36 2.72 20.78 4.14l-1.4 1.41 1.41 1.41-4.24 4.24-1.41-1.41-6.89 6.9a4 4 0 0 1-1.2 4.71l-2.83 2.12-1.41-1.41 2.12-2.83a2 2 0 0 0 .27-2.1l-.27-.42L3 15.36l1.41-1.41 1.42 1.42 5.65-5.66-1.41-1.41 4.24-4.24 1.41 1.41z"/></svg> |
209 | 209 | </div> |
210 | 210 | <div> |
211 | | - <div class="topbar-title">Orphan Entity Cleaner <span style="font-size:11px;font-weight:400;color:var(--text2);margin-left:6px">v2.0.4</span></div> |
| 211 | + <div class="topbar-title">Orphan Entity Cleaner <span style="font-size:11px;font-weight:400;color:var(--text2);margin-left:6px">v2.0.5</span></div> |
212 | 212 | <div class="topbar-sub">Home Assistant Integration — orphan entity cleanup</div> |
213 | 213 | </div> |
214 | 214 | <div class="topbar-spacer"></div> |
@@ -286,6 +286,8 @@ <h3>Available services</h3> |
286 | 286 |
|
287 | 287 | </div> |
288 | 288 |
|
| 289 | +<div id="debug-box" style="margin:10px 0;padding:10px 14px;background:var(--surface2);border-radius:var(--radius-sm);font-size:11px;font-family:monospace;color:var(--text2);display:none;white-space:pre-wrap;border:1px solid var(--border2);"></div> |
| 290 | + |
289 | 291 | <!-- Confirm modal --> |
290 | 292 | <div class="overlay-wrap" id="overlay"> |
291 | 293 | <div class="modal"> |
@@ -321,9 +323,13 @@ <h2>Confirm deletion</h2> |
321 | 323 | function applyIgnore() { |
322 | 324 | const items = filteredOrphans(); |
323 | 325 | const active = items.filter(e => !e._ignored); |
324 | | - console.log('[IgnoreDebug] ignorePlatforms:', [...ignorePlatforms]); |
325 | | - console.log('[IgnoreDebug] sample platforms in allOrphans:', [...new Set(allOrphans.map(e=>e.platform))].slice(0,20)); |
326 | | - console.log('[IgnoreDebug] ignored count:', items.filter(e=>e._ignored).length, '/', items.length); |
| 326 | + const dbg = document.getElementById('debug-box'); |
| 327 | + const platformsInData = [...new Set(allOrphans.map(e=>e.platform))].sort(); |
| 328 | + dbg.style.display = 'block'; |
| 329 | + dbg.textContent = |
| 330 | + 'ignorePlatforms set : ' + JSON.stringify([...ignorePlatforms]) + '\n' + |
| 331 | + 'platforms in data : ' + JSON.stringify(platformsInData) + '\n' + |
| 332 | + 'ignored count : ' + items.filter(e=>e._ignored).length + ' / ' + items.length; |
327 | 333 | // deseleziona entità che ora sono ignorate |
328 | 334 | items.filter(e => e._ignored).forEach(e => selected.delete(e.entity_id)); |
329 | 335 | renderTable(items); |
|
0 commit comments