优化界面/修改用户集群不影响套餐服务

This commit is contained in:
刘祥超
2022-05-25 11:44:05 +08:00
parent 1a19c7520a
commit f47a3b0586
4 changed files with 16 additions and 3 deletions

View File

@@ -34,7 +34,9 @@ func SendMessageToCluster(ctx context.Context, clusterId int64, code string, msg
} }
// 获取所有节点 // 获取所有节点
nodesResp, err := defaultRPCClient.NodeRPC().FindAllEnabledNodesWithNodeClusterId(ctx, &pb.FindAllEnabledNodesWithNodeClusterIdRequest{NodeClusterId: clusterId}) nodesResp, err := defaultRPCClient.NodeRPC().FindAllEnabledNodesWithNodeClusterId(ctx, &pb.FindAllEnabledNodesWithNodeClusterIdRequest{
NodeClusterId: clusterId,
})
if err != nil { if err != nil {
return results, err return results, err
} }

View File

@@ -22,6 +22,17 @@ func (this *IndexAction) RunGet(params struct {
this.Data["keyword"] = params.Keyword this.Data["keyword"] = params.Keyword
this.Data["isVerifying"] = params.Verifying this.Data["isVerifying"] = params.Verifying
// 未审核的总数量
countVerifyingUsersResp, err := this.RPC().UserRPC().CountAllEnabledUsers(this.AdminContext(), &pb.CountAllEnabledUsersRequest{
IsVerifying: true,
})
if err != nil {
this.ErrorPage(err)
return
}
this.Data["countVerifyingUsers"] = countVerifyingUsersResp.Count
// 当前匹配的数量
countResp, err := this.RPC().UserRPC().CountAllEnabledUsers(this.AdminContext(), &pb.CountAllEnabledUsersRequest{ countResp, err := this.RPC().UserRPC().CountAllEnabledUsers(this.AdminContext(), &pb.CountAllEnabledUsersRequest{
Keyword: params.Keyword, Keyword: params.Keyword,
IsVerifying: params.Verifying, IsVerifying: params.Verifying,

View File

@@ -2,7 +2,7 @@
<first-menu> <first-menu>
<menu-item href="/users" :active="!isVerifying">全部用户</menu-item> <menu-item href="/users" :active="!isVerifying">全部用户</menu-item>
<menu-item href="/users?verifying=1" :active="isVerifying" v-if="teaIsPlus">待审核</menu-item> <menu-item href="/users?verifying=1" :active="isVerifying" v-if="teaIsPlus">待审核<span v-if="countVerifyingUsers > 0">({{countVerifyingUsers}})</span></menu-item>
<span class="item disabled">|</span> <span class="item disabled">|</span>
<menu-item @click.prevent="createUser">[创建用户]</menu-item> <menu-item @click.prevent="createUser">[创建用户]</menu-item>
</first-menu> </first-menu>

View File

@@ -42,7 +42,7 @@
<td>关联集群 *</td> <td>关联集群 *</td>
<td> <td>
<cluster-selector :v-cluster-id="clusterId"></cluster-selector> <cluster-selector :v-cluster-id="clusterId"></cluster-selector>
<p class="comment">用户发布的网站服务会自动部署到此集群,修改此选项会同步修改当前用户下的所有服务。</p> <p class="comment">用户发布的网站服务会自动部署到此集群,修改此选项会同步修改当前用户下的所有服务,但不影响和套餐绑定的服务</p>
</td> </td>
</tr> </tr>
<tr> <tr>