1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-19 08:19:15 +08:00

fix: 快速跳转样式调整 (#3270)

This commit is contained in:
ssongliu 2023-12-11 18:08:07 +08:00 committed by GitHub
parent 94a2d4b475
commit 0931395c09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 28 additions and 43 deletions

View File

@ -101,17 +101,20 @@ func (u *Fail2BanService) Operate(operation string) error {
func (u *Fail2BanService) UpdateConf(req dto.Fail2BanUpdate) error { func (u *Fail2BanService) UpdateConf(req dto.Fail2BanUpdate) error {
if req.Key == "banaction" { if req.Key == "banaction" {
if req.Value == "firewallcmd-ipset" || req.Value == "ufw" { if req.Value == "firewallcmd-ipset" || req.Value == "ufw" {
itemName := "ufw"
if req.Value == "firewallcmd-ipset" {
itemName = "firewallcmd"
}
client, err := firewall.NewFirewallClient() client, err := firewall.NewFirewallClient()
if err != nil { if err != nil {
return err return err
} }
if client.Name() != itemName {
return buserr.WithName("ErrBanAction", itemName)
}
status, _ := client.Status() status, _ := client.Status()
if status != "running" { if status != "running" {
service := "firewalld" return buserr.WithName("ErrBanAction", itemName)
if req.Value == "ufw" {
service = "ufw"
}
return buserr.WithName("ErrBanAction", service)
} }
} }
} }

View File

@ -97,7 +97,7 @@ func (f *Fail2ban) ListBanned() ([]string, error) {
if err != nil { if err != nil {
return lists, err return lists, err
} }
itemList := strings.Split(stdout, "\n") itemList := strings.Split(stdout, " ")
for _, item := range itemList { for _, item := range itemList {
if len(item) != 0 { if len(item) != 0 {
lists = append(lists, item) lists = append(lists, item)

View File

@ -67,7 +67,7 @@
<div> <div>
<span>{{ $t('app.checkInstalledWarn', [data.app]) }}</span> <span>{{ $t('app.checkInstalledWarn', [data.app]) }}</span>
<span @click="goRouter(key)"> <span @click="goRouter(key)">
<el-icon><Position /></el-icon> <el-icon class="ml-2"><Position /></el-icon>
{{ $t('database.goInstall') }} {{ $t('database.goInstall') }}
</span> </span>
<div> <div>

View File

@ -755,7 +755,6 @@ const message = {
sockPath: 'Socket Path', sockPath: 'Socket Path',
sockPathHelper: 'Communication channel between Docker Daemon and the client', sockPathHelper: 'Communication channel between Docker Daemon and the client',
sockPathHelper1: 'Default Path: /var/run/docker-x.sock', sockPathHelper1: 'Default Path: /var/run/docker-x.sock',
sockPathHelper2: 'CurrentPath: {0}',
sockPathMsg: sockPathMsg:
'Saving the Socket Path setting may result in Docker service being unavailable. Do you want to continue?', 'Saving the Socket Path setting may result in Docker service being unavailable. Do you want to continue?',
sockPathErr: 'Please select or enter the correct Docker sock file path', sockPathErr: 'Please select or enter the correct Docker sock file path',
@ -953,7 +952,7 @@ const message = {
fail2ban: { fail2ban: {
sshPort: 'Listen to SSH Port', sshPort: 'Listen to SSH Port',
sshPortHelper: 'Current Fail2ban listens to the SSH connection port of the host', sshPortHelper: 'Current Fail2ban listens to the SSH connection port of the host',
noFail2ban: 'Fail2ban service not detected, please refer to the official documentation for installation', noFail2ban: 'Fail2ban service not detected, please refer to the official documentation for installation!',
unActive: 'The Fail2ban service is not enabled at present, please enable it first!', unActive: 'The Fail2ban service is not enabled at present, please enable it first!',
operation: 'Perform [{0}] operation on Fail2ban service, continue?', operation: 'Perform [{0}] operation on Fail2ban service, continue?',
fail2banChange: 'Fail2ban Configuration Modification', fail2banChange: 'Fail2ban Configuration Modification',

View File

@ -726,7 +726,6 @@ const message = {
sockPath: 'Socket 路徑', sockPath: 'Socket 路徑',
sockPathHelper: 'Docker 守護進程Docker Daemon與客戶端之間的通信通道', sockPathHelper: 'Docker 守護進程Docker Daemon與客戶端之間的通信通道',
sockPathHelper1: '默認路徑/var/run/docker-x.sock', sockPathHelper1: '默認路徑/var/run/docker-x.sock',
sockPathHelper2: '當前路徑{0}',
sockPathMsg: '保存設定 Socket 路徑可能導致 Docker 服務不可用是否繼續', sockPathMsg: '保存設定 Socket 路徑可能導致 Docker 服務不可用是否繼續',
sockPathErr: '請選擇或輸入正確的 Docker sock 文件路徑', sockPathErr: '請選擇或輸入正確的 Docker sock 文件路徑',
}, },
@ -904,7 +903,7 @@ const message = {
fail2ban: { fail2ban: {
sshPort: '監聽 SSH 端口', sshPort: '監聽 SSH 端口',
sshPortHelper: '當前 Fail2ban 監聽主機 SSH 連接端口', sshPortHelper: '當前 Fail2ban 監聽主機 SSH 連接端口',
noFail2ban: '未檢測到 Fail2ban 服務請參考官方文檔進行安裝', noFail2ban: '未檢測到 Fail2ban 服務請參考官方文檔進行安裝',
unActive: '當前未開啟 Fail2ban 服務請先開啟', unActive: '當前未開啟 Fail2ban 服務請先開啟',
operation: ' Fail2ban 服務進行 [{0}] 操作是否繼續', operation: ' Fail2ban 服務進行 [{0}] 操作是否繼續',
fail2banChange: 'Fail2ban 配置修改', fail2banChange: 'Fail2ban 配置修改',
@ -1376,7 +1375,7 @@ const message = {
update: '更新', update: '更新',
versionSelect: '請選擇版本', versionSelect: '請選擇版本',
operatorHelper: '將對選中應用進行 {0} 操作是否繼續', operatorHelper: '將對選中應用進行 {0} 操作是否繼續',
checkInstalledWarn: '未檢測到 {0} ,請進入應用商店點擊安裝!', checkInstalledWarn: '未檢測到 {0} ,請進入應用商店點擊安裝',
gotoInstalled: '去安裝', gotoInstalled: '去安裝',
search: '搜索', search: '搜索',
limitHelper: '該應用已安裝不支持重復安裝', limitHelper: '該應用已安裝不支持重復安裝',

View File

@ -727,7 +727,6 @@ const message = {
sockPath: 'Socket 路径', sockPath: 'Socket 路径',
sockPathHelper: 'Docker 守护进程Docker Daemon与客户端之间的通信通道', sockPathHelper: 'Docker 守护进程Docker Daemon与客户端之间的通信通道',
sockPathHelper1: '默认路径/var/run/docker.sock', sockPathHelper1: '默认路径/var/run/docker.sock',
sockPathHelper2: '当前路径{0}',
sockPathMsg: '保存设置 Socket 路径可能导致 Docker 服务不可用是否继续', sockPathMsg: '保存设置 Socket 路径可能导致 Docker 服务不可用是否继续',
sockPathErr: '请选择或输入正确的 Docker sock 文件路径', sockPathErr: '请选择或输入正确的 Docker sock 文件路径',
}, },
@ -905,7 +904,7 @@ const message = {
fail2ban: { fail2ban: {
sshPort: '监听 SSH 端口', sshPort: '监听 SSH 端口',
sshPortHelper: '当前 Fail2ban 监听主机 SSH 连接端口', sshPortHelper: '当前 Fail2ban 监听主机 SSH 连接端口',
noFail2ban: '未检测到 Fail2ban 服务请参考官方文档进行安装', noFail2ban: '未检测到 Fail2ban 服务请参考官方文档进行安装',
unActive: '当前未开启 Fail2ban 服务请先开启', unActive: '当前未开启 Fail2ban 服务请先开启',
operation: ' Fail2ban 服务进行 [{0}] 操作是否继续', operation: ' Fail2ban 服务进行 [{0}] 操作是否继续',
fail2banChange: 'Fail2ban 配置修改', fail2banChange: 'Fail2ban 配置修改',
@ -1376,7 +1375,7 @@ const message = {
update: '更新', update: '更新',
versionSelect: '请选择版本', versionSelect: '请选择版本',
operatorHelper: '将对选中应用进行 {0} 操作是否继续', operatorHelper: '将对选中应用进行 {0} 操作是否继续',
checkInstalledWarn: '未检测到 {0} ,请进入应用商店点击安装!', checkInstalledWarn: '未检测到 {0} ,请进入应用商店点击安装',
gotoInstalled: '去安装', gotoInstalled: '去安装',
search: '搜索', search: '搜索',
limitHelper: '该应用已安装不支持重复安装', limitHelper: '该应用已安装不支持重复安装',

View File

@ -75,7 +75,7 @@ const loading = ref();
const drawerVisible = ref(); const drawerVisible = ref();
const confirmDialogRef = ref(); const confirmDialogRef = ref();
const formRef = ref(); const formRef = ref();
const showMore = ref(false); const showMore = ref(true);
interface DialogProps { interface DialogProps {
fixedCidrV6: string; fixedCidrV6: string;

View File

@ -22,9 +22,6 @@
</template> </template>
</el-input> </el-input>
<span class="input-help">{{ $t('container.sockPathHelper1') }}</span> <span class="input-help">{{ $t('container.sockPathHelper1') }}</span>
<span class="input-help" style="margin-top: -12px">
{{ $t('container.sockPathHelper2', [form.currentPath]) }}
</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>

View File

@ -190,7 +190,7 @@
<div> <div>
<span>{{ $t('app.checkInstalledWarn', [$t('database.noMysql')]) }}</span> <span>{{ $t('app.checkInstalledWarn', [$t('database.noMysql')]) }}</span>
<span @click="goRouter('app')"> <span @click="goRouter('app')">
<el-icon><Position /></el-icon> <el-icon class="ml-2"><Position /></el-icon>
{{ $t('database.goInstall') }} {{ $t('database.goInstall') }}
</span> </span>
<div> <div>

View File

@ -109,14 +109,10 @@
<div class="app-warn"> <div class="app-warn">
<div> <div>
<span>{{ $t('firewall.notSupport') }}</span> <span>{{ $t('firewall.notSupport') }}</span>
<el-link <span @click="toDoc">
style="font-size: 12px; margin-left: 5px" <el-icon class="ml-2"><Position /></el-icon>
@click="toDoc"
icon="Position"
type="primary"
>
{{ $t('firewall.quickJump') }} {{ $t('firewall.quickJump') }}
</el-link> </span>
<div> <div>
<img src="@/assets/images/no_app.svg" /> <img src="@/assets/images/no_app.svg" />
</div> </div>

View File

@ -159,14 +159,10 @@
<div class="app-warn"> <div class="app-warn">
<div> <div>
<span>{{ $t('firewall.notSupport') }}</span> <span>{{ $t('firewall.notSupport') }}</span>
<el-link <span @click="toDoc">
style="font-size: 12px; margin-left: 5px" <el-icon class="ml-2"><Position /></el-icon>
@click="toDoc"
icon="Position"
type="primary"
>
{{ $t('firewall.quickJump') }} {{ $t('firewall.quickJump') }}
</el-link> </span>
<div> <div>
<img src="@/assets/images/no_app.svg" /> <img src="@/assets/images/no_app.svg" />
</div> </div>

View File

@ -152,16 +152,12 @@
<div class="app-warn"> <div class="app-warn">
<div> <div>
<span>{{ $t('toolbox.fail2ban.noFail2ban') }}</span> <span>{{ $t('toolbox.fail2ban.noFail2ban') }}</span>
<el-link <span @click="toDoc">
style="font-size: 12px; margin-left: 5px" <el-icon class="ml-2"><Position /></el-icon>
@click="toDoc"
icon="Position"
type="primary"
>
{{ $t('firewall.quickJump') }} {{ $t('firewall.quickJump') }}
</el-link> </span>
<div> <div>
<img alt="" src="@/assets/images/no_app.svg" /> <img src="@/assets/images/no_app.svg" />
</div> </div>
</div> </div>
</div> </div>

View File

@ -43,7 +43,7 @@
<span v-else-if="!data.ctlExist">{{ $t('tool.supervisor.notSupportCrl') }}</span> <span v-else-if="!data.ctlExist">{{ $t('tool.supervisor.notSupportCrl') }}</span>
<span v-else-if="data.init">{{ $t('tool.supervisor.initHelper') }}</span> <span v-else-if="data.init">{{ $t('tool.supervisor.initHelper') }}</span>
<span @click="toDoc()" v-if="!data.isExist || !data.ctlExist"> <span @click="toDoc()" v-if="!data.isExist || !data.ctlExist">
<el-icon><Position /></el-icon> <el-icon class="ml-2"><Position /></el-icon>
{{ $t('firewall.quickJump') }} {{ $t('firewall.quickJump') }}
</span> </span>
<div> <div>