Commit 12034fae authored by Andrea Lorenzon's avatar Andrea Lorenzon 💬
Browse files

modified deployment for local, on new notebook

parent cad00b8f
Pipeline #1569 passed with stages
in 1 minute and 33 seconds
......@@ -3,21 +3,21 @@ from functools import reduce
from typing import List
def JSON_from_folder(rootDir: str) -> List[dict]:
def JSON_from_folder(root_dir: str) -> List[dict]:
""" Creates jsTree JSON from file path
From a given path, returns a JSON of its subfolders and files, ready as input for jsTree
:param rootDir: path of the folder
:param root_dir: path of the folder
:return: a dictionary of folder content
"""
import os
import settings
d = {}
rootDir = rootDir.rstrip(os.sep)
start = rootDir.rfind(os.sep) + 1
for path, dirs, files in os.walk(rootDir):
root_dir = root_dir.rstrip(os.sep)
start = root_dir.rfind(os.sep) + 1
for path, dirs, files in os.walk(root_dir):
folders = path[start:].split(os.sep)
subdir = dict.fromkeys(files)
parent = reduce(dict.get, folders[:-1], d)
......
import os
# deploy type ["local", "VUO", "K8S"]
deploy= "VUO"
deploy= "local"
# paths
fileFolderPath = {"local" : os.getenv('H5NUVOLA_PATH', "/home/andrea/PycharmProjects/"),
fileFolderPath = {"local" : os.getenv('H5NUVOLA_PATH', "/home/andrealorenzon/projects/h5nuvola2/"),
"VUO" : "/",
"K8S" : os.getenv('H5NUVOLA_PATH', "./"),
"rafec" : os.getenv('H5NUVOLA_PATH', "/")}
fileFolderName = {"local" : "imgs",
fileFolderName = {"local" : "hdf5_test_files",
"VUO" : "",
"K8S" : "data",
"rafec" : "/"}
......
......@@ -57,7 +57,9 @@
</ul>
<!-- search bar and show notebook -->
<form class="form-inline my-2 my-lg-0">
<button id='showNotebook' class="btn btn-outline-light my-2 my-sm-0">Show Notebook</button>
<!--
<button id='showNotebook' class="btn btn-outline-light my-2 my-sm-0">Show Notebook</button>
-->
<input class="form-control mr-sm-2" type="text" placeholder="work in progress" aria-label="Search">
<button class="btn btn-outline-light my-2 my-sm-0" type="submit">Search</button>
</form>
......@@ -84,12 +86,14 @@
<div id="visualize-hdf5">Select a dataset.</div>
<button id='addToRepButton' class='btn btn-primary'>Add to report</button>
<button id="printReportBtn" class="btn btn-primary" >Print report (for <span id="reportCounter"></span> elements)</button>
<button id='importInNotebook' class='btn btn-primary'>Import dataset in open notebook</button>
<pre id='importCode'><code></code></pre>
<div id="notebook">
<!-- <button id='importInNotebook' class='btn btn-primary'>Import dataset in open notebook</button>
<pre id='importCode'><code></code></pre> -->
<!--
<div id="notebook">
<iframe src="http://jn.apps.okd2.ceric.fedcloud.eu"></iframe>
<!--<iframe src="http://h5-notebook.apps.okd2.ceric.fedcloud.eu:80/tree"></iframe>-->
</div>
</div>
-->
</div>
</div>
</main>
......
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