Skip to content

Commit

Permalink
optimize: 慢速IP的时间可配置化。
Browse files Browse the repository at this point in the history
  • Loading branch information
wangliang181230 committed Nov 5, 2024
1 parent 2d008a1 commit 10d75a4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion packages/core/src/config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ module.exports = {
timeout: 20000,
keepAliveTimeout: 30000
}
}
},

// 慢速IP延迟时间:测速超过该值时,则视为延迟高,显示为橙色
lowSpeedDelay: 150
},
compatible: {
// **** 自定义兼容配置 **** //
Expand Down
2 changes: 1 addition & 1 deletion packages/gui/src/view/pages/server.vue
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@
<a-icon v-else type="info-circle"/>
</a>
<a-tag style="margin:2px;" v-for="(element,index) of item.backupList" :title="element.dns"
:color="element.time?(element.time>200?'orange':'green'):'red'" :key='index'>
:color="element.time?(element.time>config.server.setting.lowSpeedDelay?'orange':'green'):'red'" :key='index'>
{{ element.host }} {{ element.time }}{{ element.time ? 'ms' : '' }} {{ element.dns }}
</a-tag>
</a-card>
Expand Down

0 comments on commit 10d75a4

Please sign in to comment.