mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-12-05 11:50:25 +08:00
增加用户系统界面管理、用户可以设置关联集群
This commit is contained in:
@@ -34,6 +34,13 @@ func (this *IndexAction) RunGet(params struct {
|
||||
}
|
||||
userMaps := []maps.Map{}
|
||||
for _, user := range usersResp.Users {
|
||||
var clusterMap maps.Map = nil
|
||||
if user.Cluster != nil {
|
||||
clusterMap = maps.Map{
|
||||
"id": user.Cluster.Id,
|
||||
"name": user.Cluster.Name,
|
||||
}
|
||||
}
|
||||
userMaps = append(userMaps, maps.Map{
|
||||
"id": user.Id,
|
||||
"username": user.Username,
|
||||
@@ -43,6 +50,7 @@ func (this *IndexAction) RunGet(params struct {
|
||||
"mobile": user.Mobile,
|
||||
"tel": user.Tel,
|
||||
"createdTime": timeutil.FormatTime("Y-m-d H:i:s", user.CreatedAt),
|
||||
"cluster": clusterMap,
|
||||
})
|
||||
}
|
||||
this.Data["users"] = userMaps
|
||||
|
||||
Reference in New Issue
Block a user