mirror of
https://github.com/bjdgyc/anylink.git
synced 2025-09-11 05:06:54 +08:00
处理db.go冲突
This commit is contained in:
@@ -24,11 +24,11 @@ type ClientCertData struct {
|
|||||||
Id int `json:"id" xorm:"pk autoincr not null"`
|
Id int `json:"id" xorm:"pk autoincr not null"`
|
||||||
Username string `json:"username" xorm:"varchar(60) not null"`
|
Username string `json:"username" xorm:"varchar(60) not null"`
|
||||||
GroupName string `json:"groupname" xorm:"varchar(60)"`
|
GroupName string `json:"groupname" xorm:"varchar(60)"`
|
||||||
|
Status int `json:"status" xorm:"int default 0"`
|
||||||
Certificate string `json:"certificate" xorm:"text not null"`
|
Certificate string `json:"certificate" xorm:"text not null"`
|
||||||
PrivateKey string `json:"private_key" xorm:"text not null"`
|
PrivateKey string `json:"private_key" xorm:"text not null"`
|
||||||
SerialNumber string `json:"serial_number" xorm:"varchar(100) not null"`
|
SerialNumber string `json:"serial_number" xorm:"varchar(100) not null"`
|
||||||
NotAfter time.Time `json:"not_after" xorm:"datetime not null"`
|
NotAfter time.Time `json:"not_after" xorm:"datetime not null"`
|
||||||
Status int `json:"status" xorm:"int default 0"`
|
|
||||||
CreatedAt time.Time `json:"created_at" xorm:"datetime created"`
|
CreatedAt time.Time `json:"created_at" xorm:"datetime created"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -36,7 +36,7 @@ func initDb() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 初始化数据库
|
// 初始化数据库
|
||||||
err = xdb.Sync2(&User{}, &Setting{}, &Group{}, &IpMap{}, &AccessAudit{}, &Policy{}, &StatsNetwork{}, &StatsCpu{}, &StatsMem{}, &StatsOnline{}, &UserActLog{}, &ClientCertData{})
|
err = xdb.Sync2(&User{}, &Setting{}, &Group{}, &IpMap{}, &AccessAudit{}, &Policy{}, &StatsNetwork{}, &StatsCpu{}, &StatsMem{}, &StatsOnline{}, &UserActLog{}, &PasswordReset{}, &ClientCertData{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
base.Fatal(err)
|
base.Fatal(err)
|
||||||
}
|
}
|
||||||
|
@@ -134,8 +134,9 @@
|
|||||||
<el-dialog title="生成客户端证书" :visible.sync="generateCertDialog" width="450px">
|
<el-dialog title="生成客户端证书" :visible.sync="generateCertDialog" width="450px">
|
||||||
<el-form :model="generateForm" label-width="80px">
|
<el-form :model="generateForm" label-width="80px">
|
||||||
<el-form-item label="用户名">
|
<el-form-item label="用户名">
|
||||||
<el-select v-model="generateForm.username" placeholder="请输入或选择用户名" filterable allow-create
|
<el-select v-model="generateForm.username" placeholder="请输入或选择用户名" filterable clearable allow-create
|
||||||
default-first-option style="width: 100%;" @change="onUserChange">
|
default-first-option style="width: 100%;" @change="onUserChange"
|
||||||
|
popper-class="custom-select-dropdown">
|
||||||
<el-option v-for="user in userList" :key="user.username" :label="user.username"
|
<el-option v-for="user in userList" :key="user.username" :label="user.username"
|
||||||
:value="user.username">
|
:value="user.username">
|
||||||
</el-option>
|
</el-option>
|
||||||
@@ -785,4 +786,14 @@ export default {
|
|||||||
line-height: 1.428;
|
line-height: 1.428;
|
||||||
margin: 2px 0 0 0;
|
margin: 2px 0 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 自定义下拉框样式 */
|
||||||
|
.custom-select-dropdown .el-select-dropdown__wrap {
|
||||||
|
max-height: 200px;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-select-dropdown .el-select-dropdown__list {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
Reference in New Issue
Block a user