Fixes for use dashboard in modules

This commit is contained in:
Antonio de la Rosa 2024-02-09 19:43:34 +01:00
parent 8a0354b85b
commit ff81d2aa8d
3 changed files with 69 additions and 8 deletions

View file

@ -3,7 +3,7 @@
import os
from collections import OrderedDict
def scandir(mydir, config_parser, arr_dir=OrderedDict(), father=''):
def scandir(mydir, config_parser, arr_dir=OrderedDict(), arr_hash={}, father=''):
search_dir=os.listdir(mydir)
@ -35,11 +35,12 @@ def scandir(mydir, config_parser, arr_dir=OrderedDict(), father=''):
form=config_parser['form'][k]
arr_dir[father][os.path.basename(mydir)].append([config_parser['modules'][k], mydir+'/'+k+'.py', 1, form])
arr_hash[mydir+'/'+k+'.py']=[config_parser['modules'][k], mydir+'/'+k+'.py', 1, form]
elif os.path.isdir(mydir+'/'+one_path):
arr_dir=scandir(mydir+'/'+one_path, config_parser, arr_dir, os.path.basename(mydir))
(arr_dir, arr_hash)=scandir(mydir+'/'+one_path, config_parser, arr_dir, arr_hash, os.path.basename(mydir))
return arr_dir
return (arr_dir, arr_hash)