[arvados-workbench2] updated: 2.7.1-4-g46aa19c9
git repository hosting
git at public.arvados.org
Tue Dec 19 18:20:35 UTC 2023
Summary of changes:
src/store/breadcrumbs/breadcrumbs-actions.ts | 4 ++--
src/views-components/data-explorer/renderers.tsx | 9 ++++++---
2 files changed, 8 insertions(+), 5 deletions(-)
via 46aa19c9021558faed73dac266d9d96b1cff9ac1 (commit)
from 255734af1fb681dc7dda5de0cd5047e7159256ba (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 46aa19c9021558faed73dac266d9d96b1cff9ac1
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Tue Dec 19 13:20:30 2023 -0500
21128: breadcrmubs now shows user name when viewing user page Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/src/store/breadcrumbs/breadcrumbs-actions.ts b/src/store/breadcrumbs/breadcrumbs-actions.ts
index 5f82af3e..cd4b1a62 100644
--- a/src/store/breadcrumbs/breadcrumbs-actions.ts
+++ b/src/store/breadcrumbs/breadcrumbs-actions.ts
@@ -50,8 +50,8 @@ const resourceToBreadcrumbIcon = (resource: CollectionResource | ContainerReques
}
}
-const resourceToBreadcrumb = (resource: CollectionResource | ContainerRequestResource | GroupResource | WorkflowResource): Breadcrumb => ({
- label: resource.name,
+const resourceToBreadcrumb = (resource: (CollectionResource | ContainerRequestResource | GroupResource | WorkflowResource) & {fullName?: string} ): Breadcrumb => ({
+ label: resource.name || resource.fullName || '',
uuid: resource.uuid,
icon: resourceToBreadcrumbIcon(resource),
})
diff --git a/src/views-components/data-explorer/renderers.tsx b/src/views-components/data-explorer/renderers.tsx
index 2cbf038a..16c5b379 100644
--- a/src/views-components/data-explorer/renderers.tsx
+++ b/src/views-components/data-explorer/renderers.tsx
@@ -53,6 +53,7 @@ import { VirtualMachinesResource } from "models/virtual-machines";
import { CopyToClipboardSnackbar } from "components/copy-to-clipboard-snackbar/copy-to-clipboard-snackbar";
import { ProjectResource } from "models/project";
import { ProcessResource } from "models/process";
+import { setBreadcrumbs } from "store/breadcrumbs/breadcrumbs-actions";
const renderName = (dispatch: Dispatch, item: GroupContentsResource) => {
const navFunc = "groupClass" in item && item.groupClass === GroupClass.ROLE ? navigateToGroupDetails : navigateTo;
@@ -512,7 +513,8 @@ const getResourceDisplayName = (resource: Resource): string => {
}
};
-const renderResourceLink = (dispatch: Dispatch, item: Resource) => {
+const renderResourceLink = (dispatch: Dispatch, item: Resource, breadcrumbs: any[] = []) => {
+ console.log(item)
var displayName = getResourceDisplayName(item);
return (
@@ -523,7 +525,7 @@ const renderResourceLink = (dispatch: Dispatch, item: Resource) => {
onClick={() => {
item.kind === ResourceKind.GROUP && (item as GroupResource).groupClass === "role"
? dispatch<any>(navigateToGroupDetails(item.uuid))
- : dispatch<any>(navigateTo(item.uuid));
+ : dispatch<any>(navigateTo(item.uuid)); setBreadcrumbs(breadcrumbs, item as any);
}}
>
{resourceLabel(item.kind, item && item.kind === ResourceKind.GROUP ? (item as GroupResource).groupClass || "" : "")}:{" "}
@@ -538,8 +540,9 @@ export const ResourceLinkTail = connect((state: RootState, props: { uuid: string
return {
item: tailResource || { uuid: resource?.tailUuid || "", kind: resource?.tailKind || ResourceKind.NONE },
+ breadcrumbs: state.properties.breadcrumbs || []
};
-})((props: { item: Resource } & DispatchProp<any>) => renderResourceLink(props.dispatch, props.item));
+})((props: { item: Resource, breadcrumbs: any[] } & DispatchProp<any>) => renderResourceLink(props.dispatch, props.item, props.breadcrumbs));
export const ResourceLinkHead = connect((state: RootState, props: { uuid: string }) => {
const resource = getResource<LinkResource>(props.uuid)(state.resources);
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list