1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import { RootState } from '../store';
6 import { matchProcessLogRoute, matchProcessRoute } from 'routes/routes';
8 export interface ProcessLogsPanel {
10 selectedFilter: string;
14 export interface ProcessLogs {
15 [logType: string]: string[];
18 export const getProcessPanelLogs = ({ selectedFilter, logs }: ProcessLogsPanel) => {
19 return logs[selectedFilter];
22 export const getProcessLogsPanelCurrentUuid = ({ router }: RootState) => {
23 const pathname = router.location ? router.location.pathname : '';
24 const match = matchProcessLogRoute(pathname) || matchProcessRoute(pathname);
25 return match ? match.params.id : undefined;