fix: 关闭网元reload操作,只有amf smf upf udm四个网元支持,改用mml发送
This commit is contained in:
@@ -1,35 +0,0 @@
|
|||||||
import {
|
|
||||||
RESULT_CODE_ERROR,
|
|
||||||
RESULT_CODE_SUCCESS,
|
|
||||||
RESULT_MSG_ERROR,
|
|
||||||
} from '@/constants/result-constants';
|
|
||||||
import { language, request } from '@/plugins/http-fetch';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新网元配置重新载入
|
|
||||||
* @param neType 网元类型
|
|
||||||
* @param neId 网元ID
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
export async function updateNeConfigReload(neType: string, neId: string) {
|
|
||||||
// 发起请求
|
|
||||||
const result = await request({
|
|
||||||
url: `/api/rest/operationManagement/v1/elementType/${neType}/objectType/mml?ne_id=${neId}`,
|
|
||||||
method: 'POST',
|
|
||||||
data: { mml: ['reload'] },
|
|
||||||
timeout: 180_000,
|
|
||||||
});
|
|
||||||
// 解析数据
|
|
||||||
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
|
|
||||||
const v = result.data.data[0];
|
|
||||||
const str = v.toLowerCase();
|
|
||||||
if (str.indexOf('ok') !== -1) {
|
|
||||||
delete result.data;
|
|
||||||
} else if (str.indexOf('success') !== -1) {
|
|
||||||
delete result.data;
|
|
||||||
} else {
|
|
||||||
return { code: RESULT_CODE_ERROR, msg: RESULT_MSG_ERROR[language] };
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
16
src/api/tool/mml.ts
Normal file
16
src/api/tool/mml.ts
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
import { request } from '@/plugins/http-fetch';
|
||||||
|
|
||||||
|
// 更新网元配置重新载入
|
||||||
|
export function updateNeConfigReload(neType: string, neId: string) {
|
||||||
|
return request({
|
||||||
|
url: '/tool/mml/command',
|
||||||
|
method: 'POST',
|
||||||
|
data: {
|
||||||
|
neType: neType,
|
||||||
|
neId: neId,
|
||||||
|
type: 'General',
|
||||||
|
command: ['reload'],
|
||||||
|
},
|
||||||
|
timeout: 180_000,
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -2,7 +2,7 @@ import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
|||||||
import { Modal, message } from 'ant-design-vue/es';
|
import { Modal, message } from 'ant-design-vue/es';
|
||||||
import useI18n from '@/hooks/useI18n';
|
import useI18n from '@/hooks/useI18n';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import { updateNeConfigReload } from '@/api/configManage/configParam';
|
import { updateNeConfigReload } from '@/api/tool/mml';
|
||||||
import { serviceNeAction } from '@/api/ne/neInfo';
|
import { serviceNeAction } from '@/api/ne/neInfo';
|
||||||
import useMaskStore from '@/store/modules/mask';
|
import useMaskStore from '@/store/modules/mask';
|
||||||
|
|
||||||
|
|||||||
@@ -588,12 +588,7 @@ onMounted(() => {
|
|||||||
<CloseSquareOutlined />
|
<CloseSquareOutlined />
|
||||||
{{ t('views.ne.common.stop') }}
|
{{ t('views.ne.common.stop') }}
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
<a-menu-item
|
<a-menu-item key="reload" v-if="false">
|
||||||
key="reload"
|
|
||||||
v-if="
|
|
||||||
!['OMC', 'PCF', 'IMS', 'MME'].includes(record.neType)
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<SyncOutlined />
|
<SyncOutlined />
|
||||||
{{ t('views.ne.common.reload') }}
|
{{ t('views.ne.common.reload') }}
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
|
|||||||
Reference in New Issue
Block a user