// Copyright (C) The Arvados Authors. All rights reserved. // // SPDX-License-Identifier: AGPL-3.0 import * as React from 'react'; import { StyleRulesCallback, WithStyles, withStyles, Card, CardHeader, IconButton, CardContent, Grid, Chip } from '@material-ui/core'; import { ArvadosTheme } from '~/common/custom-theme'; import { ProcessResource } from '~/models/process'; import { DispatchProp, connect } from 'react-redux'; import { RouteComponentProps } from 'react-router'; import { MoreOptionsIcon, ProcessIcon } from '~/components/icon/icon'; import { DetailsAttribute } from '~/components/details-attribute/details-attribute'; import { RootState } from '~/store/store'; type CssRules = 'card' | 'iconHeader' | 'label' | 'value' | 'content' | 'chip' | 'headerText'; const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ card: { marginBottom: theme.spacing.unit * 2, width: '60%' }, iconHeader: { fontSize: '1.875rem', color: theme.customs.colors.green700 }, label: { fontSize: '0.875rem' }, value: { textTransform: 'none', fontSize: '0.875rem' }, content: { display: 'flex', paddingBottom: '0px ', paddingTop: '0px', '&:last-child': { paddingBottom: '0px ', } }, chip: { height: theme.spacing.unit * 2.5, width: theme.spacing.unit * 12, backgroundColor: theme.customs.colors.green700, color: theme.palette.common.white, fontSize: '0.875rem', borderRadius: theme.spacing.unit * 0.625 }, headerText: { fontSize: '0.875rem', display: 'flex', position: 'relative', justifyContent: 'flex-end', top: -theme.spacing.unit * 4.5, right: theme.spacing.unit * 2, } }); interface ProcessPanelDataProps { item: ProcessResource; } interface ProcessPanelActionProps { onItemRouteChange: (processId: string) => void; onContextMenu: (event: React.MouseEvent, item: ProcessResource) => void; } type ProcessPanelProps = ProcessPanelDataProps & ProcessPanelActionProps & DispatchProp & WithStyles & RouteComponentProps<{ id: string }>; export const ProcessPanel = withStyles(styles)( connect((state: RootState) => ({ item: state.collectionPanel.item, tags: state.collectionPanel.tags }))( class extends React.Component { render() { const { classes, onContextMenu, item } = this.props; return
} action={ onContextMenu(event, item)}> } title="Pipeline template that generates a config file from a template" /> } /> This container request was created from the workflow FastQC MultiQC
; } componentWillReceiveProps({ match, item, onItemRouteChange }: ProcessPanelProps) { if (!item || match.params.id !== item.uuid) { onItemRouteChange(match.params.id); } } } ) );