Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -198,7 +198,7 @@ function beforeRequest(options: OptionsType): OptionsType | Promise<any> {
|
||||
if (options.method === 'get') return options;
|
||||
|
||||
// 非get参数提交
|
||||
let body = options.data
|
||||
let body = options.data;
|
||||
if (body instanceof FormData) {
|
||||
options.body = body;
|
||||
} else if (body) {
|
||||
|
||||
@@ -182,7 +182,12 @@ router.beforeEach(async (to, from, next) => {
|
||||
next({ name: 'Index' });
|
||||
}
|
||||
|
||||
const token = getToken();
|
||||
let token = getToken();
|
||||
|
||||
// 免用户登录认证
|
||||
if (!appStore.loginAuth) {
|
||||
token = '== Not Login Auth ==';
|
||||
}
|
||||
|
||||
// 没有token
|
||||
if (!token) {
|
||||
|
||||
@@ -20,6 +20,8 @@ type AppStore = {
|
||||
buildTime: string;
|
||||
/**系统引导使用 */
|
||||
bootloader: boolean;
|
||||
// 用户登录认证
|
||||
loginAuth: boolean;
|
||||
// 序列号
|
||||
serialNum: string;
|
||||
/**应用版权声明 */
|
||||
@@ -52,6 +54,7 @@ const useAppStore = defineStore('app', {
|
||||
version: `-`,
|
||||
buildTime: `-`,
|
||||
bootloader: false,
|
||||
loginAuth: false,
|
||||
serialNum: `-`,
|
||||
copyright: `Copyright ©2023 For ${import.meta.env.VITE_APP_NAME}`,
|
||||
logoType: 'icon',
|
||||
@@ -85,6 +88,7 @@ const useAppStore = defineStore('app', {
|
||||
if (this.bootloader) {
|
||||
removeToken();
|
||||
}
|
||||
this.loginAuth = res.data.loginAuth === 'true';
|
||||
this.serialNum = res.data.serialNum;
|
||||
this.appName = res.data.title;
|
||||
this.copyright = res.data.copyright;
|
||||
|
||||
@@ -50,9 +50,10 @@ let fromState = ref({
|
||||
ims_sip_ip: '192.168.8.110',
|
||||
upf_type: 'LightUPF',
|
||||
upf_driver_type: 'vmxnet3',
|
||||
upf_card_name: 'eth0',
|
||||
upfn3_card_name: 'eth0',
|
||||
upfn3_pci: '0000:00:00.0',
|
||||
upfn3_mac: '00:00:00:00:00:00',
|
||||
upfn6_card_name: 'eth0',
|
||||
upfn6_pci: '0000:00:00.0',
|
||||
upfn6_mac: '00:00:00:00:00:00',
|
||||
},
|
||||
@@ -243,7 +244,12 @@ watch(
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-col
|
||||
:lg="12"
|
||||
:md="12"
|
||||
:xs="24"
|
||||
v-if="fromState.external.upf_type === 'LightUPF'"
|
||||
>
|
||||
<a-form-item label="UE_POOL" name="external.ue_pool">
|
||||
<a-input
|
||||
v-model:value="fromState.external.ue_pool"
|
||||
@@ -260,9 +266,63 @@ watch(
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col
|
||||
:lg="12"
|
||||
:md="12"
|
||||
:xs="24"
|
||||
v-if="fromState.external.upf_type === 'StandardUPF'"
|
||||
>
|
||||
<a-form-item label="DRIVER_TYPE" name="external.upf_driver_type">
|
||||
<a-select
|
||||
v-model:value="fromState.external.upf_driver_type"
|
||||
:placeholder="t('common.selectPlease')"
|
||||
>
|
||||
<a-select-option value="vmxnet3">vmxnet3</a-select-option>
|
||||
<a-select-option value="dpdk">dpdk</a-select-option>
|
||||
<a-select-option value="host">host</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<a-row>
|
||||
<a-row v-if="fromState.external.upf_type === 'LightUPF'">
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item label="N3_IP" name="external.upfn3_ip">
|
||||
<a-input
|
||||
v-model:value="fromState.external.upfn3_ip"
|
||||
allow-clear
|
||||
:placeholder="t('common.inputPlease')"
|
||||
:maxlength="50"
|
||||
>
|
||||
<template #prefix>
|
||||
<a-tooltip placement="topLeft">
|
||||
<template #title> netwrok ip </template>
|
||||
<InfoCircleOutlined style="opacity: 0.45; color: inherit" />
|
||||
</a-tooltip>
|
||||
</template>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item label="N3_GW" name="external.upfn3_gw">
|
||||
<a-input
|
||||
v-model:value="fromState.external.upfn3_gw"
|
||||
allow-clear
|
||||
:placeholder="t('common.inputPlease')"
|
||||
:maxlength="50"
|
||||
>
|
||||
<template #prefix>
|
||||
<a-tooltip placement="topLeft">
|
||||
<template #title> geteway </template>
|
||||
<InfoCircleOutlined style="opacity: 0.45; color: inherit" />
|
||||
</a-tooltip>
|
||||
</template>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<a-row v-if="fromState.external.upf_type === 'StandardUPF'">
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item label="N3_IP" name="external.upfn3_ip">
|
||||
<a-input
|
||||
@@ -294,13 +354,6 @@ watch(
|
||||
</template>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col
|
||||
:lg="12"
|
||||
:md="12"
|
||||
:xs="24"
|
||||
v-if="fromState.external.upf_type === 'StandardUPF'"
|
||||
>
|
||||
<a-form-item label="N3_PCI" name="external.upfn3_pci">
|
||||
<a-input
|
||||
v-model:value="fromState.external.upfn3_pci"
|
||||
@@ -338,84 +391,86 @@ watch(
|
||||
</template>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
<a-form-item label="N3_NIC_NAME" name="external.upfn3_card_name">
|
||||
<a-input
|
||||
v-model:value="fromState.external.upfn3_card_name"
|
||||
allow-clear
|
||||
:placeholder="t('common.inputPlease')"
|
||||
:maxlength="50"
|
||||
>
|
||||
<template #prefix>
|
||||
<a-tooltip placement="topLeft">
|
||||
<template #title>
|
||||
use `ip a` show info, to inet name
|
||||
<br />
|
||||
or <br />
|
||||
use `lshw -class network -businfo` show device name
|
||||
</template>
|
||||
<InfoCircleOutlined style="opacity: 0.45; color: inherit" />
|
||||
</a-tooltip>
|
||||
</template>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item label="N6_IP" name="external.upfn6_ip">
|
||||
<a-input
|
||||
v-model:value="fromState.external.upfn6_ip"
|
||||
allow-clear
|
||||
:placeholder="t('common.inputPlease')"
|
||||
:maxlength="50"
|
||||
>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
<a-form-item label="N6_GW" name="external.upfn6_gw">
|
||||
<a-input
|
||||
v-model:value="fromState.external.upfn6_gw"
|
||||
allow-clear
|
||||
:placeholder="t('common.inputPlease')"
|
||||
:maxlength="50"
|
||||
>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
<a-form-item label="N6_PCI" name="external.upfn6_pci">
|
||||
<a-input
|
||||
v-model:value="fromState.external.upfn6_pci"
|
||||
allow-clear
|
||||
:placeholder="t('common.inputPlease')"
|
||||
:maxlength="50"
|
||||
>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
<a-form-item label="N6_MAC" name="external.upfn6_mac">
|
||||
<a-input
|
||||
v-model:value="fromState.external.upfn6_mac"
|
||||
allow-clear
|
||||
:placeholder="t('common.inputPlease')"
|
||||
:maxlength="50"
|
||||
>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
<a-form-item label="N6_NIC_NAME" name="external.upfn6_card_name">
|
||||
<a-input
|
||||
v-model:value="fromState.external.upfn6_card_name"
|
||||
allow-clear
|
||||
:placeholder="t('common.inputPlease')"
|
||||
:maxlength="50"
|
||||
>
|
||||
<template #prefix>
|
||||
<a-tooltip placement="topLeft">
|
||||
<template #title>
|
||||
use `ip a` show info, to inet name
|
||||
<br />
|
||||
or <br />
|
||||
use `lshw -class network -businfo` show device name
|
||||
</template>
|
||||
<InfoCircleOutlined style="opacity: 0.45; color: inherit" />
|
||||
</a-tooltip>
|
||||
</template>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<template v-if="fromState.external.upf_type === 'StandardUPF'">
|
||||
<a-row>
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item label="N6_IP" name="external.upfn6_ip">
|
||||
<a-input
|
||||
v-model:value="fromState.external.upfn6_ip"
|
||||
allow-clear
|
||||
:placeholder="t('common.inputPlease')"
|
||||
:maxlength="50"
|
||||
>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
<a-form-item label="N6_GW" name="external.upfn6_gw">
|
||||
<a-input
|
||||
v-model:value="fromState.external.upfn6_gw"
|
||||
allow-clear
|
||||
:placeholder="t('common.inputPlease')"
|
||||
:maxlength="50"
|
||||
>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
<a-form-item label="DRIVER_TYPE" name="external.upf_driver_type">
|
||||
<a-select
|
||||
v-model:value="fromState.external.upf_driver_type"
|
||||
:placeholder="t('common.selectPlease')"
|
||||
>
|
||||
<a-select-option value="vmxnet3">vmxnet3</a-select-option>
|
||||
<a-select-option value="dpdk">dpdk</a-select-option>
|
||||
<a-select-option value="host">host</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item label="N6_PCI" name="external.upfn6_pci">
|
||||
<a-input
|
||||
v-model:value="fromState.external.upfn6_pci"
|
||||
allow-clear
|
||||
:placeholder="t('common.inputPlease')"
|
||||
:maxlength="50"
|
||||
>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
<a-form-item label="N6_MAC" name="external.upfn6_mac">
|
||||
<a-input
|
||||
v-model:value="fromState.external.upfn6_mac"
|
||||
allow-clear
|
||||
:placeholder="t('common.inputPlease')"
|
||||
:maxlength="50"
|
||||
>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
<a-form-item label="NIC_NAME" name="external.upf_card_name">
|
||||
<a-input
|
||||
v-model:value="fromState.external.upf_card_name"
|
||||
allow-clear
|
||||
:placeholder="t('common.inputPlease')"
|
||||
:maxlength="50"
|
||||
>
|
||||
<template #prefix>
|
||||
<a-tooltip placement="topLeft">
|
||||
<template #title>
|
||||
use `ip a` show info, to inet name
|
||||
<br />
|
||||
or <br />
|
||||
use `lshw -class network -businfo` show device name
|
||||
</template>
|
||||
<InfoCircleOutlined
|
||||
style="opacity: 0.45; color: inherit"
|
||||
/>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</template>
|
||||
</a-col>
|
||||
|
||||
<a-col :lg="8" :md="8" :xs="24">
|
||||
|
||||
Reference in New Issue
Block a user