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