projects
/
arvados-workbench2.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch '14130-process-command-modal'
[arvados-workbench2.git]
/
src
/
views
/
process-panel
/
process-panel-root.tsx
diff --git
a/src/views/process-panel/process-panel-root.tsx
b/src/views/process-panel/process-panel-root.tsx
index 8e78f564f288de0220f84ed82753cc0f3cb5bc33..ab8af36ffbb5e619e69fa22e2fbbb62b07d0a634 100644
(file)
--- a/
src/views/process-panel/process-panel-root.tsx
+++ b/
src/views/process-panel/process-panel-root.tsx
@@
-10,58
+10,35
@@
import { ProcessIcon } from '~/components/icon/icon';
import { Process } from '~/store/processes/process';
import { SubprocessesCard } from './subprocesses-card';
import { ProcessSubprocesses } from '~/views/process-panel/process-subprocesses';
import { Process } from '~/store/processes/process';
import { SubprocessesCard } from './subprocesses-card';
import { ProcessSubprocesses } from '~/views/process-panel/process-subprocesses';
-import { SubprocessesStatus } from '~/views/process-panel/process-subprocesses-card';
-
-type CssRules = 'headerActive' | 'headerCompleted' | 'headerQueued' | 'headerFailed' | 'headerCanceled';
+import { SubprocessFilterDataProps } from '~/components/subprocess-filter/subprocess-filter';
export interface ProcessPanelRootDataProps {
process?: Process;
subprocesses: Array<Process>;
export interface ProcessPanelRootDataProps {
process?: Process;
subprocesses: Array<Process>;
+ filters: Array<SubprocessFilterDataProps>;
+ totalSubprocessesLength: number;
}
export interface ProcessPanelRootActionProps {
}
export interface ProcessPanelRootActionProps {
- onContextMenu: (event: React.MouseEvent<HTMLElement>) => void;
+ onContextMenu: (event: React.MouseEvent<HTMLElement>, process: Process) => void;
+ onToggle: (status: string) => void;
}
export type ProcessPanelRootProps = ProcessPanelRootDataProps & ProcessPanelRootActionProps;
}
export type ProcessPanelRootProps = ProcessPanelRootDataProps & ProcessPanelRootActionProps;
-export const ProcessPanelRoot = (
props
: ProcessPanelRootProps) =>
- pro
ps.pro
cess
- ? <Grid container spacing={16}>
- <Grid item
xs
={7}>
+export const ProcessPanelRoot = (
{process, ...props}
: ProcessPanelRootProps) =>
+ process
+ ? <Grid container spacing={16}
alignItems="stretch"
>
+ <Grid item
sm={12} md
={7}>
<ProcessInformationCard
<ProcessInformationCard
- process={pro
ps.pro
cess}
- onContextMenu={
props.onContextMenu
} />
+ process={process}
+ onContextMenu={
event => props.onContextMenu(event, process)
} />
</Grid>
</Grid>
- <Grid item
xs
={5}>
+ <Grid item
sm={12} md
={5}>
<SubprocessesCard
<SubprocessesCard
- subprocesses={4}
- filters={[
- {
- key: 'queued',
- value: 1,
- label: 'Queued',
- checked: true
- }, {
- key: 'active',
- value: 2,
- label: 'Active',
- checked: true
- },
- {
- key: 'completed',
- value: 2,
- label: 'Completed',
- checked: true
- },
- {
- key: 'failed',
- value: 2,
- label: 'Failed',
- checked: true
- }
- ]}
- onToggle={() => { return; }}
+ subprocessesAmount={props.totalSubprocessesLength}
+ filters={props.filters}
+ onToggle={props.onToggle}
/>
</Grid>
<Grid item xs={12}>
/>
</Grid>
<Grid item xs={12}>
@@
-78,3
+55,4
@@
export const ProcessPanelRoot = (props: ProcessPanelRootProps) =>
icon={ProcessIcon}
messages={['Process not found']} />
</Grid>;
icon={ProcessIcon}
messages={['Process not found']} />
</Grid>;
+