fix(ui): label connectivity checks as Проверка состояния
This commit is contained in:
@@ -59,7 +59,7 @@ export function boardAvailable(vehicle:Vehicle):boolean{
|
||||
return vehicle.enrollment==='paired'&&vehicle.connectivity==='online';
|
||||
}
|
||||
export function contourSummary(snapshot:ContourSnapshot|null){
|
||||
if(!snapshot)return {tone:'warning' as const,label:'Проверяем состояние',online:null,total:null};
|
||||
if(!snapshot)return {tone:'warning' as const,label:'Проверка состояния',online:null,total:null};
|
||||
const total=snapshot.workers!==null&&snapshot.vehicles!==null?1+snapshot.workers.length+snapshot.vehicles.length:null;
|
||||
const online=Number(snapshot.core!==null)+(snapshot.workers??[]).filter(item=>workerAvailable(item.telemetry)).length+(snapshot.vehicles??[]).filter(boardAvailable).length;
|
||||
if(snapshot.errors.length)return {tone:'warning' as const,label:'Проверка неполная',online,total};
|
||||
|
||||
Reference in New Issue
Block a user