X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/4aee3fa5225c21771b23666d29be9d796758a65f..a6663da8ad5471d200197a777af98b1e1d9db86c:/src/store/process-logs-panel/process-logs-panel.ts diff --git a/src/store/process-logs-panel/process-logs-panel.ts b/src/store/process-logs-panel/process-logs-panel.ts index 74a18041..531d3723 100644 --- a/src/store/process-logs-panel/process-logs-panel.ts +++ b/src/store/process-logs-panel/process-logs-panel.ts @@ -2,7 +2,7 @@ // // SPDX-License-Identifier: AGPL-3.0 -import { matchProcessLogRoute, matchProcessRoute } from 'routes/routes'; +import { matchProcessRoute } from 'routes/routes'; import { RouterState } from 'react-router-redux'; export interface ProcessLogsPanel { @@ -12,15 +12,15 @@ export interface ProcessLogsPanel { } export interface ProcessLogs { - [logType: string]: string[]; + [logType: string]: {lastByte: number | undefined, contents: string[]}; } -export const getProcessPanelLogs = ({ selectedFilter, logs }: ProcessLogsPanel) => { - return logs[selectedFilter]; +export const getProcessPanelLogs = ({ selectedFilter, logs }: ProcessLogsPanel): string[] => { + return logs[selectedFilter]?.contents || []; }; export const getProcessLogsPanelCurrentUuid = (router: RouterState) => { const pathname = router.location ? router.location.pathname : ''; - const match = matchProcessLogRoute(pathname) || matchProcessRoute(pathname); + const match = matchProcessRoute(pathname); return match ? match.params.id : undefined; };