[ARVADOS-WORKBENCH2] updated: 2.3.0-54-g311448f7
Git user
git at public.arvados.org
Tue Dec 14 02:46:09 UTC 2021
Summary of changes:
src/views-components/data-explorer/renderers.tsx | 11 ++++++-----
src/views/group-details-panel/group-details-panel.tsx | 2 +-
2 files changed, 7 insertions(+), 6 deletions(-)
via 311448f71e5a5cc1ffcfe6d5b7c5214fa196f1b1 (commit)
from 7e1669d2263cdf8e9066057fd126007b755ba7f5 (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 311448f71e5a5cc1ffcfe6d5b7c5214fa196f1b1
Author: Stephen Smith <stephen at curii.com>
Date: Mon Dec 13 21:45:40 2021 -0500
18123: Add optional disabled prop to active checkbox.
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 2ec4bf51..11752a5a 100644
--- a/src/views-components/data-explorer/renderers.tsx
+++ b/src/views-components/data-explorer/renderers.tsx
@@ -188,11 +188,12 @@ export const ResourceEmail = connect(
return resource || { email: '' };
})(renderEmail);
-const renderIsActive = (props: { uuid: string, kind: ResourceKind, isActive: boolean, toggleIsActive: (uuid: string) => void }) => {
+const renderIsActive = (props: { uuid: string, kind: ResourceKind, isActive: boolean, toggleIsActive: (uuid: string) => void, disabled?: boolean }) => {
if (props.kind === ResourceKind.USER) {
return <Checkbox
color="primary"
checked={props.isActive}
+ disabled={!!props.disabled}
onClick={() => props.toggleIsActive(props.uuid)} />;
} else {
return <Typography />;
@@ -200,18 +201,18 @@ const renderIsActive = (props: { uuid: string, kind: ResourceKind, isActive: boo
}
export const ResourceIsActive = connect(
- (state: RootState, props: { uuid: string }) => {
+ (state: RootState, props: { uuid: string, disabled?: boolean }) => {
const resource = getResource<UserResource>(props.uuid)(state.resources);
- return resource || { isActive: false, kind: ResourceKind.NONE };
+ return resource ? {...resource, disabled: !!props.disabled} : { isActive: false, kind: ResourceKind.NONE };
}, { toggleIsActive }
)(renderIsActive);
export const ResourceLinkTailIsActive = connect(
- (state: RootState, props: { uuid: string }) => {
+ (state: RootState, props: { uuid: string, disabled?: boolean }) => {
const link = getResource<LinkResource>(props.uuid)(state.resources);
const tailResource = getResource<UserResource>(link?.tailUuid || '')(state.resources);
- return tailResource || { isActive: false, kind: ResourceKind.NONE };
+ return tailResource ? {...tailResource, disabled: !!props.disabled} : { 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 9f2d3f41..e47ff8c0 100644
--- a/src/views/group-details-panel/group-details-panel.tsx
+++ b/src/views/group-details-panel/group-details-panel.tsx
@@ -55,7 +55,7 @@ export const groupDetailsMembersPanelColumns: DataColumns<string> = [
selected: true,
configurable: true,
filters: createTree(),
- render: uuid => <ResourceLinkTailIsActive uuid={uuid} />
+ render: uuid => <ResourceLinkTailIsActive uuid={uuid} disabled={true} />
},
{
name: GroupDetailsPanelMembersColumnNames.VISIBLE,
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list