← Commit history

dashboard UI: LED render order

John Lauer ·0597fdfb1b ·1mo ago ·parent 77f4d18
2 files changed +3−1
bin/fusion-dashboard
⋯ 1 unchanged line ⋯
dashboard/ui/index.html+3−1
@@ -141,7 +141,9 @@ let lastStatus=null; function renderLeds(st){   const g=$('#ledGrid');g.innerHTML='';   const leds=st.leds||{};-  for(const key of Object.keys(leds)){+  const ORDER=['fusionRunning','addinReady','signedIn','aps','mcp','datahub','update'];+  const keys=ORDER.filter(k=>leds[k]).concat(Object.keys(leds).filter(k=>!ORDER.includes(k)));+  for(const key of keys){     const l=leds[key];     const cls=l.pending?'warn':(l.on?'on':'off');     const el=document.createElement('div');el.className='card';