X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/8dc7e5fc6f2d2a7ce853f935a0a84dacb8c0585f..6b562ae2431132439e488f509d698800ee8ebe7d:/src/views/process-log-panel/process-log-main-card.tsx diff --git a/src/views/process-log-panel/process-log-main-card.tsx b/src/views/process-log-panel/process-log-main-card.tsx index db451ab9..42df2d92 100644 --- a/src/views/process-log-panel/process-log-main-card.tsx +++ b/src/views/process-log-panel/process-log-main-card.tsx @@ -3,27 +3,48 @@ // SPDX-License-Identifier: AGPL-3.0 import * as React from 'react'; +import { Link } from 'react-router-dom'; import { StyleRulesCallback, WithStyles, withStyles, Card, CardHeader, IconButton, CardContent, Grid, Typography, Tooltip } from '@material-ui/core'; import { Process } from '~/store/processes/process'; +import { ProcessLogCodeSnippet } from '~/views/process-log-panel/process-log-code-snippet'; import { ProcessLogForm, ProcessLogFormDataProps, ProcessLogFormActionProps } from '~/views/process-log-panel/process-log-form'; import { MoreOptionsIcon, ProcessIcon } from '~/components/icon/icon'; import { ArvadosTheme } from '~/common/custom-theme'; +import { CodeSnippetDataProps } from '~/components/code-snippet/code-snippet'; +import { BackIcon } from '~/components/icon/icon'; +import { DefaultView } from '~/components/default-view/default-view'; -type CssRules = 'root' | 'card' | 'iconHeader'; +type CssRules = 'backLink' | 'backIcon' | 'card' | 'title' | 'iconHeader' | 'link'; const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ - root: { - + backLink: { + fontSize: '1rem', + fontWeight: 600, + display: 'flex', + alignItems: 'center', + textDecoration: 'none', + padding: theme.spacing.unit, + color: theme.palette.grey["700"], + }, + backIcon: { + marginRight: theme.spacing.unit }, card: { width: '100%' }, + title: { + color: theme.palette.grey["700"] + }, iconHeader: { fontSize: '1.875rem', color: theme.customs.colors.green700 + }, + link: { + alignSelf: 'flex-end', + textAlign: 'right' } }); @@ -32,40 +53,63 @@ interface ProcessLogMainCardDataProps { process: Process; } -export type ProcessLogMainCardProps = ProcessLogMainCardDataProps & ProcessLogFormDataProps & ProcessLogFormActionProps; +export interface ProcessLogMainCardActionProps { + onContextMenu: (event: React.MouseEvent, process: Process) => void; +} + +export type ProcessLogMainCardProps = ProcessLogMainCardDataProps + & ProcessLogMainCardActionProps + & CodeSnippetDataProps + & ProcessLogFormDataProps + & ProcessLogFormActionProps; export const ProcessLogMainCard = withStyles(styles)( - ({ classes, process, selectedFilter, filters, onChange }: ProcessLogMainCardProps & WithStyles) => - - } - action={ -
- - - -
- } - title={ - - - {process.containerRequest.name} - - - } - subheader={process.containerRequest.description} /> - - - - - - - Container log for request ardev-xvhdp-q3uqbfxeb6w64pm - - - {/* add snippet */} - - - -
+ ({ classes, process, selectedFilter, filters, onChange, lines, onContextMenu }: ProcessLogMainCardProps & WithStyles) => + + + Back + + + } + action={ + + onContextMenu(event, process)} aria-label="More options"> + + + } + title={ + + + {process.containerRequest.name} + + } + subheader={process.containerRequest.description} /> + + {lines.length > 0 + ? < Grid + container + spacing={24} + direction='column'> + + + + + + + Go to Log collection + + + + + + + + : + } + + + ); \ No newline at end of file