Compare commits

..

4 Commits

Author SHA1 Message Date
d1bb49c208 🎨优化如果一个页面退出了,其他都退出 2024-06-07 17:09:21 +08:00
92f5f26ad5 🎨调整客户端列表卡片样式 2024-06-07 14:44:47 +08:00
97e6e80d5a 🐛修复不可更改服务端密钥 2024-06-07 11:59:44 +08:00
0d28bd3445 🎨调整客户端检测离线时间为三分钟 2024-06-07 10:46:22 +08:00
4 changed files with 13 additions and 3 deletions

View File

@@ -373,7 +373,7 @@ func (clients) Status(c *gin.Context) {
ipAllocation += iaip.String() + ","
}
ipAllocation = strings.TrimRight(ipAllocation, ",")
isOnline := time.Since(p.LastHandshakeTime).Minutes() < 1
isOnline := time.Since(p.LastHandshakeTime).Minutes() < 3
data = append(data, vo.ClientStatus{
ID: clientInfo.Id,
Name: clientInfo.Name,

View File

@@ -59,6 +59,8 @@ func (r server) Update(p param.SaveServer) (err error) {
"post_up_script": p.PostUpScript,
"pre_down_script": p.PreDownScript,
"post_down_script": p.PostDownScript,
"private_key": p.PrivateKey,
"public_key": p.PublicKey,
}
return r.Model(&entity.Server{}).Where("id = ?", p.Id).Updates(&update).Error
}

View File

@@ -135,6 +135,14 @@ class PureHttp {
$error.isCancelRequest = Axios.isCancel($error);
// 关闭进度条动画
NProgress.done();
if ($error.response.status === 401) {
router.replace({
path: "/login",
query: {
redirect: router.currentRoute.value.fullPath
}
});
}
// 所有的响应异常 区分来源为取消请求/非取消请求
return Promise.reject($error);
}

View File

@@ -309,10 +309,10 @@ getClientsApi(clientSearchForm.value);
</div>
<div class="content">
<el-card body-style="padding: inherit" shadow="hover">
<div class="flex flex-wrap gap-4">
<div class="flex flex-wrap gap-4" style="display: flex;justify-content: center;">
<el-card
v-for="val in clientsList.data"
style="width: 540px"
style="float: left; width: 500px"
shadow="hover"
>
<template #header>