File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed
Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -63,9 +63,7 @@ export async function getStatusPageConfig(userId: number) {
6363
6464 // 构建返回的客户端列表,标记哪些客户端被选中
6565 const agents = allAgents . map ( ( agent : any ) => {
66- const isSelected = agentsResult . some (
67- ( a : any ) => a . agent_id === agent . id
68- ) ;
66+ const isSelected = agentsResult . some ( ( a : any ) => a . agent_id === agent . id ) ;
6967 return { ...agent , selected : isSelected } ;
7068 } ) ;
7169
@@ -203,8 +201,9 @@ export async function getStatusPagePublicData(userId: number) {
203201 ) ;
204202 if ( monitor ) {
205203 // 确保监控项存在
206- const monitorDailyStats =
207- await repositories . getMonitorDailyStatsById ( monitorId ) ;
204+ const monitorDailyStats = await repositories . getMonitorDailyStatsById (
205+ monitorId
206+ ) ;
208207 const monitorHistory =
209208 await repositories . getMonitorStatusHistoryIn24h ( monitorId ) ;
210209 monitors . push ( {
@@ -223,10 +222,8 @@ export async function getStatusPagePublicData(userId: number) {
223222 const agentIds = selectedAgents . map ( ( a : any ) => a . agent_id ) ;
224223 if ( agentIds . length > 0 ) {
225224 const agentsResult = await repositories . getAgentsByIds ( agentIds ) ;
226- // @ts -ignore
227- if ( agentsResult && agentsResult . results ) {
228- // @ts -ignore
229- agents = agentsResult . results as Agent [ ] ;
225+ if ( agentsResult ) {
226+ agents = agentsResult as Agent [ ] ;
230227 }
231228 }
232229 }
You can’t perform that action at this time.
0 commit comments