Keep alert scope visible consistently with NAS

This commit is contained in:
way
2026-10-17 23:45:14 +08:00
parent 242b0d223f
commit fbd2f2a8c0
3 changed files with 9 additions and 3 deletions
+3 -2
View File
@@ -9,9 +9,10 @@ const entry={host:{name:'Frame Flow'},dataCurrent:true,snapshot:{resources:[{id:
entry.snapshot.resources.push({id:'job:slideshow',name:'家庭照片轮播',type:'job'});
entry.snapshot.metrics.push({resource_id:'job:slideshow',key:'job_enabled',value:1,unit:'boolean'},{resource_id:'job:slideshow',key:'last_run_success',value:1,unit:'boolean'});
for(const lang of ['zh','en'])for(const width of [1440,820,390]) {
const page=await browser.newPage({viewport:{width,height:1000}});
const page=await browser.newPage({bypassCSP:true,viewport:{width,height:1000}});
await page.goto('http://192.168.89.19/');
const result=await page.evaluate(({source,entry,lang})=>{
const result=await page.evaluate(async ({source,entry,lang})=>{
const {scopeAlertHealth,summaryStatus}=await import('/assets/js/overview-health.js');
const state={LANG:lang};const text=(zh,en)=>lang==='zh'?zh:en;
const esc=v=>String(v??'').replace(/[&<>"']/g,c=>({'&':'&amp;','<':'&lt;','>':'&gt;','"':'&quot;',"'":'&#39;'}[c]));
const html=eval(source+'\nhostCard(entry)');