mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-03-14 01:34:47 +08:00
fix: 防火墙与进程守护加载样式调整 (#1864)
This commit is contained in:
parent
2e73857b42
commit
9b02e88e3c
@ -3,6 +3,7 @@ package client
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
"sync"
|
||||||
|
|
||||||
"github.com/1Panel-dev/1Panel/backend/buserr"
|
"github.com/1Panel-dev/1Panel/backend/buserr"
|
||||||
"github.com/1Panel-dev/1Panel/backend/constant"
|
"github.com/1Panel-dev/1Panel/backend/constant"
|
||||||
@ -60,39 +61,48 @@ func (f *Firewall) Reload() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (f *Firewall) ListPort() ([]FireInfo, error) {
|
func (f *Firewall) ListPort() ([]FireInfo, error) {
|
||||||
stdout, err := cmd.Exec("firewall-cmd --zone=public --list-ports")
|
var wg sync.WaitGroup
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
ports := strings.Split(strings.ReplaceAll(stdout, "\n", ""), " ")
|
|
||||||
var datas []FireInfo
|
var datas []FireInfo
|
||||||
for _, port := range ports {
|
wg.Add(2)
|
||||||
if len(port) == 0 {
|
go func() {
|
||||||
continue
|
defer wg.Done()
|
||||||
|
stdout, err := cmd.Exec("firewall-cmd --zone=public --list-ports")
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
}
|
}
|
||||||
var itemPort FireInfo
|
ports := strings.Split(strings.ReplaceAll(stdout, "\n", ""), " ")
|
||||||
if strings.Contains(port, "/") {
|
for _, port := range ports {
|
||||||
itemPort.Port = strings.Split(port, "/")[0]
|
if len(port) == 0 {
|
||||||
itemPort.Protocol = strings.Split(port, "/")[1]
|
continue
|
||||||
|
}
|
||||||
|
var itemPort FireInfo
|
||||||
|
if strings.Contains(port, "/") {
|
||||||
|
itemPort.Port = strings.Split(port, "/")[0]
|
||||||
|
itemPort.Protocol = strings.Split(port, "/")[1]
|
||||||
|
}
|
||||||
|
itemPort.Strategy = "accept"
|
||||||
|
datas = append(datas, itemPort)
|
||||||
}
|
}
|
||||||
itemPort.Strategy = "accept"
|
}()
|
||||||
datas = append(datas, itemPort)
|
|
||||||
}
|
|
||||||
|
|
||||||
stdout1, err := cmd.Exec("firewall-cmd --zone=public --list-rich-rules")
|
go func() {
|
||||||
if err != nil {
|
defer wg.Done()
|
||||||
return nil, err
|
stdout1, err := cmd.Exec("firewall-cmd --zone=public --list-rich-rules")
|
||||||
}
|
if err != nil {
|
||||||
rules := strings.Split(stdout1, "\n")
|
return
|
||||||
for _, rule := range rules {
|
|
||||||
if len(rule) == 0 {
|
|
||||||
continue
|
|
||||||
}
|
}
|
||||||
itemRule := f.loadInfo(rule)
|
rules := strings.Split(stdout1, "\n")
|
||||||
if len(itemRule.Port) != 0 && itemRule.Family == "ipv4" {
|
for _, rule := range rules {
|
||||||
datas = append(datas, itemRule)
|
if len(rule) == 0 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
itemRule := f.loadInfo(rule)
|
||||||
|
if len(itemRule.Port) != 0 && itemRule.Family == "ipv4" {
|
||||||
|
datas = append(datas, itemRule)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}()
|
||||||
|
wg.Wait()
|
||||||
return datas, nil
|
return datas, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,111 +1,113 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-loading="loading" style="position: relative">
|
<div>
|
||||||
<FireRouter />
|
<FireRouter />
|
||||||
<FireStatus
|
|
||||||
v-show="fireName !== '-'"
|
|
||||||
ref="fireStatuRef"
|
|
||||||
@search="search"
|
|
||||||
v-model:loading="loading"
|
|
||||||
v-model:name="fireName"
|
|
||||||
v-model:mask-show="maskShow"
|
|
||||||
v-model:status="fireStatus"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<div v-if="fireName !== '-'">
|
<div v-loading="loading">
|
||||||
<el-card v-if="fireStatus != 'running' && maskShow" class="mask-prompt">
|
<FireStatus
|
||||||
<span>{{ $t('firewall.firewallNotStart') }}</span>
|
v-show="fireName !== '-'"
|
||||||
</el-card>
|
ref="fireStatuRef"
|
||||||
|
@search="search"
|
||||||
|
v-model:loading="loading"
|
||||||
|
v-model:name="fireName"
|
||||||
|
v-model:mask-show="maskShow"
|
||||||
|
v-model:status="fireStatus"
|
||||||
|
/>
|
||||||
|
|
||||||
<LayoutContent :title="$t('firewall.ipRule')" :class="{ mask: fireStatus != 'running' }">
|
<div v-if="fireName !== '-'">
|
||||||
<template #toolbar>
|
<el-card v-if="fireStatus != 'running' && maskShow" class="mask-prompt">
|
||||||
<el-row>
|
<span>{{ $t('firewall.firewallNotStart') }}</span>
|
||||||
<el-col :span="16">
|
</el-card>
|
||||||
<el-button type="primary" @click="onOpenDialog('create')">
|
|
||||||
{{ $t('commons.button.create') }} {{ $t('firewall.ipRule') }}
|
<LayoutContent :title="$t('firewall.ipRule')" :class="{ mask: fireStatus != 'running' }">
|
||||||
</el-button>
|
<template #toolbar>
|
||||||
<el-button @click="onDelete(null)" plain :disabled="selects.length === 0">
|
<el-row>
|
||||||
{{ $t('commons.button.delete') }}
|
<el-col :span="16">
|
||||||
</el-button>
|
<el-button type="primary" @click="onOpenDialog('create')">
|
||||||
</el-col>
|
{{ $t('commons.button.create') }} {{ $t('firewall.ipRule') }}
|
||||||
<el-col :span="8">
|
|
||||||
<TableSetting @search="search()" />
|
|
||||||
<div class="search-button">
|
|
||||||
<el-input
|
|
||||||
v-model="searchName"
|
|
||||||
clearable
|
|
||||||
@clear="search()"
|
|
||||||
suffix-icon="Search"
|
|
||||||
@keyup.enter="search()"
|
|
||||||
@change="search()"
|
|
||||||
:placeholder="$t('commons.button.search')"
|
|
||||||
></el-input>
|
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</template>
|
|
||||||
<template #main>
|
|
||||||
<ComplexTable
|
|
||||||
:pagination-config="paginationConfig"
|
|
||||||
v-model:selects="selects"
|
|
||||||
@search="search"
|
|
||||||
:data="data"
|
|
||||||
>
|
|
||||||
<el-table-column type="selection" fix />
|
|
||||||
<el-table-column :min-width="80" :label="$t('firewall.address')" prop="address">
|
|
||||||
<template #default="{ row }">
|
|
||||||
<span v-if="row.address && row.address !== 'Anywhere'">{{ row.address }}</span>
|
|
||||||
<span v-else>{{ $t('firewall.allIP') }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column :min-width="80" :label="$t('firewall.strategy')" prop="strategy">
|
|
||||||
<template #default="{ row }">
|
|
||||||
<el-button
|
|
||||||
v-if="row.strategy === 'accept'"
|
|
||||||
@click="onChangeStatus(row, 'drop')"
|
|
||||||
link
|
|
||||||
type="success"
|
|
||||||
>
|
|
||||||
{{ $t('firewall.allow') }}
|
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-else link type="danger" @click="onChangeStatus(row, 'accept')">
|
<el-button @click="onDelete(null)" plain :disabled="selects.length === 0">
|
||||||
{{ $t('firewall.deny') }}
|
{{ $t('commons.button.delete') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</el-col>
|
||||||
</el-table-column>
|
<el-col :span="8">
|
||||||
<fu-table-operations
|
<TableSetting @search="search()" />
|
||||||
width="200px"
|
<div class="search-button">
|
||||||
:buttons="buttons"
|
<el-input
|
||||||
:ellipsis="10"
|
v-model="searchName"
|
||||||
:label="$t('commons.table.operate')"
|
clearable
|
||||||
fix
|
@clear="search()"
|
||||||
/>
|
suffix-icon="Search"
|
||||||
</ComplexTable>
|
@keyup.enter="search()"
|
||||||
</template>
|
@change="search()"
|
||||||
</LayoutContent>
|
:placeholder="$t('commons.button.search')"
|
||||||
</div>
|
></el-input>
|
||||||
<div v-else>
|
</div>
|
||||||
<LayoutContent :title="$t('firewall.firewall')" :divider="true">
|
</el-col>
|
||||||
<template #main>
|
</el-row>
|
||||||
<div class="app-warn">
|
</template>
|
||||||
<div>
|
<template #main>
|
||||||
<span>{{ $t('firewall.notSupport') }}</span>
|
<ComplexTable
|
||||||
<el-link
|
:pagination-config="paginationConfig"
|
||||||
style="font-size: 12px; margin-left: 5px"
|
v-model:selects="selects"
|
||||||
@click="toDoc"
|
@search="search"
|
||||||
icon="Position"
|
:data="data"
|
||||||
type="primary"
|
>
|
||||||
>
|
<el-table-column type="selection" fix />
|
||||||
{{ $t('firewall.quickJump') }}
|
<el-table-column :min-width="80" :label="$t('firewall.address')" prop="address">
|
||||||
</el-link>
|
<template #default="{ row }">
|
||||||
|
<span v-if="row.address && row.address !== 'Anywhere'">{{ row.address }}</span>
|
||||||
|
<span v-else>{{ $t('firewall.allIP') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column :min-width="80" :label="$t('firewall.strategy')" prop="strategy">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-button
|
||||||
|
v-if="row.strategy === 'accept'"
|
||||||
|
@click="onChangeStatus(row, 'drop')"
|
||||||
|
link
|
||||||
|
type="success"
|
||||||
|
>
|
||||||
|
{{ $t('firewall.allow') }}
|
||||||
|
</el-button>
|
||||||
|
<el-button v-else link type="danger" @click="onChangeStatus(row, 'accept')">
|
||||||
|
{{ $t('firewall.deny') }}
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<fu-table-operations
|
||||||
|
width="200px"
|
||||||
|
:buttons="buttons"
|
||||||
|
:ellipsis="10"
|
||||||
|
:label="$t('commons.table.operate')"
|
||||||
|
fix
|
||||||
|
/>
|
||||||
|
</ComplexTable>
|
||||||
|
</template>
|
||||||
|
</LayoutContent>
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
<LayoutContent :title="$t('firewall.firewall')" :divider="true">
|
||||||
|
<template #main>
|
||||||
|
<div class="app-warn">
|
||||||
<div>
|
<div>
|
||||||
<img src="@/assets/images/no_app.svg" />
|
<span>{{ $t('firewall.notSupport') }}</span>
|
||||||
|
<el-link
|
||||||
|
style="font-size: 12px; margin-left: 5px"
|
||||||
|
@click="toDoc"
|
||||||
|
icon="Position"
|
||||||
|
type="primary"
|
||||||
|
>
|
||||||
|
{{ $t('firewall.quickJump') }}
|
||||||
|
</el-link>
|
||||||
|
<div>
|
||||||
|
<img src="@/assets/images/no_app.svg" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</template>
|
||||||
</template>
|
</LayoutContent>
|
||||||
</LayoutContent>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<OperatrDialog @search="search" ref="dialogRef" />
|
<OperatrDialog @search="search" ref="dialogRef" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -1,141 +1,143 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-loading="loading" style="position: relative">
|
<div>
|
||||||
<FireRouter />
|
<FireRouter />
|
||||||
|
|
||||||
<FireStatus
|
<div v-loading="loading">
|
||||||
v-show="fireName !== '-'"
|
<FireStatus
|
||||||
ref="fireStatuRef"
|
v-show="fireName !== '-'"
|
||||||
@search="search"
|
ref="fireStatuRef"
|
||||||
v-model:loading="loading"
|
@search="search"
|
||||||
v-model:mask-show="maskShow"
|
v-model:loading="loading"
|
||||||
v-model:status="fireStatus"
|
v-model:mask-show="maskShow"
|
||||||
v-model:name="fireName"
|
v-model:status="fireStatus"
|
||||||
/>
|
v-model:name="fireName"
|
||||||
<div v-if="fireName !== '-'">
|
/>
|
||||||
<el-card v-if="fireStatus != 'running' && maskShow" class="mask-prompt">
|
<div v-if="fireName !== '-'">
|
||||||
<span>{{ $t('firewall.firewallNotStart') }}</span>
|
<el-card v-if="fireStatus != 'running' && maskShow" class="mask-prompt">
|
||||||
</el-card>
|
<span>{{ $t('firewall.firewallNotStart') }}</span>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
<LayoutContent :title="$t('firewall.portRule')" :class="{ mask: fireStatus != 'running' }">
|
<LayoutContent :title="$t('firewall.portRule')" :class="{ mask: fireStatus != 'running' }">
|
||||||
<template #prompt>
|
<template #prompt>
|
||||||
<el-alert type="info" :closable="false">
|
<el-alert type="info" :closable="false">
|
||||||
<template #default>
|
<template #default>
|
||||||
<span>
|
<span>
|
||||||
<span>{{ $t('firewall.dockerHelper', [fireName]) }}</span>
|
<span>{{ $t('firewall.dockerHelper', [fireName]) }}</span>
|
||||||
|
<el-link
|
||||||
|
style="font-size: 12px; margin-left: 5px"
|
||||||
|
icon="Position"
|
||||||
|
@click="quickJump()"
|
||||||
|
type="primary"
|
||||||
|
>
|
||||||
|
{{ $t('firewall.quickJump') }}
|
||||||
|
</el-link>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-alert>
|
||||||
|
</template>
|
||||||
|
<template #toolbar>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="16">
|
||||||
|
<el-button type="primary" @click="onOpenDialog('create')">
|
||||||
|
{{ $t('commons.button.create') }}{{ $t('firewall.portRule') }}
|
||||||
|
</el-button>
|
||||||
|
<el-button @click="onDelete(null)" plain :disabled="selects.length === 0">
|
||||||
|
{{ $t('commons.button.delete') }}
|
||||||
|
</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<TableSetting @search="search()" />
|
||||||
|
<div class="search-button">
|
||||||
|
<el-input
|
||||||
|
v-model="searchName"
|
||||||
|
clearable
|
||||||
|
@clear="search()"
|
||||||
|
suffix-icon="Search"
|
||||||
|
@keyup.enter="search()"
|
||||||
|
@change="search()"
|
||||||
|
:placeholder="$t('commons.button.search')"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</template>
|
||||||
|
<template #main>
|
||||||
|
<ComplexTable
|
||||||
|
:pagination-config="paginationConfig"
|
||||||
|
v-model:selects="selects"
|
||||||
|
@search="search"
|
||||||
|
:data="data"
|
||||||
|
>
|
||||||
|
<el-table-column type="selection" :selectable="selectable" fix />
|
||||||
|
<el-table-column :label="$t('commons.table.protocol')" :min-width="90" prop="protocol" />
|
||||||
|
<el-table-column :label="$t('commons.table.port')" :min-width="120" prop="port" />
|
||||||
|
<el-table-column :label="$t('commons.table.status')" :min-width="120">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-tag type="info" v-if="row.isUsed">
|
||||||
|
{{
|
||||||
|
row.appName
|
||||||
|
? $t('firewall.used') + ' ( ' + row.appName + ' )'
|
||||||
|
: $t('firewall.used')
|
||||||
|
}}
|
||||||
|
</el-tag>
|
||||||
|
<el-tag type="success" v-else>{{ $t('firewall.unUsed') }}</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column :min-width="80" :label="$t('firewall.strategy')" prop="strategy">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-button
|
||||||
|
v-if="row.strategy === 'accept'"
|
||||||
|
:disabled="row.appName === '1panel'"
|
||||||
|
@click="onChangeStatus(row, 'drop')"
|
||||||
|
link
|
||||||
|
type="success"
|
||||||
|
>
|
||||||
|
{{ $t('firewall.accept') }}
|
||||||
|
</el-button>
|
||||||
|
<el-button v-else link type="danger" @click="onChangeStatus(row, 'accept')">
|
||||||
|
{{ $t('firewall.drop') }}
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column :min-width="80" :label="$t('firewall.address')" prop="address">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<span v-if="row.address && row.address !== 'Anywhere'">{{ row.address }}</span>
|
||||||
|
<span v-else>{{ $t('firewall.allIP') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<fu-table-operations
|
||||||
|
width="200px"
|
||||||
|
:buttons="buttons"
|
||||||
|
:ellipsis="10"
|
||||||
|
:label="$t('commons.table.operate')"
|
||||||
|
fix
|
||||||
|
/>
|
||||||
|
</ComplexTable>
|
||||||
|
</template>
|
||||||
|
</LayoutContent>
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
<LayoutContent :title="$t('firewall.firewall')" :divider="true">
|
||||||
|
<template #main>
|
||||||
|
<div class="app-warn">
|
||||||
|
<div>
|
||||||
|
<span>{{ $t('firewall.notSupport') }}</span>
|
||||||
<el-link
|
<el-link
|
||||||
style="font-size: 12px; margin-left: 5px"
|
style="font-size: 12px; margin-left: 5px"
|
||||||
|
@click="toDoc"
|
||||||
icon="Position"
|
icon="Position"
|
||||||
@click="quickJump()"
|
|
||||||
type="primary"
|
type="primary"
|
||||||
>
|
>
|
||||||
{{ $t('firewall.quickJump') }}
|
{{ $t('firewall.quickJump') }}
|
||||||
</el-link>
|
</el-link>
|
||||||
</span>
|
<div>
|
||||||
</template>
|
<img src="@/assets/images/no_app.svg" />
|
||||||
</el-alert>
|
</div>
|
||||||
</template>
|
|
||||||
<template #toolbar>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="16">
|
|
||||||
<el-button type="primary" @click="onOpenDialog('create')">
|
|
||||||
{{ $t('commons.button.create') }}{{ $t('firewall.portRule') }}
|
|
||||||
</el-button>
|
|
||||||
<el-button @click="onDelete(null)" plain :disabled="selects.length === 0">
|
|
||||||
{{ $t('commons.button.delete') }}
|
|
||||||
</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<TableSetting @search="search()" />
|
|
||||||
<div class="search-button">
|
|
||||||
<el-input
|
|
||||||
v-model="searchName"
|
|
||||||
clearable
|
|
||||||
@clear="search()"
|
|
||||||
suffix-icon="Search"
|
|
||||||
@keyup.enter="search()"
|
|
||||||
@change="search()"
|
|
||||||
:placeholder="$t('commons.button.search')"
|
|
||||||
></el-input>
|
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</template>
|
|
||||||
<template #main>
|
|
||||||
<ComplexTable
|
|
||||||
:pagination-config="paginationConfig"
|
|
||||||
v-model:selects="selects"
|
|
||||||
@search="search"
|
|
||||||
:data="data"
|
|
||||||
>
|
|
||||||
<el-table-column type="selection" :selectable="selectable" fix />
|
|
||||||
<el-table-column :label="$t('commons.table.protocol')" :min-width="90" prop="protocol" />
|
|
||||||
<el-table-column :label="$t('commons.table.port')" :min-width="120" prop="port" />
|
|
||||||
<el-table-column :label="$t('commons.table.status')" :min-width="120">
|
|
||||||
<template #default="{ row }">
|
|
||||||
<el-tag type="info" v-if="row.isUsed">
|
|
||||||
{{
|
|
||||||
row.appName
|
|
||||||
? $t('firewall.used') + ' ( ' + row.appName + ' )'
|
|
||||||
: $t('firewall.used')
|
|
||||||
}}
|
|
||||||
</el-tag>
|
|
||||||
<el-tag type="success" v-else>{{ $t('firewall.unUsed') }}</el-tag>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column :min-width="80" :label="$t('firewall.strategy')" prop="strategy">
|
|
||||||
<template #default="{ row }">
|
|
||||||
<el-button
|
|
||||||
v-if="row.strategy === 'accept'"
|
|
||||||
:disabled="row.appName === '1panel'"
|
|
||||||
@click="onChangeStatus(row, 'drop')"
|
|
||||||
link
|
|
||||||
type="success"
|
|
||||||
>
|
|
||||||
{{ $t('firewall.accept') }}
|
|
||||||
</el-button>
|
|
||||||
<el-button v-else link type="danger" @click="onChangeStatus(row, 'accept')">
|
|
||||||
{{ $t('firewall.drop') }}
|
|
||||||
</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column :min-width="80" :label="$t('firewall.address')" prop="address">
|
|
||||||
<template #default="{ row }">
|
|
||||||
<span v-if="row.address && row.address !== 'Anywhere'">{{ row.address }}</span>
|
|
||||||
<span v-else>{{ $t('firewall.allIP') }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<fu-table-operations
|
|
||||||
width="200px"
|
|
||||||
:buttons="buttons"
|
|
||||||
:ellipsis="10"
|
|
||||||
:label="$t('commons.table.operate')"
|
|
||||||
fix
|
|
||||||
/>
|
|
||||||
</ComplexTable>
|
|
||||||
</template>
|
|
||||||
</LayoutContent>
|
|
||||||
</div>
|
|
||||||
<div v-else>
|
|
||||||
<LayoutContent :title="$t('firewall.firewall')" :divider="true">
|
|
||||||
<template #main>
|
|
||||||
<div class="app-warn">
|
|
||||||
<div>
|
|
||||||
<span>{{ $t('firewall.notSupport') }}</span>
|
|
||||||
<el-link
|
|
||||||
style="font-size: 12px; margin-left: 5px"
|
|
||||||
@click="toDoc"
|
|
||||||
icon="Position"
|
|
||||||
type="primary"
|
|
||||||
>
|
|
||||||
{{ $t('firewall.quickJump') }}
|
|
||||||
</el-link>
|
|
||||||
<div>
|
|
||||||
<img src="@/assets/images/no_app.svg" />
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</template>
|
||||||
</template>
|
</LayoutContent>
|
||||||
</LayoutContent>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<OperatrDialog @search="search" ref="dialogRef" />
|
<OperatrDialog @search="search" ref="dialogRef" />
|
||||||
|
@ -131,7 +131,9 @@ const getStatus = async () => {
|
|||||||
loading.value = true;
|
loading.value = true;
|
||||||
em('update:loading', true);
|
em('update:loading', true);
|
||||||
const res = await GetSupervisorStatus();
|
const res = await GetSupervisorStatus();
|
||||||
data.value = res.data.config as HostTool.Supersivor;
|
if (res.data.config) {
|
||||||
|
data.value = res.data.config as HostTool.Supersivor;
|
||||||
|
}
|
||||||
|
|
||||||
const status = {
|
const status = {
|
||||||
isExist: data.value.isExist && data.value.ctlExist,
|
isExist: data.value.isExist && data.value.ctlExist,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user