feat: Adjust disk management menu order (#10324)

This commit is contained in:
CityFun 2025-09-10 11:30:52 +08:00 committed by GitHub
parent 9b50581fd4
commit 60b1c9ba32
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 14 additions and 20 deletions

View file

@ -127,10 +127,8 @@ export const addFavorite = (path: string) => {
}; };
export const readByLine = (req: File.FileReadByLine, operateNode?: string) => { export const readByLine = (req: File.FileReadByLine, operateNode?: string) => {
if (operateNode) { const params = operateNode ? `?operateNode=${operateNode}` : '';
return http.post<any>('files/read', req, TimeoutEnum.T_40S, { CurrentNode: operateNode }); return http.post<any>(`files/read${params}`, req, TimeoutEnum.T_40S);
}
return http.post<any>('files/read', req);
}; };
export const removeFavorite = (id: number) => { export const removeFavorite = (id: number) => {

View file

@ -126,10 +126,6 @@ export const unmountDisk = (params: Host.DiskUmount) => {
}; };
export const getComponentInfo = (name: string, operateNode?: string) => { export const getComponentInfo = (name: string, operateNode?: string) => {
if (operateNode) { const params = operateNode ? `?operateNode=${operateNode}` : '';
return http.get<Host.ComponentInfo>(`/hosts/components/${name}`, { return http.get<Host.ComponentInfo>(`/hosts/components/${name}${params}`);
CurrentNode: operateNode,
});
}
return http.get<Host.ComponentInfo>(`/hosts/components/${name}`);
}; };

View file

@ -77,6 +77,16 @@ const hostRouter = {
requiresAuth: false, requiresAuth: false,
}, },
}, },
{
path: '/hosts/disk',
name: 'Disk',
props: true,
component: () => import('@/views/host/disk-management/disk/index.vue'),
meta: {
title: 'menu.disk',
requiresAuth: false,
},
},
{ {
path: '/hosts/process/process', path: '/hosts/process/process',
name: 'Process', name: 'Process',
@ -137,16 +147,6 @@ const hostRouter = {
requiresAuth: false, requiresAuth: false,
}, },
}, },
{
path: '/hosts/disk',
name: 'Disk',
props: true,
component: () => import('@/views/host/disk-management/disk/index.vue'),
meta: {
title: 'menu.disk',
requiresAuth: false,
},
},
], ],
}; };