Commit 91f42792 authored by Floreal Cabanettes's avatar Floreal Cabanettes
Browse files

Set storage folder in applications.properties and use it in server file browser

parent a0fe2e75
......@@ -56,6 +56,7 @@ work_directory = <path>/work
# Where should the pipelines write temporary files, should be
# accessible by all cluster nodes
tmp_directory = <path>/tmp
server_storage = <path>
[softwares]
# uncomment and set if not in the PATH
......
......@@ -124,3 +124,6 @@ class JFlowConfigReader(object):
return self.reader.get("workflows", workflow_class+".group")
except:
return ""
def get_storage_folder(self):
return self.reader.get("storage", "server_storage")
......@@ -123,6 +123,11 @@ class JFlowServer (object):
# Create a workflow manager to get access to our workflows
self.wfmanager = WorkflowsManager()
self.jflow_config_reader = JFlowConfigReader()
@staticmethod
def get_storage_folder():
jflowconf = JFlowConfigReader()
return jflowconf.get_storage_folder()
@staticmethod
def quickstart(server_class, config=None, daemon=False):
......@@ -578,7 +583,7 @@ class JFlowServer (object):
r=['<ul class="jqueryFileTree" style="display: none;">']
try:
r=['<ul class="jqueryFileTree" style="display: none;">']
d=kwargs["dir"] if kwargs["dir"] != "/" else os.path.expanduser("~")
d=kwargs["dir"] if kwargs["dir"] != "/" else self.get_storage_folder()
for f in self.sort_files(os.listdir(d), d):
ff=os.path.join(d,f)
if os.path.isdir(ff):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment