const publicFavoritesMatch = Routes.matchPublicFavoritesRoute(pathname);
const trashMatch = Routes.matchTrashRoute(pathname);
const processMatch = Routes.matchProcessRoute(pathname);
- const processLogMatch = Routes.matchProcessLogRoute(pathname);
const repositoryMatch = Routes.matchRepositoriesRoute(pathname);
const searchResultsMatch = Routes.matchSearchResultsRoute(pathname);
const sharedWithMeMatch = Routes.matchSharedWithMeRoute(pathname);
store.dispatch(WorkbenchActions.loadTrash());
} else if (processMatch) {
store.dispatch(WorkbenchActions.loadProcess(processMatch.params.id));
- } else if (processLogMatch) {
- store.dispatch(WorkbenchActions.loadProcessLog(processLogMatch.params.id));
} else if (rootMatch) {
store.dispatch(navigateToRootProject);
} else if (sharedWithMeMatch) {
PROCESSES: `/processes/:id(${RESOURCE_UUID_PATTERN})`,
FAVORITES: '/favorites',
TRASH: '/trash',
- PROCESS_LOGS: `/process-logs/:id(${RESOURCE_UUID_PATTERN})`,
REPOSITORIES: '/repositories',
SHARED_WITH_ME: '/shared-with-me',
RUN_PROCESS: '/run-process',
export const getProcessUrl = (uuid: string) => `/processes/${uuid}`;
-export const getProcessLogUrl = (uuid: string) => `/process-logs/${uuid}`;
-
export const getGroupUrl = (uuid: string) => `/group/${uuid}`;
export interface ResourceRouteParams {
export const matchProcessRoute = (route: string) =>
matchPath<ResourceRouteParams>(route, { path: Routes.PROCESSES });
-export const matchProcessLogRoute = (route: string) =>
- matchPath<ResourceRouteParams>(route, { path: Routes.PROCESS_LOGS });
-
export const matchSharedWithMeRoute = (route: string) =>
matchPath(route, { path: Routes.SHARED_WITH_ME });
import { push } from "react-router-redux";
import { ResourceKind, extractUuidKind } from 'models/resource';
import { SidePanelTreeCategory } from '../side-panel-tree/side-panel-tree-actions';
-import { Routes, getProcessLogUrl, getGroupUrl, getNavUrl } from 'routes/routes';
+import { Routes, getGroupUrl, getNavUrl } from 'routes/routes';
import { RootState } from 'store/store';
import { ServiceRepository } from 'services/services';
import { pluginConfig } from 'plugins';
};
-export const navigateToProcessLogs = compose(push, getProcessLogUrl);
-
export const navigateToRootProject = (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
navigateTo(SidePanelTreeCategory.PROJECTS)(dispatch, getState);
};
//
// SPDX-License-Identifier: AGPL-3.0
-import { matchProcessLogRoute, matchProcessRoute } from 'routes/routes';
+import { matchProcessRoute } from 'routes/routes';
import { RouterState } from 'react-router-redux';
export interface ProcessLogsPanel {
export const getProcessLogsPanelCurrentUuid = (router: RouterState) => {
const pathname = router.location ? router.location.pathname : '';
- const match = matchProcessLogRoute(pathname) || matchProcessRoute(pathname);
+ const match = matchProcessRoute(pathname);
return match ? match.params.id : undefined;
};
import {
RenameIcon, ShareIcon, MoveToIcon, CopyIcon, DetailsIcon,
RemoveIcon, ReRunProcessIcon, InputIcon, OutputIcon, CommandIcon,
- LogIcon, AdvancedIcon
+ AdvancedIcon
} from "components/icon/icon";
import { favoritePanelActions } from "store/favorite-panel/favorite-panel-action";
import { openMoveProcessDialog } from 'store/processes/process-move-actions';
import { openProcessInputDialog } from "store/processes/process-input-actions";
import { navigateToOutput } from "store/process-panel/process-panel-actions";
import { openProcessCommandDialog } from "store/processes/process-command-actions";
-import { navigateToProcessLogs } from "store/navigation/navigation-action";
import { openAdvancedTabDialog } from "store/advanced-tab/advanced-tab";
import { TogglePublicFavoriteAction } from "../actions/public-favorite-action";
import { togglePublicFavorite } from "store/public-favorites/public-favorites-actions";
dispatch<any>(openProcessCommandDialog(resource.uuid));
}
},
- {
- icon: LogIcon,
- name: "Log",
- execute: (dispatch, resource) => {
- dispatch<any>(navigateToProcessLogs(resource.uuid));
- }
- },
{
icon: DetailsIcon,
name: "View details",
+++ /dev/null
-// Copyright (C) The Arvados Authors. All rights reserved.
-//
-// SPDX-License-Identifier: AGPL-3.0
-
-import React from 'react';
-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, LogIcon } from 'components/icon/icon';
-import { ArvadosTheme } from 'common/custom-theme';
-import { CodeSnippetDataProps } from 'components/code-snippet/code-snippet';
-import { DefaultView } from 'components/default-view/default-view';
-
-type CssRules = 'backLink' | 'backIcon' | 'card' | 'title' | 'iconHeader' | 'link';
-
-const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
- backLink: {
- fontSize: '14px',
- 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: {
- fontSize: '0.875rem',
- color: theme.palette.primary.main,
- textAlign: 'right',
- '&:hover': {
- cursor: 'pointer'
- }
- }
-});
-
-interface ProcessLogMainCardDataProps {
- process: Process;
-}
-
-export interface ProcessLogMainCardActionProps {
- onContextMenu: (event: React.MouseEvent<any>, process: Process) => void;
- navigateToLogCollection: (uuid: string) => void;
-}
-
-export type ProcessLogMainCardProps = ProcessLogMainCardDataProps
- & ProcessLogMainCardActionProps
- & CodeSnippetDataProps
- & ProcessLogFormDataProps
- & ProcessLogFormActionProps;
-
-export const ProcessLogMainCard = withStyles(styles)(
- ({ classes, process, selectedFilter, filters, onChange, lines, onContextMenu, navigateToLogCollection }: ProcessLogMainCardProps & WithStyles<CssRules>) =>
- <Grid item xs={12}>
- <Card className={classes.card}>
- <CardHeader
- avatar={<LogIcon className={classes.iconHeader} />}
- action={
- <Tooltip title="More options" disableFocusListener>
- <IconButton onClick={event => onContextMenu(event, process)} aria-label="More options">
- <MoreOptionsIcon />
- </IconButton>
- </Tooltip>}
- title={
- <Typography noWrap variant='h6' className={classes.title}>
- Logs for {process.containerRequest.name}
- </Typography>}
- />
- <CardContent>
- {lines.length > 0
- ? < Grid
- container
- spacing={24}
- direction='column'>
- <Grid container item>
- <Grid item xs={6}>
- <ProcessLogForm selectedFilter={selectedFilter} filters={filters} onChange={onChange} />
- </Grid>
- <Grid item xs={6} className={classes.link}>
- <span onClick={() => navigateToLogCollection(process.containerRequest.logUuid!)}>
- Go to Log collection
- </span>
- </Grid>
- </Grid>
- <Grid item xs>
- <ProcessLogCodeSnippet lines={lines} />
- </Grid>
- </Grid>
- : <DefaultView
- icon={LogIcon}
- messages={['No logs yet']} />
- }
- </CardContent>
- </Card>
- </Grid >
-);
\ No newline at end of file
+++ /dev/null
-// Copyright (C) The Arvados Authors. All rights reserved.
-//
-// SPDX-License-Identifier: AGPL-3.0
-
-import React from 'react';
-import { Grid } from '@material-ui/core';
-import { Process } from 'store/processes/process';
-import { ProcessLogMainCard } from 'views/process-log-panel/process-log-main-card';
-import { ProcessLogFormDataProps, ProcessLogFormActionProps } from 'views/process-log-panel/process-log-form';
-import { DefaultView } from 'components/default-view/default-view';
-import { ProcessIcon } from 'components/icon/icon';
-import { CodeSnippetDataProps } from 'components/code-snippet/code-snippet';
-import { ProcessLogMainCardActionProps } from './process-log-main-card';
-
-export type ProcessLogPanelRootDataProps = {
- process?: Process;
-} & ProcessLogFormDataProps & CodeSnippetDataProps;
-
-export type ProcessLogPanelRootActionProps = ProcessLogMainCardActionProps & ProcessLogFormActionProps;
-
-export type ProcessLogPanelRootProps = ProcessLogPanelRootDataProps & ProcessLogPanelRootActionProps;
-
-export const ProcessLogPanelRoot = (props: ProcessLogPanelRootProps) =>
- props.process
- ? <Grid container spacing={16}>
- <ProcessLogMainCard
- process={props.process}
- {...props} />
- </Grid>
- : <Grid container
- alignItems='center'
- justify='center'>
- <DefaultView
- icon={ProcessIcon}
- messages={['Process Log not found']} />
- </Grid>;
+++ /dev/null
-// Copyright (C) The Arvados Authors. All rights reserved.
-//
-// SPDX-License-Identifier: AGPL-3.0
-
-import { RootState } from 'store/store';
-import { connect } from 'react-redux';
-import { getProcess } from 'store/processes/process';
-import { Dispatch } from 'redux';
-import { openProcessContextMenu } from 'store/context-menu/context-menu-actions';
-import { ProcessLogPanelRootDataProps, ProcessLogPanelRootActionProps, ProcessLogPanelRoot } from './process-log-panel-root';
-import { getProcessPanelLogs } from 'store/process-logs-panel/process-logs-panel';
-import { setProcessLogsPanelFilter, navigateToLogCollection } from 'store/process-logs-panel/process-logs-panel-actions';
-import { getProcessLogsPanelCurrentUuid } from 'store/process-logs-panel/process-logs-panel';
-
-export interface Log {
- object_uuid: string;
- event_at: string;
- event_type: string;
- summary: string;
- properties: any;
-}
-
-export interface FilterOption {
- label: string;
- value: string;
-}
-
-const mapStateToProps = ({resources, processLogsPanel, router}: RootState): ProcessLogPanelRootDataProps => {
- const uuid = getProcessLogsPanelCurrentUuid(router) || '';
- return {
- process: getProcess(uuid)(resources),
- selectedFilter: { label: processLogsPanel.selectedFilter, value: processLogsPanel.selectedFilter },
- filters: processLogsPanel.filters.map(filter => ({ label: filter, value: filter })),
- lines: getProcessPanelLogs(processLogsPanel)
- };
-};
-
-const mapDispatchToProps = (dispatch: Dispatch): ProcessLogPanelRootActionProps => ({
- onContextMenu: (event, process) => {
- dispatch<any>(openProcessContextMenu(event, process));
- },
- onChange: filter => {
- dispatch(setProcessLogsPanelFilter(filter.value));
- },
- navigateToLogCollection: (uuid: string) => {
- dispatch<any>(navigateToLogCollection(uuid));
- }
-});
-
-export const ProcessLogPanel = connect(mapStateToProps, mapDispatchToProps)(ProcessLogPanelRoot);
} from 'components/icon/icon';
import { Process } from 'store/processes/process';
import { MPVPanelProps } from 'components/multi-panel-view/multi-panel-view';
-import { FilterOption } from 'views/process-log-panel/process-log-panel';
-import { ProcessLogForm } from 'views/process-log-panel/process-log-form';
-import { ProcessLogCodeSnippet } from 'views/process-log-panel/process-log-code-snippet';
+import {
+ FilterOption,
+ ProcessLogForm
+} from 'views/process-panel/process-log-form';
+import { ProcessLogCodeSnippet } from 'views/process-panel/process-log-code-snippet';
import { DefaultView } from 'components/default-view/default-view';
import { CodeSnippetDataProps } from 'components/code-snippet/code-snippet';
Input
} from '@material-ui/core';
import { ArvadosTheme } from 'common/custom-theme';
-import { FilterOption } from './process-log-panel';
type CssRules = 'formControl';
}
});
+export interface FilterOption {
+ label: string;
+ value: string;
+}
+
export interface ProcessLogFormDataProps {
selectedFilter: FilterOption;
filters: FilterOption[];
import { MPVContainer, MPVPanelContent, MPVPanelState } from 'components/multi-panel-view/multi-panel-view';
import { ArvadosTheme } from 'common/custom-theme';
import { ProcessDetailsCard } from './process-details-card';
-import { FilterOption } from 'views/process-log-panel/process-log-panel';
import { getProcessPanelLogs, ProcessLogsPanel } from 'store/process-logs-panel/process-logs-panel';
import { ProcessLogsCard } from './process-log-card';
+import { FilterOption } from 'views/process-panel/process-log-form';
type CssRules = 'root';
import { Routes } from 'routes/routes';
import { SidePanel } from 'views-components/side-panel/side-panel';
import { ProcessPanel } from 'views/process-panel/process-panel';
-import { ProcessLogPanel } from 'views/process-log-panel/process-log-panel';
import { ChangeWorkflowDialog } from 'views-components/run-process-dialog/change-workflow-dialog';
import { CreateProjectDialog } from 'views-components/dialog-forms/create-project-dialog';
import { CreateCollectionDialog } from 'views-components/dialog-forms/create-collection-dialog';
<Route path={Routes.ALL_PROCESSES} component={AllProcessesPanel} />
<Route path={Routes.PROCESSES} component={ProcessPanel} />
<Route path={Routes.TRASH} component={TrashPanel} />
- <Route path={Routes.PROCESS_LOGS} component={ProcessLogPanel} />
<Route path={Routes.SHARED_WITH_ME} component={SharedWithMePanel} />
<Route path={Routes.RUN_PROCESS} component={RunProcessPanel} />
<Route path={Routes.WORKFLOWS} component={WorkflowPanel} />