修复后端探针列表名称搜索无效的 bug
This commit is contained in:
1 parent
c671379976
commit
a92833a5bd
4 files changed
+8
-4
No files matched your search
+1
-1
@@ -41,6 +41,6 @@
|
||||
"globals": "^16.4.0",
|
||||
"typescript": "~5.9.3",
|
||||
"typescript-eslint": "^8.45.0",
|
||||
"vite": "^7.1.7"
|
||||
"vite": "7.1.11"
|
||||
}
|
||||
}
|
||||
@@ -35,10 +35,13 @@ export interface GetAgentMetricsResponse {
|
||||
}
|
||||
|
||||
// 管理员接口 - 获取所有探针(需要认证)
|
||||
export const getAgentPaging = (pageIndex: number = 1, pageSize: number = 10, hostname?: string, ip?: string, status?: string) => {
|
||||
export const getAgentPaging = (pageIndex: number = 1, pageSize: number = 10, name: string, hostname?: string, ip?: string, status?: string) => {
|
||||
const params = new URLSearchParams();
|
||||
params.append('pageIndex', pageIndex.toString());
|
||||
params.append('pageSize', pageSize.toString());
|
||||
if (name) {
|
||||
params.append('name', name);
|
||||
}
|
||||
if (hostname) {
|
||||
params.append('hostname', hostname);
|
||||
}
|
||||
|
||||
@@ -396,11 +396,12 @@ const AgentList = () => {
|
||||
</Space>
|
||||
)}
|
||||
request={async (params) => {
|
||||
const {current = 1, pageSize = 10, hostname, ip, status} = params;
|
||||
const {current = 1, pageSize = 10, name, hostname, ip, status} = params;
|
||||
try {
|
||||
const response = await getAgentPaging(
|
||||
current,
|
||||
pageSize,
|
||||
name,
|
||||
hostname,
|
||||
ip,
|
||||
status as string | undefined
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ export default defineConfig({
|
||||
server: {
|
||||
proxy: {
|
||||
'/api/': {
|
||||
target: 'http://localhost:18888/',
|
||||
target: 'http://localhost:8080/',
|
||||
changeOrigin: true,
|
||||
},
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user