[arvados] updated: 2.7.0-5587-g3d5a1c29aa
git repository hosting
git at public.arvados.org
Wed Dec 6 23:18:27 UTC 2023
Summary of changes:
.../cypress/integration/side-panel.spec.js | 37 ++++
services/workbench2/package.json | 9 +-
services/workbench2/public/arrow-to-left.png | Bin 10416 -> 0 bytes
services/workbench2/public/arrow-to-right.png | Bin 10484 -> 0 bytes
services/workbench2/public/collapseLHS-New.svg | 25 ---
services/workbench2/public/mui-start-icon.svg | 1 +
.../src/components/data-explorer/data-explorer.tsx | 67 ++++---
services/workbench2/src/components/icon/icon.tsx | 7 +
.../multiselect-toolbar/MultiselectToolbar.tsx | 1 +
.../subprocess-progress-bar.test.tsx | 165 +++++++++++++++++
.../subprocess-progress-bar.tsx | 105 +++++++++++
services/workbench2/src/components/tree/tree.tsx | 41 +++--
services/workbench2/src/index.tsx | 3 +
.../src/store/favorites/favorites-actions.ts | 2 +
.../src/store/navigation/navigation-action.ts | 3 +
.../public-favorites/public-favorites-actions.ts | 2 +
.../side-panel-tree/side-panel-tree-actions.ts | 114 +++++++-----
.../subprocess-panel/subprocess-panel-actions.ts | 81 +++++++++
.../store/tree-picker/tree-picker-actions.test.ts | 5 +-
.../src/store/workbench/workbench-actions.ts | 3 +-
.../views-components/data-explorer/renderers.tsx | 24 +++
.../side-panel-toggle/side-panel-toggle.tsx | 15 +-
.../side-panel-tree/side-panel-tree.tsx | 6 +-
.../side-panel/side-panel-collapsed.tsx | 159 +++++++++++++++++
.../src/views-components/side-panel/side-panel.tsx | 8 +-
.../src/views/process-panel/process-panel-root.tsx | 2 +-
.../shared-with-me-panel/shared-with-me-panel.tsx | 198 +++++++++++++++++++++
.../subprocess-panel/subprocess-panel-root.tsx | 6 +-
.../views/subprocess-panel/subprocess-panel.tsx | 2 +-
.../workbench2/src/views/workbench/workbench.tsx | 4 +-
services/workbench2/yarn.lock | 93 +++++-----
31 files changed, 1018 insertions(+), 170 deletions(-)
delete mode 100644 services/workbench2/public/arrow-to-left.png
delete mode 100644 services/workbench2/public/arrow-to-right.png
delete mode 100644 services/workbench2/public/collapseLHS-New.svg
create mode 100644 services/workbench2/public/mui-start-icon.svg
create mode 100644 services/workbench2/src/components/subprocess-progress-bar/subprocess-progress-bar.test.tsx
create mode 100644 services/workbench2/src/components/subprocess-progress-bar/subprocess-progress-bar.tsx
create mode 100644 services/workbench2/src/views-components/side-panel/side-panel-collapsed.tsx
via 3d5a1c29aad86476f2e789e1e54cabf8b4605aa2 (commit)
via ba244d0282e8dc6c21ebf6a509750717bae35783 (commit)
via ca46f67ca632f9e1633298ccc5868015acbdd04a (commit)
via 56abc754816d01cb8e9df01a35c8e9af66ada408 (commit)
via e2f200c518a48a05bb8dba7682dbb445c19951df (commit)
via 25667ac485387b286faa5c5e4a6bb96231dddf20 (commit)
via 8228d441690ed78340e1a44f3e0bf8b4f94215a0 (commit)
via 30e91748f6f3202604f3a19d1aa7ddf02ffd149e (commit)
via d3bd5784e528b8b99881b293b530b78a23d0a775 (commit)
via 7d45d61adcaffb47f58031a44f89ff3f9005ce22 (commit)
via dcf2e835b33e926073dad1f636cf92a95493ca0b (commit)
via 356d030ba429f793d4dd5d9997395cb0a7125514 (commit)
via 2a0558ceed0332333908344cd1274d2827716d87 (commit)
via 8530de10102e931fca7adf3eae39ca562ffea5ec (commit)
via 6c351b29d205b54fd86b62cf4e39d06b0d2a6dcd (commit)
via 4d3c5f5861ea4c1d5e8491517806651cdfeab57f (commit)
via 21be228d6b3f99b6c27b2a2a0fd1cc9c46ce6cfb (commit)
via 9a3525e1e4561393a4fb42c6e02f4f6b6d074954 (commit)
via b5311e4a8420181d6ad1e0380f0cd9959c96faec (commit)
via f5fd828741edeebb7c4d3449f474c3606b3912d4 (commit)
via 6c9138600a27ea2980ac455e9b62ac7b7c1e64b8 (commit)
via bc46a0bb4a5e0fe799c39e6570c2b2c186452037 (commit)
via 0e98b3fc0b3c49e6268905fba19859b05e26fc4f (commit)
via acbdf56bc7c678796cc4a8d0627ab66fd1edf37f (commit)
via 72c70bed4eb3098a92a0deb07841a0b46d9df5bf (commit)
via 82646dcb3d8f2497de1a33d2250101749526662f (commit)
via e335fc05c480a0eda91cf36c374cbcc784281c2e (commit)
via 1d6407bd7c7d0669c99b615c8ecc2be3a10b6ba9 (commit)
via e5fadeed6b9052254606e7c0529752b74f50a27b (commit)
via 8997608d0fae4eba9d92d7e363bdc6bb462e933d (commit)
via 4288d7816f793b621fa8c70cb646c19136e05d2a (commit)
via 599aa352ade599966cf2a4606a1e6a1776a0738d (commit)
via 9eca8f9b0755eaeb1104a8e699a463f0ac127040 (commit)
via ef5e2f624a7f51fc326a7ef34e8c12134b108ab4 (commit)
via ce84334e25316fdf1671bdf5ce8acda9c1a455de (commit)
via 992d07cd979b34d79fbe3135be089a86b13f0201 (commit)
via 37a104a131a5121b213146fb4ee1b18bc822df90 (commit)
via c178ba288276f6383703fb9b7e513ff78f68b917 (commit)
via 5f48a19354d8503c7967c22af2caedf30f1f1056 (commit)
via 525f8b0afcbeee6bea0cc1f3fc7c3a249fde995a (commit)
via 5d6640046afef7dc3714b784430e18bf2f2153fe (commit)
via b4d518c97713bc542abfb8f4041ae25b82db3764 (commit)
via c314adae7b1551ef6682d4a3760bda5787b989ce (commit)
via 9fe1e9ff7d9af167f0ee350ab5a68ded128d8043 (commit)
via 45dab1a8d772d04484cdd8a5f7487cb74a105ad9 (commit)
via 89e80fa011ac209afc87d5440ceef174c2e5ef70 (commit)
via d1dd322910160323245664b836d9c2f69e068d85 (commit)
via 11b6ed73b4a0dc051072bb02a060396b55db4a26 (commit)
via eeb58b87d42354940875c56d41add15b4bfc0894 (commit)
via fdb810aee6d7ee83f3ccea81e21dac1a4c3823d6 (commit)
via cfa88a0915d5a49a6eb870505c346db2dbd58648 (commit)
via 0602c276f01e91b1bb6dafcc3adfc0dd43a922fc (commit)
via 70cc7de1fd7fb72c757a8466dee7ca6bf8e55c84 (commit)
via 8a4ef30d51b2ccc6138bc1d8d8300b106bcdd8b2 (commit)
via c986217e3930682b6b4ab49941314bdeb0357595 (commit)
from 34b6ae3f6c8204f87a9498d00f7ebe2b10cda170 (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 3d5a1c29aad86476f2e789e1e54cabf8b4605aa2
Merge: 34b6ae3f6c ba244d0282
Author: Tom Clegg <tom at curii.com>
Date: Wed Dec 6 18:16:24 2023 -0500
Merge branch 'main' from arvados-workbench2.git
refs #18874
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>
diff --cc services/workbench2/public/mui-start-icon.svg
index 0000000000,3140cc336c..3140cc336c
mode 000000,100644..100644
--- a/services/workbench2/public/mui-start-icon.svg
+++ b/services/workbench2/public/mui-start-icon.svg
diff --cc services/workbench2/src/components/subprocess-progress-bar/subprocess-progress-bar.test.tsx
index 0000000000,bd8603f9c2..bd8603f9c2
mode 000000,100644..100644
--- a/services/workbench2/src/components/subprocess-progress-bar/subprocess-progress-bar.test.tsx
+++ b/services/workbench2/src/components/subprocess-progress-bar/subprocess-progress-bar.test.tsx
diff --cc services/workbench2/src/components/subprocess-progress-bar/subprocess-progress-bar.tsx
index 0000000000,b21d879185..b21d879185
mode 000000,100644..100644
--- a/services/workbench2/src/components/subprocess-progress-bar/subprocess-progress-bar.tsx
+++ b/services/workbench2/src/components/subprocess-progress-bar/subprocess-progress-bar.tsx
diff --cc services/workbench2/src/views-components/side-panel/side-panel-collapsed.tsx
index 0000000000,d2f5cfec3b..d2f5cfec3b
mode 000000,100644..100644
--- a/services/workbench2/src/views-components/side-panel/side-panel-collapsed.tsx
+++ b/services/workbench2/src/views-components/side-panel/side-panel-collapsed.tsx
commit ba244d0282e8dc6c21ebf6a509750717bae35783
Merge: ca46f67ca6 e2f200c518
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Tue Nov 21 14:51:27 2023 -0500
Merge branch '19302-left-side-panel-changes'
closes #19302
Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
commit ca46f67ca632f9e1633298ccc5868015acbdd04a
Merge: e14e00a5fb 56abc75481
Author: Stephen Smith <stephen at curii.com>
Date: Mon Nov 20 12:22:07 2023 -0500
Merge branch '20609-subprocess-progress-bar' into main. Closes #20609
Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen at curii.com>
commit 56abc754816d01cb8e9df01a35c8e9af66ada408
Author: Stephen Smith <stephen at curii.com>
Date: Mon Nov 20 12:21:27 2023 -0500
20609: Tweak subprocess progress bar spacing
Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen at curii.com>
diff --git a/src/components/subprocess-progress-bar/subprocess-progress-bar.tsx b/src/components/subprocess-progress-bar/subprocess-progress-bar.tsx
index 07178e79fd..b21d879185 100644
--- a/src/components/subprocess-progress-bar/subprocess-progress-bar.tsx
+++ b/src/components/subprocess-progress-bar/subprocess-progress-bar.tsx
@@ -16,7 +16,7 @@ type CssRules = 'progressWrapper' | 'progressStacked' ;
const styles: StyleRulesCallback<CssRules> = (theme) => ({
progressWrapper: {
- margin: "25px 0 0",
+ margin: "28px 0 0",
flexGrow: 1,
flexBasis: "100px",
},
commit e2f200c518a48a05bb8dba7682dbb445c19951df
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Thu Nov 16 09:33:46 2023 -0500
19302: cleanup Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/src/views-components/side-panel/side-panel-collapsed.tsx b/src/views-components/side-panel/side-panel-collapsed.tsx
index cbfd285da3..d2f5cfec3b 100644
--- a/src/views-components/side-panel/side-panel-collapsed.tsx
+++ b/src/views-components/side-panel/side-panel-collapsed.tsx
@@ -103,11 +103,11 @@ const sidePanelCollapsedCategories: TCollapsedCategory[] = [
]
type SidePanelCollapsedProps = {
- user: User,
- selectedPath: string,
- navToHome: (uuid: string)=>void,
- navTo: (navTarget: RouterAction | '')=>void,
-}
+ user: User;
+ selectedPath: string;
+ navToHome: (uuid: string) => void;
+ navTo: (navTarget: RouterAction | '') => void;
+};
const mapStateToProps = ({auth, properties }: RootState) => {
return {
commit 25667ac485387b286faa5c5e4a6bb96231dddf20
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Wed Nov 15 15:48:28 2023 -0500
19302: redefined collapsed panel props Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/src/views-components/side-panel/side-panel-collapsed.tsx b/src/views-components/side-panel/side-panel-collapsed.tsx
index 18e4df2527..cbfd285da3 100644
--- a/src/views-components/side-panel/side-panel-collapsed.tsx
+++ b/src/views-components/side-panel/side-panel-collapsed.tsx
@@ -22,6 +22,7 @@ import {
} from 'store/navigation/navigation-action'
import { navigateToUserVirtualMachines } from 'store/navigation/navigation-action'
import { RouterAction } from 'react-router-redux'
+import { User } from 'models/user'
type CssRules = 'button' | 'unselected' | 'selected'
@@ -101,6 +102,13 @@ const sidePanelCollapsedCategories: TCollapsedCategory[] = [
},
]
+type SidePanelCollapsedProps = {
+ user: User,
+ selectedPath: string,
+ navToHome: (uuid: string)=>void,
+ navTo: (navTarget: RouterAction | '')=>void,
+}
+
const mapStateToProps = ({auth, properties }: RootState) => {
return {
user: auth.user,
@@ -120,7 +128,7 @@ const mapDispatchToProps = (dispatch: Dispatch) => {
}
export const SidePanelCollapsed = withStyles(styles)(
- connect(mapStateToProps, mapDispatchToProps)(({ classes, user, selectedPath, navToHome, navTo }: WithStyles & any) => {
+ connect(mapStateToProps, mapDispatchToProps)(({ classes, user, selectedPath, navToHome, navTo }: WithStyles & SidePanelCollapsedProps) => {
const handleClick = (cat: TCollapsedCategory) => {
if (cat.name === SidePanelCollapsedCategory.PROJECTS) navToHome(user.uuid)
@@ -129,9 +137,8 @@ export const SidePanelCollapsed = withStyles(styles)(
const { button, unselected, selected } = classes
return (
- <List data-cy="side-panel-collapsed">
+ <List data-cy='side-panel-collapsed'>
{sidePanelCollapsedCategories.map((cat) => (
-
<ListItem
key={cat.name}
data-cy={`collapsed-${cat.name.toLowerCase().replace(/\s+/g, '-')}`}
@@ -147,6 +154,6 @@ export const SidePanelCollapsed = withStyles(styles)(
</ListItem>
))}
</List>
- )
+ );
})
)
commit 8228d441690ed78340e1a44f3e0bf8b4f94215a0
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Wed Nov 15 15:32:21 2023 -0500
19302: css tweaks Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/src/views-components/side-panel/side-panel-collapsed.tsx b/src/views-components/side-panel/side-panel-collapsed.tsx
index 0f43fb7142..18e4df2527 100644
--- a/src/views-components/side-panel/side-panel-collapsed.tsx
+++ b/src/views-components/side-panel/side-panel-collapsed.tsx
@@ -23,15 +23,14 @@ import {
import { navigateToUserVirtualMachines } from 'store/navigation/navigation-action'
import { RouterAction } from 'react-router-redux'
-type CssRules = 'root' | 'unselected' | 'selected'
+type CssRules = 'button' | 'unselected' | 'selected'
const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
- root: {
+ button: {
width: '40px',
height: '40px',
- // padding: '1rem'
- paddingLeft: '-1rem',
- marginLeft: '-0.3rem',
+ paddingLeft: '-2rem',
+ marginLeft: '-0.6rem',
marginBottom: '-1rem'
},
unselected: {
@@ -128,24 +127,22 @@ export const SidePanelCollapsed = withStyles(styles)(
else navTo(cat.navTarget)
}
- const { root, unselected, selected } = classes
+ const { button, unselected, selected } = classes
return (
- <List data-cy="side-panel-collapsed" className={root}>
+ <List data-cy="side-panel-collapsed">
{sidePanelCollapsedCategories.map((cat) => (
<ListItem
key={cat.name}
data-cy={`collapsed-${cat.name.toLowerCase().replace(/\s+/g, '-')}`}
- className={selectedPath === cat.name ? selected : unselected}
onClick={() => handleClick(cat)}
>
<Tooltip
+ className={selectedPath === cat.name ? selected : unselected}
title={cat.name}
disableFocusListener
>
- <IconButton className={root}>
- {cat.icon}
- </IconButton>
+ <IconButton className={button}>{cat.icon}</IconButton>
</Tooltip>
</ListItem>
))}
commit 30e91748f6f3202604f3a19d1aa7ddf02ffd149e
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Wed Nov 15 14:39:42 2023 -0500
19302: side panel tree limited to 50 nodes Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/src/store/side-panel-tree/side-panel-tree-actions.ts b/src/store/side-panel-tree/side-panel-tree-actions.ts
index 45bdd0c8d5..44dfe86938 100644
--- a/src/store/side-panel-tree/side-panel-tree-actions.ts
+++ b/src/store/side-panel-tree/side-panel-tree-actions.ts
@@ -30,7 +30,7 @@ export enum SidePanelTreeCategory {
}
export const SIDE_PANEL_TREE = 'sidePanelTree';
-const SP_TREE_NODE_LIMIT = 50
+const SIDEPANEL_TREE_NODE_LIMIT = 50
export const getSidePanelTree = (treePicker: TreePicker) =>
getTreePicker<ProjectResource | string>(SIDE_PANEL_TREE)(treePicker);
@@ -115,7 +115,8 @@ const loadProject = (projectUuid: string) =>
.getFilters(),
order: new OrderBuilder<ProjectResource>()
.addDesc('createdAt')
- .getOrder()
+ .getOrder(),
+ limit: SIDEPANEL_TREE_NODE_LIMIT,
};
const { items } = await services.projectService.list(params);
@@ -138,7 +139,7 @@ export const loadFavoritesTree = () => async (dispatch: Dispatch, getState: () =
.addEqual('tail_kind', ResourceKind.USER)
.getFilters(),
order: new OrderBuilder<ProjectResource>().addDesc('createdAt').getOrder(),
- limit: SP_TREE_NODE_LIMIT,
+ limit: SIDEPANEL_TREE_NODE_LIMIT,
};
const { items } = await services.linkService.list(params);
@@ -168,7 +169,7 @@ export const loadPublicFavoritesTree = () => async (dispatch: Dispatch, getState
.addIsA('head_uuid', typeFilters)
.getFilters(),
order: new OrderBuilder<ProjectResource>().addDesc('createdAt').getOrder(),
- limit: SP_TREE_NODE_LIMIT,
+ limit: SIDEPANEL_TREE_NODE_LIMIT,
};
const { items } = await services.linkService.list(params);
commit d3bd5784e528b8b99881b293b530b78a23d0a775
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Wed Nov 15 14:31:34 2023 -0500
19302: side panel projects ordered Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/src/store/side-panel-tree/side-panel-tree-actions.ts b/src/store/side-panel-tree/side-panel-tree-actions.ts
index 91c19d4e7f..45bdd0c8d5 100644
--- a/src/store/side-panel-tree/side-panel-tree-actions.ts
+++ b/src/store/side-panel-tree/side-panel-tree-actions.ts
@@ -114,7 +114,7 @@ const loadProject = (projectUuid: string) =>
.addEqual('owner_uuid', projectUuid)
.getFilters(),
order: new OrderBuilder<ProjectResource>()
- .addAsc('name')
+ .addDesc('createdAt')
.getOrder()
};
commit 7d45d61adcaffb47f58031a44f89ff3f9005ce22
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Wed Nov 15 12:33:43 2023 -0500
19302: added hover to sidepanel menu items Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/src/views-components/side-panel-toggle/side-panel-toggle.tsx b/src/views-components/side-panel-toggle/side-panel-toggle.tsx
index 5c3069cd29..47d34216cc 100644
--- a/src/views-components/side-panel-toggle/side-panel-toggle.tsx
+++ b/src/views-components/side-panel-toggle/side-panel-toggle.tsx
@@ -22,6 +22,8 @@ const SidePanelToggle = (props: collapseButtonProps) => {
height: `${COLLAPSE_ICON_SIZE}px`,
marginTop: '0.4rem',
marginLeft: '0.7rem',
+ paddingTop: '1rem',
+ paddingRight: '1rem'
},
icon: {
opacity: '0.5',
@@ -32,7 +34,7 @@ const SidePanelToggle = (props: collapseButtonProps) => {
<IconButton data-cy="side-panel-toggle" style={collapseButtonIconStyles.root} onClick={() => { props.toggleSidePanel(props.isCollapsed) }}>
<div>
{props.isCollapsed ?
- <img style={collapseButtonIconStyles.icon} src='/mui-start-icon.svg' alt='an arrow pointing right'/>
+ <img style={{...collapseButtonIconStyles.icon, marginLeft:'0.25rem'}} src='/mui-start-icon.svg' alt='an arrow pointing right'/>
:
<img style={{ ...collapseButtonIconStyles.icon, transform: "rotate(180deg)"}} src='/mui-start-icon.svg' alt='an arrow pointing right'/>}
</div>
diff --git a/src/views-components/side-panel/side-panel-collapsed.tsx b/src/views-components/side-panel/side-panel-collapsed.tsx
index 74dfee6502..0f43fb7142 100644
--- a/src/views-components/side-panel/side-panel-collapsed.tsx
+++ b/src/views-components/side-panel/side-panel-collapsed.tsx
@@ -6,7 +6,7 @@ import React, { ReactElement } from 'react'
import { connect } from 'react-redux'
import { ProjectsIcon, ProcessIcon, FavoriteIcon, ShareMeIcon, TrashIcon, PublicFavoriteIcon, GroupsIcon } from 'components/icon/icon'
import { TerminalIcon } from 'components/icon/icon'
-import { List, ListItem, Tooltip } from '@material-ui/core'
+import { IconButton, List, ListItem, Tooltip } from '@material-ui/core'
import { StyleRulesCallback, WithStyles, withStyles } from '@material-ui/core/styles'
import { ArvadosTheme } from 'common/custom-theme'
import { navigateTo } from 'store/navigation/navigation-action'
@@ -26,7 +26,14 @@ import { RouterAction } from 'react-router-redux'
type CssRules = 'root' | 'unselected' | 'selected'
const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
- root: {},
+ root: {
+ width: '40px',
+ height: '40px',
+ // padding: '1rem'
+ paddingLeft: '-1rem',
+ marginLeft: '-0.3rem',
+ marginBottom: '-1rem'
+ },
unselected: {
color: theme.customs.colors.grey600,
},
@@ -85,7 +92,7 @@ const sidePanelCollapsedCategories: TCollapsedCategory[] = [
},
{
name: SidePanelCollapsedCategory.GROUPS,
- icon: <GroupsIcon style={{marginLeft: '3px'}}/>,
+ icon: <GroupsIcon style={{marginLeft: '2px', scale: '85%'}}/>,
navTarget: navigateToGroups,
},
{
@@ -125,17 +132,20 @@ export const SidePanelCollapsed = withStyles(styles)(
return (
<List data-cy="side-panel-collapsed" className={root}>
{sidePanelCollapsedCategories.map((cat) => (
+
<ListItem
key={cat.name}
data-cy={`collapsed-${cat.name.toLowerCase().replace(/\s+/g, '-')}`}
className={selectedPath === cat.name ? selected : unselected}
onClick={() => handleClick(cat)}
- >
+ >
<Tooltip
title={cat.name}
disableFocusListener
- >
+ >
+ <IconButton className={root}>
{cat.icon}
+ </IconButton>
</Tooltip>
</ListItem>
))}
commit dcf2e835b33e926073dad1f636cf92a95493ca0b
Author: Stephen Smith <stephen at curii.com>
Date: Tue Nov 14 09:07:08 2023 -0500
20609: Change subprocess progress bar to combine relevant process statuses
eg. Queued segment = Queued + OnHold, Failed segment = Failed + Cancelled
Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen at curii.com>
diff --git a/src/components/subprocess-progress-bar/subprocess-progress-bar.test.tsx b/src/components/subprocess-progress-bar/subprocess-progress-bar.test.tsx
index 8373717832..bd8603f9c2 100644
--- a/src/components/subprocess-progress-bar/subprocess-progress-bar.test.tsx
+++ b/src/components/subprocess-progress-bar/subprocess-progress-bar.test.tsx
@@ -73,8 +73,14 @@ describe("<SubprocessProgressBar />", () => {
statusResponse = {
[ProcessStatusFilter.COMPLETED]: 100,
[ProcessStatusFilter.RUNNING]: 200,
- [ProcessStatusFilter.FAILED]: 300,
- [ProcessStatusFilter.QUEUED]: 400,
+
+ // Combined into failed segment
+ [ProcessStatusFilter.FAILED]: 200,
+ [ProcessStatusFilter.CANCELLED]: 100,
+
+ // Combined into queued segment
+ [ProcessStatusFilter.QUEUED]: 300,
+ [ProcessStatusFilter.ONHOLD]: 100,
};
services.containerRequestService.list = createMockListFunc(process.containerRequest.containerUuid);
@@ -88,12 +94,14 @@ describe("<SubprocessProgressBar />", () => {
});
await progressBar.update();
- // expects 4 subprocess status list requests
+ // expects 6 subprocess status list requests
const expectedFilters = [
ProcessStatusFilter.COMPLETED,
ProcessStatusFilter.RUNNING,
ProcessStatusFilter.FAILED,
+ ProcessStatusFilter.CANCELLED,
ProcessStatusFilter.QUEUED,
+ ProcessStatusFilter.ONHOLD,
].map((state) =>
buildProcessStatusFilters(
new FilterBuilder().addEqual(
@@ -128,8 +136,12 @@ describe("<SubprocessProgressBar />", () => {
statusResponse = {
[ProcessStatusFilter.COMPLETED]: 50,
[ProcessStatusFilter.RUNNING]: 55,
- [ProcessStatusFilter.FAILED]: 60,
- [ProcessStatusFilter.QUEUED]: 335,
+
+ [ProcessStatusFilter.FAILED]: 30,
+ [ProcessStatusFilter.CANCELLED]: 30,
+
+ [ProcessStatusFilter.QUEUED]: 235,
+ [ProcessStatusFilter.ONHOLD]: 100,
};
services.containerRequestService.list = createMockListFunc(process.containerRequest.containerUuid);
diff --git a/src/store/subprocess-panel/subprocess-panel-actions.ts b/src/store/subprocess-panel/subprocess-panel-actions.ts
index 68ed453f1a..a67dd1f436 100644
--- a/src/store/subprocess-panel/subprocess-panel-actions.ts
+++ b/src/store/subprocess-panel/subprocess-panel-actions.ts
@@ -18,11 +18,35 @@ export const loadSubprocessPanel = () =>
dispatch(subprocessPanelActions.REQUEST_ITEMS());
};
-type ProcessStatusCount = {
+/**
+ * Holds a ProgressBarData status type and process count result
+ */
+type ProcessStatusBarCount = {
status: keyof ProgressBarData;
count: number;
};
+/**
+ * Associates each of the limited progress bar segment types with an array of
+ * ProcessStatusFilterTypes to be combined when displayed
+ */
+type ProcessStatusMap = Record<keyof ProgressBarData, ProcessStatusFilter[]>;
+
+const statusMap: ProcessStatusMap = {
+ [ProcessStatusFilter.COMPLETED]: [ProcessStatusFilter.COMPLETED],
+ [ProcessStatusFilter.RUNNING]: [ProcessStatusFilter.RUNNING],
+ [ProcessStatusFilter.FAILED]: [ProcessStatusFilter.FAILED, ProcessStatusFilter.CANCELLED],
+ [ProcessStatusFilter.QUEUED]: [ProcessStatusFilter.QUEUED, ProcessStatusFilter.ONHOLD],
+};
+
+/**
+ * Utility type to hold a pair of associated progress bar status and process status
+ */
+type ProgressBarStatusPair = {
+ barStatus: keyof ProcessStatusMap;
+ processStatus: ProcessStatusFilter;
+};
+
export const fetchSubprocessProgress = (requestingContainerUuid: string) =>
async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository): Promise<ProgressBarData | undefined> => {
@@ -48,15 +72,20 @@ export const fetchSubprocessProgress = (requestingContainerUuid: string) =>
// Create array of promises that returns the status associated with the item count
// Helps to make the requests simultaneously while preserving the association with the status key as a typed key
- const promises = Object.keys(result).map(async (status: keyof ProgressBarData): Promise<ProcessStatusCount> => {
- const filter = buildProcessStatusFilters(new FilterBuilder(baseFilter), status);
- const count = (await requestContainerStatusCount(filter)).itemsAvailable;
- return {status, count};
- });
+ const promises = (Object.keys(statusMap) as Array<keyof ProcessStatusMap>)
+ // Split statusMap into pairs of progress bar status and process status
+ .reduce((acc, curr) => [...acc, ...statusMap[curr].map(processStatus => ({barStatus: curr, processStatus}))], [] as ProgressBarStatusPair[])
+ .map(async (statusPair: ProgressBarStatusPair): Promise<ProcessStatusBarCount> => {
+ // For each status pair, request count and return bar status and count
+ const { barStatus, processStatus } = statusPair;
+ const filter = buildProcessStatusFilters(new FilterBuilder(baseFilter), processStatus);
+ const count = (await requestContainerStatusCount(filter)).itemsAvailable;
+ return {status: barStatus, count};
+ });
// Simultaneously requests each status count and apply them to the return object
(await Promise.all(promises)).forEach((singleResult) => {
- result[singleResult.status] = singleResult.count;
+ result[singleResult.status] += singleResult.count;
});
return result;
} catch (e) {
commit 356d030ba429f793d4dd5d9997395cb0a7125514
Author: Stephen Smith <stephen at curii.com>
Date: Mon Nov 13 10:42:44 2023 -0500
20609: Move subprocess progress bar between title and headermenu
Also make multi select toolbar show up in header or below header depending on
whether there is a panel title / progress bar
Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen at curii.com>
diff --git a/src/components/data-explorer/data-explorer.tsx b/src/components/data-explorer/data-explorer.tsx
index 7657ae042b..8f5661929b 100644
--- a/src/components/data-explorer/data-explorer.tsx
+++ b/src/components/data-explorer/data-explorer.tsx
@@ -17,15 +17,20 @@ import { CloseIcon, IconType, MaximizeIcon, UnMaximizeIcon, MoreVerticalIcon } f
import { PaperProps } from "@material-ui/core/Paper";
import { MPVPanelProps } from "components/multi-panel-view/multi-panel-view";
-type CssRules = "searchBox" | "headerMenu" | "toolbar" | "footer" | "root" | "moreOptionsButton" | "title" | "dataTable" | "container";
+type CssRules = "titleWrapper" | "searchBox" | "headerMenu" | "toolbar" | "footer" | "root" | "moreOptionsButton" | "title" | "dataTable" | "container";
const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
+ titleWrapper: {
+ display: "flex",
+ justifyContent: "space-between",
+ },
searchBox: {
paddingBottom: 0,
},
toolbar: {
paddingTop: 0,
paddingRight: theme.spacing.unit,
+ paddingLeft: "10px",
},
footer: {
overflow: "auto",
@@ -41,6 +46,8 @@ const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
paddingLeft: theme.spacing.unit * 2,
paddingTop: theme.spacing.unit * 2,
fontSize: "18px",
+ flexGrow: 0,
+ paddingRight: "10px",
},
dataTable: {
height: "100%",
@@ -50,11 +57,9 @@ const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
height: "100%",
},
headerMenu: {
- width: "100%",
- float: "right",
- display: "flex",
- flexDirection: "row-reverse",
- justifyContent: "space-between",
+ marginLeft: "auto",
+ flexBasis: "initial",
+ flexGrow: 0,
},
});
@@ -79,7 +84,7 @@ interface DataExplorerDataProps<T> {
actions?: React.ReactNode;
hideSearchInput?: boolean;
title?: React.ReactNode;
- toolbar?: React.ReactNode;
+ progressBar?: React.ReactNode;
paperKey?: string;
currentItemUuid: string;
elementPath?: string;
@@ -114,6 +119,8 @@ export const DataExplorer = withStyles(styles)(
prevRoute: "",
};
+ multiSelectToolbarInTitle = !this.props.title && !this.props.progressBar;
+
componentDidUpdate(prevProps: DataExplorerProps<T>) {
const currentRefresh = this.props.currentRefresh || "";
const currentRoute = this.props.currentRoute || "";
@@ -182,7 +189,7 @@ export const DataExplorer = withStyles(styles)(
fetchMode,
currentItemUuid,
title,
- toolbar,
+ progressBar,
doHidePanel,
doMaximizePanel,
doUnMaximizePanel,
@@ -206,7 +213,7 @@ export const DataExplorer = withStyles(styles)(
wrap="nowrap"
className={classes.container}
>
- <div>
+ <div className={classes.titleWrapper}>
{title && (
<Grid
item
@@ -216,6 +223,8 @@ export const DataExplorer = withStyles(styles)(
{title}
</Grid>
)}
+ {!!progressBar && progressBar}
+ {this.multiSelectToolbarInTitle && <MultiselectToolbar />}
{(!hideColumnSelector || !hideSearchInput || !!actions) && (
<Grid
className={classes.headerMenu}
@@ -223,25 +232,27 @@ export const DataExplorer = withStyles(styles)(
xs
>
<Toolbar className={classes.toolbar}>
- {!hideSearchInput && (
- <div className={classes.searchBox}>
- {!hideSearchInput && (
- <SearchInput
- label={searchLabel}
- value={searchValue}
- selfClearProp={""}
- onSearch={onSearch}
- />
- )}
- </div>
- )}
- {actions}
- {!hideColumnSelector && (
- <ColumnSelector
- columns={columns}
- onColumnToggle={onColumnToggle}
- />
- )}
+ <Grid container justify="space-between" wrap="nowrap" alignItems="center">
+ {!hideSearchInput && (
+ <div className={classes.searchBox}>
+ {!hideSearchInput && (
+ <SearchInput
+ label={searchLabel}
+ value={searchValue}
+ selfClearProp={""}
+ onSearch={onSearch}
+ />
+ )}
+ </div>
+ )}
+ {actions}
+ {!hideColumnSelector && (
+ <ColumnSelector
+ columns={columns}
+ onColumnToggle={onColumnToggle}
+ />
+ )}
+ </Grid>
{doUnMaximizePanel && panelMaximized && (
<Tooltip
title={`Unmaximize ${panelName || "panel"}`}
@@ -276,11 +287,10 @@ export const DataExplorer = withStyles(styles)(
</Tooltip>
)}
</Toolbar>
- <MultiselectToolbar />
</Grid>
)}
- {toolbar && (toolbar)}
</div>
+ {!this.multiSelectToolbarInTitle && <MultiselectToolbar />}
<Grid
item
xs="auto"
diff --git a/src/components/multiselect-toolbar/MultiselectToolbar.tsx b/src/components/multiselect-toolbar/MultiselectToolbar.tsx
index 3d8ae0c3d3..4eff8885fc 100644
--- a/src/components/multiselect-toolbar/MultiselectToolbar.tsx
+++ b/src/components/multiselect-toolbar/MultiselectToolbar.tsx
@@ -26,6 +26,7 @@ type CssRules = "root" | "button";
const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
root: {
display: "flex",
+ flexShrink: 0,
flexDirection: "row",
width: 0,
padding: 0,
diff --git a/src/components/subprocess-progress-bar/subprocess-progress-bar.tsx b/src/components/subprocess-progress-bar/subprocess-progress-bar.tsx
index 1d467eea65..07178e79fd 100644
--- a/src/components/subprocess-progress-bar/subprocess-progress-bar.tsx
+++ b/src/components/subprocess-progress-bar/subprocess-progress-bar.tsx
@@ -3,7 +3,7 @@
// SPDX-License-Identifier: AGPL-3.0
import React, { useEffect, useState } from "react";
-import { StyleRulesCallback, Typography, WithStyles, withStyles } from "@material-ui/core";
+import { StyleRulesCallback, Tooltip, WithStyles, withStyles } from "@material-ui/core";
import { CProgressStacked, CProgress } from '@coreui/react';
import { useAsyncInterval } from "common/use-async-interval";
import { Process, isProcessRunning } from "store/processes/process";
@@ -16,10 +16,13 @@ type CssRules = 'progressWrapper' | 'progressStacked' ;
const styles: StyleRulesCallback<CssRules> = (theme) => ({
progressWrapper: {
- margin: "0 20px",
+ margin: "25px 0 0",
+ flexGrow: 1,
+ flexBasis: "100px",
},
progressStacked: {
border: "1px solid gray",
+ height: "10px",
// Override stripe color to be close to white
"& .progress-bar-striped": {
backgroundImage:
@@ -71,18 +74,23 @@ export const SubprocessProgressBar = connect(null, mapDispatchToProps)(withStyle
return progressData !== undefined && getStatusTotal(progressData) > 0 ? <div className={classes.progressWrapper}>
<CProgressStacked className={classes.progressStacked}>
- <CProgress height={20} color="success" title="Completed"
- value={getStatusPercent(progressData, ProcessStatusFilter.COMPLETED)} />
- <CProgress height={20} color="success" title="Running" variant="striped" animated
- value={getStatusPercent(progressData, ProcessStatusFilter.RUNNING)} />
- <CProgress height={20} color="danger" title="Failed"
- value={getStatusPercent(progressData, ProcessStatusFilter.FAILED)} />
- <CProgress height={20} color="secondary" title="Queued" variant="striped" animated
- value={getStatusPercent(progressData, ProcessStatusFilter.QUEUED)} />
+ <Tooltip title={`${progressData[ProcessStatusFilter.COMPLETED]} Completed`}>
+ <CProgress height={10} color="success"
+ value={getStatusPercent(progressData, ProcessStatusFilter.COMPLETED)} />
+ </Tooltip>
+ <Tooltip title={`${progressData[ProcessStatusFilter.RUNNING]} Running`}>
+ <CProgress height={10} color="success" variant="striped"
+ value={getStatusPercent(progressData, ProcessStatusFilter.RUNNING)} />
+ </Tooltip>
+ <Tooltip title={`${progressData[ProcessStatusFilter.FAILED]} Failed`}>
+ <CProgress height={10} color="danger"
+ value={getStatusPercent(progressData, ProcessStatusFilter.FAILED)} />
+ </Tooltip>
+ <Tooltip title={`${progressData[ProcessStatusFilter.QUEUED]} Queued`}>
+ <CProgress height={10} color="secondary" variant="striped"
+ value={getStatusPercent(progressData, ProcessStatusFilter.QUEUED)} />
+ </Tooltip>
</CProgressStacked>
- <Typography variant="body2">
- {progressData[ProcessStatusFilter.COMPLETED]} Completed, {progressData[ProcessStatusFilter.RUNNING]} Running, {progressData[ProcessStatusFilter.FAILED]} Failed, {progressData[ProcessStatusFilter.QUEUED]} Queued
- </Typography>
</div> : <></>;
}
));
diff --git a/src/views/subprocess-panel/subprocess-panel-root.tsx b/src/views/subprocess-panel/subprocess-panel-root.tsx
index 33a1027585..dd5229bb35 100644
--- a/src/views/subprocess-panel/subprocess-panel-root.tsx
+++ b/src/views/subprocess-panel/subprocess-panel-root.tsx
@@ -126,5 +126,5 @@ export const SubprocessPanelRoot = (props: SubprocessPanelProps & MPVPanelProps)
panelMaximized={props.panelMaximized}
panelName={props.panelName}
title={<SubProcessesTitle/>}
- toolbar={<SubprocessProgressBar process={props.process} />} />;
+ progressBar={<SubprocessProgressBar process={props.process} />} />;
};
commit 2a0558ceed0332333908344cd1274d2827716d87
Merge: 8530de1010 e14e00a5fb
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Thu Nov 9 11:56:58 2023 -0500
Merge branch 'main' into 19302-left-side-panel-changes
refs #19302
Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
commit 8530de10102e931fca7adf3eae39ca562ffea5ec
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Thu Nov 9 11:30:51 2023 -0500
19302: removed .only from test spec Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/cypress/integration/side-panel.spec.js b/cypress/integration/side-panel.spec.js
index 84649f45ff..d6ac754d0a 100644
--- a/cypress/integration/side-panel.spec.js
+++ b/cypress/integration/side-panel.spec.js
@@ -148,7 +148,7 @@ describe('Side panel tests', function() {
cy.get('[data-cy=side-panel-collapsed]').should('not.exist')
})
- it.only('can navigate from collapsed panel', () => {
+ it('can navigate from collapsed panel', () => {
const collapsedCategories = {
'shared-with-me': '/shared-with-me',
commit 6c351b29d205b54fd86b62cf4e39d06b0d2a6dcd
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Thu Nov 9 11:25:31 2023 -0500
19302: updated int test Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/cypress/integration/side-panel.spec.js b/cypress/integration/side-panel.spec.js
index af2712e268..84649f45ff 100644
--- a/cypress/integration/side-panel.spec.js
+++ b/cypress/integration/side-panel.spec.js
@@ -148,7 +148,7 @@ describe('Side panel tests', function() {
cy.get('[data-cy=side-panel-collapsed]').should('not.exist')
})
- it('can navigate from collapsed panel', () => {
+ it.only('can navigate from collapsed panel', () => {
const collapsedCategories = {
'shared-with-me': '/shared-with-me',
@@ -157,6 +157,7 @@ describe('Side panel tests', function() {
'groups': '/groups',
'all-processes': '/all_processes',
'trash': '/trash',
+ 'shell-access': '/virtual-machines-user',
'home-projects': `/projects/${activeUser.user.uuid}`,
}
commit 4d3c5f5861ea4c1d5e8491517806651cdfeab57f
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Thu Nov 9 11:12:01 2023 -0500
19302: tree nav to virtual machines works Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/src/store/navigation/navigation-action.ts b/src/store/navigation/navigation-action.ts
index 61720b56ab..55112fb0ae 100644
--- a/src/store/navigation/navigation-action.ts
+++ b/src/store/navigation/navigation-action.ts
@@ -69,6 +69,9 @@ export const navigateTo = (uuid: string) => async (dispatch: Dispatch, getState:
case SidePanelTreeCategory.ALL_PROCESSES:
dispatch(navigateToAllProcesses);
return;
+ case SidePanelTreeCategory.SHELL_ACCESS:
+ dispatch(navigateToUserVirtualMachines)
+ return;
case USERS_PANEL_LABEL:
dispatch(navigateToUsers);
return;
diff --git a/src/store/side-panel-tree/side-panel-tree-actions.ts b/src/store/side-panel-tree/side-panel-tree-actions.ts
index 0abea951bf..91c19d4e7f 100644
--- a/src/store/side-panel-tree/side-panel-tree-actions.ts
+++ b/src/store/side-panel-tree/side-panel-tree-actions.ts
@@ -24,7 +24,7 @@ export enum SidePanelTreeCategory {
PUBLIC_FAVORITES = 'Public Favorites',
SHARED_WITH_ME = 'Shared with me',
ALL_PROCESSES = 'All Processes',
- SHELL_ACCESS = 'Shell access',
+ SHELL_ACCESS = 'Shell Access',
GROUPS = 'Groups',
TRASH = 'Trash',
}
@@ -188,9 +188,9 @@ export const activateSidePanelTreeItem = (id: string) =>
async (dispatch: Dispatch, getState: () => RootState) => {
const node = getSidePanelTreeNode(id)(getState().treePicker);
if (node && !node.active) {
- dispatch(treePickerActions.ACTIVATE_TREE_PICKER_NODE({ id, pickerId: SIDE_PANEL_TREE }));
- }
- if (!isSidePanelTreeCategory(id)) {
+ dispatch(treePickerActions.ACTIVATE_TREE_PICKER_NODE({ id, pickerId: SIDE_PANEL_TREE }));
+ }
+ if (!isSidePanelTreeCategory(id)) {
await dispatch<any>(activateSidePanelTreeProject(id));
}
};
commit 21be228d6b3f99b6c27b2a2a0fd1cc9c46ce6cfb
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Thu Nov 9 10:29:36 2023 -0500
19302: fixed collapsed highlight Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/src/views-components/side-panel/side-panel-collapsed.tsx b/src/views-components/side-panel/side-panel-collapsed.tsx
index 9108e6200c..74dfee6502 100644
--- a/src/views-components/side-panel/side-panel-collapsed.tsx
+++ b/src/views-components/side-panel/side-panel-collapsed.tsx
@@ -20,7 +20,6 @@ import {
navigateToAllProcesses,
navigateToTrash,
} from 'store/navigation/navigation-action'
-import { openUserVirtualMachines } from 'store/virtual-machines/virtual-machines-actions'
import { navigateToUserVirtualMachines } from 'store/navigation/navigation-action'
import { RouterAction } from 'react-router-redux'
@@ -97,10 +96,14 @@ const sidePanelCollapsedCategories: TCollapsedCategory[] = [
]
const mapStateToProps = ({auth, properties }: RootState) => {
- return {
- user: auth.user,
- selectedPath: properties.breadcrumbs ? properties.breadcrumbs[0].label : SidePanelCollapsedCategory.PROJECTS,
- }
+ return {
+ user: auth.user,
+ selectedPath: properties.breadcrumbs
+ ? properties.breadcrumbs[0].label !== 'Virtual Machines'
+ ? properties.breadcrumbs[0].label
+ : SidePanelCollapsedCategory.SHELL_ACCESS
+ : SidePanelCollapsedCategory.PROJECTS,
+ }
}
const mapDispatchToProps = (dispatch: Dispatch) => {
commit 9a3525e1e4561393a4fb42c6e02f4f6b6d074954
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Thu Nov 9 10:05:10 2023 -0500
19302: shell access in side tree Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/src/store/side-panel-tree/side-panel-tree-actions.ts b/src/store/side-panel-tree/side-panel-tree-actions.ts
index 95f4ce2d68..0abea951bf 100644
--- a/src/store/side-panel-tree/side-panel-tree-actions.ts
+++ b/src/store/side-panel-tree/side-panel-tree-actions.ts
@@ -20,12 +20,13 @@ import { LinkClass } from 'models/link';
export enum SidePanelTreeCategory {
PROJECTS = 'Home Projects',
- SHARED_WITH_ME = 'Shared with me',
- PUBLIC_FAVORITES = 'Public Favorites',
FAVORITES = 'My Favorites',
- TRASH = 'Trash',
+ PUBLIC_FAVORITES = 'Public Favorites',
+ SHARED_WITH_ME = 'Shared with me',
ALL_PROCESSES = 'All Processes',
+ SHELL_ACCESS = 'Shell access',
GROUPS = 'Groups',
+ TRASH = 'Trash',
}
export const SIDE_PANEL_TREE = 'sidePanelTree';
@@ -52,6 +53,7 @@ let SIDE_PANEL_CATEGORIES: string[] = [
SidePanelTreeCategory.PUBLIC_FAVORITES,
SidePanelTreeCategory.SHARED_WITH_ME,
SidePanelTreeCategory.ALL_PROCESSES,
+ SidePanelTreeCategory.SHELL_ACCESS,
SidePanelTreeCategory.GROUPS,
SidePanelTreeCategory.TRASH
];
diff --git a/src/views-components/side-panel-tree/side-panel-tree.tsx b/src/views-components/side-panel-tree/side-panel-tree.tsx
index 0943fe1dc8..19ab3184af 100644
--- a/src/views-components/side-panel-tree/side-panel-tree.tsx
+++ b/src/views-components/side-panel-tree/side-panel-tree.tsx
@@ -9,7 +9,7 @@ import { TreePicker, TreePickerProps } from "../tree-picker/tree-picker";
import { TreeItem } from "components/tree/tree";
import { ProjectResource } from "models/project";
import { ListItemTextIcon } from "components/list-item-text-icon/list-item-text-icon";
-import { ProcessIcon, ProjectIcon, FilterGroupIcon, FavoriteIcon, ProjectsIcon, ShareMeIcon, TrashIcon, PublicFavoriteIcon, GroupsIcon } from 'components/icon/icon';
+import { ProcessIcon, ProjectIcon, FilterGroupIcon, FavoriteIcon, ProjectsIcon, ShareMeIcon, TrashIcon, PublicFavoriteIcon, GroupsIcon, TerminalIcon } from 'components/icon/icon';
import { activateSidePanelTreeItem, toggleSidePanelTreeItemCollapse, SIDE_PANEL_TREE, SidePanelTreeCategory } from 'store/side-panel-tree/side-panel-tree-actions';
import { openSidePanelContextMenu } from 'store/context-menu/context-menu-actions';
import { noop } from 'lodash';
@@ -82,6 +82,8 @@ export const getSidePanelIcon = (category: string) => {
return ProcessIcon;
case SidePanelTreeCategory.GROUPS:
return GroupsIcon;
+ case SidePanelTreeCategory.SHELL_ACCESS:
+ return TerminalIcon
default:
return ProjectIcon;
}
diff --git a/src/views-components/side-panel/side-panel-collapsed.tsx b/src/views-components/side-panel/side-panel-collapsed.tsx
index 3dc1208323..9108e6200c 100644
--- a/src/views-components/side-panel/side-panel-collapsed.tsx
+++ b/src/views-components/side-panel/side-panel-collapsed.tsx
@@ -42,7 +42,7 @@ enum SidePanelCollapsedCategory {
PUBLIC_FAVORITES = 'Public Favorites',
SHARED_WITH_ME = 'Shared with me',
ALL_PROCESSES = 'All Processes',
- SHELL_ACCESS = 'Shell access',
+ SHELL_ACCESS = 'Shell Access',
GROUPS = 'Groups',
TRASH = 'Trash',
}
commit b5311e4a8420181d6ad1e0380f0cd9959c96faec
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Thu Nov 9 09:43:56 2023 -0500
19302: styling Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/src/views-components/side-panel/side-panel-collapsed.tsx b/src/views-components/side-panel/side-panel-collapsed.tsx
index f1e929e736..3dc1208323 100644
--- a/src/views-components/side-panel/side-panel-collapsed.tsx
+++ b/src/views-components/side-panel/side-panel-collapsed.tsx
@@ -20,6 +20,8 @@ import {
navigateToAllProcesses,
navigateToTrash,
} from 'store/navigation/navigation-action'
+import { openUserVirtualMachines } from 'store/virtual-machines/virtual-machines-actions'
+import { navigateToUserVirtualMachines } from 'store/navigation/navigation-action'
import { RouterAction } from 'react-router-redux'
type CssRules = 'root' | 'unselected' | 'selected'
@@ -27,7 +29,7 @@ type CssRules = 'root' | 'unselected' | 'selected'
const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
root: {},
unselected: {
- color: theme.customs.colors.grey700,
+ color: theme.customs.colors.grey600,
},
selected: {
color: theme.palette.primary.main,
@@ -80,16 +82,16 @@ const sidePanelCollapsedCategories: TCollapsedCategory[] = [
{
name: SidePanelCollapsedCategory.SHELL_ACCESS,
icon: <TerminalIcon />,
- navTarget: navigateToGroups,
+ navTarget: navigateToUserVirtualMachines,
},
{
name: SidePanelCollapsedCategory.GROUPS,
- icon: <GroupsIcon />,
+ icon: <GroupsIcon style={{marginLeft: '3px'}}/>,
navTarget: navigateToGroups,
},
{
name: SidePanelCollapsedCategory.TRASH,
- icon: <TrashIcon style={{marginLeft: '-2px'}} />,
+ icon: <TrashIcon />,
navTarget: navigateToTrash,
},
]
commit f5fd828741edeebb7c4d3449f474c3606b3912d4
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Thu Nov 9 09:24:14 2023 -0500
19302: added shellaccess icon to collpased panel Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/src/components/icon/icon.tsx b/src/components/icon/icon.tsx
index 5f3f4e659b..998cd8059a 100644
--- a/src/components/icon/icon.tsx
+++ b/src/components/icon/icon.tsx
@@ -164,6 +164,13 @@ export const CheckboxMultipleBlankOutline: IconType = (props: any) => (
</SvgIcon>
);
+//https://pictogrammers.com/library/mdi/icon/console/
+export const TerminalIcon: IconType = (props: any) => (
+ <SvgIcon {...props}>
+ <path d="M20,19V7H4V19H20M20,3A2,2 0 0,1 22,5V19A2,2 0 0,1 20,21H4A2,2 0 0,1 2,19V5C2,3.89 2.9,3 4,3H20M13,17V15H18V17H13M9.58,13L5.57,9H8.4L11.7,12.3C12.09,12.69 12.09,13.33 11.7,13.72L8.42,17H5.59L9.58,13Z" />
+ </SvgIcon>
+)
+
export type IconType = React.SFC<{ className?: string; style?: object }>;
export const AddIcon: IconType = props => <Add {...props} />;
diff --git a/src/views-components/side-panel/side-panel-collapsed.tsx b/src/views-components/side-panel/side-panel-collapsed.tsx
index 2c66630a61..f1e929e736 100644
--- a/src/views-components/side-panel/side-panel-collapsed.tsx
+++ b/src/views-components/side-panel/side-panel-collapsed.tsx
@@ -5,6 +5,7 @@
import React, { ReactElement } from 'react'
import { connect } from 'react-redux'
import { ProjectsIcon, ProcessIcon, FavoriteIcon, ShareMeIcon, TrashIcon, PublicFavoriteIcon, GroupsIcon } from 'components/icon/icon'
+import { TerminalIcon } from 'components/icon/icon'
import { List, ListItem, Tooltip } from '@material-ui/core'
import { StyleRulesCallback, WithStyles, withStyles } from '@material-ui/core/styles'
import { ArvadosTheme } from 'common/custom-theme'
@@ -39,6 +40,7 @@ enum SidePanelCollapsedCategory {
PUBLIC_FAVORITES = 'Public Favorites',
SHARED_WITH_ME = 'Shared with me',
ALL_PROCESSES = 'All Processes',
+ SHELL_ACCESS = 'Shell access',
GROUPS = 'Groups',
TRASH = 'Trash',
}
@@ -75,6 +77,11 @@ const sidePanelCollapsedCategories: TCollapsedCategory[] = [
icon: <ProcessIcon />,
navTarget: navigateToAllProcesses,
},
+ {
+ name: SidePanelCollapsedCategory.SHELL_ACCESS,
+ icon: <TerminalIcon />,
+ navTarget: navigateToGroups,
+ },
{
name: SidePanelCollapsedCategory.GROUPS,
icon: <GroupsIcon />,
@@ -82,7 +89,7 @@ const sidePanelCollapsedCategories: TCollapsedCategory[] = [
},
{
name: SidePanelCollapsedCategory.TRASH,
- icon: <TrashIcon />,
+ icon: <TrashIcon style={{marginLeft: '-2px'}} />,
navTarget: navigateToTrash,
},
]
commit 6c9138600a27ea2980ac455e9b62ac7b7c1e64b8
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Wed Nov 8 14:39:22 2023 -0500
19302: linkified Owner name on sharedwithme panel Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/src/views-components/data-explorer/renderers.tsx b/src/views-components/data-explorer/renderers.tsx
index 257eacfb29..2cbf038abb 100644
--- a/src/views-components/data-explorer/renderers.tsx
+++ b/src/views-components/data-explorer/renderers.tsx
@@ -914,6 +914,30 @@ const _resourceWithName = withStyles(
);
});
+const _resourceWithNameLink = withStyles(
+ {},
+ { withTheme: true }
+)((props: { uuid: string; userFullname: string; dispatch: Dispatch; theme: ArvadosTheme }) => {
+ const { uuid, userFullname, dispatch, theme } = props;
+ if (!userFullname) {
+ dispatch<any>(loadResource(uuid, false));
+ }
+
+ return (
+ <Typography
+ style={{ color: theme.palette.primary.main, cursor: 'pointer' }}
+ inline
+ noWrap
+ onClick={() => dispatch<any>(navigateTo(uuid))}
+ >
+ {userFullname ? userFullname : uuid}
+ </Typography>
+ )
+});
+
+
+export const ResourceOwnerWithNameLink = ownerFromResourceId(_resourceWithNameLink);
+
export const ResourceOwnerWithName = ownerFromResourceId(_resourceWithName);
export const ResourceWithName = userFromID(_resourceWithName);
diff --git a/src/views/shared-with-me-panel/shared-with-me-panel.tsx b/src/views/shared-with-me-panel/shared-with-me-panel.tsx
index 929ec6b582..250447ea95 100644
--- a/src/views/shared-with-me-panel/shared-with-me-panel.tsx
+++ b/src/views/shared-with-me-panel/shared-with-me-panel.tsx
@@ -10,7 +10,7 @@ import { RootState } from 'store/store';
import { ArvadosTheme } from 'common/custom-theme';
import { ShareMeIcon } from 'components/icon/icon';
import { ResourcesState, getResource } from 'store/resources/resources';
-import { ResourceKind, Resource } from 'models/resource';
+import { ResourceKind } from 'models/resource';
import { navigateTo } from "store/navigation/navigation-action";
import { loadDetailsPanel } from "store/details-panel/details-panel-action";
import { SHARED_WITH_ME_PANEL_ID } from 'store/shared-with-me-panel/shared-with-me-panel-actions';
@@ -22,7 +22,7 @@ import {
ResourceName,
ProcessStatus as ResourceStatus,
ResourceType,
- ResourceOwnerWithName,
+ ResourceOwnerWithNameLink,
ResourcePortableDataHash,
ResourceFileSize,
ResourceFileCount,
@@ -118,7 +118,7 @@ export const sharedWithMePanelColumns: DataColumns<string, ProjectResource> = [
selected: true,
configurable: true,
filters: createTree(),
- render: (uuid) => <ResourceOwnerWithName uuid={uuid} />,
+ render: (uuid) => <ResourceOwnerWithNameLink uuid={uuid} />,
},
{
name: SharedWithMePanelColumnNames.PORTABLE_DATA_HASH,
commit bc46a0bb4a5e0fe799c39e6570c2b2c186452037
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Wed Nov 8 11:06:06 2023 -0500
19302: cleanup Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/src/views/shared-with-me-panel/shared-with-me-panel.tsx b/src/views/shared-with-me-panel/shared-with-me-panel.tsx
index 7bb171daf7..929ec6b582 100644
--- a/src/views/shared-with-me-panel/shared-with-me-panel.tsx
+++ b/src/views/shared-with-me-panel/shared-with-me-panel.tsx
@@ -63,7 +63,7 @@ const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
},
});
-export enum ProjectPanelColumnNames {
+export enum SharedWithMePanelColumnNames {
NAME = 'Name',
STATUS = 'Status',
TYPE = 'Type',
@@ -91,7 +91,7 @@ export interface ProjectPanelFilter extends DataTableFilterItem {
export const sharedWithMePanelColumns: DataColumns<string, ProjectResource> = [
{
- name: ProjectPanelColumnNames.NAME,
+ name: SharedWithMePanelColumnNames.NAME,
selected: true,
configurable: true,
sort: { direction: SortDirection.NONE, field: 'name' },
@@ -99,7 +99,7 @@ export const sharedWithMePanelColumns: DataColumns<string, ProjectResource> = [
render: (uuid) => <ResourceName uuid={uuid} />,
},
{
- name: ProjectPanelColumnNames.STATUS,
+ name: SharedWithMePanelColumnNames.STATUS,
selected: true,
configurable: true,
mutuallyExclusiveFilters: true,
@@ -107,98 +107,98 @@ export const sharedWithMePanelColumns: DataColumns<string, ProjectResource> = [
render: (uuid) => <ResourceStatus uuid={uuid} />,
},
{
- name: ProjectPanelColumnNames.TYPE,
+ name: SharedWithMePanelColumnNames.TYPE,
selected: true,
configurable: true,
filters: getInitialResourceTypeFilters(),
render: (uuid) => <ResourceType uuid={uuid} />,
},
{
- name: ProjectPanelColumnNames.OWNER,
+ name: SharedWithMePanelColumnNames.OWNER,
selected: true,
configurable: true,
filters: createTree(),
render: (uuid) => <ResourceOwnerWithName uuid={uuid} />,
},
{
- name: ProjectPanelColumnNames.PORTABLE_DATA_HASH,
+ name: SharedWithMePanelColumnNames.PORTABLE_DATA_HASH,
selected: false,
configurable: true,
filters: createTree(),
render: (uuid) => <ResourcePortableDataHash uuid={uuid} />,
},
{
- name: ProjectPanelColumnNames.FILE_SIZE,
+ name: SharedWithMePanelColumnNames.FILE_SIZE,
selected: true,
configurable: true,
filters: createTree(),
render: (uuid) => <ResourceFileSize uuid={uuid} />,
},
{
- name: ProjectPanelColumnNames.FILE_COUNT,
+ name: SharedWithMePanelColumnNames.FILE_COUNT,
selected: false,
configurable: true,
filters: createTree(),
render: (uuid) => <ResourceFileCount uuid={uuid} />,
},
{
- name: ProjectPanelColumnNames.UUID,
+ name: SharedWithMePanelColumnNames.UUID,
selected: false,
configurable: true,
filters: createTree(),
render: (uuid) => <ResourceUUID uuid={uuid} />,
},
{
- name: ProjectPanelColumnNames.CONTAINER_UUID,
+ name: SharedWithMePanelColumnNames.CONTAINER_UUID,
selected: false,
configurable: true,
filters: createTree(),
render: (uuid) => <ResourceContainerUuid uuid={uuid} />,
},
{
- name: ProjectPanelColumnNames.RUNTIME,
+ name: SharedWithMePanelColumnNames.RUNTIME,
selected: false,
configurable: true,
filters: createTree(),
render: (uuid) => <ContainerRunTime uuid={uuid} />,
},
{
- name: ProjectPanelColumnNames.OUTPUT_UUID,
+ name: SharedWithMePanelColumnNames.OUTPUT_UUID,
selected: false,
configurable: true,
filters: createTree(),
render: (uuid) => <ResourceOutputUuid uuid={uuid} />,
},
{
- name: ProjectPanelColumnNames.LOG_UUID,
+ name: SharedWithMePanelColumnNames.LOG_UUID,
selected: false,
configurable: true,
filters: createTree(),
render: (uuid) => <ResourceLogUuid uuid={uuid} />,
},
{
- name: ProjectPanelColumnNames.PARENT_PROCESS,
+ name: SharedWithMePanelColumnNames.PARENT_PROCESS,
selected: false,
configurable: true,
filters: createTree(),
render: (uuid) => <ResourceParentProcess uuid={uuid} />,
},
{
- name: ProjectPanelColumnNames.MODIFIED_BY_USER_UUID,
+ name: SharedWithMePanelColumnNames.MODIFIED_BY_USER_UUID,
selected: false,
configurable: true,
filters: createTree(),
render: (uuid) => <ResourceModifiedByUserUuid uuid={uuid} />,
},
{
- name: ProjectPanelColumnNames.VERSION,
+ name: SharedWithMePanelColumnNames.VERSION,
selected: false,
configurable: true,
filters: createTree(),
render: (uuid) => <ResourceVersion uuid={uuid} />,
},
{
- name: ProjectPanelColumnNames.CREATED_AT,
+ name: SharedWithMePanelColumnNames.CREATED_AT,
selected: false,
configurable: true,
sort: { direction: SortDirection.NONE, field: 'createdAt' },
@@ -206,7 +206,7 @@ export const sharedWithMePanelColumns: DataColumns<string, ProjectResource> = [
render: (uuid) => <ResourceCreatedAtDate uuid={uuid} />,
},
{
- name: ProjectPanelColumnNames.LAST_MODIFIED,
+ name: SharedWithMePanelColumnNames.LAST_MODIFIED,
selected: true,
configurable: true,
sort: { direction: SortDirection.DESC, field: 'modifiedAt' },
@@ -214,7 +214,7 @@ export const sharedWithMePanelColumns: DataColumns<string, ProjectResource> = [
render: (uuid) => <ResourceLastModifiedDate uuid={uuid} />,
},
{
- name: ProjectPanelColumnNames.TRASH_AT,
+ name: SharedWithMePanelColumnNames.TRASH_AT,
selected: false,
configurable: true,
sort: { direction: SortDirection.NONE, field: 'trashAt' },
@@ -222,7 +222,7 @@ export const sharedWithMePanelColumns: DataColumns<string, ProjectResource> = [
render: (uuid) => <ResourceTrashDate uuid={uuid} />,
},
{
- name: ProjectPanelColumnNames.DELETE_AT,
+ name: SharedWithMePanelColumnNames.DELETE_AT,
selected: false,
configurable: true,
sort: { direction: SortDirection.NONE, field: 'deleteAt' },
commit 0e98b3fc0b3c49e6268905fba19859b05e26fc4f
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Wed Nov 8 10:52:41 2023 -0500
19302: added owner to default shared table columns Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/src/store/workbench/workbench-actions.ts b/src/store/workbench/workbench-actions.ts
index f2dae2c524..e89a95e039 100644
--- a/src/store/workbench/workbench-actions.ts
+++ b/src/store/workbench/workbench-actions.ts
@@ -50,6 +50,7 @@ import { trashPanelColumns } from "views/trash-panel/trash-panel";
import { loadTrashPanel, trashPanelActions } from "store/trash-panel/trash-panel-action";
import { loadProcessPanel } from "store/process-panel/process-panel-actions";
import { loadSharedWithMePanel, sharedWithMePanelActions } from "store/shared-with-me-panel/shared-with-me-panel-actions";
+import { sharedWithMePanelColumns } from "views/shared-with-me-panel/shared-with-me-panel";
import { CopyFormDialogData } from "store/copy-dialog/copy-dialog";
import { workflowPanelActions } from "store/workflow-panel/workflow-panel-actions";
import { loadSshKeysPanel } from "store/auth/auth-action-ssh";
@@ -140,7 +141,7 @@ export const loadWorkbench = () => async (dispatch: Dispatch, getState: () => Ro
})
);
dispatch(trashPanelActions.SET_COLUMNS({ columns: trashPanelColumns }));
- dispatch(sharedWithMePanelActions.SET_COLUMNS({ columns: projectPanelColumns }));
+ dispatch(sharedWithMePanelActions.SET_COLUMNS({ columns: sharedWithMePanelColumns }));
dispatch(workflowPanelActions.SET_COLUMNS({ columns: workflowPanelColumns }));
dispatch(
searchResultsPanelActions.SET_FETCH_MODE({
diff --git a/src/views/shared-with-me-panel/shared-with-me-panel.tsx b/src/views/shared-with-me-panel/shared-with-me-panel.tsx
index e6cfccd269..7bb171daf7 100644
--- a/src/views/shared-with-me-panel/shared-with-me-panel.tsx
+++ b/src/views/shared-with-me-panel/shared-with-me-panel.tsx
@@ -10,6 +10,7 @@ import { RootState } from 'store/store';
import { ArvadosTheme } from 'common/custom-theme';
import { ShareMeIcon } from 'components/icon/icon';
import { ResourcesState, getResource } from 'store/resources/resources';
+import { ResourceKind, Resource } from 'models/resource';
import { navigateTo } from "store/navigation/navigation-action";
import { loadDetailsPanel } from "store/details-panel/details-panel-action";
import { SHARED_WITH_ME_PANEL_ID } from 'store/shared-with-me-panel/shared-with-me-panel-actions';
@@ -17,7 +18,35 @@ import {
openContextMenu,
resourceUuidToContextMenuKind
} from 'store/context-menu/context-menu-actions';
+import {
+ ResourceName,
+ ProcessStatus as ResourceStatus,
+ ResourceType,
+ ResourceOwnerWithName,
+ ResourcePortableDataHash,
+ ResourceFileSize,
+ ResourceFileCount,
+ ResourceUUID,
+ ResourceContainerUuid,
+ ContainerRunTime,
+ ResourceOutputUuid,
+ ResourceLogUuid,
+ ResourceParentProcess,
+ ResourceModifiedByUserUuid,
+ ResourceVersion,
+ ResourceCreatedAtDate,
+ ResourceLastModifiedDate,
+ ResourceTrashDate,
+ ResourceDeleteDate,
+} from 'views-components/data-explorer/renderers';
+import { DataTableFilterItem } from 'components/data-table-filters/data-table-filters';
import { GroupContentsResource } from 'services/groups-service/groups-service';
+import { DataColumns } from 'components/data-table/data-table';
+import { ContainerRequestState } from 'models/container-request';
+import { ProjectResource } from 'models/project';
+import { createTree } from 'models/tree';
+import { SortDirection } from 'components/data-table/data-column';
+import { getInitialResourceTypeFilters, getInitialProcessStatusFilters } from 'store/resource-type-filters/resource-type-filters';
type CssRules = "toolbar" | "button" | "root";
@@ -34,6 +63,175 @@ const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
},
});
+export enum ProjectPanelColumnNames {
+ NAME = 'Name',
+ STATUS = 'Status',
+ TYPE = 'Type',
+ OWNER = 'Owner',
+ PORTABLE_DATA_HASH = 'Portable Data Hash',
+ FILE_SIZE = 'File Size',
+ FILE_COUNT = 'File Count',
+ UUID = 'UUID',
+ CONTAINER_UUID = 'Container UUID',
+ RUNTIME = 'Runtime',
+ OUTPUT_UUID = 'Output UUID',
+ LOG_UUID = 'Log UUID',
+ PARENT_PROCESS = 'Parent Process UUID',
+ MODIFIED_BY_USER_UUID = 'Modified by User UUID',
+ VERSION = 'Version',
+ CREATED_AT = 'Date Created',
+ LAST_MODIFIED = 'Last Modified',
+ TRASH_AT = 'Trash at',
+ DELETE_AT = 'Delete at',
+}
+
+export interface ProjectPanelFilter extends DataTableFilterItem {
+ type: ResourceKind | ContainerRequestState;
+}
+
+export const sharedWithMePanelColumns: DataColumns<string, ProjectResource> = [
+ {
+ name: ProjectPanelColumnNames.NAME,
+ selected: true,
+ configurable: true,
+ sort: { direction: SortDirection.NONE, field: 'name' },
+ filters: createTree(),
+ render: (uuid) => <ResourceName uuid={uuid} />,
+ },
+ {
+ name: ProjectPanelColumnNames.STATUS,
+ selected: true,
+ configurable: true,
+ mutuallyExclusiveFilters: true,
+ filters: getInitialProcessStatusFilters(),
+ render: (uuid) => <ResourceStatus uuid={uuid} />,
+ },
+ {
+ name: ProjectPanelColumnNames.TYPE,
+ selected: true,
+ configurable: true,
+ filters: getInitialResourceTypeFilters(),
+ render: (uuid) => <ResourceType uuid={uuid} />,
+ },
+ {
+ name: ProjectPanelColumnNames.OWNER,
+ selected: true,
+ configurable: true,
+ filters: createTree(),
+ render: (uuid) => <ResourceOwnerWithName uuid={uuid} />,
+ },
+ {
+ name: ProjectPanelColumnNames.PORTABLE_DATA_HASH,
+ selected: false,
+ configurable: true,
+ filters: createTree(),
+ render: (uuid) => <ResourcePortableDataHash uuid={uuid} />,
+ },
+ {
+ name: ProjectPanelColumnNames.FILE_SIZE,
+ selected: true,
+ configurable: true,
+ filters: createTree(),
+ render: (uuid) => <ResourceFileSize uuid={uuid} />,
+ },
+ {
+ name: ProjectPanelColumnNames.FILE_COUNT,
+ selected: false,
+ configurable: true,
+ filters: createTree(),
+ render: (uuid) => <ResourceFileCount uuid={uuid} />,
+ },
+ {
+ name: ProjectPanelColumnNames.UUID,
+ selected: false,
+ configurable: true,
+ filters: createTree(),
+ render: (uuid) => <ResourceUUID uuid={uuid} />,
+ },
+ {
+ name: ProjectPanelColumnNames.CONTAINER_UUID,
+ selected: false,
+ configurable: true,
+ filters: createTree(),
+ render: (uuid) => <ResourceContainerUuid uuid={uuid} />,
+ },
+ {
+ name: ProjectPanelColumnNames.RUNTIME,
+ selected: false,
+ configurable: true,
+ filters: createTree(),
+ render: (uuid) => <ContainerRunTime uuid={uuid} />,
+ },
+ {
+ name: ProjectPanelColumnNames.OUTPUT_UUID,
+ selected: false,
+ configurable: true,
+ filters: createTree(),
+ render: (uuid) => <ResourceOutputUuid uuid={uuid} />,
+ },
+ {
+ name: ProjectPanelColumnNames.LOG_UUID,
+ selected: false,
+ configurable: true,
+ filters: createTree(),
+ render: (uuid) => <ResourceLogUuid uuid={uuid} />,
+ },
+ {
+ name: ProjectPanelColumnNames.PARENT_PROCESS,
+ selected: false,
+ configurable: true,
+ filters: createTree(),
+ render: (uuid) => <ResourceParentProcess uuid={uuid} />,
+ },
+ {
+ name: ProjectPanelColumnNames.MODIFIED_BY_USER_UUID,
+ selected: false,
+ configurable: true,
+ filters: createTree(),
+ render: (uuid) => <ResourceModifiedByUserUuid uuid={uuid} />,
+ },
+ {
+ name: ProjectPanelColumnNames.VERSION,
+ selected: false,
+ configurable: true,
+ filters: createTree(),
+ render: (uuid) => <ResourceVersion uuid={uuid} />,
+ },
+ {
+ name: ProjectPanelColumnNames.CREATED_AT,
+ selected: false,
+ configurable: true,
+ sort: { direction: SortDirection.NONE, field: 'createdAt' },
+ filters: createTree(),
+ render: (uuid) => <ResourceCreatedAtDate uuid={uuid} />,
+ },
+ {
+ name: ProjectPanelColumnNames.LAST_MODIFIED,
+ selected: true,
+ configurable: true,
+ sort: { direction: SortDirection.DESC, field: 'modifiedAt' },
+ filters: createTree(),
+ render: (uuid) => <ResourceLastModifiedDate uuid={uuid} />,
+ },
+ {
+ name: ProjectPanelColumnNames.TRASH_AT,
+ selected: false,
+ configurable: true,
+ sort: { direction: SortDirection.NONE, field: 'trashAt' },
+ filters: createTree(),
+ render: (uuid) => <ResourceTrashDate uuid={uuid} />,
+ },
+ {
+ name: ProjectPanelColumnNames.DELETE_AT,
+ selected: false,
+ configurable: true,
+ sort: { direction: SortDirection.NONE, field: 'deleteAt' },
+ filters: createTree(),
+ render: (uuid) => <ResourceDeleteDate uuid={uuid} />,
+ },
+];
+
+
interface SharedWithMePanelDataProps {
resources: ResourcesState;
userUuid: string;
commit acbdf56bc7c678796cc4a8d0627ab66fd1edf37f
Author: Stephen Smith <stephen at curii.com>
Date: Tue Nov 7 15:52:22 2023 -0500
20609: Update momentjs
Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen at curii.com>
diff --git a/package.json b/package.json
index fd9cdf7822..d21d067540 100644
--- a/package.json
+++ b/package.json
@@ -50,7 +50,7 @@
"material-ui-pickers": "^2.2.4",
"mem": "4.0.0",
"mime": "^3.0.0",
- "moment": "2.29.1",
+ "moment": "^2.29.4",
"parse-duration": "0.4.4",
"prop-types": "15.7.2",
"query-string": "6.9.0",
diff --git a/yarn.lock b/yarn.lock
index f1fc857ffa..ef7b9d31eb 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3888,7 +3888,7 @@ __metadata:
material-ui-pickers: ^2.2.4
mem: 4.0.0
mime: ^3.0.0
- moment: 2.29.1
+ moment: ^2.29.4
node-sass: ^9.0.0
node-sass-chokidar: ^2.0.0
parse-duration: 0.4.4
@@ -12612,14 +12612,7 @@ __metadata:
languageName: node
linkType: hard
-"moment at npm:2.29.1":
- version: 2.29.1
- resolution: "moment at npm:2.29.1"
- checksum: 1e14d5f422a2687996be11dd2d50c8de3bd577c4a4ca79ba5d02c397242a933e5b941655de6c8cb90ac18f01cc4127e55b4a12ae3c527a6c0a274e455979345e
- languageName: node
- linkType: hard
-
-"moment at npm:^2.27.0":
+"moment at npm:^2.27.0, moment at npm:^2.29.4":
version: 2.29.4
resolution: "moment at npm:2.29.4"
checksum: 0ec3f9c2bcba38dc2451b1daed5daded747f17610b92427bebe1d08d48d8b7bdd8d9197500b072d14e326dd0ccf3e326b9e3d07c5895d3d49e39b6803b76e80e
commit 72c70bed4eb3098a92a0deb07841a0b46d9df5bf
Author: Stephen Smith <stephen at curii.com>
Date: Tue Nov 7 15:52:05 2023 -0500
20609: Update caniuse
Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen at curii.com>
diff --git a/yarn.lock b/yarn.lock
index 7b837aab60..f1fc857ffa 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -5135,17 +5135,10 @@ __metadata:
languageName: node
linkType: hard
-"caniuse-lite at npm:^1.0.0, caniuse-lite at npm:^1.0.30000981, caniuse-lite at npm:^1.0.30001035, caniuse-lite at npm:^1.0.30001109":
- version: 1.0.30001486
- resolution: "caniuse-lite at npm:1.0.30001486"
- checksum: 5e8c2ba2679e4ad17dea6d2761a6449b814441bfeac81af6cc9d58af187df6af4b79b27befcbfc4a557e720b21c0399a7d1911c8705922e38938dcc0f40b5d4b
- languageName: node
- linkType: hard
-
-"caniuse-lite at npm:^1.0.30001541":
- version: 1.0.30001543
- resolution: "caniuse-lite at npm:1.0.30001543"
- checksum: 1a65c8b0b93913b6241c7d66e1e1f3ea0f194f7e140eefe500512641c2eb4df285991ec9869a1ba2856ea6f6d21e9f3d7bcd91971b5fb1721e3fa0390feec6f1
+"caniuse-lite at npm:^1.0.0, caniuse-lite at npm:^1.0.30000981, caniuse-lite at npm:^1.0.30001035, caniuse-lite at npm:^1.0.30001109, caniuse-lite at npm:^1.0.30001541":
+ version: 1.0.30001561
+ resolution: "caniuse-lite at npm:1.0.30001561"
+ checksum: 949829fe037e23346595614e01d362130245920503a12677f2506ce68e1240360113d6383febed41e8aa38cd0f5fd9c69c21b0af65a71c0246d560db489f1373
languageName: node
linkType: hard
commit 82646dcb3d8f2497de1a33d2250101749526662f
Author: Stephen Smith <stephen at curii.com>
Date: Tue Nov 7 15:50:37 2023 -0500
20609: Add unit tests for subprocess progress bar, includes node/dom upgrade to 16.14.x
Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen at curii.com>
diff --git a/cypress/integration/project.spec.js b/cypress/integration/project.spec.js
index a8663d8622..e61138219d 100644
--- a/cypress/integration/project.spec.js
+++ b/cypress/integration/project.spec.js
@@ -564,7 +564,7 @@ describe("Project tests", function () {
);
});
- it.only("sorts displayed items correctly", () => {
+ it("sorts displayed items correctly", () => {
cy.loginAs(activeUser);
cy.get('[data-cy=project-panel] button[title="Select columns"]').click();
diff --git a/package.json b/package.json
index acc2db6ae1..fd9cdf7822 100644
--- a/package.json
+++ b/package.json
@@ -54,11 +54,11 @@
"parse-duration": "0.4.4",
"prop-types": "15.7.2",
"query-string": "6.9.0",
- "react": "16.8.6",
+ "react": "16.14.0",
"react-copy-to-clipboard": "5.0.3",
"react-dnd": "5.0.0",
"react-dnd-html5-backend": "5.0.1",
- "react-dom": "16.8.6",
+ "react-dom": "16.14.0",
"react-dropzone": "5.1.1",
"react-highlight-words": "0.14.0",
"react-idle-timer": "4.3.6",
diff --git a/src/components/subprocess-progress-bar/subprocess-progress-bar.test.tsx b/src/components/subprocess-progress-bar/subprocess-progress-bar.test.tsx
new file mode 100644
index 0000000000..8373717832
--- /dev/null
+++ b/src/components/subprocess-progress-bar/subprocess-progress-bar.test.tsx
@@ -0,0 +1,153 @@
+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
+import React from "react";
+import { configure, mount } from "enzyme";
+import { ServiceRepository, createServices } from "services/services";
+import { configureStore } from "store/store";
+import { createBrowserHistory } from "history";
+import { mockConfig } from 'common/config';
+import { ApiActions } from "services/api/api-actions";
+import Axios from "axios";
+import MockAdapter from "axios-mock-adapter";
+import { Process } from "store/processes/process";
+import { ContainerState } from "models/container";
+import Adapter from "enzyme-adapter-react-16";
+import { SubprocessProgressBar } from "./subprocess-progress-bar";
+import { Provider } from "react-redux";
+import { FilterBuilder } from 'services/api/filter-builder';
+import { ProcessStatusFilter, buildProcessStatusFilters } from 'store/resource-type-filters/resource-type-filters';
+import {act} from "react-dom/test-utils";
+
+configure({ adapter: new Adapter() });
+
+describe("<SubprocessProgressBar />", () => {
+ const axiosInst = Axios.create({ headers: {} });
+ const axiosMock = new MockAdapter(axiosInst);
+
+ let store;
+ let services: ServiceRepository;
+ const config: any = {};
+ const actions: ApiActions = {
+ progressFn: (id: string, working: boolean) => { },
+ errorFn: (id: string, message: string) => { }
+ };
+ let statusResponse = {
+ [ProcessStatusFilter.COMPLETED]: 0,
+ [ProcessStatusFilter.RUNNING]: 0,
+ [ProcessStatusFilter.FAILED]: 0,
+ [ProcessStatusFilter.QUEUED]: 0,
+ };
+
+ const createMockListFunc = (uuid: string) => jest.fn(async (args) => {
+ const baseFilter = new FilterBuilder().addEqual('requesting_container_uuid', uuid).getFilters();
+
+ const filterResponses = Object.keys(statusResponse)
+ .map(status => ({filters: buildProcessStatusFilters(new FilterBuilder(baseFilter), status).getFilters(), value: statusResponse[status]}));
+
+ const matchedFilter = filterResponses.find(response => response.filters === args.filters);
+ if (matchedFilter) {
+ return { itemsAvailable: matchedFilter.value };
+ } else {
+ return { itemsAvailable: 0 };
+ }
+ });
+
+ beforeEach(() => {
+ services = createServices(mockConfig({}), actions, axiosInst);
+ store = configureStore(createBrowserHistory(), services, config);
+ });
+
+ it("requests subprocess progress stats for stopped processes and displays progress", async () => {
+ // when
+ const process = {
+ container: {
+ state: ContainerState.COMPLETE,
+ },
+ containerRequest: {
+ containerUuid: 'zzzzz-dz642-000000000000000',
+ },
+ } as Process;
+
+ statusResponse = {
+ [ProcessStatusFilter.COMPLETED]: 100,
+ [ProcessStatusFilter.RUNNING]: 200,
+ [ProcessStatusFilter.FAILED]: 300,
+ [ProcessStatusFilter.QUEUED]: 400,
+ };
+
+ services.containerRequestService.list = createMockListFunc(process.containerRequest.containerUuid);
+
+ let progressBar;
+ await act(async () => {
+ progressBar = mount(
+ <Provider store={store}>
+ <SubprocessProgressBar process={process} />
+ </Provider>);
+ });
+ await progressBar.update();
+
+ // expects 4 subprocess status list requests
+ const expectedFilters = [
+ ProcessStatusFilter.COMPLETED,
+ ProcessStatusFilter.RUNNING,
+ ProcessStatusFilter.FAILED,
+ ProcessStatusFilter.QUEUED,
+ ].map((state) =>
+ buildProcessStatusFilters(
+ new FilterBuilder().addEqual(
+ "requesting_container_uuid",
+ process.containerRequest.containerUuid
+ ),
+ state
+ ).getFilters()
+ );
+
+ expectedFilters.forEach((filter) => {
+ expect(services.containerRequestService.list).toHaveBeenCalledWith({limit: 0, offset: 0, filters: filter});
+ });
+
+ // Verify progress bar with correct degment widths
+ ['10%', '20%', '30%', '40%'].forEach((value, i) => {
+ const styles = progressBar.find('.progress').at(i).props().style;
+ expect(styles).toHaveProperty('width', value);
+ });
+ });
+
+ it("dislays correct progress bar widths with different values", async () => {
+ const process = {
+ container: {
+ state: ContainerState.COMPLETE,
+ },
+ containerRequest: {
+ containerUuid: 'zzzzz-dz642-000000000000001',
+ },
+ } as Process;
+
+ statusResponse = {
+ [ProcessStatusFilter.COMPLETED]: 50,
+ [ProcessStatusFilter.RUNNING]: 55,
+ [ProcessStatusFilter.FAILED]: 60,
+ [ProcessStatusFilter.QUEUED]: 335,
+ };
+
+ services.containerRequestService.list = createMockListFunc(process.containerRequest.containerUuid);
+
+ let progressBar;
+ await act(async () => {
+ progressBar = mount(
+ <Provider store={store}>
+ <SubprocessProgressBar process={process} />
+ </Provider>);
+ });
+ await progressBar.update();
+
+ // Verify progress bar with correct degment widths
+ ['10%', '11%', '12%', '67%'].forEach((value, i) => {
+ const styles = progressBar.find('.progress').at(i).props().style;
+ expect(styles).toHaveProperty('width', value);
+ });
+ });
+
+});
diff --git a/src/store/tree-picker/tree-picker-actions.test.ts b/src/store/tree-picker/tree-picker-actions.test.ts
index 9622282c4f..7a55503e20 100644
--- a/src/store/tree-picker/tree-picker-actions.test.ts
+++ b/src/store/tree-picker/tree-picker-actions.test.ts
@@ -23,10 +23,7 @@ describe('tree-picker-actions', () => {
let store: RootStore;
let services: ServiceRepository;
- const config: any = {
-
-
- };
+ const config: any = {};
const actions: ApiActions = {
progressFn: (id: string, working: boolean) => { },
errorFn: (id: string, message: string) => { }
diff --git a/yarn.lock b/yarn.lock
index 142694c883..7b837aab60 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3894,11 +3894,11 @@ __metadata:
parse-duration: 0.4.4
prop-types: 15.7.2
query-string: 6.9.0
- react: 16.8.6
+ react: 16.14.0
react-copy-to-clipboard: 5.0.3
react-dnd: 5.0.0
react-dnd-html5-backend: 5.0.1
- react-dom: 16.8.6
+ react-dom: 16.14.0
react-dropzone: 5.1.1
react-highlight-words: 0.14.0
react-idle-timer: 4.3.6
@@ -15349,17 +15349,17 @@ __metadata:
languageName: node
linkType: hard
-"react-dom at npm:16.8.6":
- version: 16.8.6
- resolution: "react-dom at npm:16.8.6"
+"react-dom at npm:16.14.0":
+ version: 16.14.0
+ resolution: "react-dom at npm:16.14.0"
dependencies:
loose-envify: ^1.1.0
object-assign: ^4.1.1
prop-types: ^15.6.2
- scheduler: ^0.13.6
+ scheduler: ^0.19.1
peerDependencies:
- react: ^16.0.0
- checksum: 7f8ebd8523eb4a14a1439efa009d020abc0529da25d0de251a4f3d5b3781061f6b30d72425f5fe944317850997efc6c1d667e99b1fd70172f30a976a00008bf6
+ react: ^16.14.0
+ checksum: 5a5c49da0f106b2655a69f96c622c347febcd10532db391c262b26aec225b235357d9da1834103457683482ab1b229af7a50f6927a6b70e53150275e31785544
languageName: node
linkType: hard
@@ -15683,15 +15683,14 @@ __metadata:
languageName: node
linkType: hard
-"react at npm:16.8.6":
- version: 16.8.6
- resolution: "react at npm:16.8.6"
+"react at npm:16.14.0":
+ version: 16.14.0
+ resolution: "react at npm:16.14.0"
dependencies:
loose-envify: ^1.1.0
object-assign: ^4.1.1
prop-types: ^15.6.2
- scheduler: ^0.13.6
- checksum: 8dfdbec9af6999c2cfb33a9389995c6401daba732e1ee7e0a4920d28fd2e8e6b0fde99dfe4b8e2f81efc4a962c92656e3e79e221323449e55850232163f15ff4
+ checksum: 8484f3ecb13414526f2a7412190575fc134da785c02695eb92bb6028c930bfe1c238d7be2a125088fec663cc7cda0a3623373c46807cf2c281f49c34b79881ac
languageName: node
linkType: hard
@@ -16696,16 +16695,6 @@ __metadata:
languageName: node
linkType: hard
-"scheduler at npm:^0.13.6":
- version: 0.13.6
- resolution: "scheduler at npm:0.13.6"
- dependencies:
- loose-envify: ^1.1.0
- object-assign: ^4.1.1
- checksum: c82c705f6d0d6df87b26bf2cca33f427e91889438c0435ade3ee7f41860eda4dd7f3171ca2d93e8fe9431f3bd831ca0e267a401a0296e4b14de05e389f82d320
- languageName: node
- linkType: hard
-
"scheduler at npm:^0.19.1":
version: 0.19.1
resolution: "scheduler at npm:0.19.1"
commit e335fc05c480a0eda91cf36c374cbcc784281c2e
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Tue Nov 7 11:04:59 2023 -0500
19302: changed category order Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/src/store/side-panel-tree/side-panel-tree-actions.ts b/src/store/side-panel-tree/side-panel-tree-actions.ts
index 71c72cd32d..95f4ce2d68 100644
--- a/src/store/side-panel-tree/side-panel-tree-actions.ts
+++ b/src/store/side-panel-tree/side-panel-tree-actions.ts
@@ -48,11 +48,11 @@ export const getSidePanelTreeBranch = (uuid: string) => (treePicker: TreePicker)
let SIDE_PANEL_CATEGORIES: string[] = [
SidePanelTreeCategory.PROJECTS,
- SidePanelTreeCategory.SHARED_WITH_ME,
- SidePanelTreeCategory.PUBLIC_FAVORITES,
SidePanelTreeCategory.FAVORITES,
- SidePanelTreeCategory.GROUPS,
+ SidePanelTreeCategory.PUBLIC_FAVORITES,
+ SidePanelTreeCategory.SHARED_WITH_ME,
SidePanelTreeCategory.ALL_PROCESSES,
+ SidePanelTreeCategory.GROUPS,
SidePanelTreeCategory.TRASH
];
diff --git a/src/views-components/side-panel/side-panel-collapsed.tsx b/src/views-components/side-panel/side-panel-collapsed.tsx
index 1fd3af31e3..2c66630a61 100644
--- a/src/views-components/side-panel/side-panel-collapsed.tsx
+++ b/src/views-components/side-panel/side-panel-collapsed.tsx
@@ -35,11 +35,11 @@ const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
enum SidePanelCollapsedCategory {
PROJECTS = 'Home Projects',
- SHARED_WITH_ME = 'Shared with me',
- PUBLIC_FAVORITES = 'Public Favorites',
FAVORITES = 'My Favorites',
- GROUPS = 'Groups',
+ PUBLIC_FAVORITES = 'Public Favorites',
+ SHARED_WITH_ME = 'Shared with me',
ALL_PROCESSES = 'All Processes',
+ GROUPS = 'Groups',
TRASH = 'Trash',
}
@@ -56,9 +56,9 @@ const sidePanelCollapsedCategories: TCollapsedCategory[] = [
navTarget: '',
},
{
- name: SidePanelCollapsedCategory.SHARED_WITH_ME,
- icon: <ShareMeIcon />,
- navTarget: navigateToSharedWithMe,
+ name: SidePanelCollapsedCategory.FAVORITES,
+ icon: <FavoriteIcon />,
+ navTarget: navigateToFavorites,
},
{
name: SidePanelCollapsedCategory.PUBLIC_FAVORITES,
@@ -66,20 +66,20 @@ const sidePanelCollapsedCategories: TCollapsedCategory[] = [
navTarget: navigateToPublicFavorites,
},
{
- name: SidePanelCollapsedCategory.FAVORITES,
- icon: <FavoriteIcon />,
- navTarget: navigateToFavorites,
- },
- {
- name: SidePanelCollapsedCategory.GROUPS,
- icon: <GroupsIcon />,
- navTarget: navigateToGroups,
+ name: SidePanelCollapsedCategory.SHARED_WITH_ME,
+ icon: <ShareMeIcon />,
+ navTarget: navigateToSharedWithMe,
},
{
name: SidePanelCollapsedCategory.ALL_PROCESSES,
icon: <ProcessIcon />,
navTarget: navigateToAllProcesses,
},
+ {
+ name: SidePanelCollapsedCategory.GROUPS,
+ icon: <GroupsIcon />,
+ navTarget: navigateToGroups,
+ },
{
name: SidePanelCollapsedCategory.TRASH,
icon: <TrashIcon />,
commit 1d6407bd7c7d0669c99b615c8ecc2be3a10b6ba9
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Tue Nov 7 10:44:24 2023 -0500
19302: fixed tree indent and back nav icon bug Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/cypress/integration/side-panel.spec.js b/cypress/integration/side-panel.spec.js
index d7e4c8a818..af2712e268 100644
--- a/cypress/integration/side-panel.spec.js
+++ b/cypress/integration/side-panel.spec.js
@@ -154,9 +154,9 @@ describe('Side panel tests', function() {
'shared-with-me': '/shared-with-me',
'public-favorites': '/public-favorites',
'my-favorites': '/favorites',
- groups: '/groups',
+ 'groups': '/groups',
'all-processes': '/all_processes',
- trash: '/trash',
+ 'trash': '/trash',
'home-projects': `/projects/${activeUser.user.uuid}`,
}
diff --git a/src/components/tree/tree.tsx b/src/components/tree/tree.tsx
index d275cc0bed..11a9540290 100644
--- a/src/components/tree/tree.tsx
+++ b/src/components/tree/tree.tsx
@@ -5,7 +5,7 @@
import React, { useCallback, useState } from 'react';
import { List, ListItem, ListItemIcon, Checkbox, Radio, Collapse } from "@material-ui/core";
import { StyleRulesCallback, withStyles, WithStyles } from '@material-ui/core/styles';
-import { CollectionIcon, DefaultIcon, DirectoryIcon, FileIcon, ProjectIcon, FilterGroupIcon, FreezeIcon } from 'components/icon/icon';
+import { CollectionIcon, DefaultIcon, DirectoryIcon, FileIcon, ProjectIcon, ProcessIcon, FilterGroupIcon, FreezeIcon } from 'components/icon/icon';
import { ReactElement } from "react";
import CircularProgress from '@material-ui/core/CircularProgress';
import classnames from "classnames";
@@ -28,7 +28,8 @@ type CssRules = 'list'
| 'checkbox'
| 'childItem'
| 'childItemIcon'
- | 'frozenIcon';
+ | 'frozenIcon'
+ | 'indentSpacer';
const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
list: {
@@ -91,6 +92,9 @@ const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
color: theme.palette.grey["600"],
marginLeft: '10px',
},
+ indentSpacer: {
+ width: '0.25rem'
+ }
});
export enum TreeItemStatus {
@@ -184,7 +188,7 @@ const FLAT_TREE_ACTIONS = {
toggleActive: 'TOGGLE_ACTIVE',
};
-const ItemIcon = React.memo(({ type, kind, active, groupClass, classes }: any) => {
+const ItemIcon = React.memo(({ type, kind, headKind, active, groupClass, classes }: any) => {
let Icon = ProjectIcon;
if (groupClass === GroupClass.FILTER) {
@@ -205,10 +209,14 @@ const ItemIcon = React.memo(({ type, kind, active, groupClass, classes }: any) =
}
if (kind) {
+ if(kind === ResourceKind.LINK && headKind) kind = headKind;
switch (kind) {
case ResourceKind.COLLECTION:
Icon = CollectionIcon;
break;
+ case ResourceKind.CONTAINER_REQUEST:
+ Icon = ProcessIcon;
+ break;
default:
break;
}
@@ -247,11 +255,14 @@ const FlatTree = (props: FlatTreeProps) =>
.map((item: any) => <div key={item.id} data-id={item.id}
className={classnames(props.classes.childItem, { [props.classes.active]: item.active })}
style={{ paddingLeft: `${item.depth * props.levelIndentation}px` }}>
- {!isInFavoritesTree(props.it) && <i data-action={FLAT_TREE_ACTIONS.toggleOpen} className={props.classes.toggableIconContainer}>
- <ListItemIcon className={props.getToggableIconClassNames(item.open, item.active)}>
- {props.getProperArrowAnimation(item.status, item.items!)}
- </ListItemIcon>
- </i>}
+ {isInFavoritesTree(props.it) ?
+ <div className={props.classes.indentSpacer} />
+ :
+ <i data-action={FLAT_TREE_ACTIONS.toggleOpen} className={props.classes.toggableIconContainer}>
+ <ListItemIcon className={props.getToggableIconClassNames(item.open, item.active)}>
+ {props.getProperArrowAnimation(item.status, item.items!)}
+ </ListItemIcon>
+ </i>}
{props.showSelection(item) && !props.useRadioButtons &&
<Checkbox
checked={item.selected}
@@ -265,7 +276,7 @@ const FlatTree = (props: FlatTreeProps) =>
color="primary" />}
<div data-action={FLAT_TREE_ACTIONS.toggleActive} className={props.classes.renderContainer} ref={item.active ? props.selectedRef : undefined}>
<span style={{ display: 'flex', alignItems: 'center' }}>
- <ItemIcon type={item.data.type} active={item.active} kind={item.data.kind} groupClass={item.data.kind === ResourceKind.GROUP ? item.data.groupClass : ''} classes={props.classes} />
+ <ItemIcon type={item.data.type} active={item.active} kind={item.data.kind} headKind={item.data.headKind || null} groupClass={item.data.kind === ResourceKind.GROUP ? item.data.groupClass : ''} classes={props.classes} />
<span style={{ fontSize: '0.875rem' }}>
{item.data.name}
</span>
commit e5fadeed6b9052254606e7c0529752b74f50a27b
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Mon Nov 6 14:20:27 2023 -0500
19302: cleanup Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/cypress/integration/side-panel.spec.js b/cypress/integration/side-panel.spec.js
index de6385d187..d7e4c8a818 100644
--- a/cypress/integration/side-panel.spec.js
+++ b/cypress/integration/side-panel.spec.js
@@ -148,7 +148,7 @@ describe('Side panel tests', function() {
cy.get('[data-cy=side-panel-collapsed]').should('not.exist')
})
- it.only('can navigate from collapsed panel', () => {
+ it('can navigate from collapsed panel', () => {
const collapsedCategories = {
'shared-with-me': '/shared-with-me',
commit 8997608d0fae4eba9d92d7e363bdc6bb462e933d
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Mon Nov 6 14:17:55 2023 -0500
19302: wrote navigation test Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/cypress/integration/side-panel.spec.js b/cypress/integration/side-panel.spec.js
index 80b1d81dae..de6385d187 100644
--- a/cypress/integration/side-panel.spec.js
+++ b/cypress/integration/side-panel.spec.js
@@ -138,12 +138,37 @@ describe('Side panel tests', function() {
it('collapses and un-collapses', () => {
- cy.loginAs(activeUser)
-
- cy.get('[data-cy=side-panel-tree]').should('exist')
- cy.get('[data-cy=side-panel-toggle]').click()
- cy.get('[data-cy=side-panel-tree]').should('not.exist')
- cy.get('[data-cy=side-panel-toggle]').click()
- cy.get('[data-cy=side-panel-tree]').should('exist')
- })
+ cy.loginAs(activeUser)
+ cy.get('[data-cy=side-panel-tree]').should('exist')
+ cy.get('[data-cy=side-panel-toggle]').click()
+ cy.get('[data-cy=side-panel-tree]').should('not.exist')
+ cy.get('[data-cy=side-panel-collapsed]').should('exist')
+ cy.get('[data-cy=side-panel-toggle]').click()
+ cy.get('[data-cy=side-panel-tree]').should('exist')
+ cy.get('[data-cy=side-panel-collapsed]').should('not.exist')
+ })
+
+ it.only('can navigate from collapsed panel', () => {
+
+ const collapsedCategories = {
+ 'shared-with-me': '/shared-with-me',
+ 'public-favorites': '/public-favorites',
+ 'my-favorites': '/favorites',
+ groups: '/groups',
+ 'all-processes': '/all_processes',
+ trash: '/trash',
+ 'home-projects': `/projects/${activeUser.user.uuid}`,
+ }
+
+ cy.loginAs(activeUser)
+ cy.get('[data-cy=side-panel-tree]').should('exist')
+ cy.get('[data-cy=side-panel-toggle]').click()
+ cy.get('[data-cy=side-panel-collapsed]').should('exist')
+
+ for (const cat in collapsedCategories) {
+ cy.get(`[data-cy=collapsed-${cat}]`).should('exist').click()
+ cy.url().should('include', collapsedCategories[cat])
+ }
+ })
})
+
diff --git a/src/views-components/side-panel/side-panel-collapsed.tsx b/src/views-components/side-panel/side-panel-collapsed.tsx
index 747966ac0d..1fd3af31e3 100644
--- a/src/views-components/side-panel/side-panel-collapsed.tsx
+++ b/src/views-components/side-panel/side-panel-collapsed.tsx
@@ -111,10 +111,11 @@ export const SidePanelCollapsed = withStyles(styles)(
const { root, unselected, selected } = classes
return (
- <List className={root}>
+ <List data-cy="side-panel-collapsed" className={root}>
{sidePanelCollapsedCategories.map((cat) => (
<ListItem
key={cat.name}
+ data-cy={`collapsed-${cat.name.toLowerCase().replace(/\s+/g, '-')}`}
className={selectedPath === cat.name ? selected : unselected}
onClick={() => handleClick(cat)}
>
commit 4288d7816f793b621fa8c70cb646c19136e05d2a
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Mon Nov 6 11:15:26 2023 -0500
19302: cleanup Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/cypress/integration/side-panel.spec.js b/cypress/integration/side-panel.spec.js
index 2bab55e861..80b1d81dae 100644
--- a/cypress/integration/side-panel.spec.js
+++ b/cypress/integration/side-panel.spec.js
@@ -136,7 +136,7 @@ describe('Side panel tests', function() {
});
});
- it.only('collapses and un-collapses', () => {
+ it('collapses and un-collapses', () => {
cy.loginAs(activeUser)
@@ -146,5 +146,4 @@ describe('Side panel tests', function() {
cy.get('[data-cy=side-panel-toggle]').click()
cy.get('[data-cy=side-panel-tree]').should('exist')
})
- // })
})
commit 599aa352ade599966cf2a4606a1e6a1776a0738d
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Mon Nov 6 11:14:50 2023 -0500
19302: wrote collapse spec Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/cypress/integration/side-panel.spec.js b/cypress/integration/side-panel.spec.js
index 92181150ed..2bab55e861 100644
--- a/cypress/integration/side-panel.spec.js
+++ b/cypress/integration/side-panel.spec.js
@@ -135,4 +135,16 @@ describe('Side panel tests', function() {
});
});
});
+
+ it.only('collapses and un-collapses', () => {
+
+ cy.loginAs(activeUser)
+
+ cy.get('[data-cy=side-panel-tree]').should('exist')
+ cy.get('[data-cy=side-panel-toggle]').click()
+ cy.get('[data-cy=side-panel-tree]').should('not.exist')
+ cy.get('[data-cy=side-panel-toggle]').click()
+ cy.get('[data-cy=side-panel-tree]').should('exist')
+ })
+ // })
})
diff --git a/src/views-components/side-panel-toggle/side-panel-toggle.tsx b/src/views-components/side-panel-toggle/side-panel-toggle.tsx
index dada57d81d..5c3069cd29 100644
--- a/src/views-components/side-panel-toggle/side-panel-toggle.tsx
+++ b/src/views-components/side-panel-toggle/side-panel-toggle.tsx
@@ -29,7 +29,7 @@ const SidePanelToggle = (props: collapseButtonProps) => {
}
return <Tooltip disableFocusListener title="Toggle Side Panel">
- <IconButton style={collapseButtonIconStyles.root} onClick={() => { props.toggleSidePanel(props.isCollapsed) }}>
+ <IconButton data-cy="side-panel-toggle" style={collapseButtonIconStyles.root} onClick={() => { props.toggleSidePanel(props.isCollapsed) }}>
<div>
{props.isCollapsed ?
<img style={collapseButtonIconStyles.icon} src='/mui-start-icon.svg' alt='an arrow pointing right'/>
diff --git a/src/views-components/side-panel/side-panel-collapsed.tsx b/src/views-components/side-panel/side-panel-collapsed.tsx
index 338d9b3eef..747966ac0d 100644
--- a/src/views-components/side-panel/side-panel-collapsed.tsx
+++ b/src/views-components/side-panel/side-panel-collapsed.tsx
@@ -87,10 +87,10 @@ const sidePanelCollapsedCategories: TCollapsedCategory[] = [
},
]
-const mapStateToProps = (state: RootState) => {
+const mapStateToProps = ({auth, properties }: RootState) => {
return {
- user: state.auth.user,
- selectedPath: state.properties.breadcrumbs[0].label,
+ user: auth.user,
+ selectedPath: properties.breadcrumbs ? properties.breadcrumbs[0].label : SidePanelCollapsedCategory.PROJECTS,
}
}
commit 9eca8f9b0755eaeb1104a8e699a463f0ac127040
Author: Stephen Smith <stephen at curii.com>
Date: Mon Nov 6 09:44:20 2023 -0500
20609: Add subprogress progress bar along with required bootstrap/coreUI styles
Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen at curii.com>
diff --git a/package.json b/package.json
index 35c960c418..acc2db6ae1 100644
--- a/package.json
+++ b/package.json
@@ -3,6 +3,8 @@
"version": "0.1.0",
"private": true,
"dependencies": {
+ "@coreui/coreui": "next",
+ "@coreui/react": "next",
"@date-io/date-fns": "1",
"@fortawesome/fontawesome-svg-core": "1.2.28",
"@fortawesome/free-solid-svg-icons": "5.13.0",
@@ -27,6 +29,7 @@
"axios": "^0.21.1",
"babel-core": "6.26.3",
"babel-runtime": "6.26.0",
+ "bootstrap": "^5.3.2",
"caniuse-lite": "1.0.30001299",
"classnames": "2.2.6",
"cwlts": "1.15.29",
diff --git a/src/components/data-explorer/data-explorer.tsx b/src/components/data-explorer/data-explorer.tsx
index ad5762dfeb..7657ae042b 100644
--- a/src/components/data-explorer/data-explorer.tsx
+++ b/src/components/data-explorer/data-explorer.tsx
@@ -79,6 +79,7 @@ interface DataExplorerDataProps<T> {
actions?: React.ReactNode;
hideSearchInput?: boolean;
title?: React.ReactNode;
+ toolbar?: React.ReactNode;
paperKey?: string;
currentItemUuid: string;
elementPath?: string;
@@ -181,6 +182,7 @@ export const DataExplorer = withStyles(styles)(
fetchMode,
currentItemUuid,
title,
+ toolbar,
doHidePanel,
doMaximizePanel,
doUnMaximizePanel,
@@ -277,6 +279,7 @@ export const DataExplorer = withStyles(styles)(
<MultiselectToolbar />
</Grid>
)}
+ {toolbar && (toolbar)}
</div>
<Grid
item
diff --git a/src/components/subprocess-progress-bar/subprocess-progress-bar.tsx b/src/components/subprocess-progress-bar/subprocess-progress-bar.tsx
new file mode 100644
index 0000000000..1d467eea65
--- /dev/null
+++ b/src/components/subprocess-progress-bar/subprocess-progress-bar.tsx
@@ -0,0 +1,97 @@
+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
+import React, { useEffect, useState } from "react";
+import { StyleRulesCallback, Typography, WithStyles, withStyles } from "@material-ui/core";
+import { CProgressStacked, CProgress } from '@coreui/react';
+import { useAsyncInterval } from "common/use-async-interval";
+import { Process, isProcessRunning } from "store/processes/process";
+import { connect } from "react-redux";
+import { Dispatch } from "redux";
+import { fetchSubprocessProgress } from "store/subprocess-panel/subprocess-panel-actions";
+import { ProcessStatusFilter } from "store/resource-type-filters/resource-type-filters";
+
+type CssRules = 'progressWrapper' | 'progressStacked' ;
+
+const styles: StyleRulesCallback<CssRules> = (theme) => ({
+ progressWrapper: {
+ margin: "0 20px",
+ },
+ progressStacked: {
+ border: "1px solid gray",
+ // Override stripe color to be close to white
+ "& .progress-bar-striped": {
+ backgroundImage:
+ "linear-gradient(45deg,rgba(255,255,255,.80) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.80) 50%,rgba(255,255,255,.80) 75%,transparent 75%,transparent)",
+ },
+ },
+});
+
+export interface ProgressBarDataProps {
+ process: Process;
+}
+
+export interface ProgressBarActionProps {
+ fetchSubprocessProgress: (requestingContainerUuid: string) => Promise<ProgressBarData | undefined>;
+}
+
+type ProgressBarProps = ProgressBarDataProps & ProgressBarActionProps & WithStyles<CssRules>;
+
+export type ProgressBarData = {
+ [ProcessStatusFilter.COMPLETED]: number;
+ [ProcessStatusFilter.RUNNING]: number;
+ [ProcessStatusFilter.FAILED]: number;
+ [ProcessStatusFilter.QUEUED]: number;
+};
+
+const mapDispatchToProps = (dispatch: Dispatch): ProgressBarActionProps => ({
+ fetchSubprocessProgress: (requestingContainerUuid: string) => {
+ return dispatch<any>(fetchSubprocessProgress(requestingContainerUuid));
+ },
+});
+
+export const SubprocessProgressBar = connect(null, mapDispatchToProps)(withStyles(styles)(
+ ({process, classes, fetchSubprocessProgress}: ProgressBarProps) => {
+
+ const [progressData, setProgressData] = useState<ProgressBarData|undefined>(undefined);
+ const requestingContainerUuid = process.containerRequest.containerUuid;
+ const isRunning = isProcessRunning(process);
+
+ useAsyncInterval(async () => (
+ requestingContainerUuid && setProgressData(await fetchSubprocessProgress(requestingContainerUuid))
+ ), isRunning ? 5000 : null);
+
+ useEffect(() => {
+ if (!isRunning && requestingContainerUuid) {
+ fetchSubprocessProgress(requestingContainerUuid)
+ .then(result => setProgressData(result));
+ }
+ }, [fetchSubprocessProgress, isRunning, requestingContainerUuid]);
+
+ return progressData !== undefined && getStatusTotal(progressData) > 0 ? <div className={classes.progressWrapper}>
+ <CProgressStacked className={classes.progressStacked}>
+ <CProgress height={20} color="success" title="Completed"
+ value={getStatusPercent(progressData, ProcessStatusFilter.COMPLETED)} />
+ <CProgress height={20} color="success" title="Running" variant="striped" animated
+ value={getStatusPercent(progressData, ProcessStatusFilter.RUNNING)} />
+ <CProgress height={20} color="danger" title="Failed"
+ value={getStatusPercent(progressData, ProcessStatusFilter.FAILED)} />
+ <CProgress height={20} color="secondary" title="Queued" variant="striped" animated
+ value={getStatusPercent(progressData, ProcessStatusFilter.QUEUED)} />
+ </CProgressStacked>
+ <Typography variant="body2">
+ {progressData[ProcessStatusFilter.COMPLETED]} Completed, {progressData[ProcessStatusFilter.RUNNING]} Running, {progressData[ProcessStatusFilter.FAILED]} Failed, {progressData[ProcessStatusFilter.QUEUED]} Queued
+ </Typography>
+ </div> : <></>;
+ }
+));
+
+const getStatusTotal = (progressData: ProgressBarData) =>
+ (Object.keys(progressData).reduce((accumulator, key) => (accumulator += progressData[key]), 0));
+
+/**
+ * Gets the integer percent value for process status
+ */
+const getStatusPercent = (progressData: ProgressBarData, status: keyof ProgressBarData) =>
+ (progressData[status] / getStatusTotal(progressData) * 100);
diff --git a/src/index.tsx b/src/index.tsx
index ede257dc5d..ef9ff9c986 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -91,6 +91,9 @@ import { workflowActionSet, readOnlyWorkflowActionSet } from "views-components/c
import { storeRedirects } from "./common/redirect-to";
import { searchResultsActionSet } from "views-components/context-menu/action-sets/search-results-action-set";
+import 'bootstrap/dist/css/bootstrap.min.css';
+import '@coreui/coreui/dist/css/coreui.min.css';
+
console.log(`Starting arvados [${getBuildInfo()}]`);
addMenuActionSet(ContextMenuKind.ROOT_PROJECT, rootProjectActionSet);
diff --git a/src/store/subprocess-panel/subprocess-panel-actions.ts b/src/store/subprocess-panel/subprocess-panel-actions.ts
index b440776ce0..68ed453f1a 100644
--- a/src/store/subprocess-panel/subprocess-panel-actions.ts
+++ b/src/store/subprocess-panel/subprocess-panel-actions.ts
@@ -6,6 +6,9 @@ import { Dispatch } from 'redux';
import { RootState } from 'store/store';
import { ServiceRepository } from 'services/services';
import { bindDataExplorerActions } from 'store/data-explorer/data-explorer-action';
+import { FilterBuilder } from 'services/api/filter-builder';
+import { ProgressBarData } from 'components/subprocess-progress-bar/subprocess-progress-bar';
+import { ProcessStatusFilter, buildProcessStatusFilters } from 'store/resource-type-filters/resource-type-filters';
export const SUBPROCESS_PANEL_ID = "subprocessPanel";
export const SUBPROCESS_ATTRIBUTES_DIALOG = 'subprocessAttributesDialog';
export const subprocessPanelActions = bindDataExplorerActions(SUBPROCESS_PANEL_ID);
@@ -14,3 +17,52 @@ export const loadSubprocessPanel = () =>
(dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
dispatch(subprocessPanelActions.REQUEST_ITEMS());
};
+
+type ProcessStatusCount = {
+ status: keyof ProgressBarData;
+ count: number;
+};
+
+export const fetchSubprocessProgress = (requestingContainerUuid: string) =>
+ async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository): Promise<ProgressBarData | undefined> => {
+
+ const requestContainerStatusCount = async (fb: FilterBuilder) => {
+ return await services.containerRequestService.list({
+ limit: 0,
+ offset: 0,
+ filters: fb.getFilters(),
+ });
+ }
+
+ if (requestingContainerUuid) {
+ try {
+ const baseFilter = new FilterBuilder().addEqual('requesting_container_uuid', requestingContainerUuid).getFilters();
+
+ // Create return object
+ let result: ProgressBarData = {
+ [ProcessStatusFilter.COMPLETED]: 0,
+ [ProcessStatusFilter.RUNNING]: 0,
+ [ProcessStatusFilter.FAILED]: 0,
+ [ProcessStatusFilter.QUEUED]: 0,
+ }
+
+ // Create array of promises that returns the status associated with the item count
+ // Helps to make the requests simultaneously while preserving the association with the status key as a typed key
+ const promises = Object.keys(result).map(async (status: keyof ProgressBarData): Promise<ProcessStatusCount> => {
+ const filter = buildProcessStatusFilters(new FilterBuilder(baseFilter), status);
+ const count = (await requestContainerStatusCount(filter)).itemsAvailable;
+ return {status, count};
+ });
+
+ // Simultaneously requests each status count and apply them to the return object
+ (await Promise.all(promises)).forEach((singleResult) => {
+ result[singleResult.status] = singleResult.count;
+ });
+ return result;
+ } catch (e) {
+ return undefined;
+ }
+ } else {
+ return undefined;
+ }
+ };
diff --git a/src/views/process-panel/process-panel-root.tsx b/src/views/process-panel/process-panel-root.tsx
index 7a24089901..c972c0a6cf 100644
--- a/src/views/process-panel/process-panel-root.tsx
+++ b/src/views/process-panel/process-panel-root.tsx
@@ -205,7 +205,7 @@ export const ProcessPanelRoot = withStyles(styles)(
xs
maxHeight="50%"
data-cy="process-children">
- <SubprocessPanel />
+ <SubprocessPanel process={process} />
</MPVPanelContent>
</MPVContainer>
) : (
diff --git a/src/views/subprocess-panel/subprocess-panel-root.tsx b/src/views/subprocess-panel/subprocess-panel-root.tsx
index 9cf1db7753..33a1027585 100644
--- a/src/views/subprocess-panel/subprocess-panel-root.tsx
+++ b/src/views/subprocess-panel/subprocess-panel-root.tsx
@@ -20,6 +20,8 @@ import { MPVPanelProps } from 'components/multi-panel-view/multi-panel-view';
import { StyleRulesCallback, Typography, WithStyles, withStyles } from '@material-ui/core';
import { ArvadosTheme } from 'common/custom-theme';
import { ProcessResource } from 'models/process';
+import { SubprocessProgressBar } from 'components/subprocess-progress-bar/subprocess-progress-bar';
+import { Process } from 'store/processes/process';
type CssRules = 'iconHeader' | 'cardHeader';
@@ -80,6 +82,7 @@ export const subprocessPanelColumns: DataColumns<string, ProcessResource> = [
];
export interface SubprocessPanelDataProps {
+ process: Process;
resources: ResourcesState;
}
@@ -122,5 +125,6 @@ export const SubprocessPanelRoot = (props: SubprocessPanelProps & MPVPanelProps)
doUnMaximizePanel={props.doUnMaximizePanel}
panelMaximized={props.panelMaximized}
panelName={props.panelName}
- title={<SubProcessesTitle/>} />;
+ title={<SubProcessesTitle/>}
+ toolbar={<SubprocessProgressBar process={props.process} />} />;
};
diff --git a/src/views/subprocess-panel/subprocess-panel.tsx b/src/views/subprocess-panel/subprocess-panel.tsx
index 0aa02d5270..c52f054b0a 100644
--- a/src/views/subprocess-panel/subprocess-panel.tsx
+++ b/src/views/subprocess-panel/subprocess-panel.tsx
@@ -26,7 +26,7 @@ const mapDispatchToProps = (dispatch: Dispatch): SubprocessPanelActionProps => (
},
});
-const mapStateToProps = (state: RootState): SubprocessPanelDataProps => ({
+const mapStateToProps = (state: RootState): Omit<SubprocessPanelDataProps,'process'> => ({
resources: state.resources,
});
diff --git a/yarn.lock b/yarn.lock
index f9dfa6a954..142694c883 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1646,6 +1646,26 @@ __metadata:
languageName: node
linkType: hard
+"@coreui/coreui at npm:next":
+ version: 5.0.0-alpha.3
+ resolution: "@coreui/coreui at npm:5.0.0-alpha.3"
+ peerDependencies:
+ "@popperjs/core": ^2.11.8
+ checksum: 2363ad6be775c6a895a49126a5b9062ffa9ebd0bea6dfb835c1300cd122fb1cf18d85fe647a9c08a3a384caa871e761d8ffb28ea45c7872cb2b034df6527da20
+ languageName: node
+ linkType: hard
+
+"@coreui/react at npm:next":
+ version: 5.0.0-alpha.3
+ resolution: "@coreui/react at npm:5.0.0-alpha.3"
+ peerDependencies:
+ "@coreui/coreui": ^5.0.0-alpha.2
+ react: ">=17"
+ react-dom: ">=17"
+ checksum: efd333cc346307219dcf7fe183eed65305b12e71984bcb940d80a55509d7b92523082e37045bfcb8c4b334920ca185128a9f72f3e8bec69d15cad889cbeda4b4
+ languageName: node
+ linkType: hard
+
"@csstools/convert-colors at npm:^1.4.0":
version: 1.4.0
resolution: "@csstools/convert-colors at npm:1.4.0"
@@ -3800,6 +3820,8 @@ __metadata:
version: 0.0.0-use.local
resolution: "arvados-workbench-2 at workspace:."
dependencies:
+ "@coreui/coreui": next
+ "@coreui/react": next
"@date-io/date-fns": 1
"@fortawesome/fontawesome-svg-core": 1.2.28
"@fortawesome/free-solid-svg-icons": 5.13.0
@@ -3841,6 +3863,7 @@ __metadata:
axios-mock-adapter: 1.17.0
babel-core: 6.26.3
babel-runtime: 6.26.0
+ bootstrap: ^5.3.2
caniuse-lite: 1.0.30001299
classnames: 2.2.6
cwlts: 1.15.29
@@ -4605,6 +4628,15 @@ __metadata:
languageName: node
linkType: hard
+"bootstrap at npm:^5.3.2":
+ version: 5.3.2
+ resolution: "bootstrap at npm:5.3.2"
+ peerDependencies:
+ "@popperjs/core": ^2.11.8
+ checksum: d5580b253d121ffc137388d41da58dce8d15f1ccd574e12f28d4a08e7649ca15e95db645b2b677cb8025bccd446bff04138fc0fe64f8cba0ccc5dc004a8644cf
+ languageName: node
+ linkType: hard
+
"brace-expansion at npm:^1.1.7":
version: 1.1.11
resolution: "brace-expansion at npm:1.1.11"
commit ef5e2f624a7f51fc326a7ef34e8c12134b108ab4
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Mon Nov 6 09:26:37 2023 -0500
19302: fixed home directory icon Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/src/views-components/side-panel-tree/side-panel-tree.tsx b/src/views-components/side-panel-tree/side-panel-tree.tsx
index 6814a31eb1..0943fe1dc8 100644
--- a/src/views-components/side-panel-tree/side-panel-tree.tsx
+++ b/src/views-components/side-panel-tree/side-panel-tree.tsx
@@ -64,7 +64,7 @@ const getProjectPickerIcon = (item: TreeItem<ProjectResource | string>) =>
? getSidePanelIcon(item.data)
: (item.data && item.data.groupClass === GroupClass.FILTER)
? FilterGroupIcon
- : ProjectIcon;
+ : ProjectsIcon;
export const getSidePanelIcon = (category: string) => {
switch (category) {
commit ce84334e25316fdf1671bdf5ce8acda9c1a455de
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Mon Nov 6 09:11:35 2023 -0500
19302: fixed node limit var Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/src/store/side-panel-tree/side-panel-tree-actions.ts b/src/store/side-panel-tree/side-panel-tree-actions.ts
index 579b95505e..71c72cd32d 100644
--- a/src/store/side-panel-tree/side-panel-tree-actions.ts
+++ b/src/store/side-panel-tree/side-panel-tree-actions.ts
@@ -29,7 +29,7 @@ export enum SidePanelTreeCategory {
}
export const SIDE_PANEL_TREE = 'sidePanelTree';
-const TREE_NODE_LIMIT = 50
+const SP_TREE_NODE_LIMIT = 50
export const getSidePanelTree = (treePicker: TreePicker) =>
getTreePicker<ProjectResource | string>(SIDE_PANEL_TREE)(treePicker);
@@ -136,7 +136,7 @@ export const loadFavoritesTree = () => async (dispatch: Dispatch, getState: () =
.addEqual('tail_kind', ResourceKind.USER)
.getFilters(),
order: new OrderBuilder<ProjectResource>().addDesc('createdAt').getOrder(),
- limit: 50,
+ limit: SP_TREE_NODE_LIMIT,
};
const { items } = await services.linkService.list(params);
@@ -166,7 +166,7 @@ export const loadPublicFavoritesTree = () => async (dispatch: Dispatch, getState
.addIsA('head_uuid', typeFilters)
.getFilters(),
order: new OrderBuilder<ProjectResource>().addDesc('createdAt').getOrder(),
- limit: TREE_NODE_LIMIT,
+ limit: SP_TREE_NODE_LIMIT,
};
const { items } = await services.linkService.list(params);
commit 992d07cd979b34d79fbe3135be089a86b13f0201
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Fri Nov 3 14:52:50 2023 -0400
19302: removed .only in test spec Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/cypress/integration/project.spec.js b/cypress/integration/project.spec.js
index a8663d8622..e61138219d 100644
--- a/cypress/integration/project.spec.js
+++ b/cypress/integration/project.spec.js
@@ -564,7 +564,7 @@ describe("Project tests", function () {
);
});
- it.only("sorts displayed items correctly", () => {
+ it("sorts displayed items correctly", () => {
cy.loginAs(activeUser);
cy.get('[data-cy=project-panel] button[title="Select columns"]').click();
diff --git a/src/views-components/side-panel/side-panel-collapsed.tsx b/src/views-components/side-panel/side-panel-collapsed.tsx
index 2fddf82f54..338d9b3eef 100644
--- a/src/views-components/side-panel/side-panel-collapsed.tsx
+++ b/src/views-components/side-panel/side-panel-collapsed.tsx
@@ -2,7 +2,7 @@
//
// SPDX-License-Identifier: AGPL-3.0
-import React, { ReactElement, useEffect, useState } from 'react'
+import React, { ReactElement } from 'react'
import { connect } from 'react-redux'
import { ProjectsIcon, ProcessIcon, FavoriteIcon, ShareMeIcon, TrashIcon, PublicFavoriteIcon, GroupsIcon } from 'components/icon/icon'
import { List, ListItem, Tooltip } from '@material-ui/core'
@@ -20,7 +20,6 @@ import {
navigateToTrash,
} from 'store/navigation/navigation-action'
import { RouterAction } from 'react-router-redux'
-import { Tree } from 'models/tree'
type CssRules = 'root' | 'unselected' | 'selected'
commit 37a104a131a5121b213146fb4ee1b18bc822df90
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Fri Nov 3 14:21:48 2023 -0400
19302: removed useeffect Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/src/views-components/side-panel/side-panel-collapsed.tsx b/src/views-components/side-panel/side-panel-collapsed.tsx
index 6d19c8e0a8..2fddf82f54 100644
--- a/src/views-components/side-panel/side-panel-collapsed.tsx
+++ b/src/views-components/side-panel/side-panel-collapsed.tsx
@@ -104,9 +104,6 @@ const mapDispatchToProps = (dispatch: Dispatch) => {
export const SidePanelCollapsed = withStyles(styles)(
connect(mapStateToProps, mapDispatchToProps)(({ classes, user, selectedPath, navToHome, navTo }: WithStyles & any) => {
- const [selectedIcon, setSelectedIcon] = useState(selectedPath)
-
- useEffect(() => setSelectedIcon(selectedPath), [selectedPath])
const handleClick = (cat: TCollapsedCategory) => {
if (cat.name === SidePanelCollapsedCategory.PROJECTS) navToHome(user.uuid)
@@ -119,7 +116,7 @@ export const SidePanelCollapsed = withStyles(styles)(
{sidePanelCollapsedCategories.map((cat) => (
<ListItem
key={cat.name}
- className={selectedIcon === cat.name ? selected : unselected}
+ className={selectedPath === cat.name ? selected : unselected}
onClick={() => handleClick(cat)}
>
<Tooltip
commit c178ba288276f6383703fb9b7e513ff78f68b917
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Fri Nov 3 14:15:50 2023 -0400
19302: added useeffect for icon highlight Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/src/views-components/side-panel/side-panel-collapsed.tsx b/src/views-components/side-panel/side-panel-collapsed.tsx
index 8458daf836..6d19c8e0a8 100644
--- a/src/views-components/side-panel/side-panel-collapsed.tsx
+++ b/src/views-components/side-panel/side-panel-collapsed.tsx
@@ -2,7 +2,7 @@
//
// SPDX-License-Identifier: AGPL-3.0
-import React, { ReactElement, useState } from 'react'
+import React, { ReactElement, useEffect, useState } from 'react'
import { connect } from 'react-redux'
import { ProjectsIcon, ProcessIcon, FavoriteIcon, ShareMeIcon, TrashIcon, PublicFavoriteIcon, GroupsIcon } from 'components/icon/icon'
import { List, ListItem, Tooltip } from '@material-ui/core'
@@ -106,8 +106,9 @@ export const SidePanelCollapsed = withStyles(styles)(
connect(mapStateToProps, mapDispatchToProps)(({ classes, user, selectedPath, navToHome, navTo }: WithStyles & any) => {
const [selectedIcon, setSelectedIcon] = useState(selectedPath)
+ useEffect(() => setSelectedIcon(selectedPath), [selectedPath])
+
const handleClick = (cat: TCollapsedCategory) => {
- setSelectedIcon(selectedPath)
if (cat.name === SidePanelCollapsedCategory.PROJECTS) navToHome(user.uuid)
else navTo(cat.navTarget)
}
commit 5f48a19354d8503c7967c22af2caedf30f1f1056
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Fri Nov 3 14:08:16 2023 -0400
19302: fixed selected icon updateArvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/src/views-components/side-panel/side-panel-collapsed.tsx b/src/views-components/side-panel/side-panel-collapsed.tsx
index 38c59abb23..8458daf836 100644
--- a/src/views-components/side-panel/side-panel-collapsed.tsx
+++ b/src/views-components/side-panel/side-panel-collapsed.tsx
@@ -107,7 +107,7 @@ export const SidePanelCollapsed = withStyles(styles)(
const [selectedIcon, setSelectedIcon] = useState(selectedPath)
const handleClick = (cat: TCollapsedCategory) => {
- setSelectedIcon(cat.name)
+ setSelectedIcon(selectedPath)
if (cat.name === SidePanelCollapsedCategory.PROJECTS) navToHome(user.uuid)
else navTo(cat.navTarget)
}
commit 525f8b0afcbeee6bea0cc1f3fc7c3a249fde995a
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Fri Nov 3 14:06:24 2023 -0400
19302: changed source of selected icon Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/src/views-components/side-panel/side-panel-collapsed.tsx b/src/views-components/side-panel/side-panel-collapsed.tsx
index a813b703de..38c59abb23 100644
--- a/src/views-components/side-panel/side-panel-collapsed.tsx
+++ b/src/views-components/side-panel/side-panel-collapsed.tsx
@@ -88,19 +88,10 @@ const sidePanelCollapsedCategories: TCollapsedCategory[] = [
},
]
-const findSelectedPath = (tree: Tree<any>) => {
- for (const category in tree) {
- if (tree[category].active === true) {
- return tree[category].id
- }
- }
- return null
-}
-
const mapStateToProps = (state: RootState) => {
return {
user: state.auth.user,
- selectedPath: findSelectedPath(state.treePicker.sidePanelTree),
+ selectedPath: state.properties.breadcrumbs[0].label,
}
}
commit 5d6640046afef7dc3714b784430e18bf2f2153fe
Merge: b4d518c977 8e913832ad
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Fri Nov 3 13:39:21 2023 -0400
Merge branch 'main' into 19302-left-side-panel-changes
refs #19302
Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
commit b4d518c97713bc542abfb8f4041ae25b82db3764
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Fri Nov 3 11:17:38 2023 -0400
19302: side panel selected highlight works Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/src/views-components/side-panel-toggle/side-panel-toggle.tsx b/src/views-components/side-panel-toggle/side-panel-toggle.tsx
index 0de66d4500..dada57d81d 100644
--- a/src/views-components/side-panel-toggle/side-panel-toggle.tsx
+++ b/src/views-components/side-panel-toggle/side-panel-toggle.tsx
@@ -21,7 +21,7 @@ const SidePanelToggle = (props: collapseButtonProps) => {
width: `${COLLAPSE_ICON_SIZE}px`,
height: `${COLLAPSE_ICON_SIZE}px`,
marginTop: '0.4rem',
- marginLeft: '0.6rem'
+ marginLeft: '0.7rem',
},
icon: {
opacity: '0.5',
diff --git a/src/views-components/side-panel/side-panel-collapsed.tsx b/src/views-components/side-panel/side-panel-collapsed.tsx
index ba829f6c30..a813b703de 100644
--- a/src/views-components/side-panel/side-panel-collapsed.tsx
+++ b/src/views-components/side-panel/side-panel-collapsed.tsx
@@ -2,7 +2,7 @@
//
// SPDX-License-Identifier: AGPL-3.0
-import React, { ReactElement } from 'react'
+import React, { ReactElement, useState } from 'react'
import { connect } from 'react-redux'
import { ProjectsIcon, ProcessIcon, FavoriteIcon, ShareMeIcon, TrashIcon, PublicFavoriteIcon, GroupsIcon } from 'components/icon/icon'
import { List, ListItem, Tooltip } from '@material-ui/core'
@@ -20,14 +20,18 @@ import {
navigateToTrash,
} from 'store/navigation/navigation-action'
import { RouterAction } from 'react-router-redux'
+import { Tree } from 'models/tree'
-type CssRules = 'root' | 'icon'
+type CssRules = 'root' | 'unselected' | 'selected'
const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
root: {},
- icon: {
+ unselected: {
color: theme.customs.colors.grey700,
},
+ selected: {
+ color: theme.palette.primary.main,
+ },
})
enum SidePanelCollapsedCategory {
@@ -84,9 +88,19 @@ const sidePanelCollapsedCategories: TCollapsedCategory[] = [
},
]
+const findSelectedPath = (tree: Tree<any>) => {
+ for (const category in tree) {
+ if (tree[category].active === true) {
+ return tree[category].id
+ }
+ }
+ return null
+}
+
const mapStateToProps = (state: RootState) => {
return {
user: state.auth.user,
+ selectedPath: findSelectedPath(state.treePicker.sidePanelTree),
}
}
@@ -98,19 +112,22 @@ const mapDispatchToProps = (dispatch: Dispatch) => {
}
export const SidePanelCollapsed = withStyles(styles)(
- connect(mapStateToProps, mapDispatchToProps)(({ classes, user, navToHome, navTo }: WithStyles & any) => {
+ connect(mapStateToProps, mapDispatchToProps)(({ classes, user, selectedPath, navToHome, navTo }: WithStyles & any) => {
+ const [selectedIcon, setSelectedIcon] = useState(selectedPath)
const handleClick = (cat: TCollapsedCategory) => {
+ setSelectedIcon(cat.name)
if (cat.name === SidePanelCollapsedCategory.PROJECTS) navToHome(user.uuid)
else navTo(cat.navTarget)
}
+ const { root, unselected, selected } = classes
return (
- <List>
- {sidePanelCollapsedCategories.map(cat => (
+ <List className={root}>
+ {sidePanelCollapsedCategories.map((cat) => (
<ListItem
key={cat.name}
- className={classes.icon}
+ className={selectedIcon === cat.name ? selected : unselected}
onClick={() => handleClick(cat)}
>
<Tooltip
commit c314adae7b1551ef6682d4a3760bda5787b989ce
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Fri Nov 3 10:37:31 2023 -0400
19302: side panel nav works Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/src/views-components/side-panel/side-panel-collapsed.tsx b/src/views-components/side-panel/side-panel-collapsed.tsx
index e25fff6eb0..ba829f6c30 100644
--- a/src/views-components/side-panel/side-panel-collapsed.tsx
+++ b/src/views-components/side-panel/side-panel-collapsed.tsx
@@ -3,11 +3,23 @@
// SPDX-License-Identifier: AGPL-3.0
import React, { ReactElement } from 'react'
-import { ProjectIcon, ProcessIcon, FavoriteIcon, ShareMeIcon, TrashIcon, PublicFavoriteIcon, GroupsIcon } from 'components/icon/icon'
+import { connect } from 'react-redux'
+import { ProjectsIcon, ProcessIcon, FavoriteIcon, ShareMeIcon, TrashIcon, PublicFavoriteIcon, GroupsIcon } from 'components/icon/icon'
import { List, ListItem, Tooltip } from '@material-ui/core'
import { StyleRulesCallback, WithStyles, withStyles } from '@material-ui/core/styles'
import { ArvadosTheme } from 'common/custom-theme'
import { navigateTo } from 'store/navigation/navigation-action'
+import { RootState } from 'store/store'
+import { Dispatch } from 'redux'
+import {
+ navigateToSharedWithMe,
+ navigateToPublicFavorites,
+ navigateToFavorites,
+ navigateToGroups,
+ navigateToAllProcesses,
+ navigateToTrash,
+} from 'store/navigation/navigation-action'
+import { RouterAction } from 'react-router-redux'
type CssRules = 'root' | 'icon'
@@ -23,78 +35,93 @@ enum SidePanelCollapsedCategory {
SHARED_WITH_ME = 'Shared with me',
PUBLIC_FAVORITES = 'Public Favorites',
FAVORITES = 'My Favorites',
- TRASH = 'Trash',
- ALL_PROCESSES = 'All Processes',
GROUPS = 'Groups',
+ ALL_PROCESSES = 'All Processes',
+ TRASH = 'Trash',
}
type TCollapsedCategory = {
name: SidePanelCollapsedCategory
icon: ReactElement
- navTarget: string
+ navTarget: RouterAction | ''
}
const sidePanelCollapsedCategories: TCollapsedCategory[] = [
{
name: SidePanelCollapsedCategory.PROJECTS,
- icon: <ProjectIcon />,
- navTarget: 'foo',
+ icon: <ProjectsIcon />,
+ navTarget: '',
},
{
name: SidePanelCollapsedCategory.SHARED_WITH_ME,
icon: <ShareMeIcon />,
- navTarget: 'foo',
+ navTarget: navigateToSharedWithMe,
},
{
name: SidePanelCollapsedCategory.PUBLIC_FAVORITES,
icon: <PublicFavoriteIcon />,
- navTarget: 'public-favorites',
+ navTarget: navigateToPublicFavorites,
},
{
name: SidePanelCollapsedCategory.FAVORITES,
icon: <FavoriteIcon />,
- navTarget: 'foo',
+ navTarget: navigateToFavorites,
},
{
name: SidePanelCollapsedCategory.GROUPS,
icon: <GroupsIcon />,
- navTarget: 'foo',
+ navTarget: navigateToGroups,
},
{
name: SidePanelCollapsedCategory.ALL_PROCESSES,
icon: <ProcessIcon />,
- navTarget: 'foo',
+ navTarget: navigateToAllProcesses,
},
{
name: SidePanelCollapsedCategory.TRASH,
icon: <TrashIcon />,
- navTarget: 'foo',
+ navTarget: navigateToTrash,
},
]
-export const SidePanelCollapsed = withStyles(styles)(({ classes }: WithStyles) => {
+const mapStateToProps = (state: RootState) => {
+ return {
+ user: state.auth.user,
+ }
+}
- const handleClick = (navTarget: string) => {
- console.log(navTarget)
- navigateTo(navTarget)
+const mapDispatchToProps = (dispatch: Dispatch) => {
+ return {
+ navToHome: (navTarget) => dispatch<any>(navigateTo(navTarget)),
+ navTo: (navTarget) => dispatch<any>(navTarget),
}
+}
+
+export const SidePanelCollapsed = withStyles(styles)(
+ connect(mapStateToProps, mapDispatchToProps)(({ classes, user, navToHome, navTo }: WithStyles & any) => {
- return (
- <List>
- {sidePanelCollapsedCategories.map(cat => (
- <ListItem
- key={cat.name}
- className={classes.icon}
- onClick={()=> handleClick(cat.navTarget)}
- >
- <Tooltip
- title={cat.name}
- disableFocusListener
+ const handleClick = (cat: TCollapsedCategory) => {
+ if (cat.name === SidePanelCollapsedCategory.PROJECTS) navToHome(user.uuid)
+ else navTo(cat.navTarget)
+ }
+
+ return (
+ <List>
+ {sidePanelCollapsedCategories.map(cat => (
+ <ListItem
+ key={cat.name}
+ className={classes.icon}
+ onClick={() => handleClick(cat)}
>
- {cat.icon}
- </Tooltip>
- </ListItem>
- ))}
- </List>
- )
-})
+ <Tooltip
+ title={cat.name}
+ disableFocusListener
+ >
+ {cat.icon}
+ </Tooltip>
+ </ListItem>
+ ))}
+ </List>
+ )
+ })
+)
commit 9fe1e9ff7d9af167f0ee350ab5a68ded128d8043
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Thu Nov 2 14:39:55 2023 -0400
19302: side panel icons in place Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/src/views-components/side-panel-toggle/side-panel-toggle.tsx b/src/views-components/side-panel-toggle/side-panel-toggle.tsx
index 0bcfbd3de9..0de66d4500 100644
--- a/src/views-components/side-panel-toggle/side-panel-toggle.tsx
+++ b/src/views-components/side-panel-toggle/side-panel-toggle.tsx
@@ -20,7 +20,8 @@ const SidePanelToggle = (props: collapseButtonProps) => {
root: {
width: `${COLLAPSE_ICON_SIZE}px`,
height: `${COLLAPSE_ICON_SIZE}px`,
- marginTop: '0.4rem'
+ marginTop: '0.4rem',
+ marginLeft: '0.6rem'
},
icon: {
opacity: '0.5',
@@ -31,9 +32,9 @@ const SidePanelToggle = (props: collapseButtonProps) => {
<IconButton style={collapseButtonIconStyles.root} onClick={() => { props.toggleSidePanel(props.isCollapsed) }}>
<div>
{props.isCollapsed ?
- <img style={collapseButtonIconStyles.icon} src='/mui-start-icon.svg'/>
+ <img style={collapseButtonIconStyles.icon} src='/mui-start-icon.svg' alt='an arrow pointing right'/>
:
- <img style={{ ...collapseButtonIconStyles.icon, transform: "rotate(180deg)"}} src='/mui-start-icon.svg'/>}
+ <img style={{ ...collapseButtonIconStyles.icon, transform: "rotate(180deg)"}} src='/mui-start-icon.svg' alt='an arrow pointing right'/>}
</div>
</IconButton>
</Tooltip>
diff --git a/src/views-components/side-panel/side-panel-collapsed.tsx b/src/views-components/side-panel/side-panel-collapsed.tsx
new file mode 100644
index 0000000000..e25fff6eb0
--- /dev/null
+++ b/src/views-components/side-panel/side-panel-collapsed.tsx
@@ -0,0 +1,100 @@
+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
+import React, { ReactElement } from 'react'
+import { ProjectIcon, ProcessIcon, FavoriteIcon, ShareMeIcon, TrashIcon, PublicFavoriteIcon, GroupsIcon } from 'components/icon/icon'
+import { List, ListItem, Tooltip } from '@material-ui/core'
+import { StyleRulesCallback, WithStyles, withStyles } from '@material-ui/core/styles'
+import { ArvadosTheme } from 'common/custom-theme'
+import { navigateTo } from 'store/navigation/navigation-action'
+
+type CssRules = 'root' | 'icon'
+
+const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
+ root: {},
+ icon: {
+ color: theme.customs.colors.grey700,
+ },
+})
+
+enum SidePanelCollapsedCategory {
+ PROJECTS = 'Home Projects',
+ SHARED_WITH_ME = 'Shared with me',
+ PUBLIC_FAVORITES = 'Public Favorites',
+ FAVORITES = 'My Favorites',
+ TRASH = 'Trash',
+ ALL_PROCESSES = 'All Processes',
+ GROUPS = 'Groups',
+}
+
+type TCollapsedCategory = {
+ name: SidePanelCollapsedCategory
+ icon: ReactElement
+ navTarget: string
+}
+
+const sidePanelCollapsedCategories: TCollapsedCategory[] = [
+ {
+ name: SidePanelCollapsedCategory.PROJECTS,
+ icon: <ProjectIcon />,
+ navTarget: 'foo',
+ },
+ {
+ name: SidePanelCollapsedCategory.SHARED_WITH_ME,
+ icon: <ShareMeIcon />,
+ navTarget: 'foo',
+ },
+ {
+ name: SidePanelCollapsedCategory.PUBLIC_FAVORITES,
+ icon: <PublicFavoriteIcon />,
+ navTarget: 'public-favorites',
+ },
+ {
+ name: SidePanelCollapsedCategory.FAVORITES,
+ icon: <FavoriteIcon />,
+ navTarget: 'foo',
+ },
+ {
+ name: SidePanelCollapsedCategory.GROUPS,
+ icon: <GroupsIcon />,
+ navTarget: 'foo',
+ },
+ {
+ name: SidePanelCollapsedCategory.ALL_PROCESSES,
+ icon: <ProcessIcon />,
+ navTarget: 'foo',
+ },
+ {
+ name: SidePanelCollapsedCategory.TRASH,
+ icon: <TrashIcon />,
+ navTarget: 'foo',
+ },
+]
+
+export const SidePanelCollapsed = withStyles(styles)(({ classes }: WithStyles) => {
+
+ const handleClick = (navTarget: string) => {
+ console.log(navTarget)
+ navigateTo(navTarget)
+ }
+
+ return (
+ <List>
+ {sidePanelCollapsedCategories.map(cat => (
+ <ListItem
+ key={cat.name}
+ className={classes.icon}
+ onClick={()=> handleClick(cat.navTarget)}
+ >
+ <Tooltip
+ title={cat.name}
+ disableFocusListener
+ >
+ {cat.icon}
+ </Tooltip>
+ </ListItem>
+ ))}
+ </List>
+ )
+})
diff --git a/src/views-components/side-panel/side-panel.tsx b/src/views-components/side-panel/side-panel.tsx
index 4953022d66..18aed873aa 100644
--- a/src/views-components/side-panel/side-panel.tsx
+++ b/src/views-components/side-panel/side-panel.tsx
@@ -13,6 +13,7 @@ import { Grid } from '@material-ui/core';
import { SidePanelButton } from 'views-components/side-panel-button/side-panel-button';
import { RootState } from 'store/store';
import SidePanelToggle from 'views-components/side-panel-toggle/side-panel-toggle';
+import { SidePanelCollapsed } from './side-panel-collapsed';
const DRAWER_WIDTH = 240;
@@ -47,7 +48,12 @@ export const SidePanel = withStyles(styles)(
connect(mapStateToProps, mapDispatchToProps)(
({ classes, ...props }: WithStyles<CssRules> & SidePanelTreeProps & { currentRoute: string }) =>
<Grid item xs>
- {props.isCollapsed ? <SidePanelToggle /> :
+ {props.isCollapsed ?
+ <>
+ <SidePanelToggle />
+ <SidePanelCollapsed />
+ </>
+ :
<>
<Grid className={classes.topButtonContainer}>
<SidePanelButton key={props.currentRoute} />
diff --git a/src/views/workbench/workbench.tsx b/src/views/workbench/workbench.tsx
index 385ffeff40..4a2cd70098 100644
--- a/src/views/workbench/workbench.tsx
+++ b/src/views/workbench/workbench.tsx
@@ -292,7 +292,7 @@ const applyCollapsedState = isCollapsed => {
const totalWidth: number = document.getElementsByClassName("splitter-layout")[0]?.clientWidth;
const rightPanelExpandedWidth = (totalWidth - COLLAPSE_ICON_SIZE) / (totalWidth / 100);
if (rightPanel) {
- rightPanel.setAttribute("style", `width: ${isCollapsed ? rightPanelExpandedWidth : getSplitterInitialSize()}%`);
+ rightPanel.setAttribute("style", `width: ${isCollapsed ? `calc(${rightPanelExpandedWidth}% - 1rem)` : `${getSplitterInitialSize()}%`}`);
}
const splitter = document.getElementsByClassName("layout-splitter")[0];
isCollapsed ? splitter?.classList.add("layout-splitter-disabled") : splitter?.classList.remove("layout-splitter-disabled");
commit 45dab1a8d772d04484cdd8a5f7487cb74a105ad9
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Thu Nov 2 10:47:11 2023 -0400
19302: switched collapse icon to svg Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/public/mui-start-icon.png b/public/mui-start-icon.png
deleted file mode 100644
index 8393837131..0000000000
Binary files a/public/mui-start-icon.png and /dev/null differ
diff --git a/public/mui-start-icon.svg b/public/mui-start-icon.svg
new file mode 100644
index 0000000000..3140cc336c
--- /dev/null
+++ b/public/mui-start-icon.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path d="M80-240v-480h80v480H80Zm560 0-57-56 144-144H240v-80h487L584-664l56-56 240 240-240 240Z"/></svg>
\ No newline at end of file
diff --git a/src/views-components/side-panel-toggle/side-panel-toggle.tsx b/src/views-components/side-panel-toggle/side-panel-toggle.tsx
index f7f5cf4bef..0bcfbd3de9 100644
--- a/src/views-components/side-panel-toggle/side-panel-toggle.tsx
+++ b/src/views-components/side-panel-toggle/side-panel-toggle.tsx
@@ -23,7 +23,7 @@ const SidePanelToggle = (props: collapseButtonProps) => {
marginTop: '0.4rem'
},
icon: {
- opacity: '0.6',
+ opacity: '0.5',
},
}
@@ -31,9 +31,9 @@ const SidePanelToggle = (props: collapseButtonProps) => {
<IconButton style={collapseButtonIconStyles.root} onClick={() => { props.toggleSidePanel(props.isCollapsed) }}>
<div>
{props.isCollapsed ?
- <img style={collapseButtonIconStyles.icon} src='/mui-start-icon.png'/>
+ <img style={collapseButtonIconStyles.icon} src='/mui-start-icon.svg'/>
:
- <img style={{ ...collapseButtonIconStyles.icon, transform: "rotate(180deg)"}} src='/mui-start-icon.png'/>}
+ <img style={{ ...collapseButtonIconStyles.icon, transform: "rotate(180deg)"}} src='/mui-start-icon.svg'/>}
</div>
</IconButton>
</Tooltip>
commit 89e80fa011ac209afc87d5440ceef174c2e5ef70
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Thu Nov 2 10:38:55 2023 -0400
19302: replaced sidePanelCollapse arrow icon Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/public/arrow-to-left.png b/public/arrow-to-left.png
deleted file mode 100644
index 262c1483cf..0000000000
Binary files a/public/arrow-to-left.png and /dev/null differ
diff --git a/public/arrow-to-right.png b/public/arrow-to-right.png
deleted file mode 100644
index 8205c21572..0000000000
Binary files a/public/arrow-to-right.png and /dev/null differ
diff --git a/public/collapseLHS-New.svg b/public/collapseLHS-New.svg
deleted file mode 100644
index ce2eac8ca6..0000000000
--- a/public/collapseLHS-New.svg
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- version="1.1"
- id="svg148"
- width="300"
- height="300"
- viewBox="0 0 300 300"
- xml:space="preserve"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:svg="http://www.w3.org/2000/svg"><defs
- id="defs152" /><g
- id="g154"><g
- id="g6337"><path
- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:22.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
- d="m 191.30938,11.567958 0.0193,275.898262"
- id="path400" /><path
- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:22.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
- d="m 202.57626,149.50744 -89.79939,0.0193"
- id="path400-3" /><path
- style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:59.0707;stroke-dasharray:none;stroke-opacity:1"
- id="path4546"
- d="M 81.113348,90.153499 -22.761723,90.479332 28.893633,0.35796487 Z"
- transform="matrix(0,0.5047589,0.28743877,-0.01237225,93.434122,136.22641)" /></g></g></svg>
diff --git a/public/mui-start-icon.png b/public/mui-start-icon.png
new file mode 100644
index 0000000000..8393837131
Binary files /dev/null and b/public/mui-start-icon.png differ
diff --git a/src/views-components/side-panel-toggle/side-panel-toggle.tsx b/src/views-components/side-panel-toggle/side-panel-toggle.tsx
index 9984886b8a..f7f5cf4bef 100644
--- a/src/views-components/side-panel-toggle/side-panel-toggle.tsx
+++ b/src/views-components/side-panel-toggle/side-panel-toggle.tsx
@@ -23,8 +23,6 @@ const SidePanelToggle = (props: collapseButtonProps) => {
marginTop: '0.4rem'
},
icon: {
- height: '1.5rem',
- width: '3rem',
opacity: '0.6',
},
}
@@ -33,9 +31,9 @@ const SidePanelToggle = (props: collapseButtonProps) => {
<IconButton style={collapseButtonIconStyles.root} onClick={() => { props.toggleSidePanel(props.isCollapsed) }}>
<div>
{props.isCollapsed ?
- <img style={{ ...collapseButtonIconStyles.icon, transform: "rotate(180deg)" }} src='/collapseLHS-New.svg#svgView(preserveAspectRatio(none))' alt='expand button' />
+ <img style={collapseButtonIconStyles.icon} src='/mui-start-icon.png'/>
:
- <img style={{ ...collapseButtonIconStyles.icon, }} src='/collapseLHS-New.svg#svgView(preserveAspectRatio(none))' alt='collapse button' />}
+ <img style={{ ...collapseButtonIconStyles.icon, transform: "rotate(180deg)"}} src='/mui-start-icon.png'/>}
</div>
</IconButton>
</Tooltip>
commit d1dd322910160323245664b836d9c2f69e068d85
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Thu Nov 2 09:38:41 2023 -0400
19302: fixed duplicated expand Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/src/components/tree/tree.tsx b/src/components/tree/tree.tsx
index 9a2c0b4844..d275cc0bed 100644
--- a/src/components/tree/tree.tsx
+++ b/src/components/tree/tree.tsx
@@ -14,6 +14,7 @@ import { ArvadosTheme } from 'common/custom-theme';
import { SidePanelRightArrowIcon } from '../icon/icon';
import { ResourceKind } from 'models/resource';
import { GroupClass } from 'models/group';
+import { SidePanelTreeCategory } from 'store/side-panel-tree/side-panel-tree-actions';
type CssRules = 'list'
| 'listItem'
@@ -100,6 +101,7 @@ export enum TreeItemStatus {
export interface TreeItem<T> {
data: T;
+ depth?: number;
id: string;
open: boolean;
active: boolean;
@@ -156,6 +158,10 @@ const getActionAndId = (event: any, initAction: string | undefined = undefined)
return [action, id];
};
+const isInFavoritesTree = (item: TreeItem<any>): boolean => {
+ return item.id === SidePanelTreeCategory.FAVORITES || item.id === SidePanelTreeCategory.PUBLIC_FAVORITES;
+}
+
interface FlatTreeProps {
it: TreeItem<any>;
levelIndentation: number;
@@ -241,11 +247,11 @@ const FlatTree = (props: FlatTreeProps) =>
.map((item: any) => <div key={item.id} data-id={item.id}
className={classnames(props.classes.childItem, { [props.classes.active]: item.active })}
style={{ paddingLeft: `${item.depth * props.levelIndentation}px` }}>
- <i data-action={FLAT_TREE_ACTIONS.toggleOpen} className={props.classes.toggableIconContainer}>
+ {!isInFavoritesTree(props.it) && <i data-action={FLAT_TREE_ACTIONS.toggleOpen} className={props.classes.toggableIconContainer}>
<ListItemIcon className={props.getToggableIconClassNames(item.open, item.active)}>
{props.getProperArrowAnimation(item.status, item.items!)}
</ListItemIcon>
- </i>
+ </i>}
{props.showSelection(item) && !props.useRadioButtons &&
<Checkbox
checked={item.selected}
@@ -327,6 +333,9 @@ export const Tree = withStyles(styles)(
const { levelIndentation = 20, itemRightPadding = 20 } = props;
return <List className={list}>
{items && items.map((it: TreeItem<T>, idx: number) => {
+ if (isInFavoritesTree(it) && it.open === true && it.items && it.items.length) {
+ it = { ...it, items: it.items.filter(item => item.depth && item.depth < 3) }
+ }
return <div key={`item/${level}/${it.id}`}>
<ListItem button className={listItem}
style={{
diff --git a/src/store/side-panel-tree/side-panel-tree-actions.ts b/src/store/side-panel-tree/side-panel-tree-actions.ts
index a76878f27f..579b95505e 100644
--- a/src/store/side-panel-tree/side-panel-tree-actions.ts
+++ b/src/store/side-panel-tree/side-panel-tree-actions.ts
@@ -115,7 +115,9 @@ const loadProject = (projectUuid: string) =>
.addAsc('name')
.getOrder()
};
+
const { items } = await services.projectService.list(params);
+
dispatch(treePickerActions.LOAD_TREE_PICKER_NODE_SUCCESS({
id: projectUuid,
pickerId: SIDE_PANEL_TREE,
@@ -228,7 +230,7 @@ export const toggleSidePanelTreeItemCollapse = (id: string) =>
if (node && node.status === TreeNodeStatus.INITIAL) {
await dispatch<any>(loadSidePanelTreeProjects(node.id));
}
- dispatch(treePickerActions.TOGGLE_TREE_PICKER_NODE_COLLAPSE({ id, pickerId: SIDE_PANEL_TREE }));
+ dispatch(treePickerActions.TOGGLE_TREE_PICKER_NODE_COLLAPSE({ id, pickerId: SIDE_PANEL_TREE }));
};
export const expandSidePanelTreeItem = (id: string) =>
commit 11b6ed73b4a0dc051072bb02a060396b55db4a26
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Wed Oct 25 14:40:53 2023 -0400
19302: increased width of layout splitter Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/src/views/workbench/workbench.tsx b/src/views/workbench/workbench.tsx
index be2542515b..385ffeff40 100644
--- a/src/views/workbench/workbench.tsx
+++ b/src/views/workbench/workbench.tsx
@@ -119,7 +119,7 @@ const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
},
splitter: {
"& > .layout-splitter": {
- width: "2px",
+ width: "3px",
},
"& > .layout-splitter-disabled": {
pointerEvents: "none",
commit eeb58b87d42354940875c56d41add15b4bfc0894
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Wed Oct 25 11:56:20 2023 -0400
19302: adjusted sidePanelTree icon styling Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/src/components/tree/tree.tsx b/src/components/tree/tree.tsx
index 28f1966aa1..9a2c0b4844 100644
--- a/src/components/tree/tree.tsx
+++ b/src/components/tree/tree.tsx
@@ -45,9 +45,10 @@ const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
color: theme.palette.grey["700"],
height: '14px',
width: '14px',
+ marginBottom: '0.4rem',
},
toggableIcon: {
- fontSize: '14px'
+ fontSize: '14px',
},
renderContainer: {
flex: 1
commit fdb810aee6d7ee83f3ccea81e21dac1a4c3823d6
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Tue Oct 24 15:56:58 2023 -0400
19302: sidePanel public faves updates, renamed 2 overloaded symbols Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/src/store/favorites/favorites-actions.ts b/src/store/favorites/favorites-actions.ts
index 8697e68666..1e23f35cbf 100644
--- a/src/store/favorites/favorites-actions.ts
+++ b/src/store/favorites/favorites-actions.ts
@@ -10,7 +10,7 @@ import { checkFavorite } from "./favorites-reducer";
import { snackbarActions, SnackbarKind } from "../snackbar/snackbar-actions";
import { ServiceRepository } from "services/services";
import { progressIndicatorActions } from "store/progress-indicator/progress-indicator-actions";
-import { loadFavorites} from "store/side-panel-tree/side-panel-tree-actions";
+import { loadFavoritesTree} from "store/side-panel-tree/side-panel-tree-actions";
export const favoritesActions = unionize({
TOGGLE_FAVORITE: ofType<{ resourceUuid: string }>(),
@@ -52,7 +52,7 @@ export const toggleFavorite = (resource: { uuid: string; name: string }) =>
kind: SnackbarKind.SUCCESS
}));
dispatch(progressIndicatorActions.STOP_WORKING("toggleFavorite"));
- dispatch<any>(loadFavorites())
+ dispatch<any>(loadFavoritesTree())
})
.catch((e: any) => {
dispatch(progressIndicatorActions.STOP_WORKING("toggleFavorite"));
diff --git a/src/store/public-favorites/public-favorites-actions.ts b/src/store/public-favorites/public-favorites-actions.ts
index 2d4539ada5..363b0b44a9 100644
--- a/src/store/public-favorites/public-favorites-actions.ts
+++ b/src/store/public-favorites/public-favorites-actions.ts
@@ -9,6 +9,7 @@ import { checkPublicFavorite } from "./public-favorites-reducer";
import { snackbarActions, SnackbarKind } from "store/snackbar/snackbar-actions";
import { ServiceRepository } from "services/services";
import { progressIndicatorActions } from "store/progress-indicator/progress-indicator-actions";
+import { loadPublicFavoritesTree } from "store/side-panel-tree/side-panel-tree-actions";
export const publicFavoritesActions = unionize({
TOGGLE_PUBLIC_FAVORITE: ofType<{ resourceUuid: string }>(),
@@ -48,6 +49,7 @@ export const togglePublicFavorite = (resource: { uuid: string; name: string }) =
kind: SnackbarKind.SUCCESS
}));
dispatch(progressIndicatorActions.STOP_WORKING("togglePublicFavorite"));
+ dispatch<any>(loadPublicFavoritesTree())
})
.catch((e: any) => {
dispatch(progressIndicatorActions.STOP_WORKING("togglePublicFavorite"));
diff --git a/src/store/side-panel-tree/side-panel-tree-actions.ts b/src/store/side-panel-tree/side-panel-tree-actions.ts
index 1105285fea..a76878f27f 100644
--- a/src/store/side-panel-tree/side-panel-tree-actions.ts
+++ b/src/store/side-panel-tree/side-panel-tree-actions.ts
@@ -96,9 +96,9 @@ export const loadSidePanelTreeProjects = (projectUuid: string) =>
const treePicker = getTreePicker(SIDE_PANEL_TREE)(getState().treePicker);
const node = treePicker ? getNode(projectUuid)(treePicker) : undefined;
if (projectUuid === SidePanelTreeCategory.PUBLIC_FAVORITES) {
- await dispatch<any>(loadPublicFavorites);
+ await dispatch<any>(loadPublicFavoritesTree());
} else if (projectUuid === SidePanelTreeCategory.FAVORITES) {
- await dispatch<any>(loadFavorites());
+ await dispatch<any>(loadFavoritesTree());
} else if (node || projectUuid !== '') {
await dispatch<any>(loadProject(projectUuid));
}
@@ -124,33 +124,33 @@ const loadProject = (projectUuid: string) =>
dispatch(resourcesActions.SET_RESOURCES(items));
};
-export const loadFavorites =()=> async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
+export const loadFavoritesTree = () => async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
dispatch(treePickerActions.LOAD_TREE_PICKER_NODE({ id: SidePanelTreeCategory.FAVORITES, pickerId: SIDE_PANEL_TREE }));
const params = {
filters: new FilterBuilder()
- .addEqual("link_class", LinkClass.STAR)
+ .addEqual('link_class', LinkClass.STAR)
.addEqual('tail_uuid', getUserUuid(getState()))
.addEqual('tail_kind', ResourceKind.USER)
.getFilters(),
- order: new OrderBuilder<ProjectResource>()
- .addDesc('createdAt')
- .getOrder(),
- limit: 50
- }
+ order: new OrderBuilder<ProjectResource>().addDesc('createdAt').getOrder(),
+ limit: 50,
+ };
const { items } = await services.linkService.list(params);
- dispatch(treePickerActions.LOAD_TREE_PICKER_NODE_SUCCESS({
- id: SidePanelTreeCategory.FAVORITES,
- pickerId: SIDE_PANEL_TREE,
- nodes: items.map(item => initTreeNode({ id: item.headUuid, value: item })),
- }));
+ dispatch(
+ treePickerActions.LOAD_TREE_PICKER_NODE_SUCCESS({
+ id: SidePanelTreeCategory.FAVORITES,
+ pickerId: SIDE_PANEL_TREE,
+ nodes: items.map(item => initTreeNode({ id: item.headUuid, value: item })),
+ })
+ );
dispatch(resourcesActions.SET_RESOURCES(items));
};
-const loadPublicFavorites = async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
+export const loadPublicFavoritesTree = () => async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
dispatch(treePickerActions.LOAD_TREE_PICKER_NODE({ id: SidePanelTreeCategory.PUBLIC_FAVORITES, pickerId: SIDE_PANEL_TREE }));
const uuidPrefix = getState().auth.config.uuidPrefix;
@@ -163,19 +163,19 @@ const loadPublicFavorites = async (dispatch: Dispatch, getState: () => RootState
.addEqual('owner_uuid', publicProjectUuid)
.addIsA('head_uuid', typeFilters)
.getFilters(),
- order: new OrderBuilder<ProjectResource>()
- .addDesc('createdAt')
- .getOrder(),
- limit: TREE_NODE_LIMIT
+ order: new OrderBuilder<ProjectResource>().addDesc('createdAt').getOrder(),
+ limit: TREE_NODE_LIMIT,
};
const { items } = await services.linkService.list(params);
- dispatch(treePickerActions.LOAD_TREE_PICKER_NODE_SUCCESS({
- id: SidePanelTreeCategory.PUBLIC_FAVORITES,
- pickerId: SIDE_PANEL_TREE,
- nodes: items.map(item => initTreeNode({ id: item.headUuid, value: item })),
- }));
+ dispatch(
+ treePickerActions.LOAD_TREE_PICKER_NODE_SUCCESS({
+ id: SidePanelTreeCategory.PUBLIC_FAVORITES,
+ pickerId: SIDE_PANEL_TREE,
+ nodes: items.map(item => initTreeNode({ id: item.headUuid, value: item })),
+ })
+ );
dispatch(resourcesActions.SET_RESOURCES(items));
};
commit cfa88a0915d5a49a6eb870505c346db2dbd58648
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Tue Oct 24 15:45:12 2023 -0400
19302: side panel updates favorites Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/src/store/favorites/favorites-actions.ts b/src/store/favorites/favorites-actions.ts
index bd4d878ed5..8697e68666 100644
--- a/src/store/favorites/favorites-actions.ts
+++ b/src/store/favorites/favorites-actions.ts
@@ -10,6 +10,7 @@ import { checkFavorite } from "./favorites-reducer";
import { snackbarActions, SnackbarKind } from "../snackbar/snackbar-actions";
import { ServiceRepository } from "services/services";
import { progressIndicatorActions } from "store/progress-indicator/progress-indicator-actions";
+import { loadFavorites} from "store/side-panel-tree/side-panel-tree-actions";
export const favoritesActions = unionize({
TOGGLE_FAVORITE: ofType<{ resourceUuid: string }>(),
@@ -51,6 +52,7 @@ export const toggleFavorite = (resource: { uuid: string; name: string }) =>
kind: SnackbarKind.SUCCESS
}));
dispatch(progressIndicatorActions.STOP_WORKING("toggleFavorite"));
+ dispatch<any>(loadFavorites())
})
.catch((e: any) => {
dispatch(progressIndicatorActions.STOP_WORKING("toggleFavorite"));
diff --git a/src/store/side-panel-tree/side-panel-tree-actions.ts b/src/store/side-panel-tree/side-panel-tree-actions.ts
index 8fac7dc22b..1105285fea 100644
--- a/src/store/side-panel-tree/side-panel-tree-actions.ts
+++ b/src/store/side-panel-tree/side-panel-tree-actions.ts
@@ -98,7 +98,7 @@ export const loadSidePanelTreeProjects = (projectUuid: string) =>
if (projectUuid === SidePanelTreeCategory.PUBLIC_FAVORITES) {
await dispatch<any>(loadPublicFavorites);
} else if (projectUuid === SidePanelTreeCategory.FAVORITES) {
- await dispatch<any>(loadFavorites);
+ await dispatch<any>(loadFavorites());
} else if (node || projectUuid !== '') {
await dispatch<any>(loadProject(projectUuid));
}
@@ -124,7 +124,7 @@ const loadProject = (projectUuid: string) =>
dispatch(resourcesActions.SET_RESOURCES(items));
};
-const loadFavorites = async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
+export const loadFavorites =()=> async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
dispatch(treePickerActions.LOAD_TREE_PICKER_NODE({ id: SidePanelTreeCategory.FAVORITES, pickerId: SIDE_PANEL_TREE }));
const params = {
@@ -170,7 +170,6 @@ const loadPublicFavorites = async (dispatch: Dispatch, getState: () => RootState
};
const { items } = await services.linkService.list(params);
- console.log(items)
dispatch(treePickerActions.LOAD_TREE_PICKER_NODE_SUCCESS({
id: SidePanelTreeCategory.PUBLIC_FAVORITES,
@@ -184,7 +183,6 @@ const loadPublicFavorites = async (dispatch: Dispatch, getState: () => RootState
export const activateSidePanelTreeItem = (id: string) =>
async (dispatch: Dispatch, getState: () => RootState) => {
const node = getSidePanelTreeNode(id)(getState().treePicker);
- console.log(id)
if (node && !node.active) {
dispatch(treePickerActions.ACTIVATE_TREE_PICKER_NODE({ id, pickerId: SIDE_PANEL_TREE }));
}
commit 0602c276f01e91b1bb6dafcc3adfc0dd43a922fc
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Tue Oct 24 11:59:40 2023 -0400
19302: ordering and limit set Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/src/store/side-panel-tree/side-panel-tree-actions.ts b/src/store/side-panel-tree/side-panel-tree-actions.ts
index 5ed7eee1ea..8fac7dc22b 100644
--- a/src/store/side-panel-tree/side-panel-tree-actions.ts
+++ b/src/store/side-panel-tree/side-panel-tree-actions.ts
@@ -14,14 +14,10 @@ import { getNodeAncestors, getNodeAncestorsIds, getNode, TreeNode, initTreeNode,
import { ProjectResource } from 'models/project';
import { OrderBuilder } from 'services/api/order-builder';
import { ResourceKind } from 'models/resource';
-import { GroupContentsResourcePrefix } from 'services/groups-service/groups-service';
-import { GroupClass } from 'models/group';
import { CategoriesListReducer } from 'common/plugintypes';
import { pluginConfig } from 'plugins';
import { LinkClass } from 'models/link';
-
-
export enum SidePanelTreeCategory {
PROJECTS = 'Home Projects',
SHARED_WITH_ME = 'Shared with me',
@@ -33,6 +29,7 @@ export enum SidePanelTreeCategory {
}
export const SIDE_PANEL_TREE = 'sidePanelTree';
+const TREE_NODE_LIMIT = 50
export const getSidePanelTree = (treePicker: TreePicker) =>
getTreePicker<ProjectResource | string>(SIDE_PANEL_TREE)(treePicker);
@@ -132,14 +129,14 @@ const loadFavorites = async (dispatch: Dispatch, getState: () => RootState, serv
const params = {
filters: new FilterBuilder()
- .addEqual("link_class", LinkClass.STAR)
- .addEqual('tail_uuid', getUserUuid(getState()))
- .addEqual('tail_kind', ResourceKind.USER)
- .getFilters(),
- // order: new OrderBuilder<ProjectResource>()
- // .addAsc('name', GroupContentsResourcePrefix.PROJECT)
- // .getOrder(),
- // limit: 50
+ .addEqual("link_class", LinkClass.STAR)
+ .addEqual('tail_uuid', getUserUuid(getState()))
+ .addEqual('tail_kind', ResourceKind.USER)
+ .getFilters(),
+ order: new OrderBuilder<ProjectResource>()
+ .addDesc('createdAt')
+ .getOrder(),
+ limit: 50
}
const { items } = await services.linkService.list(params);
@@ -166,10 +163,10 @@ const loadPublicFavorites = async (dispatch: Dispatch, getState: () => RootState
.addEqual('owner_uuid', publicProjectUuid)
.addIsA('head_uuid', typeFilters)
.getFilters(),
- // order: new OrderBuilder<ProjectResource>()
- // .addAsc('name', GroupContentsResourcePrefix.PROJECT)
- // .getOrder(),
- // limit: 1000
+ order: new OrderBuilder<ProjectResource>()
+ .addDesc('createdAt')
+ .getOrder(),
+ limit: TREE_NODE_LIMIT
};
const { items } = await services.linkService.list(params);
@@ -217,18 +214,11 @@ export const activateSidePanelTreeBranch = (id: string) =>
const userUuid = getUserUuid(getState());
if (!userUuid) { return; }
const ancestors = await services.ancestorsService.ancestors(id, userUuid);
- // const isShared = ancestors.every(({ uuid }) => uuid !== userUuid);
- // if (isShared) {
- // await dispatch<any>(loadSidePanelTreeProjects(SidePanelTreeCategory.SHARED_WITH_ME));
- // }
for (const ancestor of ancestors) {
await dispatch<any>(loadSidePanelTreeProjects(ancestor.uuid));
}
dispatch(treePickerActions.EXPAND_TREE_PICKER_NODES({
- ids: [
- // ...(isShared ? [SidePanelTreeCategory.SHARED_WITH_ME] : []),
- ...ancestors.map(ancestor => ancestor.uuid)
- ],
+ ids: ancestors.map(ancestor => ancestor.uuid),
pickerId: SIDE_PANEL_TREE
}));
dispatch(treePickerActions.ACTIVATE_TREE_PICKER_NODE({ id, pickerId: SIDE_PANEL_TREE }));
commit 70cc7de1fd7fb72c757a8466dee7ca6bf8e55c84
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Tue Oct 24 11:08:25 2023 -0400
19302: publicfavorites works Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/src/store/side-panel-tree/side-panel-tree-actions.ts b/src/store/side-panel-tree/side-panel-tree-actions.ts
index 05fe84f240..5ed7eee1ea 100644
--- a/src/store/side-panel-tree/side-panel-tree-actions.ts
+++ b/src/store/side-panel-tree/side-panel-tree-actions.ts
@@ -20,6 +20,8 @@ import { CategoriesListReducer } from 'common/plugintypes';
import { pluginConfig } from 'plugins';
import { LinkClass } from 'models/link';
+
+
export enum SidePanelTreeCategory {
PROJECTS = 'Home Projects',
SHARED_WITH_ME = 'Shared with me',
@@ -152,29 +154,34 @@ const loadFavorites = async (dispatch: Dispatch, getState: () => RootState, serv
};
const loadPublicFavorites = async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
- // dispatch(treePickerActions.LOAD_TREE_PICKER_NODE({ id: SidePanelTreeCategory.PUBLIC_FAVORITES, pickerId: SIDE_PANEL_TREE }));
-
- // const params = {
- // filters: `[${new FilterBuilder()
- // .addIsA('uuid', ResourceKind.PROJECT)
- // .addIn('group_class', [GroupClass.PROJECT, GroupClass.FILTER])
- // .addDistinct('uuid', getState().auth.config.uuidPrefix + '-j7d0g-publicfavorites')
- // .getFilters()}]`,
- // order: new OrderBuilder<ProjectResource>()
- // .addAsc('name', GroupContentsResourcePrefix.PROJECT)
- // .getOrder(),
- // limit: 1000
- // };
-
- // const { items } = await services.groupsService.shared(params);
-
- // dispatch(treePickerActions.LOAD_TREE_PICKER_NODE_SUCCESS({
- // id: SidePanelTreeCategory.PUBLIC_FAVORITES,
- // pickerId: SIDE_PANEL_TREE,
- // nodes: items.map(item => initTreeNode({ id: item.uuid, value: item })),
- // }));
-
- // dispatch(resourcesActions.SET_RESOURCES(items));
+ dispatch(treePickerActions.LOAD_TREE_PICKER_NODE({ id: SidePanelTreeCategory.PUBLIC_FAVORITES, pickerId: SIDE_PANEL_TREE }));
+
+ const uuidPrefix = getState().auth.config.uuidPrefix;
+ const publicProjectUuid = `${uuidPrefix}-j7d0g-publicfavorites`;
+ const typeFilters = [ResourceKind.COLLECTION, ResourceKind.CONTAINER_REQUEST, ResourceKind.GROUP, ResourceKind.WORKFLOW];
+
+ const params = {
+ filters: new FilterBuilder()
+ .addEqual('link_class', LinkClass.STAR)
+ .addEqual('owner_uuid', publicProjectUuid)
+ .addIsA('head_uuid', typeFilters)
+ .getFilters(),
+ // order: new OrderBuilder<ProjectResource>()
+ // .addAsc('name', GroupContentsResourcePrefix.PROJECT)
+ // .getOrder(),
+ // limit: 1000
+ };
+
+ const { items } = await services.linkService.list(params);
+ console.log(items)
+
+ dispatch(treePickerActions.LOAD_TREE_PICKER_NODE_SUCCESS({
+ id: SidePanelTreeCategory.PUBLIC_FAVORITES,
+ pickerId: SIDE_PANEL_TREE,
+ nodes: items.map(item => initTreeNode({ id: item.headUuid, value: item })),
+ }));
+
+ dispatch(resourcesActions.SET_RESOURCES(items));
};
export const activateSidePanelTreeItem = (id: string) =>
commit 8a4ef30d51b2ccc6138bc1d8d8300b106bcdd8b2
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Tue Oct 24 10:15:12 2023 -0400
19302: myfavorites works Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/src/store/side-panel-tree/side-panel-tree-actions.ts b/src/store/side-panel-tree/side-panel-tree-actions.ts
index ad0fac9fab..05fe84f240 100644
--- a/src/store/side-panel-tree/side-panel-tree-actions.ts
+++ b/src/store/side-panel-tree/side-panel-tree-actions.ts
@@ -18,6 +18,7 @@ import { GroupContentsResourcePrefix } from 'services/groups-service/groups-serv
import { GroupClass } from 'models/group';
import { CategoriesListReducer } from 'common/plugintypes';
import { pluginConfig } from 'plugins';
+import { LinkClass } from 'models/link';
export enum SidePanelTreeCategory {
PROJECTS = 'Home Projects',
@@ -81,7 +82,6 @@ export const initSidePanelTree = () =>
nodes
}));
SIDE_PANEL_CATEGORIES.forEach(category => {
- // if (category !== SidePanelTreeCategory.PROJECTS && category !== SidePanelTreeCategory.SHARED_WITH_ME) {
if (category !== SidePanelTreeCategory.PROJECTS && category !== SidePanelTreeCategory.FAVORITES && category !== SidePanelTreeCategory.PUBLIC_FAVORITES ) {
dispatch(treePickerActions.LOAD_TREE_PICKER_NODE_SUCCESS({
id: category,
@@ -96,10 +96,11 @@ export const loadSidePanelTreeProjects = (projectUuid: string) =>
async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
const treePicker = getTreePicker(SIDE_PANEL_TREE)(getState().treePicker);
const node = treePicker ? getNode(projectUuid)(treePicker) : undefined;
- // if (projectUuid === SidePanelTreeCategory.SHARED_WITH_ME) {
- // await dispatch<any>(loadSharedRoot);
- // } else
- if (node || projectUuid !== '') {
+ if (projectUuid === SidePanelTreeCategory.PUBLIC_FAVORITES) {
+ await dispatch<any>(loadPublicFavorites);
+ } else if (projectUuid === SidePanelTreeCategory.FAVORITES) {
+ await dispatch<any>(loadFavorites);
+ } else if (node || projectUuid !== '') {
await dispatch<any>(loadProject(projectUuid));
}
};
@@ -124,35 +125,62 @@ const loadProject = (projectUuid: string) =>
dispatch(resourcesActions.SET_RESOURCES(items));
};
-// const loadSharedRoot = async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
-// dispatch(treePickerActions.LOAD_TREE_PICKER_NODE({ id: SidePanelTreeCategory.SHARED_WITH_ME, pickerId: SIDE_PANEL_TREE }));
+const loadFavorites = async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
+ dispatch(treePickerActions.LOAD_TREE_PICKER_NODE({ id: SidePanelTreeCategory.FAVORITES, pickerId: SIDE_PANEL_TREE }));
-// const params = {
-// filters: `[${new FilterBuilder()
-// .addIsA('uuid', ResourceKind.PROJECT)
-// .addIn('group_class', [GroupClass.PROJECT, GroupClass.FILTER])
-// .addDistinct('uuid', getState().auth.config.uuidPrefix + '-j7d0g-publicfavorites')
-// .getFilters()}]`,
-// order: new OrderBuilder<ProjectResource>()
-// .addAsc('name', GroupContentsResourcePrefix.PROJECT)
-// .getOrder(),
-// limit: 1000
-// };
+ const params = {
+ filters: new FilterBuilder()
+ .addEqual("link_class", LinkClass.STAR)
+ .addEqual('tail_uuid', getUserUuid(getState()))
+ .addEqual('tail_kind', ResourceKind.USER)
+ .getFilters(),
+ // order: new OrderBuilder<ProjectResource>()
+ // .addAsc('name', GroupContentsResourcePrefix.PROJECT)
+ // .getOrder(),
+ // limit: 50
+ }
+
+ const { items } = await services.linkService.list(params);
+
+ dispatch(treePickerActions.LOAD_TREE_PICKER_NODE_SUCCESS({
+ id: SidePanelTreeCategory.FAVORITES,
+ pickerId: SIDE_PANEL_TREE,
+ nodes: items.map(item => initTreeNode({ id: item.headUuid, value: item })),
+ }));
+
+ dispatch(resourcesActions.SET_RESOURCES(items));
+};
+
+const loadPublicFavorites = async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
+ // dispatch(treePickerActions.LOAD_TREE_PICKER_NODE({ id: SidePanelTreeCategory.PUBLIC_FAVORITES, pickerId: SIDE_PANEL_TREE }));
-// const { items } = await services.groupsService.shared(params);
+ // const params = {
+ // filters: `[${new FilterBuilder()
+ // .addIsA('uuid', ResourceKind.PROJECT)
+ // .addIn('group_class', [GroupClass.PROJECT, GroupClass.FILTER])
+ // .addDistinct('uuid', getState().auth.config.uuidPrefix + '-j7d0g-publicfavorites')
+ // .getFilters()}]`,
+ // order: new OrderBuilder<ProjectResource>()
+ // .addAsc('name', GroupContentsResourcePrefix.PROJECT)
+ // .getOrder(),
+ // limit: 1000
+ // };
-// dispatch(treePickerActions.LOAD_TREE_PICKER_NODE_SUCCESS({
-// id: SidePanelTreeCategory.SHARED_WITH_ME,
-// pickerId: SIDE_PANEL_TREE,
-// nodes: items.map(item => initTreeNode({ id: item.uuid, value: item })),
-// }));
+ // const { items } = await services.groupsService.shared(params);
-// dispatch(resourcesActions.SET_RESOURCES(items));
-// };
+ // dispatch(treePickerActions.LOAD_TREE_PICKER_NODE_SUCCESS({
+ // id: SidePanelTreeCategory.PUBLIC_FAVORITES,
+ // pickerId: SIDE_PANEL_TREE,
+ // nodes: items.map(item => initTreeNode({ id: item.uuid, value: item })),
+ // }));
+
+ // dispatch(resourcesActions.SET_RESOURCES(items));
+};
export const activateSidePanelTreeItem = (id: string) =>
async (dispatch: Dispatch, getState: () => RootState) => {
const node = getSidePanelTreeNode(id)(getState().treePicker);
+ console.log(id)
if (node && !node.active) {
dispatch(treePickerActions.ACTIVATE_TREE_PICKER_NODE({ id, pickerId: SIDE_PANEL_TREE }));
}
commit c986217e3930682b6b4ab49941314bdeb0357595
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Thu Oct 19 15:03:58 2023 -0400
19302: shared with me disabled Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/src/store/side-panel-tree/side-panel-tree-actions.ts b/src/store/side-panel-tree/side-panel-tree-actions.ts
index f6015fbfa0..ad0fac9fab 100644
--- a/src/store/side-panel-tree/side-panel-tree-actions.ts
+++ b/src/store/side-panel-tree/side-panel-tree-actions.ts
@@ -81,7 +81,8 @@ export const initSidePanelTree = () =>
nodes
}));
SIDE_PANEL_CATEGORIES.forEach(category => {
- if (category !== SidePanelTreeCategory.PROJECTS && category !== SidePanelTreeCategory.SHARED_WITH_ME) {
+ // if (category !== SidePanelTreeCategory.PROJECTS && category !== SidePanelTreeCategory.SHARED_WITH_ME) {
+ if (category !== SidePanelTreeCategory.PROJECTS && category !== SidePanelTreeCategory.FAVORITES && category !== SidePanelTreeCategory.PUBLIC_FAVORITES ) {
dispatch(treePickerActions.LOAD_TREE_PICKER_NODE_SUCCESS({
id: category,
pickerId: SIDE_PANEL_TREE,
@@ -95,9 +96,10 @@ export const loadSidePanelTreeProjects = (projectUuid: string) =>
async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
const treePicker = getTreePicker(SIDE_PANEL_TREE)(getState().treePicker);
const node = treePicker ? getNode(projectUuid)(treePicker) : undefined;
- if (projectUuid === SidePanelTreeCategory.SHARED_WITH_ME) {
- await dispatch<any>(loadSharedRoot);
- } else if (node || projectUuid !== '') {
+ // if (projectUuid === SidePanelTreeCategory.SHARED_WITH_ME) {
+ // await dispatch<any>(loadSharedRoot);
+ // } else
+ if (node || projectUuid !== '') {
await dispatch<any>(loadProject(projectUuid));
}
};
@@ -122,31 +124,31 @@ const loadProject = (projectUuid: string) =>
dispatch(resourcesActions.SET_RESOURCES(items));
};
-const loadSharedRoot = async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
- dispatch(treePickerActions.LOAD_TREE_PICKER_NODE({ id: SidePanelTreeCategory.SHARED_WITH_ME, pickerId: SIDE_PANEL_TREE }));
-
- const params = {
- filters: `[${new FilterBuilder()
- .addIsA('uuid', ResourceKind.PROJECT)
- .addIn('group_class', [GroupClass.PROJECT, GroupClass.FILTER])
- .addDistinct('uuid', getState().auth.config.uuidPrefix + '-j7d0g-publicfavorites')
- .getFilters()}]`,
- order: new OrderBuilder<ProjectResource>()
- .addAsc('name', GroupContentsResourcePrefix.PROJECT)
- .getOrder(),
- limit: 1000
- };
+// const loadSharedRoot = async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
+// dispatch(treePickerActions.LOAD_TREE_PICKER_NODE({ id: SidePanelTreeCategory.SHARED_WITH_ME, pickerId: SIDE_PANEL_TREE }));
- const { items } = await services.groupsService.shared(params);
+// const params = {
+// filters: `[${new FilterBuilder()
+// .addIsA('uuid', ResourceKind.PROJECT)
+// .addIn('group_class', [GroupClass.PROJECT, GroupClass.FILTER])
+// .addDistinct('uuid', getState().auth.config.uuidPrefix + '-j7d0g-publicfavorites')
+// .getFilters()}]`,
+// order: new OrderBuilder<ProjectResource>()
+// .addAsc('name', GroupContentsResourcePrefix.PROJECT)
+// .getOrder(),
+// limit: 1000
+// };
- dispatch(treePickerActions.LOAD_TREE_PICKER_NODE_SUCCESS({
- id: SidePanelTreeCategory.SHARED_WITH_ME,
- pickerId: SIDE_PANEL_TREE,
- nodes: items.map(item => initTreeNode({ id: item.uuid, value: item })),
- }));
+// const { items } = await services.groupsService.shared(params);
- dispatch(resourcesActions.SET_RESOURCES(items));
-};
+// dispatch(treePickerActions.LOAD_TREE_PICKER_NODE_SUCCESS({
+// id: SidePanelTreeCategory.SHARED_WITH_ME,
+// pickerId: SIDE_PANEL_TREE,
+// nodes: items.map(item => initTreeNode({ id: item.uuid, value: item })),
+// }));
+
+// dispatch(resourcesActions.SET_RESOURCES(items));
+// };
export const activateSidePanelTreeItem = (id: string) =>
async (dispatch: Dispatch, getState: () => RootState) => {
@@ -180,16 +182,16 @@ export const activateSidePanelTreeBranch = (id: string) =>
const userUuid = getUserUuid(getState());
if (!userUuid) { return; }
const ancestors = await services.ancestorsService.ancestors(id, userUuid);
- const isShared = ancestors.every(({ uuid }) => uuid !== userUuid);
- if (isShared) {
- await dispatch<any>(loadSidePanelTreeProjects(SidePanelTreeCategory.SHARED_WITH_ME));
- }
+ // const isShared = ancestors.every(({ uuid }) => uuid !== userUuid);
+ // if (isShared) {
+ // await dispatch<any>(loadSidePanelTreeProjects(SidePanelTreeCategory.SHARED_WITH_ME));
+ // }
for (const ancestor of ancestors) {
await dispatch<any>(loadSidePanelTreeProjects(ancestor.uuid));
}
dispatch(treePickerActions.EXPAND_TREE_PICKER_NODES({
ids: [
- ...(isShared ? [SidePanelTreeCategory.SHARED_WITH_ME] : []),
+ // ...(isShared ? [SidePanelTreeCategory.SHARED_WITH_ME] : []),
...ancestors.map(ancestor => ancestor.uuid)
],
pickerId: SIDE_PANEL_TREE
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list