X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/97de0bf90660e72220f350483981e35d53a5998f..59caadc58a0b7ffc92fa95c90b16c99a9af6d942:/src/views/process-panel/process-subprocesses.tsx

diff --git a/src/views/process-panel/process-subprocesses.tsx b/src/views/process-panel/process-subprocesses.tsx
index 4ab444c298..cfd517cf6c 100644
--- a/src/views/process-panel/process-subprocesses.tsx
+++ b/src/views/process-panel/process-subprocesses.tsx
@@ -5,63 +5,19 @@
 import * as React from 'react';
 import { Grid } from '@material-ui/core';
 import { ProcessSubprocessesCard } from '~/views/process-panel/process-subprocesses-card';
-
-export enum SubprocessesStatus {
-    ACTIVE = 'Active',
-    COMPLETED = 'Completed',
-    QUEUED = 'Queued',
-    FAILED = 'Failed',
-    CANCELED = 'Canceled'
-}
+import { Process } from '~/store/processes/process';
 
 export interface ProcessSubprocessesDataProps {
+    subprocesses: Array<Process>;
     onContextMenu: (event: React.MouseEvent<HTMLElement>) => void;
 }
 
-interface SubprocessesProps {
-    title: string;
-    status: string;
-    runtime?: string;
-}
-
-export const ProcessSubprocesses = ({ onContextMenu }: ProcessSubprocessesDataProps) => {
+export const ProcessSubprocesses = ({ onContextMenu, subprocesses }: ProcessSubprocessesDataProps) => {
     return <Grid container spacing={16}>
-        {items.map(it =>
-            <Grid item xs={2} key={it.title}>
-                <ProcessSubprocessesCard onContextMenu={onContextMenu} items={it} />
+        {subprocesses.map(subprocess =>
+            <Grid item xs={2} key={subprocess.containerRequest.uuid}>
+                <ProcessSubprocessesCard onContextMenu={onContextMenu} subprocess={subprocess}/>
             </Grid>
         )}
     </Grid>;
 };
-
-const items: Array<SubprocessesProps> = [
-    {
-        title: 'cos1',
-        status: SubprocessesStatus.ACTIVE
-    },
-    {
-        title: 'cos2',
-        status: SubprocessesStatus.FAILED
-    },
-    {
-        title: 'cos3',
-        status: SubprocessesStatus.QUEUED
-    },
-    {
-        title: 'cos4',
-        status: SubprocessesStatus.CANCELED
-    },
-    {
-        title: 'cos5',
-        status: SubprocessesStatus.COMPLETED
-    },
-    {
-        title: 'cos6',
-        status: SubprocessesStatus.COMPLETED
-    },
-    {
-        title: 'cos7',
-        status: SubprocessesStatus.COMPLETED
-    },
-];
-
