[ARVADOS-WORKBENCH2] updated: 1.3.0-349-g83e9d271
Git user
git at public.curoverse.com
Mon Jan 28 07:24:13 EST 2019
Summary of changes:
.../process-logs-panel/process-logs-panel-actions.ts | 12 ++++++++++++
src/views/process-log-panel/process-log-main-card.tsx | 15 ++++++++++-----
src/views/process-log-panel/process-log-panel.tsx | 7 +++++--
3 files changed, 27 insertions(+), 7 deletions(-)
via 83e9d2714298456b24b2836c783fe9e2430c263d (commit)
from 974c753b2f14e13b1d86ea7f9f3292ee3e33f713 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 83e9d2714298456b24b2836c783fe9e2430c263d
Author: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>
Date: Mon Jan 28 13:24:04 2019 +0100
refs #14783-go-to-log-collection-is-not-working
Arvados-DCO-1.1-Signed-off-by: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>
diff --git a/src/store/process-logs-panel/process-logs-panel-actions.ts b/src/store/process-logs-panel/process-logs-panel-actions.ts
index 79c6434c..bf0dc935 100644
--- a/src/store/process-logs-panel/process-logs-panel-actions.ts
+++ b/src/store/process-logs-panel/process-logs-panel-actions.ts
@@ -16,6 +16,8 @@ import { ResourceEventMessage } from '~/websocket/resource-event-message';
import { getProcess } from '~/store/processes/process';
import { FilterBuilder } from "~/services/api/filter-builder";
import { OrderBuilder } from "~/services/api/order-builder";
+import { navigateToCollection } from '~/store/navigation/navigation-action';
+import { snackbarActions, SnackbarKind } from '~/store/snackbar/snackbar-actions';
export const processLogsPanelActions = unionize({
RESET_PROCESS_LOGS_PANEL: ofType<{}>(),
@@ -98,6 +100,16 @@ const createInitialLogPanelState = (logResources: LogResource[]) => {
const logsToLines = (logs: LogResource[]) =>
logs.map(({ properties }) => properties.text);
+export const navigateToLogCollection = (uuid: string) =>
+ async (dispatch: Dispatch<any>, getState: () => RootState, services: ServiceRepository) => {
+ try {
+ await services.collectionService.get(uuid);
+ dispatch<any>(navigateToCollection(uuid));
+ } catch {
+ dispatch(snackbarActions.OPEN_SNACKBAR({ message: 'This collection does not exists!', hideDuration: 2000, kind: SnackbarKind.ERROR }));
+ }
+ };
+
const MAX_AMOUNT_OF_LOGS = 10000;
const SUMMARIZED_FILTER_TYPE = 'Summarized';
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 9b75d112..6b2521c0 100644
--- a/src/views/process-log-panel/process-log-main-card.tsx
+++ b/src/views/process-log-panel/process-log-main-card.tsx
@@ -43,8 +43,12 @@ const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
color: theme.customs.colors.green700
},
link: {
- alignSelf: 'flex-end',
- textAlign: 'right'
+ fontSize: '0.875rem',
+ color: theme.palette.primary.main,
+ textAlign: 'right',
+ '&:hover': {
+ cursor: 'pointer'
+ }
}
});
@@ -55,6 +59,7 @@ interface ProcessLogMainCardDataProps {
export interface ProcessLogMainCardActionProps {
onContextMenu: (event: React.MouseEvent<any>, process: Process) => void;
+ navigateToLogCollection: (uuid: string) => void;
}
export type ProcessLogMainCardProps = ProcessLogMainCardDataProps
@@ -64,7 +69,7 @@ export type ProcessLogMainCardProps = ProcessLogMainCardDataProps
& ProcessLogFormActionProps;
export const ProcessLogMainCard = withStyles(styles)(
- ({ classes, process, selectedFilter, filters, onChange, lines, onContextMenu }: ProcessLogMainCardProps & WithStyles<CssRules>) =>
+ ({ classes, process, selectedFilter, filters, onChange, lines, onContextMenu, navigateToLogCollection }: ProcessLogMainCardProps & WithStyles<CssRules>) =>
<Grid item xs={12}>
<Link to={`/processes/${process.containerRequest.uuid}`} className={classes.backLink}>
<BackIcon className={classes.backIcon} /> Back
@@ -96,9 +101,9 @@ export const ProcessLogMainCard = withStyles(styles)(
<ProcessLogForm selectedFilter={selectedFilter} filters={filters} onChange={onChange} />
</Grid>
<Grid item xs={6} className={classes.link}>
- <Typography component='div'>
+ <span onClick={() => navigateToLogCollection(process.containerRequest.logUuid!)}>
Go to Log collection
- </Typography>
+ </span>
</Grid>
</Grid>
<Grid item xs>
diff --git a/src/views/process-log-panel/process-log-panel.tsx b/src/views/process-log-panel/process-log-panel.tsx
index d578e784..f5425dbc 100644
--- a/src/views/process-log-panel/process-log-panel.tsx
+++ b/src/views/process-log-panel/process-log-panel.tsx
@@ -9,8 +9,8 @@ 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 } from '~/store/process-logs-panel/process-logs-panel-actions';
-import { getProcessLogsPanelCurrentUuid } 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;
@@ -42,6 +42,9 @@ const mapDispatchToProps = (dispatch: Dispatch): ProcessLogPanelRootActionProps
},
onChange: filter => {
dispatch(setProcessLogsPanelFilter(filter.value));
+ },
+ navigateToLogCollection: (uuid: string) => {
+ dispatch<any>(navigateToLogCollection(uuid));
}
});
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list