mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-31 14:08:06 +08:00
fix: 防火墙样式调整 (#515)
This commit is contained in:
parent
1a1a14719d
commit
363a67b0f2
@ -34,6 +34,9 @@ func (u *FirewallService) LoadBaseInfo() (dto.FirewallBaseInfo, error) {
|
||||
var baseInfo dto.FirewallBaseInfo
|
||||
client, err := firewall.NewFirewallClient()
|
||||
if err != nil {
|
||||
if err.Error() == "no such type" {
|
||||
return dto.FirewallBaseInfo{Name: "-", Version: "-", Status: "not running", PingStatus: "Disable"}, nil
|
||||
}
|
||||
return baseInfo, err
|
||||
}
|
||||
baseInfo.Name = client.Name()
|
||||
@ -294,7 +297,6 @@ func (u *FirewallService) BacthOperateRule(req dto.BatchRuleOperate) error {
|
||||
}
|
||||
|
||||
func OperateFirewallPort(oldPorts, newPorts []int) error {
|
||||
fmt.Printf("old: %v, new: %v \n", oldPorts, newPorts)
|
||||
client, err := firewall.NewFirewallClient()
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -29,6 +29,16 @@ const hostRouter = {
|
||||
requiresAuth: false,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/hosts/terminal',
|
||||
name: 'Terminal',
|
||||
component: () => import('@/views/host/terminal/index.vue'),
|
||||
meta: {
|
||||
title: 'menu.terminal',
|
||||
keepAlive: true,
|
||||
requiresAuth: false,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/hosts/firewall/port',
|
||||
name: 'FirewallPort',
|
||||
@ -48,16 +58,6 @@ const hostRouter = {
|
||||
requiresAuth: false,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/hosts/terminal',
|
||||
name: 'Terminal',
|
||||
component: () => import('@/views/host/terminal/index.vue'),
|
||||
meta: {
|
||||
title: 'menu.terminal',
|
||||
keepAlive: true,
|
||||
requiresAuth: false,
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
|
@ -21,8 +21,8 @@
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('firewall.strategy')" prop="strategy">
|
||||
<el-radio-group v-model="dialogData.rowData!.strategy">
|
||||
<el-radio label="accept">{{ $t('firewall.accept') }}</el-radio>
|
||||
<el-radio label="drop">{{ $t('firewall.drop') }}</el-radio>
|
||||
<el-radio label="accept">{{ $t('firewall.allow') }}</el-radio>
|
||||
<el-radio label="drop">{{ $t('firewall.deny') }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<div class="app-status" style="margin-top: 20px">
|
||||
<el-card>
|
||||
<div>
|
||||
<el-tag style="float: left" effect="dark" type="success">{{ baseInfo.name }}</el-tag>
|
||||
<el-tag effect="dark" type="success">{{ baseInfo.name }}</el-tag>
|
||||
<el-tag round class="status-content" v-if="baseInfo.status === 'running'" type="success">
|
||||
{{ $t('commons.status.running') }}
|
||||
</el-tag>
|
||||
|
Loading…
x
Reference in New Issue
Block a user