[ARVADOS-WORKBENCH2] updated: 2.1.0-140-g701db873
Git user
git at public.arvados.org
Tue Jan 5 21:56:55 UTC 2021
Summary of changes:
.../context-menu/action-sets/project-action-set.ts | 10 ++-
.../action-sets/project-admin-action-set.ts | 98 +---------------------
.../webdav-s3-dialog/webdav-s3-dialog.tsx | 21 +++--
3 files changed, 27 insertions(+), 102 deletions(-)
via 701db873d602c7f1ba414ebbbf07551892587055 (commit)
from 515ca43f5ea8c913b4c17224698a15778fea6c95 (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 701db873d602c7f1ba414ebbbf07551892587055
Author: Peter Amstutz <peter.amstutz at curii.com>
Date: Tue Jan 5 16:56:25 2021 -0500
16622: Show connection info for projects as well.
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>
diff --git a/src/views-components/context-menu/action-sets/project-action-set.ts b/src/views-components/context-menu/action-sets/project-action-set.ts
index c0b925c2..57ba0ea3 100644
--- a/src/views-components/context-menu/action-sets/project-action-set.ts
+++ b/src/views-components/context-menu/action-sets/project-action-set.ts
@@ -3,7 +3,7 @@
// SPDX-License-Identifier: AGPL-3.0
import { ContextMenuActionSet } from "../context-menu-action-set";
-import { NewProjectIcon, RenameIcon, MoveToIcon, DetailsIcon, AdvancedIcon, OpenIcon, Link } from '~/components/icon/icon';
+import { NewProjectIcon, RenameIcon, MoveToIcon, DetailsIcon, AdvancedIcon, OpenIcon, Link, FolderSharedIcon } from '~/components/icon/icon';
import { ToggleFavoriteAction } from "../actions/favorite-action";
import { toggleFavorite } from "~/store/favorites/favorites-actions";
import { favoritePanelActions } from "~/store/favorite-panel/favorite-panel-action";
@@ -17,6 +17,7 @@ import { openSharingDialog } from "~/store/sharing-dialog/sharing-dialog-actions
import { openAdvancedTabDialog } from "~/store/advanced-tab/advanced-tab";
import { toggleDetailsPanel } from '~/store/details-panel/details-panel-action';
import { copyToClipboardAction, openInNewTabAction } from "~/store/open-in-new-tab/open-in-new-tab.actions";
+import { openWebDavS3InfoDialog } from "~/store/collections/collection-info-actions";
export const readOnlyProjectActionSet: ContextMenuActionSet = [[
{
@@ -56,6 +57,13 @@ export const readOnlyProjectActionSet: ContextMenuActionSet = [[
dispatch<any>(openAdvancedTabDialog(resource.uuid));
}
},
+ {
+ icon: FolderSharedIcon,
+ name: "Open as network folder or S3 bucket",
+ execute: (dispatch, resource) => {
+ dispatch<any>(openWebDavS3InfoDialog(resource.uuid));
+ }
+ },
]];
export const projectActionSet: ContextMenuActionSet = [
diff --git a/src/views-components/context-menu/action-sets/project-admin-action-set.ts b/src/views-components/context-menu/action-sets/project-admin-action-set.ts
index 398864dc..a3a8ce79 100644
--- a/src/views-components/context-menu/action-sets/project-admin-action-set.ts
+++ b/src/views-components/context-menu/action-sets/project-admin-action-set.ts
@@ -3,69 +3,14 @@
// SPDX-License-Identifier: AGPL-3.0
import { ContextMenuActionSet } from "../context-menu-action-set";
-import { NewProjectIcon, RenameIcon, MoveToIcon, DetailsIcon, AdvancedIcon, OpenIcon, Link } from '~/components/icon/icon';
-import { ToggleFavoriteAction } from "../actions/favorite-action";
-import { toggleFavorite } from "~/store/favorites/favorites-actions";
-import { favoritePanelActions } from "~/store/favorite-panel/favorite-panel-action";
-import { openMoveProjectDialog } from '~/store/projects/project-move-actions';
-import { openProjectCreateDialog } from '~/store/projects/project-create-actions';
-import { openProjectUpdateDialog } from '~/store/projects/project-update-actions';
-import { ToggleTrashAction } from "~/views-components/context-menu/actions/trash-action";
-import { toggleProjectTrashed } from "~/store/trash/trash-actions";
-import { ShareIcon } from '~/components/icon/icon';
-import { openSharingDialog } from "~/store/sharing-dialog/sharing-dialog-actions";
-import { openAdvancedTabDialog } from "~/store/advanced-tab/advanced-tab";
-import { toggleDetailsPanel } from '~/store/details-panel/details-panel-action';
import { TogglePublicFavoriteAction } from "~/views-components/context-menu/actions/public-favorite-action";
import { togglePublicFavorite } from "~/store/public-favorites/public-favorites-actions";
import { publicFavoritePanelActions } from "~/store/public-favorites-panel/public-favorites-action";
-import { copyToClipboardAction, openInNewTabAction } from "~/store/open-in-new-tab/open-in-new-tab.actions";
+
+import { projectActionSet } from "~/views-components/context-menu/action-sets/project-action-set";
export const projectAdminActionSet: ContextMenuActionSet = [[
- {
- icon: NewProjectIcon,
- name: "New project",
- execute: (dispatch, resource) => {
- dispatch<any>(openProjectCreateDialog(resource.uuid));
- }
- },
- {
- icon: OpenIcon,
- name: "Open in new tab",
- execute: (dispatch, resource) => {
- dispatch<any>(openInNewTabAction(resource));
- }
- },
- {
- icon: Link,
- name: "Copy to clipboard",
- execute: (dispatch, resource) => {
- dispatch<any>(copyToClipboardAction(resource));
- }
- },
- {
- icon: RenameIcon,
- name: "Edit project",
- execute: (dispatch, resource) => {
- dispatch<any>(openProjectUpdateDialog(resource));
- }
- },
- {
- icon: ShareIcon,
- name: "Share",
- execute: (dispatch, { uuid }) => {
- dispatch<any>(openSharingDialog(uuid));
- }
- },
- {
- component: ToggleFavoriteAction,
- name: 'ToggleFavoriteAction',
- execute: (dispatch, resource) => {
- dispatch<any>(toggleFavorite(resource)).then(() => {
- dispatch<any>(favoritePanelActions.REQUEST_ITEMS());
- });
- }
- },
+ ...projectActionSet.reduce((prev, next) => prev.concat(next), []),
{
component: TogglePublicFavoriteAction,
name: 'TogglePublicFavoriteAction',
@@ -74,40 +19,5 @@ export const projectAdminActionSet: ContextMenuActionSet = [[
dispatch<any>(publicFavoritePanelActions.REQUEST_ITEMS());
});
}
- },
- {
- icon: MoveToIcon,
- name: "Move to",
- execute: (dispatch, resource) => {
- dispatch<any>(openMoveProjectDialog(resource));
- }
- },
- // {
- // icon: CopyIcon,
- // name: "Copy to project",
- // execute: (dispatch, resource) => {
- // // add code
- // }
- // },
- {
- icon: DetailsIcon,
- name: "View details",
- execute: dispatch => {
- dispatch<any>(toggleDetailsPanel());
- }
- },
- {
- icon: AdvancedIcon,
- name: "Advanced",
- execute: (dispatch, resource) => {
- dispatch<any>(openAdvancedTabDialog(resource.uuid));
- }
- },
- {
- component: ToggleTrashAction,
- name: 'ToggleTrashAction',
- execute: (dispatch, resource) => {
- dispatch<any>(toggleProjectTrashed(resource.uuid, resource.ownerUuid, resource.isTrashed!!));
- }
- },
+ }
]];
diff --git a/src/views-components/webdav-s3-dialog/webdav-s3-dialog.tsx b/src/views-components/webdav-s3-dialog/webdav-s3-dialog.tsx
index 1aa9a15b..217f9a2a 100644
--- a/src/views-components/webdav-s3-dialog/webdav-s3-dialog.tsx
+++ b/src/views-components/webdav-s3-dialog/webdav-s3-dialog.tsx
@@ -76,6 +76,13 @@ export const WebDavS3InfoDialog = compose(
tokenSecret = tokenUuid;
}
+ const supportsWebdav = (props.data.uuid.indexOf("-4zz18-") === 5);
+
+ let activeTab = props.data.activeTab;
+ if (!supportsWebdav) {
+ activeTab = 2;
+ }
+
return <Dialog
open={props.open}
maxWidth="md"
@@ -84,13 +91,13 @@ export const WebDavS3InfoDialog = compose(
<CardHeader
title={`Open as Network Folder or S3 Bucket`} />
<div className={props.classes.details} >
- <Tabs value={props.data.activeTab} onChange={props.data.setActiveTab}>
- <Tab key="cyberduck" label="Cyberduck/Mountain Duck or Gnome Files" />
- <Tab key="windows" label="Windows or MacOS" />
- <Tab key="s3" label="S3 bucket" />
+ <Tabs value={activeTab} onChange={props.data.setActiveTab}>
+ {supportsWebdav && <Tab value={0} key="cyberduck" label="Cyberduck/Mountain Duck or Gnome Files" />}
+ {supportsWebdav && <Tab value={1} key="windows" label="Windows or MacOS" />}
+ <Tab value={2} key="s3" label="S3 bucket" />
</Tabs>
- <TabPanel index={1} value={props.data.activeTab}>
+ <TabPanel index={0} value={activeTab}>
<h2>Settings</h2>
<DetailsAttribute
@@ -122,7 +129,7 @@ export const WebDavS3InfoDialog = compose(
</ol>
</TabPanel>
- <TabPanel index={0} value={props.data.activeTab}>
+ <TabPanel index={1} value={activeTab}>
<DetailsAttribute
label='Server'
value={<a href={cyberDav.toString()}>{cyberDav.toString()}</a>}
@@ -147,7 +154,7 @@ export const WebDavS3InfoDialog = compose(
</TabPanel>
- <TabPanel index={2} value={props.data.activeTab}>
+ <TabPanel index={2} value={activeTab}>
<DetailsAttribute
label='Endpoint'
value={s3endpoint.host}
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list