hsuanxyz commented on a change in pull request #11498: [FLINK-16741][WEB] add
tm log list & tm log detail page
URL: https://github.com/apache/flink/pull/11498#discussion_r397024956
##########
File path:
flink-runtime-web/web-dashboard/src/app/services/task-manager.service.ts
##########
@@ -50,25 +50,38 @@ export class TaskManagerService {
}
/**
- * Load TM logs
+ * Load TM log list
* @param taskManagerId
*/
- loadLogs(taskManagerId: string) {
- return
this.httpClient.get(`${BASE_URL}/taskmanagers/${taskManagerId}/log`, {
- responseType: 'text',
- headers: new HttpHeaders().append('Cache-Control', 'no-cache')
- });
+ loadLogList(taskManagerId: string) {
+ return this.httpClient
+ .get<{ logs: Array<{ name: string; size: number }>
}>(`${BASE_URL}/taskmanagers/${taskManagerId}/logs`)
Review comment:
extract to a TS interface.
```suggestion
.get<{ logs: TaskLog[]
}>(`${BASE_URL}/taskmanagers/${taskManagerId}/logs`)
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services