[ARVADOS-WORKBENCH2] updated: 2.2.1-129-ga2c8bda1
Git user
git at public.arvados.org
Thu Nov 11 16:23:50 UTC 2021
Summary of changes:
src/views-components/data-explorer/renderers.tsx | 26 +++++++++++++++++-----
.../group-details-panel/group-details-panel.tsx | 14 +++++++++---
2 files changed, 31 insertions(+), 9 deletions(-)
via a2c8bda113085f0fa484cbe881c533718139d3b6 (commit)
from 7141f98b5212732f78f0f957accda92258bd1c9d (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 a2c8bda113085f0fa484cbe881c533718139d3b6
Author: Stephen Smith <stephen at curii.com>
Date: Thu Nov 11 11:23:28 2021 -0500
18123: Add isActive checkbox to group member list for user members
Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen at curii.com>
diff --git a/src/views-components/data-explorer/renderers.tsx b/src/views-components/data-explorer/renderers.tsx
index 73ef32b0..aa200942 100644
--- a/src/views-components/data-explorer/renderers.tsx
+++ b/src/views-components/data-explorer/renderers.tsx
@@ -185,16 +185,30 @@ export const ResourceEmail = connect(
return resource || { email: '' };
})(renderEmail);
-const renderIsActive = (props: { uuid: string, isActive: boolean, toggleIsActive: (uuid: string) => void }) =>
- <Checkbox
- color="primary"
- checked={props.isActive}
- onClick={() => props.toggleIsActive(props.uuid)} />;
+const renderIsActive = (props: { uuid: string, kind: ResourceKind, isActive: boolean, toggleIsActive: (uuid: string) => void }) => {
+ if (props.kind === ResourceKind.USER) {
+ return <Checkbox
+ color="primary"
+ checked={props.isActive}
+ onClick={() => props.toggleIsActive(props.uuid)} />;
+ } else {
+ return <Typography />;
+ }
+}
export const ResourceIsActive = connect(
(state: RootState, props: { uuid: string }) => {
const resource = getResource<UserResource>(props.uuid)(state.resources);
- return resource || { isActive: false };
+ return resource || { isActive: false, kind: ResourceKind.NONE };
+ }, { toggleIsActive }
+)(renderIsActive);
+
+export const ResourceLinkTailIsActive = connect(
+ (state: RootState, props: { uuid: string }) => {
+ const link = getResource<LinkResource>(props.uuid)(state.resources);
+ const tailResource = getResource<UserResource>(link?.tailUuid || '')(state.resources);
+
+ return tailResource || { isActive: false, kind: ResourceKind.NONE };
}, { toggleIsActive }
)(renderIsActive);
diff --git a/src/views/group-details-panel/group-details-panel.tsx b/src/views/group-details-panel/group-details-panel.tsx
index b4a8c6d3..7b06a693 100644
--- a/src/views/group-details-panel/group-details-panel.tsx
+++ b/src/views/group-details-panel/group-details-panel.tsx
@@ -7,7 +7,7 @@ import { connect } from 'react-redux';
import { DataExplorer } from "views-components/data-explorer/data-explorer";
import { DataColumns } from 'components/data-table/data-table';
-import { ResourceLinkHeadUuid, ResourceLinkTailUuid, ResourceLinkTailEmail, ResourceLinkTailUsername, ResourceLinkHeadPermissionLevel, ResourceLinkTailPermissionLevel, ResourceLinkHead, ResourceLinkTail, ResourceLinkDelete } from 'views-components/data-explorer/renderers';
+import { ResourceLinkHeadUuid, ResourceLinkTailUuid, ResourceLinkTailEmail, ResourceLinkTailUsername, ResourceLinkHeadPermissionLevel, ResourceLinkTailPermissionLevel, ResourceLinkHead, ResourceLinkTail, ResourceLinkDelete, ResourceLinkTailIsActive } from 'views-components/data-explorer/renderers';
import { createTree } from 'models/tree';
import { noop } from 'lodash/fp';
import { RootState } from 'store/store';
@@ -21,10 +21,11 @@ import { AddIcon } from 'components/icon/icon';
export enum GroupDetailsPanelMembersColumnNames {
FULL_NAME = "Name",
- UUID = "UUID",
- EMAIL = "Email",
USERNAME = "Username",
+ EMAIL = "Email",
+ ACTIVE = "User Active",
PERMISSION = "Permission",
+ UUID = "UUID",
REMOVE = "Remove",
}
@@ -57,6 +58,13 @@ export const groupDetailsMembersPanelColumns: DataColumns<string> = [
filters: createTree(),
render: uuid => <ResourceLinkTailEmail uuid={uuid} />
},
+ {
+ name: GroupDetailsPanelMembersColumnNames.ACTIVE,
+ selected: true,
+ configurable: true,
+ filters: createTree(),
+ render: uuid => <ResourceLinkTailIsActive uuid={uuid} />
+ },
{
name: GroupDetailsPanelMembersColumnNames.PERMISSION,
selected: true,
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list