3
3
import shutil
4
4
import pwd
5
5
import getpass
6
- from jupyter_pgweb_proxy .jupyter_config import config
6
+ from jupyter - pgadmin - proxy .jupyter_config import config
7
7
8
8
9
9
def _get_env (port , base_url ):
@@ -19,14 +19,14 @@ def _get_env(port, base_url):
19
19
"""
20
20
21
21
return {
22
- "PGWEB_RUN_PORT " : str (port ),
23
- "PGWEB_URL_PREFIX " : f"{ base_url } pgweb /" .lstrip ("/" ),
22
+ "PGADMIN_RUN_PORT " : str (port ),
23
+ "PGADMIN_URL_PREFIX " : f"{ base_url } pgadmin /" .lstrip ("/" ),
24
24
}
25
25
26
26
27
27
def get_icon_path ():
28
28
return os .path .join (
29
- os .path .dirname (os .path .abspath (__file__ )), "pgweb .svg"
29
+ os .path .dirname (os .path .abspath (__file__ )), "pgadmin .svg"
30
30
)
31
31
32
32
@@ -52,15 +52,15 @@ def run_app():
52
52
"""
53
53
54
54
logging .basicConfig (level = "INFO" )
55
- logger = logging .getLogger ("pgweb " )
55
+ logger = logging .getLogger ("pgadmin " )
56
56
logger .setLevel ("INFO" )
57
- logger .info ("Initializing Jupyter pgweb Proxy" )
57
+ logger .info ("Initializing Jupyter pgadmin Proxy" )
58
58
59
59
icon_path = get_icon_path ()
60
60
try :
61
- executable_name = shutil .which ("pgweb " )
61
+ executable_name = shutil .which ("pgadmin " )
62
62
except Exception :
63
- executable_name = "pgweb "
63
+ executable_name = "pgadmin "
64
64
host = "127.0.0.1"
65
65
user = get_system_user ()
66
66
logger .debug (f"[{ user } ] Icon_path: { icon_path } " )
@@ -78,7 +78,7 @@ def run_app():
78
78
"absolute_url" : True ,
79
79
# "rewrite_response": rewrite_netloc,
80
80
"launcher_entry" : {
81
- "title" : "pgweb " ,
81
+ "title" : "pgadmin " ,
82
82
"icon_path" : icon_path
83
83
},
84
- }
84
+ }
0 commit comments