|
|
@ -33,8 +33,8 @@ version {meta.__version__}
|
|
|
|
|
|
|
|
|
|
|
|
{meta.__license__}"""
|
|
|
|
{meta.__license__}"""
|
|
|
|
|
|
|
|
|
|
|
|
PASSED = ' '.join(['[',colored(u'\u2713', 'green'),']'])
|
|
|
|
PASSED = ' '.join(['[',colored('\u2713', 'green'),']'])
|
|
|
|
FAILED= ' '.join(['[',colored(u'\u2717','red'),']'])
|
|
|
|
FAILED= ' '.join(['[',colored('\u2717','red'),']'])
|
|
|
|
|
|
|
|
|
|
|
|
INVALID_FOLDER = """
|
|
|
|
INVALID_FOLDER = """
|
|
|
|
{FAILED} Unable to proceed, could not find project manifest. It should be qcms-manifest.json
|
|
|
|
{FAILED} Unable to proceed, could not find project manifest. It should be qcms-manifest.json
|
|
|
@ -323,13 +323,25 @@ def handle_theme (
|
|
|
|
_root = os.sep.join( manifest.split(os.sep)[:-1]+[_config['layout']['root']])
|
|
|
|
_root = os.sep.join( manifest.split(os.sep)[:-1]+[_config['layout']['root']])
|
|
|
|
|
|
|
|
|
|
|
|
if show :
|
|
|
|
if show :
|
|
|
|
_df = pd.DataFrame({"available":themes.List()})
|
|
|
|
_available = themes.List()
|
|
|
|
if _df.shape[0] > 0 :
|
|
|
|
_df = pd.DataFrame({"available":_available})
|
|
|
|
values = themes.installed(_root)
|
|
|
|
# if _df.shape[0] > 0 :
|
|
|
|
values.sort()
|
|
|
|
if _available :
|
|
|
|
values = values + np.repeat(f"""{FAILED}""", _df.shape[0] - len(values)).tolist()
|
|
|
|
_installed = themes.installed(_root)
|
|
|
|
values.sort()
|
|
|
|
_available.sort()
|
|
|
|
_df['installed'] = values
|
|
|
|
_marks = []
|
|
|
|
|
|
|
|
for _themeName in _available :
|
|
|
|
|
|
|
|
_symbol = '\u2713' if _themeName in _installed else '\u2717'
|
|
|
|
|
|
|
|
if _config['system']['theme'] == _themeName :
|
|
|
|
|
|
|
|
_symbol = '\u2605'
|
|
|
|
|
|
|
|
# colored('\u2713', 'green')
|
|
|
|
|
|
|
|
# _symbol = _symbol.replace('[ ','').replace(' ]','')
|
|
|
|
|
|
|
|
_marks.append( str(_symbol))
|
|
|
|
|
|
|
|
_df = pd.DataFrame({"available":_available,"installed":_marks})
|
|
|
|
|
|
|
|
# values.sort()
|
|
|
|
|
|
|
|
# values = values + np.repeat(f"""{FAILED}""", _df.shape[0] - len(values)).tolist()
|
|
|
|
|
|
|
|
# values.sort()
|
|
|
|
|
|
|
|
# _df['installed'] = values
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
_df = f"""{FAILED} No themes were found in registry,\ncurl {themes.URL}/api/themes/List (QCMS_HOST_URL should be set)"""
|
|
|
|
_df = f"""{FAILED} No themes were found in registry,\ncurl {themes.URL}/api/themes/List (QCMS_HOST_URL should be set)"""
|
|
|
|
print (_df)
|
|
|
|
print (_df)
|
|
|
|