X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/08968efce07d609c16dd8a086bfd0a4d69ad6f3d..f4e410a5984226818301332c25ac178403c2e0e9:/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 effdd7a7..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,6 +3,7 @@ // 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 @@ -13,13 +14,30 @@ import { ProcessLogForm, ProcessLogFormDataProps, ProcessLogFormActionProps } fr 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 = 'card' | 'iconHeader' | 'link'; +type CssRules = 'backLink' | 'backIcon' | 'card' | 'title' | 'iconHeader' | 'link'; const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ + 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 @@ -35,42 +53,63 @@ interface ProcessLogMainCardDataProps { process: Process; } -export type ProcessLogMainCardProps = ProcessLogMainCardDataProps & CodeSnippetDataProps & 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, lines }: ProcessLogMainCardProps & WithStyles) => - - } - action={ -
- - - -
- } - title={ - - - {process.containerRequest.name} - - - } - subheader={process.containerRequest.description} /> - - - - - - - - Container log for request ardev-xvhdp-q3uqbfxeb6w64pm - - - - - - - -
+ ({ 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