File tree Expand file tree Collapse file tree
routes/_authenticated/studies/$studyId/explore Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,9 +42,11 @@ function Debug() {
4242 // Allow to keep expanded items when the tree is reloaded with `reloadTree`
4343 const [ expandedItems , setExpandedItems ] = useState < string [ ] > ( [ ] ) ;
4444 const { path } = Route . useSearch ( ) ;
45+ const isFilesystemStudy = study . storageMode === "filesystem" ;
4546
4647 const treeDataResponse = usePromiseWithSnackbarError ( ( ) => getTreeData ( study . id ) , {
4748 errorMessage : t ( "studies.error.retrieveData" ) ,
49+ disabled : ! isFilesystemStudy ,
4850 deps : [ study . id ] ,
4951 } ) ;
5052
@@ -108,6 +110,10 @@ function Debug() {
108110 // JSX
109111 ////////////////////////////////////////////////////////////////
110112
113+ if ( ! isFilesystemStudy ) {
114+ throw new Error ( `${ Route . path } is only available for studies with filesystem storage mode.` ) ;
115+ }
116+
111117 return (
112118 < DebugContext . Provider value = { contextValue } >
113119 < SplitView splitId = "debug" >
Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ function StudyExploreLayout() {
8888 params,
8989 } ) ,
9090 } ,
91- {
91+ study . storageMode === "filesystem" && {
9292 id : "debug" ,
9393 label : t ( "study.debug" ) ,
9494 linkOptions : linkOptions ( {
@@ -97,7 +97,7 @@ function StudyExploreLayout() {
9797 search : { path : undefined } ,
9898 } ) ,
9999 } ,
100- ] }
100+ ] . filter ( Boolean ) }
101101 divider
102102 />
103103 ) ;
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ export const convertStudyDtoToMetadata = (
4040 owner : metadata . owner ,
4141 author : metadata . author ,
4242 editor : metadata . editor ,
43+ storageMode : metadata . storage_mode ,
4344 groups : metadata . groups ,
4445 type : metadata . type ,
4546 publicMode : metadata . public_mode ,
Original file line number Diff line number Diff line change @@ -90,6 +90,7 @@ export interface StudyMetadata {
9090 workspace : string ;
9191 managed : boolean ;
9292 archived : boolean ;
93+ storageMode : StorageMode ;
9394 groups : Array < { id : string ; name : string } > ;
9495 publicMode : StudyPublicMode ;
9596 folder ?: string ;
You can’t perform that action at this time.
0 commit comments