1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import { WorkflowInputsData } from 'models/workflow';
6 import { RouterState } from "react-router-redux";
7 import { matchProcessRoute } from "routes/routes";
8 import { ProcessIOParameter } from "views/process-panel/process-io-card";
9 import { CommandOutputParameter } from 'cwlts/mappings/v1.0/CommandOutputParameter';
10 import { CollectionFile } from 'models/collection-file';
11 import { ContainerStatus } from 'models/container-request';
13 export type OutputDetails = {
18 export interface CUDAFeatures {
19 DriverVersion: string;
20 HardwareCapability: string;
24 export interface NodeInstanceType {
30 IncludedScratch: number;
37 export interface NodeInfo {
38 nodeInfo: NodeInstanceType | null;
41 export interface UsageReport {
42 usageReport: CollectionFile | null;
45 export interface ProcessPanel {
46 containerRequestUuid: string;
47 filters: { [status: string]: boolean };
48 inputRaw: WorkflowInputsData | null;
49 inputParams: ProcessIOParameter[] | null;
50 outputData: OutputDetails | null;
51 outputDefinitions: CommandOutputParameter[];
52 outputParams: ProcessIOParameter[] | null;
53 nodeInfo: NodeInstanceType | null;
54 usageReport: CollectionFile | null;
55 containerStatus: ContainerStatus | null;
58 export const getProcessPanelCurrentUuid = (router: RouterState) => {
59 const pathname = router.location ? router.location.pathname : '';
60 const match = matchProcessRoute(pathname);
61 return match ? match.params.id : undefined;