// Copyright (C) The Arvados Authors. All rights reserved. // // SPDX-License-Identifier: AGPL-3.0 import * as React from "react"; import { Dialog, DialogActions, Button, StyleRulesCallback, WithStyles, withStyles, CardHeader, Tab, Tabs } from '@material-ui/core'; import { withDialog } from "~/store/dialog/with-dialog"; import { COLLECTION_WEBDAV_S3_DIALOG_NAME, WebDavS3InfoDialogData } from '~/store/collections/collection-info-actions'; import { WithDialogProps } from '~/store/dialog/with-dialog'; import { compose } from 'redux'; import { DetailsAttribute } from "~/components/details-attribute/details-attribute"; export type CssRules = 'details'; const styles: StyleRulesCallback = theme => ({ details: { marginLeft: theme.spacing.unit * 3, marginRight: theme.spacing.unit * 3, } }); interface TabPanelData { children: React.ReactElement[]; value: number; index: number; } function TabPanel(props: TabPanelData) { const { children, value, index } = props; return ( ); } export const WebDavS3InfoDialog = compose( withDialog(COLLECTION_WEBDAV_S3_DIALOG_NAME), withStyles(styles), )( (props: WithDialogProps & WithStyles) => { if (!props.data.downloadUrl) { return null; } let winDav; let cyberDav; if (props.data.collectionsUrl.indexOf("*") > -1) { const withuuid = props.data.collectionsUrl.replace("*", props.data.uuid); winDav = new URL(withuuid); cyberDav = new URL(withuuid); } else { winDav = new URL(props.data.downloadUrl); cyberDav = new URL(props.data.downloadUrl); winDav.pathname = `/by_id/${props.data.uuid}`; cyberDav.pathname = `/by_id/${props.data.uuid}`; } cyberDav.username = props.data.username; const cyberDavStr = "dav" + cyberDav.toString().slice(4); const s3endpoint = new URL(props.data.collectionsUrl.replace(/\/\*(--[^.]+)?\./, "/")); const sp = props.data.token.split("/"); let tokenUuid; let tokenSecret; if (sp.length === 3 && sp[0] === "v2" && sp[1].slice(0, 5) === props.data.localCluster) { tokenUuid = sp[1]; tokenSecret = sp[2]; } else { tokenUuid = props.data.token.replace(/\//g, "_"); tokenSecret = tokenUuid; } const supportsWebdav = (props.data.uuid.indexOf("-4zz18-") === 5); let activeTab = props.data.activeTab; if (!supportsWebdav) { activeTab = 2; } return
{supportsWebdav && } {supportsWebdav && }

Settings

{winDav.toString()}} copyValue={winDav.toString()} />

Windows

  1. Open File Explorer
  2. Click on "This PC", then go to Computer → Add a Network Location
  3. Click Next, then choose "Add a custom network location", then click Next

MacOS

  1. Open Finder
  2. Click Go → Connect to server
{cyberDavStr}} copyValue={cyberDavStr} />

Gnome

  1. Open Files
  2. Select +Other Locations
  3. Connect to Server → Enter server address
; } );