Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Andrea Lorenzon
H5nuvola2
Commits
12034fae
Commit
12034fae
authored
Aug 02, 2021
by
Andrea Lorenzon
💬
Browse files
modified deployment for local, on new notebook
parent
cad00b8f
Pipeline
#1569
passed with stages
in 1 minute and 33 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
modules/jsTreeCeric.py
View file @
12034fae
...
...
@@ -3,21 +3,21 @@ from functools import reduce
from
typing
import
List
def
JSON_from_folder
(
root
D
ir
:
str
)
->
List
[
dict
]:
def
JSON_from_folder
(
root
_d
ir
:
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 root
D
ir: path of the folder
:param root
_d
ir: path of the folder
:return: a dictionary of folder content
"""
import
os
import
settings
d
=
{}
root
D
ir
=
root
D
ir
.
rstrip
(
os
.
sep
)
start
=
root
D
ir
.
rfind
(
os
.
sep
)
+
1
for
path
,
dirs
,
files
in
os
.
walk
(
root
D
ir
):
root
_d
ir
=
root
_d
ir
.
rstrip
(
os
.
sep
)
start
=
root
_d
ir
.
rfind
(
os
.
sep
)
+
1
for
path
,
dirs
,
files
in
os
.
walk
(
root
_d
ir
):
folders
=
path
[
start
:].
split
(
os
.
sep
)
subdir
=
dict
.
fromkeys
(
files
)
parent
=
reduce
(
dict
.
get
,
folders
[:
-
1
],
d
)
...
...
settings.py
View file @
12034fae
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/andrea
lorenzon/projects/h5nuvola2
/"
),
"VUO"
:
"/"
,
"K8S"
:
os
.
getenv
(
'H5NUVOLA_PATH'
,
"./"
),
"rafec"
:
os
.
getenv
(
'H5NUVOLA_PATH'
,
"/"
)}
fileFolderName
=
{
"local"
:
"
img
s"
,
fileFolderName
=
{
"local"
:
"
hdf5_test_file
s"
,
"VUO"
:
""
,
"K8S"
:
"data"
,
"rafec"
:
"/"
}
...
...
templates/index.html
View file @
12034fae
...
...
@@ -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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment