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

task/DES-2562: Add Scratch (Frontera) to listings #1082

Merged
Show file tree
Hide file tree
Changes from 3 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
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ class DataDepotNavCtrl {
state: 'myData',
description: 'Private directory for your data'
},
{
name: 'My Working Files',
collapsible: false,
state: 'myDataWork',
description: 'Working directory for use with JupyterHub'
jarosenb marked this conversation as resolved.
Show resolved Hide resolved
},
{
name: 'My Projects',
collapsible: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class DataDepotToolbarCtrl {
placeholder() {
var stateNames = {
'myData': 'My Data',
'myDataWork': 'My Working Files',
jarosenb marked this conversation as resolved.
Show resolved Hide resolved
'projects.list': 'My Projects',
'sharedData': 'Shared Data',
'boxData': 'Box',
Expand Down
33 changes: 33 additions & 0 deletions designsafe/static/scripts/data-depot/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,39 @@ function config(
},
},
})
.state('myDataWork', {
url: '/agave/{systemId}/{filePath:any}/?query_string&offset&limit',
component: 'dataDepotBrowser',
params: {
systemId: 'designsafe.storage.working',
jarosenb marked this conversation as resolved.
Show resolved Hide resolved
filePath: Django.user,
},
resolve: {
apiParams: ()=> {
return {
fileMgr: 'agave',
};
},
path: ($stateParams, Django) => {
'ngInject';
if ($stateParams.filePath.replace(/^\/+/, '') === '') {
return Django.user;
}
return $stateParams.filePath;
},
auth: ($q, Django) => {
'ngInject';
if (Django.context.authenticated) {
return true;
}

return $q.reject({
type: 'authn',
context: Django.context,
});
},
},
})
.state('sharedData', {
url: '/shared/{systemId}/{filePath:any}?query_string',
component: 'dataDepotBrowser',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export class FileOperationService {

getTests(files) {
const externalDataStates = ['boxData', 'dropboxData', 'googledriveData'];
const agaveDataStates = ['myData', 'projects.view', 'projects.curation'];
const agaveDataStates = ['myData', 'myDataWork', 'projects.view', 'projects.curation'];
jarosenb marked this conversation as resolved.
Show resolved Hide resolved
let isHazmapper = files.length > 0 ? files.some((e) => e.name.endsWith('hazmapper')) : false;
const tests = {
copy: this.Django.context.authenticated && !isHazmapper && files.length > 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class WorkspaceDataBrowserCtrl {

this.options = [
{ name: 'myData', label: 'My Data' },
{ name: 'myDataWork', label: 'My Working Files' },
jarosenb marked this conversation as resolved.
Show resolved Hide resolved
{ name: 'myProjects', label: 'My Projects' },
{ name: 'publications', label: 'Published' },
{ name: 'nees', label: 'Published (NEES)' },
Expand Down Expand Up @@ -58,6 +59,17 @@ class WorkspaceDataBrowserCtrl {
});
this.breadcrumbParams = this.FileListingService.fileMgrMappings.agave.breadcrumbParams;
break;
case 'myDataWork':
this.listingType = 'files';
this.FileListingService.browse({
section: 'main',
api: 'agave',
scheme: 'private',
system: 'designsafe.storage.working',
jarosenb marked this conversation as resolved.
Show resolved Hide resolved
path: this.Django.user,
});
this.breadcrumbParams = this.FileListingService.fileMgrMappings.agave.breadcrumbParams;
break;
case 'myProjects':
this.listingType = 'projects';
this.ProjectService.listProjects({ section: 'main' });
Expand Down
Loading