X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/6a429aae0a80ca103bd1cad3f24864fbe215fc63..72a8bf2138429b61dfc9710cc41932396b6f5b4f:/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 65ed78d7..0ca5d679 100644 --- a/src/store/process-logs-panel/process-logs-panel.ts +++ b/src/store/process-logs-panel/process-logs-panel.ts @@ -2,6 +2,9 @@ // // SPDX-License-Identifier: AGPL-3.0 +import { matchProcessRoute } from 'routes/routes'; +import { RouterState } from 'react-router-redux'; + export interface ProcessLogsPanel { filters: string[]; selectedFilter: string; @@ -15,3 +18,9 @@ export interface ProcessLogs { export const getProcessPanelLogs = ({ selectedFilter, logs }: ProcessLogsPanel) => { return logs[selectedFilter]; }; + +export const getProcessLogsPanelCurrentUuid = (router: RouterState) => { + const pathname = router.location ? router.location.pathname : ''; + const match = matchProcessRoute(pathname); + return match ? match.params.id : undefined; +};