This commit is contained in:
parent
32f61a0eef
commit
299ec93199
@ -80,11 +80,11 @@ func (DashboardApi) ConnectionList(c *gin.Context) {
|
|||||||
connections = append(connections, vo.DataTraffic{
|
connections = append(connections, vo.DataTraffic{
|
||||||
Name: clientInfo.Name,
|
Name: clientInfo.Name,
|
||||||
Email: clientInfo.Email,
|
Email: clientInfo.Email,
|
||||||
IpAllocation: clientInfo.IpAllocation,
|
IpAllocation: ipAllocation,
|
||||||
Online: time.Since(peer.LastHandshakeTime).Minutes() < 3,
|
Online: time.Since(peer.LastHandshakeTime).Minutes() < 3,
|
||||||
ReceiveBytes: utils.FlowCalculation().Parse(peer.TransmitBytes),
|
ReceiveBytes: utils.FlowCalculation().Parse(peer.TransmitBytes),
|
||||||
TransmitBytes: utils.FlowCalculation().Parse(peer.ReceiveBytes),
|
TransmitBytes: utils.FlowCalculation().Parse(peer.ReceiveBytes),
|
||||||
ConnectEndpoint: ipAllocation,
|
ConnectEndpoint: peer.Endpoint.String(),
|
||||||
LastHandAt: peer.LastHandshakeTime.Format("2006-01-02 15:04:05"),
|
LastHandAt: peer.LastHandshakeTime.Format("2006-01-02 15:04:05"),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
16
model/oauth_client.go
Normal file
16
model/oauth_client.go
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
package model
|
||||||
|
|
||||||
|
// AuthClient
|
||||||
|
// @description: 认证客户端
|
||||||
|
type AuthClient struct {
|
||||||
|
Base
|
||||||
|
Name string `json:"name" gorm:"type:varchar(255);not null;comment: '客户端名称'"`
|
||||||
|
ClientID string `json:"clientID" gorm:"type:varchar(255);not null;comment: '客户端ID'"`
|
||||||
|
ClientKey string `json:"clientKey" gorm:"type:varchar(255);not null;comment: '客户端key'"`
|
||||||
|
ExpireAt string `json:"expireAt" gorm:"type:varchar(255);not null;comment: '过期时间'"`
|
||||||
|
IsEnabled int `json:"isEnabled" gorm:"type:int(1);not null;comment: '是否启用'"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (AuthClient) TableName() string {
|
||||||
|
return "t_oauth_client"
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user