[ARVADOS-WORKBENCH2] updated: 1.3.0-28-g32f8f97

Git user git at public.curoverse.com
Wed Dec 5 11:05:52 EST 2018


Summary of changes:
 package.json                                       |   1 +
 src/components/data-explorer/data-explorer.tsx     |  16 ++--
 src/components/file-tree/file-thumbnail.tsx        |  36 +++++++
 src/components/file-tree/file-tree-data.ts         |   1 +
 src/components/file-tree/file-tree-item.tsx        |  36 +++----
 src/store/users/users-actions.ts                   |  41 +++-----
 src/validators/validators.tsx                      |   3 +
 .../collection-panel-files.ts                      |  15 ++-
 .../context-menu/action-sets/user-action-set.ts    |   4 +-
 .../dialog-create/dialog-user-create.tsx           |  28 ++++++
 .../dialog-forms/create-user-dialog.ts             |  19 ++++
 .../form-fields/collection-form-fields.tsx         |   6 +-
 .../form-fields/process-form-fields.tsx            |   2 +-
 .../form-fields/user-form-fields.tsx               |  54 +++++++++++
 .../user-dialog/attributes-dialog.tsx              |  22 ++---
 src/views/user-panel/user-panel.tsx                | 105 ++++++++++++++-------
 src/views/workbench/workbench.tsx                  |   2 +
 typings/global.d.ts                                |   6 +-
 yarn.lock                                          |  12 +++
 19 files changed, 301 insertions(+), 108 deletions(-)
 create mode 100644 src/components/file-tree/file-thumbnail.tsx
 create mode 100644 src/views-components/dialog-create/dialog-user-create.tsx
 create mode 100644 src/views-components/dialog-forms/create-user-dialog.ts
 create mode 100644 src/views-components/form-fields/user-form-fields.tsx

       via  32f8f97903802e58b48ed307669c236750d8ee3e (commit)
       via  ba9a587ab628caea44d923b34d285a29e83e3456 (commit)
       via  1fa1f80e121450f963ca4e6a69e6a8c1ccc78cfe (commit)
       via  3b5edb7ae1de4709acef5d2c58ce12ecf5eb9fcf (commit)
       via  0070db330ad6cbd9078b0c9f10bd18a32e4d1012 (commit)
       via  bd90d772a159901336b119b0ad82109e3ec1d9fc (commit)
       via  4b1c3715e20a9a1b9b10f419c2cd88fe51fbbfbe (commit)
       via  6679f4cd3a96759e165ba52d20a2296a94638b46 (commit)
       via  0259a44c3a1ab6f8e9ce24ce60c8fbb09aa3ee70 (commit)
       via  86756a239efd4b410295b403ff712a4b3e7304f5 (commit)
      from  fc3370a1203ae0b83a13ef6a958219cc722cfe75 (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 32f8f97903802e58b48ed307669c236750d8ee3e
Author: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>
Date:   Wed Dec 5 17:05:29 2018 +0100

    creating-user
    
    Feature #14504
    
    Arvados-DCO-1.1-Signed-off-by: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>

diff --git a/src/components/data-explorer/data-explorer.tsx b/src/components/data-explorer/data-explorer.tsx
index 69f93dd..d906a32 100644
--- a/src/components/data-explorer/data-explorer.tsx
+++ b/src/components/data-explorer/data-explorer.tsx
@@ -13,7 +13,7 @@ import { createTree } from '~/models/tree';
 import { DataTableFilters } from '~/components/data-table-filters/data-table-filters-tree';
 import { MoreOptionsIcon } from '~/components/icon/icon';
 
-type CssRules = 'searchBox' | "toolbar" | "footer" | "root" | 'moreOptionsButton';
+type CssRules = 'searchBox' | "toolbar" | "footer" | "root" | 'moreOptionsButton' | 'rootUserPanel';
 
 const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
     searchBox: {
@@ -28,6 +28,10 @@ const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
     root: {
         height: '100%'
     },
+    rootUserPanel: {
+        height: '100%',
+        boxShadow: 'none'
+    },
     moreOptionsButton: {
         padding: 0
     }
@@ -44,7 +48,7 @@ interface DataExplorerDataProps<T> {
     contextMenuColumn: boolean;
     dataTableDefaultView?: React.ReactNode;
     working?: boolean;
-    isColumnSelectorHidden?: boolean;
+    isUserPanel?: boolean;
 }
 
 interface DataExplorerActionProps<T> {
@@ -75,17 +79,17 @@ export const DataExplorer = withStyles(styles)(
                 columns, onContextMenu, onFiltersChange, onSortToggle, working, extractKey,
                 rowsPerPage, rowsPerPageOptions, onColumnToggle, searchValue, onSearch,
                 items, itemsAvailable, onRowClick, onRowDoubleClick, classes,
-                dataTableDefaultView, isColumnSelectorHidden
+                dataTableDefaultView, isUserPanel
             } = this.props;
-            return <Paper className={classes.root}>
-                <Toolbar className={classes.toolbar}>
+            return <Paper className={!isUserPanel ? classes.root : classes.rootUserPanel}>
+                <Toolbar className={!isUserPanel ? classes.toolbar : ''}>
                     <Grid container justify="space-between" wrap="nowrap" alignItems="center">
                         <div className={classes.searchBox}>
                             <SearchInput
                                 value={searchValue}
                                 onSearch={onSearch} />
                         </div>
-                        {!isColumnSelectorHidden && <ColumnSelector
+                        {!isUserPanel && <ColumnSelector
                             columns={columns}
                             onColumnToggle={onColumnToggle} />}
                     </Grid>
diff --git a/src/store/users/users-actions.ts b/src/store/users/users-actions.ts
index 43d9e6f..ca6edd6 100644
--- a/src/store/users/users-actions.ts
+++ b/src/store/users/users-actions.ts
@@ -24,7 +24,15 @@ export type UsersActions = UnionOf<typeof usersPanelActions>;
 export const USERS_PANEL_ID = 'usersPanel';
 export const USER_ATTRIBUTES_DIALOG = 'userAttributesDialog';
 export const USER_CREATE_FORM_NAME = 'repositoryCreateFormName';
-export const USER_REMOVE_DIALOG = 'repositoryRemoveDialog';
+
+export interface UserCreateFormDialogData {
+    firstName: string;
+    lastName: string;
+    email: string;
+    identityUrl: string;
+    virtualMachineName: string;
+    groupVirtualMachine: string;
+}
 
 export const openUserAttributes = (uuid: string) =>
     (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
@@ -41,19 +49,17 @@ export const openUserCreateDialog = () =>
         dispatch(dialogActions.OPEN_DIALOG({ id: USER_CREATE_FORM_NAME, data: { user } }));
     };
 
-export const createUser = (user: UserResource) =>
+export const createUser = (user: UserCreateFormDialogData) =>
     async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
-        const userUuid = await services.authService.getUuid();
-        const user = await services.userService.get(userUuid!);
         dispatch(startSubmit(USER_CREATE_FORM_NAME));
         try {
-            // const newUser = await services.repositoriesService.create({ name: `${user.username}/${repository.name}` });
+            const newUser = await services.userService.create({ ...user });
             dispatch(dialogActions.CLOSE_DIALOG({ id: USER_CREATE_FORM_NAME }));
             dispatch(reset(USER_CREATE_FORM_NAME));
             dispatch(snackbarActions.OPEN_SNACKBAR({ message: "User has been successfully created.", hideDuration: 2000, kind: SnackbarKind.SUCCESS }));
             dispatch<any>(loadUsersData());
-            // return newUser;
-            return;
+            dispatch(userBindedActions.REQUEST_ITEMS());
+            return newUser;
         } catch (e) {
             const error = getCommonResourceServiceError(e);
             if (error === CommonResourceServiceError.NAME_HAS_ALREADY_BEEN_TAKEN) {
@@ -63,27 +69,6 @@ export const createUser = (user: UserResource) =>
         }
     };
 
-export const openRemoveUsersDialog = (uuid: string) =>
-    (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
-        dispatch(dialogActions.OPEN_DIALOG({
-            id: USER_REMOVE_DIALOG,
-            data: {
-                title: 'Remove user',
-                text: 'Are you sure you want to remove this user?',
-                confirmButtonLabel: 'Remove',
-                uuid
-            }
-        }));
-    };
-
-export const removeUser = (uuid: string) =>
-    async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
-        dispatch(snackbarActions.OPEN_SNACKBAR({ message: 'Removing ...' }));
-        await services.userService.delete(uuid);
-        dispatch(snackbarActions.OPEN_SNACKBAR({ message: 'Removed.', hideDuration: 2000, kind: SnackbarKind.SUCCESS }));
-        dispatch<any>(loadUsersData());
-    };
-
 export const userBindedActions = bindDataExplorerActions(USERS_PANEL_ID);
 
 export const openUsersPanel = () =>
diff --git a/src/validators/validators.tsx b/src/validators/validators.tsx
index c601df1..464f190 100644
--- a/src/validators/validators.tsx
+++ b/src/validators/validators.tsx
@@ -24,5 +24,8 @@ export const PROCESS_NAME_VALIDATION = [require, maxLength(255)];
 
 export const REPOSITORY_NAME_VALIDATION = [require, maxLength(255)];
 
+export const USER_EMAIL_VALIDATION = [require, maxLength(255)];
+export const USER_LENGTH_VALIDATION = [maxLength(255)];
+
 export const SSH_KEY_PUBLIC_VALIDATION = [require, isRsaKey, maxLength(1024)];
 export const SSH_KEY_NAME_VALIDATION = [require, maxLength(255)];
diff --git a/src/views-components/context-menu/action-sets/user-action-set.ts b/src/views-components/context-menu/action-sets/user-action-set.ts
index e06a7c2..68098cf 100644
--- a/src/views-components/context-menu/action-sets/user-action-set.ts
+++ b/src/views-components/context-menu/action-sets/user-action-set.ts
@@ -3,7 +3,7 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 import { ContextMenuActionSet } from "~/views-components/context-menu/context-menu-action-set";
-import { AdvancedIcon, ProjectIcon, AttributesIcon, ShareIcon } from "~/components/icon/icon";
+import { AdvancedIcon, ProjectIcon, AttributesIcon, UserPanelIcon } from "~/components/icon/icon";
 import { openAdvancedTabDialog } from '~/store/advanced-tab/advanced-tab';
 import { openUserAttributes } from "~/store/users/users-actions";
 
@@ -28,7 +28,7 @@ export const userActionSet: ContextMenuActionSet = [[{
 },
 {
     name: "Manage",
-    icon: ShareIcon,
+    icon: UserPanelIcon,
     execute: (dispatch, { uuid }) => {
         dispatch<any>(openAdvancedTabDialog(uuid));
     }
diff --git a/src/views-components/dialog-create/dialog-user-create.tsx b/src/views-components/dialog-create/dialog-user-create.tsx
new file mode 100644
index 0000000..bf135e8
--- /dev/null
+++ b/src/views-components/dialog-create/dialog-user-create.tsx
@@ -0,0 +1,28 @@
+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
+import * as React from 'react';
+import { InjectedFormProps } from 'redux-form';
+import { WithDialogProps } from '~/store/dialog/with-dialog';
+import { FormDialog } from '~/components/form-dialog/form-dialog';
+import { UserFirstNameField, UserLastNameField, UserEmailField, UserIdentityUrlField, UserVirtualMachineField, UserGroupsVirtualMachineField } from '~/views-components/form-fields/user-form-fields';
+
+type DialogUserProps = WithDialogProps<{}> & InjectedFormProps<any>;
+
+export const UserRepositoryCreate = (props: DialogUserProps) =>
+    <FormDialog
+        dialogTitle='New user'
+        formFields={UserAddFields}
+        submitLabel='ADD NEW USER'
+        {...props}
+    />;
+
+const UserAddFields = () => <span>
+    <UserFirstNameField />
+    <UserLastNameField />
+    <UserEmailField />
+    <UserIdentityUrlField />
+    <UserVirtualMachineField />
+    <UserGroupsVirtualMachineField />
+</span>;
diff --git a/src/views-components/dialog-forms/create-user-dialog.ts b/src/views-components/dialog-forms/create-user-dialog.ts
new file mode 100644
index 0000000..cb46204
--- /dev/null
+++ b/src/views-components/dialog-forms/create-user-dialog.ts
@@ -0,0 +1,19 @@
+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
+import { compose } from "redux";
+import { reduxForm } from 'redux-form';
+import { withDialog } from "~/store/dialog/with-dialog";
+import { USER_CREATE_FORM_NAME, createUser, UserCreateFormDialogData } from "~/store/users/users-actions";
+import { UserRepositoryCreate } from "~/views-components/dialog-create/dialog-user-create";
+
+export const CreateUserDialog = compose(
+    withDialog(USER_CREATE_FORM_NAME),
+    reduxForm<UserCreateFormDialogData>({
+        form: USER_CREATE_FORM_NAME,
+        onSubmit: (data, dispatch) => {
+            dispatch(createUser(data));
+        }
+    })
+)(UserRepositoryCreate);
\ No newline at end of file
diff --git a/src/views-components/form-fields/collection-form-fields.tsx b/src/views-components/form-fields/collection-form-fields.tsx
index 2d2a7c8..c02996d 100644
--- a/src/views-components/form-fields/collection-form-fields.tsx
+++ b/src/views-components/form-fields/collection-form-fields.tsx
@@ -3,11 +3,11 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 import * as React from "react";
-import { Field, WrappedFieldProps } from "redux-form";
+import { Field } from "redux-form";
 import { TextField } from "~/components/text-field/text-field";
 import { COLLECTION_NAME_VALIDATION, COLLECTION_DESCRIPTION_VALIDATION, COLLECTION_PROJECT_VALIDATION } from "~/validators/validators";
-import { ProjectTreePicker, ProjectTreePickerField } from "~/views-components/project-tree-picker/project-tree-picker";
-import { PickerIdProp } from '../../store/tree-picker/picker-id';
+import { ProjectTreePickerField } from "~/views-components/project-tree-picker/project-tree-picker";
+import { PickerIdProp } from '~/store/tree-picker/picker-id';
 
 export const CollectionNameField = () =>
     <Field
diff --git a/src/views-components/form-fields/process-form-fields.tsx b/src/views-components/form-fields/process-form-fields.tsx
index cf471b6..8f55e08 100644
--- a/src/views-components/form-fields/process-form-fields.tsx
+++ b/src/views-components/form-fields/process-form-fields.tsx
@@ -3,7 +3,7 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 import * as React from "react";
-import { Field, WrappedFieldProps } from "redux-form";
+import { Field } from "redux-form";
 import { TextField } from "~/components/text-field/text-field";
 import { PROCESS_NAME_VALIDATION } from "~/validators/validators";
 
diff --git a/src/views-components/form-fields/user-form-fields.tsx b/src/views-components/form-fields/user-form-fields.tsx
new file mode 100644
index 0000000..6dd635b
--- /dev/null
+++ b/src/views-components/form-fields/user-form-fields.tsx
@@ -0,0 +1,54 @@
+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
+import * as React from "react";
+import { Field } from "redux-form";
+import { TextField } from "~/components/text-field/text-field";
+import { USER_EMAIL_VALIDATION, USER_LENGTH_VALIDATION } from "~/validators/validators";
+import { NativeSelectField } from "~/components/select-field/select-field";
+
+export const UserFirstNameField = () =>
+    <Field
+        name='firstName'
+        component={TextField}
+        validate={USER_LENGTH_VALIDATION}
+        autoFocus={true}
+        label="First name" />;
+
+export const UserLastNameField = () =>
+    <Field
+        name='lastName'
+        component={TextField}
+        validate={USER_LENGTH_VALIDATION}
+        autoFocus={true}
+        label="Last name" />;
+
+export const UserEmailField = () =>
+    <Field
+        name='email'
+        component={TextField}
+        validate={USER_EMAIL_VALIDATION}
+        autoFocus={true}
+        label="Email" />;
+
+export const UserIdentityUrlField = () =>
+    <Field
+        name='identityUrl'
+        component={TextField}
+        validate={USER_LENGTH_VALIDATION}
+        label="Identity URL Prefix" />;
+
+export const UserVirtualMachineField = () =>
+    <Field
+        name='virtualMachine'
+        component={NativeSelectField}
+        validate={USER_LENGTH_VALIDATION}
+        items={['shell']} />;
+
+export const UserGroupsVirtualMachineField = () =>
+    <Field
+        name='virtualMachine'
+        component={TextField}
+        validate={USER_LENGTH_VALIDATION}
+        label="Groups for virtual machine (comma separated list)" />;
\ No newline at end of file
diff --git a/src/views-components/user-dialog/attributes-dialog.tsx b/src/views-components/user-dialog/attributes-dialog.tsx
index 5f711de..66a4881 100644
--- a/src/views-components/user-dialog/attributes-dialog.tsx
+++ b/src/views-components/user-dialog/attributes-dialog.tsx
@@ -66,17 +66,17 @@ const attributes = (user: UserResource, classes: any) => {
         <span>
             <Grid container direction="row">
                 <Grid item xs={5} className={classes.rightContainer}>
-                    <Grid item>First name</Grid>
-                    <Grid item>Last name</Grid>
-                    <Grid item>Owner uuid</Grid>
-                    <Grid item>Created at</Grid>
-                    <Grid item>Modified at</Grid>
-                    <Grid item>Modified by user uuid</Grid>
-                    <Grid item>Modified by client uuid</Grid>
-                    <Grid item>uuid</Grid>
-                    <Grid item>Href</Grid>
-                    <Grid item>Identity url</Grid>
-                    <Grid item>Username</Grid>
+                    {firstName && <Grid item>First name</Grid>}
+                    {lastName && <Grid item>Last name</Grid>}
+                    {ownerUuid && <Grid item>Owner uuid</Grid>}
+                    {createdAt && <Grid item>Created at</Grid>}
+                    {modifiedAt && <Grid item>Modified at</Grid>}
+                    {modifiedByUserUuid && <Grid item>Modified by user uuid</Grid>}
+                    {modifiedByClientUuid && <Grid item>Modified by client uuid</Grid>}
+                    {uuid && <Grid item>uuid</Grid>}
+                    {href && <Grid item>Href</Grid>}
+                    {identityUrl && <Grid item>Identity url</Grid>}
+                    {username && <Grid item>Username</Grid>}
                 </Grid>
                 <Grid item xs={7} className={classes.leftContainer}>
                     <Grid item>{firstName}</Grid>
diff --git a/src/views/user-panel/user-panel.tsx b/src/views/user-panel/user-panel.tsx
index ceaba8c..db44d50 100644
--- a/src/views/user-panel/user-panel.tsx
+++ b/src/views/user-panel/user-panel.tsx
@@ -3,7 +3,7 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 import * as React from 'react';
-import { WithStyles, withStyles, Typography } from '@material-ui/core';
+import { WithStyles, withStyles, Typography, Tabs, Tab, Paper, Button } from '@material-ui/core';
 import { DataExplorer } from "~/views-components/data-explorer/data-explorer";
 import { connect, DispatchProp } from 'react-redux';
 import { DataColumns } from '~/components/data-table/data-table';
@@ -21,24 +21,22 @@ import {
     ResourceUsername
 } from "~/views-components/data-explorer/renderers";
 import { navigateTo } from "~/store/navigation/navigation-action";
-import { loadDetailsPanel } from "~/store/details-panel/details-panel-action";
 import { ContextMenuKind } from "~/views-components/context-menu/context-menu";
 import { DataTableDefaultView } from '~/components/data-table-default-view/data-table-default-view';
 import { createTree } from '~/models/tree';
-import { compose } from 'redux';
+import { compose, Dispatch } from 'redux';
 import { UserResource } from '~/models/user';
-import { ShareMeIcon } from '~/components/icon/icon';
-import { USERS_PANEL_ID } from '~/store/users/users-actions';
+import { ShareMeIcon, AddIcon } from '~/components/icon/icon';
+import { USERS_PANEL_ID, openUserCreateDialog } from '~/store/users/users-actions';
 
-type UserPanelRules = "toolbar" | "button";
+type UserPanelRules = "button";
 
 const styles = withStyles<UserPanelRules>(theme => ({
-    toolbar: {
-        paddingBottom: theme.spacing.unit * 3,
-        textAlign: "right"
-    },
     button: {
-        marginLeft: theme.spacing.unit
+        marginTop: theme.spacing.unit,
+        marginRight: theme.spacing.unit * 2,
+        textAlign: 'right',
+        alignSelf: 'center'
     },
 }));
 
@@ -124,48 +122,91 @@ interface UserPanelDataProps {
     resources: ResourcesState;
 }
 
-type UserPanelProps = UserPanelDataProps & DispatchProp & WithStyles<UserPanelRules>;
+interface UserPanelActionProps {
+    openUserCreateDialog: () => void;
+    handleRowDoubleClick: (uuid: string) => void;
+    onContextMenu: (event: React.MouseEvent<HTMLElement>, item: any) => void;
+}
+
+const mapStateToProps = (state: RootState) => {
+    return {
+        resources: state.resources
+    };
+};
+
+const mapDispatchToProps = (dispatch: Dispatch) => ({
+    openUserCreateDialog: () => dispatch<any>(openUserCreateDialog()),
+    handleRowDoubleClick: (uuid: string) => dispatch<any>(navigateTo(uuid)),
+    onContextMenu: (event: React.MouseEvent<HTMLElement>, item: any) => dispatch<any>(openContextMenu(event, item))
+});
+
+type UserPanelProps = UserPanelDataProps & UserPanelActionProps & DispatchProp & WithStyles<UserPanelRules>;
 
 export const UserPanel = compose(
     styles,
-    connect((state: RootState) => ({
-        resources: state.resources
-    })))(
+    connect(mapStateToProps, mapDispatchToProps))(
         class extends React.Component<UserPanelProps> {
+            state = {
+                value: 0,
+            };
+
+            componentDidMount() {
+                this.setState({ value: 0 });
+            }
+
             render() {
-                return <DataExplorer
-                    id={USERS_PANEL_ID}
-                    onRowClick={this.handleRowClick}
-                    onRowDoubleClick={this.handleRowDoubleClick}
-                    onContextMenu={this.handleContextMenu}
-                    contextMenuColumn={true}
-                    isColumnSelectorHidden={true}
-                    dataTableDefaultView={
-                        <DataTableDefaultView
-                            icon={ShareMeIcon}
-                            messages={['Your user list is empty.']} />
-                    } />;
+                const { value } = this.state;
+                return <Paper>
+                    <Tabs value={value} onChange={this.handleChange} fullWidth>
+                        <Tab label="USERS" />
+                        <Tab label="ACTIVITY" />
+                    </Tabs>
+                    {value === 0 &&
+                        <span>
+                            <div className={this.props.classes.button}>
+                                <Button variant="contained" color="primary" onClick={this.props.openUserCreateDialog}>
+                                    <AddIcon /> NEW USER
+                                </Button>
+                            </div>
+                            <DataExplorer
+                                id={USERS_PANEL_ID}
+                                onRowClick={this.handleRowClick}
+                                onRowDoubleClick={this.handleRowDoubleClick}
+                                onContextMenu={this.handleContextMenu}
+                                contextMenuColumn={true}
+                                isUserPanel={true}
+                                dataTableDefaultView={
+                                    <DataTableDefaultView
+                                        icon={ShareMeIcon}
+                                        messages={['Your user list is empty.']} />
+                                } />
+                        </span>}
+                </Paper>;
+            }
+
+            handleChange = (event: React.MouseEvent<HTMLElement>, value: number) => {
+                this.setState({ value });
             }
 
             handleContextMenu = (event: React.MouseEvent<HTMLElement>, resourceUuid: string) => {
                 const resource = getResource<UserResource>(resourceUuid)(this.props.resources);
                 if (resource) {
-                    this.props.dispatch<any>(openContextMenu(event, {
+                    this.props.onContextMenu(event, {
                         name: '',
                         uuid: resource.uuid,
                         ownerUuid: resource.ownerUuid,
                         kind: resource.kind,
                         menuKind: ContextMenuKind.USER
-                    }));
+                    });
                 }
             }
 
             handleRowDoubleClick = (uuid: string) => {
-                this.props.dispatch<any>(navigateTo(uuid));
+                this.props.handleRowDoubleClick(uuid);
             }
 
-            handleRowClick = (uuid: string) => {
-                this.props.dispatch(loadDetailsPanel(uuid));
+            handleRowClick = () => {
+                return;
             }
         }
     );
diff --git a/src/views/workbench/workbench.tsx b/src/views/workbench/workbench.tsx
index 11285ba..5a6ba97 100644
--- a/src/views/workbench/workbench.tsx
+++ b/src/views/workbench/workbench.tsx
@@ -66,6 +66,7 @@ import { VirtualMachineAttributesDialog } from '~/views-components/virtual-machi
 import { RemoveVirtualMachineDialog } from '~/views-components/virtual-machines-dialog/remove-dialog';
 import { UserPanel } from '~/views/user-panel/user-panel';
 import { UserAttributesDialog } from '~/views-components/user-dialog/attributes-dialog';
+import { CreateUserDialog } from '~/views-components/dialog-forms/create-user-dialog';
 
 type CssRules = 'root' | 'container' | 'splitter' | 'asidePanel' | 'contentWrapper' | 'content';
 
@@ -159,6 +160,7 @@ export const WorkbenchPanel =
             <CreateProjectDialog />
             <CreateRepositoryDialog />
             <CreateSshKeyDialog />
+            <CreateUserDialog />
             <CurrentTokenDialog />
             <FileRemoveDialog />
             <FilesUploadCollectionDialog />

commit ba9a587ab628caea44d923b34d285a29e83e3456
Merge: fc3370a 1fa1f80
Author: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>
Date:   Wed Dec 5 11:47:19 2018 +0100

    Merge branch 'master' into 14504-users-admin-panel
    
    refs #14504
    
    Arvados-DCO-1.1-Signed-off-by: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>


-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list