added icons for paths into a dict ICON, and func to retrieve the icon based on objects type of path
This commit is contained in:
11
shared.py
11
shared.py
@@ -4,6 +4,12 @@ import os
|
|||||||
hostname = socket.gethostname()
|
hostname = socket.gethostname()
|
||||||
PROD_HOST="pa_web"
|
PROD_HOST="pa_web"
|
||||||
|
|
||||||
|
ICON={}
|
||||||
|
ICON["Import"]="fa-file-upload"
|
||||||
|
ICON["Storage"]="fa-database"
|
||||||
|
ICON["Bin"]="fa-trash-alt"
|
||||||
|
|
||||||
|
|
||||||
if hostname == PROD_HOST:
|
if hostname == PROD_HOST:
|
||||||
PA_JOB_MANAGER_HOST="192.168.0.2"
|
PA_JOB_MANAGER_HOST="192.168.0.2"
|
||||||
DB_URL = 'postgresql+psycopg2://pa:for_now_pa@192.168.0.2:55432/pa'
|
DB_URL = 'postgresql+psycopg2://pa:for_now_pa@192.168.0.2:55432/pa'
|
||||||
@@ -41,6 +47,11 @@ def CreateFoldersSelect(selected):
|
|||||||
str += '<option selected value="False">Flat View</option>'
|
str += '<option selected value="False">Flat View</option>'
|
||||||
str += '</select>'
|
str += '</select>'
|
||||||
return str
|
return str
|
||||||
|
|
||||||
|
def LocationIcon(obj):
|
||||||
|
print( f"LocationIcon( {obj.in_dir.in_path.type.name} ) == {ICON[obj.in_dir.in_path.type.name]}" )
|
||||||
|
return ICON[obj.in_dir.in_path.type.name]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def SymlinkName(ptype, path, file):
|
def SymlinkName(ptype, path, file):
|
||||||
|
|||||||
Reference in New Issue
Block a user