mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-31 14:08:06 +08:00
fix: Fail2ban 配置修改后重启服务 (#3261)
This commit is contained in:
parent
73d41675a0
commit
3a6e526033
@ -19,7 +19,7 @@ type Fail2BanSearch struct {
|
||||
}
|
||||
|
||||
type Fail2BanUpdate struct {
|
||||
Key string `json:"key" validate:"required,oneof=port bantime findtime maxretry banaction logpath"`
|
||||
Key string `json:"key" validate:"required,oneof=port bantime findtime maxretry banaction logpath port"`
|
||||
Value string `json:"value"`
|
||||
}
|
||||
|
||||
|
@ -167,7 +167,7 @@ func (u *Fail2BanService) UpdateConf(req dto.Fail2BanUpdate) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := client.Operate("reload"); err != nil {
|
||||
if err := client.Operate("restart"); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
@ -187,7 +187,7 @@ func (u *Fail2BanService) UpdateConfByFile(req dto.UpdateByFile) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := client.Operate("reload"); err != nil {
|
||||
if err := client.Operate("restart"); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
|
@ -14984,9 +14984,15 @@ const docTemplate = `{
|
||||
"isExist": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"logPath": {
|
||||
"type": "string"
|
||||
},
|
||||
"maxRetry": {
|
||||
"type": "integer"
|
||||
},
|
||||
"port": {
|
||||
"type": "integer"
|
||||
},
|
||||
"version": {
|
||||
"type": "string"
|
||||
}
|
||||
@ -15020,7 +15026,9 @@ const docTemplate = `{
|
||||
"bantime",
|
||||
"findtime",
|
||||
"maxretry",
|
||||
"banaction"
|
||||
"banaction",
|
||||
"logpath",
|
||||
"port"
|
||||
]
|
||||
},
|
||||
"value": {
|
||||
@ -16603,7 +16611,8 @@ const docTemplate = `{
|
||||
"dto.SSLUpdate": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"ssl"
|
||||
"ssl",
|
||||
"sslType"
|
||||
],
|
||||
"properties": {
|
||||
"cert": {
|
||||
@ -16626,7 +16635,13 @@ const docTemplate = `{
|
||||
"type": "integer"
|
||||
},
|
||||
"sslType": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"self",
|
||||
"select",
|
||||
"import-paste",
|
||||
"import-local"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -14977,9 +14977,15 @@
|
||||
"isExist": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"logPath": {
|
||||
"type": "string"
|
||||
},
|
||||
"maxRetry": {
|
||||
"type": "integer"
|
||||
},
|
||||
"port": {
|
||||
"type": "integer"
|
||||
},
|
||||
"version": {
|
||||
"type": "string"
|
||||
}
|
||||
@ -15013,7 +15019,9 @@
|
||||
"bantime",
|
||||
"findtime",
|
||||
"maxretry",
|
||||
"banaction"
|
||||
"banaction",
|
||||
"logpath",
|
||||
"port"
|
||||
]
|
||||
},
|
||||
"value": {
|
||||
@ -16596,7 +16604,8 @@
|
||||
"dto.SSLUpdate": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"ssl"
|
||||
"ssl",
|
||||
"sslType"
|
||||
],
|
||||
"properties": {
|
||||
"cert": {
|
||||
@ -16619,7 +16628,13 @@
|
||||
"type": "integer"
|
||||
},
|
||||
"sslType": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"self",
|
||||
"select",
|
||||
"import-paste",
|
||||
"import-local"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -1079,8 +1079,12 @@ definitions:
|
||||
type: boolean
|
||||
isExist:
|
||||
type: boolean
|
||||
logPath:
|
||||
type: string
|
||||
maxRetry:
|
||||
type: integer
|
||||
port:
|
||||
type: integer
|
||||
version:
|
||||
type: string
|
||||
type: object
|
||||
@ -1103,6 +1107,8 @@ definitions:
|
||||
- findtime
|
||||
- maxretry
|
||||
- banaction
|
||||
- logpath
|
||||
- port
|
||||
type: string
|
||||
value:
|
||||
type: string
|
||||
@ -2186,9 +2192,15 @@ definitions:
|
||||
sslID:
|
||||
type: integer
|
||||
sslType:
|
||||
enum:
|
||||
- self
|
||||
- select
|
||||
- import-paste
|
||||
- import-local
|
||||
type: string
|
||||
required:
|
||||
- ssl
|
||||
- sslType
|
||||
type: object
|
||||
dto.SearchForAnalysis:
|
||||
properties:
|
||||
|
@ -1226,7 +1226,7 @@ const message = {
|
||||
OneDrive: 'Microsoft OneDrive',
|
||||
backupDir: 'Backup dir',
|
||||
codeWarning: 'The current authorization code format is incorrect, please confirm again!',
|
||||
isCN: 'Domestic version',
|
||||
isCN: 'Domestic version (not supported at the moment)',
|
||||
code: 'Auth code',
|
||||
codeHelper:
|
||||
'Please click on the "Acquire" button, then login to OneDrive and copy the content after "code" in the redirected link. Paste it into this input box. For specific instructions, please refer to the official documentation.',
|
||||
|
@ -1153,7 +1153,7 @@ const message = {
|
||||
OneDrive: '微軟 OneDrive',
|
||||
codeWarning: '當前授權碼格式錯誤,請重新確認!',
|
||||
backupDir: '備份路徑',
|
||||
isCN: '國內版',
|
||||
isCN: '國內版 (暫不支持)',
|
||||
code: '授權碼',
|
||||
codeHelper:
|
||||
'請點擊獲取按鈕,然後登錄 OneDrive 復製跳轉鏈接中 code 後面的內容,粘貼到該輸入框中,具體操作可參考官方文檔。',
|
||||
|
@ -1154,7 +1154,7 @@ const message = {
|
||||
OneDrive: '微软 OneDrive',
|
||||
codeWarning: '当前授权码格式错误,请重新确认!',
|
||||
backupDir: '备份路径',
|
||||
isCN: '国内版',
|
||||
isCN: '国内版 (暂不支持)',
|
||||
code: '授权码',
|
||||
codeHelper:
|
||||
'请点击获取按钮,然后登录 OneDrive 复制跳转链接中 code 后面的内容,粘贴到该输入框中,具体操作可参考官方文档。',
|
||||
|
@ -195,7 +195,7 @@ const loadRepos = async () => {
|
||||
};
|
||||
|
||||
const onDelete = (row: Container.ImageInfo) => {
|
||||
let names = row.tags || [row.id.replaceAll('sha256:', '').substring(0, 12)];
|
||||
let names = [row.id.replaceAll('sha256:', '').substring(0, 12)];
|
||||
opRef.value.acceptParams({
|
||||
title: i18n.global.t('commons.button.delete'),
|
||||
names: names,
|
||||
|
@ -46,7 +46,11 @@
|
||||
<el-input show-password clearable v-model.trim="dialogData.rowData!.credential" />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="dialogData.rowData!.type === 'OneDrive'">
|
||||
<el-checkbox v-model="dialogData.rowData!.varsJson['isCN']" :label="$t('setting.isCN')" />
|
||||
<el-checkbox
|
||||
disabled
|
||||
v-model="dialogData.rowData!.varsJson['isCN']"
|
||||
:label="$t('setting.isCN')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="dialogData.rowData!.type === 'OneDrive'"
|
||||
|
Loading…
x
Reference in New Issue
Block a user