Skip to content

Commit d998f09

Browse files
committed
feat(ui): Added application and service topology mapping feature
1 parent d9ebf33 commit d998f09

18 files changed

Lines changed: 1560 additions & 23 deletions

File tree

ui-vue3/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
},
2424
"dependencies": {
2525
"@antv/g2": "^5.1.12",
26+
"@antv/g6": "^5.0.51",
2627
"@iconify/json": "^2.2.157",
2728
"@iconify/vue": "^4.1.1",
2829
"@types/lodash": "^4.14.202",
@@ -31,6 +32,7 @@
3132
"ant-design-vue": "4.x",
3233
"axios": "^1.13.6",
3334
"dayjs": "^1.11.13",
35+
"g6-extension-vue": "^0.1.0",
3436
"gsap": "^3.12.7",
3537
"js-cookie": "^3.0.5",
3638
"js-yaml": "^4.1.0",

ui-vue3/src/api/service/app.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,13 @@ export const searchApplications = (params: any): Promise<any> => {
2525
})
2626
}
2727

28-
export const getApplicationDetail = (params: any): Promise<any> => {
28+
export const getApplicationDetail = (appName: string): Promise<any> => {
2929
return request({
3030
url: '/application/detail',
3131
method: 'get',
32-
params
32+
params: {
33+
appName
34+
}
3335
})
3436
}
3537

@@ -174,3 +176,11 @@ export const updateAppGrayIsolation = (appName: string, graySets: Array<any>): P
174176
}
175177
})
176178
}
179+
180+
export const getApplicationGraph = (serviceName: string): Promise<any> => {
181+
return request({
182+
url: '/application/graph',
183+
method: 'get',
184+
params: { serviceName }
185+
})
186+
}

ui-vue3/src/api/service/service.ts

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,19 @@ export const searchService = (params: any): Promise<any> => {
2626
})
2727
}
2828

29-
export const getServiceDetail = (params: any): Promise<any> => {
29+
export const getServiceDetail = ({
30+
serviceName,
31+
version,
32+
group
33+
}: {
34+
serviceName: string
35+
version?: string
36+
group?: string
37+
}): Promise<any> => {
3038
return request({
3139
url: '/service/detail',
3240
method: 'get',
33-
params
41+
params: { serviceName, version, group }
3442
})
3543
}
3644

@@ -137,6 +145,16 @@ export const updateParamRouteAPI = (data: {
137145
})
138146
}
139147

148+
export const getServiceGraph = (serviceName: string): Promise<any> => {
149+
return request({
150+
url: '/service/graph',
151+
method: 'get',
152+
params: {
153+
serviceName
154+
}
155+
})
156+
}
157+
140158
// get service methods list
141159
export const getServiceMethodsAPI = (params: {
142160
serviceName: string

0 commit comments

Comments
 (0)