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