[ARVADOS-WORKBENCH2] updated: 1.3.0-85-g0190f22
Git user
git at public.curoverse.com
Tue Dec 11 02:37:29 EST 2018
Summary of changes:
src/store/groups-panel/groups-panel-actions.ts | 7 ++
.../dialog-forms/create-group-dialog.tsx | 32 +++++++++
src/views/groups-panel/groups-panel.tsx | 77 ++++++++++------------
src/views/workbench/workbench.tsx | 2 +
4 files changed, 74 insertions(+), 44 deletions(-)
create mode 100644 src/views-components/dialog-forms/create-group-dialog.tsx
via 0190f22c054d5257f67af66a9a1f1fa84e062fcc (commit)
via 963621403512fddf0d84b595b41164ba0b552700 (commit)
from b2687ded960c6fb9e006bbceb5f93aa685aa70d5 (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 0190f22c054d5257f67af66a9a1f1fa84e062fcc
Author: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
Date: Tue Dec 11 08:37:11 2018 +0100
Add CreateGroupDialog
Feature #14505
Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
diff --git a/src/store/groups-panel/groups-panel-actions.ts b/src/store/groups-panel/groups-panel-actions.ts
index 5adce5c..28a1c07 100644
--- a/src/store/groups-panel/groups-panel-actions.ts
+++ b/src/store/groups-panel/groups-panel-actions.ts
@@ -3,8 +3,15 @@
// SPDX-License-Identifier: AGPL-3.0
import { bindDataExplorerActions } from "~/store/data-explorer/data-explorer-action";
+import { dialogActions } from '~/store/dialog/dialog-actions';
export const GROUPS_PANEL_ID = "groupsPanel";
+export const CREATE_GROUP_DIALOG = "createGroupDialog";
+export const CREATE_GROUP_FORM = "createGroupForm";
+
export const GroupsPanelActions = bindDataExplorerActions(GROUPS_PANEL_ID);
export const loadGroupsPanel = () => GroupsPanelActions.REQUEST_ITEMS();
+
+export const openCreateGroupDialog = () =>
+ dialogActions.OPEN_DIALOG({ id: CREATE_GROUP_DIALOG, data: {} });
diff --git a/src/views-components/dialog-forms/create-group-dialog.tsx b/src/views-components/dialog-forms/create-group-dialog.tsx
new file mode 100644
index 0000000..10d60c3
--- /dev/null
+++ b/src/views-components/dialog-forms/create-group-dialog.tsx
@@ -0,0 +1,32 @@
+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
+import * as React from 'react';
+import { compose } from "redux";
+import { reduxForm, InjectedFormProps } from 'redux-form';
+import { withDialog, WithDialogProps } from "~/store/dialog/with-dialog";
+import { FormDialog } from '~/components/form-dialog/form-dialog';
+import { CREATE_GROUP_DIALOG, CREATE_GROUP_FORM } from '~/store/groups-panel/groups-panel-actions';
+
+export const CreateGroupDialog = compose(
+ withDialog(CREATE_GROUP_DIALOG),
+ reduxForm<{}>({
+ form: CREATE_GROUP_FORM,
+ onSubmit: (data, dispatch) => { return; }
+ })
+)(
+ (props: CreateGroupDialogComponentProps) =>
+ <FormDialog
+ dialogTitle='Create a group'
+ formFields={CreateGroupFormFields}
+ submitLabel='Create'
+ {...props}
+ />
+);
+
+type CreateGroupDialogComponentProps = WithDialogProps<{}> & InjectedFormProps<{}>;
+
+const CreateGroupFormFields = (props: CreateGroupDialogComponentProps) => <span>
+ CreateGroupFormFields
+</span>;
diff --git a/src/views/groups-panel/groups-panel.tsx b/src/views/groups-panel/groups-panel.tsx
index 7f919d5..39028ec 100644
--- a/src/views/groups-panel/groups-panel.tsx
+++ b/src/views/groups-panel/groups-panel.tsx
@@ -3,6 +3,7 @@
// SPDX-License-Identifier: AGPL-3.0
import * as React from 'react';
+import { connect } from 'react-redux';
import { Grid, Button } from "@material-ui/core";
import { DataExplorer } from "~/views-components/data-explorer/data-explorer";
@@ -12,7 +13,7 @@ import { ResourceOwner } from '~/views-components/data-explorer/renderers';
import { AddIcon } from '~/components/icon/icon';
import { ResourceName } from '~/views-components/data-explorer/renderers';
import { createTree } from '~/models/tree';
-import { GROUPS_PANEL_ID } from '~/store/groups-panel/groups-panel-actions';
+import { GROUPS_PANEL_ID, openCreateGroupDialog } from '~/store/groups-panel/groups-panel-actions';
import { noop } from 'lodash/fp';
export enum GroupsPanelColumnNames {
@@ -50,27 +51,33 @@ export interface GroupsPanelProps {
onNewGroup: () => void;
}
-export class GroupsPanel extends React.Component<GroupsPanelProps> {
+export const GroupsPanel = connect(
+ null,
+ {
+ onNewGroup: openCreateGroupDialog
+ }
+)(
+ class GroupsPanel extends React.Component<GroupsPanelProps> {
- render() {
- return (
- <DataExplorer
- id={GROUPS_PANEL_ID}
- onRowClick={noop}
- onRowDoubleClick={noop}
- onContextMenu={noop}
- contextMenuColumn={true}
- hideColumnSelector
- actions={
- <Grid container justify='flex-end'>
- <Button
- variant="contained"
- color="primary"
- onClick={this.props.onNewGroup}>
- <AddIcon /> New group
+ render() {
+ return (
+ <DataExplorer
+ id={GROUPS_PANEL_ID}
+ onRowClick={noop}
+ onRowDoubleClick={noop}
+ onContextMenu={noop}
+ contextMenuColumn={true}
+ hideColumnSelector
+ actions={
+ <Grid container justify='flex-end'>
+ <Button
+ variant="contained"
+ color="primary"
+ onClick={this.props.onNewGroup}>
+ <AddIcon /> New group
</Button>
- </Grid>
- } />
- );
- }
-}
+ </Grid>
+ } />
+ );
+ }
+ });
diff --git a/src/views/workbench/workbench.tsx b/src/views/workbench/workbench.tsx
index 468797e..2a77318 100644
--- a/src/views/workbench/workbench.tsx
+++ b/src/views/workbench/workbench.tsx
@@ -76,6 +76,7 @@ import { UserAttributesDialog } from '~/views-components/user-dialog/attributes-
import { CreateUserDialog } from '~/views-components/dialog-forms/create-user-dialog';
import { HelpApiClientAuthorizationDialog } from '~/views-components/api-client-authorizations-dialog/help-dialog';
import { GroupsPanel } from '~/views/groups-panel/groups-panel';
+import { CreateGroupDialog } from '~/views-components/dialog-forms/create-group-dialog';
type CssRules = 'root' | 'container' | 'splitter' | 'asidePanel' | 'contentWrapper' | 'content';
@@ -172,6 +173,7 @@ export const WorkbenchPanel =
<CopyCollectionDialog />
<CopyProcessDialog />
<CreateCollectionDialog />
+ <CreateGroupDialog />
<CreateProjectDialog />
<CreateRepositoryDialog />
<CreateSshKeyDialog />
commit 963621403512fddf0d84b595b41164ba0b552700
Author: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
Date: Tue Dec 11 00:01:55 2018 +0100
Clean up groups panel imports
Feature #14505
Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
diff --git a/src/views/groups-panel/groups-panel.tsx b/src/views/groups-panel/groups-panel.tsx
index ea911aa..7f919d5 100644
--- a/src/views/groups-panel/groups-panel.tsx
+++ b/src/views/groups-panel/groups-panel.tsx
@@ -3,35 +3,17 @@
// SPDX-License-Identifier: AGPL-3.0
import * as React from 'react';
-import withStyles from "@material-ui/core/styles/withStyles";
-import { DispatchProp, connect } from 'react-redux';
-import { RouteComponentProps } from 'react-router';
-import { StyleRulesCallback, WithStyles, Typography, Grid, Button } from "@material-ui/core";
+import { Grid, Button } from "@material-ui/core";
import { DataExplorer } from "~/views-components/data-explorer/data-explorer";
import { DataColumns } from '~/components/data-table/data-table';
-import { RootState } from '~/store/store';
-import { DataTableFilterItem } from '~/components/data-table-filters/data-table-filters';
-import { ContainerRequestState } from '~/models/container-request';
import { SortDirection } from '~/components/data-table/data-column';
-import { ResourceKind, Resource } from '~/models/resource';
-import { ResourceFileSize, ResourceLastModifiedDate, ProcessStatus, ResourceType, ResourceOwner } from '~/views-components/data-explorer/renderers';
-import { ProjectIcon, AddIcon } from '~/components/icon/icon';
+import { ResourceOwner } from '~/views-components/data-explorer/renderers';
+import { AddIcon } from '~/components/icon/icon';
import { ResourceName } from '~/views-components/data-explorer/renderers';
-import { ResourcesState, getResource } from '~/store/resources/resources';
-import { loadDetailsPanel } from '~/store/details-panel/details-panel-action';
-import { resourceKindToContextMenuKind, openContextMenu } from '~/store/context-menu/context-menu-actions';
-import { ProjectResource } from '~/models/project';
-import { navigateTo } from '~/store/navigation/navigation-action';
-import { getProperty } from '~/store/properties/properties';
-import { PROJECT_PANEL_CURRENT_UUID } from '~/store/project-panel/project-panel-action';
-import { DataTableDefaultView } from '~/components/data-table-default-view/data-table-default-view';
-import { ArvadosTheme } from "~/common/custom-theme";
import { createTree } from '~/models/tree';
-import { getInitialResourceTypeFilters } from '~/store/resource-type-filters/resource-type-filters';
import { GROUPS_PANEL_ID } from '~/store/groups-panel/groups-panel-actions';
import { noop } from 'lodash/fp';
-import { GroupResource } from '~/models/group';
export enum GroupsPanelColumnNames {
GROUP = "Name",
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list