fix: 接口超时 180_1000
This commit is contained in:
@@ -76,6 +76,6 @@ export async function downloadNeBackup(data: Record<string, any>) {
|
|||||||
url: `/api/rest/systemManagement/v1/${data.neType}/neBackup/${data.fileName}`,
|
url: `/api/rest/systemManagement/v1/${data.neType}/neBackup/${data.fileName}`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
responseType: 'blob',
|
responseType: 'blob',
|
||||||
timeout: 60 * 1000,
|
timeout: 180_000,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -374,7 +374,7 @@ export async function updateNeConfigReload(neType: string, neId: string) {
|
|||||||
url: `/api/rest/operationManagement/v1/elementType/${neType}/objectType/mml?ne_id=${neId}`,
|
url: `/api/rest/operationManagement/v1/elementType/${neType}/objectType/mml?ne_id=${neId}`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: { mml: ['reload'] },
|
data: { mml: ['reload'] },
|
||||||
timeout: 30_1000,
|
timeout: 180_000,
|
||||||
});
|
});
|
||||||
// 解析数据
|
// 解析数据
|
||||||
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
|
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
|
||||||
|
|||||||
@@ -67,6 +67,6 @@ export function uploadLicense(data: FormData) {
|
|||||||
method: 'post',
|
method: 'post',
|
||||||
data,
|
data,
|
||||||
dataType: 'form-data',
|
dataType: 'form-data',
|
||||||
timeout: 60 * 1000,
|
timeout: 180_000,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ export function exportSet(data: Record<string, any>) {
|
|||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/octet-stream',
|
'Content-Type': 'application/octet-stream',
|
||||||
},
|
},
|
||||||
timeout: 60 * 1000,
|
timeout: 180_000,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -182,7 +182,7 @@ export function importFile(data: Record<string, any>) {
|
|||||||
method: 'post',
|
method: 'post',
|
||||||
data: obj,
|
data: obj,
|
||||||
dataType,
|
dataType,
|
||||||
timeout: 60 * 1000,
|
timeout: 180_000,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -215,7 +215,7 @@ export function startNf(data: Record<string, any>) {
|
|||||||
return request({
|
return request({
|
||||||
url: `/api/rest/systemManagement/v1/elementType/${data.neType}/objectType/service/start?neId=${data.neId}`,
|
url: `/api/rest/systemManagement/v1/elementType/${data.neType}/objectType/service/start?neId=${data.neId}`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
timeout: 60 * 1000,
|
timeout: 180_000,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -228,7 +228,7 @@ export function restartNf(data: Record<string, any>) {
|
|||||||
return request({
|
return request({
|
||||||
url: `/api/rest/systemManagement/v1/elementType/${data.neType}/objectType/service/restart?neId=${data.neId}`,
|
url: `/api/rest/systemManagement/v1/elementType/${data.neType}/objectType/service/restart?neId=${data.neId}`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
timeout: 60 * 1000,
|
timeout: 180_000,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -241,6 +241,6 @@ export function stopNf(data: Record<string, any>) {
|
|||||||
return request({
|
return request({
|
||||||
url: `/api/rest/systemManagement/v1/elementType/${data.neType}/objectType/service/stop?neId=${data.neId}`,
|
url: `/api/rest/systemManagement/v1/elementType/${data.neType}/objectType/service/stop?neId=${data.neId}`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
timeout: 60 * 1000,
|
timeout: 180_000,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ export async function downloadNeSoftware(data: Record<string, any>) {
|
|||||||
url: `/api/rest/systemManagement/v1/${data.neType}/software/${data.version}`,
|
url: `/api/rest/systemManagement/v1/${data.neType}/software/${data.version}`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
responseType: 'blob',
|
responseType: 'blob',
|
||||||
timeout: 60 * 1000,
|
timeout: 180_000,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -97,7 +97,7 @@ export function uploadNeSoftware(data: FormData) {
|
|||||||
method: 'post',
|
method: 'post',
|
||||||
data,
|
data,
|
||||||
dataType: 'form-data',
|
dataType: 'form-data',
|
||||||
timeout: 60 * 1000,
|
timeout: 180_000,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -110,7 +110,7 @@ export async function sendNeSoftware(data: Record<string, any>) {
|
|||||||
const result = await request({
|
const result = await request({
|
||||||
url: `/api/rest/systemManagement/v1/${data.neType}/software/${data.version}/${data.neId}`,
|
url: `/api/rest/systemManagement/v1/${data.neType}/software/${data.version}/${data.neId}`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
timeout: 60 * 1000,
|
timeout: 180_000,
|
||||||
});
|
});
|
||||||
// 解析数据
|
// 解析数据
|
||||||
if (result.code === RESULT_CODE_SUCCESS) {
|
if (result.code === RESULT_CODE_SUCCESS) {
|
||||||
@@ -129,7 +129,7 @@ export async function runNeSoftware(data: Record<string, any>) {
|
|||||||
const result = await request({
|
const result = await request({
|
||||||
url: `/api/rest/systemManagement/v1/${data.neType}/software/${data.version}/${data.neId}`,
|
url: `/api/rest/systemManagement/v1/${data.neType}/software/${data.version}/${data.neId}`,
|
||||||
method: 'put',
|
method: 'put',
|
||||||
timeout: 60 * 1000,
|
timeout: 180_000,
|
||||||
});
|
});
|
||||||
// 解析数据
|
// 解析数据
|
||||||
if (result.code === RESULT_CODE_SUCCESS) {
|
if (result.code === RESULT_CODE_SUCCESS) {
|
||||||
@@ -148,7 +148,7 @@ export async function backNeSoftware(data: Record<string, any>) {
|
|||||||
const result = await request({
|
const result = await request({
|
||||||
url: `/api/rest/systemManagement/v1/${data.neType}/software/${data.version}/${data.neId}`,
|
url: `/api/rest/systemManagement/v1/${data.neType}/software/${data.version}/${data.neId}`,
|
||||||
method: 'PATCH',
|
method: 'PATCH',
|
||||||
timeout: 60 * 1000,
|
timeout: 180_000,
|
||||||
});
|
});
|
||||||
// 解析数据
|
// 解析数据
|
||||||
if (result.code === RESULT_CODE_SUCCESS) {
|
if (result.code === RESULT_CODE_SUCCESS) {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ export async function listMain() {
|
|||||||
const result = await request({
|
const result = await request({
|
||||||
url: '/api/rest/systemManagement/v1/elementType/all/objectType/systemState',
|
url: '/api/rest/systemManagement/v1/elementType/all/objectType/systemState',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
timeout: 30 * 1000,
|
timeout: 60_000,
|
||||||
});
|
});
|
||||||
// console.log(result);
|
// console.log(result);
|
||||||
let realData = result.data.data;
|
let realData = result.data.data;
|
||||||
|
|||||||
@@ -302,6 +302,7 @@ export async function backupDownload(path: string) {
|
|||||||
url: `/api/rest/fileManagement/v1/path/file?path=${path}`,
|
url: `/api/rest/fileManagement/v1/path/file?path=${path}`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
responseType: 'blob',
|
responseType: 'blob',
|
||||||
|
timeout: 180_000,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ export async function sendMMlByNE(
|
|||||||
url: `/api/rest/operationManagement/v1/elementType/${neType}/objectType/mml?ne_id=${neId}`,
|
url: `/api/rest/operationManagement/v1/elementType/${neType}/objectType/mml?ne_id=${neId}`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: { mml: [cmdStr] },
|
data: { mml: [cmdStr] },
|
||||||
timeout: 30_1000,
|
timeout: 180_000,
|
||||||
});
|
});
|
||||||
// 解析数据
|
// 解析数据
|
||||||
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
|
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ export async function sendMMlByOMC(neId: string, cmdStr: string) {
|
|||||||
url: `/api/rest/operationManagement/v1/elementType/OMC/objectType/mml?ne_id=${neId}`,
|
url: `/api/rest/operationManagement/v1/elementType/OMC/objectType/mml?ne_id=${neId}`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: { mml: [cmdStr] },
|
data: { mml: [cmdStr] },
|
||||||
timeout: 30_1000,
|
timeout: 180_000,
|
||||||
});
|
});
|
||||||
// 解析数据
|
// 解析数据
|
||||||
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
|
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ export async function sendMMlByUDM(neId: string, cmdStr: string) {
|
|||||||
url: `/api/rest/operationManagement/v1/elementType/UDM/objectType/mml?ne_id=${neId}`,
|
url: `/api/rest/operationManagement/v1/elementType/UDM/objectType/mml?ne_id=${neId}`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: { mml: [cmdStr] },
|
data: { mml: [cmdStr] },
|
||||||
timeout: 30_1000,
|
timeout: 180_000,
|
||||||
});
|
});
|
||||||
// 解析数据
|
// 解析数据
|
||||||
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
|
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ export function loadAuth(neId: string) {
|
|||||||
return request({
|
return request({
|
||||||
url: `/api/rest/udmUserManage/v1/authSave/${neId}`,
|
url: `/api/rest/udmUserManage/v1/authSave/${neId}`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
timeout: 60 * 1000,
|
timeout: 180_000,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ export function exportSub(query: Record<string, any>) {
|
|||||||
method: 'post',
|
method: 'post',
|
||||||
data: query,
|
data: query,
|
||||||
responseType: 'blob',
|
responseType: 'blob',
|
||||||
|
timeout: 180_000,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -26,6 +27,7 @@ export function importSubData(neId: string, data: FormData) {
|
|||||||
method: 'post',
|
method: 'post',
|
||||||
data,
|
data,
|
||||||
dataType: 'form-data',
|
dataType: 'form-data',
|
||||||
|
timeout: 180_000,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -38,7 +40,7 @@ export function loadSub(neId: string) {
|
|||||||
return request({
|
return request({
|
||||||
url: `/api/rest/udmUserManage/v1/subSave/${neId}`,
|
url: `/api/rest/udmUserManage/v1/subSave/${neId}`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
timeout: 60 * 1000,
|
timeout: 180_000,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ export async function listgoldData(query: Record<string, any>) {
|
|||||||
totalSQL: totalSQL + querySQL,
|
totalSQL: totalSQL + querySQL,
|
||||||
rowsSQL: rowsSQL + querySQL + sortSql + limtSql,
|
rowsSQL: rowsSQL + querySQL + sortSql + limtSql,
|
||||||
},
|
},
|
||||||
timeout: 30 * 1000,
|
timeout: 60_000,
|
||||||
});
|
});
|
||||||
|
|
||||||
// 解析数据
|
// 解析数据
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ export function importData(data: FormData) {
|
|||||||
method: 'post',
|
method: 'post',
|
||||||
data,
|
data,
|
||||||
dataType: 'form-data',
|
dataType: 'form-data',
|
||||||
|
timeout: 180_000,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ export function tcpdumpPcapDownload(data: Record<string, string>) {
|
|||||||
method: 'post',
|
method: 'post',
|
||||||
data: data,
|
data: data,
|
||||||
responseType: 'blob',
|
responseType: 'blob',
|
||||||
|
timeout: 180_000,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user