Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ceph fixes 2 #172

Open
wants to merge 2 commits into
base: cernbox
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 13 additions & 12 deletions packages/web-app-files/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,6 @@ const navItems = [
return capabilities.spaces && capabilities.spaces.projects === true
}
},
{
name: $gettext('Win spaces'),
icon: 'layout-grid',
route: {
path: `/${appInfo.id}/spaces/winspaces`
},
activeFor: [{ path: `/${appInfo.id}/spaces/winspaces` }],
enabled(capabilities) {
return capabilities.group_based?.capabilities?.includes('cephfs-mount') || false
}
},
{
name: $gettext('Deleted files'),
icon: 'delete-bin-5',
Expand All @@ -115,7 +104,19 @@ const navItems = [
enabled(capabilities) {
return true
}
}
},
{
name: $gettext('WinSpaces exporer'),
icon: 'layout-grid',
route: {
path: `/${appInfo.id}/spaces/winspaces`
},
separate: true,
activeFor: [{ path: `/${appInfo.id}/spaces/winspaces` }],
enabled(capabilities) {
return capabilities.group_based?.capabilities?.includes('cephfs-mount') || false
}
},
]

export default {
Expand Down
10 changes: 7 additions & 3 deletions packages/web-client/src/webdav/listFiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,13 @@ export const ListFilesFactory = ({ sdk }: WebDavOptions) => {
davProperties || DavProperties.Default
)
const resources = webDavResources.map(buildResource)
if (fileId && fileId !== resources[0].fileId) {
return listFilesCorrectedPath()
}

// TODO: Figure out what to do with this. Currently the SDK makes a
// request to and endpoint which will always return 404:
// https://github.com/cernbox/owncloud-sdk/blob/02a26239931f5dc76043df270acbe966bc06f52e/src/fileManagement.js#L120
// if (fileId && fileId !== resources[0].fileId) {
// return listFilesCorrectedPath()
// }
return { resource: resources[0], children: resources.slice(1) } as ListFilesResult
} catch (e) {
if (e.statusCode === 404 && fileId) {
Expand Down