Compare commits

..

No commits in common. "486baac69cae47a2a3c115489492033e9a38e6c6" and "54ffb2c4832bb133e445c9e0b72db7aef2de397c" have entirely different histories.

2 changed files with 1 additions and 12 deletions

View file

@ -12,21 +12,12 @@ os.chdir(base)
for root, folders, files in os.walk(join(base, 'static')): for root, folders, files in os.walk(join(base, 'static')):
for f in files: for f in files:
src = join(root, f) src = join(root, f)
if 'ontology/' in src:
continue
target = src.replace(base, '/srv/pandora') target = src.replace(base, '/srv/pandora')
rel_src = os.path.relpath(src, dirname(target)) rel_src = os.path.relpath(src, dirname(target))
if os.path.exists(target): if os.path.exists(target):
os.unlink(target) os.unlink(target)
os.symlink(rel_src, target) os.symlink(rel_src, target)
src = join(base, 'static', 'ontology')
target = src.replace(base, '/srv/pandora')
rel_src = os.path.relpath(src, dirname(target))
if os.path.exists(target):
os.unlink(target)
os.symlink(rel_src, target)
os.chdir(base) os.chdir(base)
src = join(base, 'config.jsonc') src = join(base, 'config.jsonc')
target = '/srv/pandora/pandora/config.%s.jsonc' % name target = '/srv/pandora/pandora/config.%s.jsonc' % name

View file

@ -22,12 +22,10 @@ def find_path(parent, root=None, path=None):
return r return r
def get_node(name, children, parent=None): def get_node(name, children, parent=None):
children_ = [get_node(child, children[child], name) for child in children]
children_.sort(key=lambda c: c['name'])
node = { node = {
"size": len(children) + 100, "size": len(children) + 100,
"name": name, "name": name,
"children": children_ "children": [get_node(child, children[child], name) for child in children]
} }
if not node['children']: if not node['children']:
del node['children'] del node['children']